vue-data-ui 3.28.10 → 3.28.12

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 (348) hide show
  1. package/dist/BaseDraggableDialog-DVstuNhT.js +1 -0
  2. package/dist/{BaseLegendToggle-BIzyyI1h.js → BaseLegendToggle-VzX69MCo.js} +1 -1
  3. package/dist/BaseZoomControls-D4i_j6vc.js +1 -0
  4. package/dist/ColorPicker-DmVnJGVv.js +1 -0
  5. package/dist/{DataTable-Dof6yhO7.js → DataTable-KeuZB1JM.js} +1 -1
  6. package/dist/{HillActions-BMH9pSmQ.js → HillActions-D--h5brJ.js} +1 -1
  7. package/dist/{Legend-DM0ClX3D.js → Legend-W9YVYVX-.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-DXdAh1Sz.js → NonSvgPenAndPaper-B2kuh5Yb.js} +1 -1
  9. package/dist/{PackageVersion-DKSNC-YP.js → PackageVersion-PdpqwkYX.js} +1 -1
  10. package/dist/PenAndPaper-BV5ODysA.js +1 -0
  11. package/dist/SlicerPreview-0m9E7Zh_.js +1 -0
  12. package/dist/{StackChartTable-CZteRybF.js → StackChartTable-D-31a1zL.js} +1 -1
  13. package/dist/{UserOptions-B9EyfU9n.js → UserOptions-K1N7zQRx.js} +1 -1
  14. package/dist/XyAnalysisOptions-DmKfwSu6.js +1 -0
  15. package/dist/components/vue-ui-3d-bar.js +1 -1
  16. package/dist/components/vue-ui-accordion.js +1 -1
  17. package/dist/components/vue-ui-age-pyramid.js +1 -1
  18. package/dist/components/vue-ui-annotator.js +1 -1
  19. package/dist/components/vue-ui-bullet.js +1 -1
  20. package/dist/components/vue-ui-bump.js +1 -1
  21. package/dist/components/vue-ui-candlestick.js +1 -1
  22. package/dist/components/vue-ui-carousel-table.js +1 -1
  23. package/dist/components/vue-ui-chestnut.js +1 -1
  24. package/dist/components/vue-ui-chord.js +1 -1
  25. package/dist/components/vue-ui-circle-pack.js +1 -1
  26. package/dist/components/vue-ui-cursor.js +1 -1
  27. package/dist/components/vue-ui-dag.js +1 -1
  28. package/dist/components/vue-ui-dashboard.js +1 -1
  29. package/dist/components/vue-ui-digits.js +1 -1
  30. package/dist/components/vue-ui-donut-evolution.js +1 -1
  31. package/dist/components/vue-ui-donut.js +1 -1
  32. package/dist/components/vue-ui-dumbbell.js +1 -1
  33. package/dist/components/vue-ui-flow.js +1 -1
  34. package/dist/components/vue-ui-funnel.js +1 -1
  35. package/dist/components/vue-ui-galaxy.js +1 -1
  36. package/dist/components/vue-ui-gauge.js +1 -1
  37. package/dist/components/vue-ui-geo.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-graph.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-hill.js +1 -1
  42. package/dist/components/vue-ui-history-plot.js +1 -1
  43. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  44. package/dist/components/vue-ui-kpi.js +1 -1
  45. package/dist/components/vue-ui-label.js +1 -1
  46. package/dist/components/vue-ui-mini-loader.js +1 -1
  47. package/dist/components/vue-ui-molecule.js +1 -1
  48. package/dist/components/vue-ui-mood-radar.js +1 -1
  49. package/dist/components/vue-ui-nested-donuts.js +1 -1
  50. package/dist/components/vue-ui-onion.js +1 -1
  51. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  52. package/dist/components/vue-ui-quadrant.js +1 -1
  53. package/dist/components/vue-ui-quick-chart.js +1 -1
  54. package/dist/components/vue-ui-radar.js +1 -1
  55. package/dist/components/vue-ui-rating.js +1 -1
  56. package/dist/components/vue-ui-relation-circle.js +1 -1
  57. package/dist/components/vue-ui-ridgeline.js +1 -1
  58. package/dist/components/vue-ui-rings.js +1 -1
  59. package/dist/components/vue-ui-scatter.js +1 -1
  60. package/dist/components/vue-ui-skeleton.js +1 -1
  61. package/dist/components/vue-ui-smiley.js +1 -1
  62. package/dist/components/vue-ui-spark-trend.js +1 -1
  63. package/dist/components/vue-ui-sparkbar.js +1 -1
  64. package/dist/components/vue-ui-sparkgauge.js +1 -1
  65. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  66. package/dist/components/vue-ui-sparkline.js +1 -1
  67. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  68. package/dist/components/vue-ui-stackbar.js +1 -1
  69. package/dist/components/vue-ui-stackline.js +1 -1
  70. package/dist/components/vue-ui-strip-plot.js +1 -1
  71. package/dist/components/vue-ui-table-heatmap.js +1 -1
  72. package/dist/components/vue-ui-table-sparkline.js +1 -1
  73. package/dist/components/vue-ui-table.js +1 -1
  74. package/dist/components/vue-ui-thermometer.js +1 -1
  75. package/dist/components/vue-ui-timer.js +1 -1
  76. package/dist/components/vue-ui-tiremarks.js +1 -1
  77. package/dist/components/vue-ui-treemap.js +1 -1
  78. package/dist/components/vue-ui-vertical-bar.js +1 -1
  79. package/dist/components/vue-ui-waffle.js +1 -1
  80. package/dist/components/vue-ui-wheel.js +1 -1
  81. package/dist/components/vue-ui-word-cloud.js +1 -1
  82. package/dist/components/vue-ui-world.js +1 -1
  83. package/dist/components/vue-ui-xy-canvas.js +1 -1
  84. package/dist/components/vue-ui-xy.js +1 -1
  85. package/dist/package-DWjs4THo.js +1 -0
  86. package/dist/{render-common-Cy1X2PzP.js → render-common-C9aE_Va1.js} +1 -1
  87. package/dist/resolveChartConfig-0IvbmIE_.js +1 -0
  88. package/dist/ssr/vue-ui-donut.js +1 -1
  89. package/dist/ssr/vue-ui-xy.js +1 -1
  90. package/dist/ssr.js +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/types/vue-data-ui.d.ts +1 -0
  93. package/dist/useConfig-_JwRfIqE.js +1 -0
  94. package/dist/{useObjectBindings-C_70Czuj.js → useObjectBindings-D789Dz63.js} +1 -1
  95. package/dist/utils.js +1 -1
  96. package/dist/vue-data-ui-Da3HK_wb.js +1 -0
  97. package/dist/vue-data-ui.js +1 -1
  98. package/dist/vue-ui-3d-bar-D1XfKXhp.js +19 -0
  99. package/dist/{vue-ui-accordion-E8TJfFeK.js → vue-ui-accordion-DxGxf-Rm.js} +1 -1
  100. package/dist/vue-ui-age-pyramid-CJqqtEIh.js +1 -0
  101. package/dist/vue-ui-annotator-D31LD4-s.js +331 -0
  102. package/dist/vue-ui-bullet-CxyL5Bdm.js +34 -0
  103. package/dist/vue-ui-bump-BWWMzAN_.js +8 -0
  104. package/dist/vue-ui-candlestick-CQXdyPEt.js +22 -0
  105. package/dist/vue-ui-carousel-table-DwsfnL_l.js +1 -0
  106. package/dist/vue-ui-chestnut-DV7XKL7g.js +1 -0
  107. package/dist/vue-ui-chord-DRNn_E6i.js +21 -0
  108. package/dist/vue-ui-circle-pack-BcA9ZxZS.js +13 -0
  109. package/dist/vue-ui-cursor-DSgVvP1L.js +1 -0
  110. package/dist/vue-ui-dag-CWpyU7AJ.js +9 -0
  111. package/dist/vue-ui-dashboard-Dh_Zi8oG.js +1 -0
  112. package/dist/{vue-ui-digits-DbxT72mM.js → vue-ui-digits-Cy3Y6qro.js} +2 -2
  113. package/dist/vue-ui-donut-BqnLIKwZ.js +22 -0
  114. package/dist/vue-ui-donut-DasGeYdl.js +47 -0
  115. package/dist/vue-ui-donut-evolution-Bw7ilDYR.js +2 -0
  116. package/dist/vue-ui-dumbbell-BPvvKhag.js +9 -0
  117. package/dist/vue-ui-flow-XI5Y3qdk.js +3 -0
  118. package/dist/vue-ui-funnel-DqoQogQE.js +1 -0
  119. package/dist/vue-ui-galaxy-NRaBIHpn.js +1 -0
  120. package/dist/vue-ui-gauge-DX4SBIKS.js +1 -0
  121. package/dist/vue-ui-geo-C3e4J_kw.js +1 -0
  122. package/dist/vue-ui-gizmo-C9ls2b4h.js +1 -0
  123. package/dist/{vue-ui-graph-9YSKwYhC.js → vue-ui-graph-CBkbFJIA.js} +3 -3
  124. package/dist/vue-ui-heatmap-D6KP1N8f.js +1 -0
  125. package/dist/vue-ui-hill-8c-9u8eg.js +1 -0
  126. package/dist/vue-ui-history-plot-CowxWkEd.js +2 -0
  127. package/dist/vue-ui-horizontal-bar-CVP5jBNJ.js +4 -0
  128. package/dist/{vue-ui-kpi-BxW6DctE.js → vue-ui-kpi-D1MUlURM.js} +1 -1
  129. package/dist/{vue-ui-label-rxuzmeyD.js → vue-ui-label-CBrMoFDG.js} +2 -2
  130. package/dist/{vue-ui-mini-loader-DpAYrTYb.js → vue-ui-mini-loader-PsWZLMLF.js} +1 -1
  131. package/dist/vue-ui-molecule-BRB54XBD.js +1 -0
  132. package/dist/vue-ui-mood-radar-CkHJdUyF.js +1 -0
  133. package/dist/vue-ui-nested-donuts-C-7VZO11.js +19 -0
  134. package/dist/vue-ui-onion-erpKpDKg.js +5 -0
  135. package/dist/vue-ui-parallel-coordinate-plot-BDg0pRkN.js +9 -0
  136. package/dist/vue-ui-quadrant-CUdNxC6W.js +2 -0
  137. package/dist/vue-ui-quick-chart-DE5Zwioe.js +16 -0
  138. package/dist/vue-ui-radar-6y6er9ND.js +1 -0
  139. package/dist/vue-ui-rating-D0QvpD3V.js +1 -0
  140. package/dist/vue-ui-relation-circle-CjnG9G7s.js +1 -0
  141. package/dist/vue-ui-ridgeline-B4qi2Ajl.js +2 -0
  142. package/dist/vue-ui-rings-EYfCkNB6.js +1 -0
  143. package/dist/vue-ui-scatter-Tw-5uRac.js +9 -0
  144. package/dist/{vue-ui-skeleton-SlYTmirP.js → vue-ui-skeleton-CZMyXM-1.js} +3 -3
  145. package/dist/{vue-ui-smiley-DZVFOGfv.js → vue-ui-smiley-C00q-teB.js} +1 -1
  146. package/dist/{vue-ui-spark-trend-D155vscB.js → vue-ui-spark-trend-Cmj4aWcQ.js} +1 -1
  147. package/dist/vue-ui-sparkbar-Crq1Vui3.js +1 -0
  148. package/dist/{vue-ui-sparkgauge-CFj0wLj5.js → vue-ui-sparkgauge-CN_9yenn.js} +1 -1
  149. package/dist/vue-ui-sparkhistogram-CK7JmyCw.js +1 -0
  150. package/dist/vue-ui-sparkline-2_RlGrAT.js +1 -0
  151. package/dist/vue-ui-sparkstackbar-Dwdn2_9q.js +1 -0
  152. package/dist/vue-ui-stackbar-BVmQJn2b.js +29 -0
  153. package/dist/vue-ui-stackline-nvhui30B.js +39 -0
  154. package/dist/vue-ui-strip-plot-Dig2RljR.js +2 -0
  155. package/dist/vue-ui-table-_qSw3iGd.js +14 -0
  156. package/dist/vue-ui-table-heatmap-BwoRcqFD.js +1 -0
  157. package/dist/vue-ui-table-sparkline-39sKOqcp.js +1 -0
  158. package/dist/vue-ui-thermometer-CoVrrzHW.js +1 -0
  159. package/dist/vue-ui-timer-DoR5PqOa.js +64 -0
  160. package/dist/vue-ui-tiremarks-9tPPNGiq.js +1 -0
  161. package/dist/vue-ui-treemap-D3mZkT4P.js +1 -0
  162. package/dist/vue-ui-waffle-D2GfM_Se.js +1 -0
  163. package/dist/vue-ui-wheel-CYBaqHm6.js +1 -0
  164. package/dist/vue-ui-word-cloud-ClGL6iKL.js +4 -0
  165. package/dist/vue-ui-world-Dm7LSNB2.js +19 -0
  166. package/dist/vue-ui-xy-2VCMSzeE.js +27 -0
  167. package/dist/vue-ui-xy-DUlJcC9R.js +31 -0
  168. package/dist/vue-ui-xy-canvas-CRSisgSA.js +9 -0
  169. package/dist/vue_ui_3d_bar-Dm8zmL8w.js +1 -0
  170. package/dist/vue_ui_age_pyramid-DXJeenVU.js +1 -0
  171. package/dist/vue_ui_bullet-Biewiy1l.js +1 -0
  172. package/dist/vue_ui_bump-DZoGcET0.js +1 -0
  173. package/dist/vue_ui_candlestick-DpPpEElM.js +1 -0
  174. package/dist/vue_ui_chestnut-BKcntsvv.js +1 -0
  175. package/dist/vue_ui_chord-Crjq1pgV.js +1 -0
  176. package/dist/vue_ui_circle_pack-DarCZyF2.js +1 -0
  177. package/dist/vue_ui_dag-B-4OxeQQ.js +1 -0
  178. package/dist/vue_ui_donut-B2W2nyAS.js +1 -0
  179. package/dist/vue_ui_donut_evolution-BvIyBtun.js +1 -0
  180. package/dist/vue_ui_dumbbell-DyyFLbhQ.js +1 -0
  181. package/dist/vue_ui_flow-aeVlnSsc.js +1 -0
  182. package/dist/vue_ui_funnel-CWrEr790.js +1 -0
  183. package/dist/vue_ui_galaxy-DvaSrGxT.js +1 -0
  184. package/dist/vue_ui_gauge-Brc1-auP.js +1 -0
  185. package/dist/vue_ui_geo-COGanKF8.js +1 -0
  186. package/dist/vue_ui_graph-31AYnh4c.js +1 -0
  187. package/dist/vue_ui_heatmap-Q8YMKNq2.js +1 -0
  188. package/dist/vue_ui_hill-Dbv_VVlr.js +1 -0
  189. package/dist/vue_ui_history_plot-C0kFJh-f.js +1 -0
  190. package/dist/vue_ui_horizontal_bar-uuJ0_9O6.js +1 -0
  191. package/dist/vue_ui_label-D3BzxTFQ.js +1 -0
  192. package/dist/vue_ui_molecule-VokyVu8q.js +1 -0
  193. package/dist/vue_ui_mood_radar-i6r1Gp6v.js +1 -0
  194. package/dist/vue_ui_nested_donuts-BAb9o0Ro.js +1 -0
  195. package/dist/vue_ui_onion-BMjwCChN.js +1 -0
  196. package/dist/vue_ui_parallel_coordinate_plot-Wb2Xmpjs.js +1 -0
  197. package/dist/vue_ui_quadrant-DbLNBD92.js +1 -0
  198. package/dist/vue_ui_quick_chart-KljadV9E.js +1 -0
  199. package/dist/vue_ui_radar-Pd3xOzjc.js +1 -0
  200. package/dist/vue_ui_relation_circle-BLo4XQFQ.js +1 -0
  201. package/dist/vue_ui_ridgeline-BIaWjw_v.js +1 -0
  202. package/dist/vue_ui_rings-C0puwNW1.js +1 -0
  203. package/dist/vue_ui_scatter-4as114Wa.js +1 -0
  204. package/dist/vue_ui_spark_trend-BgPQfeCz.js +1 -0
  205. package/dist/vue_ui_sparkbar-CvcZ5nwT.js +1 -0
  206. package/dist/vue_ui_sparkgauge-D3xirz2w.js +1 -0
  207. package/dist/vue_ui_sparkhistogram-E6G1761_.js +1 -0
  208. package/dist/vue_ui_sparkline-DKZdnbap.js +1 -0
  209. package/dist/vue_ui_sparkstackbar-DZX34uPS.js +1 -0
  210. package/dist/vue_ui_stackbar-BrAzeA3Y.js +1 -0
  211. package/dist/vue_ui_stackline-B6ylXHBJ.js +1 -0
  212. package/dist/vue_ui_strip_plot-uxKGttVC.js +1 -0
  213. package/dist/vue_ui_table_heatmap-DVMDsaVJ.js +1 -0
  214. package/dist/vue_ui_table_sparkline-BQO5A9u8.js +1 -0
  215. package/dist/vue_ui_thermometer-BAFdvXZW.js +1 -0
  216. package/dist/vue_ui_tiremarks-LwElhY5p.js +1 -0
  217. package/dist/vue_ui_treemap-JB0DfAmd.js +1 -0
  218. package/dist/vue_ui_waffle-BVf3Wcda.js +1 -0
  219. package/dist/vue_ui_wheel-bdYAONK7.js +1 -0
  220. package/dist/vue_ui_word_cloud-Dn2Ffjxb.js +1 -0
  221. package/dist/vue_ui_xy-BfaXjpvS.js +1 -0
  222. package/dist/vue_ui_xy_canvas-cQVme5sy.js +1 -0
  223. package/package.json +9 -9
  224. package/dist/BaseDraggableDialog-BK7dj9O6.js +0 -1
  225. package/dist/BaseZoomControls-JSk9zW3D.js +0 -1
  226. package/dist/ColorPicker-CwYfNvwH.js +0 -1
  227. package/dist/PenAndPaper-DoNTA-SV.js +0 -1
  228. package/dist/SlicerPreview-ChKbdZSU.js +0 -1
  229. package/dist/XyAnalysisOptions-CV22ga_a.js +0 -1
  230. package/dist/package-CXaebsLV.js +0 -1
  231. package/dist/resolveChartConfig-CIhClE5R.js +0 -1
  232. package/dist/useConfig-C3FbHv4N.js +0 -1
  233. package/dist/vue-data-ui-O-w339Ac.js +0 -1
  234. package/dist/vue-ui-3d-bar-CcFFARyq.js +0 -19
  235. package/dist/vue-ui-age-pyramid-Di6fKV6f.js +0 -1
  236. package/dist/vue-ui-annotator-sBGtsgcb.js +0 -331
  237. package/dist/vue-ui-bullet-BZLa1xj7.js +0 -34
  238. package/dist/vue-ui-bump-BSdpAH0l.js +0 -8
  239. package/dist/vue-ui-candlestick-BKZASgq9.js +0 -22
  240. package/dist/vue-ui-carousel-table-B20E2K8A.js +0 -1
  241. package/dist/vue-ui-chestnut-DavvzmiQ.js +0 -1
  242. package/dist/vue-ui-chord-D2Hn54i7.js +0 -21
  243. package/dist/vue-ui-circle-pack-BKaS-zWo.js +0 -13
  244. package/dist/vue-ui-cursor-BUOHKNmb.js +0 -1
  245. package/dist/vue-ui-dag-SLYPxbGo.js +0 -9
  246. package/dist/vue-ui-dashboard-Bgt7VLv0.js +0 -1
  247. package/dist/vue-ui-donut-8ZWyXEVs.js +0 -22
  248. package/dist/vue-ui-donut-DBcB8Ym1.js +0 -47
  249. package/dist/vue-ui-donut-evolution-D3lo74Ce.js +0 -2
  250. package/dist/vue-ui-dumbbell-CdarkL8Z.js +0 -9
  251. package/dist/vue-ui-flow-B0dYxGWT.js +0 -3
  252. package/dist/vue-ui-funnel-C0Cl9jMd.js +0 -1
  253. package/dist/vue-ui-galaxy-C_UWOQn4.js +0 -1
  254. package/dist/vue-ui-gauge-B94ToHlW.js +0 -1
  255. package/dist/vue-ui-geo-V-JmJgKS.js +0 -1
  256. package/dist/vue-ui-gizmo-BvVDEnNu.js +0 -1
  257. package/dist/vue-ui-heatmap-DWtbocz5.js +0 -1
  258. package/dist/vue-ui-hill-BH_lYm5G.js +0 -1
  259. package/dist/vue-ui-history-plot-DkWvta0h.js +0 -2
  260. package/dist/vue-ui-horizontal-bar-DbJ1DFjG.js +0 -4
  261. package/dist/vue-ui-molecule-BrG8K2Tm.js +0 -1
  262. package/dist/vue-ui-mood-radar-DEpFpfiW.js +0 -1
  263. package/dist/vue-ui-nested-donuts-CZetOzaq.js +0 -19
  264. package/dist/vue-ui-onion-DvyAxUSj.js +0 -5
  265. package/dist/vue-ui-parallel-coordinate-plot-Bdakcv3w.js +0 -9
  266. package/dist/vue-ui-quadrant-CWZeQjHE.js +0 -2
  267. package/dist/vue-ui-quick-chart-BULxPrPs.js +0 -16
  268. package/dist/vue-ui-radar-CJ_5G0QP.js +0 -1
  269. package/dist/vue-ui-rating-QcJoab0i.js +0 -1
  270. package/dist/vue-ui-relation-circle-Vetly6f0.js +0 -1
  271. package/dist/vue-ui-ridgeline-5a87TiQf.js +0 -2
  272. package/dist/vue-ui-rings-CKuFf5vA.js +0 -1
  273. package/dist/vue-ui-scatter-C2hNg3ED.js +0 -9
  274. package/dist/vue-ui-sparkbar-DFShNanl.js +0 -1
  275. package/dist/vue-ui-sparkhistogram-DwDcqqEj.js +0 -1
  276. package/dist/vue-ui-sparkline-kxl5wQGY.js +0 -1
  277. package/dist/vue-ui-sparkstackbar-CHjaAWVJ.js +0 -1
  278. package/dist/vue-ui-stackbar-BrtUg-Mb.js +0 -29
  279. package/dist/vue-ui-stackline-CU2UkEJU.js +0 -39
  280. package/dist/vue-ui-strip-plot-BmEpoIoU.js +0 -2
  281. package/dist/vue-ui-table-Ddg209i0.js +0 -14
  282. package/dist/vue-ui-table-heatmap-B8AdX6Nq.js +0 -1
  283. package/dist/vue-ui-table-sparkline-B62l_ODH.js +0 -1
  284. package/dist/vue-ui-thermometer-CvxyfTWE.js +0 -1
  285. package/dist/vue-ui-timer-BkNtid9A.js +0 -64
  286. package/dist/vue-ui-tiremarks-BE0nbuHp.js +0 -1
  287. package/dist/vue-ui-treemap-B9wAoh5g.js +0 -1
  288. package/dist/vue-ui-waffle-DqeBiuY3.js +0 -1
  289. package/dist/vue-ui-wheel---NZaS40.js +0 -1
  290. package/dist/vue-ui-word-cloud-DRFGFVmf.js +0 -4
  291. package/dist/vue-ui-world-D5gKzypf.js +0 -19
  292. package/dist/vue-ui-xy-Caj8jz6D.js +0 -31
  293. package/dist/vue-ui-xy-CcVIXfL_.js +0 -27
  294. package/dist/vue-ui-xy-canvas-BceSG3AO.js +0 -9
  295. package/dist/vue_ui_3d_bar-DmAve5Ri.js +0 -1
  296. package/dist/vue_ui_age_pyramid-CL0Ef8Ov.js +0 -1
  297. package/dist/vue_ui_bullet-CwVYkpjd.js +0 -1
  298. package/dist/vue_ui_bump-KJL9GYr4.js +0 -1
  299. package/dist/vue_ui_candlestick-DKvha_Ab.js +0 -1
  300. package/dist/vue_ui_chestnut-BxxivKN7.js +0 -1
  301. package/dist/vue_ui_chord-Fq6VBRT1.js +0 -1
  302. package/dist/vue_ui_circle_pack-CfXkXi7v.js +0 -1
  303. package/dist/vue_ui_dag-1b_dLSym.js +0 -1
  304. package/dist/vue_ui_donut-T5PeOqvf.js +0 -1
  305. package/dist/vue_ui_donut_evolution-CVoh3twl.js +0 -1
  306. package/dist/vue_ui_dumbbell-BMcxK0N3.js +0 -1
  307. package/dist/vue_ui_flow-kvV56Es9.js +0 -1
  308. package/dist/vue_ui_funnel-CaEV5hG7.js +0 -1
  309. package/dist/vue_ui_galaxy-B94QInxc.js +0 -1
  310. package/dist/vue_ui_gauge-BJhb6yqE.js +0 -1
  311. package/dist/vue_ui_geo-DL1SMQHp.js +0 -1
  312. package/dist/vue_ui_graph-B1ACwQj7.js +0 -1
  313. package/dist/vue_ui_heatmap-kh5NMmwf.js +0 -1
  314. package/dist/vue_ui_hill-DQi4pQCG.js +0 -1
  315. package/dist/vue_ui_history_plot-soyqUW4Y.js +0 -1
  316. package/dist/vue_ui_horizontal_bar-C4ulIxeT.js +0 -1
  317. package/dist/vue_ui_label-dtPqyFsj.js +0 -1
  318. package/dist/vue_ui_molecule-Bw1UW1Na.js +0 -1
  319. package/dist/vue_ui_mood_radar-CXaBdJnv.js +0 -1
  320. package/dist/vue_ui_nested_donuts-CRtGsJcz.js +0 -1
  321. package/dist/vue_ui_onion-C9BedU_-.js +0 -1
  322. package/dist/vue_ui_parallel_coordinate_plot-Cs_xXAG5.js +0 -1
  323. package/dist/vue_ui_quadrant-BUv-SqzP.js +0 -1
  324. package/dist/vue_ui_quick_chart-BRfcRW6Z.js +0 -1
  325. package/dist/vue_ui_radar-68iK9Fam.js +0 -1
  326. package/dist/vue_ui_relation_circle-Dkv-cSB6.js +0 -1
  327. package/dist/vue_ui_ridgeline-Di26JtQu.js +0 -1
  328. package/dist/vue_ui_rings-BcDDXHpQ.js +0 -1
  329. package/dist/vue_ui_scatter-C50uFYQL.js +0 -1
  330. package/dist/vue_ui_spark_trend-BOM3zo64.js +0 -1
  331. package/dist/vue_ui_sparkbar-Bpx7QrFq.js +0 -1
  332. package/dist/vue_ui_sparkgauge-D2Hk6bvS.js +0 -1
  333. package/dist/vue_ui_sparkhistogram-ChwOkoMb.js +0 -1
  334. package/dist/vue_ui_sparkline-CvL_e9L8.js +0 -1
  335. package/dist/vue_ui_sparkstackbar-Chtog7hC.js +0 -1
  336. package/dist/vue_ui_stackbar-BkBIi_bL.js +0 -1
  337. package/dist/vue_ui_stackline-D7b63K84.js +0 -1
  338. package/dist/vue_ui_strip_plot-CwMowrhT.js +0 -1
  339. package/dist/vue_ui_table_heatmap-vfeY6r97.js +0 -1
  340. package/dist/vue_ui_table_sparkline-Dlfbza49.js +0 -1
  341. package/dist/vue_ui_thermometer-CRijq6H6.js +0 -1
  342. package/dist/vue_ui_tiremarks-8HFfABNF.js +0 -1
  343. package/dist/vue_ui_treemap-Bv4Rdl5_.js +0 -1
  344. package/dist/vue_ui_waffle-BbBLSluB.js +0 -1
  345. package/dist/vue_ui_wheel-C-479bvJ.js +0 -1
  346. package/dist/vue_ui_word_cloud-DBiJtSyL.js +0 -1
  347. package/dist/vue_ui_xy-CJBM9F6W.js +0 -1
  348. package/dist/vue_ui_xy_canvas-CT-FN9rU.js +0 -1
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.js";import{$ as a,Ht as ee,X as te,at as ne,i as o,in as re,r as ie,rn as ae,t as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./img-D4RQwASc.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,r as be,t as xe}from"./userOptionsSlots-CWtXN5Q6.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{c as Ce}from"./canvas-lib-22VpOI4_.js";import{t as we}from"./useResponsive-CENUxfEL.js";import{t as Te}from"./A11yDataTable-DWNlWXzs.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{t as Oe}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as ke}from"./vue_ui_relation_circle-Dkv-cSB6.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as Ae,createTextVNode as je,createVNode as Me,defineAsyncComponent as Ne,guardReactiveProps as p,mergeProps as m,normalizeClass as Pe,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as Fe,onMounted as Ie,openBlock as _,ref as v,renderList as y,renderSlot as b,shallowRef as Le,toDisplayString as x,toRefs as Re,unref as S,useCssVars as ze,watch as Be,withCtx as Ve}from"vue";var He=/* @__PURE__ */ e({default:()=>lt}),Ue=[`id`],We=[`id`],Ge={style:{position:`relative`}},Ke=[`xmlns`,`viewBox`,`aria-describedby`],qe=[`width`,`height`],Je=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Ye={key:1},Xe=[`stroke`,`d`,`stroke-width`],Ze={style:{"pointer-events":`none`}},Qe=[`cx`,`cy`,`fill`,`r`,`stroke`],$e=[`x`,`y`,`fill`,`font-size`],et={key:2},tt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],nt={style:{"pointer-events":`none`}},rt=[`cx`,`cy`,`fill`,`r`,`stroke`],it=[`x`,`y`,`fill`,`font-size`],at=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],ot=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],st={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},ct={key:5,class:`vue-data-ui-watermark`},lt=/*#__PURE__*/ me({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:me,emit:He}){ze(e=>({v2acfb721:Ft.value,v3413d080:Pt.value,v6e76f73c:It.value}));let lt=Ne(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ut=Ne(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),dt=Ne(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),{vue_ui_relation_circle:ft}=i(),C=e,pt=He,mt=c(()=>!!C.dataset&&Object.keys(C.dataset).length),w=v(te()),ht=v(0),T=v(null),gt=v(null),_t=v(null),vt=v(null),yt=v(0),E=v(null),D=v(!1),O=v(Dt()),k=c(()=>O.value.userOptions),A=c(()=>O.value.style.weightLabels),j=c(()=>O.value.style);fe({config:()=>O.value,dataset:()=>C.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let M=c(()=>O.value.userOptions.useCursorPointer),bt=c(()=>re({defaultConfig:{userOptions:{show:!1},customPalette:Array(7).fill(`#CACACA`),style:{backgroundColor:`#99999930`,labels:{color:`#6A6A6A`},circle:{stroke:`#6A6A6A`},plot:{color:`#6A6A6A`,useSerieColor:!0},links:{maxWidth:2}}},userConfig:O.value.skeletonConfig??{}})),{loading:xt,FINAL_DATASET:St,manualLoading:Ct}=ue({...Re(C),FINAL_CONFIG:O,prepareConfig:Dt,skeletonDataset:C.config?.skeletonDataset??[{id:`A`,label:`_`,relations:[`B`,`C`,`D`,`E`,`F`,`G`]},{id:`B`,label:`_`,relations:[`A`]},{id:`C`,label:`_`,relations:[`A`]},{id:`D`,label:`_`,relations:[`A`]},{id:`E`,label:`_`,relations:[`A`]},{id:`F`,label:`_`,relations:[`A`]},{id:`G`,label:`_`,relations:[`A`]}],skeletonConfig:re({defaultConfig:O.value,userConfig:bt.value})}),{userOptionsVisible:wt,setUserOptionsVisibility:Tt,keepUserOptionState:Et}=Ee({config:O.value}),{svgRef:N}=De({config:j.value.title});function Dt(){return he(C.config,ft,ke)}Be(()=>C.config,e=>{O.value=Dt(),wt.value=!O.value.userOptions.showOnChartHover,V.value=j.value.size,H.value=A.value.size,U.value=j.value.plot.radius,W.value=j.value.labels.fontSize,G.value.height=j.value.size,G.value.width=j.value.size,Rt(),yt.value+=1},{deep:!0}),Be(()=>C.dataset,e=>{Array.isArray(e)&&e.length>0&&(Ct.value=!1)},{deep:!0});let{isPrinting:P,isImaging:F,generatePdf:Ot,generateImage:kt}=Se({elementId:`relation_circle_${w.value}`,fileName:j.value.title.text||`vue-ui-relation-circle`,options:O.value.userOptions.print}),At=c(()=>O.value.userOptions.show&&!j.value.title.text),jt=c(()=>se(O.value.customPalette)),I=v([]),L=v([]),R=v({}),z=v([]),Mt=v(0),B=c(()=>St.value.slice(0,j.value.limit).map(e=>{let t=Array.isArray(e.relations)?e.relations:[];return{...e,weights:Array.isArray(e.weights)?e.weights:Array(t.length).fill(1),relations:t}}));Be(B,()=>{I.value=[],L.value=[],Vt(),Ut()});let V=v(j.value.size),H=v(A.value.size),U=v(j.value.plot.radius),W=v(j.value.labels.fontSize),G=v({height:j.value.size,width:j.value.size}),K=c({get(){return V.value*j.value.circle.radiusProportion},set(e){return e}}),Nt=c(()=>j.value.links.curved),Pt=c(()=>`${j.value.animation.speedMs}ms`),Ft=c(()=>K.value*2),It=c(()=>K.value*4),q=Le(null),J=Le(null);Ie(()=>{Rt(),document.getElementById(`relation_circle_${w.value}`).addEventListener(`click`,Bt)});let Lt=c(()=>O.value.debug);function Rt(){if(le(C.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:Lt.value}),Ct.value=!0):Lt.value&&C.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),le(C.dataset)||(Ct.value=O.value.loading),O.value.responsive){let e=Ce(()=>{let{width:e,height:t}=we({chart:T.value,title:j.value.title.text?gt.value:null,source:_t.value,noTitle:vt.value});requestAnimationFrame(()=>{V.value=Math.min(e,t),G.value.width=Math.max(.1,e),G.value.height=Math.max(.1,t-12),K.value=V.value*j.value.circle.radiusProportion,I.value=[],L.value=[],Vt(),Ut(),zt(),O.value.responsiveProportionalSizing?(H.value=ae({relator:V.value,adjuster:j.value.size,source:A.value.size,threshold:6,fallback:6}),U.value=ae({relator:V.value,adjuster:j.value.size,source:j.value.plot.radius,threshold:1,fallback:1}),W.value=ae({relator:V.value,adjuster:j.value.size,source:j.value.labels.fontSize,threshold:6,fallback:6})):(H.value=A.value.size,U.value=j.value.plot.radius,W.value=j.value.labels.fontSize)})});q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect()),q.value=new ResizeObserver(e),J.value=T.value.parentNode,q.value.observe(J.value)}else I.value=[],L.value=[],Vt(),Ut();zt()}Fe(()=>{document.getElementById(`relation_circle_${w.value}`)?.removeEventListener(`click`,Bt),q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect())});let{autoSizeLabels:zt}=Oe({svgRef:N,fontSize:j.value.labels.fontSize,minFontSize:j.value.labels.minFontSize,sizeRef:W,labelClass:`.vue-ui-relation-circle-legend`});function Bt(e){let t=e.target;t&&Array.from(t.classList).includes(`vue-ui-user-options`)||t&&Array.from(t.classList).includes(`vue-ui-user-options-summary`)||t&&Array.from(t.classList).includes(`vue-data-ui-button`)||t&&Array.from(t.classList).includes(`vue-ui-relation-circle-legend`)||(R.value={},z.value=[])}function Vt(){let e=6.28319/B.value.length,t=360/B.value.length,n=0,r=0;B.value.forEach((i,a)=>{let te=i.weights.reduce((e,t)=>e+t,0),ne=K.value*Math.cos(n)+G.value.width/2,o=K.value*Math.sin(n)+G.value.height/2+j.value.circle.offsetY;I.value.push({x:ne,y:o,...i,color:i.color?i.color:jt.value[a]?jt.value[a]:ee[a],regAngle:r,totalWeight:te}),n+=e,r+=t})}function Ht(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ut(){L.value=[],I.value.forEach(e=>{I.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);L.value.push({weight:t.weights[r]?t.weights[r]:0,relationId:`${e.id}_${t.id}`,x1:e.x,y1:e.y,x2:t.x,y2:t.y,colorSource:e.color,colorTarget:t.color,midPointLine:Ht({x:e.x,y:e.y},{x:t.x,y:t.y}),midPointBezier:Wt({x1:e.x,x2:t.x,y1:e.y,y2:t.y}),...e})})})}function Wt(e){let t={x:e.x1,y:e.y1},n={x:e.x2,y:e.y2},r={x:e.x1,y:e.y1},i={x:G.value.width/2,y:G.value.height/2+j.value.circle.offsetY},a=.5;return{x:.5**3*t.x+3*.5**2*a*r.x+1.5*a**2*i.x+a**3*n.x,y:.5**3*t.y+3*.5**2*a*r.y+1.5*a**2*i.y+a**3*n.y}}let Gt=c(()=>Math.max(...L.value.map(e=>e.weight)));function Kt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function Y(e){return e.colorSource}function qt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`?`opacity:1;stroke-width:${nn(e)}`:`opacity: 0`:`opacity: 1`}function X(e){return Object.hasOwn(R.value,`x`)?!!(z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`):!1}function Jt(e){return e.regAngle>90&&e.regAngle<270?`end`:`start`}function Yt(e){return e.regAngle>90&&e.regAngle<270?e.x-5:e.x+5}function Xt(e){return Object.hasOwn(R.value,`x`)?R.value.id===e.id||z.value.includes(e.id)?`opacity:1`:`opacity:0.2`:`opacity:1`}function Zt(e){return e.regAngle>90&&e.regAngle<270?`rotate(${e.regAngle+180},${e.x},${e.y})`:`rotate(${e.regAngle},${e.x},${e.y})`}let Z=v(null);function Qt(e,t){Z.value=t,E.value=t,O.value.events.datapointEnter&&O.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function $t(e,t){Z.value=null,D.value||(E.value=null),O.value.events.datapointLeave&&O.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function en(e,t){e&&(O.value.events.datapointClick&&O.value.events.datapointClick({datapoint:e,seriesIndex:t}),Mt.value=360-e.regAngle,R.value.id&&e.id===R.value.id?(R.value={},z.value=[]):(R.value=e,z.value=[...e.relations]))}function tn(e,t){E.value=t,en(e,t)}function nn(e){let t=e.weight/Gt.value*j.value.links.maxWidth;return Math.max(.3,t)}let Q=v(!1);function rn(e){Q.value=e,ht.value+=1}let $=v(!1);function an(){$.value=!$.value}async function on({scale:e=2}={}){if(!T.value)return;let{width:t,height:n}=T.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ge({domElement:T.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:j.value.title.text,width:t,height:n,aspectRatio:r}}let sn=c(()=>j.value.backgroundColor),cn=c(()=>j.value.title),{isCallbackImaging:ln,isCallbackSvg:un,generateSvg:dn,onGenerateImage:fn}=ve({svg:N,title:cn,legend:null,legendItems:null,backgroundColor:sn,getSvgCallback:()=>O.value.userOptions.callbacks.svg,generateImage:kt});async function pn(){pt(`copyAlt`,{config:O.value,dataset:B.value}),O.value.userOptions.callbacks.altCopy?await Promise.resolve(O.value.userOptions.callbacks.altCopy({config:O.value,dataset:B.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function mn(){D.value=!0,I.value.length&&E.value===null&&(E.value=0)}function hn(){D.value=!1,E.value=null}function gn(e){if(!N.value||$.value||document.activeElement!==N.value||!I.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){E.value=null,R.value={},z.value=[];return}if(r){if(E.value===null)return;let e=I.value[E.value];if(!e)return;en(e,E.value);return}let a=E.value;a===null||a<0||a>=I.value.length?a=n?0:I.value.length-1:n?(a+=1,a>=I.value.length&&(a=0)):t&&(--a,a<0&&(a=I.value.length-1)),E.value=a,Z.value=a;let ee=I.value[a];ee&&O.value.events.datapointEnter&&O.value.events.datapointEnter({datapoint:ee,seriesIndex:a})}let _n=c(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:B.value.map(e=>{let t=e.relations.map(e=>B.value.find(t=>t.id===e)?.label||e).join(`, `),n=(e.weights||[]).reduce((e,t)=>e+Number(t||0),0);return[e.id,e.label,n,e.relations.length,t]})}));return me({getImage:on,generatePdf:Ot,generateSvg:dn,generateImage:kt,toggleAnnotator:an,toggleFullscreen:rn,copyAlt:pn}),(e,i)=>(_(),d(`div`,{ref_key:`relationCircleChart`,ref:T,class:`vue-data-ui-component vue-ui-relation-circle`,style:g(`width:100%;background:${j.value.backgroundColor};text-align:center;${O.value.responsive?`height: 100%`:``}`),id:`relation_circle_${w.value}`,onMouseenter:i[0]||=()=>S(Tt)(!0),onMouseleave:i[1]||=()=>S(Tt)(!1)},[f(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[f(`p`,null,x(O.value.a11y.translations.keyboardNavigation),1)],8,We),_n.value?.rows?.length?(_(),l(Te,{key:0,uid:w.value,head:_n.value.headers,body:_n.value.rows,notice:O.value.a11y.translations.tableAvailable,caption:O.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):u(``,!0),k.value.buttons.annotator?(_(),l(S(lt),m({key:1},S(n)(k.value.annotator),{svgRef:S(N),backgroundColor:j.value.backgroundColor,color:j.value.color,active:$.value,isCursorPointer:M.value,palette:k.value.annotatorPalette,onClose:an}),Ae({_:2},[y(S(r),n=>({name:n,fn:Ve(r=>[b(e.$slots,n,h(p(S(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),At.value?(_(),d(`div`,{key:2,ref_key:`noTitle`,ref:vt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),j.value.title.text?(_(),d(`div`,{key:3,ref_key:`chartTitle`,ref:gt,style:`width:100%;background:transparent`},[(_(),l(_e,{key:`title_${yt.value}`,config:{title:{cy:`relation-div-title`,...j.value.title},subtitle:{cy:`relation-div-subtitle`,...j.value.title.subtitle}}},null,8,[`config`]))],512)):u(``,!0),k.value.show&&mt.value&&(S(Et)||S(wt))?(_(),l(S(ut),m({ref:`details`,key:`user_options_${ht.value}`,backgroundColor:j.value.backgroundColor,color:j.value.color,isPrinting:S(P),isImaging:S(F),uid:w.value,hasXls:!1,isFullscreen:Q.value,chartElement:T.value},S(be)(k.value,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:$.value,isCursorPointer:M.value,onToggleFullscreen:rn,onGeneratePdf:S(Ot),onGenerateImage:S(fn),onGenerateSvg:S(dn),onToggleAnnotator:an,onCopyAlt:pn,style:{visibility:S(Et)?S(wt)?`visible`:`hidden`:`visible`}}),Ae({_:2},[y(S(ye)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ve(n=>[b(e.$slots,t,h(p(S(xe)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):u(``,!0),f(`div`,Ge,[(_(),d(`svg`,{ref_key:`svgRef`,ref:N,xmlns:S(oe),class:Pe([{"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value},`relation-circle`]),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${w.value}`,tabindex:`0`,onFocus:mn,onBlur:hn,onKeydown:gn},[Me(S(dt)),b(e.$slots,`svg-underlayer`,{svg:{...G.value,isPrintingImg:S(P)||S(F)||S(ln),isPrintingSvg:S(un)}},void 0,!0),e.$slots[`chart-background`]?(_(),d(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?10:G.value.width,height:G.value.height<=0?10:G.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,qe)):u(``,!0),f(`circle`,{cx:(G.value.width<=0?1e-4:G.value.width)/2,cy:(G.value.height<=0?1e-4:G.value.height)/2+j.value.circle.offsetY,r:K.value<=0?1e-4:K.value,stroke:j.value.circle.stroke,"stroke-width":j.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,Je),Nt.value?(_(),d(`g`,Ye,[(_(!0),d(s,null,y(L.value,(e,t)=>(_(),d(`path`,{key:`relation_${t}`,style:g(qt(e)),stroke:Y(e),class:Pe([`relation`,{"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${G.value.width/2},${G.value.height/2+j.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":nn(e),"stroke-linecap":`round`},null,14,Xe))),128)),(_(!0),d(s,null,y(L.value,(t,n)=>(_(),d(`g`,Ze,[X(t)?b(e.$slots,`dataLabel`,m({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel?(_(),d(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:Y(t),r:H.value,stroke:j.value.backgroundColor,"stroke-width":`1`},null,8,Qe)):u(``,!0),X(t)&&!e.$slots.dataLabel?(_(),d(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+H.value/3,fill:S(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},x(S(o)(A.value.formatter,t.weight,S(a)({p:A.value.prefix,v:t.weight,s:A.value.suffix,r:A.value.rounding}),{...t})),9,$e)):u(``,!0)]))),256))])):(_(),d(`g`,et,[(_(!0),d(s,null,y(L.value,(e,t)=>(_(),d(`line`,{key:`relation_${t}`,stroke:Y(e),"stroke-width":nn(e),style:g(qt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Pe({"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}),"stroke-linecap":`round`},null,14,tt))),128)),(_(!0),d(s,null,y(L.value,(t,n)=>(_(),d(`g`,nt,[X(t)?b(e.$slots,`dataLabel`,m({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel&&A.value.show?(_(),d(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:Y(t),r:H.value,stroke:j.value.backgroundColor,"stroke-width":`1`},null,8,rt)):u(``,!0),X(t)&&!e.$slots.dataLabel&&A.value.show?(_(),d(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+H.value/3,fill:S(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},x(S(o)(A.value.formatter,t.weight,S(a)({p:A.value.prefix,v:t.weight,s:A.value.suffix,r:A.value.rounding}),{...t})),9,it)):u(``,!0)]))),256))])),(_(!0),d(s,null,y(I.value,(e,t)=>(_(),d(`text`,{key:`plot_text_${t}`,"text-anchor":Jt(e),transform:Zt(e),x:Yt(e),y:e.y+5,class:`vue-ui-relation-circle-legend`,"transform-origin":`start`,"font-weight":R.value.id===e.id?`900`:`400`,style:g(`font-family:${j.value.fontFamily};${Xt(e)};cursor:${M.value?`pointer`:`default`}`),"font-size":W.value,fill:j.value.labels.color,"text-decoration":t===Z.value||t===E.value?`underline`:void 0,onClick:n=>tn(e,t),onMouseenter:n=>Qt(e,t),onMouseleave:n=>$t(e,t)},[S(xt)?(_(),d(s,{key:0},[je(`--------`)],64)):(_(),d(s,{key:1},[je(x(e.label)+` (`+x(S(o)(A.value.formatter,e.totalWeight,S(a)({p:A.value.prefix,v:e.totalWeight,s:A.value.suffix,r:A.value.rounding}),{...e}))+`) `,1)],64))],44,at))),128)),(_(!0),d(s,null,y(I.value,(e,t)=>(_(),d(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:g(`${Kt(e)}; transition: r 0.2s ease-in-out; cursor:${M.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:j.value.plot.useSerieColor?e.color:j.value.plot.color,stroke:j.value.backgroundColor,"stroke-width":`1`,r:U.value*(t===Z.value||t===E.value?2:1),onClick:n=>tn(e,t),onMouseenter:n=>Qt(e,t),onMouseleave:n=>$t(e,t)},null,44,ot))),128)),b(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:S(P)||S(F)||S(ln),isPrintingSvg:S(un)}},void 0,!0)],42,Ke)),e.$slots.hint?(_(),d(`div`,st,[b(e.$slots,`hint`,h(p({hint:O.value.a11y.translations.keyboardNavigation,isVisible:D.value})),void 0,!0)])):u(``,!0)]),e.$slots.watermark?(_(),d(`div`,ct,[b(e.$slots,`watermark`,h(p({isPrinting:S(P)||S(F)||S(ln)||S(un)})),void 0,!0)])):u(``,!0),e.$slots.source?(_(),d(`div`,{key:6,ref_key:`source`,ref:_t,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),b(e.$slots,`skeleton`,{},()=>[S(xt)?(_(),l(de,{key:0})):u(``,!0)],!0)],44,Ue))}},[[`__scopeId`,`data-v-8a652bb1`]]);export{He as n,lt as t};
@@ -1,2 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.js";import{$ as a,D as o,Ht as s,J as c,N as ee,P as te,S as ne,U as re,X as ie,Xt as ae,at as oe,i as l,in as se,nt as ce,r as le,t as ue,tt as de,w as fe,xt as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as xe}from"./resolveChartConfig-CIhClE5R.js";import{t as Se}from"./chartImage-DPGnEuYM.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,r as Oe,t as ke}from"./userOptionsSlots-CWtXN5Q6.js";import{t as Ae}from"./useTimeLabels-Das5O74F.js";import{t as je}from"./usePrinter-DVf3YcG5.js";import{t as Me}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Ne}from"./Shape-CRe8woTu.js";import{c as Pe}from"./canvas-lib-22VpOI4_.js";import{t as Fe}from"./useResponsive-CENUxfEL.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Re}from"./A11yDataTable-DWNlWXzs.js";import{t as ze}from"./useUserOptionState-CXlFnwPv.js";import{t as Be}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ve}from"./Legend-DM0ClX3D.js";import{t as He}from"./vue_ui_ridgeline-Di26JtQu.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ue,createTextVNode as We,createVNode as Ge,defineAsyncComponent as g,guardReactiveProps as Ke,mergeProps as qe,nextTick as Je,normalizeClass as Ye,normalizeProps as Xe,normalizeStyle as _,onBeforeUnmount as Ze,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as Qe,shallowRef as $e,toDisplayString as S,toRefs as et,unref as C,watch as tt,watchEffect as nt,withCtx as w}from"vue";var rt=/* @__PURE__ */ e({default:()=>Et}),it=[`id`],at=[`id`],ot={style:{position:`relative`}},st=[`xmlns`,`aria-describedby`,`viewBox`],ct={key:0},lt=[`fill`,`d`],ut=[`stroke`,`stroke-width`,`d`],dt=[`fill`,`d`],ft=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],pt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],mt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],ht=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],gt={key:0},_t=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],vt=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],yt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],xt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],St=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],Ct={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},wt={key:5,class:`vue-data-ui-watermark`},Tt=[`onClick`],Et=/*#__PURE__*/ be({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:be,emit:rt}){let Et=g(()=>import(`./vue-ui-xy-CcVIXfL_.js`).then(e=>e.n)),Dt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ot=g(()=>import(`./vue-ui-accordion-E8TJfFeK.js`).then(e=>e.n)),kt=g(()=>import(`./DataTable-Dof6yhO7.js`)),At=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),jt=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Mt=g(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),Nt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_ridgeline:Pt}=i(),T=e,Ft=d({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),It=rt,E=y(null),Lt=y(null),Rt=y(null),D=$e(null),O=$e(null),zt=y(null),Bt=y(null),Vt=y(0),Ht=y(0),Ut=y(0),k=y(ie()),Wt=y(0),Gt=y(0),Kt=y(512),A=y(null),qt=y(null),Jt=y(null),Yt=y(0),Xt=y(null),Zt=y(null),Qt=y(null),j=y(null),$t=y(!1);function en(){return xe(T.config,Pt,He)}let M=y(en()),N=d(()=>M.value.userOptions),P=d(()=>M.value.style.chart.areas),F=d(()=>M.value.style.chart.selector),I=d(()=>M.value.style.chart.xAxis.labels),L=d(()=>M.value.style.chart.yAxis.labels),R=d(()=>M.value.style.chart);ve({config:()=>M.value,dataset:()=>T.dataset,component:`VueUiRidgeline`,rules:[ye.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.some(e=>e.datapoints.some(e=>e.values.length>200)),message:[`👀 Some series contain > 200 data points, which can affect performance. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values.`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.length<6&&e.length>0,message:[`👀 The number of series < 6. Consider:`,``,`▶️ Using VueUiXy instead`]}]});let z=d(()=>M.value.userOptions.useCursorPointer),tn=d(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,areas:{maxPoint:{show:!1},opacity:.9,stroke:{useSerieColor:!0}},legend:{backgroundColor:`transparent`},padding:{right:-24,left:0},xAxis:{labels:{values:[]}},yAxis:{labels:{fontSize:0}},zeroLine:{show:!1}}}},userConfig:M.value.skeletonConfig??{}})),{loading:nn,FINAL_DATASET:B,manualLoading:rn}=ge({...et(T),FINAL_CONFIG:M,prepareConfig:en,skeletonDataset:T.config?.skeletonDataset??[{name:`_`,datapoints:[{name:`__`,color:`#999999`,values:[28.639,32.04,41.134,44.525,21.151,2.436,.218,.024,.002,0,0,0]},{name:`_`,color:`#CACACA`,values:[13.253,15.621,23.36,33.698,29.935,10.874,2.364,.561,.107,.02,.006,.004]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[10.851,13.195,21.617,36.556,42.292,21.006,3.398,.223,.013,.001,0,0]},{name:`_`,color:`#CACACA`,values:[3.171,4.115,8.108,18.248,31.641,29.063,12.031,2.742,.504,.102,.032,.021]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[1.731,2.334,5.125,13.626,29.911,38.524,24.168,7.646,1.575,.317,.097,.063]},{name:`_`,color:`#CACACA`,values:[.25,.367,1.026,3.944,13.635,28.891,30.149,15.419,4.714,1.246,.442,.299]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[.034,.054,.194,1.065,5.747,20.735,38.306,32.899,15.318,5.566,2.422,1.76]},{name:`_`,color:`#CACACA`,values:[.001,.002,.009,.095,1.124,8.342,27.115,35.08,21.449,9.093,4.243,3.143]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,.001,.004,.051,.567,3.322,14.215,44.783,40.351,20.377,9.866,7.378]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,.001,.11,4.136,27.498,43.24,29.807,17.345,13.678]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,0,0,0,.025,.598,3.886,10.645,54.479,45.953,30.814,24.55]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,0,0,.007,1.655,26.63,52.017,45.192,39.651]}]}],skeletonConfig:se({defaultConfig:M.value,userConfig:tn.value})}),V=y(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:an,setUserOptionsVisibility:on,keepUserOptionState:sn}=ze({config:M.value}),{svgRef:H}=Be({config:R.value.title}),cn=d(()=>M.value.debug);function ln(){let e=B.value||[];if(!Array.isArray(e)||e.length===0)oe({componentName:`VueUiRidgeline`,type:`dataset`,debug:cn.value}),rn.value=!0;else if(e.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{Ft.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:cn.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Ft.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:cn.value})})})}),Gt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),he(T.dataset)||(rn.value=M.value.loading),M.value.responsive){let t=Pe(()=>{let{width:t,height:n}=Fe({chart:E.value,title:R.value.title.text?Lt.value:null,legend:R.value.legend.show?Rt.value:null,source:zt.value,noTitle:Bt.value,padding:R.value.padding});requestAnimationFrame(()=>{Kt.value=t,V.value=e.length?n/e.length:0,Yt.value=n-12})});D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect()),D.value=new ResizeObserver(t),O.value=E.value?.parentNode||null,O.value&&D.value.observe(O.value)}}Ze(()=>{D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect())});let{isPrinting:un,isImaging:dn,generatePdf:fn,generateImage:pn}=je({elementId:`vue-ui-ridgeline_${k.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),mn=d(()=>M.value.userOptions.show&&!R.value.title.text),hn=d(()=>fe(M.value.customPalette)),U=y({showTable:M.value.table.show});tt(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(an.value=!M.value.userOptions.showOnChartHover,await Je(),ln(),Vt.value+=1,Ut.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),tt(()=>T.dataset,e=>{Array.isArray(e)&&e.length>0&&(rn.value=!1)},{deep:!0}),tt(()=>nn.value,async e=>{e||(await Je(),ln())},{immediate:!0}),tt(()=>T.config,()=>{M.value=en(B.value||null),an.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Vt.value+=1,Ut.value+=1},{deep:!0});let gn=d(()=>P.value.height/P.value.rowHeight);function _n(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),It(`selectLegend`,Y.value)}function vn(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),It(`selectLegend`,Y.value)}function yn(e){return Z.value.length?Z.value.find(t=>t.name===e)||(cn.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(cn.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function bn(e){let t=yn(e);t!==null&&X.value.includes(t.id)&&vn(t.id)}function xn(e){let t=yn(e);t!==null&&(X.value.includes(t.id)||vn(t.id))}let W=d(()=>Ft.value?(B.value||[]).map(e=>({...e,labelLen:Fn(e.name,L.value.fontSize),uid:ie(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?ne(e.color):hn.value[t]||s[t]||s[t%s.length],r=ae(e.name);return{...e,color:n,id:r}})})):[]),Sn=d(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*gn.value+R.value.padding.bottom),G=d(()=>{let e=R.value.padding;return{width:Kt.value,height:Sn.value,padding:e}}),Cn=d(()=>G.value.width),wn=d(()=>G.value.height),Tn=y(0),En=Pe(e=>{Tn.value=e},100);nt(e=>{let t=Xt.value;if(!t)return;let n=new ResizeObserver(e=>{En(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Ze(()=>{Tn.value=0});let K=d(()=>({fullHeight:G.value.height+Tn.value,top:G.value.padding.top,left:G.value.padding.left,right:G.value.width-G.value.padding.right,bottom:G.value.height-R.value.padding.bottom,width:G.value.width-(G.value.padding.left+G.value.padding.right)})),Dn=d(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=y([]),On=0;nt(()=>{let e=++On;(async()=>{let t=await Ae({values:I.value.values,maxDatapoints:Dn.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===On&&(q.value=t)})()});let J=d(()=>{let e=Math.max(...W.value.map(e=>e.labelLen)),t=G.value.padding.left+e+16+L.value.offsetX,n=(K.value.width-t)/Dn.value,r=[];for(let e=0;e<Dn.value;e+=1)r.push({selectorX:t+n*e,x:t+n*e-n/2,y:K.value.top,label:I.value.values[e]?q.value[e]?.text??``:``,index:e,width:n,height:Sn.value});return r});function kn(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function An(e){A.value=e;let t=kn(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function jn(e){A.value=null;let t=kn(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function Mn(e){let t=kn(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),It(`selectX`,t)}function Nn(e,t){return e.length*t/2+t}function Pn(e,t,n){return e+Nn(t,n)>K.value.right}function Fn(e,t,n=`sans-serif`){let r=document.createElement(`canvas`).getContext(`2d`);return r.font=`${typeof t==`number`?`${t}px`:t} ${n}`,r.measureText(e).width}let Y=d(()=>{V.value;let e=Math.max(...W.value.map(e=>e.labelLen)),t=Math.max(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),n=Math.min(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),r=G.value.padding.left+e+16+L.value.offsetX,i=(K.value.width-r)/Dn.value,a=Math.abs(Math.min(n,0)),o=t+a;function s(e){return isNaN(e/o)?0:e/o}return W.value.map((e,t)=>{let n=V.value*gn.value*(1-s(a)),o=K.value.top+V.value*t,c=K.value.top+o+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?c-n/2:c)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let ee=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+i*n,y:K.value.top+o+V.value*gn.value*(1-s(ee+a)),value:t,isMaxPoint:t===Math.max(...e.values),zero:c}}),n=`${ee(t,c,!1,!1)}`,ne=`M ${r},${c} ${re(t)} ${t.at(-1).x},${c}`,ae=`M ${r},${c} ${t.at(-1).x},${c}`,oe=`M ${te(t)}`,l=`M ${re(t)}`,se=pe(P.value.smooth?oe:l);return{...e,uid:ie(),plots:t,smoothPath:n,straightPath:ne,zeroPath:ae,pathLength:se,smoothPathRidge:oe,straightPathRidge:l}}).filter(e=>!X.value.includes(e.id))}})}),X=y([]);function In(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=ae(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>vn(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=d(()=>In(W.value)),Ln=d(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),Q=y(!1);function Rn(e){Q.value=e,Wt.value+=1}let zn=y({}),Bn=y([]);function Vn(e){It(`selectDatapoint`,e),R.value.dialog.show&&(Bn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),qt.value=e,zn.value=de({...R.value.dialog.xyChart,responsive:!0,chart:{...R.value.dialog.xyChart.chart,grid:{...R.value.dialog.xyChart.chart.grid,labels:{...R.value.dialog.xyChart.chart.grid.labels,xAxisLabels:{...R.value.dialog.xyChart.chart.grid.labels.xAxisLabels,values:I.value.values,autoRotate:{enable:!0,angle:R.value.dialog.xyChart.chart.grid.labels.xAxisLabels.autoRotate.angle},datetimeFormatter:I.value.datetimeFormatter}}},tooltip:{...R.value.dialog.xyChart.chart.tooltip,showTimeLabel:I.value.values.length>0},userOptions:{...R.value.dialog.xyChart.chart.userOptions,buttons:{...R.value.dialog.xyChart.chart.userOptions.buttons,altCopy:M.value.userOptions.buttons.altCopy},callbacks:{...R.value.dialog.xyChart.chart.userOptions.callbacks,altCopy:()=>{}},useCursorPointer:M.value.userOptions.useCursorPointer}}}),Jt.value&&Jt.value.open())}let Hn=y(null);function Un(e){Hn.value=e}function Wn(){Hn.value=null}let Gn=y(!1);function Kn(){Gn.value=!Gn.value}function qn(){U.value.showTable=!U.value.showTable}let Jn=d(()=>({body:Y.value.flatMap(e=>e.datapoints.flatMap(t=>({...t,rowName:`${e.name}: ${t.name}`}))).map(e=>[{name:e.rowName,color:e.color},...e.values])})),$=d(()=>{let e=[M.value.table.columnNames.series,...q.value.map(e=>e.text)],t={th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint};return{colNames:[M.value.table.columnNames.series,...q.value.map(e=>e.text)],head:e,body:Jn.value.body,config:t}});function Yn(e=null){Je(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...Jn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),r=o(n);e?e(r):ce({csvContent:r,title:R.value.title.text||`vue-ui-ridgeline`})})}function Xn(){return Y.value}let Zn=Se(E,()=>R.value.title.text),Qn=d(()=>({min:0,max:Dn.value}));Me({timeLabelsEls:Xt,timeLabels:q,slicer:Qn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Cn,height:wn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let $n=d(()=>Ee({config:M,style:R,mutableConfig:U,dialog:Nt,accordion:Ot,isFullscreen:Q,parent:E,maxWidth:800,isCursorPointer:z}));tt(()=>U.value.showTable,e=>Te(e,M,Zt));function er(){U.value.showTable=!1,Qt.value&&Qt.value.setTableIconState(!1)}let tr=d(()=>R.value.backgroundColor),nr=d(()=>({...R.value.legend,position:`bottom`})),rr=d(()=>R.value.title),{isCallbackImaging:ir,isCallbackSvg:ar,generateSvg:or,onGenerateImage:sr}=we({svg:H,title:rr,legend:nr,legendItems:Z,backgroundColor:tr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:pn});function cr(e){lr(`xy-zoom`,e.dataset,e.config)}async function lr(e=`main-chart`,t=null,n=null){It(`copyAlt`,{source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ur(){j.value=null,$t.value=!0}function dr(){hr(),$t.value=!1}function fr(e){if(!H.value||Gn.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){hr();return}if(a){if(j.value!==null){let e=Y.value[j.value];e&&Vn(e);return}A.value&&Mn(A.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:pr(e+(n?1:-1)),j.value=e,Hn.value=e;return}if(!J.value.length)return;let s=A.value?.index??null;s=s===null?i?0:J.value.length-1:mr(s+(i?1:-1));let c=J.value[s];c&&An(c)}function pr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function mr(e){let t=J.value.length;return t?(e%t+t)%t:null}function hr(){j.value=null,Hn.value=null,A.value?jn(A.value):A.value=null}let gr=d(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,...e.slice(1)]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return be({getData:Xn,getImage:Zn,generateImage:pn,generateSvg:or,generatePdf:fn,generateCsv:Yn,hideSeries:xn,showSeries:bn,toggleAnnotator:Kn,toggleTable:qn,toggleFullscreen:Rn,copyAlt:lr}),(e,i)=>(v(),m(`div`,{ref_key:`ridgelineChart`,ref:E,class:Ye(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${k.value}`,style:_({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:i[3]||=()=>C(on)(!0),onMouseleave:i[4]||=()=>C(on)(!1)},[h(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[h(`p`,null,S(M.value.a11y.translations.keyboardNavigation),1)],8,at),gr.value.body.length?(v(),f(Re,{key:0,uid:k.value,head:gr.value.head,body:gr.value.body,caption:gr.value.caption,notice:gr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),N.value.buttons.annotator&&C(H)?(v(),f(C(At),qe({key:1},C(n)(N.value.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Gn.value,svgRef:C(H),isCursorPointer:z.value,onClose:Kn}),Ue({_:2},[b(C(r),n=>({name:n,fn:w(r=>[x(e.$slots,n,Xe(Ke(C(t)(n,r))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):p(``,!0),x(e.$slots,`userConfig`,{},void 0,!0),mn.value?(v(),m(`div`,{key:2,ref_key:`noTitle`,ref:Bt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),R.value.title.text?(v(),m(`div`,{key:3,ref_key:`chartTitle`,ref:Lt,style:`width:100%;background:transparent;padding-bottom:24px`},[(v(),f(Ce,{key:`title_${Vt.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),N.value.show&&Ft.value&&(C(sn)||C(an))?(v(),f(C(jt),qe({ref_key:`userOptionsRef`,ref:Qt,key:`user_option_${Wt.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:C(un),isImaging:C(dn),uid:k.value,hasTooltip:!1,hasLabel:!1,isFullscreen:Q.value,chartElement:E.value},C(Oe)(N.value,`pdf csv img svg table fullscreen altCopy annotator`),{isTooltip:!1,isAnnotation:Gn.value,tableDialog:M.value.table.useDialog,style:{visibility:C(sn)?C(an)?`visible`:`hidden`:`visible`},isCursorPointer:z.value,onToggleFullscreen:Rn,onGeneratePdf:C(fn),onGenerateCsv:Yn,onGenerateImage:C(sr),onGenerateSvg:C(or),onToggleTable:qn,onToggleAnnotator:Kn,onCopyAlt:lr}),Ue({_:2},[b(C(De)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:w(n=>[x(e.$slots,t,Xe(Ke(C(ke)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`style`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`])):p(``,!0),h(`div`,ot,[(v(),m(`svg`,{ref_key:`svgRef`,ref:H,xmlns:C(ue),"aria-describedby":`chart-instructions-${k.value}`,class:Ye({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${K.value.fullHeight<=0?10:K.value.fullHeight}`,style:_(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${Yt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:fr},[Ge(C(Mt)),x(e.$slots,`svg-underlayer`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:C(un)||C(dn)||C(ir),isPrintingSvg:C(ar),data:Y.value}},void 0,!0),h(`defs`,null,[(v(!0),m(u,null,b(Z.value,(e,t)=>(v(),f(Ie,{t:`linear`,id:`gradient-${e.id}-${k.value}`,key:`gradient-${e.id}-${k.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128)),(v(!0),m(u,null,b(Y.value,(e,t)=>(v(),m(u,null,[(v(!0),m(u,null,b(e.datapoints,(e,t)=>(v(),f(Ie,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${k.value}-${e.uid}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128))],64))),256))]),(v(!0),m(u,null,b(Y.value,(t,n)=>(v(),m(`g`,{key:`ds-${n}`},[(v(!0),m(u,null,b(t.datapoints,(t,r)=>(v(),m(`g`,{key:t.id},[e.$slots.pattern?(v(),m(`g`,ct,[h(`defs`,null,[x(e.$slots,`pattern`,qe({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${k.value}_${t.uid}`}),void 0,!0)])])):p(``,!0),h(`path`,{fill:e.$slots.pattern?`url(#pattern_${k.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:_({opacity:P.value.opacity})},null,12,lt),h(`path`,{fill:`none`,stroke:P.value.stroke.useSerieColor?t.color:P.value.stroke.color,"stroke-width":P.value.strokeWidth,d:P.value.smooth?t.smoothPathRidge:t.straightPathRidge,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ut),h(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${k.value})`:`url(#gradient-single-${k.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,dt),R.value.zeroLine.show?(v(),m(`path`,{key:1,stroke:R.value.zeroLine.useSerieColor?t.color:R.value.zeroLine.stroke,"stroke-dasharray":R.value.zeroLine.strokeDasharray,"stroke-width":R.value.zeroLine.strokeWidth,d:t.zeroPath,"stroke-linecap":`round`},null,8,ft)):p(``,!0),P.value.maxPoint.show&&t.plots.length>1?(v(!0),m(u,{key:2},b(t.plots,e=>(v(),m(u,null,[e.isMaxPoint?(v(),m(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?C(le)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,pt)):p(``,!0)],64))),256)):p(``,!0),t.plots.length===1?(v(),m(`circle`,{key:3,cx:t.plots[0].x,cy:t.plots[0].y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?t.color:F.value.dot.fill,style:{pointerEvents:`none`}},null,8,mt)):p(``,!0)]))),128)),h(`text`,{x:t.label.x,y:t.label.y,"text-anchor":`end`,"font-size":L.value.fontSize,"font-weight":L.value.bold?`bold`:`normal`,fill:L.value.color,style:_({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Hn.value===n||qt.value&&t.uid===qt.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Un(n),onMouseleave:Wn,onClick:e=>Vn(t)},S(t.name),45,ht)]))),128)),I.value.values.length?(v(),m(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Xt},[(v(!0),m(u,null,b(J.value,(t,n)=>x(e.$slots,`time-label`,qe({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0,fontSize:I.value.fontSize,content:t.label,textAnchor:I.value.rotation>0?`start`:I.value.rotation<0?`end`:`middle`,fill:I.value.color,transform:`translate(${t.selectorX}, ${K.value.top+t.height+I.value.offsetY}), rotate(${I.value.rotation})`,x:t.selectorX,y:K.value.bottom+I.value.offsetY}),()=>[t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(v(),m(`g`,gt,[String(t.label).includes(`
2
- `)?(v(),m(`text`,{key:1,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:_({opacity:A.value?A.value.index===n?1:.2:1}),innerHTML:C(c)({content:String(t.label),fontSize:R.value.xAxis.labels.fontSize,fill:R.value.xAxis.labels.color,stroke:R.value.backgroundColor,x:0,y:0})},null,12,vt)):(v(),m(`text`,{key:0,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,stroke:R.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:_({opacity:A.value?A.value.index===n?1:.2:1})},S(t.label),13,_t))])):p(``,!0)],!0)),256))],512)):p(``,!0),h(`g`,null,[(v(!0),m(u,null,b(J.value,(e,t)=>(v(),m(`rect`,{x:e.x,y:e.y,width:e.width<0?.1:e.width,height:e.height<0?.1:e.height,fill:`transparent`,onMouseenter:t=>An(e),onMouseleave:t=>jn(e),onClick:()=>Mn(e)},null,40,yt))),256)),F.value.show&&A.value?(v(),m(`line`,{key:0,x1:A.value.selectorX,x2:A.value.selectorX,y1:A.value.y,y2:A.value.y+A.value.height-V.value/2,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray,"stroke-linecap":`round`,style:{pointerEvents:`none`}},null,8,bt)):p(``,!0),A.value||F.value.labels.showLast?(v(!0),m(u,{key:1},b(Y.value,e=>(v(),m(u,null,[(v(!0),m(u,null,b(e.datapoints,e=>(v(),m(u,null,[(v(!0),m(u,null,b(e.plots,(t,n)=>(v(),m(u,null,[A.value&&A.value.index===n||!A.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(v(),m(`circle`,{key:0,cx:t.x,cy:t.y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?e.color:R.value.selector.dot.fill,style:{pointerEvents:`none`}},null,8,xt)):p(``,!0),A.value&&A.value.index===n||!A.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(v(),m(`text`,{key:1,x:Pn(t.x,C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?t.x-R.value.selector.labels.fontSize/2:t.x+R.value.selector.labels.fontSize/2,y:t.y,"dominant-baseline":`middle`,stroke:R.value.backgroundColor,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`,"paint-order":`stroke fill`,"text-anchor":Pn(t.x,C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?`end`:`start`,"font-size":F.value.labels.fontSize,fill:F.value.labels.color,style:{pointerEvents:`none`}},S(C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:R.value.xAxis.labels.prefix,v:t.value,s:R.value.xAxis.labels.suffix,r:R.value.selector.labels.rounding}))),9,St)):p(``,!0)],64))),256))],64))),256))],64))),256)):p(``,!0)]),x(e.$slots,`svg`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:C(un)||C(dn)||C(ir),isPrintingSvg:C(ar),data:Y.value}},void 0,!0)],46,st)),e.$slots.hint?(v(),m(`div`,Ct,[x(e.$slots,`hint`,Xe(Ke({hint:M.value.a11y.translations.keyboardNavigation,isVisible:$t.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(v(),m(`div`,wt,[x(e.$slots,`watermark`,Xe(Ke({isPrinting:C(un)||C(dn)||C(ir)||C(ar)})),void 0,!0)])):p(``,!0),h(`div`,{ref_key:`chartLegend`,ref:Rt},[x(e.$slots,`legend`,{legend:Z.value},()=>[R.value.legend.show?(v(),f(Ve,{key:`legend_${Ut.value}`,legendSet:Z.value,config:Ln.value,isCursorPointer:z.value,onClickMarker:i[0]||=({legend:e})=>vn(e.id)},Ue({item:w(({legend:e})=>[C(nn)?p(``,!0):(v(),m(`div`,{key:0,style:_(`opacity:${X.value.includes(e.id)?.5:1}`),onClick:t=>e.segregate()},S(e.name),13,Tt))]),legendToggle:w(()=>[Z.value.length>2&&R.value.legend.selectAllToggle.show&&!C(nn)?(v(),f(Le,{key:0,backgroundColor:R.value.legend.selectAllToggle.backgroundColor,color:R.value.legend.selectAllToggle.color,fontSize:R.value.legend.fontSize,checked:X.value.length>0,isCursorPointer:z.value,onToggle:_n},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:w(({legend:e,index:t})=>[Ge(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${k.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512),e.$slots.source?(v(),m(`div`,{key:6,ref_key:`source`,ref:zt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Ft.value&&N.value.buttons.table?(v(),f(Qe($n.value.component),qe({key:7},$n.value.props,{ref_key:`tableUnit`,ref:Zt,onClose:er}),Ue({content:w(()=>[(v(),f(C(kt),{key:`table_${Ht.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:M.value.table.useDialog?``:$n.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:z.value,onClose:er},{th:w(({th:e})=>[h(`div`,null,S(e),1)]),td:w(({td:e})=>[We(S(e.name?e.name:C(l)(F.value.labels.formatter,e,C(a)({p:R.value.xAxis.labels.prefix,v:e,s:R.value.xAxis.labels.suffix,r:M.value.table.td.roundingValue}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:w(()=>[We(S($n.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:w(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Yn(N.value.callbacks.csv),style:_({cursor:z.value?`pointer`:`default`})},[Ge(C(Dt),{name:`fileCsv`,stroke:$n.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),R.value.dialog.show?(v(),f(C(Nt),{key:8,ref_key:`dialog`,ref:Jt,onClose:i[2]||=e=>qt.value=null,backgroundColor:R.value.dialog.backgroundColor,color:R.value.dialog.color,headerBg:R.value.dialog.header.backgroundColor,headerColor:R.value.dialog.header.color,isFullscreen:Q.value,fullscreenParent:E.value,isCursorPointer:z.value,withPadding:``},{title:w(()=>[We(S(qt.value.name),1)]),content:w(()=>[qt.value?(v(),f(C(Et),{key:0,config:zn.value,dataset:Bn.value,onCopyAlt:cr},null,8,[`config`,`dataset`])):p(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`,`isCursorPointer`])):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(nn)?(v(),f(_e,{key:0})):p(``,!0)],!0)],46,it))}},[[`__scopeId`,`data-v-5d9a45a7`]]);export{rt as n,Et as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.js";import{$ as a,D as ee,Dt as te,Ht as o,J as ne,Jt as re,Kt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,b as ue,i as de,in as fe,nn as pe,nt as me,pt as he,t as ge,w as _e,yt as ve,zt as ye}from"./lib-rPeBMZrn.js";import{n as be,t as xe}from"./BaseScanner-8NdoBs7B.js";import{n as Se,t as Ce}from"./useHints-C-TwxM0Y.js";import{t as we}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Te}from"./useNestedProp-DnGoh-XS.js";import{t as Ee}from"./useThemeCheck-BKNRbGeC.js";import{t as De}from"./chartImage-DPGnEuYM.js";import{n as Oe}from"./Title-BliHuXfT.js";import{t as ke}from"./useChartExport-BZts4KFb.js";import{n as Ae,t as je}from"./tableIntegration-CNoJ1CIY.js";import{n as Me,r as Ne,t as Pe}from"./userOptionsSlots-CWtXN5Q6.js";import{t as Fe}from"./usePrinter-DVf3YcG5.js";import{t as Ie}from"./useTransitions-ChGGrtrv.js";import{t as Le}from"./Shape-CRe8woTu.js";import{c as Re}from"./canvas-lib-22VpOI4_.js";import{t as ze}from"./useResponsive-CENUxfEL.js";import{t as Be}from"./DefGrad-DKMq1REY.js";import{t as Ve}from"./BaseLegendToggle-BIzyyI1h.js";import{t as He}from"./A11yDataTable-DWNlWXzs.js";import{t as Ue}from"./useUserOptionState-CXlFnwPv.js";import{t as We}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ge}from"./labelUtils-CdtU-yB_.js";import{t as Ke}from"./Legend-DM0ClX3D.js";import{t as qe}from"./vue_ui_rings-BcDDXHpQ.js";import{Fragment as Je,Teleport as Ye,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Xe,createTextVNode as Ze,createVNode as Qe,defineAsyncComponent as f,guardReactiveProps as p,mergeProps as $e,nextTick as et,normalizeClass as m,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as tt,onMounted as nt,openBlock as _,ref as v,renderList as rt,renderSlot as y,resolveDynamicComponent as it,shallowRef as at,toDisplayString as b,toRefs as ot,unref as x,useSlots as st,watch as ct,withCtx as S}from"vue";var lt=/* @__PURE__ */ e({default:()=>At}),ut=[`id`],dt=[`id`],ft=[`id`],pt={style:{position:`relative`}},mt=[`xmlns`,`viewBox`,`aria-describedby`],ht=[`width`,`height`],gt={key:1},_t=[`stroke`,`cx`,`cy`,`r`,`fill`],vt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],yt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],bt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],xt=[`x`,`y`,`width`,`height`,`fill`,`rx`],St=[`cx`,`cy`,`r`,`fill`,`stroke`],Ct=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`,`onMouseenter`,`onMouseleave`,`onClick`,`innerHTML`],wt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Tt={key:5,class:`vue-data-ui-watermark`},Et=[`id`],Dt=[`onClick`],Ot={key:0},kt={key:1},At=/*#__PURE__*/ we({__name:`vue-ui-rings`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:we,emit:lt}){let At=f(()=>import(`./Tooltip-C1q0Qoh7.js`)),jt=f(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Mt=f(()=>import(`./vue-ui-accordion-E8TJfFeK.js`).then(e=>e.n)),Nt=f(()=>import(`./DataTable-Dof6yhO7.js`)),Pt=f(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Ft=f(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),It=f(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),Lt=f(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_rings:Rt}=i(),{isThemeValid:zt,warnInvalidTheme:Bt}=Ee(),Vt=st(),C=e,w=v(!1),Ht=s(()=>!!C.dataset&&C.dataset.length),T=v(oe()),E=v(!1),Ut=v(``),D=v(null),Wt=v(0),O=v(null),Gt=v(null),Kt=v(null),qt=v(null),Jt=v(null),Yt=v(0),Xt=v(0),Zt=v(0),Qt=v(!1),$t=v(!1),en=v(null),tn=v(null),k=v(null),nn=v({x:0,y:0}),rn=v(`pointer`),an=v(!1),A=v(fn()),j=s(()=>A.value.userOptions),M=s(()=>A.value.style.chart.layout.rings),N=s(()=>A.value.style.chart.layout.labels),P=s(()=>A.value.style.chart.tooltip),F=s(()=>A.value.style.chart);Se({config:()=>A.value,dataset:()=>C.dataset,component:`VueUiRings`,rules:[Ce.singleSeries,Ce.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let{transitionEnabled:I}=Ie({config:()=>A.value.transitions,dataset:()=>C.dataset}),L=s(()=>A.value.userOptions.useCursorPointer),on=s(()=>fe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{rings:{stroke:`#6A6A6A`,gradient:{underlayerColor:`#FFFFFF`}},labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:R,FINAL_DATASET:sn,manualLoading:cn}=be({...ot(C),FINAL_CONFIG:A,prepareConfig:fn,skeletonDataset:C.config?.skeletonDataset??[{name:`_`,values:[13],color:`#808080`},{name:`_`,values:[8],color:`#969696`},{name:`_`,values:[5],color:`#ADADAD`},{name:`_`,values:[3],color:`#C4C4C4`},{name:`_`,values:[2],color:`#DBDBDB`}],skeletonConfig:fe({defaultConfig:A.value,userConfig:on.value})}),{userOptionsVisible:ln,setUserOptionsVisibility:un,keepUserOptionState:dn}=Ue({config:A.value}),{svgRef:z}=We({config:F.value.title});function fn(){let e=Te({userConfig:C.config,defaultConfig:Rt}),t=e.theme;if(!t)return e;if(!zt.value(e))return Bt(e),e;let n=Te({userConfig:qe[t]||C.config,defaultConfig:e});return{...Te({userConfig:C.config,defaultConfig:n}),customPalette:e.customPalette.length?e.customPalette:pe[e.theme]||o}}let pn=ce(C.config);ct(()=>C.config,(e,t)=>{let n=ce(e),r=n!==pn;pn=n;let i=fn();r?(R.value||(A.value=i),ln.value=!A.value.userOptions.showOnChartHover,gn(),Yt.value+=1,Xt.value+=1,Zt.value+=1,U.value.showTable=A.value.table.show,U.value.showTooltip=P.value.show,U.value.showLabels=N.value.dataLabels.show,W.value.width=F.value.size,W.value.height=F.value.size):(A.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0});let mn=s(()=>{let{markers:e}=N.value.dataLabels,t=Y.value/2,n=U.value.showLabels?e.position===`left`?t:-t:0,r=U.value.showLabels?W.value.width/2-t:0,i=e.position===`left`?r:-r;return{x:A.value.responsive?i:n/F.value.size*W.value.width,y:0/F.value.size*W.value.height}}),B=s(()=>({x:W.value.width/2+mn.value.x,y:W.value.height/2+mn.value.y}));ct(()=>C.dataset,e=>{Array.isArray(e)&&e.length>0&&(cn.value=!1)},{deep:!0});let V=at(null),H=at(null);nt(()=>{$t.value=!0,gn()});let hn=s(()=>A.value.debug);function gn(){if(ye(C.dataset)?(le({componentName:`VueUiRings`,type:`dataset`,debug:hn.value}),cn.value=!0):C.dataset.forEach((e,t)=>{e.values.length||(le({componentName:`VueUiRings`,type:`dataset`,debug:hn.value}),cn.value=!0),ve({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{le({componentName:`VueUiRings`,type:`datasetSerieAttribute`,property:e,index:t,debug:hn.value})})}),ye(C.dataset)||(cn.value=A.value.loading),A.value.responsive){let e=Re(()=>{Qt.value=!0;let{width:e,height:t}=ze({chart:O.value,title:F.value.title.text?Gt.value:null,legend:F.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value});requestAnimationFrame(()=>{W.value.width=e,W.value.height=t-12,Qt.value=!1})});V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(e),H.value=O.value.parentNode,V.value.observe(H.value)}setTimeout(()=>{w.value=!0},600)}tt(()=>{V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:_n,isImaging:vn,generatePdf:yn,generateImage:bn}=Fe({elementId:`rings_${T.value}`,fileName:F.value.title.text||`vue-ui-rings`,options:A.value.userOptions.print}),xn=s(()=>A.value.userOptions.show&&!F.value.title.text),Sn=s(()=>_e(A.value.customPalette)),U=v({showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show});ct(A,()=>{U.value={showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show}},{immediate:!0});let W=v({height:F.value.size,width:F.value.size}),Cn=s(()=>Math.min(W.value.height,W.value.width)),wn=lt,G=v([]);function Tn(){G.value.length?G.value=[]:Nn.value.forEach(e=>{G.value.push(e.uid)}),En()}function En(){wn(`selectLegend`,J.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function Dn(e){if(G.value.includes(e))G.value=G.value.filter(t=>t!==e);else{if(G.value.length===K.value.length-1)return;G.value.push(e)}En()}function On(e){return K.value.length?K.value.find(t=>t.name===e)||(hn.value&&console.warn(`VueUiRings - Series name not found "${e}"`),null):(hn.value&&console.warn(`VueUiRings - There are no series to show.`),null)}function kn(e){let t=On(e);t!==null&&G.value.includes(t.uid)&&Dn(t.uid)}function An(e){let t=On(e);t!==null&&(G.value.includes(t.uid)||Dn(t.uid))}let jn=s(()=>Math.max(...K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e)));function Mn(e){return e/jn.value}let K=s(()=>sn.value.map(({values:e,name:t,color:n=null},r)=>{let i=ie(e).reduce((e,t)=>e+t,0);return{name:t,color:n||ae(n)||Sn.value[r]||o[r]||o[r%o.length],value:i,proportion:i/sn.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0),uid:oe(),absoluteIndex:r}})),Nn=s(()=>K.value.map((e,t)=>{let n=de(N.value.dataLabels.formatter,e.value,a({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,index:t}),r=isNaN(e.value/q.value)?`-`:a({v:e.value/q.value*100,s:`%`,r:F.value.legend.roundingPercentage}),i=Rn({showVal:F.value.legend.showValue,showPercentage:F.value.legend.showPercentage,val:n,percentage:G.value.includes(e.uid)?`-%`:r});return{...e,shape:`circle`,opacity:G.value.includes(e.uid)?.5:1,segregate:()=>Dn(e.uid),isSegregated:G.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${i}`}}).toSorted((e,t)=>t.value-e.value)),Pn=s(()=>({cy:`rings-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``})),q=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e).reduce((e,t)=>e+t,0)),J=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({name:e,value:t,color:n=null,uid:r,absoluteIndex:i},a)=>({absoluteIndex:i,uid:r,name:e,color:n||ae(n)||Sn.value[a]||o[a]||o[a%o.length],value:t,proportion:Mn(t),percentage:t/q.value*100,strokeWidth:M.value.strokeWidth*Mn(t)})).toSorted((e,t)=>t.value-e.value));function Fn(){return J.value.map(({name:e,color:t,value:n,absoluteValues:r,percentage:i})=>({name:e,color:t,value:n,absoluteValues:r,percentage:i}))}let Y=s(()=>Cn.value-M.value.strokeWidth*2);function In(e,t){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Ln(e,t){D.value=null,E.value=!1,k.value=null,rn.value=`pointer`,A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Rn({val:e,percentage:t,showVal:n,showPercentage:r}){let i=N.value.dataLabels;return Ge({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function zn(e){let t=N.value.dataLabels,n=de(t.formatter,e.value,a({p:t.prefix,v:e.value,s:t.suffix,r:t.roundingValue})),r=a({v:e.percentage,s:`%`,r:t.roundingPercentage});return`${e.name}\n${Rn({val:n,percentage:r,showVal:t.showValue,showPercentage:t.showPercentage})}`}function Bn(e){return ue(Y.value*e.proportion/2*.9<=0?1e-4:Y.value*e.proportion/2*.9)}function Vn(e,t){return t===0?B.value.y:B.value.y+Y.value*J.value[0].proportion/2-Y.value*e.proportion/2-2*(t+1)}function X(e,t){let n=N.value.dataLabels.markers.position===`left`?-(Y.value/2):Y.value/2;return{x:B.value.x+n,y:Vn(e,t)-Bn(e)}}let Hn=v(null);function Un(e,t,n=`pointer`){if(A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),G.value.length===C.dataset.length)return;Hn.value={datapoint:e,seriesIndex:t,series:J.value,config:A.value},D.value=t,k.value=t,rn.value=n;let r=J.value[t],i=P.value.customFormat;if(te(i)&&he(()=>i({seriesIndex:t,datapoint:e,series:J.value,config:A.value})))Ut.value=i({seriesIndex:t,datapoint:e,series:J.value,config:A.value});else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${r.color}" />${Vt.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${T.value}_${e.absoluteIndex})" />`:``}</svg>`,n+=`<b>${Rn({showVal:P.value.showValue,showPercentage:P.value.showPercentage,val:`<span>${de(N.value.dataLabels.formatter,r.value,a({p:N.value.dataLabels.prefix,v:r.value,s:N.value.dataLabels.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:a({v:r.value/q.value*100,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Ut.value=n}E.value=!0}let Z=s(()=>({head:J.value.map(e=>({name:e.name,color:e.color})),body:J.value.map(e=>e.value)})),Q=s(()=>{let e=[`__SUM__`,a({p:N.value.dataLabels.prefix,v:q.value,s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),`100%`],t=Z.value.head.map((e,t)=>[{color:e.color,name:e.name},a({p:N.value.dataLabels.prefix,v:Z.value.body[t],s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),isNaN(Z.value.body[t]/q.value)?`-`:(Z.value.body[t]/q.value*100).toFixed(A.value.table.td.roundingPercentage)+`%`]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name:e)),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:[A.value.table.columnNames.series,A.value.table.columnNames.value,A.value.table.columnNames.percentage]}});function Wn(e=null){et(()=>{let t=Z.value.head.map((e,t)=>[[e.name],[Z.value.body[t]],[isNaN(Z.value.body[t]/q.value)?`-`:Z.value.body[t]/q.value*100]]),n=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=ee(n);e?e(r):me({csvContent:r,title:F.value.title.text||`vue-ui-rings`})})}let $=v(!1);function Gn(e){$.value=e,Wt.value+=1}function Kn(){U.value.showTable=!U.value.showTable}function qn(){U.value.showTooltip=!U.value.showTooltip}function Jn(){U.value.showLabels=!U.value.showLabels}let Yn=v(!1);function Xn(){Yn.value=!Yn.value}let Zn=De(O,()=>F.value.title.text),Qn=s(()=>je({config:A,style:F,mutableConfig:U,dialog:Lt,accordion:Mt,isFullscreen:$,parent:O,maxWidth:800,isCursorPointer:L}));ct(()=>U.value.showTable,e=>Ae(e,A,en));function $n(){U.value.showTable=!1,tn.value&&tn.value.setTableIconState(!1)}let er=s(()=>Nn.value.map(e=>({...e,name:e.display}))),tr=s(()=>F.value.backgroundColor),nr=s(()=>F.value.legend),rr=s(()=>F.value.title),{isCallbackImaging:ir,isCallbackSvg:ar,generateSvg:or,onGenerateImage:sr}=ke({svg:z,title:rr,legend:nr,legendItems:er,backgroundColor:tr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:bn});async function cr(){wn(`copyAlt`,{config:A.value,dataset:J.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function lr(){k.value=null,an.value=!0}function ur(){k.value=null,rn.value=`pointer`,E.value=!1,D.value=null,an.value=!1}function dr(e){if(!z.value||Yn.value||document.activeElement!==z.value||!J.value.length||G.value.length===C.dataset.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){k.value=null,rn.value=`pointer`,E.value=!1,D.value=null;return}if(r){if(k.value===null)return;let e=J.value[k.value];if(!e)return;In(e,k.value);return}let a=k.value;a===null||a<0||a>=J.value.length?a=n?0:J.value.length-1:n?(a+=1,a>=J.value.length&&(a=0)):t&&(--a,a<0&&(a=J.value.length-1));let ee=J.value[a];ee&&(fr(a),Un(ee,a,`keyboard`))}function fr(e){if(!Number.isFinite(e)||!z.value)return;let t=J.value[e];if(!t)return;let n=X(t,e),r=z.value.getBoundingClientRect();nn.value={x:r.left+n.x/W.value.width*r.width,y:r.top+n.y/W.value.height*r.height}}let pr=s(()=>({headers:Q.value?.colNames??[],rows:Q.value?.a11yBody??[]}));return we({getData:Fn,getImage:Zn,generatePdf:yn,generateCsv:Wn,generateImage:bn,generateSvg:or,hideSeries:An,showSeries:kn,toggleTable:Kn,toggleTooltip:qn,toggleAnnotator:Xn,toggleFullscreen:Gn,toggleLabels:Jn,copyAlt:cr}),(e,i)=>(_(),u(`div`,{ref_key:`ringsChart`,ref:O,class:m(`vue-data-ui-component vue-ui-rings ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:g(`font-family:${A.value.style.fontFamily};text-align:center;width:100%;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),id:`rings_${T.value}`,onMouseleave:i[2]||=e=>{D.value=null,E.value=!1,x(un)(!1)},onMouseenter:i[3]||=()=>x(un)(!0)},[d(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[d(`p`,null,b(A.value.a11y.translations.keyboardNavigation),1)],8,dt),pr.value?.rows?.length?(_(),c(He,{key:0,uid:T.value,head:pr.value.headers,body:pr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):l(``,!0),j.value.buttons.annotator?(_(),c(x(Pt),$e({key:1},x(n)(j.value.annotator),{svgRef:x(z),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Yn.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Xn}),Xe({_:2},[rt(x(r),n=>({name:n,fn:S(r=>[y(e.$slots,n,h(p(x(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),xn.value?(_(),u(`div`,{key:2,ref_key:`noTitle`,ref:Jt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):l(``,!0),F.value.title.text?(_(),u(`div`,{key:3,ref_key:`chartTitle`,ref:Gt,style:`width:100%;background:transparent`},[(_(),c(Oe,{key:`title_${Yt.value}`,config:{title:{cy:`rings-div-title`,...F.value.title},subtitle:{cy:`rings-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):l(``,!0),d(`div`,{id:`legend-top-${T.value}`},null,8,ft),j.value.show&&Ht.value&&(x(dn)||x(ln))?(_(),c(x(Ft),$e({ref_key:`userOptionsRef`,ref:tn,key:`user_options_${Wt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:x(_n),isImaging:x(vn),uid:T.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,isTooltip:U.value.showTooltip,isFullscreen:$.value,chartElement:O.value},x(Ne)(j.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:Yn.value,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Gn,onGeneratePdf:x(yn),onGenerateCsv:Wn,onGenerateImage:x(sr),onGenerateSvg:x(or),onToggleTable:Kn,onToggleTooltip:qn,onToggleAnnotator:Xn,onToggleLabels:Jn,onCopyAlt:cr,style:{visibility:x(dn)?x(ln)?`visible`:`hidden`:`visible`}}),Xe({_:2},[rt(x(Me)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,h(p(x(Pe)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):l(``,!0),d(`div`,pt,[(_(),u(`svg`,{ref_key:`svgRef`,ref:z,xmlns:x(ge),class:m({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,resizing:Qt.value||x(R),"vue-data-ui-no-transition":!x(I)}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:g(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),"aria-describedby":`chart-instructions-${T.value}`,tabindex:`0`,onFocus:lr,onBlur:ur,onKeydown:dr},[Qe(x(It)),y(e.$slots,`svg-underlayer`,{svg:{...W.value,isPrintingImg:x(_n)||x(vn)||x(ir),isPrintingSvg:x(ar)}},void 0,!0),e.$slots[`chart-background`]?(_(),u(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,ht)):l(``,!0),d(`defs`,null,[(_(!0),u(Je,null,rt(J.value,(e,t)=>(_(),c(Be,{t:`radial`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,id:`gradient_${T.value}_${t}`,key:`gradient_${T.value}_${t}`,stops:[[`0%`,x(re)(x(se)(e.color,.05),100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(_(),u(`g`,gt,[(_(!0),u(Je,null,rt(J.value,t=>(_(),u(`defs`,null,[y(e.$slots,`pattern`,$e({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${T.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):l(``,!0),(_(!0),u(Je,null,rt(J.value,(t,n)=>(_(),u(`g`,{key:`r_${t.uid}`},[d(`circle`,{class:m({"vue-data-ui-transition":w.value&&x(I),"vue-rings-item-onload":!w.value&&A.value.useCssAnimation&&!x(R),"vue-ui-rings-opacity":D.value!==null&&D.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,cx:B.value.x,cy:Vn(t,n),r:Bn(t),fill:M.value.gradient.underlayerColor},null,14,_t),d(`circle`,{class:m({"vue-data-ui-transition":w.value&&x(I),"vue-rings-item-onload":!w.value&&A.value.useCssAnimation&&!x(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":D.value!==null&&D.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Vn(t,n),r:Bn(t),fill:M.value.gradient.show?`url(#gradient_${T.value}_${n})`:t.color},null,14,vt),e.$slots.pattern?(_(),u(`circle`,{key:0,class:m({"vue-data-ui-transition":w.value&&x(I),"vue-rings-item-onload":!w.value&&A.value.useCssAnimation&&!x(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":D.value!==null&&D.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Vn(t,n),r:Bn(t),fill:`url(#pattern_${T.value}_${t.absoluteIndex})`},null,14,yt)):l(``,!0),d(`circle`,{stroke:`none`,cx:B.value.x,cy:Vn(t,n),r:Bn(t),fill:`transparent`,onMouseenter:e=>Un(t,n,`pointer`),onMouseleave:e=>Ln(t,n),onClick:e=>In(t,n)},null,40,bt),U.value.showLabels?(_(),u(Je,{key:1},[d(`rect`,{x:N.value.dataLabels.markers.position===`left`?X(t,n).x:B.value.x,y:X(t,n).y-N.value.dataLabels.markers.strokeWidth/2,width:Math.abs(B.value.x-X(t,n).x),height:N.value.dataLabels.markers.strokeWidth,fill:N.value.dataLabels.markers.stroke,rx:N.value.dataLabels.markers.strokeWidth,class:m({"vue-data-ui-transition":w.value&&x(I),"vue-rings-item-onload":!w.value&&A.value.useCssAnimation&&!x(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":D.value!==null&&D.value!==n})},null,10,xt),d(`circle`,{cx:X(t,n).x,cy:X(t,n).y,r:N.value.dataLabels.markers.radius,fill:t.color,stroke:F.value.backgroundColor,class:m({"vue-data-ui-transition":w.value&&x(I),"vue-rings-item-onload":!w.value&&A.value.useCssAnimation&&!x(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":D.value!==null&&D.value!==n})},null,10,St),d(`text`,{"text-anchor":N.value.dataLabels.markers.position===`left`?`end`:`start`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,"font-weight":N.value.dataLabels.bold?`bold`:`normal`,class:m({"vue-data-ui-transition":w.value&&x(I),"vue-rings-item-onload":!w.value&&A.value.useCssAnimation&&!x(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":D.value!==null&&D.value!==n}),transform:`translate(${X(t,n).x+(N.value.dataLabels.markers.position===`left`?-N.value.dataLabels.offsetX-14:N.value.dataLabels.offsetX)+6}, ${X(t,n).y+N.value.dataLabels.fontSize/3})`,onMouseenter:e=>Un(t,n,`pointer`),onMouseleave:e=>Ln(t,n),onClick:e=>In(t,n),innerHTML:x(ne)({content:zn(t),fontSize:N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,x:0,y:0,translateY:!0})},null,42,Ct)],64)):l(``,!0)]))),128)),y(e.$slots,`svg`,{svg:{...W.value,isPrintingImg:x(_n)||x(vn)||x(ir),isPrintingSvg:x(ar)}},void 0,!0)],46,mt)),e.$slots.hint?(_(),u(`div`,wt,[y(e.$slots,`hint`,h(p({hint:A.value.a11y.translations.keyboardNavigation,isVisible:an.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(_(),u(`div`,Tt,[y(e.$slots,`watermark`,h(p({isPrinting:x(_n)||x(vn)||x(ir)||x(ar)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${T.value}`},null,8,Et),$t.value&&(F.value.legend.show||e.$slots.legend)?(_(),c(Ye,{key:6,to:F.value.legend.position===`top`?`#legend-top-${T.value}`:`#legend-bottom-${T.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Kt},[y(e.$slots,`legend`,{legend:Nn.value},()=>[F.value.legend.show?(_(),c(Ke,{key:`legend_${Zt.value}`,legendSet:Nn.value,config:Pn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({legend:e})=>Dn(e.uid)},Xe({item:S(({legend:e,index:t})=>[x(R)?l(``,!0):(_(),u(`div`,{key:0,onClick:t=>Dn(e.uid),style:g(`opacity:${G.value.includes(e.uid)?.5:1}`)},b(e.display),13,Dt))]),legendToggle:S(()=>[Nn.value.length>2&&F.value.legend.selectAllToggle.show&&!x(R)?(_(),c(Ve,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:L.value,onToggle:Tn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):l(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:S(({legend:e,index:t})=>[Qe(Le,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${T.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):l(``,!0)],!0)],512)],8,[`to`])):l(``,!0),e.$slots.source?(_(),u(`div`,{key:7,ref_key:`source`,ref:qt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),Qe(x(At),{teleportTo:P.value.teleportTo,show:U.value.showTooltip&&E.value&&G.value.length<C.dataset.length,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:O.value,content:Ut.value,isFullscreen:$.value,isCustom:P.value.customFormat&&typeof P.value.customFormat==`function`,smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:rn.value===`keyboard`,a11yPosition:nn.value},{"tooltip-before":S(()=>[y(e.$slots,`tooltip-before`,h(p({...Hn.value})),void 0,!0)]),tooltip:S(()=>[y(e.$slots,`tooltip`,h(p({...Hn.value})),void 0,!0)]),"tooltip-after":S(()=>[y(e.$slots,`tooltip-after`,h(p({...Hn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Ht.value&&j.value.buttons.table?(_(),c(it(Qn.value.component),$e({key:8},Qn.value.props,{ref_key:`tableUnit`,ref:en,onClose:$n}),Xe({content:S(()=>[(_(),c(x(Nt),{key:`table_${Xt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:A.value.table.useDialog?``:Qn.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:$n},{th:S(({th:e})=>[e===`__SUM__`?(_(),u(`div`,Ot,[Qe(x(jt),{name:`sigma`,stroke:Q.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),u(`div`,kt,b(e),1))]),td:S(({td:e})=>[Ze(b(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:S(()=>[Ze(b(Qn.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:S(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Wn(j.value.callbacks.csv),style:g({cursor:L.value?`pointer`:`default`})},[Qe(x(jt),{name:`fileCsv`,stroke:Qn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),y(e.$slots,`skeleton`,{},()=>[x(R)?(_(),c(xe,{key:0})):l(``,!0)],!0)],46,ut))}},[[`__scopeId`,`data-v-08170d9a`]]);export{lt as n,At as t};
@@ -1,9 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.js";import{$ as a,Ct as o,D as s,Dt as c,F as l,Ht as u,Jt as d,P as f,Qt as p,S as m,X as h,_ as ee,at as g,b as te,i as ne,in as re,jt as ie,nt as ae,pt as oe,t as se,tn as ce,v as le,w as ue,yt as de,zt as fe}from"./lib-rPeBMZrn.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he,t as ge}from"./useHints-C-TwxM0Y.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ve}from"./resolveChartConfig-CIhClE5R.js";import{t as ye}from"./img-D4RQwASc.js";import{n as be}from"./Title-BliHuXfT.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,r as Te,t as Ee}from"./userOptionsSlots-CWtXN5Q6.js";import{t as De}from"./usePrinter-DVf3YcG5.js";import{t as Oe}from"./useTransitions-ChGGrtrv.js";import{t as ke}from"./useSvgLabelLayout-42Kats14.js";import{t as Ae}from"./Shape-CRe8woTu.js";import{t as je}from"./useResponsive-CENUxfEL.js";import{t as Me}from"./DefGrad-DKMq1REY.js";import{t as Ne}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./Legend-DM0ClX3D.js";import{t as Re}from"./vue_ui_scatter-C50uFYQL.js";import{Fragment as _,Teleport as ze,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as Be,createTextVNode as Ve,createVNode as He,defineAsyncComponent as Ue,guardReactiveProps as We,mergeProps as Ge,nextTick as Ke,normalizeClass as qe,normalizeProps as Je,normalizeStyle as Ye,onBeforeUnmount as Xe,onMounted as Ze,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as Qe,shallowRef as $e,toDisplayString as D,toRefs as et,unref as O,watch as tt,withCtx as k}from"vue";var nt=/* @__PURE__ */ e({default:()=>yn}),rt=[`id`],it=[`id`],at={key:0,class:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`},ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`aria-describedby`,`viewBox`],lt=[`width`,`height`],ut={key:1},dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt={key:2},mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ht=[`opacity`],gt=[`stroke`,`stroke-width`,`d`],_t=[`transform`,`font-size`,`fill`,`stroke`],vt={key:4},yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],bt=[`opacity`],xt=[`d`,`stroke`,`stroke-width`],St=[`transform`,`font-size`,`fill`,`stroke`],Ct={key:6},wt=[`data-cy`,`fill`,`stroke`,`stroke-width`,`rx`],Tt=[`onMouseenter`],Et={key:2,style:{"pointer-events":`none`}},Dt=[`fill`,`fill-opacity`],Ot=[`stroke`,`stroke-dasharray`,`stroke-width`],kt={key:0,style:{"pointer-events":`none`}},At=[`d`,`stroke`,`stroke-width`],jt=[`d`,`stroke`,`stroke-width`],Mt=[`d`,`stroke`,`stroke-width`],Nt=[`d`,`stroke`,`stroke-width`],Pt={key:7},Ft=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],It={key:0,class:`vue-ui-scatter-datapoint`},Lt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Rt={key:1},zt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Bt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],Vt={key:0,style:{"pointer-events":`none`}},Ht=[`x`,`y`,`width`,`height`],Ut={key:0,style:{"pointer-events":`none !important`}},Wt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Kt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],qt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`x`,`y`,`font-size`,`fill`],Xt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Zt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Qt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],$t=[`id`,`transform`,`font-size`,`font-weight`,`fill`],en=[`font-size`,`fill`,`transform`],tn=[`transform`,`font-size`,`fill`],nn=[`x`,`y`,`font-size`,`fill`],rn=[`x`,`y`,`font-size`,`fill`],an=[`font-size`,`font-weight`,`fill`,`x`,`y`],on=[`id`],sn=[`x`,`y`,`width`,`height`],cn={key:14,style:{pointerEvents:`none`}},ln=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],un=[`x`,`y`,`fill`,`font-size`,`font-weight`],dn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},fn={key:6,class:`vue-data-ui-watermark`},pn=[`id`],mn=[`onClick`],hn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},gn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},_n={key:0},vn=[`innerHTML`],yn=/*#__PURE__*/ _e({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:_e,emit:nt}){let yn=Ue(()=>import(`./Tooltip-C1q0Qoh7.js`)),bn=Ue(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),xn=Ue(()=>import(`./vue-ui-accordion-E8TJfFeK.js`).then(e=>e.n)),Sn=Ue(()=>import(`./DataTable-Dof6yhO7.js`)),Cn=Ue(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),wn=Ue(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Tn=Ue(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),En=Ue(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_scatter:Dn}=i(),A=e,On=nt,kn=v(()=>!!A.dataset&&A.dataset.length),j=w(h()),An=w(!1),jn=w(``),Mn=w(0),M=w(null),Nn=w(null),Pn=w(null),Fn=w(null),In=w(null),Ln=w(0),Rn=w(0),zn=w(0),N=w([]),Bn=w(!1),Vn=w(null),Hn=w(null),Un=w(null),Wn=w(null),Gn=w(null),Kn=w(null),qn=w(null),Jn=w(null),Yn=w(null),Xn=w(null),Zn=w(null),Qn=w({x:0,y:0}),$n=w(`pointer`),er=w(!1),tr=w(null),P=w(hr()),nr=v(()=>P.value.userOptions),F=v(()=>P.value.style.layout.dataLabels.xAxis),I=v(()=>P.value.style.layout.dataLabels.yAxis),L=v(()=>P.value.style.layout.marginalBars),R=v(()=>P.value.style.layout.plots),z=v(()=>P.value.style.tooltip),B=v(()=>P.value.style);he({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiScatter`,rules:[ge.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series (clusters) is > 6. Consider:`,``,``,`▶️ Using filters to let users choose a maximum number of series (clusters) to display.`]}]});let{transitionEnabled:rr}=Oe({config:()=>P.value.transitions,dataset:()=>A.dataset}),ir=v(()=>P.value.userOptions.useCursorPointer),ar=v(()=>c(P.value.events?.datapointClick));function or(e=100,t=.8,n={}){let{meanX:r=0,sdX:i=1,meanY:a=0,sdY:o=1,seed:s}=n,c=(s??Math.floor(Math.random()*2**31))>>>0,l=()=>(c=c*1664525+1013904223>>>0,c/2**32),u=()=>{let e=0,t=0;for(;e===0;)e=l();for(;t===0;)t=l();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)},d=e/2,f=Array.from({length:d},u),p=Array.from({length:d},u),m=e=>e.reduce((e,t)=>e+t,0)/e.length,h=m(f),ee=m(p);for(let e=0;e<d;e+=1)f[e]-=h,p[e]-=ee;let g=(e,t)=>e.reduce((e,n,r)=>e+n*t[r],0),te=e=>g(e,e),ne=g(p,f)/te(f),re=p.map((e,t)=>e-ne*f[t]),ie=te(f)/d,ae=te(re)/d,oe=Math.sqrt((1-t*t)*ie/ae),se=f.map((e,n)=>t*e+oe*re[n]),ce=f.concat(f.map(e=>-e)),le=se.concat(se.map(e=>-e)),ue=e=>Math.sqrt(te(e)/e.length),de=(e,t,n)=>{let r=ue(e);return e.map(e=>n+(r?e/r*t:0))},fe=de(ce,i,r),pe=de(le,o,a);for(let e=fe.length-1;e>0;--e){let t=Math.floor(l()*(e+1));[fe[e],fe[t]]=[fe[t],fe[e]],[pe[e],pe[t]]=[pe[t],pe[e]]}return fe.map((e,t)=>({x:e,y:pe[t]}))}let sr=v(()=>re({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{backgroundColor:`#99999930`,layout:{axis:{stroke:`#6A6A6A`},correlation:{label:{show:!1}},dataLabels:{xAxis:{show:!1},yAxis:{show:!1}},marginalBars:{fill:`#99999960`},padding:{top:12,right:12,bottom:12,left:12},plots:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}},userConfig:P.value.skeletonConfig??{}})),{loading:cr,FINAL_DATASET:lr,manualLoading:ur}=pe({...et(A),FINAL_CONFIG:P,prepareConfig:hr,skeletonDataset:A.config?.skeletonDataset??[{name:``,color:`#999999`,values:or(100,.5,{seed:42})}],skeletonConfig:re({defaultConfig:P.value,userConfig:sr.value})}),{userOptionsVisible:dr,setUserOptionsVisibility:fr,keepUserOptionState:pr}=Fe({config:P.value}),{svgRef:mr}=Ie({config:B.value.title});function hr(){return ve(A.config,Dn,Re)}let gr=p(A.config);tt(()=>A.config,(e,t)=>{let n=p(e),r=n!==gr;gr=n;let i=hr();r?(cr.value||(P.value=i),dr.value=!P.value.userOptions.showOnChartHover,Sr(),Ln.value+=1,Rn.value+=1,zn.value+=1,V.value.showTable=P.value.table.show,V.value.showTooltip=z.value.show,xr.value&&P.value.usePerformanceMode&&console.warn(`VueUiScatter : You are using performance mode
2
-
3
- - downsampling is disabled in this mode, all plots are rendered
4
-
5
- - plot significance is not active in this mode (all plots have the same opacity)
6
-
7
- - Depending on plot density, shapes might not display a border (stroke) to avoid fuzziness
8
-
9
- ℹ️ To remove this warning, set config.debug to false.`)):(P.value.style.tooltip=i.style.tooltip,V.value.showTooltip=P.value.style.tooltip.show)},{deep:!0}),tt(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(ur.value=!1)},{deep:!0});let _r=$e(null),vr=$e(null),yr=w(!1),br=0;Ze(async()=>{Sr(),await Ke(),Bn.value=!0});let xr=v(()=>P.value.debug);function Sr(){fe(A.dataset)&&(g({componentName:`VueUiScatter`,type:`dataset`,debug:xr.value}),ur.value=!0),fe(A.dataset)||(ur.value=P.value.loading),P.value.responsive&&(_r.value&&(vr.value&&_r.value.unobserve(vr.value),_r.value.disconnect()),_r.value=new ResizeObserver(()=>{let{width:e,height:t}=je({chart:M.value,title:B.value.title.text?Nn.value:null,legend:B.value.legend.show?Pn.value:null,source:Fn.value,noTitle:In.value});cancelAnimationFrame(br),br=requestAnimationFrame(()=>{H.value.width=e,H.value.height=t,yr.value=!0})}),vr.value=M.value.parentNode,_r.value.observe(vr.value))}Xe(()=>{cancelAnimationFrame(br),_r.value&&(vr.value&&_r.value.unobserve(vr.value),_r.value.disconnect())});let{isPrinting:Cr,isImaging:wr,generatePdf:Tr,generateImage:Er}=De({elementId:`vue-ui-scatter_${j.value}`,fileName:B.value.title.text||`vue-ui-scatter`,options:P.value.userOptions.print}),Dr=v(()=>P.value.userOptions.show&&!B.value.title.text),Or=v(()=>ue(P.value.customPalette)),V=w({showTable:P.value.table.show,showTooltip:z.value.show});tt(P,()=>{V.value={showTable:P.value.table.show,showTooltip:z.value.show}},{immediate:!0});let H=w({height:B.value.layout.height,width:B.value.layout.width}),kr=v(()=>L.value.show?L.value.size+L.value.offset:0),{metrics:Ar,ready:jr,settling:Mr,update:Nr}=ke({svgRef:mr,canMeasure:()=>!P.value.responsive||yr.value,initialMetrics:{left:0,right:0,bottom:0},measure:e=>{let t=I.value.scales.show?e(Yn.value).textWidth:0,n=t=>{let n=e(t);return Math.max(0,n.x+n.width-H.value.width)},r=Kn.value?n(Kn.value):0,i=F.value.scales.show&&Xn.value?Math.max(0,...[...Xn.value.querySelectorAll(`text`)].map(n)):0,a=Math.max(r,i);return{left:Math.max(e(Gn.value).width,t?t+12:0),right:a?a+6:0,bottom:Jn.value?e(Jn.value).height+6:0}}}),U=v(()=>{let{left:e,right:t,bottom:n}=Ar.value;return{top:B.value.layout.padding.top+kr.value+I.value.fontSize*2,right:H.value.width-B.value.layout.padding.right-kr.value-6-t,bottom:H.value.height-B.value.layout.padding.bottom-n,left:B.value.layout.padding.left+e,height:H.value.height-B.value.layout.padding.top-B.value.layout.padding.bottom-kr.value-n-I.value.fontSize*2,width:H.value.width-B.value.layout.padding.left-B.value.layout.padding.right-kr.value-e-t-6}}),Pr=v(()=>{xr.value&&lr.value.forEach((e,t)=>{de({datasetObject:e,requiredAttributes:[`values`]}).forEach(e=>{g({componentName:`VueUiScatter`,type:`datasetSerieAttribute`,property:e,index:t})}),e.values&&e.values.forEach((e,n)=>{de({datasetObject:e,requiredAttributes:[`x`,`y`]}).forEach(e=>{g({componentName:`VueUiScatter`,type:`datasetSerieAttribute`,property:`values.${e}`,index:`${t} - ${n}`})})})});let e=Math.min(...q.value.filter(e=>!N.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.x))),t=Math.max(...q.value.filter(e=>!N.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.x))),n=Math.min(...q.value.filter(e=>!N.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.y))),r=Math.max(...q.value.filter(e=>!N.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.y)));return{xMin:e<0?e:0,xMax:t,yMin:n<0?n:0,yMax:r}}),Fr=v(()=>{let e=B.value.layout.axis;return{xMin:e.xMin!==null&&e.xMin!==void 0?e.xMin:Pr.value.xMin,xMax:e.xMax!==null&&e.xMax!==void 0?e.xMax:Pr.value.xMax,yMin:e.yMin!==null&&e.yMin!==void 0?e.yMin:Pr.value.yMin,yMax:e.yMax!==null&&e.yMax!==void 0?e.yMax:Pr.value.yMax}});function Ir(e){return Number.isFinite(e)?e<2?2:Math.trunc(e):5}function Lr(e){return e.roundingValue!==void 0&&e.roundingValue!==null?e.roundingValue:e.rounding!==void 0&&e.rounding!==null?e.rounding:0}function Rr({minimum:e,maximum:t,stepCount:n,useNiceScale:r}){let i=Ir(n);if(e===t){let n=t+(e===0?1:Math.abs(e)*.01);return(r?ee:le)(e,n,i)}return(r?ee:le)(e,t,i)}let zr=v(()=>{let e=F.value;return Rr({minimum:Fr.value.xMin,maximum:Fr.value.xMax,stepCount:e.scales.steps,useNiceScale:e.scales.useNiceScale})}),Br=v(()=>{let e=I.value;return Rr({minimum:Fr.value.yMin,maximum:Fr.value.yMax,stepCount:e.scales.steps,useNiceScale:e.scales.useNiceScale})}),W=v(()=>({xMin:zr.value.min,xMax:zr.value.max,yMin:Br.value.min,yMax:Br.value.max}));function G(e,t,n,r){return ne(t,te(e),a({p:R.value.selectors.labels.prefix,v:te(e),s:R.value.selectors.labels.suffix,r:n}),...r?[r]:[])}function Vr(e,t,n,r){return t.ticks.map(t=>({value:t,[e]:r(t),label:G(t,n.scales.labels.formatter,Lr(n))}))}let Hr=v(()=>Vr(`x`,zr.value,F.value,Kr)),Ur=v(()=>Vr(`y`,Br.value,I.value,qr)),Wr=v(()=>ui.value.length>0&&F.value.scales.show),Gr=v(()=>ui.value.length>0&&I.value.scales.show);function Kr(e){let t=W.value.xMax-W.value.xMin;return t===0?U.value.left:U.value.left+(e-W.value.xMin)/t*U.value.width}function qr(e){let t=W.value.yMax-W.value.yMin;return t===0?U.value.bottom:U.value.bottom-(e-W.value.yMin)/t*U.value.height}let K=v(()=>{let{xMin:e,xMax:t,yMin:n,yMax:r}=W.value,i=e>0?e:t<0?t:0,a=n>0?n:r<0?r:0;return{x:Kr(i),y:qr(a)}}),q=v(()=>lr.value.map((e,t)=>{let n=`cluster_${j.value}_${t}`;return{...e,values:ie({data:e.values,threshold:P.value.usePerformanceMode?e.values.length+1:P.value.downsample.threshold}),id:n,color:e.color?e.color:Or.value[t]||u[t]||u[t%u.length],opacity:N.value.includes(n)?.5:1,shape:e.shape??`circle`,segregate:()=>_i(n),isSegregated:N.value.includes(n),hasGroupSelection:!!ai.value,isGroupSelected:ai.value===n,onEnter:()=>si(n),onLeave:()=>ci()}})),Jr=v(()=>({cy:`scatter-div-legend`,backgroundColor:B.value.legend.backgroundColor,color:B.value.legend.color,fontSize:B.value.legend.fontSize,paddingBottom:12,fontWeight:B.value.legend.bold?`bold`:``})),J=v(()=>q.value.map((e,t)=>({...e,plots:e.values.map((n,r)=>({x:Kr(n.x),y:qr(n.y),v:{...n,name:n.name||``},clusterName:e.name,clusterId:e.id,color:e.color?e.color:Or.value[t]||u[t]||u[t%u.length],id:`plot_${j.value}_${t}_${r}`,weight:n.weight??R.value.radius}))})).filter(e=>!N.value.includes(e.id))),Y=v(()=>{let e=1e-9,t=({m:t,b:n,rect:r,verticalX:i=null})=>{let{left:a,right:o,top:s,bottom:c}=r,l=[],u=(e,t)=>{Number.isFinite(e)&&Number.isFinite(t)&&l.push({x:e,y:t})},d=({x:t,y:n})=>t>=a-e&&t<=o+e&&n>=s-e&&n<=c+e;i===null?Number.isFinite(t)&&(u(a,t*a+n),u(o,t*o+n),Math.abs(t)>e?(u((s-n)/t,s),u((c-n)/t,c)):n>=s-e&&n<=c+e&&(u(a,n),u(o,n))):i>=a-e&&i<=o+e&&(u(i,s),u(i,c));let f=l.filter(d),p=[];for(let e of f)p.some(t=>Math.abs(t.x-e.x)<1e-6&&Math.abs(t.y-e.y)<1e-6)||p.push(e);if(p.length<2)return null;let m=p[0],h=p[1],ee=0;for(let e=0;e<p.length;e+=1)for(let t=e+1;t<p.length;t+=1){let n=p[e].x-p[t].x,r=p[e].y-p[t].y,i=n*n+r*r;i>ee&&(ee=i,m=p[e],h=p[t])}return{x1:m.x,y1:m.y,x2:h.x,y2:h.y}};return J.value.map(n=>{let r=n.plots.length,i=n.plots.reduce((e,t)=>e+t.x,0)/r,a=n.plots.reduce((e,t)=>e+t.y,0)/r,o=0,s=0,c=0;for(let e of n.plots){let t=e.x-i,n=e.y-a;o+=t*n,s+=t*t,c+=n*n}let l,u,d=null;s<e?(d=i,l=1/0,u=null):(l=o/s,u=a-l*i);let f,p;d===null?(f=l,p=u):(f=1/0,p=null);let h=n.plots.every(e=>e.v&&typeof e.v.x==`number`&&typeof e.v.y==`number`),ee=NaN;if(r>=2){let t=0,o=0;h?(t=n.plots.reduce((e,t)=>e+t.v.x,0)/r,o=n.plots.reduce((e,t)=>e+t.v.y,0)/r):(t=i,o=-a);let s=0,c=0,l=0;for(let e of n.plots){let n=h?e.v.x:e.x,r=h?e.v.y:-e.y,i=n-t,a=r-o;s+=i*a,c+=i*i,l+=a*a}if(c>=e&&l>=e){let e=s/Math.sqrt(c*l);ee=Math.max(-1,Math.min(1,e))}}let g=t({m:f,b:p,rect:U.value,verticalX:d});if(!g)return{...n,correlation:null,label:null,plots:n.plots.map(e=>({...e,deviation:0,shape:n.shape,color:m(n.color)}))};let te={x:(g.x1+g.x2)/2,y:(g.y1+g.y2)/2};return{...n,color:m(n.color),correlation:{...g,coefficient:ee},label:te,plots:n.plots.map(t=>{let r,i;d===null?Math.abs(f)<e?(r=t.x,i=p):(r=(t.x+f*t.y-f*p)/(1+f*f),i=(f*t.x+f*f*t.y+p)/(1+f*f)):(r=d,i=t.y);let a=t.x-r,o=t.y-i,s=Math.sqrt(a*a+o*o);return{...t,deviation:s,shape:n.shape,color:m(n.color)}})}})}),Yr=v(()=>Math.max(...Y.value.flatMap(e=>e.plots.map(e=>Math.abs(e.deviation)))));function Xr(){return Y.value}function Zr(e,t){let n=Array.isArray(e)?e.flatMap(e=>e.plots.map(e=>({x:e.x,y:e.y}))):e.plots.map(e=>({x:e.x,y:e.y})),r=1/0,i=-1/0,a=1/0,o=-1/0;n.forEach(({x:e,y:t})=>{r=Math.min(r,e),i=Math.max(i,e),a=Math.min(a,t),o=Math.max(o,t)});let s=i-r,c=o-a,l=s/t,u=c/t,d=Array(t).fill(0),f=Array(t).fill(0),p=(e,n,r)=>r>0?Math.max(0,Math.min(t-1,Math.floor((e-n)/r+1e-10))):0;n.forEach(({x:e,y:t})=>{let n=p(e,r,l),i=p(t,a,u);d[n]||(d[n]=0),f[i]||(f[i]=0),d[n]+=1,f[i]+=1});let m=[],h=[];for(let e=0;e<t;e+=1)m.push(r+(e+.5)*l),h.push(a+(e+.5)*u);return{x:d,y:f,avgX:m,avgY:h,maxX:Math.max(...d),maxY:Math.max(...f)}}let Qr=v(()=>L.value.tranches),$r=v(()=>Zr(J.value,Qr.value)),ei=[{key:`x`,onEnter:Ai,get selected(){return Vn.value}},{key:`y`,onEnter:ji,get selected(){return Hn.value}}],ti=v(()=>Object.fromEntries(ei.map(({key:e})=>{let t=e===`x`,n=U.value,r=L.value,i=$r.value,a=t?i.avgX:i.avgY,o=t?i.maxX:i.maxY,s=(t?n.width:n.height)/Qr.value,c=s<=0?1e-4:s;return[e,i[e].map((e,i)=>{let l=a[i],u=l-s/2,d=e/o*r.size,f=d<=0?1e-4:d;return{count:e,average:l,bar:t?{x:u,y:n.top-r.offset-d,width:c,height:f}:{x:n.right+r.offset,y:u,width:f,height:c},trap:t?{x:u,y:n.top-r.offset-r.size,width:c,height:Math.max(.1,r.size)}:{x:n.right+r.offset,y:u,width:Math.max(.1,r.size),height:c},highlight:t?{x:u,y:n.top,width:c,height:n.height}:{x:n.left,y:u,width:n.width,height:c},lines:[u,u+c].map(e=>t?{x1:e,x2:e,y1:0,y2:n.top+n.height}:{x1:n.left,x2:H.value.width,y1:e,y2:e})}})]}))),ni=v(()=>{let e=U.value.top-L.value.offset,t=U.value.right+L.value.offset;return J.value.map(n=>{let r=Zr(n,Qr.value);return{coords:r,dX:f(r.avgX.map((t,n)=>({x:t,y:e-r.x[n]/r.maxX*L.value.size}))),dY:l(r.avgY.map((e,n)=>({y:e,x:t+L.value.size*r.y[n]/r.maxY}))),color:n.color,id:n.id}})}),X=w(void 0),Z=w(null),Q=w([]),ri=w(!1),ii=w(null),ai=w(void 0);function oi(){An.value=!1,X.value=void 0,Q.value=[],Z.value=null,tr.value=null,Zn.value=null,ai.value=void 0}function si(e){let t=Y.value.find(t=>t.id===e);t?(Q.value=t.plots.map(e=>e.id),ai.value=e):Q.value=[]}function ci(){Q.value=[],ai.value=void 0}function li(e){if(!mr.value||!e)return;let t=ce(e.x,e.y,mr.value);t&&(Qn.value=t)}let ui=v(()=>Z.value?[Z.value]:Q.value.length?Y.value.flatMap(e=>e.plots).filter(e=>Q.value.includes(e.id)):[]);function di(e){return G(e.v.x,F.value.scales.labels.formatter,Lr(F.value),{datapoint:e})}function fi(e){return G(e.v.y,I.value.scales.labels.formatter,Lr(I.value),{datapoint:e})}function pi(e,t,n=`pointer`,r=null){X.value=e.id,Z.value=e,$n.value=n,tr.value=r,Zn.value=e.id;let i=``;P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:t}),ii.value={datapoint:e,seriesIndex:t,series:Y.value,config:P.value};let o=z.value.customFormat;c(o)&&oe(()=>o({datapoint:e,seriesIndex:t,series:Y.value,config:P.value}))?jn.value=o({datapoint:e,seriesIndex:t,series:Y.value,config:P.value}):(e.clusterName&&(i+=`<div style="display:flex;gap:3px;align-items:center">${e.clusterName}</div>`),e.v.name&&(i+=`<div>${e.v.name}</div>`),i+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${z.value.borderColor}">`,i+=`<div>${F.value.name}: <b>${isNaN(e.v.x)?`-`:ne(R.value.selectors.labels.x.formatter,e.v.x,a({p:z.value.prefix,v:e.v.x,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`,i+=`<div>${I.value.name}: <b>${isNaN(e.v.y)?`-`:ne(R.value.selectors.labels.y.formatter,e.v.y,a({p:z.value.prefix,v:e.v.y,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`,i+=`${R.value.deviation.translation}: <b>${a({v:e.deviation,r:R.value.deviation.roundingValue})}</b>`,i+=`</div>`,jn.value=`<div>${i}</div>`),An.value=!0,n===`keyboard`&&Ke(()=>{li(e)})}function mi(e,t){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}),($n.value!==`keyboard`||Zn.value!==e?.id)&&(An.value=!1,X.value=void 0,Z.value=null)}function hi(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t})}function gi(){N.value.length?N.value=[]:q.value.forEach(e=>{N.value.push(e.id)}),On(`selectLegend`,J.value)}function _i(e){N.value.includes(e)?N.value=N.value.filter(t=>t!==e):N.value.length<lr.value.length-1&&N.value.push(e),On(`selectLegend`,J.value)}function vi(e){return q.value.length?q.value.find(t=>t.name===e)||(xr.value&&console.warn(`VueUiScatter - Series name not found "${e}"`),null):(xr.value&&console.warn(`VueUiScatter - There are no series to show.`),null)}function yi(e){let t=vi(e);t!==null&&N.value.includes(t.id)&&_i(t.id)}function bi(e){let t=vi(e);t!==null&&(N.value.includes(t.id)||_i(t.id))}function xi(e=null){Ke(()=>{let t=[``,P.value.table.translations.correlationCoefficient,P.value.table.translations.nbrPlots,`${F.value.name} ${P.value.table.translations.average}`,`${I.value.name} ${P.value.table.translations.average}`],n=Y.value.map(e=>[e.name,e.correlation.coefficient,e.plots.length,e.plots.map(e=>e.v.x).reduce((e,t)=>e+t,0)/e.plots.length,e.plots.map(e=>e.v.y).reduce((e,t)=>e+t,0)/e.plots.length]),r=[[B.value.title.text],[B.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),i=s(r);e?e(i):ae({csvContent:i,title:B.value.title.text||`vue-ui-heatmap`})})}let Si=v(()=>{let e=[P.value.table.translations.series,P.value.table.translations.correlationCoefficient,P.value.table.translations.nbrPlots,`${F.value.name} ${P.value.table.translations.average}`,`${I.value.name} ${P.value.table.translations.average}`],t=Y.value.map(e=>[{shape:e.shape,content:e.name??`-`,color:e.color},Number((e.correlation?.coefficient??0).toFixed(P.value.table.td.roundingValue)).toLocaleString(),e.plots.length.toLocaleString(),Number((e.plots.map(e=>e.v.x??0).reduce((e,t)=>e+t,0)/e.plots.length).toFixed(P.value.table.td.roundingAverage)).toLocaleString(),Number((e.plots.map(e=>e.v.y??0).reduce((e,t)=>e+t,0)/e.plots.length).toFixed(P.value.table.td.roundingAverage)).toLocaleString()]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.content:e)),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:e}}),Ci=w(!1);function wi(e){Ci.value=e,Mn.value+=1}function Ti(){V.value.showTable=!V.value.showTable}function Ei(){V.value.showTooltip=!V.value.showTooltip}let Di=w(!1);function Oi(){Di.value=!Di.value}async function ki({scale:e=2}={}){if(!M.value)return;let{width:t,height:n}=M.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ye({domElement:M.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:B.value.title.text,width:t,height:n,aspectRatio:r}}function Ai(e){Vn.value=e,L.value.highlighter.highlightBothAxes&&(Hn.value=$r.value.y.length-2-e)}function ji(e){Hn.value=e,L.value.highlighter.highlightBothAxes&&(Vn.value=e)}function Mi(){Vn.value=null,Hn.value=null}let Ni={circle:1,square:1,diamond:1,triangle:1.2,star:1.3,pentagon:1.3,hexagon:1.3},$=e=>e.toFixed(3);function Pi({shape:e=`circle`,cx:t,cy:n,r}){if(!P.value.usePerformanceMode)return``;let i=Ni[e]*r;switch(e){case`circle`:{let e=$(t-i),r=$(n),a=$(t+i),o=$(i);return`M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`}case`square`:{let e=$(t-i),r=$(n-i),a=$(t+i),o=$(n+i);return`M ${e} ${r} L ${a} ${r} L ${a} ${o} L ${e} ${o} Z`}case`diamond`:{let e=$(t),r=$(n);return`M ${e} ${$(n-i)} L ${$(t+i)} ${r} L ${e} ${$(n+i)} L ${$(t-i)} ${r} Z`}case`triangle`:{let e=i*Math.sqrt(3),r=t,a=n-2/3*e,o=t-i,s=n+1/3*e,c=t+i,l=s;return`M ${$(r)} ${$(a)} L ${$(o)} ${$(s)} L ${$(c)} ${$(l)} Z`}case`star`:{let e=i,r=i*.5,a=[];for(let i=0;i<10;i+=1){let o=(-90+i*36)*Math.PI/180,s=i%2==0?e:r;a.push([t+s*Math.cos(o),n+s*Math.sin(o)])}let o=`M ${$(a[0][0])} ${$(a[0][1])}`;for(let e=1;e<a.length;e+=1)o+=` L ${$(a[e][0])} ${$(a[e][1])}`;return o+` Z`}case`pentagon`:{let e=[];for(let r=0;r<5;r+=1){let a=(-90+r*72)*Math.PI/180;e.push([t+i*Math.cos(a),n+i*Math.sin(a)])}let r=`M ${$(e[0][0])} ${$(e[0][1])}`;for(let t=1;t<5;t+=1)r+=` L ${$(e[t][0])} ${$(e[t][1])}`;return r+` Z`}case`hexagon`:{let e=[];for(let r=0;r<6;r+=1){let a=(-60+r*60)*Math.PI/180;e.push([t+i*Math.cos(a),n+i*Math.sin(a)])}let r=`M ${$(e[0][0])} ${$(e[0][1])}`;for(let t=1;t<6;t+=1)r+=` L ${$(e[t][0])} ${$(e[t][1])}`;return r+` Z`}default:{let e=$(t-i),r=$(n),a=$(t+i),o=$(i);return`M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`}}}let Fi=v(()=>{if(!P.value.usePerformanceMode)return[``];let{left:e,right:t,top:n,bottom:r}=U.value,i=Math.max(1,(t-e)*(r-n)),a=e=>e/i*1e4,o=R.value.stroke,s=R.value.strokeWidth,c=R.value.opacity;return Y.value.map(i=>{let l=[];for(let a of i.plots){let o=a.x,s=a.y;if(o<e||o>t||s<n||s>r)continue;let c=Math.max(R.value.radius,a.weight);l.push(Pi({shape:i.shape||`circle`,cx:o,cy:s,r:c}))}if(!l.length)return null;let u=a(i.plots.length)>2.5||i.plots.length>1e3;return{id:i.id,d:l.join(``),fill:d(i.color,c*100),stroke:u?`none`:o,strokeWidth:u?0:s,strokeOpacity:1}}).filter(Boolean)});function Ii(){return P.value.usePerformanceMode?e=>{let t=mr.value;if(!t)return;let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(!r)return;let i=r.inverse(),a=n.matrixTransform(i),o=null,s=1/0,c=-1;if(Y.value.forEach((e,t)=>{e.plots.forEach(e=>{let n=e.x-a.x,r=e.y-a.y,i=n*n+r*r;i<=64&&i<s&&(s=i,o=e,c=t)})}),ri.value=!!o,o)X.value!==o.id&&(X.value=o.id,pi(o,c,`pointer`,na.value.get(o.id)??null));else if(X.value){let e=Z.value;X.value=void 0,mi(e,c)}}:()=>null}let Li=Ii();function Ri(){if(ri.value=!1,X.value){let e=Z.value;X.value=void 0,mi(e,null)}}function zi(e){let t=Z.value;if(t){let e=Y.value.findIndex(e=>e.id===t.clusterId);hi(t,e>=0?e:0)}}let Bi=v(()=>Ce({config:P,style:B,mutableConfig:V,dialog:En,accordion:xn,isFullscreen:Ci,parent:M,maxWidth:800,isCursorPointer:ir}));tt(()=>V.value.showTable,e=>Se(e,P,Un));function Vi(){V.value.showTable=!1,Wn.value&&Wn.value.setTableIconState(!1)}let Hi=v(()=>B.value.backgroundColor),Ui=v(()=>B.value.legend),Wi=v(()=>B.value.title),{isCallbackImaging:Gi,isCallbackSvg:Ki,generateSvg:qi,onGenerateImage:Ji}=xe({svg:mr,title:Wi,legend:Ui,legendItems:q,backgroundColor:Hi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Er});async function Yi(){On(`copyAlt`,{config:P.value,dataset:J.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Xi(e,t){let n=ta.value.filter(t=>t.id!==e.id);if(!n.length)return null;let r=(n=>{if(!n.length)return null;let r=null,i=1/0;return n.forEach(n=>{let a=n.x-e.x,o=n.y-e.y,s=0,c=0;t===`right`||t===`left`?(s=Math.abs(a),c=Math.abs(o)):(s=Math.abs(o),c=Math.abs(a));let l=s*1e3+c;l<i&&(r=n,i=l)}),r})(n.filter(n=>t===`right`?n.x>e.x:t===`left`?n.x<e.x:t===`down`?n.y>e.y:t===`up`&&n.y<e.y));if(r)return r;let i=[];if(t===`right`){let e=Math.min(...n.map(e=>e.x));i=n.filter(t=>t.x===e)}if(t===`left`){let e=Math.max(...n.map(e=>e.x));i=n.filter(t=>t.x===e)}if(t===`down`){let e=Math.min(...n.map(e=>e.y));i=n.filter(t=>t.y===e)}if(t===`up`){let e=Math.max(...n.map(e=>e.y));i=n.filter(t=>t.y===e)}return i.length?i.reduce((n,r)=>{if(!n)return r;let i=Math.abs(t===`right`||t===`left`?n.y-e.y:n.x-e.x);return Math.abs(t===`right`||t===`left`?r.y-e.y:r.x-e.x)<i?r:n},null):null}function Zi(){tr.value=null,Zn.value=null,er.value=!0}function Qi(){oi(),$n.value=`pointer`,er.value=!1}function $i(e){if(!mr.value||Di.value||document.activeElement!==mr.value||!ta.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){oi(),$n.value=`pointer`;return}if(a){if(tr.value===null)return;let e=ta.value[tr.value];if(!e)return;hi(e,e.seriesIndex);return}let s=null;if(n&&(s=`right`),t&&(s=`left`),i&&(s=`down`),r&&(s=`up`),Zn.value===null){let e=Z.value;if(e&&e.id){let t=Xi(e,s);if(!t){let t=na.value.get(e.id);if(t===void 0)return;pi(e,e.seriesIndex,`keyboard`,t);return}let n=na.value.get(t.id);if(n===void 0)return;pi(t,t.seriesIndex,`keyboard`,n);return}let t=ta.value[0];if(!t)return;let n=na.value.get(t.id)??0;pi(t,t.seriesIndex,`keyboard`,n);return}let c=na.value.get(Zn.value);if(c===void 0)return;let l=ta.value[c];if(!l)return;let u=Xi(l,s);if(!u)return;let d=na.value.get(u.id);d!==void 0&&pi(u,u.seriesIndex,`keyboard`,d)}let ea=v(()=>{if(!Z.value)return``;let e=Z.value,t=isNaN(e.v.x)?`-`:ne(R.value.selectors.labels.x.formatter,e.v.x,a({p:z.value.prefix,v:e.v.x,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:e.seriesIndex}),n=isNaN(e.v.y)?`-`:ne(R.value.selectors.labels.y.formatter,e.v.y,a({p:z.value.prefix,v:e.v.y,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:e.seriesIndex});return[e.clusterName||``,e.v.name||``,`${F.value.name}: ${t}`,`${I.value.name}: ${n}`].filter(Boolean).join(`. `)}),ta=v(()=>Y.value.flatMap((e,t)=>e.plots.map(n=>({...n,seriesIndex:t,seriesId:e.id,seriesName:e.name,shape:e.shape||`circle`,color:e.color})))),na=v(()=>{let e=/* @__PURE__ */ new Map;return ta.value.forEach((t,n)=>{e.set(t.id,n)}),e}),ra=v(()=>({headers:Si.value?.colNames??[],rows:Si.value?.a11yBody??[]}));return _e({getData:Xr,getImage:ki,generatePdf:Tr,generateCsv:xi,generateImage:Er,generateSvg:qi,hideSeries:bi,showSeries:yi,toggleTable:Ti,toggleTooltip:Ei,toggleAnnotator:Oi,toggleFullscreen:wi,copyAlt:Yi}),tt(()=>[H.value,F.value,I.value,B.value.layout.padding,kr.value,W.value,R.value.selectors.labels,P.value.style.fontFamily,A.dataset,N.value,yr.value,Gn.value,Kn.value,Jn.value,Xn.value,Yn.value],Nr,{flush:`post`,deep:!0}),(e,i)=>(C(),x(`div`,{class:qe(`vue-data-ui-component vue-ui-scatter ${Ci.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`scatterChart`,ref:M,id:`vue-ui-scatter_${j.value}`,style:Ye(`font-family:${B.value.fontFamily};width:100%; text-align:center;background:${B.value.backgroundColor};${P.value.responsive?`height: 100%`:``}`),onMouseenter:i[4]||=()=>O(fr)(!0),onMouseleave:i[5]||=()=>{O(fr)(!1),er.value||oi()}},[S(`div`,{id:`chart-instructions-${j.value}`,class:`sr-only`},[S(`p`,null,D(P.value.a11y.translations.keyboardNavigation),1)],8,it),V.value.showTooltip?b(``,!0):(C(),x(`div`,at,D(ea.value),1)),ra.value?.rows?.length&&kn.value?(C(),y(Pe,{key:1,uid:j.value,head:ra.value.headers,body:ra.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),nr.value.buttons.annotator?(C(),y(O(Cn),Ge({key:2},O(n)(nr.value.annotator),{svgRef:O(mr),backgroundColor:B.value.backgroundColor,color:B.value.color,active:Di.value,isCursorPointer:ir.value,palette:nr.value.annotatorPalette,onClose:Oi}),Be({_:2},[T(O(r),n=>({name:n,fn:k(r=>[E(e.$slots,n,Je(We(O(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):b(``,!0),Dr.value?(C(),x(`div`,{key:3,ref_key:`noTitle`,ref:In,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):b(``,!0),B.value.title.text?(C(),x(`div`,{key:4,ref_key:`chartTitle`,ref:Nn,style:`width:100%;background:transparent`},[(C(),y(be,{key:`title_${Ln.value}`,config:{title:{cy:`scatter-div-title`,...B.value.title},subtitle:{cy:`scatter-div-subtitle`,...B.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),S(`div`,{id:`legend-top-${j.value}`},null,8,ot),nr.value.show&&kn.value&&(O(pr)||O(dr))?(C(),y(O(wn),Ge({ref_key:`userOptionsRef`,ref:Wn,key:`user_options_${Mn.value}`,backgroundColor:B.value.backgroundColor,color:B.value.color,isImaging:O(wr),isPrinting:O(Cr),uid:j.value,hasTooltip:nr.value.buttons.tooltip&&z.value.show,isTooltip:V.value.showTooltip,isFullscreen:Ci.value,chartElement:M.value},O(Te)(nr.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Di.value,tableDialog:P.value.table.useDialog,isCursorPointer:ir.value,onToggleFullscreen:wi,onGeneratePdf:O(Tr),onGenerateCsv:xi,onGenerateImage:O(Ji),onGenerateSvg:O(qi),onToggleTable:Ti,onToggleTooltip:Ei,onToggleAnnotator:Oi,onCopyAlt:Yi,style:{visibility:O(pr)?O(dr)?`visible`:`hidden`:`visible`}}),Be({_:2},[T(O(we)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:k(n=>[E(e.$slots,t,Je(We(O(Ee)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):b(``,!0),S(`div`,st,[(C(),x(`svg`,{ref_key:`svgRef`,ref:mr,xmlns:O(se),"aria-describedby":`chart-instructions-${j.value}`,class:qe({"vue-data-ui-fullscreen--on":Ci.value,"vue-data-ui-fulscreen--off":!Ci.value,"vue-data-ui-no-transition":!O(rr)||O(Mr)}),viewBox:`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`,style:Ye(`max-width:100%;overflow:visible;background:transparent;color:${B.value.color};visibility:${O(jr)?`visible`:`hidden`}`),onMouseleave:Mi,tabindex:`0`,onFocus:Zi,onBlur:Qi,onKeydown:$i},[He(O(Tn)),E(e.$slots,`svg-underlayer`,{svg:{...H.value,drawingArea:{...U.value,zero:K.value},data:J.value,isPrintingImg:O(Cr)||O(wr)||O(Gi),isPrintingSvg:O(Ki)}},void 0,!0),e.$slots[`chart-background`]?(C(),x(`foreignObject`,{key:0,x:0,y:0,width:H.value.width<=0?10:H.value.width,height:H.value.height<=0?10:H.value.height,style:{pointerEvents:`none`}},[E(e.$slots,`chart-background`,{},void 0,!0)],8,lt)):b(``,!0),B.value.layout.axis.show?(C(),x(`g`,ut,[S(`line`,{x1:K.value.x,x2:K.value.x,y1:U.value.top,y2:U.value.bottom,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,8,dt),S(`line`,{x1:U.value.left,x2:U.value.right,y1:K.value.y,y2:K.value.y,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,8,ft)])):b(``,!0),F.value.scales.verticalLines.show?(C(),x(`g`,pt,[(C(!0),x(_,null,T(Hr.value,(e,t)=>(C(),x(`line`,{key:`scatter-x-scale-line-${j.value}-${t}`,x1:e.x,x2:e.x,y1:U.value.top,y2:U.value.bottom,stroke:F.value.scales.verticalLines.stroke,"stroke-width":F.value.scales.verticalLines.strokeWidth,"stroke-linecap":`round`},null,8,mt))),128))])):b(``,!0),F.value.scales.show?(C(),x(`g`,{key:3,ref_key:`xAxisScaleLabels`,ref:Xn},[(C(!0),x(_,null,T(Hr.value,(e,t)=>(C(),x(`g`,{class:`vue-ui-scatter-scale-group`,key:`scatter-x-scale-${j.value}-${t}`,opacity:+!Wr.value},[S(`path`,{class:qe({"vue-data-ui-transition":O(rr)&&!O(Mr)}),stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,d:`M${e.x},${K.value.y-4} ${e.x},${K.value.y+4}`,"stroke-linecap":`round`},null,10,gt),S(`text`,{class:qe({"vue-data-ui-transition":O(rr)&&!O(Mr)}),transform:`translate(${e.x}, ${K.value.y+F.value.scales.labels.fontSize+6+F.value.scales.labels.offsetY})`,"text-anchor":`middle`,"font-size":F.value.scales.labels.fontSize,fill:F.value.scales.labels.color,stroke:B.value.backgroundColor,"stroke-width":`2`,"paint-order":`stroke`},D(e.label),11,_t)],8,ht))),128))],512)):b(``,!0),I.value.scales.horizontalLines.show?(C(),x(`g`,vt,[(C(!0),x(_,null,T(Ur.value,(e,t)=>(C(),x(`line`,{key:`scatter-y-scale-line-${j.value}-${t}`,x1:U.value.left,x2:U.value.right,y1:e.y,y2:e.y,stroke:I.value.scales.horizontalLines.stroke,"stroke-width":I.value.scales.horizontalLines.strokeWidth,"stroke-linecap":`round`},null,8,yt))),128))])):b(``,!0),I.value.scales.show?(C(),x(`g`,{key:5,ref_key:`yAxisScaleLabels`,ref:Yn,opacity:+!Gr.value,style:{transition:`opacity 0.1s ease-in-out`},class:`vue-ui-scatter-scale-group`},[(C(!0),x(_,null,T(Ur.value,(e,t)=>(C(),x(`g`,{key:`scatter-y-scale-${j.value}-${t}`},[S(`path`,{class:qe({"vue-data-ui-transition":O(rr)&&!O(Mr)}),d:`M${K.value.x-4},${e.y} ${K.value.x+4},${e.y}`,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,10,xt),S(`text`,{class:qe({"vue-data-ui-transition":O(rr)&&!O(Mr)}),transform:`translate(${K.value.x-I.value.scales.labels.fontSize/2-8+I.value.scales.labels.offsetX}, ${e.y+I.value.scales.labels.fontSize/3})`,"text-anchor":`end`,"font-size":I.value.scales.labels.fontSize,fill:I.value.scales.labels.color,stroke:B.value.backgroundColor,"stroke-width":`2`,"paint-order":`stroke`},D(e.label),11,St)]))),128))],8,bt)):b(``,!0),L.value.show?(C(),x(`g`,Ct,[S(`defs`,null,[He(Me,{t:`linear`,id:`marginal_x_${j.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,L.value.fill,1],[`100%`,B.value.backgroundColor,1]]},null,8,[`id`,`stops`]),He(Me,{t:`linear`,id:`marginal_y_${j.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,B.value.backgroundColor,1],[`100%`,L.value.fill,1]]},null,8,[`id`,`stops`])]),(C(),x(_,null,T(ei,e=>(C(),x(_,{key:e.key},[(C(!0),x(_,null,T(ti.value[e.key],(t,n)=>(C(),x(`g`,null,[t.count&&t.average?(C(),x(`rect`,Ge({key:0,"data-cy":O(!1)?`marginal-bar-`+e.key:void 0},{ref_for:!0},t.bar,{fill:L.value.useGradient?`url(#marginal_${e.key}_${j.value})`:L.value.fill,style:[`opacity:${L.value.opacity}`,{"pointer-events":`none`}],stroke:B.value.backgroundColor,"stroke-width":L.value.strokeWidth,rx:L.value.borderRadius}),null,16,wt)):b(``,!0),t.average?(C(),x(`rect`,Ge({key:1,ref_for:!0},t.trap,{fill:`transparent`,onMouseenter:t=>e.onEnter(n),onMouseleave:i[0]||=e=>Mi()}),null,16,Tt)):b(``,!0),t.average&&e.selected!=null&&e.selected===n?(C(),x(`g`,Et,[S(`rect`,Ge({ref_for:!0},t.highlight,{fill:L.value.highlighter.color,"fill-opacity":L.value.highlighter.opacity}),null,16,Dt),(C(!0),x(_,null,T(t.lines,e=>(C(),x(`line`,Ge({ref_for:!0},e,{stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}}),null,16,Ot))),256))])):b(``,!0)]))),256))],64))),64)),L.value.showLines?(C(),x(`g`,kt,[(C(!0),x(_,null,T(ni.value,e=>(C(),x(_,null,[N.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:0,d:`M ${e.dX}`,stroke:B.value.backgroundColor,"stroke-width":L.value.linesStrokeWidth+1,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,At)),N.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:1,d:`M ${e.dX}`,stroke:e.color,"stroke-width":L.value.linesStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,jt)),N.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:2,d:`M ${e.dY}`,stroke:B.value.backgroundColor,"stroke-width":L.value.linesStrokeWidth+1,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Mt)),N.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:3,d:`M ${e.dY}`,stroke:e.color,"stroke-width":L.value.linesStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Nt))],64))),256))])):b(``,!0)])):b(``,!0),R.value.giftWrap.show?(C(),x(`g`,Pt,[(C(!0),x(_,null,T(Y.value,(e,t)=>(C(),x(`g`,null,[e.plots.length>2?(C(),x(`polygon`,{key:0,points:O(o)({series:e.plots}),fill:O(d)(e.color,R.value.giftWrap.fillOpacity*100),"stroke-width":R.value.giftWrap.strokeWidth,"stroke-dasharray":R.value.giftWrap.strokeDasharray,stroke:e.color,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,Ft)):b(``,!0)]))),256))])):b(``,!0),P.value.usePerformanceMode?b(``,!0):(C(!0),x(_,{key:8},T(Y.value,(e,t)=>(C(),x(`g`,{key:e.id},[!e.shape||e.shape===`circle`?(C(),x(`g`,It,[(C(!0),x(_,null,T(e.plots,(n,r)=>(C(),x(`circle`,{key:n.id,cx:n.x,cy:n.y,r:X.value&&X.value===n.id||Q.value.includes(n.id)?n.weight*R.value.hoverRadiusRatio:n.weight,fill:O(d)(e.color,X.value&&X.value!==n.id||Q.value.length&&!Q.value.includes(n.id)?R.value.opacityNotSelected*100:R.value.opacity*100),stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,style:Ye(`opacity:${X.value&&X.value===n.id||Q.value.includes(n.id)?1:R.value.significance.useDistanceOpacity?1-Math.abs(n.deviation)/Yr.value:R.value.significance.show&&Math.abs(n.deviation)>R.value.significance.deviationThreshold?R.value.significance.opacity:1}`),onMouseover:e=>pi(n,t,`pointer`,na.value.get(n.id)),onMouseleave:e=>mi(n,t),onClick:e=>hi(n,t)},null,44,Lt))),128))])):(C(),x(`g`,Rt,[(C(!0),x(_,null,T(e.plots,(n,r)=>(C(),y(Ae,{class:`vue-ui-scatter-datapoint`,plot:{x:n.x,y:n.y},radius:X.value&&X.value===n.id||Q.value.includes(n.id)?n.weight*R.value.hoverRadiusRatio:n.weight,shape:e.shape,color:O(d)(e.color,X.value&&X.value!==n.id||Q.value.length&&!Q.value.includes(n.id)?R.value.opacityNotSelected*100:R.value.opacity*100),stroke:R.value.stroke,strokeWidth:R.value.strokeWidth,style:Ye(`opacity:${X.value&&X.value===n.id||Q.value.includes(n.id)?1:R.value.significance.useDistanceOpacity?1-Math.abs(n.deviation)/Yr.value:R.value.significance.show&&Math.abs(n.deviation)>R.value.significance.deviationThreshold?R.value.significance.opacity:1}`),onMouseover:e=>pi(n,t,`pointer`,na.value.get(n.id)),onMouseleave:e=>mi(n,t),onClick:e=>hi(n,t)},null,8,[`plot`,`radius`,`shape`,`color`,`stroke`,`strokeWidth`,`style`,`onMouseover`,`onMouseleave`,`onClick`]))),256))])),R.value.name.show?(C(!0),x(_,{key:2},T(e.plots,(e,n)=>(C(),x(`text`,{class:`vue-ui-scatter-datapoint-label`,key:`datalabel-${e.id}`,transform:`translate(${e.x}, ${e.y-e.weight-R.value.name.fontSize+R.value.name.offsetY})`,"text-anchor":`middle`,"font-size":R.value.name.fontSize,fill:O(d)(R.value.name.color,X.value&&X.value!==e.id||Q.value.length&&!Q.value.includes(e.id)?R.value.opacityNotSelected*100:100),onMouseover:n=>pi(e,t,`pointer`,na.value.get(e.id)),onMouseleave:n=>mi(e,t),onClick:n=>hi(e,t)},D(e.clusterName),41,zt))),128)):b(``,!0)]))),128)),P.value.usePerformanceMode?(C(),x(_,{key:9},[S(`g`,null,[(C(!0),x(_,null,T(Fi.value,e=>(C(),x(`path`,{key:e.id,d:e.d,fill:e.fill,stroke:e.stroke,"stroke-width":e.strokeWidth,"stroke-opacity":e.strokeOpacity,"vector-effect":`non-scaling-stroke`,"paint-order":`fill`},null,8,Bt))),128))]),Z.value?(C(),x(`g`,Vt,[He(Ae,{shape:Z.value.shape||`circle`,color:Z.value.color,plot:{x:Z.value.x,y:Z.value.y},radius:Z.value.weight*R.value.hoverRadiusRatio,stroke:R.value.stroke,strokeWidth:R.value.strokeWidth},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`])])):b(``,!0),S(`rect`,{x:U.value.left,y:U.value.top,width:Math.max(1e-4,U.value.width),height:Math.max(1e-4,U.value.height),fill:`transparent`,style:Ye({cursor:ri.value&&ar.value?`pointer`:`default`}),onMousemove:i[1]||=(...e)=>O(Li)&&O(Li)(...e),onMouseleave:Ri,onClick:zi},null,44,Ht)],64)):b(``,!0),(C(!0),x(_,null,T(ui.value,e=>(C(),x(_,{key:`selector_${e.id}`},[R.value.selectors.show?(C(),x(`g`,Ut,[S(`line`,{x1:K.value.x,x2:e.x,y1:e.y,y2:e.y,stroke:R.value.selectors.stroke,"stroke-width":R.value.selectors.strokeWidth,"stroke-dasharray":R.value.selectors.strokeDasharray,"stroke-linecap":`round`,class:`line-pointer`},null,8,Wt),S(`line`,{x1:e.x,x2:e.x,y1:K.value.y,y2:e.y,stroke:R.value.selectors.stroke,"stroke-width":R.value.selectors.strokeWidth,"stroke-dasharray":R.value.selectors.strokeDasharray,"stroke-linecap":`round`,class:`line-pointer`},null,8,Gt),I.value.scales.show?b(``,!0):(C(),x(`text`,{key:0,x:K.value.x+(e.x>K.value.x?-6:6),y:e.y+R.value.selectors.labels.fontSize/3,"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":e.x>K.value.x?`end`:`start`},D(G(e.v.y,R.value.selectors.labels.y.formatter,R.value.selectors.labels.rounding,{datapoint:e})),9,Kt)),F.value.scales.show?b(``,!0):(C(),x(`text`,{key:1,x:e.x,y:K.value.y+(e.y>K.value.y?-6:R.value.selectors.labels.fontSize+6),"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":`middle`},D(G(e.v.x,R.value.selectors.labels.y.formatter,R.value.selectors.labels.rounding,{datapoint:e})),9,qt)),F.value.scales.show?(C(),x(`text`,{key:2,x:e.x,y:K.value.y+F.value.scales.labels.fontSize+6+F.value.scales.labels.offsetY,"text-anchor":`middle`,"font-size":F.value.scales.labels.fontSize,fill:F.value.scales.labels.color},D(di(e)),9,Jt)):b(``,!0),I.value.scales.show?(C(),x(`text`,{key:3,x:K.value.x-I.value.scales.labels.fontSize/2-8+I.value.scales.labels.offsetX,y:e.y+I.value.scales.labels.fontSize/3,"text-anchor":`end`,"font-size":I.value.scales.labels.fontSize,fill:I.value.scales.labels.color},D(fi(e)),9,Yt)):b(``,!0),S(`circle`,{cx:K.value.x,cy:e.y,r:R.value.selectors.markers.radius,fill:R.value.selectors.markers.fill,stroke:R.value.selectors.markers.stroke,"stroke-width":R.value.selectors.markers.strokeWidth,class:`line-pointer`},null,8,Xt),S(`circle`,{cx:e.x,cy:K.value.y,r:R.value.selectors.markers.radius,fill:R.value.selectors.markers.fill,stroke:R.value.selectors.markers.stroke,"stroke-width":R.value.selectors.markers.strokeWidth,class:`line-pointer`},null,8,Zt),R.value.selectors.labels.showName&&!R.value.name.show?(C(),x(`text`,{key:4,x:e.x,y:e.y+(e.y<K.value.y?-R.value.selectors.labels.fontSize/2:R.value.selectors.labels.fontSize),"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":e.x<U.value.left+100?`start`:e.x>U.value.right-100?`end`:e.x>K.value.x?`start`:`end`},D(e.v.name),9,Qt)):b(``,!0)])):b(``,!0)],64))),128)),F.value.show?(C(),x(`g`,{key:10,ref_key:`xAxisLabelLeft`,ref:Gn},[S(`text`,{id:`vue-ui-scatter-xAxis-label-${j.value}`,transform:`translate(${F.value.fontSize+(B.value.layout.dataLabels.reverseAxisLabels?I.value.offsetX:F.value.offsetX)}, ${U.value.top+U.value.height/2+(B.value.layout.dataLabels.reverseAxisLabels?I.value.offsetY:F.value.offsetY)}), rotate(-90)`,"text-anchor":`middle`,"font-size":F.value.fontSize,"font-weight":F.value.bold?`bold`:`normal`,fill:F.value.color},D(B.value.layout.dataLabels.reverseAxisLabels?I.value.name:F.value.name),9,$t),F.value.showValue?(C(),x(`text`,{key:0,"text-anchor":`middle`,"font-size":F.value.fontSize,fill:F.value.color,transform:`translate(${F.value.name?F.value.fontSize*3:0}, ${K.value.y+F.value.fontSize/3}), rotate(-90)`},D(G(W.value.xMin,R.value.selectors.labels.x.formatter,B.value.layout.dataLabels.xAxis.rounding)),9,en)):b(``,!0)],512)):b(``,!0),F.value.show&&F.value.showValue?(C(),x(`text`,{key:11,ref_key:`xAxisLabelRight`,ref:Kn,"text-anchor":`middle`,transform:`translate(${U.value.right+B.value.layout.padding.right+6}, ${K.value.y+F.value.fontSize/3}), rotate(-90)`,"font-size":F.value.fontSize,fill:F.value.color},D(G(W.value.xMax,R.value.selectors.labels.x.formatter,F.value.rounding)),9,tn)):b(``,!0),I.value.show&&I.value.showValue?(C(),x(`text`,{key:12,ref_key:`yAxisLabelTop`,ref:qn,x:K.value.x,y:U.value.top-I.value.fontSize,"text-anchor":`middle`,"font-size":I.value.fontSize,fill:I.value.color},D(G(W.value.yMax,R.value.selectors.labels.y.formatter,I.value.rounding)),9,nn)):b(``,!0),I.value.show?(C(),x(`g`,{key:13,ref_key:`yAxisLabelBottom`,ref:Jn},[I.value.showValue?(C(),x(`text`,{key:0,x:K.value.x,y:H.value.height-I.value.fontSize*2,"text-anchor":`middle`,"font-size":I.value.fontSize,fill:I.value.color},D(G(W.value.yMin,R.value.selectors.labels.y.formatter,B.value.layout.dataLabels.yAxis.rounding)),9,rn)):b(``,!0),S(`text`,{"text-anchor":`middle`,"font-size":I.value.fontSize,"font-weight":I.value.bold?`bold`:`normal`,fill:I.value.color,x:U.value.left+U.value.width/2+(B.value.layout.dataLabels.reverseAxisLabels?F.value.offsetX:I.value.offsetX),y:H.value.height+(B.value.layout.dataLabels.reverseAxisLabels?F.value.offsetY:I.value.offsetY)},D(B.value.layout.dataLabels.reverseAxisLabels?F.value.name:I.value.name),9,an)],512)):b(``,!0),S(`clipPath`,{id:`clip_path_${j.value}`},[S(`rect`,{x:U.value.left,y:U.value.top,width:U.value.width<=0?1e-4:U.value.width,height:U.value.height<=0?1e-4:U.value.height},null,8,sn)],8,on),B.value.layout.correlation.show?(C(),x(`g`,cn,[(C(!0),x(_,null,T(Y.value.filter(e=>e.correlation),(e,t)=>(C(),x(`line`,{x1:e.correlation.x1,x2:e.correlation.x2,y1:e.correlation.y1,y2:e.correlation.y2,"stroke-dasharray":B.value.layout.correlation.strokeDasharray,stroke:e.color,"stroke-width":B.value.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${j.value})`},null,8,ln))),256)),(C(!0),x(_,null,T(Y.value.filter(e=>e.correlation),(e,t)=>(C(),x(`g`,null,[B.value.layout.correlation.label.show?(C(),x(`text`,{key:0,x:e.correlation.x2,y:e.correlation.y2,fill:B.value.layout.correlation.label.useSerieColor?e.color:B.value.layout.correlation.label.color,"text-anchor":`end`,"font-size":B.value.layout.correlation.label.fontSize,"font-weight":B.value.layout.correlation.label.bold?`bold`:`normal`},D(O(a)({v:O(te)(e.correlation?.coefficient??0),r:B.value.layout.correlation.label.roundingValue})),9,un)):b(``,!0)]))),256))])):b(``,!0),E(e.$slots,`svg`,{svg:{...H.value,drawingArea:{...U.value,zero:K.value},data:J.value,isPrintingImg:O(Cr)||O(wr)||O(Gi),isPrintingSvg:O(Ki)}},void 0,!0)],46,ct)),e.$slots.hint?(C(),x(`div`,dn,[E(e.$slots,`hint`,Je(We({hint:P.value.a11y.translations.keyboardNavigation,isVisible:er.value})),void 0,!0)])):b(``,!0)]),e.$slots.watermark?(C(),x(`div`,fn,[E(e.$slots,`watermark`,Je(We({isPrinting:O(Cr)||O(wr)||O(Gi)||O(Ki)})),void 0,!0)])):b(``,!0),S(`div`,{id:`legend-bottom-${j.value}`},null,8,pn),kn.value&&Bn.value&&(B.value.legend.show||e.$slots.legend)?(C(),y(ze,{key:7,to:B.value.legend.position===`top`?`#legend-top-${j.value}`:`#legend-bottom-${j.value}`},[S(`div`,{ref_key:`chartLegend`,ref:Pn},[E(e.$slots,`legend`,{legend:q.value},()=>[B.value.legend.show?(C(),y(Le,{key:`legend_${zn.value}`,legendSet:q.value,config:Jr.value,isCursorPointer:ir.value,onClickMarker:i[2]||=({legend:e})=>_i(e.id)},{item:k(({legend:e})=>[S(`div`,{onClick:t=>e.segregate(),style:Ye(`opacity:${N.value.includes(e.id)?.5:1}`)},D(e.name),13,mn)]),legendToggle:k(()=>[q.value.length>2&&B.value.legend.selectAllToggle.show&&!O(cr)?(C(),y(Ne,{key:0,backgroundColor:B.value.legend.selectAllToggle.backgroundColor,color:B.value.legend.selectAllToggle.color,fontSize:B.value.legend.fontSize,checked:N.value.length>0,isCursorPointer:ir.value,onToggle:gi},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):b(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):b(``,!0)],!0)],512)],8,[`to`])):b(``,!0),e.$slots.source?(C(),x(`div`,{key:8,ref_key:`source`,ref:Fn,dir:`auto`},[E(e.$slots,`source`,{},void 0,!0)],512)):b(``,!0),He(O(yn),{teleportTo:z.value.teleportTo,show:V.value.showTooltip&&An.value,backgroundColor:z.value.backgroundColor,color:z.value.color,borderRadius:z.value.borderRadius,borderColor:z.value.borderColor,borderWidth:z.value.borderWidth,fontSize:z.value.fontSize,backgroundOpacity:z.value.backgroundOpacity,position:z.value.position,offsetX:z.value.offsetX,offsetY:z.value.offsetY,parent:M.value,content:jn.value,isFullscreen:Ci.value,isCustom:z.value.customFormat&&typeof z.value.customFormat==`function`,smooth:z.value.smooth,backdropFilter:z.value.backdropFilter,smoothForce:z.value.smoothForce,smoothSnapThreshold:z.value.smoothSnapThreshold,isA11yMode:$n.value===`keyboard`,a11yPosition:Qn.value},{"tooltip-before":k(()=>[E(e.$slots,`tooltip-before`,Je(We({...ii.value})),void 0,!0)]),tooltip:k(()=>[E(e.$slots,`tooltip`,Je(We({...ii.value})),void 0,!0)]),"tooltip-after":k(()=>[E(e.$slots,`tooltip-after`,Je(We({...ii.value})),void 0,!0)]),default:k(()=>[z.value.showShape?(C(),x(`div`,hn,[(C(),x(`svg`,gn,[He(Ae,{shape:Z.value.shape,color:Z.value.color,plot:{x:10,y:10},radius:7},null,8,[`shape`,`color`])]))])):b(``,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),kn.value&&nr.value.buttons.table?(C(),y(Qe(Bi.value.component),Ge({key:9},Bi.value.props,{ref_key:`tableUnit`,ref:Un,onClose:Vi}),Be({content:k(()=>[(C(),y(O(Sn),{key:`table_${Rn.value}`,colNames:Si.value.colNames,head:Si.value.head,body:Si.value.body,config:Si.value.config,title:P.value.table.useDialog?``:Bi.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:ir.value,onClose:Vi},{th:k(({th:e})=>[Ve(D(e),1)]),td:k(({td:e})=>[e.shape?(C(),x(`div`,_n,[S(`span`,null,D(e.content),1)])):(C(),x(`div`,{key:1,innerHTML:e},null,8,vn))]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:k(()=>[Ve(D(Bi.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:k(()=>[S(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[3]||=e=>xi(nr.value.callbacks.csv),style:Ye({cursor:ir.value?`pointer`:`default`})},[He(O(bn),{name:`fileCsv`,stroke:Bi.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):b(``,!0),E(e.$slots,`skeleton`,{},()=>[O(cr)?(C(),y(me,{key:0})):b(``,!0)],!0)],46,rt))}},[[`__scopeId`,`data-v-fa5b113c`]]);export{nt as n,yn as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-C3FbHv4N.js";import{$ as n,Ht as r,Jt as i,S as a,X as ee,Yt as te,at as o,i as s,in as c,t as ne,w as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce,t as le}from"./useHints-C-TwxM0Y.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./DefGrad-DKMq1REY.js";import{t as l}from"./usePrefersMotion-XLHwega2.js";import{t as u}from"./vue_ui_sparkbar-Bpx7QrFq.js";import{Fragment as d,computed as f,createBlock as fe,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createVNode as g,defineAsyncComponent as pe,guardReactiveProps as me,mergeProps as he,nextTick as ge,normalizeProps as _e,normalizeStyle as _,onMounted as v,openBlock as y,ref as b,renderList as ve,renderSlot as x,toDisplayString as S,toRefs as ye,unref as C,useSlots as w,watch as T}from"vue";var E=/* @__PURE__ */ e({default:()=>P}),D=[`onClick`,`onMouseenter`,`onMouseleave`],O={key:1,class:`vue-ui-sparkbar-datapoint-value`},k=[`xmlns`,`viewBox`],A=[`height`,`width`,`fill`,`rx`],j=[`height`,`width`,`fill`,`rx`],M=[`height`,`width`,`fill`,`rx`],N={key:2,ref:`source`,dir:`auto`},P={__name:`vue-ui-sparkbar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:[`selectDatapoint`],setup(e,{emit:E}){let P=pe(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),{vue_ui_sparkbar:be}=t(),F=l(),I=e,xe=w(),L=b(ee()),R=b(G()),z=f(()=>R.value.style.bar),B=f(()=>R.value.style.labels),V=f(()=>R.value.style),H=f(()=>R.value.debug);v(()=>{xe[`chart-background`]&&H.value&&console.warn(`VueUiSparkbar does not support the #chart-background slot.`)}),ce({config:()=>R.value,dataset:()=>I.dataset,component:`VueUiSparkbar`,rules:[le.noHint]});let Se=f(()=>c({defaultConfig:{style:{backgroundColor:`#99999930`,animation:{show:!1},layout:{independant:!0},gutter:{backgroundColor:`#6A6A6A`,opacity:50},bar:{gradient:{underlayerColor:`#6A6A6A`}}}},userConfig:R.value.skeletonConfig??{}})),{loading:U,FINAL_DATASET:W,manualLoading:Ce}=oe({...ye(I),FINAL_CONFIG:R,prepareConfig:G,skeletonDataset:I.config?.skeletonDataset??[{name:`_`,value:21,target:25,color:`#808080`},{name:`_`,value:13,target:25,color:`#ADADAD`},{name:`_`,value:8,target:25,color:`#DBDBDB`}],skeletonConfig:c({defaultConfig:R.value,userConfig:Se.value})});function G(){return ue(I.config,be,u)}T(()=>I.config,e=>{R.value=G()},{deep:!0});let we=f(()=>re(R.value.customPalette)),K=b(W.value.map(e=>({...e,value:V.value.animation.show?0:e.value||0,formatter:e.formatter||null}))),q=b(null);v(async()=>{ae(I.dataset)&&o({componentName:`VueUiSparkbar`,type:`dataset`,debug:H.value}),J()});function J(){if(V.value.animation.show&&!F.value){let e=V.value.animation.animationFrames,t=W.value.map((t,n)=>t.value/e),n=W.value.map(e=>e.value||0).reduce((e,t)=>e+t,0),r=0;function i(){r+=n/e,r<n?(K.value=K.value.map((e,n)=>({...e,value:e.value+=t[n]})),q.value=requestAnimationFrame(i)):K.value=W.value.map(e=>({...e,value:e.value||0,formatter:e.formatter||null}))}i()}}T(()=>W.value,async e=>{cancelAnimationFrame(q.value),K.value=W.value.map(e=>({...e,value:V.value.animation.show&&!F.value?0:e.value||0,formatter:e.formatter||null})),ge(J)},{deep:!0});let Y=b({width:500,height:16}),Te=f(()=>Math.max(...W.value.map(e=>e.value))),Ee=f(()=>(H.value&&W.value.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{o({componentName:`VueUiSparkbar`,type:`datasetSerieAttribute`,property:e,index:t})})}),K.value.map((e,t)=>({...e,value:e.value||0,color:a(e.color)||we.value[t]||r[t]||r[t%r.length]}))));function X(e){return e/Te.value}function Z(e){return V.value.layout.independant?e.target?e.value/e.target:V.value.layout.percentage?e.value>100?1:e.value/100:V.value.layout.target===0?1:e.value/V.value.layout.target:X(e.value)}function Q(e){return V.value.layout.independant&&e.target||V.value.layout.target}let De=E;function Oe(e,t){De(`selectDatapoint`,{datapoint:e,index:t}),R.value.events.datapointClick&&R.value.events.datapointClick({datapoint:e,seriesIndex:t})}function ke(e,t){R.value.events.datapointEnter&&R.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Ae(e,t){R.value.events.datapointLeave&&R.value.events.datapointLeave({datapoint:e,seriesIndex:t})}let $=f(()=>z.value.borderRadius==null?Y.value.height/2:Math.min(Y.value.height/2,z.value.borderRadius));return(e,t)=>(y(),m(`div`,{class:`vue-data-ui-component vue-ui-sparkbar`,style:_({width:`100%`,position:`relative`,fontFamily:V.value.fontFamily,background:I.backgroundOpacity===null?V.value.backgroundColor:C(i)(V.value.backgroundColor,I.backgroundOpacity)})},[e.$slots.title?x(e.$slots,`title`,_e(me({title:{...e.title,title:V.value.title.text,subtitle:V.value.title.subtitle.text}})),void 0,void 0,0):p(``,!0),!e.$slots.title&&V.value.title.text?(y(),m(`div`,{key:1,class:`vue-ui-sparkbar-title-container`,style:_({background:V.value.title.backgroundColor,margin:V.value.title.margin,textAlign:V.value.title.textAlign})},[h(`div`,{class:`vue-ui-sparkbar-title`,style:_({fontSize:V.value.title.fontSize+`px`,color:V.value.title.color,fontWeight:V.value.title.bold?`bold`:`normal`})},S(V.value.title.text),5),V.value.title.subtitle.text?(y(),m(`div`,{key:0,class:`vue-ui-sparkbar-subtitle`,style:_({fontSize:V.value.title.subtitle.fontSize+`px`,color:V.value.title.subtitle.color,fontWeight:V.value.title.subtitle.bold?`bold`:`normal`})},S(V.value.title.subtitle.text),5)):p(``,!0)],4)):p(``,!0),(y(!0),m(d,null,ve(Ee.value,(t,r)=>(y(),m(`div`,{style:_(`display:flex !important;${[`left`,`right`].includes(B.value.name.position)?`flex-direction: ${B.value.name.position===`right`?`row-reverse`:`row`} !important`:`flex-direction:column !important`};gap:${V.value.gap}px !important;align-items:center;${C(W).length>0&&r!==C(W).length-1?`margin-bottom:6px`:``}`),onClick:e=>Oe(t,r),onMouseenter:e=>ke(t,r),onMouseleave:e=>Ae(t,r)},[C(U)?p(``,!0):x(e.$slots,`data-label`,he({ref_for:!0},{bar:{...t,target:Q(t),valueLabel:C(s)(t.formatter,t.value,C(n)({p:t.prefix||``,v:t.value,s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r}),targetLabel:C(s)(t.formatter,Q(t),C(n)({p:t.prefix||``,v:Q(t),s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})}}),void 0,void 0,0),!e.$slots[`data-label`]||C(U)?(y(),m(`div`,{key:1,style:_({display:`flex`,justifyContent:[`right`,`top-right`].includes(B.value.name.position)?`flex-end`:[`top-center`].includes(B.value.name.position)?`center`:`flex-start`,alignItems:`center`,width:B.value.name.width,color:B.value.name.color,fontSize:B.value.fontSize+`px`,fontWeight:B.value.name.bold?`bold`:`normal`,flexWrap:`wrap`})},[C(U)?(y(),m(`div`,{key:0,class:`vue-ui-sparkbar-skeleton-name`,style:_({width:`60px`,height:B.value.fontSize+`px`,borderRadius:B.value.fontSize/4+`px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:`5px`})},[h(`div`,{style:_({height:`100%`,width:`40px`,borderRadius:B.value.fontSize/4+`px`,backgroundColor:`#6A6A6A80`})},null,4),h(`div`,{style:_({height:`100%`,width:`15px`,borderRadius:B.value.fontSize/4+`px`,backgroundColor:`#6A6A6A80`})},null,4)],4)):(y(),m(d,{key:1},[h(`span`,null,S(t.name),1),B.value.value.show?(y(),m(`span`,{key:0,style:_(`font-weight:${B.value.value.bold?`bold`:`normal`}`),class:`vue-ui-sparkbar-datapoint-name`},`: `+S(C(s)(t.formatter,t.value,C(n)({p:t.prefix||``,v:t.value,s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})),5)):p(``,!0),V.value.layout.showTargetValue?(y(),m(`span`,O,S(` `+V.value.layout.targetValueText)+` `+S(C(s)(t.formatter,Q(t),C(n)({p:t.prefix||``,v:Q(t),s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})),1)):p(``,!0)],64))],4)):p(``,!0),(y(),m(`svg`,{role:`img`,xmlns:C(ne),viewBox:`0 0 ${Y.value.width} ${Y.value.height}`,width:`100%`},[g(C(P)),h(`defs`,null,[g(de,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`sparkbar_gradient_${r}_${L.value}`,stops:[[`0%`,C(i)(C(te)(t.color,.03),100-z.value.gradient.intensity),1],[`100%`,t.color,1]]},null,8,[`id`,`stops`])]),h(`rect`,{height:Y.value.height,width:Y.value.width,x:0,y:0,fill:C(i)(V.value.gutter.backgroundColor,V.value.gutter.opacity),rx:$.value},null,8,A),h(`rect`,{height:Y.value.height,width:Y.value.width*Z(t),x:0,y:0,fill:z.value.gradient.underlayerColor,rx:$.value},null,8,j),h(`rect`,{height:Y.value.height,width:Y.value.width*Z(t),x:0,y:0,fill:z.value.gradient.show?`url(#sparkbar_gradient_${r}_${L.value})`:t.color,rx:$.value},null,8,M)],8,k))],44,D))),256)),e.$slots.source?(y(),m(`div`,N,[x(e.$slots,`source`)],512)):p(``,!0),C(U)?(y(),fe(se,{key:3})):p(``,!0)],4))}};export{E as n,P as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-C3FbHv4N.js";import{$ as n,Jt as r,X as i,Yt as a,at as o,i as s,in as c,t as l,yt as ee,zt as u}from"./lib-rPeBMZrn.js";import{n as d,t as f}from"./BaseScanner-8NdoBs7B.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ie}from"./resolveChartConfig-CIhClE5R.js";import{t as ae}from"./Shape-CRe8woTu.js";import{c as oe}from"./canvas-lib-22VpOI4_.js";import{t as se}from"./useResponsive-CENUxfEL.js";import{t as p}from"./DefGrad-DKMq1REY.js";import{t as ce}from"./A11yDataTable-DWNlWXzs.js";import{t as le}from"./useChartAccessibility-DOMuYJfm.js";import{t as ue}from"./useFitSvgText-C1QC4P5G.js";import{t as de}from"./vue_ui_sparkhistogram-ChwOkoMb.js";import{Fragment as m,computed as h,createBlock as g,createCommentVNode as _,createElementBlock as v,createElementVNode as y,createTextVNode as fe,createVNode as pe,defineAsyncComponent as me,guardReactiveProps as he,nextTick as ge,normalizeClass as _e,normalizeProps as ve,normalizeStyle as b,onMounted as ye,openBlock as x,ref as S,renderList as C,renderSlot as w,toDisplayString as T,toRefs as be,unref as E,useCssVars as xe,watch as Se}from"vue";var D=/* @__PURE__ */ e({default:()=>O}),Ce=[`id`],we={key:0},Te={key:1},Ee={style:{position:`relative`}},De=[`xmlns`,`viewBox`,`aria-describedby`],Oe=[`width`,`height`],ke=[`height`,`width`,`fill`,`x`,`stroke`,`stroke-width`,`rx`,`stroke-dasharray`],Ae={key:1},je=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],Me={key:2},Ne=[`x`,`y`,`font-size`,`font-weight`,`fill`],Pe=[`x`,`y`,`font-size`,`fill`],Fe=[`x`,`y`,`font-size`,`fill`],Ie=[`height`,`width`,`x`,`onMouseover`,`onMouseleave`,`onClick`],Le={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},O=/*#__PURE__*/ re({__name:`vue-ui-sparkhistogram`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`],setup(e,{emit:re}){xe(e=>({v57deebda:Xe.value}));let D=me(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),{vue_ui_sparkhistogram:O}=t(),k=e,A=S(i()),j=S(null),M=S(null),N=S(null),P=S(null),F=S(null),I=S(!1),L=S(null),R=S(`pointer`),z=S(q()),B=h(()=>z.value.style.labels),V=h(()=>z.value.style.bars),H=h(()=>z.value.style);te({config:()=>z.value,dataset:()=>k.dataset,component:`VueUiSparkHistogram`,rules:[ne.singleSeries,{test:e=>e.length>31,message:[`👀 The number of datapoints is > 31. For a more readable chart, consider:`,``,`▶️ Using VueUiXy with a line series`]}]});let Re=h(()=>c({defaultConfig:{style:{animation:{show:!1},backgroundColor:`#99999930`}},userConfig:z.value.skeletonConfig??{}})),{loading:ze,FINAL_DATASET:U,manualLoading:Be}=d({...be(k),FINAL_CONFIG:z,prepareConfig:q,skeletonDataset:k.config?.skeletonDataset??[{value:1,intensity:.2,color:`#CACACA`},{value:2,intensity:.3,color:`#CACACA`},{value:3,intensity:.5,color:`#CACACA`},{value:5,intensity:.7,color:`#CACACA`},{value:8,intensity:.9,color:`#CACACA`},{value:13,intensity:.95,color:`#CACACA`},{value:21,intensity:1,color:`#CACACA`},{value:13,intensity:.95,color:`#CACACA`},{value:8,intensity:.9,color:`#CACACA`},{value:5,intensity:.7,color:`#CACACA`},{value:3,intensity:.5,color:`#CACACA`},{value:2,intensity:.3,color:`#CACACA`},{value:1,intensity:.2,color:`#CACACA`}],skeletonConfig:c({defaultConfig:z.value,userConfig:Re.value})}),W=S(H.value.layout.width),G=S(H.value.layout.height),{svgRef:K}=le({config:H.value.title});function q(){return ie(k.config,O,de)}ye(()=>{He()});let Ve=h(()=>z.value.debug);function He(){if(u(k.dataset)?o({componentName:`VueUiSparkHistogram`,type:`dataset`,debug:Ve.value}):Ve.value&&k.dataset.forEach((e,t)=>{ee({datasetObject:e,requiredAttributes:[`value`]}).forEach(e=>{o({componentName:`VueUiSparkHistogram`,type:`datasetSerieAttribute`,property:e,index:t})})}),z.value.responsive){let e=oe(()=>{let{width:e,height:t}=se({chart:N.value,title:H.value.title.text?M.value:null,source:j.value}),n=B.value.timeLabel.show?B.value.timeLabel.fontSize*2:0,r=B.value.valueLabel.show?B.value.valueLabel.fontSize*2:0;requestAnimationFrame(()=>{W.value=Math.max(10,e),G.value=Math.max(10,t-12-n-r)})});P.value&&(F.value&&P.value.unobserve(F.value),P.value.disconnect()),P.value=new ResizeObserver(e),F.value=N.value.parentNode,P.value.observe(F.value)}}Se(()=>k.config,e=>{z.value=q(),He()},{deep:!0});let J=h(()=>{let e=B.value.timeLabel.show?B.value.timeLabel.fontSize*2:0,t=B.value.valueLabel.show?B.value.valueLabel.fontSize*2:0,n=G.value+e+t,r=W.value,i=H.value.layout.padding.top,a=n-H.value.layout.padding.bottom,o=H.value.layout.padding.left,s=r-H.value.layout.padding.right;return{bottom:a,centerY:i+(n-i-H.value.layout.padding.bottom)/2,drawingHeight:n-H.value.layout.padding.top-H.value.layout.padding.bottom-e-t,drawingWidth:r-H.value.layout.padding.left-H.value.layout.padding.right,height:n,left:o,right:s,top:i,width:r}}),Ue=h(()=>Math.max(...U.value.map(e=>Math.abs(e.value||0))));function We(e){return Math.abs(e)/Ue.value}let Y=h(()=>U.value.map((e,t)=>{let n=We(e.value||0),i=J.value.drawingHeight*n,a=J.value.drawingWidth/U.value.length,o=a*(V.value.gap/100),s=a-o,c=J.value.centerY-i/2,l=J.value.left+(o/2+t*a),ee=J.value.left+t*a,u=e.intensity===void 0?100:Math.round(e.intensity*100),d=e.color?e.color:e.value>=0?r(V.value.colors.positive,u):r(V.value.colors.negative,u),f=e.color?e.color:e.value>=0?V.value.colors.positive:V.value.colors.negative,te=e.color?`url(#gradient_datapoint_${t}_${A.value})`:e.value>=0?`url(#gradient_positive_${t}_${A.value})`:`url(#gradient_negative_${t}_${A.value})`,ne=l+s/2;return{...e,color:d,gradient:te,height:i,intensity:u,proportion:n,stroke:f,textAnchor:ne,trapX:ee,unitWidth:a,width:s,x:l,y:c}}));function Ge(e,t){return s(B.value.value.formatter,e.value,n({p:B.value.value.prefix,v:e.value,s:B.value.value.suffix,r:B.value.value.rounding}),{datapoint:e,seriesIndex:t})}let X=S(null),Ke=re;function Z(e,t){Ke(`selectDatapoint`,{datapoint:e,index:t}),z.value.events.datapointClick&&z.value.events.datapointClick({datapoint:e,seriesIndex:t})}function qe(e,t){R.value=`pointer`,L.value=t,X.value=t,z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Je(e,t){R.value!==`keyboard`&&(X.value=null,L.value=null,z.value.events.datapointLeave&&z.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function Ye(){R.value!==`keyboard`&&(X.value=null,L.value=null)}let Xe=h(()=>`${H.value.animation.speedMs}ms`),Ze=h(()=>J.value.drawingWidth/U.value.length*.9),{fitText:Q}=ue({svgRef:K,unitWidth:Ze});ye(async()=>{await ge(),Q(`.vue-ui-sparkhistogram-top-label`,B.value.value.minFontSize),Q(`.vue-ui-sparkhistogram-bottom-label`,B.value.valueLabel.minFontSize),Q(`.vue-ui-sparkhistogram-time-label`,B.value.timeLabel.minFontSize)}),Se([W,G,()=>U.value],async()=>{await ge(),Q(`.vue-ui-sparkhistogram-top-label`,B.value.value.minFontSize),Q(`.vue-ui-sparkhistogram-bottom-label`,B.value.valueLabel.minFontSize),Q(`.vue-ui-sparkhistogram-time-label`,B.value.timeLabel.minFontSize)});function Qe(){I.value=!0}function $e(){I.value=!1,L.value=null,R.value=`pointer`,X.value=null}function et(e){if(!K.value||document.activeElement!==K.value||!Y.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){L.value=null,X.value=null,R.value=`pointer`;return}if(r){if(X.value===null)return;let e=Y.value[X.value];if(!e)return;Z(e,X.value);return}R.value=`keyboard`;let a=L.value;a===null||a<0||a>=Y.value.length?a=n?0:Y.value.length-1:n?(a+=1,a>=Y.value.length&&(a=0)):t&&(--a,a<0&&(a=Y.value.length-1)),L.value=a,X.value=a;let o=Y.value[a];z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:o,seriesIndex:a})}let $=h(()=>({headers:[z.value.a11y?.translations?.series??`Series`,z.value.a11y?.translations?.time??`Time`,z.value.a11y?.translations?.value??`Value`,z.value.a11y?.translations?.valueLabel??`Label`],rows:Y.value.map((e,t)=>[t+1,e.timeLabel??``,e.value??``,e.valueLabel??``])}));return(e,t)=>(x(),v(`div`,{class:`vue-data-ui-component vue-ui-spark-histogram`,ref_key:`histogramChart`,ref:N,style:b(`width:100%;background:${H.value.backgroundColor};font-family:${H.value.fontFamily}`),onMouseleave:Ye},[y(`div`,{id:`chart-instructions-${A.value}`,class:`sr-only`},[y(`p`,null,T(z.value.a11y.translations.keyboardNavigation),1)],8,Ce),$.value?.rows?.length?(x(),g(ce,{key:0,uid:A.value,head:$.value.headers,body:$.value.rows,notice:z.value.a11y.translations.tableAvailable,caption:z.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):_(``,!0),H.value.title.text?(x(),v(`div`,{key:1,ref_key:`chartTitle`,ref:M,style:b(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${H.value.title.margin};padding: 0 6px;text-align:${H.value.title.textAlign}`)},[y(`div`,{style:b(`font-size:${H.value.title.fontSize}px;color:${H.value.title.color};font-weight:${H.value.title.bold?`bold`:`normal`}`)},[fe(T(H.value.title.text)+` `,1),X.value===null?_(``,!0):(x(),v(`span`,we,`- `+T(Y.value[X.value].timeLabel||``)+` `+T(E(s)(B.value.value.formatter,Y.value[X.value].value,E(n)({p:B.value.value.prefix,v:Y.value[X.value].value,s:B.value.value.suffix,r:B.value.value.rounding}),{datapoint:Y.value[X.value],seriesIndex:X.value})),1)),![void 0,null].includes(X.value)&&![null,void 0].includes(Y.value[X.value].valueLabel)?(x(),v(`span`,Te,T(` (${Y.value[X.value].valueLabel||0})`),1)):_(``,!0)],4),H.value.title.subtitle.text?(x(),v(`div`,{key:0,style:b(`font-size:${H.value.title.subtitle.fontSize}px;color:${H.value.title.subtitle.color};font-weight:${H.value.title.subtitle.bold?`bold`:`normal`}`)},T(H.value.title.subtitle.text),5)):_(``,!0)],4)):_(``,!0),y(`div`,Ee,[(x(),v(`svg`,{ref_key:`svgRef`,ref:K,xmlns:E(l),viewBox:`0 0 ${J.value.width} ${J.value.height}`,style:{overflow:`visible`},"aria-describedby":`chart-instructions-${A.value}`,tabindex:`0`,onFocus:Qe,onBlur:$e,onKeydown:et},[pe(E(D)),e.$slots[`chart-background`]?(x(),v(`foreignObject`,{key:0,x:0,y:0,width:J.value.width,height:J.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,Oe)):_(``,!0),y(`defs`,null,[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(p,{t:`radial`,id:`gradient_positive_${t}_${A.value}`,key:`gradient_positive_${t}_${A.value}`,cy:`50%`,cx:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(r)(E(a)(V.value.colors.positive,.05),e.intensity),1],[`100%`,E(r)(V.value.colors.positive,e.intensity),1]]},null,8,[`id`,`stops`]))),128)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(p,{t:`radial`,id:`gradient_negative_${t}_${A.value}`,key:`gradient_negative_${t}_${A.value}`,cy:`50%`,cx:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(r)(E(a)(V.value.colors.negative,.05),e.intensity),1],[`100%`,E(r)(V.value.colors.negative,e.intensity),1]]},null,8,[`id`,`stops`]))),128)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(p,{t:`radial`,id:`gradient_datapoint_${t}_${A.value}`,key:`gradient_datapoint_${t}_${A.value}`,cy:`50%`,cx:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(r)(E(a)(e.color,.05),e.intensity),1],[`100%`,E(r)(e.color,e.intensity),1]]},null,8,[`id`,`stops`]))),128))]),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[X.value!==null&&X.value===t?(x(),v(`rect`,{key:0,height:J.value.height,width:e.unitWidth,fill:H.value.selector.fill,x:e.trapX,y:0,stroke:H.value.selector.stroke,"stroke-width":H.value.selector.strokeWidth,rx:H.value.selector.borderRadius,"stroke-dasharray":H.value.selector.strokeDasharray},null,8,ke)):_(``,!0)]))),256)),!V.value.shape||V.value.shape===`square`?(x(),v(`g`,Ae,[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`rect`,{x:e.x,y:e.y,height:e.height,width:e.width,fill:V.value.colors.gradient.show?e.gradient:e.color,stroke:e.stroke,"stroke-width":V.value.strokeWidth,rx:`${V.value.borderRadius*e.proportion/12}%`,class:_e({"vue-ui-sparkhistogram-shape":H.value.animation.show})},null,10,je))),256))])):(x(),v(`g`,Me,[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(ae,{plot:{x:e.x+e.width/2,y:e.y+e.height/2},color:V.value.colors.gradient.show?e.gradient:e.color,shape:V.value.shape,radius:Math.min(e.height*.4,e.width*.4),class:_e({"vue-ui-sparkhistogram-shape":H.value.animation.show})},null,8,[`plot`,`color`,`shape`,`radius`,`class`]))),256))])),E(ze)?_(``,!0):(x(),v(m,{key:3},[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[B.value.value.show?(x(),v(`text`,{key:0,class:`vue-ui-sparkhistogram-top-label`,"text-anchor":`middle`,x:e.textAnchor,y:e.y-B.value.value.fontSize/3+B.value.value.offsetY,"font-size":B.value.value.fontSize,"font-weight":B.value.value.bold?`bold`:`normal`,fill:B.value.value.color},T(Ge(e,t)),9,Ne)):_(``,!0)]))),256)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[e.valueLabel&&B.value.valueLabel.show?(x(),v(`text`,{key:0,class:`vue-ui-sparkhistogram-bottom-label`,x:e.textAnchor,y:e.y+e.height+B.value.valueLabel.fontSize,"font-size":B.value.valueLabel.fontSize,"text-anchor":`middle`,fill:B.value.valueLabel.color},T(e.valueLabel),9,Pe)):_(``,!0)]))),256)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[e.timeLabel&&B.value.timeLabel.show?(x(),v(`text`,{key:0,class:`vue-ui-sparkhistogram-time-label`,x:e.textAnchor,y:J.value.height,"font-size":B.value.timeLabel.fontSize,fill:B.value.timeLabel.color,"text-anchor":`middle`},T(e.timeLabel),9,Fe)):_(``,!0)]))),256))],64)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[y(`rect`,{height:J.value.height,width:e.unitWidth,fill:`transparent`,x:e.trapX,y:0,onMouseover:n=>qe(e,t),onMouseleave:n=>Je(e,t),onClick:()=>Z(e,t)},null,40,Ie)]))),256))],40,De)),e.$slots.hint?(x(),v(`div`,Le,[w(e.$slots,`hint`,ve(he({hint:z.value.a11y.translations.keyboardNavigation,isVisible:I.value})),void 0,!0)])):_(``,!0)]),e.$slots.source?(x(),v(`div`,{key:2,ref_key:`source`,ref:j,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):_(``,!0),w(e.$slots,`skeleton`,{},()=>[E(ze)?(x(),g(f,{key:0})):_(``,!0)],!0)],36))}},[[`__scopeId`,`data-v-e5a32af0`]]);export{D as n,O as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-C3FbHv4N.js";import{$ as n,A as r,Et as i,G as a,I as o,Jt as s,K as c,L as l,N as u,Nt as d,P as f,R as p,S as ee,U as te,W as ne,X as re,Yt as ie,at as ae,d as oe,dt as se,i as ce,in as le,k as ue,lt as de,m as fe,qt as pe,t as me,yt as he,zt as m}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./useNestedProp-DnGoh-XS.js";import{t as Se}from"./useThemeCheck-BKNRbGeC.js";import{t as Ce}from"./useTimeLabels-Das5O74F.js";import{c as we}from"./canvas-lib-22VpOI4_.js";import{t as Te}from"./useResponsive-CENUxfEL.js";import{t as Ee}from"./DefGrad-DKMq1REY.js";import{t as De}from"./A11yDataTable-DWNlWXzs.js";import{t as Oe}from"./useChartAccessibility-DOMuYJfm.js";import{t as ke}from"./usePrefersMotion-XLHwega2.js";import{t as Ae}from"./vue_ui_sparkline-CvL_e9L8.js";import{Fragment as h,computed as g,createBlock as je,createCommentVNode as _,createElementBlock as v,createElementVNode as y,createTextVNode as Me,createVNode as Ne,defineAsyncComponent as Pe,guardReactiveProps as Fe,nextTick as b,normalizeClass as Ie,normalizeProps as Le,normalizeStyle as Re,onBeforeUnmount as ze,onMounted as Be,openBlock as x,ref as S,renderList as C,renderSlot as Ve,shallowRef as He,toDisplayString as Ue,toRefs as We,unref as w,watch as T,watchEffect as Ge,withCtx as Ke}from"vue";var qe={key:0,style:{"pointer-events":`none`}},Je=[`r`,`fill`,`filter`],Ye=[`begin`,`dur`,`repeatCount`,`fill`,`calcMode`,`keySplines`,`keyTimes`,`keyPoints`],Xe=[`href`],Ze=[`dur`,`repeatCount`,`fill`,`values`],Qe=[`r`,`fill`],$e=[`begin`,`dur`,`repeatCount`,`calcMode`,`keySplines`,`keyTimes`,`keyPoints`],E=[`href`],et=[`dur`,`repeatCount`],tt={__name:`SparklinePulse`,props:{uid:{type:String,required:!0},svgRef:{type:Object,default:null},pulsePathId:{type:String,required:!0},pulsePathLength:{type:Number,required:!0},pulseDur:{type:String,required:!0},pulseBegin:{type:String,required:!0},pulseRepeatCount:{type:String,required:!0},pulseFillMode:{type:String,default:void 0},pulseKeyPoints:{type:String,required:!0},pulseMotion:{type:Object,required:!0},pulse:{type:Object,required:!0},pulseTrail:{type:Object,required:!0},pulseTrailLength:{type:Number,required:!0},prefersReducedMotion:{type:Boolean,required:!0},loading:{type:Boolean,required:!0},isBar:{type:Boolean,required:!0}},setup(e){let t=e,n=g(()=>Math.min(t.pulseTrailLength,45)),r=g(()=>!!t.pulse?.show&&!t.isBar&&!t.prefersReducedMotion&&!t.loading&&Number(t.pulsePathLength)>0);function i(){let e=t.svgRef?.value;e&&(typeof e.pauseAnimations==`function`&&e.pauseAnimations(),typeof e.setCurrentTime==`function`&&e.setCurrentTime(0),typeof e.unpauseAnimations==`function`&&e.unpauseAnimations())}function a(e,t){if(typeof e!=`string`)return e;let n=e.trim().match(/^([\d.]+)\s*(ms|s)$/);if(!n)return e;let r=Number(n[1]),i=n[2];return Number.isNaN(r)?e:`${r+t}${i}`}function o(e){return(n.value-e)/n.value*t.pulse.radius}function s(e){let r=t.pulse.trail.opacity,i=(n.value-e)/n.value,a=e===0?1:i*r;return`0;${a};${a};0`}return T(()=>t.loading,async e=>{e||await b(),i()}),T(()=>t.pulsePathId,async()=>{await b(),i()}),ze(()=>{i()}),(t,i)=>r.value?(x(),v(`g`,qe,[(x(!0),v(h,null,C(n.value,(t,n)=>(x(),v(h,null,[n%3==0?(x(),v(`circle`,{key:`sparkline_dot_${n}_${e.pulsePathId}`,r:o(n),fill:e.pulse.color,filter:`url(#sparkline_pulse_glow_${e.uid})`,opacity:`0`},[y(`animateMotion`,{begin:a(e.pulseBegin,n*10),dur:e.pulseDur,repeatCount:e.pulseRepeatCount,fill:e.pulseFillMode,calcMode:e.pulseMotion.calcMode,keySplines:e.pulseMotion.keySplines||void 0,keyTimes:e.pulseMotion.keyTimes||void 0,keyPoints:e.pulseKeyPoints,rotate:`auto`},[y(`mpath`,{href:`#${e.pulsePathId}`},null,8,Xe)],8,Ye),y(`animate`,{attributeName:`opacity`,dur:e.pulseDur,repeatCount:e.pulseRepeatCount,fill:e.pulseFillMode,values:s(n),keyTimes:`0;0.1;0.9;1`},null,8,Ze)],8,Je)):_(``,!0)],64))),256)),(x(),v(`circle`,{key:`sparkline_halo_${e.pulsePathId}`,r:Math.max(e.pulse.radius*1.3),fill:e.pulse.color,opacity:`0`},[y(`animateMotion`,{begin:e.pulseBegin,dur:e.pulseDur,repeatCount:e.pulseRepeatCount,calcMode:e.pulseMotion.calcMode,keySplines:e.pulseMotion.keySplines||void 0,keyTimes:e.pulseMotion.keyTimes||void 0,keyPoints:e.pulseKeyPoints,rotate:`auto`},[y(`mpath`,{href:`#${e.pulsePathId}`},null,8,E)],8,$e),y(`animate`,{attributeName:`opacity`,values:`0;0.35;0.35;0`,keyTimes:`0;0.15;0.85;1`,dur:e.pulseDur,repeatCount:e.pulseRepeatCount},null,8,et)],8,Qe))])):_(``,!0)}},D={canvas:null,ctx:null};function nt(){if(typeof document>`u`)throw Error(`color-utils: document is not available (browser-only).`);if(!D.canvas){let e=document.createElement(`canvas`);e.width=1,e.height=1;let t=e.getContext(`2d`,{willReadFrequently:!0});if(!t)throw Error(`color-utils: unable to get 2D canvas context.`);D.canvas=e,D.ctx=t}return D.ctx}function rt(e){return e<0?0:e>255?255:Math.round(e)}function it(e){return e<0?0:e>1?1:e}function O(e,t=null){if(typeof e!=`string`||e.trim().length===0)throw Error(`colorToRgba: inputColor must be a non-empty string.`);let n=e.trim();if(n.toLowerCase()===`transparent`)return{red:0,green:0,blue:0,alpha:0};let r=A(n,t),i=nt();i.clearRect(0,0,1,1),i.fillStyle=`#000`;let a=i.fillStyle;if(i.fillStyle=r,i.fillStyle===a&&!j(r))throw Error(`colorToRgba: unsupported or invalid color "${e}".`);i.fillRect(0,0,1,1);let o=i.getImageData(0,0,1,1).data;return{red:o[0],green:o[1],blue:o[2],alpha:o[3]/255}}function k(e,t=null){if(!Array.isArray(e)||e.length===0)throw Error(`colorsToRgba: colors must be a non-empty array.`);let n=Array(e.length);for(let r=0;r<e.length;r+=1)n[r]=O(e[r],t);return n}function A(e,t=null){return e!==`currentColor`||typeof window>`u`||!t?e:window.getComputedStyle(t).color||e}function j(e){let t=e.trim().toLowerCase();return t===`black`||t===`#000`||t===`#000000`||t===`rgb(0, 0, 0)`||t===`rgba(0, 0, 0, 1)`||t===`rgba(0, 0, 0, 0)`}function M(e){let t=it(e/255);return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function N(e){let t=it(e),n;return n=t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055,rt(n*255)}function at(e,t,n,r){let i=it(n);if(r===`linearRGB`){let n=M(e.red),r=M(e.green),a=M(e.blue),o=M(t.red),s=M(t.green),c=M(t.blue),l=n+(o-n)*i,u=r+(s-r)*i,d=a+(c-a)*i;return{red:N(l),green:N(u),blue:N(d),alpha:e.alpha+(t.alpha-e.alpha)*i}}return{red:e.red+(t.red-e.red)*i,green:e.green+(t.green-e.green)*i,blue:e.blue+(t.blue-e.blue)*i,alpha:e.alpha+(t.alpha-e.alpha)*i}}function P(e,t,n){let r=e;return r<t&&(r=t),r>n&&(r=n),r}function F(e,t){let n=10**t;return Math.round(e*n)/n}function I(e){return Number.isFinite(e)?e.toString():`0`}function L(e){let t=P(e,0,255).toString(16);return t.length===1?`0`+t:t}function R(e){if(typeof e!=`string`)return;let t=Number.parseFloat(e);return Number.isFinite(t)?t:void 0}function ot(e,t,n,r=!0){let i=n-t;if(i===0)return 0;let a=(e-t)/i;return r?P(a,0,1):a}var st=`http://www.w3.org/2000/svg`;function z(e){if(typeof document>`u`)throw Error(`SvgPathGradientAsync: document is not available (browser-only implementation).`);let t=document.createElementNS(st,`svg`);t.setAttribute(`width`,`0`),t.setAttribute(`height`,`0`),t.setAttribute(`viewBox`,`0 0 0 0`),t.style.position=`absolute`,t.style.left=`-10000px`,t.style.top=`-10000px`,t.style.visibility=`hidden`,t.style.pointerEvents=`none`;let n=document.createElementNS(st,`path`);return e===`M `&&(e=`M 0,0`),n.setAttribute(`d`,e),t.appendChild(n),document.body.appendChild(t),{svgElement:t,pathElement:n}}function B(e){if(e)try{e.svgElement?.remove?.()}catch{}}function ct(e,t,n){if(typeof n==`number`&&n>0)return n;let r=t*.75;r<.5&&(r=.5),r>8&&(r=8);let i=e/2;return r>i&&i>0&&(r=i),r<=0&&(r=1),r}function V(e,t,n){if(typeof t==`number`&&t>=1)return Math.floor(t);let r=Math.ceil(e/(typeof n==`number`&&n>0?n:2));return r<1?1:r}function lt(e,t,n,r,i,a){let o=n-t,s=Math.ceil(o/r)+1;s<2&&(s=2),s>a&&(s=a);let c=s>1?o/(s-1):0,l=e.getPointAtLength(t),u=`M ${I(F(l.x,i))} ${I(F(l.y,i))}`;for(let n=1;n<s;n+=1){let r=t+n*c,a=e.getPointAtLength(r);u+=` L ${I(F(a.x,i))} ${I(F(a.y,i))}`}return u}function H(e,t,n,r,i,a){let o=n-t,s=Math.ceil(o/r)+1;s<2&&(s=2),s>a&&(s=a);let c=s>1?o/(s-1):0,l=e.getPointAtLength(t),u=l.x,d=l.x,f=l.y,p=l.y,ee=`M ${I(F(l.x,i))} ${I(F(l.y,i))}`;for(let n=1;n<s;n+=1){let r=t+n*c,a=e.getPointAtLength(r);a.x<u&&(u=a.x),a.x>d&&(d=a.x),a.y<f&&(f=a.y),a.y>p&&(p=a.y),ee+=` L ${I(F(a.x,i))} ${I(F(a.y,i))}`}return{pathData:ee,bounds:{minX:u,maxX:d,minY:f,maxY:p}}}function ut(e){if(e.length===1)return[{position:0,rgba:e[0]}];let t=Array(e.length),n=e.length-1;for(let r=0;r<e.length;r+=1)t[r]={position:r/n,rgba:e[r]};return t}function dt(e,t,n,r){let i=P(t,0,1),a=r;for(a<0&&(a=0),a>e.length-2&&(a=e.length-2);a>0&&i<e[a].position;)--a;for(;a<e.length-2&&i>e[a+1].position;)a+=1;let o=e[a],s=e[a+1],c=s.position-o.position,l=c>0?(i-o.position)/c:0;return ht(ft(o.rgba,s.rgba,l,n))}function ft(e,t,n,r){let i=P(n,0,1);if(r===`linearRGB`){let n=pt(e.red),r=pt(e.green),a=pt(e.blue),o=pt(t.red),s=pt(t.green),c=pt(t.blue),l=n+(o-n)*i,u=r+(s-r)*i,d=a+(c-a)*i;return{red:mt(l),green:mt(u),blue:mt(d),alpha:e.alpha+(t.alpha-e.alpha)*i}}return{red:e.red+(t.red-e.red)*i,green:e.green+(t.green-e.green)*i,blue:e.blue+(t.blue-e.blue)*i,alpha:e.alpha+(t.alpha-e.alpha)*i}}function pt(e){let t=P(e/255,0,1);return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function mt(e){let t=P(e,0,1),n;return n=t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055,P(Math.round(n*255),0,255)}function ht(e){let t=P(e.alpha,0,1),n=P(Math.round(e.red),0,255),r=P(Math.round(e.green),0,255),i=P(Math.round(e.blue),0,255);return t>=1?`#${L(n)}${L(r)}${L(i)}`:`rgba(${n}, ${r}, ${i}, ${F(t,4).toString()})`}function gt(e){let t=`fill="${U(e.fill??`none`)}"`,n=Object.keys(e);for(let r=0;r<n.length;r+=1){let i=n[r];if(i===`stroke`||i===`d`)continue;let a=e[i];t+=` ${i}="${U(a)}"`}return t}function _t(e,t,n){return`<path d="${U(e)}" stroke="${U(t)}" ${n} />`}function vt(e){let t=[],n=e.segmentAttributeMap.fill??`none`;t.push(`fill="${U(n)}"`),t.push(`stroke="${U(e.stroke)}"`);for(let n of Object.keys(e.segmentAttributeMap)){if(n===`stroke`||n===`d`)continue;let r=e.segmentAttributeMap[n];t.push(`${n}="${U(r)}"`)}return`<path d="${U(e.pathData)}" ${t.join(` `)} />`}function yt(e,t){let n=[];for(let e of Object.keys(t))n.push(`${e}="${U(t[e])}"`);return`<g data-svg-path-gradient="true"${n.length?` `+n.join(` `):``}>${e.join(``)}</g>`}function U(e){return String(e).replaceAll(`&`,`&amp;`).replaceAll(`"`,`&quot;`).replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`)}function bt(e,t=null,n={}){return new Promise((r,i)=>{let a=null;try{if(!e||typeof e!=`string`)throw Error(`SvgPathGradientAsync: pathData must be a non-empty string.`);let i=n.temperatureMode??null;if(i===null&&(!Array.isArray(t)||t.length===0))throw Error(`SvgPathGradientAsync: colors must be a non-empty array when temperatureMode is not enabled.`);if((n.returnMode??`string`)!==`string`)throw Error(`SvgPathGradientAsync: only returnMode="string" is supported for the async version.`);let o=typeof n.decimalPlaces==`number`?n.decimalPlaces:3,s=typeof n.flattenTolerance==`number`&&n.flattenTolerance>0?n.flattenTolerance:.25,c=n.attrs?{...n.attrs}:{},l=n.groupAttrs?{...n.groupAttrs}:{},u=R(c[`stroke-width`]),d=typeof n.strokeWidth==`number`&&n.strokeWidth>0?n.strokeWidth:typeof u==`number`&&u>0?u:1;a=z(e);let f=a.pathElement,p=f.getTotalLength(),ee=i===null?k(t,n.colorReferenceElement):[];if(i===null&&(!(p>0)||ee.length===1)){let t=yt([vt({pathData:e,stroke:ht(ee[0]),segmentAttributeMap:c})],l);B(a),r(t);return}let te=n.colorSpace??`linearRGB`;if(i!==null){let e=n.temperatureColors;if(!Array.isArray(e)||e.length!==2)throw Error(`SvgPathGradientAsync: temperatureColors must be a tuple of exactly 2 colors when temperatureMode is enabled.`)}let ne=i===null?null:k(n.temperatureColors,n.colorReferenceElement),re=i===null?(()=>{let e=ut(ee),t=Array(e.length);for(let n=0;n<e.length;n+=1)t[n]={position:e[n].position,rgba:e[n].rgba};return t})():[],ie=ct(p,d,n.maxSegmentLength),ae=V(p,n.segments,ie),oe=p/ae,se=typeof n.overlap==`number`&&n.overlap>=0?n.overlap:d*.5,ce=oe*.45;se>ce&&(se=ce);let le=typeof n.samplePointLimitPerSegment==`number`&&n.samplePointLimitPerSegment>10?n.samplePointLimitPerSegment:250,ue=gt(c),de=[],fe=i===null?null:[],pe=i===null?null:[],me=0,he=i===null?re.length-2:0,m=0,ge=()=>{let e=performance.now(),t=typeof n.frameBudgetMs==`number`?n.frameBudgetMs:8;for(;m<ae&&performance.now()-e<t;){let e=m*oe,t=(m+1)*oe,n=e,r=t;if(m!==0&&(n=e-se),m!==ae-1&&(r=t+se),n=P(n,0,p),r=P(r,0,p),r>n){if(i!==null){let e=H(f,n,r,s,o,le);fe.push(e.pathData),pe.push(e.bounds)}else{let e=(n+r)*.5/p;for(;me<he&&e>re[me+1].position;)me+=1;let t=dt(re,e,te,me),i=lt(f,n,r,s,o,le);de.push(_t(i,t,ue))}}m+=1}if(m<ae){requestAnimationFrame(ge);return}if(i!==null){let e=1/0,t=-1/0;for(let n=0;n<pe.length;n+=1){let r=pe[n],a=i===`vertical`?r.minY:r.minX,o=i===`vertical`?r.maxY:r.maxX;a<e&&(e=a),o>t&&(t=o)}let n=ne[0],r=ne[1];de.length=0;for(let a=0;a<pe.length;a+=1){let o=pe[a],s=ot(((i===`vertical`?o.minY:o.minX)+(i===`vertical`?o.maxY:o.maxX))*.5,e,t,!0),c=ht(i===`vertical`?at(n,r,s,te):at(r,n,s,te)),l=fe[a];de.push(_t(l,c,ue))}}let c=yt(de,l);B(a),r(c)};requestAnimationFrame(ge)}catch(e){B(a),i(e)}})}var W=[`innerHTML`],xt={__name:`SparklineGradientPath`,props:{svgPathData:{type:String,required:!0},enabled:{type:Boolean,required:!0},strokeWidth:{type:Number,required:!0},highColor:{type:String,required:!0},lowColor:{type:String,required:!0},segments:{type:Number,required:!0}},setup(e){let t=e,n=S(``),r=0;return T(()=>[t.enabled,t.svgPathData,t.strokeWidth,t.highColor,t.lowColor,t.segments],async([e])=>{let i=++r;if(!e){n.value=``;return}let a=await bt(t.svgPathData,null,{segments:t.segments,temperatureMode:`vertical`,temperatureColors:[t.highColor,t.lowColor],attrs:{"stroke-width":t.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},groupAttrs:{class:`vue-ui-sparkline-gradient`}});i===r&&(n.value=a)},{immediate:!0}),(e,t)=>(x(),v(`g`,{innerHTML:n.value},null,8,W))}},St=/* @__PURE__ */ e({default:()=>G}),Ct=[`id`],wt=[`id`],Tt={style:{position:`relative`}},Et=[`xmlns`,`viewBox`,`aria-describedby`],Dt=[`width`,`height`],Ot=[`id`],kt=[`id`,`y1`,`y2`],At=[`stop-color`,`offset`],jt=[`id`],Mt=[`x`,`y`,`width`,`height`],Nt=[`clip-path`],Pt={key:0},Ft=[`data-cy`,`d`,`fill`],It=[`id`,`d`,`stroke-width`],Lt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Rt=[`d`,`stroke`,`stroke-width`],zt=[`id`,`d`,`stroke-width`],Bt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Vt=[`d`,`stroke`,`stroke-width`],Ht=[`x`,`y`,`width`,`height`,`fill`,`rx`],Ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Wt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Gt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Kt=[`x`,`y`,`font-size`,`font-weight`,`fill`],qt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Jt=[`x`,`y`,`height`,`width`,`onMouseenter`,`onMouseleave`,`onClick`],Yt=[`title`,`aria-label`],Xt={viewBox:`0 0 24 24`,width:`13`,height:`13`,"aria-hidden":`true`,focusable:`false`},Zt=[`stroke`],Qt={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},$t=280,G=/*#__PURE__*/ be({__name:`vue-ui-sparkline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0},heightRatio:{type:Number,default:1},forcedPadding:{type:Number,default:30},zoomState:{type:Object,default:null}},emits:[`hoverIndex`,`selectDatapoint`,`zoom`,`zoomReset`,`update:zoomState`],setup(e,{expose:be,emit:qe}){let Je=Pe(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),Ye=Pe(()=>import(`./SparkTooltip-Ch06CV71.js`)),{vue_ui_sparkline:Xe}=t(),{isThemeValid:Ze,warnInvalidTheme:Qe}=Se(),$e=ke(),E=e,et=g(()=>Array.isArray(E.dataset)&&E.dataset.length>0),D=S(re()),nt=S(null),rt=S(null),it=S(null),O=S(null),k=S(null),A=S(void 0),j=S(void 0),M=S(lt()),N=g(()=>M.value.style.tooltip),at=g(()=>M.value.style.bar),P=g(()=>M.value.style.line),F=g(()=>M.value.style.area),I=g(()=>M.value.style.dataLabel),L=g(()=>M.value.style),R=g(()=>M.value.style.zoom);ve({config:()=>M.value,dataset:()=>E.dataset,component:`VueUiSparkline`,rules:[ye.emptyArray,{test:e=>e.length>500,message:[`👀 The dataset has > 500 datapoints. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values`]},{test:e=>e.length>1095,message:[`👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});function ot(e){return E.config?.skeletonDataset&&Array.isArray(E.config.skeletonDataset)?E.config.skeletonDataset.map(e=>({period:`-`,value:e})):de(e).map(e=>({period:`-`,value:e}))}let st=g(()=>le({defaultConfig:{gradientPath:{show:!1},temperatureColors:{show:!1},style:{backgroundColor:`#99999930`,scaleMin:0,scaleMax:null,animation:{show:!1},line:{color:`#AAAAAA`,pulse:{show:!1},dashIndices:[]},bar:{color:`#AAAAAA`},area:{color:`#CACACA`},zeroLine:{color:`#6A6A6A`},dataLabel:{show:!1},tooltip:{show:!1}}},userConfig:M.value.skeletonConfig??{}})),{loading:z,FINAL_DATASET:B,manualLoading:ct}=ge({...We(E),FINAL_CONFIG:M,prepareConfig:lt,callback:()=>{Promise.resolve().then(async()=>{await b(),En()})},skeletonDataset:ot(12),skeletonConfig:le({defaultConfig:M.value,userConfig:st.value})}),{svgRef:V}=Oe({config:L.value.title});function lt(){let e=xe({userConfig:E.config,defaultConfig:Xe}),t={},n=e.theme;if(n){if(!Ze.value(e))Qe(e),t=e;else{let r=xe({userConfig:Ae[n]||E.config,defaultConfig:e});t={...xe({userConfig:E.config,defaultConfig:r})}}}else t=e;return t}let H=g(()=>M.value?.style?.line.pulse||{}),ut=g(()=>`${Math.max(200,Number(H.value.durationMs)||4e3)/1e3}s`),dt=S(0),ft=g(()=>H.value?.begin||`0ms`),pt=S(`0;1`),mt=g(()=>H.value?.loop===!1?`1`:`indefinite`),ht=g(()=>H.value?.loop===!1?`freeze`:void 0),gt=g(()=>H.value.trail.show&&U.value.lengthPx||1),_t=g(()=>!!H.value?.show&&!Z.value&&!$e.value&&!z.value&&(X.value?.length||0)>1);function vt(){if(!_t.value){dt.value=0;return}let e=V.value;if(!e)return;let t=`#${On.value}`,n=e.querySelector?.(t);if(n&&typeof n.getTotalLength==`function`){let e=n.getTotalLength();Number.isFinite(e)&&e>0&&(dt.value=e)}else requestAnimationFrame(()=>{let n=e.querySelector?.(t);if(n&&typeof n.getTotalLength==`function`){let e=n.getTotalLength();Number.isFinite(e)&&e>0&&(dt.value=e)}})}let yt=g(()=>{let e=H.value?.easing||`ease-in-out`,t={ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]};return e===`linear`?{calcMode:`linear`,keySplines:null,keyTimes:`0;1`}:e===`steps`?{calcMode:`discrete`,keySplines:null,keyTimes:`0;1`}:{calcMode:`spline`,keySplines:(e===`cubic-bezier`?Array.isArray(H.value?.cubicBezier)&&H.value.cubicBezier.length===4?H.value.cubicBezier:[.4,0,.2,1]:t[e]||t[`ease-in-out`]).join(` `),keyTimes:`0;1`}}),U=g(()=>{let e=H.value?.trail||{},t=P.value.strokeWidth||1;return{show:e.show!==!1,lengthPx:e.length,width:Math.max(1,Number(e.strokeWidth)||t*2.2),opacity:Math.min(1,Math.max(0,Number(e.opacity)??.6)),fadeIn:.5,fadeOut:.2}}),bt=S({start:0,end:null}),W=S(!1),St=S(!1),G=S(!1),en=S(`matrix(1, 0, 0, 1, 0, 0)`),tn=S(!1),nn=0,rn=0,an=0,on=0,sn=S(null),cn=S(null),ln=S(!1),un=S({time:0,x:0,y:0,pointerType:null}),dn=g(()=>{let e=B.value.length;if(!e)return{start:0,end:-1};let t=Math.min(Math.max(0,bt.value.start||0),e-1);return{start:t,end:Math.min(Math.max(t,bt.value.end==null?e-1:bt.value.end),e-1)}}),fn=g(()=>{let e=B.value.length;return e?dn.value.start>0||dn.value.end<e-1:!1}),pn=g(()=>{let{start:e,end:t}=dn.value;return t<e?[]:B.value.slice(e,t+1).map((t,n)=>({...t,__sourceIndex:e+n}))}),mn=g(()=>d({data:pn.value,threshold:M.value.downsample.threshold}));g(()=>{if(!M.value.temperatureColors.show)return!1;let e=pn.value.map(({value:e})=>e).filter(e=>Number.isFinite(e));return new Set(e).size<=1}),T(()=>E.config,e=>{z.value||(M.value=lt()),Mn(),q.value.chartWidth=L.value.chartWidth},{deep:!0}),T(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(ct.value=!1),Xn(),Wn(),un.value={time:0,x:0,y:0,pointerType:null},bt.value={start:0,end:null},Yn(),K.value=d({data:pn.value.map(e=>({...e,value:[void 0].includes(e.value)?null:e.value})),threshold:M.value.downsample.threshold});let t=Nn();J(`update:zoomState`,t),J(`zoomReset`,t)},{deep:!0});let K=S(hn());function hn(){return d({data:pn.value.map(e=>L.value.animation.show&&B.value.length>1?{...e,value:null}:{...e,value:[void 0].includes(e.value)?null:e.value}),threshold:M.value.downsample.threshold})}let gn=He(null),_n=He(null),vn=S(!1),yn=S(0),bn=S([]),xn=S(``),Sn=!1,Cn=g(()=>{let e=(mn.value||[]).map(e=>`${e.period}::${Number.isFinite(e.value)?e.value:0}`).join(`|`),t=M.value?.style?.animation||{},n=!!M.value?.gradientPath?.show&&!M.value.temperatureColors.show;return`${e}#${!!t.show}#${t.animationFrames||0}#${n}`});function wn(){Sn=!0,Tn()}function Tn(){yn.value&&=(cancelAnimationFrame(yn.value),0),bn.value.forEach(e=>clearTimeout(e)),bn.value=[],vn.value=!1}function En(){let e=M.value?.style?.animation||{},t=mn.value||[],n=Cn.value,r=!!M.value.gradientPath.show&&!M.value.temperatureColors.show;if(n&&n===xn.value&&(vn.value||K.value.length===t.length))return;if(Tn(),r||!e.show||z.value||t.length<=1||$e.value){K.value=t,xn.value=n;return}vn.value=!0,xn.value=n,K.value=[];let i=Math.max(1,Number(e.animationFrames)||1),a=Math.max(1,Math.floor(i/t.length)),o=0,s=()=>{if(n!==Cn.value)Tn();else if(o<t.length){K.value.push(t[o]);let e=setTimeout(()=>{yn.value=requestAnimationFrame(s)},a);bn.value.push(e),o+=1}else K.value=t,Tn()};yn.value=requestAnimationFrame(s)}T(Cn,()=>{Sn?(Sn=!1,Tn(),K.value=mn.value||[],xn.value=Cn.value):En()}),Be(()=>{Mn(),En()}),ze(()=>{Tn(),Wn()});let Dn=S(0);T(()=>z.value,async e=>{e||(await b(),Dn.value+=1)}),T(()=>vn.value,async e=>{e||z.value||(await b(),Dn.value+=1)});let On=g(()=>`sparkline_line_path_${D.value}`),kn=S(!0);async function An(){kn.value=!1,await b(),kn.value=!0,await b(),vt()}let jn=g(()=>M.value.debug);function Mn(){if(m(E.dataset)?(ae({componentName:`VueUiSparkline`,type:`dataset`,debug:jn.value}),ct.value=!0):jn.value&&E.dataset.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`period`,`value`]}).forEach(e=>{ae({componentName:`VueUiSparkline`,type:`datasetSerieAttribute`,property:e,index:t})})}),m(E.dataset)||(ct.value=M.value.loading),M.value.responsive){let e=we(()=>{let{width:e,height:t}=Te({chart:nt.value,title:L.value.title.show&&E.showInfo?rt.value:null,source:it.value});requestAnimationFrame(()=>{q.value.width=e,q.value.height=t,q.value.chartWidth=L.value.chartWidth/500*e,q.value.padding=E.forcedPadding/500*e})});gn.value&&(_n.value&&gn.value.unobserve(_n.value),gn.value.disconnect()),gn.value=new ResizeObserver(e),_n.value=nt.value.parentNode,gn.value.observe(_n.value)}}ze(()=>{gn.value&&(_n.value&&gn.value.unobserve(_n.value),gn.value.disconnect())});let q=S({height:80*E.heightRatio,width:500,chartWidth:L.value.chartWidth,padding:E.forcedPadding}),J=qe;function Nn(){if(!B.value.length)return{start:0,end:0};let{start:e,end:t}=dn.value;return{start:e,end:t+1}}function Pn(e,t=Nn()){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function Fn(e){let t=Pn(e);if(!t)return null;let n=B.value.length;if(!n)return{start:0,end:0};let r=Math.max(0,Math.min(Math.trunc(t.start),n-1));return{start:r,end:Math.max(r+1,Math.min(Math.trunc(t.end),n))}}function In(e,{skipAnimation:t=!0,transition:n=!1}={}){let r=Fn(e);if(!r)return null;let i=Nn();if(r.start!==i.start||r.end!==i.end){Xn(),un.value={time:0,x:0,y:0,pointerType:null};let e={start:r.start,end:r.end>r.start?r.end-1:r.start};n?Gn(e):(t&&wn(),bt.value=e),Yn()}return Nn()}function Ln(e){let t=In(e,{transition:!0});t&&J(`update:zoomState`,t)}T([()=>E.zoomState,()=>B.value.length],([e,t])=>{!e||t<=0||In(e,{transition:!0})},{deep:!0,immediate:!0});let Y=g(()=>{let{top:e,right:t,bottom:n,left:r}=L.value.padding;return{top:e,left:r,right:q.value.width-t,bottom:q.value.height-n,start:E.showInfo&&I.value.show&&I.value.position===`left`?q.value.width-q.value.chartWidth+r:q.value.padding+r,width:E.showInfo&&I.value.show?q.value.chartWidth-r-t:q.value.width-q.value.padding-r-t,height:q.value.height-e-n}});function Rn(e){let t=B.value.length;if(!t)return{start:0,end:-1};let n=Math.max(0,Math.min(Math.trunc(Number(e?.start)||0),t-1)),r=e?.end===null||e?.end===void 0?t-1:Math.trunc(Number(e.end));return{start:n,end:Math.max(n,Math.min(Number.isFinite(r)?r:n,t-1))}}function zn(e){let t=(e||[]).map(e=>{let t=e?.value;return isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0}),n=L.value.scaleMin,r=L.value.scaleMax,i=[null,void 0].includes(n)?t.length?Math.min(...t):0:n,a=[null,void 0].includes(r)?t.length?Math.max(...t):0:r,o=Math.abs(i>=0?0:i),s=a+o;return{absoluteMin:Number.isFinite(o)?o:0,absoluteMax:Number.isFinite(s)?s:0}}function Bn(e,t){let n=t.absoluteMax===0?0:(e+t.absoluteMin)/t.absoluteMax;return Y.value.bottom-Y.value.height*n}function Vn(e,t,n,r){let i=Math.max(1,e.end-e.start),a=Math.max(1,t.end-t.start),o=Y.value.start,s=Y.value.width,c=i/a,l=o+s*(e.start-t.start)/a-c*o,u=Bn(0,n),d=Bn(0,r),f=1;n.absoluteMax>0&&r.absoluteMax>0&&(f=n.absoluteMax/r.absoluteMax);let p=d-f*u;return`matrix(${c}, 0, 0, ${f}, ${l}, ${p})`}function Hn(e){if(!G.value||!e)return;let t=en.value.match(/^matrix\(([-+\d.eE]+),\s*[-+\d.eE]+,\s*[-+\d.eE]+,\s*([-+\d.eE]+),\s*([-+\d.eE]+),\s*([-+\d.eE]+)\)$/);if(!t)return;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),a=Number(t[4]);if([n,r,i,a].every(Number.isFinite))return{transform:`matrix(1, 0, 0, 1, ${(n-1)*e.x+i}, ${(r-1)*e.y+a})`,transformOrigin:`0 0`,transformBox:`view-box`,transition:tn.value?`transform ${$t}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:`transform`}}function Un(e){if(!G.value||!e)return;let t=en.value.match(/^matrix\(([-+\d.eE]+),\s*[-+\d.eE]+,\s*[-+\d.eE]+,\s*[-+\d.eE]+,\s*([-+\d.eE]+),\s*[-+\d.eE]+\)$/);if(!t)return;let n=Number(t[1]),r=Number(t[2]);if([n,r].every(Number.isFinite))return{transform:`matrix(1, 0, 0, 1, ${(n-1)*e.x+r}, 0)`,transformOrigin:`0 0`,transformBox:`view-box`,transition:tn.value?`transform ${$t}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:`transform`}}function Wn({resetTransform:e=!0}={}){on+=1,nn&&=(cancelAnimationFrame(nn),0),rn&&=(cancelAnimationFrame(rn),0),an&&=(clearTimeout(an),0),tn.value=!1,G.value=!1,e&&(en.value=`matrix(1, 0, 0, 1, 0, 0)`)}async function Gn(e){let t=Rn(e),n={...dn.value};if(t.start===n.start&&t.end===n.end)return;Wn();let r=vn.value;r&&(Tn(),K.value=mn.value||[]);let i=zn(K.value);wn(),bt.value={start:t.start,end:t.end};let a=mn.value||[];if(r||!V.value||z.value||$e.value||n.end<n.start||t.end<t.start||a.length<=1){K.value=a,xn.value=Cn.value,en.value=`matrix(1, 0, 0, 1, 0, 0)`;return}let o=Vn(t,n,zn(a),i),s=++on;G.value=!0,tn.value=!1,en.value=o,K.value=a,xn.value=Cn.value,await b(),s===on&&(nn=requestAnimationFrame(()=>{nn=0,rn=requestAnimationFrame(()=>{rn=0,s===on&&(tn.value=!0,en.value=`matrix(1, 0, 0, 1, 0, 0)`,an=setTimeout(async()=>{an=0,s===on&&(tn.value=!1,G.value=!1,await An())},$t))})}))}let Kn=g(()=>!W.value||sn.value==null||cn.value==null?null:{x:Math.min(sn.value,cn.value),width:Math.abs(cn.value-sn.value),y:0,height:q.value.height});function qn(e){let t=V.value;if(!t)return null;let n=t.getScreenCTM?.();if(n&&typeof t.createSVGPoint==`function`){let r=t.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r.matrixTransform(n.inverse()).x}let r=t.getBoundingClientRect?.();return r?.width?(e.clientX-r.left)/r.width*q.value.width:null}function Jn(e){return Math.min(Math.max(e,Y.value.start),Y.value.start+Y.value.width)}function Yn(){j.value=A.value,A.value=void 0,k.value=null,O.value=null,J(`hoverIndex`,{index:void 0})}function Xn(e){e?.pointerId!=null&&V.value?.hasPointerCapture?.(e.pointerId)&&V.value.releasePointerCapture(e.pointerId),W.value=!1,sn.value=null,cn.value=null}function Zn(e){(fn.value||W.value)&&(Xn(e),un.value={time:0,x:0,y:0,pointerType:null},Gn({start:0,end:Math.max(0,B.value.length-1)}),Yn(),J(`update:zoomState`,Nn()),J(`zoomReset`))}function Qn(e){(e.button===void 0||e.button===0)&&(e.preventDefault(),e.stopPropagation(),Zn())}function $n(e){e.detail===0&&Zn()}function er(e){if(!R.value.show)return;if(!fn.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=un.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(ln.value=!0,Zn(e),setTimeout(()=>{ln.value=!1},0),!0):(un.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function tr(e=V.value){St.value=!0,e?.classList?.add(`vue-ui-sparkline-pointer-focus`)}function nr(){St.value=!1,V.value?.classList?.remove(`vue-ui-sparkline-pointer-focus`)}function rr(e){if(e.button!==void 0&&e.button!==0||(tr(e.currentTarget),!R.value.show)||z.value||pn.value.length<2)return;let t=qn(e);if(t==null)return;let n=Y.value.start,r=n+Y.value.width;t<n||t>r||(V.value?.focus?.({preventScroll:!0}),W.value=!0,sn.value=Jn(t),cn.value=Jn(t))}function ir(e){if(!R.value.show||!W.value)return;let t=qn(e);t!=null&&(cn.value=Jn(t),sn.value!=null&&Math.abs(cn.value-sn.value)>=2&&!V.value?.hasPointerCapture?.(e.pointerId)&&V.value?.setPointerCapture?.(e.pointerId))}function ar(e){if(!R.value.show||!W.value)return;let t=qn(e);t!=null&&(cn.value=Jn(t));let n=sn.value,r=cn.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,Y.value.width*.01)){if(er(e))return;Xn(e);return}let i=Math.min(n,r),a=Math.max(n,r),o=Math.max(1,Y.value.width),s=pn.value.length,c=(i-Y.value.start)/o,l=(a-Y.value.start)/o,u=Math.max(0,Math.min(s-1,Math.floor(c*(s-1)))),d=Math.max(u,Math.min(s-1,Math.ceil(l*(s-1))));if(d<=u){Xn(e);return}let f=dn.value.start+u,p=dn.value.start+d;Gn({start:f,end:p}),un.value={time:0,x:0,y:0,pointerType:null},Yn(),J(`zoom`,{start:f,end:p}),J(`update:zoomState`,{start:f,end:p+1}),ln.value=!0,setTimeout(()=>{ln.value=!1},0),Xn(e)}let or=g(()=>[null,void 0].includes(L.value.scaleMin)?Math.min(...K.value.map(e=>isNaN(e.value)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(e.value)?0:e.value||0)):L.value.scaleMin),sr=g(()=>[null,void 0].includes(L.value.scaleMax)?Math.max(...K.value.map(e=>isNaN(e.value)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(e.value)?0:e.value||0)):L.value.scaleMax),cr=g(()=>{let e=or.value>=0?0:or.value;return Math.abs(e)}),lr=g(()=>sr.value+cr.value),ur=g(()=>Y.value.bottom-Y.value.height*dr(cr.value));function dr(e){return isNaN(e/lr.value)?0:e/lr.value}let fr=g(()=>K.value.length-1||1),pr=S([]),mr=0;Ge(()=>{let e=++mr;(async()=>{let t=await Ce({values:mn.value.map(e=>e.period),maxDatapoints:mn.value.length,formatter:I.value.datetimeFormatter,start:0,end:mn.value.length});e===mr&&(pr.value=t)})()});let X=g(()=>{let e=K.value.length,t=Y.value.width/fr.value,n=Math.max(0,Y.value.start),r=Math.min(q.value.width,Y.value.right,Y.value.start+Y.value.width),i=Math.max(0,r-n),a=e>0?i/e:0;return K.value.map((e,r)=>{let i=isNaN(e.value)||[void 0,`NaN`,NaN,1/0,-1/0].includes(e.value)?0:e.value,o=n+r*a,s=Z.value?a:t,c=Z.value?o+a/2:Y.value.start+r*t;return{value:e.value,absoluteValue:i,period:pr.value&&pr.value[r]&&pr.value[r].text?pr.value[r].text:e.period,plotValue:i+cr.value,toMax:dr(i+cr.value),sourceIndex:e.__sourceIndex??r,x:c,barX:o,y:Y.value.bottom-Y.value.height*dr(i+cr.value),id:`plot_${D.value}_${r}`,color:Z.value?at.value.color:F.value.useGradient?ie(P.value.color,.05*(1-r/fr.value)):P.value.color,width:s}})}),hr=g(()=>{if(E.selectedIndex!==void 0&&E.selectedIndex!==null&&E.selectedIndex>=0&&E.selectedIndex<B.value.length){let e=X.value.findIndex(e=>e.sourceIndex===E.selectedIndex);return e>=0?e:null}return k.value!==void 0&&k.value!==null&&k.value>=0&&k.value<X.value.length?k.value:null});function gr(e,t){return Number.isFinite(e?.sourceIndex)?e.sourceIndex:t}function _r(e,t){let n=gr(e,t);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:n}),k.value=t,O.value=t,A.value=e,j.value||=e,J(`hoverIndex`,{index:n})}function vr(e,t){let n=gr(e,t);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:n}),j.value=A.value,A.value=void 0,k.value=null,O.value=null,J(`hoverIndex`,{index:void 0})}let yr=g(()=>{if(et.value){let e=X.value.map(e=>e.absoluteValue),t=e.reduce((e,t)=>e+t,0);return{latest:X.value[X.value.length-1]?X.value[X.value.length-1].absoluteValue:0,sum:t,average:t/X.value.length,median:fe(e),trend:oe(X.value.map(({x:e,y:t,absoluteValue:n})=>({x:e,y:t,value:n}))).trend}}return{latest:null,sum:null,average:null,median:null,trend:null}}),br=g(()=>et.value?I.value.valueType===`latest`?yr.value.latest:I.value.valueType===`sum`?yr.value.sum:I.value.valueType===`average`?yr.value.average:0:0),Z=g(()=>M.value.type&&M.value.type===`bar`);function xr(e,t){if(ln.value)return;let n=gr(e,t);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:n}),J(`selectDatapoint`,{datapoint:e,index:n})}let Q=g(()=>P.value.cutNullValues);function Sr(e){return![null,void 0,`NaN`,NaN,1/0,-1/0].includes(e)}function Cr(e,t){let n=e[t-1],r=e[t+1],i=!!n&&!!r&&n.value==null&&r.value==null||!n&&!!r&&r.value==null||!!n&&!r&&n.value==null;return Sr(e[t]?.value)&&i&&Q.value}function wr(e,t){return A.value&&e.id===A.value.id||hr.value===t||B.value.length===1}function Tr(e,t){return Z.value||!Sr(e?.value)?!1:L.value.plot.show&&wr(e,t)||Cr(X.value,t)}function Er(e,t){return Math.max(1,wr(e,t)?L.value.plot.radius:L.value.plot.radius*.7)}function Dr(e,t){return wr(e,t)?L.value.plot.stroke:L.value.backgroundColor}let Or=g(()=>Q.value?X.value:X.value.filter(e=>e.value!==null)),kr=g(()=>Array.isArray(P.value.dashIndices)?P.value.dashIndices.map(e=>Math.trunc(Number(e))).filter(Number.isFinite):[]),Ar=g(()=>new Set(kr.value));function jr(e,t){let n=e?.sourceIndex,r=t?.sourceIndex;if(!Number.isFinite(n)||!Number.isFinite(r))return!1;let i=Math.min(n,r),a=Math.max(n,r);for(let e of kr.value)if(e>=i&&e<=a)return!0;return!1}function Mr(e){let t=/* @__PURE__ */ new Set;for(let n=1;n<e.length;n+=1)jr(e[n-1],e[n])&&t.add(n-1);return t}function Nr(e){let t=/* @__PURE__ */ new Set;if(Q.value||!P.value.nullDashes?.show)return t;for(let n=1;n<e.length;n+=1){let r=e[n-1]?.sourceIndex,i=e[n]?.sourceIndex;Number.isFinite(r)&&Number.isFinite(i)&&Math.abs(i-r)>1&&t.add(n-1)}return t}let Pr=g(()=>Q.value?/* @__PURE__ */ new Set:Mr(Or.value)),Fr=g(()=>Nr(Or.value)),Ir=g(()=>/* @__PURE__ */ new Set([...Pr.value,...Fr.value])),Lr=g(()=>Q.value?X.value.reduce((e,t,n)=>(Ar.value.has(t.sourceIndex)&&e.push(n),e),[]):[]),Rr=g(()=>Q.value?Lr.value.length>0:Ir.value.size>0),zr=g(()=>X.value.filter(e=>e.value!==null)),Br=g(()=>zr.value.length>1),Vr=g(()=>Z.value||!Br.value?``:Q.value?o(X.value):f(Or.value)),Hr=g(()=>Z.value||!Br.value?``:Q.value?ne(X.value):te(Or.value)),Ur=g(()=>Z.value||!Rr.value||!Br.value?[]:Q.value?l(X.value,Lr.value):p(Or.value,Ir.value)),Wr=g(()=>Z.value||!Rr.value||!Br.value?[]:Q.value?a(X.value,Lr.value):c(Or.value,Ir.value)),Gr=g(()=>Z.value||!F.value.show||!Br.value?[]:P.value.smooth?u(Or.value,Y.value.bottom,Q.value).filter(Boolean):(Q.value?r(X.value,Y.value.bottom):ue(Or.value,Y.value.bottom)).split(`;`).filter(Boolean).map(e=>`M${e}Z`)),Kr=g(()=>Z.value||!M.value.gradientPath.show||M.value.temperatureColors.show?``:`M ${(P.value.smooth?Vr.value:Hr.value)||`0,0`}`),qr=g(()=>{if(!M.value.temperatureColors.show)return null;let e=M.value.temperatureColors.colors;return!Array.isArray(e)||!e.length?null:e.map(e=>ee(e))}),$=g(()=>{if(!M.value.temperatureColors.show)return null;let e=M.value.temperatureColors.colors;return!Array.isArray(e)||!e.length?null:e.map(e=>ee(e))});function Jr(e){if(!Number.isFinite(e?.y))return 0;let t=Y.value.height||1,n=(e.y-Y.value.top)/t;return Math.min(1,Math.max(0,n))}function Yr(e){let t=qr.value;return!Array.isArray(t)||!t.length?e.color:i({colors:t,ratio:Jr(e)})}T(()=>[_t.value,On.value,X.value.length,q.value.width,q.value.height,M.value?.style?.line?.smooth],async()=>{await b(),vt()},{immediate:!0}),Be(async()=>{await b(),vt()}),T(()=>z.value,async e=>{e||await An()}),T(()=>vn.value,async e=>{e||z.value||await An()}),T([()=>E.selectedIndex,()=>X.value],([e],[t])=>{if(e==null){if(t!=null){k.value=null,O.value=null,A.value=void 0;return}let e=A.value?.sourceIndex;if(e==null)return;let n=X.value.findIndex(t=>t.sourceIndex===e);if(n<0){k.value=null,O.value=null,A.value=void 0;return}k.value=n,O.value=n,A.value=X.value[n];return}if(e<0||e>=B.value.length)return;let n=X.value.findIndex(t=>t.sourceIndex===e);if(n<0){k.value=null,O.value=null,A.value=void 0;return}let r=X.value[n];r&&(k.value=n,O.value=n,A.value=r)});let Xr=S(!1);function Zr(){let e=hr.value;if(e!==null&&e>=0&&e<X.value.length){let t=X.value[e];if(t){O.value=e,A.value=t,k.value=e,Xr.value=!0;return}}O.value=null,!A.value&&X.value.length&&_r(X.value.at(-1),X.value.length-1),Xr.value=!0}function Qr(){nr(),j.value=A.value,(E.selectedIndex===void 0||E.selectedIndex===null)&&(O.value=null,A.value=void 0,k.value=null,J(`hoverIndex`,{index:void 0})),Xr.value=!1}be({resetZoom:Zn,setZoomState:Ln});function $r(e){if(!V.value||document.activeElement!==V.value)return;if(nr(),j.value=A.value,e.key===`Escape`){(fn.value||W.value)&&(e.preventDefault(),e.stopPropagation(),Zn());return}let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`;if(!t&&!n)return;let r=X.value.length;if(!r)return;e.preventDefault(),e.stopPropagation();let i=O.value,a=i!==null&&i>=0&&i<r,o=A.value?X.value.findIndex(e=>e.id===A.value.id):-1;a?n?(i+=1,i>=r&&(i=0)):t&&(--i,i<0&&(i=r-1)):o!==null&&o>=0&&o<r?(i=n?o+1:o-1,i>=r&&(i=0),i<0&&(i=r-1)):i=n?0:r-1;let s=X.value[i];s&&(O.value=i,_r(s,i))}let ei=g(()=>({headers:[M.value.translations.period,M.value.translations.value],rows:X.value.map(e=>[e.period,e.absoluteValue])}));return(t,r)=>(x(),v(`div`,{ref_key:`sparklineChart`,ref:nt,class:`vue-data-ui-component vue-ui-sparkline`,id:D.value,style:Re(`width:100%;font-family:${L.value.fontFamily};`)},[y(`p`,{id:`chart-instructions-${D.value}`,class:`sr-only`},Ue(M.value.a11y.translations.keyboardNavigation),9,wt),ei.value?.rows?.length?(x(),je(De,{key:0,uid:D.value,head:ei.value.headers,body:ei.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):_(``,!0),Ve(t.$slots,`before`,Le(Fe({selected:A.value,latest:yr.value.latest,sum:yr.value.sum,average:yr.value.average,median:yr.value.median,trend:yr.value.trend})),void 0,!0),L.value.title.show&&e.showInfo?(x(),v(`div`,{key:1,ref_key:`chartTitle`,ref:rt,class:`vue-ui-sparkline-title`,style:Re(`display:flex;align-items:center;width:100%;color:${L.value.title.color};background:${L.value.backgroundColor};justify-content:${L.value.title.textAlign===`left`?`flex-start`:L.value.title.textAlign===`right`?`flex-end`:`center`};height:${L.value.title.fontSize*2}px;font-size:${L.value.title.fontSize}px;font-weight:${L.value.title.bold?`bold`:`normal`};`)},[y(`span`,{style:Re(`padding:${L.value.title.textAlign===`left`?`0 0 0 12px`:L.value.title.textAlign===`right`?`0 12px 0 0`:`0`}`)},Ue(A.value?A.value.period:L.value.title.text),5)],4)):_(``,!0),y(`div`,Tt,[(x(),v(`svg`,{ref_key:`svgRef`,ref:V,class:Ie({"vue-ui-sparkline-pointer-focus":St.value}),xmlns:w(me),viewBox:`0 0 ${q.value.width} ${q.value.height}`,style:Re({background:L.value.backgroundColor,overflow:`visible`,direction:`ltr`,cursor:R.value.show?W.value?`col-resize`:`crosshair`:`default`,touchAction:`pan-y`,userSelect:`none`}),tabindex:`0`,"aria-describedby":`chart-instructions-${D.value}`,"aria-keyshortcuts":`Escape`,onMouseleave:r[0]||=e=>j.value=void 0,onFocus:Zr,onBlur:Qr,onKeydown:$r,onPointerdown:rr,onPointermove:ir,onPointerup:ar,onPointercancel:Xn},[Ne(w(Je)),Ve(t.$slots,`svg-underlayer`,{svg:{...q.value,drawingArea:Y.value,timeLabels:pr.value,series:X.value,hoveredIndex:O.value,isZoomed:fn.value,zoomRange:dn.value}},void 0,!0),t.$slots[`chart-background`]?(x(),v(`foreignObject`,{key:0,x:0,y:0,width:q.value.width<=0?10:q.value.width,height:q.value.height<=0?10:q.value.height,style:{pointerEvents:`none`}},[Ve(t.$slots,`chart-background`,{},void 0,!0)],8,Dt)):_(``,!0),y(`defs`,null,[Ne(Ee,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`sparkline_gradient_${D.value}`,stops:[[`0%`,w(s)(w(ie)(F.value.color,.05),F.value.opacity),1],[`100%`,w(s)(F.value.color,F.value.opacity),1]]},null,8,[`id`,`stops`]),Ne(Ee,{t:`linear`,x2:`0%`,y2:`100%`,id:`sparkline_bar_gradient_pos_${D.value}`,stops:[[`0%`,at.value.color,1],[`100%`,w(ie)(at.value.color,.05),1]]},null,8,[`id`,`stops`]),Ne(Ee,{t:`linear`,x2:`0%`,y2:`100%`,id:`sparkline_bar_gradient_neg_${D.value}`,stops:[[`0%`,w(ie)(at.value.color,.05),1],[`100%`,at.value.color,1]]},null,8,[`id`,`stops`]),y(`filter`,{id:`sparkline_pulse_glow_${D.value}`,filterUnits:`userSpaceOnUse`,x:`-50`,y:`-50`,width:`100`,height:`100`},[...r[1]||=[y(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`3`,result:`blur`},null,-1),y(`feMerge`,null,[y(`feMergeNode`,{in:`blur`}),y(`feMergeNode`,{in:`SourceGraphic`})],-1)]],8,Ot),M.value.temperatureColors.show&&$.value?(x(),v(`linearGradient`,{key:0,id:`temperature_grad_sparkline_${D.value}`,gradientUnits:`userSpaceOnUse`,x1:`0`,x2:`0`,y1:Y.value.top,y2:Y.value.bottom},[(x(!0),v(h,null,C($.value,(e,t)=>(x(),v(`stop`,{key:`temperature_grad_stop_${t}_${D.value}`,"stop-color":e,offset:$.value.length===1?`0%`:w(pe)(t,$.value.length)},null,8,At))),128))],8,kt)):_(``,!0),y(`clipPath`,{id:`sparkline_zoom_clip_${D.value}`},[y(`rect`,{x:Y.value.start-4,y:Y.value.top-8,width:Y.value.width+8,height:Y.value.height+16},null,8,Mt)],8,jt)]),y(`g`,{"clip-path":G.value?`url(#sparkline_zoom_clip_${D.value})`:void 0},[y(`g`,{style:Re({transform:en.value,transformOrigin:`0 0`,transformBox:`view-box`,transition:tn.value?`transform ${$t}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:G.value?`transform`:void 0})},[F.value.show&&!Z.value&&Gr.value.length?(x(),v(`g`,Pt,[(x(!0),v(h,null,C(Gr.value,(e,t)=>(x(),v(`path`,{key:`sparkline_area_${t}_${D.value}`,class:`vue-ui-sparkline-area`,"data-cy":P.value.smooth?`sparkline-smooth-area`:`sparkline-angle-area`,d:e,fill:F.value.useGradient?`url(#sparkline_gradient_${D.value})`:w(s)(F.value.color,F.value.opacity),"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,Ft))),128))])):_(``,!0),P.value.smooth&&!Z.value?(x(),v(h,{key:1},[y(`path`,{id:On.value,d:`M ${Vr.value||`0,0`}`,fill:`none`,stroke:`transparent`,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,It),Rr.value?(x(!0),v(h,{key:0},C(Ur.value,e=>(x(),v(`path`,{key:e.path,class:`vue-ui-sparkline-path`,d:`M ${e.path}`,stroke:$.value?`url(#temperature_grad_sparkline_${D.value})`:P.value.color,fill:`none`,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-dasharray":e.dashed?P.value.dashArray:0},null,8,Lt))),128)):(x(),v(`path`,{key:1,class:`vue-ui-sparkline-path`,d:`M ${Vr.value||`0,0`}`,stroke:$.value?`url(#temperature_grad_sparkline_${D.value})`:P.value.color,fill:`none`,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,Rt))],64)):_(``,!0),!P.value.smooth&&!Z.value?(x(),v(h,{key:2},[y(`path`,{id:On.value,d:`M ${Hr.value||`0,0`}`,fill:`none`,stroke:`transparent`,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,zt),Rr.value?(x(!0),v(h,{key:0},C(Wr.value,e=>(x(),v(`path`,{key:e.path,class:`vue-ui-sparkline-path`,d:`M ${e.path}`,stroke:$.value?`url(#temperature_grad_sparkline_${D.value})`:P.value.color,fill:`none`,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-dasharray":e.dashed?P.value.dashArray*2:0},null,8,Bt))),128)):(x(),v(`path`,{key:1,class:`vue-ui-sparkline-path`,d:`M ${Hr.value||`0,0`}`,stroke:$.value?`url(#temperature_grad_sparkline_${D.value})`:P.value.color,fill:`none`,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,Vt))],64)):_(``,!0),Kr.value&&!$.value?(x(),je(xt,{key:3,svgPathData:Kr.value,enabled:M.value.gradientPath.show&&!Z.value&&!$.value,strokeWidth:P.value.strokeWidth,highColor:M.value.gradientPath.colors.high,lowColor:M.value.gradientPath.colors.low,segments:M.value.gradientPath.segments},null,8,[`svgPathData`,`enabled`,`strokeWidth`,`highColor`,`lowColor`,`segments`])):_(``,!0),kn.value&&_t.value?(x(),je(tt,{key:4,uid:D.value,svgRef:w(V),pulsePathId:On.value,pulsePathLength:dt.value,pulseDur:ut.value,pulseBegin:ft.value,pulseRepeatCount:mt.value,pulseFillMode:ht.value,pulseKeyPoints:pt.value,pulseMotion:yt.value,pulse:H.value,pulseTrail:U.value,pulseTrailLength:gt.value,prefersReducedMotion:w($e),loading:w(z),isBar:Z.value},null,8,[`uid`,`svgRef`,`pulsePathId`,`pulsePathLength`,`pulseDur`,`pulseBegin`,`pulseRepeatCount`,`pulseFillMode`,`pulseKeyPoints`,`pulseMotion`,`pulse`,`pulseTrail`,`pulseTrailLength`,`prefersReducedMotion`,`loading`,`isBar`])):_(``,!0),(x(!0),v(h,null,C(X.value,(e,t)=>(x(),v(`g`,null,[Z.value?(x(),v(`rect`,{key:0,x:e.barX,y:isNaN(e.absoluteValue>0?e.y:ur.value)?0:e.absoluteValue>0?e.y:ur.value,width:e.width,height:isNaN(Math.abs(e.y-ur.value))?0:Math.abs(e.y-ur.value),fill:e.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${D.value})`:`url(#sparkline_bar_gradient_neg_${D.value})`,rx:at.value.borderRadius},null,8,Ht)):_(``,!0)]))),256)),or.value<0?(x(),v(`line`,{key:5,x1:Y.value.start,x2:Y.value.start+Y.value.width,y1:w(se)(ur.value,Y.value.bottom),y2:w(se)(ur.value,Y.value.bottom),stroke:L.value.zeroLine.color,"stroke-dasharray":L.value.zeroLine.strokeWidth*2,"stroke-width":L.value.zeroLine.strokeWidth,"stroke-linecap":`round`},null,8,Ut)):_(``,!0)],4),(x(!0),v(h,null,C(X.value,(e,t)=>(x(),v(`g`,{key:`sparkline_indicator_${e.id}`,style:Re(Un(e))},[L.value.verticalIndicator.show&&(A.value&&e.id===A.value.id||hr.value===t)?(x(),v(`line`,{key:0,x1:e.x,x2:e.x,y1:Y.value.top-6,y2:Y.value.bottom,stroke:L.value.verticalIndicator.color||e.color,"stroke-width":L.value.verticalIndicator.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":L.value.verticalIndicator.strokeDasharray||0},null,8,Wt)):_(``,!0)],4))),128)),(x(!0),v(h,null,C(X.value,(e,t)=>(x(),v(`g`,{key:`sparkline_plot_${e.id}`,style:Re(Hn(e))},[Tr(e,t)?(x(),v(`circle`,{key:0,cx:e.x,cy:e.y,r:Er(e,t),fill:Yr(e),stroke:Dr(e,t),"stroke-width":L.value.plot.strokeWidth},null,8,Gt)):_(``,!0)],4))),128))],8,Nt),e.showInfo&&I.value.show?(x(),v(`text`,{key:1,x:I.value.position===`left`?12+I.value.offsetX:Y.value.width+12+I.value.offsetX,y:q.value.height/2+I.value.fontSize/2.5+I.value.offsetY,"font-size":I.value.fontSize,"font-weight":I.value.bold?`bold`:`normal`,fill:I.value.color},Ue(A.value?w(ce)(I.value.formatter,A.value.absoluteValue,w(n)({p:I.value.prefix,v:A.value.absoluteValue,s:I.value.suffix,r:I.value.roundingValue}),{datapoint:A.value}):w(ce)(I.value.formatter,br.value,w(n)({p:I.value.prefix,v:br.value,s:I.value.suffix,r:I.value.roundingValue}))),9,Kt)):_(``,!0),Kn.value?(x(),v(`rect`,{key:2,x:Kn.value.x,y:Kn.value.y,width:Kn.value.width,height:Kn.value.height,fill:R.value.selection.fill,"fill-opacity":R.value.selection.fillOpacity,stroke:R.value.selection.stroke,"stroke-opacity":R.value.selection.strokeOpacity,"stroke-width":R.value.selection.strokeWidth,"stroke-dasharray":R.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,qt)):_(``,!0),(x(!0),v(h,null,C(X.value,(e,t)=>(x(),v(`rect`,{x:Z.value?e.barX:e.x-(Y.value.width/(fr.value+1)>q.value.padding?q.value.padding:Y.value.width/(fr.value+1))/2,y:Y.value.top-6,height:Y.value.height+6,width:Z.value?e.width:Y.value.width/(fr.value+1)>q.value.padding?q.value.padding:Y.value.width/(fr.value+1),fill:`transparent`,onMouseenter:()=>_r(e,t),onMouseleave:()=>vr(e,t),onClick:()=>xr(e,t)},null,40,Jt))),256)),Ve(t.$slots,`svg`,{svg:{...q.value,drawingArea:Y.value,timeLabels:pr.value,series:X.value,hoveredIndex:O.value,isZoomed:fn.value,zoomRange:dn.value}},void 0,!0)],46,Et)),fn.value&&R.value.resetButton.show?(x(),v(`button`,{key:0,type:`button`,class:`vue-ui-sparkline-reset-zoom`,title:R.value.resetButton.title,"aria-label":R.value.resetButton.ariaLabel,style:Re({cursor:M.value.useCursorPointer?`pointer`:`default`}),onPointerdown:Qn,onClick:$n},[(x(),v(`svg`,Xt,[y(`path`,{d:`M2 10a1 1 0 0 0 15 0c0-5-5-8-10-6l3-3M7 4l3 3`,stroke:R.value.resetButton.color,fill:`none`,"stroke-width":`2.5`,"stroke-linecap":`round`},null,8,Zt)]))],44,Yt)):_(``,!0),t.$slots.hint?(x(),v(`div`,Qt,[Ve(t.$slots,`hint`,Le(Fe({hint:M.value.a11y.translations.keyboardNavigation,isVisible:Xr.value})),void 0,!0)])):_(``,!0)]),A.value&&N.value.show?(x(),je(w(Ye),{key:2,x:A.value.x,y:A.value.y,prevX:j.value.x,prevY:j.value.y,offsetY:L.value.plot.radius*3+N.value.offsetY,svgRef:w(V),background:N.value.backgroundColor,color:N.value.color,fontSize:N.value.fontSize,borderWidth:N.value.borderWidth,borderColor:N.value.borderColor,borderRadius:N.value.borderRadius,backgroundOpacity:N.value.backgroundOpacity},{default:Ke(()=>[Ve(t.$slots,`tooltip`,Le(Fe({...A.value})),()=>[Me(Ue(A.value.period)+`: `+Ue(w(ce)(I.value.formatter,A.value.absoluteValue,w(n)({p:I.value.prefix,v:A.value.absoluteValue,s:I.value.suffix,r:I.value.roundingValue}),{datapoint:A.value})),1)],!0)]),_:3},8,[`x`,`y`,`prevX`,`prevY`,`offsetY`,`svgRef`,`background`,`color`,`fontSize`,`borderWidth`,`borderColor`,`borderRadius`,`backgroundOpacity`])):_(``,!0),t.$slots.source?(x(),v(`div`,{key:3,ref_key:`source`,ref:it,dir:`auto`},[Ve(t.$slots,`source`,{},void 0,!0)],512)):_(``,!0),Ve(t.$slots,`skeleton`,{},()=>[w(z)?(x(),je(_e,{key:0})):_(``,!0)],!0)],12,Ct))}},[[`__scopeId`,`data-v-114e8926`]]);export{St as n,G as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-C3FbHv4N.js";import{$ as n,Dt as r,Ht as i,Jt as a,Qt as o,S as s,X as c,Yt as ee,at as te,i as ne,in as re,t as ie,w as ae,yt as oe,zt as se}from"./lib-rPeBMZrn.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as pe}from"./resolveChartConfig-CIhClE5R.js";import{t as me}from"./DefGrad-DKMq1REY.js";import{t as he}from"./BaseLegendToggle-BIzyyI1h.js";import{t as ge}from"./A11yDataTable-DWNlWXzs.js";import{t as _e}from"./useChartAccessibility-DOMuYJfm.js";import{t as ve}from"./usePrefersMotion-XLHwega2.js";import{t as ye}from"./vue_ui_sparkstackbar-Chtog7hC.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createVNode as be,defineAsyncComponent as xe,guardReactiveProps as h,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onMounted as Se,openBlock as y,ref as b,renderList as x,renderSlot as S,toDisplayString as C,toRefs as Ce,unref as w,useSlots as we,watch as Te,withCtx as T}from"vue";var Ee=/* @__PURE__ */ e({default:()=>Ke}),De=[`id`],Oe={style:{position:`relative`}},ke=[`xmlns`,`viewBox`,`aria-describedby`],Ae=[`id`],je=[`width`,`height`,`rx`],Me=[`clip-path`],Ne=[`x`,`width`,`height`,`fill`],Pe=[`x`,`width`,`height`,`fill`],Fe=[`x`,`height`,`fill`],Ie=[`x`,`width`,`height`,`onClick`,`onMouseenter`,`onMouseleave`],Le=[`width`,`height`,`rx`,`stroke`],Re=[`width`,`height`,`rx`],ze={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Be=[`aria-pressed`,`aria-label`,`onClick`,`onFocus`,`onKeydown`],Ve={style:{display:`flex`,"flex-direction":`row`,"align-items":`center`,gap:`4px`,"justify-content":`center`}},He=[`height`,`width`],Ue=[`rx`,`fill`],We=[`rx`,`fill`],Ge={key:3,ref:`source`,dir:`auto`},Ke=/*#__PURE__*/ fe({__name:`vue-ui-sparkstackbar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`selectLegend`],setup(e,{expose:fe,emit:Ee}){let Ke=xe(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),qe=xe(()=>import(`./Tooltip-C1q0Qoh7.js`)),{vue_ui_sparkstackbar:Je}=t(),Ye=ve(),Xe=we(),E=e,Ze=b(null),D=b(c()),O=b(!1),Qe=b(``),k=b(null),A=b(!1),j=b(null),$e=b({x:0,y:0}),M=b(`pointer`),et=b(!1),N=b(null),tt=b([]),P=b(at()),F=u(()=>P.value.style.bar),I=u(()=>P.value.style.legend),L=u(()=>P.value.style.tooltip),R=u(()=>P.value.style),nt=u(()=>P.value.debug);Se(()=>{Xe[`chart-background`]&&nt.value&&console.warn(`VueUiSparkStackbar does not support the #chart-background slot.`)}),ue({config:()=>P.value,dataset:()=>E.dataset,component:`VueUiSparkStackbar`,rules:[de.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let rt=u(()=>P.value.useCursorPointer),it=u(()=>re({defaultConfig:{style:{backgroundColor:`#99999930`,animation:{show:!1},bar:{gradient:{inderlayerColor:`#6A6A6A`}},title:{backgroundColor:`transparent`}}},userConfig:P.value.skeletonConfig??{}})),{loading:z,FINAL_DATASET:B}=ce({...Ce(E),FINAL_CONFIG:P,prepareConfig:at,skeletonDataset:E.config?.skeletonDataset??[{name:`_`,value:8,color:`#808080`},{name:`_`,value:5,color:`#ADADAD`},{name:`_`,value:3,color:`#DBDBDB`}],skeletonConfig:re({defaultConfig:P.value,userConfig:it.value})}),{svgRef:V}=_e({config:R.value.title});function at(){return pe(E.config,Je,ye)}let ot=o(E.config);Te(()=>E.config,(e,t)=>{let n=o(e),r=n!==ot;ot=n;let i=at();r?(P.value=i,ct()):P.value.style.tooltip=i.style.tooltip},{deep:!0}),Te(()=>B.value,e=>{U.value=B.value.map((e,t)=>({...e,color:e.color?s(e.color):H.value[t]||i[t]||i[t%i.length]})),st()},{deep:!0});let H=u(()=>ae(P.value.customPalette)),U=b(B.value.map((e,t)=>({...e,value:R.value.animation.show?0:e.value||0,color:e.color?s(e.color):H.value[t]||i[t]||i[t%i.length]}))),W=b(!0);function st(){if(!R.value.animation.show||Ye.value){W.value=!1;return}let e=R.value.animation.animationFrames,t=B.value.map(e=>e.value||0),n=t.map(t=>t/e),r=t.reduce((e,t)=>e+t,0),a=0;W.value=!0,U.value=B.value.map((e,t)=>({...e,value:0,color:e.color?s(e.color):H.value[t]||i[t]||i[t%i.length]}));function o(){a+=r/e,a<r?(U.value=U.value.map((e,r)=>({...e,value:Math.min(e.value+n[r],t[r]),color:e.color?s(e.color):H.value[r]||i[r]||i[r%i.length]})),requestAnimationFrame(o)):(W.value=!1,U.value=B.value.map((e,n)=>({...e,value:t[n],color:e.color?s(e.color):H.value[n]||i[n]||i[n%i.length],id:c()})))}o()}Se(()=>{ct()});function ct(){se(E.dataset)?te({componentName:`VueUiSparkStackbar`,type:`dataset`,debug:nt.value}):nt.value&&E.dataset.forEach((e,t)=>{oe({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{te({componentName:`VueUiSparkStackbar`,type:`datasetSerieAttribute`,property:e,index:t})})}),st()}let G=b({width:500,height:16}),K=b([]),lt=u(()=>B.value.map(e=>e.value||0).filter((e,t)=>!K.value.includes(t)).reduce((e,t)=>e+t,0)),q=u(()=>U.value.map((e,t)=>{let r=e.value||0,a=r/lt.value,o=isNaN(a)?0:a,c=o*G.value.width;return{...e,color:s(B.value[t]?.color?B.value[t]?.color:H.value[t]||i[t]||i[t%i.length]),value:r,proportion:o,width:c,seriesIndex:t,proportionLabel:n({v:o*100,s:`%`,r:I.value.percentage.rounding})}})),J=u(()=>q.value.filter((e,t)=>!K.value.includes(t)));function ut(){O.value=!1,N.value=null,j.value=null,M.value=`pointer`}function dt(){ut(),K.value.length?K.value=[]:q.value.forEach((e,t)=>{K.value.push(t)}),gt(`selectLegend`,J.value)}function Y(e){ut(),K.value.includes(e)?K.value=K.value.filter(t=>t!==e):K.value.length<U.value.length-1&&K.value.push(e),gt(`selectLegend`,J.value)}function ft(e){return q.value.length?q.value.find(t=>t.name===e)||(P.value.debug&&console.warn(`VueUiSparkStackbar - Series name not found "${e}"`),null):(P.value.debug&&console.warn(`VueUiSparkStackbar - There are no series to show.`),null)}function pt(e){let t=ft(e);t!==null&&K.value.includes(t.id)&&Y(t.seriesIndex)}function mt(e){let t=ft(e);t!==null&&(K.value.includes(t.id)||Y(t.seriesIndex))}let X=u(()=>{let e=0,t=[];for(let n=0;n<J.value.length;n+=1)t.push({...J.value[n],start:e}),e+=J.value[n].width;return t}),ht=u(()=>{let e=X.value.reduce((e,t)=>e+t.width,0);return Math.min(Math.max(e,0),G.value.width)}),gt=Ee;function Z(e,t,n=!1){gt(`selectDatapoint`,{datapoint:e,index:t}),P.value.events.datapointClick&&!n&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex})}function _t({datapoint:e,seriesIndex:t}){O.value=!1,N.value=null,j.value=null,M.value=`pointer`,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex})}function vt({datapoint:e,seriesIndex:t,triggerMode:i=`pointer`}){if(A.value=!1,P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:e.seriesIndex}),!L.value.show)return;M.value=i,k.value={datapoint:e,seriesIndex:t,config:P.value,series:q.value},O.value=!0,N.value=e.seriesIndex;let o=L.value.customFormat;if(r(o))try{let t=o({seriesIndex:e.seriesIndex,datapoint:e,series:q.value,config:P.value});typeof t==`string`&&(Qe.value=t,A.value=!0)}catch{console.warn(`Custom format cannot be applied.`),A.value=!1}if(!A.value){let r=``,i=F.value.gradient.show,o=`tooltip_grad_${t}_${D.value}`,s=a(ee(e.color,.05),100-F.value.gradient.intensity),c=i?`<rect x="0" y="0" width="10" height="10" rx="${Q.value}" fill="${F.value.gradient.underlayerColor}"/>`:``,te=i?`<defs><radialGradient id="${o}"><stop offset="0%" stop-color="${s}"/><stop offset="100%" stop-color="${e.color}"/></radialGradient></defs>`:``;r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 10 10" height="14" width="14">${te}${c}<rect x="0" y="0" width="10" height="10" rx="${Q.value}" fill="${i?`url(#${o})`:e.color}"/></svg>`,r+=`<b>${e.proportionLabel}</b>`,r+=`<span>(${ne(I.value.value.formatter,e.value,n({p:I.value.value.prefix,v:e.value,s:I.value.value.suffix,r:I.value.value.rounding}),{datapoint:e,seriesIndex:t})})</span>`,Qe.value=`<div>${r}</div>`}}let yt=u(()=>{let e=F.value.borderRadius==null?G.value.height/2:F.value.borderRadius;return Math.min(Math.max(e,0),G.value.height/2)}),Q=u(()=>{let e=G.value.height/2;return e===0?5:yt.value/e*5});function $(e){let t=tt.value[e];t&&typeof t.focus==`function`&&t.focus()}function bt(e){if(!Number.isFinite(e)||!V.value)return;let t=X.value[e];if(!t)return;let n=V.value.getBoundingClientRect(),r=t.start+t.width/2,i=G.value.height/2;$e.value={x:n.left+r/G.value.width*n.width,y:n.top+i/G.value.height*n.height}}function xt(){j.value=null,et.value=!0}function St(){j.value=null,M.value=`pointer`,O.value=!1,N.value=null,et.value=!1}function Ct(e){if(!V.value||document.activeElement!==V.value||!X.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`,a=e.key===`Home`,o=e.key===`End`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),i){j.value=null,M.value=`pointer`,O.value=!1,N.value=null;return}if(r){if(j.value===null)return;let e=X.value[j.value];if(!e)return;Z(e,e.seriesIndex);return}let s=j.value;a?s=0:o?s=X.value.length-1:s===null||s<0||s>=X.value.length?s=n?0:X.value.length-1:n?(s+=1,s>=X.value.length&&(s=0)):t&&(--s,s<0&&(s=X.value.length-1));let c=X.value[s];c&&(j.value=s,bt(s),vt({datapoint:c,seriesIndex:c.seriesIndex,triggerMode:`keyboard`}))}function wt(e){O.value=!1,j.value=null,M.value=`pointer`,N.value=e.seriesIndex}function Tt(){j.value=null,M.value=`pointer`,O.value=!1,N.value=null}function Et(e,t,n){let r=e.key===`Enter`||e.key===` `,i=e.key===`ArrowLeft`||e.key===`ArrowUp`,a=e.key===`ArrowRight`||e.key===`ArrowDown`,o=e.key===`Home`,s=e.key===`End`,c=e.key===`Escape`;(r||i||a||o||s||c)&&(e.preventDefault(),e.stopPropagation(),c?Tt():r?(Y(n),Z(t,n,!0)):o?$(0):s?$(q.value.length-1):i?$(n<=0?q.value.length-1:n-1):a&&$(n>=q.value.length-1?0:n+1))}let Dt=u(()=>({headers:[P.value.a11y.translations.series,P.value.a11y.translations.percentage,P.value.a11y.translations.value],rows:q.value.map((e,t)=>[e.name,K.value.includes(t)?` - `:e.proportionLabel,ne(I.value.value.formatter,e.value,n({p:I.value.value.prefix,v:e.value,s:I.value.value.suffix,r:I.value.value.rounding}),{datapoint:e,seriesIndex:t})])}));return fe({hideSeries:mt,showSeries:pt}),(e,t)=>(y(),p(`div`,{class:`vue-data-ui-component vue-ui-spark-stackbar`,ref_key:`sparkstackbarChart`,ref:Ze,style:v(`width:100%; background:${R.value.backgroundColor}`)},[m(`div`,{id:`chart-instructions-${D.value}`,class:`sr-only`},[m(`p`,null,C(P.value.a11y.translations.keyboardNavigation),1)],8,De),Dt.value?.rows?.length?(y(),d(ge,{key:0,uid:D.value,head:Dt.value.headers,body:Dt.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),R.value.title.text?(y(),p(`div`,{key:1,style:v(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${R.value.title.margin};padding: 0 6px;text-align:${R.value.title.textAlign}`)},[m(`div`,{class:`atom-title`,style:v(`font-size:${R.value.title.fontSize}px;color:${R.value.title.color};font-weight:${R.value.title.bold?`bold`:`normal`}`)},C(R.value.title.text),5),R.value.title.subtitle.text?(y(),p(`div`,{key:0,class:`atom-subtitle`,style:v(`font-size:${R.value.title.subtitle.fontSize}px;color:${R.value.title.subtitle.color};font-weight:${R.value.title.subtitle.bold?`bold`:`normal`}`)},C(R.value.title.subtitle.text),5)):f(``,!0)],4)):f(``,!0),m(`div`,Oe,[(y(),p(`svg`,{ref_key:`svgRef`,ref:V,xmlns:w(ie),width:`100%`,viewBox:`0 0 ${G.value.width} ${G.value.height}`,"aria-describedby":`chart-instructions-${D.value}`,tabindex:`0`,onFocus:xt,onBlur:St,onKeydown:Ct},[be(w(Ke)),m(`defs`,null,[(y(!0),p(l,null,x(X.value,(e,t)=>(y(),d(me,{t:`linear`,id:`stack_gradient_${t}_${D.value}`,key:`stack_gradient_${t}`,gradientTransform:`rotate(90)`,stops:[[`0%`,e.color,1],[`50%`,w(a)(w(ee)(e.color,.05),100-F.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)),m(`clipPath`,{id:`stackPill_${D.value}`},[m(`rect`,{x:`0`,y:`0`,width:ht.value,height:G.value.height,rx:yt.value,class:g({animated:!W.value&&!w(z)})},null,10,je)],8,Ae)]),lt.value>0?(y(),p(l,{key:0},[m(`g`,{"clip-path":`url(#stackPill_${D.value})`},[(y(!0),p(l,null,x(X.value,(e,t)=>(y(),p(`rect`,{key:`stack_underlayer_${t}`,x:e.start,y:0,width:e.width,height:G.value.height,fill:F.value.gradient.underlayerColor,class:g({animated:!W.value&&!w(z)}),style:v({opacity:O.value&&N.value!==null&&L.value.show?N.value===e.seriesIndex?1:.5:1})},null,14,Ne))),128)),(y(!0),p(l,null,x(X.value,(e,t)=>(y(),p(`rect`,{key:`stack_${t}`,x:e.start,y:0,width:e.width,height:G.value.height,fill:F.value.gradient.show?`url(#stack_gradient_${t}_${D.value})`:e.color,class:g({animated:!W.value&&!w(z)}),style:v({opacity:O.value&&N.value!==null&&L.value.show?N.value===e.seriesIndex?1:.5:1})},null,14,Pe))),128)),(y(!0),p(l,null,x(X.value.slice(1),(e,t)=>(y(),p(`rect`,{key:`stack_separator_${t}`,x:e.start-.5,y:`0`,width:`1`,height:G.value.height,fill:R.value.backgroundColor,"pointer-events":`none`,class:g({animated:!W.value&&!w(z)})},null,10,Fe))),128)),(y(!0),p(l,null,x(X.value,(e,t)=>(y(),p(`rect`,{key:`stack_trap_${t}`,x:e.start,y:0,width:e.width,height:G.value.height,fill:`transparent`,stroke:`none`,class:g({animated:!W.value&&!w(z)}),onClick:()=>Z(e,t),onMouseenter:()=>vt({datapoint:e,seriesIndex:e.seriesIndex}),onMouseleave:t=>_t({datapoint:e,seriesIndex:e.seriesIndex})},null,42,Ie))),128))],8,Me),m(`rect`,{x:`0.5`,y:`0.5`,width:G.value.width-1,height:G.value.height-1,rx:Math.max(0,yt.value-.5),fill:`none`,stroke:R.value.backgroundColor,"stroke-width":`1`,"pointer-events":`none`},null,8,Le)],64)):(y(),p(`rect`,{key:1,x:2,y:1,width:G.value.width-4,height:G.value.height-2,stroke:`#CCCCCC`,"stroke-width":`2`,fill:`transparent`,rx:(G.value.height-4)/2},null,8,Re))],40,ke)),e.$slots.hint?(y(),p(`div`,ze,[S(e.$slots,`hint`,_(h({hint:P.value.a11y.translations.keyboardNavigation,isVisible:et.value})),void 0,!0)])):f(``,!0)]),I.value.show?(y(),p(`div`,{key:2,style:v(`background:transparent;margin:0 auto;margin:${I.value.margin};justify-content:${I.value.textAlign===`left`?`flex-start`:I.value.textAlign===`right`?`flex-end`:`center`}`),class:`vue-ui-sparkstackbar-legend`,"aria-label":`legend`,role:`toolbar`},[I.value.selectAllToggle.show&&q.value.length>2&&!w(z)?(y(),d(he,{key:0,backgroundColor:I.value.selectAllToggle.backgroundColor,color:I.value.selectAllToggle.color,fontSize:I.value.fontSize,checked:K.value.length>0,isCursorPointer:rt.value,onToggle:dt},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):f(``,!0),(y(!0),p(l,null,x(q.value,(e,t)=>(y(),p(`div`,{role:`button`,tabindex:`0`,"aria-pressed":K.value.includes(t),"aria-label":`${e.name}, ${K.value.includes(t)?`hidden`:`visible`}, ${e.proportionLabel}`,style:v(`font-size:${I.value.fontSize}px;cursor:${rt.value?`pointer`:`default`}`),class:g({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":K.value.includes(t)}),onClick:n=>{Y(t),Z(e,t,!0)},onFocus:t=>wt(e),onBlur:Tt,onKeydown:n=>Et(n,e,t)},[m(`div`,Ve,[(y(),p(`svg`,{height:`${I.value.fontSize}px`,width:`${I.value.fontSize}px`,viewBox:`0 0 10 10`},[m(`defs`,null,[be(me,{t:`radial`,id:`legend_grad_${t}-${D.value}`,stops:[[`0%`,w(z)?`#FFFFFF`:w(a)(w(ee)(e.color,.05),100-F.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`])]),F.value.gradient.show?(y(),p(`rect`,{key:0,x:`0`,y:`0`,width:`10`,height:`10`,rx:Q.value,fill:F.value.gradient.underlayerColor},null,8,Ue)):f(``,!0),m(`rect`,{x:`0`,y:`0`,width:`10`,height:`10`,rx:Q.value,fill:F.value.gradient.show?`url(#legend_grad_${t}-${D.value})`:e.color},null,8,We)],8,He)),w(z)?f(``,!0):(y(),p(l,{key:0},[m(`span`,{style:v(`color:${I.value.name.color}; font-weight:${I.value.name.bold?`bold`:`normal`}`)},C(e.name),5),W.value?f(``,!0):(y(),p(l,{key:0},[I.value.percentage.show?(y(),p(`span`,{key:0,style:v(`font-weight:${I.value.percentage.bold?`bold`:`normal`};color:${I.value.percentage.color}`)},C(K.value.includes(t)?` - `:e.proportionLabel),5)):f(``,!0),I.value.value.show?(y(),p(`span`,{key:1,style:v(`font-weight:${I.value.value.bold?`bold`:`normal`};color:${I.value.value.color}`)},` (`+C(w(ne)(I.value.value.formatter,e.value,w(n)({p:I.value.value.prefix,v:e.value,s:I.value.value.suffix,r:I.value.value.rounding}),{datapoint:e,seriesIndex:t}))+`) `,5)):f(``,!0)],64))],64))])],46,Be))),256))],4)):f(``,!0),be(w(qe),{teleportTo:L.value.teleportTo,show:O.value&&L.value.show,parent:Ze.value,backgroundColor:L.value.backgroundColor,color:L.value.color,fontSize:L.value.fontSize,borderRadius:L.value.borderRadius,borderColor:L.value.borderColor,borderWidth:L.value.borderWidth,backgroundOpacity:L.value.backgroundOpacity,position:L.value.position,content:Qe.value,isCustom:A.value,offsetX:L.value.offsetX,offsetY:-124+L.value.offsetY,blockShiftY:!0,smooth:L.value.smooth,backdropFilter:L.value.backdropFilter,smoothForce:L.value.smoothForce,smoothSnapThreshold:L.value.smoothSnapThreshold,isA11yMode:M.value===`keyboard`,a11yPosition:$e.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,_(h({...k.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,_(h({...k.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,_(h({...k.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`parent`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`content`,`isCustom`,`offsetX`,`offsetY`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),e.$slots.source?(y(),p(`div`,Ge,[S(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),S(e.$slots,`skeleton`,{},()=>[w(z)?(y(),d(le,{key:0})):f(``,!0)],!0)],4))}},[[`__scopeId`,`data-v-2bce158b`]]);export{Ee as n,Ke as t};