vue-data-ui 3.28.9 → 3.28.11

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 (349) 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-D6_O7PmZ.js → PackageVersion-ksOit8fp.js} +1 -1
  10. package/dist/PenAndPaper-BV5ODysA.js +1 -0
  11. package/dist/SlicerPreview-0m9E7Zh_.js +1 -0
  12. package/dist/StackChartTable-D-31a1zL.js +1 -0
  13. package/dist/{UserOptions-B9EyfU9n.js → UserOptions-K1N7zQRx.js} +1 -1
  14. package/dist/XyAnalysisOptions-CUtj1x2f.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-vXTjpYqq.js +1 -0
  86. package/dist/{render-common-BbY81Ao2.js → render-common-CPA2hfDW.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-0vvvimYP.js → useObjectBindings-D789Dz63.js} +1 -1
  95. package/dist/{userOptionsSlots-DYuo-E5m.js → userOptionsSlots-CWtXN5Q6.js} +1 -1
  96. package/dist/utils.js +1 -1
  97. package/dist/vue-data-ui-0NKIVNqt.js +1 -0
  98. package/dist/vue-data-ui.js +1 -1
  99. package/dist/vue-ui-3d-bar-Cs-_W1Av.js +19 -0
  100. package/dist/{vue-ui-accordion-DFxSW8ET.js → vue-ui-accordion-DxGxf-Rm.js} +1 -1
  101. package/dist/vue-ui-age-pyramid-cWWVFoCj.js +1 -0
  102. package/dist/vue-ui-annotator-D31LD4-s.js +331 -0
  103. package/dist/vue-ui-bullet-CMQzoLKs.js +34 -0
  104. package/dist/vue-ui-bump-SSu5eVbF.js +8 -0
  105. package/dist/vue-ui-candlestick-Cm9jS3n7.js +22 -0
  106. package/dist/vue-ui-carousel-table-D-F54W90.js +1 -0
  107. package/dist/vue-ui-chestnut-DNe1s8TT.js +1 -0
  108. package/dist/vue-ui-chord-DGzpBpuI.js +21 -0
  109. package/dist/vue-ui-circle-pack--iJQtXys.js +13 -0
  110. package/dist/vue-ui-cursor-B7DJRSGD.js +1 -0
  111. package/dist/vue-ui-dag-tsM65e_V.js +9 -0
  112. package/dist/vue-ui-dashboard-CC7IhQZu.js +1 -0
  113. package/dist/{vue-ui-digits-p2met3a2.js → vue-ui-digits-hv2QeC-H.js} +2 -2
  114. package/dist/vue-ui-donut-B9WXaiPn.js +47 -0
  115. package/dist/vue-ui-donut-evolution-Wz_-FYab.js +2 -0
  116. package/dist/vue-ui-donut-iyVVIGoJ.js +22 -0
  117. package/dist/vue-ui-dumbbell-p3Q2LkBV.js +9 -0
  118. package/dist/vue-ui-flow-BCH8YU8H.js +3 -0
  119. package/dist/vue-ui-funnel-DdrBD9oX.js +1 -0
  120. package/dist/vue-ui-galaxy-DYKEOEL-.js +1 -0
  121. package/dist/vue-ui-gauge-CPgvR_YB.js +1 -0
  122. package/dist/vue-ui-geo-DhJ3Wr_5.js +1 -0
  123. package/dist/vue-ui-gizmo-BTy4Vr1e.js +1 -0
  124. package/dist/{vue-ui-graph-BqnyGn9p.js → vue-ui-graph-C4kfE4G8.js} +3 -3
  125. package/dist/vue-ui-heatmap-lti43RhW.js +1 -0
  126. package/dist/vue-ui-hill-3GVfKQmi.js +1 -0
  127. package/dist/vue-ui-history-plot-DMTPygZA.js +2 -0
  128. package/dist/vue-ui-horizontal-bar-DwWo0CvX.js +4 -0
  129. package/dist/{vue-ui-kpi-D1Ps7D_O.js → vue-ui-kpi-BTMK37Ix.js} +1 -1
  130. package/dist/{vue-ui-label-W0oz08pp.js → vue-ui-label-CBrMoFDG.js} +2 -2
  131. package/dist/{vue-ui-mini-loader-OLYDdN3T.js → vue-ui-mini-loader-PsWZLMLF.js} +1 -1
  132. package/dist/vue-ui-molecule-rbDnRA7c.js +1 -0
  133. package/dist/vue-ui-mood-radar-8s1jnO3P.js +1 -0
  134. package/dist/vue-ui-nested-donuts-8bY4HvC-.js +19 -0
  135. package/dist/vue-ui-onion-CgLNDFrZ.js +5 -0
  136. package/dist/vue-ui-parallel-coordinate-plot-ms14eLus.js +9 -0
  137. package/dist/vue-ui-quadrant-6GgQZ8fW.js +2 -0
  138. package/dist/vue-ui-quick-chart-CzRbFXIS.js +16 -0
  139. package/dist/vue-ui-radar-BxsD2JBj.js +1 -0
  140. package/dist/vue-ui-rating-D0QvpD3V.js +1 -0
  141. package/dist/vue-ui-relation-circle-BFPAlaWQ.js +1 -0
  142. package/dist/vue-ui-ridgeline-G2m7eFWe.js +2 -0
  143. package/dist/vue-ui-rings-l_BLWL48.js +1 -0
  144. package/dist/vue-ui-scatter-C4hXe3DM.js +9 -0
  145. package/dist/{vue-ui-skeleton-98OnGJ2N.js → vue-ui-skeleton-BLyh-ESb.js} +3 -3
  146. package/dist/{vue-ui-smiley-Cht1imV-.js → vue-ui-smiley-C00q-teB.js} +1 -1
  147. package/dist/{vue-ui-spark-trend-C4uYyXEy.js → vue-ui-spark-trend-D0hz9kNt.js} +1 -1
  148. package/dist/vue-ui-sparkbar-Dweyr8h-.js +1 -0
  149. package/dist/{vue-ui-sparkgauge-dBZzMqn5.js → vue-ui-sparkgauge-DQfCXKFj.js} +1 -1
  150. package/dist/vue-ui-sparkhistogram-DOfAu86W.js +1 -0
  151. package/dist/vue-ui-sparkline-DuX09S8A.js +1 -0
  152. package/dist/vue-ui-sparkstackbar-vXOpiyrI.js +1 -0
  153. package/dist/vue-ui-stackbar-DsrwNY0p.js +29 -0
  154. package/dist/vue-ui-stackline-e7EYZet7.js +39 -0
  155. package/dist/vue-ui-strip-plot-2DxzeUXU.js +2 -0
  156. package/dist/vue-ui-table-B344jLaG.js +14 -0
  157. package/dist/vue-ui-table-heatmap-BwoRcqFD.js +1 -0
  158. package/dist/vue-ui-table-sparkline-itq8yRCe.js +1 -0
  159. package/dist/vue-ui-thermometer-BSRjS7l3.js +1 -0
  160. package/dist/vue-ui-timer-DM-urc2D.js +64 -0
  161. package/dist/vue-ui-tiremarks-CbIOAO3F.js +1 -0
  162. package/dist/vue-ui-treemap-Cgal4H5O.js +1 -0
  163. package/dist/vue-ui-waffle-BZFI7JLd.js +1 -0
  164. package/dist/vue-ui-wheel-DdKm_Vd8.js +1 -0
  165. package/dist/vue-ui-word-cloud-D40vUb5e.js +4 -0
  166. package/dist/vue-ui-world-BseI3A0C.js +19 -0
  167. package/dist/vue-ui-xy-Bl-DUFcf.js +27 -0
  168. package/dist/vue-ui-xy-DNVd3FPA.js +31 -0
  169. package/dist/vue-ui-xy-canvas-CRSisgSA.js +9 -0
  170. package/dist/vue_ui_3d_bar-Dm8zmL8w.js +1 -0
  171. package/dist/vue_ui_age_pyramid-DXJeenVU.js +1 -0
  172. package/dist/vue_ui_bullet-Biewiy1l.js +1 -0
  173. package/dist/vue_ui_bump-DZoGcET0.js +1 -0
  174. package/dist/vue_ui_candlestick-DpPpEElM.js +1 -0
  175. package/dist/vue_ui_chestnut-BKcntsvv.js +1 -0
  176. package/dist/vue_ui_chord-Crjq1pgV.js +1 -0
  177. package/dist/vue_ui_circle_pack-DarCZyF2.js +1 -0
  178. package/dist/vue_ui_dag-B-4OxeQQ.js +1 -0
  179. package/dist/vue_ui_donut-B2W2nyAS.js +1 -0
  180. package/dist/vue_ui_donut_evolution-BvIyBtun.js +1 -0
  181. package/dist/vue_ui_dumbbell-DyyFLbhQ.js +1 -0
  182. package/dist/vue_ui_flow-aeVlnSsc.js +1 -0
  183. package/dist/vue_ui_funnel-CWrEr790.js +1 -0
  184. package/dist/vue_ui_galaxy-DvaSrGxT.js +1 -0
  185. package/dist/vue_ui_gauge-Brc1-auP.js +1 -0
  186. package/dist/vue_ui_geo-COGanKF8.js +1 -0
  187. package/dist/vue_ui_graph-31AYnh4c.js +1 -0
  188. package/dist/vue_ui_heatmap-Q8YMKNq2.js +1 -0
  189. package/dist/vue_ui_hill-Dbv_VVlr.js +1 -0
  190. package/dist/vue_ui_history_plot-C0kFJh-f.js +1 -0
  191. package/dist/vue_ui_horizontal_bar-uuJ0_9O6.js +1 -0
  192. package/dist/vue_ui_label-D3BzxTFQ.js +1 -0
  193. package/dist/vue_ui_molecule-VokyVu8q.js +1 -0
  194. package/dist/vue_ui_mood_radar-i6r1Gp6v.js +1 -0
  195. package/dist/vue_ui_nested_donuts-BAb9o0Ro.js +1 -0
  196. package/dist/vue_ui_onion-BMjwCChN.js +1 -0
  197. package/dist/vue_ui_parallel_coordinate_plot-Wb2Xmpjs.js +1 -0
  198. package/dist/vue_ui_quadrant-DbLNBD92.js +1 -0
  199. package/dist/vue_ui_quick_chart-KljadV9E.js +1 -0
  200. package/dist/vue_ui_radar-Pd3xOzjc.js +1 -0
  201. package/dist/vue_ui_relation_circle-BLo4XQFQ.js +1 -0
  202. package/dist/vue_ui_ridgeline-BIaWjw_v.js +1 -0
  203. package/dist/vue_ui_rings-C0puwNW1.js +1 -0
  204. package/dist/vue_ui_scatter-4as114Wa.js +1 -0
  205. package/dist/vue_ui_spark_trend-BgPQfeCz.js +1 -0
  206. package/dist/vue_ui_sparkbar-CvcZ5nwT.js +1 -0
  207. package/dist/vue_ui_sparkgauge-D3xirz2w.js +1 -0
  208. package/dist/vue_ui_sparkhistogram-E6G1761_.js +1 -0
  209. package/dist/vue_ui_sparkline-DKZdnbap.js +1 -0
  210. package/dist/vue_ui_sparkstackbar-DZX34uPS.js +1 -0
  211. package/dist/vue_ui_stackbar-BrAzeA3Y.js +1 -0
  212. package/dist/vue_ui_stackline-B6ylXHBJ.js +1 -0
  213. package/dist/vue_ui_strip_plot-uxKGttVC.js +1 -0
  214. package/dist/vue_ui_table_heatmap-DVMDsaVJ.js +1 -0
  215. package/dist/vue_ui_table_sparkline-BQO5A9u8.js +1 -0
  216. package/dist/vue_ui_thermometer-BAFdvXZW.js +1 -0
  217. package/dist/vue_ui_tiremarks-LwElhY5p.js +1 -0
  218. package/dist/vue_ui_treemap-JB0DfAmd.js +1 -0
  219. package/dist/vue_ui_waffle-BVf3Wcda.js +1 -0
  220. package/dist/vue_ui_wheel-bdYAONK7.js +1 -0
  221. package/dist/vue_ui_word_cloud-Dn2Ffjxb.js +1 -0
  222. package/dist/vue_ui_xy-BfaXjpvS.js +1 -0
  223. package/dist/vue_ui_xy_canvas-cQVme5sy.js +1 -0
  224. package/package.json +9 -9
  225. package/dist/BaseDraggableDialog-BK7dj9O6.js +0 -1
  226. package/dist/BaseZoomControls-JSk9zW3D.js +0 -1
  227. package/dist/ColorPicker-CwYfNvwH.js +0 -1
  228. package/dist/PenAndPaper-DoNTA-SV.js +0 -1
  229. package/dist/SlicerPreview-ChKbdZSU.js +0 -1
  230. package/dist/XyAnalysisOptions-djGOJdKc.js +0 -1
  231. package/dist/package-BEq7yyhf.js +0 -1
  232. package/dist/resolveChartConfig-CIhClE5R.js +0 -1
  233. package/dist/useConfig-By3Vb5kz.js +0 -1
  234. package/dist/vue-data-ui-BwiGr37w.js +0 -1
  235. package/dist/vue-ui-3d-bar-C2igj6OX.js +0 -19
  236. package/dist/vue-ui-age-pyramid-DOG_ZOgO.js +0 -1
  237. package/dist/vue-ui-annotator-BnR2XnsL.js +0 -331
  238. package/dist/vue-ui-bullet-HUKP90GR.js +0 -34
  239. package/dist/vue-ui-bump-BuHuxEzm.js +0 -8
  240. package/dist/vue-ui-candlestick-CZkyowA5.js +0 -22
  241. package/dist/vue-ui-carousel-table-B73USTMi.js +0 -1
  242. package/dist/vue-ui-chestnut-VdMHjsWk.js +0 -1
  243. package/dist/vue-ui-chord-DfWjMAuo.js +0 -21
  244. package/dist/vue-ui-circle-pack-ByV3SOkF.js +0 -13
  245. package/dist/vue-ui-cursor-D3E3f7Lc.js +0 -1
  246. package/dist/vue-ui-dag-DlllVyCV.js +0 -9
  247. package/dist/vue-ui-dashboard-C9aGsEAi.js +0 -1
  248. package/dist/vue-ui-donut-BlQXnf7O.js +0 -47
  249. package/dist/vue-ui-donut-CZbBq7bs.js +0 -22
  250. package/dist/vue-ui-donut-evolution-Csq1sqhK.js +0 -2
  251. package/dist/vue-ui-dumbbell-ChLfyyGq.js +0 -9
  252. package/dist/vue-ui-flow-DfEHi_Cq.js +0 -3
  253. package/dist/vue-ui-funnel-QCG-rmsx.js +0 -1
  254. package/dist/vue-ui-galaxy-DFTeXUse.js +0 -1
  255. package/dist/vue-ui-gauge-XTx--A-H.js +0 -1
  256. package/dist/vue-ui-geo-BXB5xFcV.js +0 -1
  257. package/dist/vue-ui-gizmo-COJHVo7O.js +0 -1
  258. package/dist/vue-ui-heatmap-CPq3bcnS.js +0 -1
  259. package/dist/vue-ui-hill-DKm3PjHT.js +0 -1
  260. package/dist/vue-ui-history-plot-B5OPsHZ1.js +0 -2
  261. package/dist/vue-ui-horizontal-bar-C8SymyhN.js +0 -4
  262. package/dist/vue-ui-molecule-f-GNAQ0p.js +0 -1
  263. package/dist/vue-ui-mood-radar-kp-jOb4S.js +0 -1
  264. package/dist/vue-ui-nested-donuts-DCCSKIGa.js +0 -19
  265. package/dist/vue-ui-onion-KqzGj1z_.js +0 -5
  266. package/dist/vue-ui-parallel-coordinate-plot-dn_41Wv5.js +0 -9
  267. package/dist/vue-ui-quadrant-CP8n4v5B.js +0 -2
  268. package/dist/vue-ui-quick-chart-D8PbGpSw.js +0 -17
  269. package/dist/vue-ui-radar-ybR3N44-.js +0 -1
  270. package/dist/vue-ui-rating-B9HeTCLa.js +0 -1
  271. package/dist/vue-ui-relation-circle-B0PwfFpT.js +0 -1
  272. package/dist/vue-ui-ridgeline-BnslUzA-.js +0 -2
  273. package/dist/vue-ui-rings-B-cOW0Dw.js +0 -1
  274. package/dist/vue-ui-scatter-BX5cTC01.js +0 -9
  275. package/dist/vue-ui-sparkbar-BcZyqPB9.js +0 -1
  276. package/dist/vue-ui-sparkhistogram-DcbAY6vr.js +0 -1
  277. package/dist/vue-ui-sparkline-BizzsAR5.js +0 -1
  278. package/dist/vue-ui-sparkstackbar-xlg048YB.js +0 -1
  279. package/dist/vue-ui-stackbar-2AX-m3Pb.js +0 -29
  280. package/dist/vue-ui-stackline-GKaZJh8y.js +0 -39
  281. package/dist/vue-ui-strip-plot-BhxIrd67.js +0 -2
  282. package/dist/vue-ui-table-D9FJBxrk.js +0 -14
  283. package/dist/vue-ui-table-heatmap-SGJGI5Wq.js +0 -1
  284. package/dist/vue-ui-table-sparkline-B6ynMUGE.js +0 -1
  285. package/dist/vue-ui-thermometer-SE_c51TO.js +0 -1
  286. package/dist/vue-ui-timer-B1JNZk6j.js +0 -64
  287. package/dist/vue-ui-tiremarks-Cr8EG4T5.js +0 -1
  288. package/dist/vue-ui-treemap-DKJVe7v7.js +0 -1
  289. package/dist/vue-ui-waffle-DSq3l2sE.js +0 -1
  290. package/dist/vue-ui-wheel-CcYOzS05.js +0 -1
  291. package/dist/vue-ui-word-cloud-gogYiwIU.js +0 -4
  292. package/dist/vue-ui-world-C2zGhq_U.js +0 -19
  293. package/dist/vue-ui-xy-B2lrTGG4.js +0 -31
  294. package/dist/vue-ui-xy-CpS-ASnd.js +0 -27
  295. package/dist/vue-ui-xy-canvas-CXBsRU35.js +0 -9
  296. package/dist/vue_ui_3d_bar-DmAve5Ri.js +0 -1
  297. package/dist/vue_ui_age_pyramid-CL0Ef8Ov.js +0 -1
  298. package/dist/vue_ui_bullet-CwVYkpjd.js +0 -1
  299. package/dist/vue_ui_bump-KJL9GYr4.js +0 -1
  300. package/dist/vue_ui_candlestick-DKvha_Ab.js +0 -1
  301. package/dist/vue_ui_chestnut-BxxivKN7.js +0 -1
  302. package/dist/vue_ui_chord-Fq6VBRT1.js +0 -1
  303. package/dist/vue_ui_circle_pack-CfXkXi7v.js +0 -1
  304. package/dist/vue_ui_dag-1b_dLSym.js +0 -1
  305. package/dist/vue_ui_donut-T5PeOqvf.js +0 -1
  306. package/dist/vue_ui_donut_evolution-CVoh3twl.js +0 -1
  307. package/dist/vue_ui_dumbbell-BMcxK0N3.js +0 -1
  308. package/dist/vue_ui_flow-kvV56Es9.js +0 -1
  309. package/dist/vue_ui_funnel-CaEV5hG7.js +0 -1
  310. package/dist/vue_ui_galaxy-B94QInxc.js +0 -1
  311. package/dist/vue_ui_gauge-BJhb6yqE.js +0 -1
  312. package/dist/vue_ui_geo-DL1SMQHp.js +0 -1
  313. package/dist/vue_ui_graph-B1ACwQj7.js +0 -1
  314. package/dist/vue_ui_heatmap-kh5NMmwf.js +0 -1
  315. package/dist/vue_ui_hill-DQi4pQCG.js +0 -1
  316. package/dist/vue_ui_history_plot-soyqUW4Y.js +0 -1
  317. package/dist/vue_ui_horizontal_bar-C4ulIxeT.js +0 -1
  318. package/dist/vue_ui_label-dtPqyFsj.js +0 -1
  319. package/dist/vue_ui_molecule-Bw1UW1Na.js +0 -1
  320. package/dist/vue_ui_mood_radar-CXaBdJnv.js +0 -1
  321. package/dist/vue_ui_nested_donuts-CRtGsJcz.js +0 -1
  322. package/dist/vue_ui_onion-C9BedU_-.js +0 -1
  323. package/dist/vue_ui_parallel_coordinate_plot-Cs_xXAG5.js +0 -1
  324. package/dist/vue_ui_quadrant-BUv-SqzP.js +0 -1
  325. package/dist/vue_ui_quick_chart-BRfcRW6Z.js +0 -1
  326. package/dist/vue_ui_radar-68iK9Fam.js +0 -1
  327. package/dist/vue_ui_relation_circle-Dkv-cSB6.js +0 -1
  328. package/dist/vue_ui_ridgeline-Di26JtQu.js +0 -1
  329. package/dist/vue_ui_rings-BcDDXHpQ.js +0 -1
  330. package/dist/vue_ui_scatter-C50uFYQL.js +0 -1
  331. package/dist/vue_ui_spark_trend-BOM3zo64.js +0 -1
  332. package/dist/vue_ui_sparkbar-Bpx7QrFq.js +0 -1
  333. package/dist/vue_ui_sparkgauge-D2Hk6bvS.js +0 -1
  334. package/dist/vue_ui_sparkhistogram-ChwOkoMb.js +0 -1
  335. package/dist/vue_ui_sparkline-CvL_e9L8.js +0 -1
  336. package/dist/vue_ui_sparkstackbar-Chtog7hC.js +0 -1
  337. package/dist/vue_ui_stackbar-BkBIi_bL.js +0 -1
  338. package/dist/vue_ui_stackline-D7b63K84.js +0 -1
  339. package/dist/vue_ui_strip_plot-CwMowrhT.js +0 -1
  340. package/dist/vue_ui_table_heatmap-vfeY6r97.js +0 -1
  341. package/dist/vue_ui_table_sparkline-Dlfbza49.js +0 -1
  342. package/dist/vue_ui_thermometer-CRijq6H6.js +0 -1
  343. package/dist/vue_ui_tiremarks-8HFfABNF.js +0 -1
  344. package/dist/vue_ui_treemap-Bv4Rdl5_.js +0 -1
  345. package/dist/vue_ui_waffle-BbBLSluB.js +0 -1
  346. package/dist/vue_ui_wheel-C-479bvJ.js +0 -1
  347. package/dist/vue_ui_word_cloud-DBiJtSyL.js +0 -1
  348. package/dist/vue_ui_xy-CJBM9F6W.js +0 -1
  349. package/dist/vue_ui_xy_canvas-CT-FN9rU.js +0 -1
@@ -1,39 +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-By3Vb5kz.js";import{$ as a,B as o,D as s,Dt as c,Ft as l,Ht as u,J as d,Jt as f,M as p,Ot as m,P as h,S as g,U as _,X as ee,Zt as v,_ as te,_t as ne,at as re,b as ie,c as ae,dt as oe,en as se,gt as ce,i as le,in as ue,nn as de,nt as fe,pt as pe,t as me,tn as he,v as ge,w as _e,wt as ve,yt as ye,zt as be}from"./lib-rPeBMZrn.js";import{n as xe,t as Se}from"./BaseScanner-8NdoBs7B.js";import{n as Ce,t as we}from"./useHints-C-TwxM0Y.js";import{t as Te}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Ee}from"./useNestedProp-DnGoh-XS.js";import{t as De}from"./useThemeCheck-BKNRbGeC.js";import{t as Oe}from"./img-D4RQwASc.js";import{n as ke}from"./Title-BliHuXfT.js";import{t as Ae}from"./useChartExport-BZts4KFb.js";import{n as je,t as Me}from"./tableIntegration-CNoJ1CIY.js";import{n as Ne,t as Pe}from"./userOptionsSlots-DYuo-E5m.js";import{n as Fe,r as Ie,t as Le}from"./useTimeLabels-Das5O74F.js";import{t as Re}from"./usePrinter-DVf3YcG5.js";import{t as ze}from"./useTransitions-ChGGrtrv.js";import{t as Be}from"./useStableElementSize-CegFbRlF.js";import{t as Ve}from"./useSvgLabelLayout-42Kats14.js";import{t as He}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Ue}from"./Shape-CRe8woTu.js";import{c as We}from"./canvas-lib-22VpOI4_.js";import{t as Ge}from"./useResponsive-CENUxfEL.js";import{t as Ke}from"./DefGrad-DKMq1REY.js";import{t as qe}from"./SlicerPreview-ChKbdZSU.js";import{t as Je}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ye}from"./A11yDataTable-DWNlWXzs.js";import{t as Xe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Qe}from"./annotationViewport-X8fvs7pz.js";import{t as $e}from"./Legend-DM0ClX3D.js";import{t as et}from"./vue_ui_stackline-D7b63K84.js";import{Fragment as y,Teleport as tt,computed as b,createBlock as x,createCommentVNode as S,createElementBlock as C,createElementVNode as w,createSlots as nt,createTextVNode as rt,createVNode as it,defineAsyncComponent as at,guardReactiveProps as ot,mergeProps as st,nextTick as ct,normalizeClass as T,normalizeProps as lt,normalizeStyle as ut,onBeforeUnmount as dt,onMounted as ft,openBlock as E,ref as D,renderList as O,renderSlot as k,resolveDynamicComponent as pt,shallowRef as mt,toDisplayString as ht,toRefs as gt,unref as A,useSlots as _t,watch as vt,watchEffect as yt,withCtx as j}from"vue";var bt=/* @__PURE__ */ e({default:()=>dn}),xt=[`id`],St=[`id`],Ct=[`id`],wt={style:{position:`relative`}},Tt=[`aria-describedby`,`xmlns`,`viewBox`],Et=[`id`],Dt=[`x`,`y`,`width`,`height`],Ot={key:0},kt=[`x`,`y`,`width`,`height`],At={key:1},jt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Nt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ft=[`x`,`y`,`font-size`,`fill`,`font-weight`],It=[`transform`,`font-size`,`fill`,`font-weight`],Lt=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`stroke-dasharray`],Rt=[`clip-path`],zt=[`d`,`fill`,`opacity`],Bt=[`d`,`stroke`,`stroke-width`],Vt=[`x1`,`x2`,`y1`,`y2`,`stroke`],Ht=[`transform`,`font-size`,`font-weight`,`fill`,`text-anchor`],Ut={key:0},Wt={key:1},Gt=[`text-anchor`,`font-size`,`font-weight`,`fill`,`stroke`,`transform`,`onClick`],Kt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`,`onClick`],qt=[`x`,`y`,`height`,`width`,`fill`],Jt={key:0},Yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Xt=[`clip-path`],Zt={key:0},Qt=[`transform`,`font-size`,`fill`,`font-weight`],$t=[`transform`,`font-size`,`font-weight`,`fill`],en=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],tn=[`data-start`,`data-end`],nn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},rn={key:5,class:`vue-data-ui-watermark`},an=[`onClick`],on={key:0},sn={key:1},cn=[`innerHTML`],ln=[`id`],un=280,dn=/*#__PURE__*/ Te({__name:`vue-ui-stackline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},selectedXIndex:{type:Number,default:void 0},zoomState:{type:Object,default:null}},emits:[`selectDatapoint`,`selectLegend`,`selectTimeLabel`,`selectX`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Te,emit:bt}){let dn=at(()=>import(`./Tooltip-C1q0Qoh7.js`)),fn=at(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),pn=at(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),mn=at(()=>import(`./DataTable-Dof6yhO7.js`)),hn=at(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),gn=at(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),_n=at(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),vn=at(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_stackline:yn}=i(),{isThemeValid:bn,warnInvalidTheme:xn}=De(),Sn=_t(),M=e,N=bt,Cn=b({get(){return!!M.dataset&&M.dataset.length},set(e){return e}}),wn=D(null),P=D(ee()),Tn=D(!1),F=D([]),En=D(0),Dn=D(null),On=D(null),kn=D(null),An=D(null),jn=D(null),Mn=D(!1),Nn=D(!1),Pn=D(!1),Fn=D(0),In=D(0),Ln=D(0),Rn=D(!1),zn=D(null),Bn=D(null),Vn=D(!1),Hn=D(null),Un=D(null),Wn=D(null),Gn=D(null),Kn=D(null),qn=mt(null),Jn=D(!1),Yn=D(0),Xn=D(0),Zn=D(null),Qn=D({x:0,y:0}),$n=D(`pointer`),er=Be({elementRef:qn,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{rr()}});function tr(){qn.value=wn.value?.parentNode??null}function nr(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function rr(){let e=++Xn.value;Jn.value=!1,await ct(),await nr(),await nr(),e===Xn.value&&(Yn.value+=1,Jn.value=!0)}let ir=D(null),I=D(!1);function ar(){I.value=!I.value}ft(()=>{tr(),er.start(),Rn.value=!0,Mr(),rr()});let L=D(_r()),R=b(()=>L.value.userOptions),z=b(()=>L.value.style.chart.grid.x.timeLabels),B=b(()=>L.value.style.chart.grid),V=b(()=>L.value.style.chart.lines),H=b(()=>L.value.style.chart.tooltip),U=b(()=>L.value.style.chart);Ce({config:()=>L.value,dataset:()=>M.dataset,component:`VueUiStackline`,rules:[we.emptyArray,{test:e=>e.some(e=>e.series.length>200),message:[`👀 Some series have > 200 datapoints, which can impact performance. Consider:`,``,`▶️ Aggregating data to larger time units, to reduce the number of datapoints.`,``,`▶️ Using filters to constraint the data to a specific time range.`]},{test:e=>e.length>6,message:[`👀 The number of series > 6, which can make the chart hard to read. Consider:`,``,`▶️ Grouping small values into an "Other" category.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]}]});let{transitionEnabled:or}=ze({config:()=>L.value.transitions,dataset:()=>M.dataset}),sr=b(()=>L.value.userOptions.useCursorPointer),cr=b(()=>ue({defaultConfig:{userOptions:{show:!1},useCssAnimation:!1,table:{show:!1},tooltip:{show:!1},style:{chart:{backgroundColor:`#99999930`,lines:{totalValues:{show:!1},dataLabels:{show:!1}},grid:{frame:{stroke:`#6A6A6A`},scale:{scaleMin:0,scaleMax:144},x:{axisColor:`#6A6A6A`,linesColor:`#6A6A6A`,axisName:{show:!1},timeLabels:{show:!1}},y:{axisColor:`#6A6A6A`,linesColor:`#6A6A6A`,axisName:{show:!1},axisLabels:{show:!1}}},legend:{backgroundColor:`transparent`},padding:{left:24,right:24,bottom:12},zoom:{show:!1,startIndex:null,endIndex:null,keepState:!1}}}},userConfig:L.value.skeletonConfig??{}})),{loading:lr,FINAL_DATASET:ur,manualLoading:dr}=xe({...gt(M),FINAL_CONFIG:L,prepareConfig:_r,callback:()=>{Promise.resolve().then(async()=>{(!U.value.zoom.keepState||!aa.value||Y.value.start===0&&Y.value.end===0)&&await sa()})},skeletonDataset:M.config?.skeletonDataset??[{name:``,series:[3,2,1,5,13,21,8,89,34,55],color:`#8A8A8A`},{name:``,series:[1,2,3,5,8,13,21,34,55,89],color:`#CACACA`}],skeletonConfig:ue({defaultConfig:L.value,userConfig:cr.value})}),{userOptionsVisible:fr,setUserOptionsVisibility:pr,keepUserOptionState:mr}=Xe({config:L.value}),{svgRef:W}=Ze({config:U.value.title});function hr(){Vn.value=!0,pr(!0)}function gr(){pr(!1),Vn.value=!1,Zn.value=null,$n.value=`pointer`,Tn.value=!1,$.value=null,N(`selectX`,{index:null,indexLabel:null,dataset:null})}function _r(){let e=Ee({userConfig:M.config,defaultConfig:yn}),t={};M.config&&ve(M.config,`style.chart.grid.x.timeLabels.showFirstAndLast`)&&(e.style.chart.grid.x.timeLabels.showFirstAndLast=!!M.config.style.chart.grid.x.timeLabels.showFirstAndLast);let n=e.theme;if(n){if(!bn.value(e))xn(e),t=e;else{let r=Ee({userConfig:et[n]||M.config,defaultConfig:e});t={...Ee({userConfig:M.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:de[n]||u}}}else t=e;return t}let vr=b(()=>V.value.dataLabels.hideUnderValue!==null),yr=b(()=>V.value.dataLabels.hideUnderPercentage!==null),br=v(M.config);vt(()=>M.config,(e,t)=>{let n=v(e),r=n!==br;br=n;let i=_r();r?(lr.value||(L.value=i),fr.value=!L.value.userOptions.showOnChartHover,G.value.dataLabels.show=V.value.dataLabels.show,G.value.showTable=L.value.table.show,G.value.showTooltip=H.value.show,Mr({resetSlicer:!U.value.zoom.keepState}),Fn.value+=1,In.value+=1,Ln.value+=1,Er.value.width=U.value.width,Er.value.height=U.value.height,Er.value.paddingRatio={top:U.value.padding.top/U.value.height,right:U.value.padding.right/U.value.width,bottom:U.value.padding.bottom/U.value.height,left:U.value.padding.left/U.value.width},tr(),rr(),!U.value.zoom.keepState||!aa.value||Y.value.start===0&&Y.value.end===0?sa():Ei()):(L.value.style.chart.tooltip=i.style.chart.tooltip,G.value.showTooltip=L.value.style.chart.tooltip.show)},{deep:!0}),vt(()=>M.dataset,e=>{Array.isArray(e)&&e.length>0&&(dr.value=!1),U.value.zoom.keepState?Ei():ki(),tr(),rr()},{deep:!0});let G=D({dataLabels:{show:V.value.dataLabels.show},showTable:L.value.table.show,showTooltip:H.value.show});vt(L,()=>{G.value={dataLabels:{show:V.value.dataLabels.show},showTable:L.value.table.show,showTooltip:H.value.show}},{immediate:!0});let{isPrinting:xr,isImaging:Sr,generatePdf:Cr,generateImage:wr}=Re({elementId:`stackline_${P.value}`,fileName:U.value.title.text||`vue-ui-stackline`,options:L.value.userOptions.print}),Tr=b(()=>L.value.userOptions.show&&!U.value.title.text),Er=D({width:U.value.width,height:U.value.height,paddingRatio:{top:U.value.padding.top/U.value.height,right:U.value.padding.right/U.value.width,bottom:U.value.padding.bottom/U.value.height,left:U.value.padding.left/U.value.width}}),Dr=b(()=>_e(L.value.customPalette)),Or=mt(null),kr=mt(null),Ar=D(null),jr=b(()=>L.value.debug);function Mr({resetSlicer:e=!0}={}){if(be(M.dataset)?(re({componentName:`VueUiStackline`,type:`dataset`,debug:jr.value}),dr.value=!0):M.dataset.forEach((e,t)=>{ye({datasetObject:e,requiredAttributes:[`name`,`series`]}).forEach(e=>{Cn.value=!1,re({componentName:`VueUiStackline`,type:`datasetSerieAttribute`,property:e,index:t,debug:jr.value}),dr.value=!0})}),be(M.dataset)||(dr.value=L.value.loading),setTimeout(()=>{Nn.value=!0},10),L.value.responsive){let e=We(()=>{Nn.value=!1;let{width:e,height:t}=Ge({chart:wn.value,noTitle:An.value,title:U.value.title.text?Dn.value:null,legend:U.value.legend.show?On.value:null,slicer:U.value.zoom.show&&J.value>6?kn.value.$el:null,source:jn.value});requestAnimationFrame(()=>{Er.value.width=e,Er.value.height=t-12,Pn.value=!0,clearTimeout(Ar.value),Ar.value=setTimeout(()=>{Nn.value=!0},10)})});Or.value&&(kr.value&&Or.value.unobserve(kr.value),Or.value.disconnect()),Or.value=new ResizeObserver(e),kr.value=wn.value.parentNode,Or.value.observe(kr.value)}e&&sa()}dt(()=>{er.stop(),Or.value&&(kr.value&&Or.value.unobserve(kr.value),Or.value.disconnect())});let Nr=b(()=>B.value.y.position===`right`),{metrics:Pr,ready:Fr,settling:Ir,update:Lr}=Ve({svgRef:W,canMeasure:()=>(!L.value.responsive||Pn.value)&&(!z.value.show||Ui.value),measure:e=>{let t=Wn.value,n=Gn.value;return{scaleLabelsWidth:B.value.y.axisLabels.show?e(t).textWidth:0,yAxisLabelWidth:Un.value?e(Un.value).rotatedWidth+B.value.y.axisName.fontSize+B.value.y.axisName.offsetX:0,xAxisLabelHeight:e(Hn.value).height,timeLabelsHeight:z.value.show?e(n).height:0,right:0}}}),Rr=b(()=>Pr.value.xAxisLabelHeight+Pr.value.timeLabelsHeight),K=b(()=>{let{height:e,width:t}=Er.value,{right:n}=Er.value.paddingRatio,r=V.value.totalValues.show&&M.dataset&&M.dataset.length>1?V.value.totalValues.fontSize*1.3:0,{scaleLabelsWidth:i,yAxisLabelWidth:a}=Pr.value,o=i+a,s=Nr.value?0:o,c=Nr.value?o:0,l=U.value.padding.top+r,u=t-t*n-Pr.value.right-c,d=e-U.value.padding.bottom-Rr.value-r,f=U.value.padding.left+s,p=t-f-t*n-Pr.value.right-c,m=e-l-U.value.padding.bottom-Rr.value-r;return{chartHeight:Math.max(0,e),chartWidth:Math.max(0,t),top:l,right:Math.max(0,u),bottom:Math.max(0,d),left:Math.max(0,f),width:Math.max(0,p),height:Math.max(0,m),offsetLeftAxis:s,offsetRightAxis:c,scaleLabelsWidth:i,yAxisLabelWidth:a}}),zr=b(()=>{let{left:e,top:t,width:n,height:r}=K.value,i=Y.value.start,a=Y.value.end,o=Math.max(1,a-i),s=Math.max(0,Math.min(o,(Ur.value.start??i)-i)),c=Math.max(0,Math.min(o,(Ur.value.end??a)-i)),l=Math.max(0,c-s),u={fill:U.value.zoom.preview.fill,stroke:U.value.zoom.preview.stroke,"stroke-width":U.value.zoom.preview.strokeWidth,"stroke-dasharray":U.value.zoom.preview.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:{pointerEvents:`none`,transition:`none !important`,animation:`none !important`}},d=n/o;return{x:e+s*d,y:t,width:l*d,height:r,...u}}),q=b(()=>ur.value.map((e,t)=>{let n=ee(),r=g(e.color)||Dr.value[t]||u[t]||u[t%u.length];return{...e,shape:e.shape||`circle`,standalone:!!e.standalone,series:JSON.parse(JSON.stringify(e.series)).map(e=>V.value.distributed?Math.abs(e):e),seriesSource:e.series,signedSeries:e.series.map(e=>e>=0?1:-1),absoluteIndex:t,id:n,color:r}})),Br=b(()=>q.value.filter(e=>!F.value.includes(e.id)&&!e.standalone)),Vr=b(()=>q.value.filter(e=>!F.value.includes(e.id)&&e.standalone)),J=b(()=>{let e=Math.max(...q.value.filter(e=>!F.value.includes(e.id)).map(e=>e.series.length));return isFinite(e)?e:Math.max(...q.value.map(e=>e.series.length))});function Hr(e){ir.value=e}let Y=D({start:0,end:Math.max(...ur.value.map(e=>e.series.length))}),Ur=D({start:0,end:Math.max(...ur.value.map(e=>e.series.length))}),Wr=D(!1),Gr=D(!1),Kr=D(!1),qr=D(`matrix(1, 0, 0, 1, 0, 0)`),Jr=D(!1),Yr=0,Xr=0,Zr=0,Qr=0,$r=D(null),ei=D(null),ti=D(null),ni=D(!1),ri=D({time:0,x:0,y:0,pointerType:null}),ii=b(()=>U.value.zoom?.dragToZoom),ai=b(()=>ii.value.show&&Cn.value&&aa.value&&!lr.value),oi=null,si={};function ci(e){return(Y.value.start??0)+(e??0)}let li=b(()=>U.value.zoom.preview.enable&&(Ur.value.start!==Y.value.start||Ur.value.end!==Y.value.end));function ui(e,t){Ur.value[e]=t}function di(e,t=Y.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function fi(e){let t=di(e);t&&N(`update:zoomState`,t)}function pi(){oi&&=(cancelAnimationFrame(oi),null),si={}}function mi(e=Y.value){return{start:Number(e.start),end:Number(e.end)}}function hi(e,t){let n=Number(K.value?.left)||0,r=Math.max(0,Number(K.value?.width)||0),i=Number(t?.start),a=Number(t?.end),o=a-i;return!Number.isFinite(e)||!Number.isFinite(i)||!Number.isFinite(a)||o<=0?n:o<=1?n+r/2:n+(e-i)/(o-1)*r}function gi(){if(V.value.distributed)return null;let e=(Vi.value||[]).filter(e=>Number.isFinite(e?.value)&&Number.isFinite(e?.y));if(e.length<2)return null;let t=e.reduce((e,t)=>t.value<e.value?t:e),n=e.reduce((e,t)=>t.value>e.value?t:e);return n.value===t.value||n.y===t.y?null:{minValue:t.value,maxValue:n.value,minY:t.y,maxY:n.y}}function _i(e,t){if(!t||!Number.isFinite(e))return Number(K.value?.bottom)||0;let n=t.maxValue-t.minValue;if(!Number.isFinite(n)||n===0)return t.minY;let r=(e-t.minValue)/n;return t.minY+(t.maxY-t.minY)*r}function vi({previousRange:e,targetRange:t,previousYScale:n,targetYScale:r}){let i=Number(t.start),a=Number(t.end)-1,o=1,s=0;if(Number.isFinite(i)&&Number.isFinite(a)&&a>i){let n=hi(i,t),r=hi(a,t),c=hi(i,e),l=hi(a,e),u=r-n;Number.isFinite(u)&&Math.abs(u)>1e-9&&(o=(l-c)/u,s=c-o*n)}let c=1,l=0;if(n&&r){let e=r.minValue,t=r.maxValue,i=_i(e,r),a=_i(t,r),o=_i(e,n),s=_i(t,n),u=a-i;Number.isFinite(u)&&Math.abs(u)>1e-9&&(c=(s-o)/u,l=o-c*i)}return[o,s,c,l].every(Number.isFinite)?`matrix(${o}, 0, 0, ${c}, ${s}, ${l})`:`matrix(1, 0, 0, 1, 0, 0)`}function yi({resetTransform:e=!0}={}){Qr+=1,Yr&&=(cancelAnimationFrame(Yr),0),Xr&&=(cancelAnimationFrame(Xr),0),Zr&&=(clearTimeout(Zr),0),Jr.value=!1,Kr.value=!1,e&&(qr.value=`matrix(1, 0, 0, 1, 0, 0)`)}function bi(e,t){return!W.value||lr.value||!Cn.value||!e||!t||typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches?!1:Number.isFinite(e.start)&&Number.isFinite(e.end)&&Number.isFinite(t.start)&&Number.isFinite(t.end)&&e.end>e.start&&t.end>t.start}function xi(e,t){let n=mi();if(!bi(e,n))return yi(),!1;let r=vi({previousRange:e,targetRange:n,previousYScale:t,targetYScale:gi()});if(r===`matrix(1, 0, 0, 1, 0, 0)`)return yi(),!1;yi();let i=++Qr;return Kr.value=!0,Jr.value=!1,qr.value=r,Yr=requestAnimationFrame(()=>{Yr=0,Xr=requestAnimationFrame(()=>{Xr=0,i===Qr&&(Jr.value=!0,qr.value=`matrix(1, 0, 0, 1, 0, 0)`,Zr=setTimeout(()=>{Zr=0,i===Qr&&(Jr.value=!1,Kr.value=!1)},un))})}),!0}let Si=b(()=>({transform:qr.value,transformOrigin:`0 0`,transformBox:`view-box`,transition:Jr.value?`transform ${un}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`,willChange:Kr.value?`transform`:void 0})),Ci=b(()=>Kr.value?`url(#vue_ui_stackline_zoom_clip_${P.value})`:void 0);function wi(e,{transition:t=!1}={}){let n=di(e);if(!n)return null;let{start:r,end:i}=n;if(r!==Number(Y.value.start)||i!==Number(Y.value.end)){let e=mi(),n=gi();pi(),Y.value={start:r,end:i},Ur.value={start:r,end:i},Ei(),t&&xi(e,n)}return{start:Number(Y.value.start),end:Number(Y.value.end)}}function Ti(e,{transition:t=!0}={}){let n=wi(e,{transition:t});return n?(N(`update:zoomState`,n),n):null}function Ei(){let e=J.value,t=Math.max(0,Math.min(Y.value.start??0,e-1)),n=Math.max(t+1,Math.min(Y.value.end??e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),Y.value.start=t,Y.value.end=n,Ur.value.start=t,Ur.value.end=n,kn.value&&kn.value.setRangeValues(t,n)}let Di=D(null);function Oi(){return new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e())))}dt(()=>{Di.value&&cancelAnimationFrame(Di.value),pi(),xa(),yi()});async function ki({force:e=!1,publish:t=!1,transition:n=e&&t}={}){if(U.value.zoom.keepState&&!e&&aa.value&&(Y.value.start!==0||Y.value.end!==0)){Ei();return}let r=!e,i=n?mi():null,a=n?gi():null;sa(r),n&&xi(i,a),await ct(),Di.value&&cancelAnimationFrame(Di.value),Di.value=requestAnimationFrame(async()=>{await Oi(),sa(r),Di.value=null,t&&(fi({start:Number(Y.value.start),end:Number(Y.value.end)}),N(`zoomReset`))})}let Ai=b(()=>Math.max(0,K.value.width/(Y.value.end-Y.value.start))),ji=b(()=>se(Br.value.map(e=>({...e,series:e.series.map(e=>e??0)}))).slice(Y.value.start,Y.value.end)),Mi=b(()=>F.value.length===q.value.length),Ni=b(()=>{if(!U.value.zoom.minimap.show)return[];let e=q.value.filter(e=>Mi.value?!0:!F.value.includes(e.id)&&!e.standalone);if(e.length)return se(e.map(e=>({...e,series:(e.series||[]).map(e=>e??0)})));let t=Vr.value;if(!t.length)return[];let n=Math.max(...t.map(e=>e.series.length||0));return Array.from({length:n},(e,n)=>t.reduce((e,t)=>e+Math.abs(t.series[n]??0),0))}),Pi=b(()=>{if(!U.value.zoom.minimap.show)return[];let e=q.value.filter(e=>Mi.value?!0:!F.value.includes(e.id)&&!e.standalone),t=Vr.value,n=e.length?[{name:``,series:Ni.value,color:`#000000`,isVisible:!0}]:[],r=t.map(e=>({name:e.name||``,series:(e.series||[]).map(e=>e??0),color:e.color,isVisible:!0}));return n.concat(r)}),Fi=b(()=>se(Br.value.filter(e=>!F.value.includes(e.id)).map(e=>({...e,series:e.series.map((t,n)=>{let r=t??0;return e.signedSeries[n]===-1&&r>=0?-r:r})}))).slice(Y.value.start,Y.value.end)),Ii=b(()=>{let e=Br.value.filter(e=>!F.value.includes(e.id));return{positive:se(e.map(e=>({...e,series:e.series.slice(Y.value.start,Y.value.end).map(e=>(e??0)>=0?e??0:0)}))),negative:se(e.map(e=>({...e,series:e.series.slice(Y.value.start,Y.value.end).map(e=>(e??0)<0?e??0:0)})))}}),Li=b(()=>{let e=Math.max(0,Y.value.end-Y.value.start),t=Array(e).fill(0),n=Array(e).fill(0);return Vr.value.forEach(r=>{for(let i=0;i<e;i+=1){let e=r.series[Y.value.start+i]??0;e>0&&(t[i]=Math.max(t[i],e)),e<0&&(n[i]=Math.min(n[i],e))}}),{positive:t,negative:n}}),Ri=b(()=>Fi.value.map((e,t)=>({value:e,sign:e>=0?1:-1})));function zi(){return{y0:Vi.value?.[0]?.zero??K.value.bottom}}function Bi(e){let{y0:t}=zi(),n=V.value.totalValues,r=Math.max(2,n.fontSize*1.3+n.offsetY),i=e=>Math.min(Math.max(e,K.value.top-V.value.totalValues.fontSize*1.3),K.value.bottom+V.value.totalValues.fontSize*2);if((Ri.value?.[e]?.value??0)>=0||V.value.distributed){let n=1/0;for(let t of X.value||[]){let r=t?.series?.[e],i=t?.topY?.[e];(r??0)>0&&Number.isFinite(i)&&i<n&&(n=i)}return i((Number.isFinite(n)?n:t)-r-V.value.totalValues.offsetY)}{let a=-1/0;for(let t of X.value||[]){let n=t?.series?.[e],r=t?.topY?.[e];(n??0)<0&&Number.isFinite(r)&&r>a&&(a=r)}return i((Number.isFinite(a)?a:t)+r+n.fontSize*.7+V.value.totalValues.offsetY)}}let Vi=b(()=>{let e=Math.max(...Ii.value.positive,0),t=Math.min(...Ii.value.negative,0),n=Math.max(...Li.value.positive,0),r=Math.min(...Li.value.negative,0),i=Math.max(e,n),a=Math.min(t,r),o=[-1/0,1/0,NaN,void 0,null].includes(a)?0:a,s=B.value.scale.scaleMin,c=B.value.scale.scaleMax,l=!V.value.distributed&&(s!==null||c!==null),u=s!==null&&!V.value.distributed?s:o>0?0:o,d=c!==null&&!V.value.distributed?c:i<0?0:i,f=l?ge(u,d,B.value.scale.ticks):te(u,d,B.value.scale.ticks),p=Math.abs(Number(f.min)||0),m=(Number(f.max)||0)+p,h=m===0||!Number.isFinite(m)?1:m,g=Array.isArray(f.ticks)&&f.ticks.length?f.ticks:[0],_=K.value.bottom-K.value.height*(p/h);return g.map(e=>{let t=Number(e)||0,n=K.value.bottom-K.value.height*((t+p)/h);return{zero:_,y:n,x:Nr.value?Z.value.right+8:Z.value.left-8,value:t}})}),Hi=D([]),Ui=D(!1),Wi=D([]),Gi=0;yt(()=>{let e=++Gi;(async()=>{let t=await Le({values:z.value.values,maxDatapoints:J.value,formatter:z.value.datetimeFormatter,start:Y.value.start,end:Y.value.end});e===Gi&&(Hi.value=t,Ui.value=!0)})()});let Ki=0;yt(()=>{let e=++Ki;(async()=>{let t=await Le({values:z.value.values,maxDatapoints:J.value,formatter:z.value.datetimeFormatter,start:0,end:J.value});e===Ki&&(Wi.value=t)})()});let qi=b(()=>{let e=Math.max(1,Math.floor(Number(z.value.modulo)||1)),t=(Hi.value||[]).map(e=>e?.text??``),n=(Wi.value||[]).map(e=>e?.text??``),r=Y.value.start??0,i=r>0||t.length<n.length;return ce({configuredModulo:e,visibleTexts:t,allTexts:n,startAbs:r,isZoomed:i})});function Ji(e){let t=z.value,n=Hi.value||[],r=Wi.value||[],i=Y.value.start??0,a=J.value,o=n.map(e=>e?.text??``),s=r.map(e=>e?.text??``),c=ae(!!t.showOnlyFirstAndLast,!!t.showOnlyAtModulo,qi.value,o,s,i,e,a);if(!t.showFirstAndLast||t.showOnlyFirstAndLast||!c.length)return c;let l=c.length-1;return c.map((e,t)=>t!==0&&t!==l?e:{...e,text:o[t]??``})}let Yi=b(()=>Ji($.value)),Xi=b(()=>Ji(null));vt(()=>[Er.value.width,Er.value.height,Yn.value,L.value.style.fontFamily,B.value,z.value,V.value,Xi.value.map(e=>e?.text??``).join(`|`),M.dataset,Ui.value,Pn.value,F.value,G.value,Y.value.start,Y.value.end,Gn.value,Wn.value,Hn.value,Un.value],Lr,{flush:`post`,deep:!0});let Zi=D({months:[],shortMonths:[],days:[],shortDays:[]}),Qi=0;yt(()=>{let e=++Qi,t=z.value.datetimeFormatter;(async()=>{let n=await Ie(t.locale).catch(()=>Ie(`en`));e===Qi&&(Zi.value=n.data)})()});let $i=b(()=>{let e=z.value.datetimeFormatter,t=Fe({useUTC:e.useUTC,locale:Zi.value,januaryAsYear:e.januaryAsYear});return(e,n)=>{let r=z.value.values?.[e];return r==null?``:t.formatDate(new Date(r),n)}}),ea=b(()=>(z.value.values||[]).map((e,t)=>({text:$i.value(t,U.value.zoom.timeFormat),absoluteIndex:t}))),ta=b(()=>(z.value.values||[]).map((e,t)=>({text:$i.value(t,H.value.timeFormat),absoluteIndex:t}))),na=b(()=>{if(!Cn.value&&!lr.value)return[];let e=K.value.height,t=Vi.value[0]?Vi.value[0].zero:K.value.bottom,n=Y.value.start??0,r=Y.value.end??0,i=Math.max(1,r-n),a=Math.max(...Ii.value.positive,0),o=Math.min(...Ii.value.negative,0),s=Math.max(...Li.value.positive,0),c=Math.min(...Li.value.negative,0),l=Math.max(a,s),u=Math.min(o,c),{min:d,max:f}=!V.value.distributed&&(B.value.scale.scaleMax!==null||B.value.scale.scaleMin!==null)?ge(B.value.scale.scaleMin===null?u>0?0:u:B.value.scale.scaleMin,B.value.scale.scaleMax===null?l<0?0:l:B.value.scale.scaleMax,B.value.scale.ticks):te(B.value.scale.scaleMin===null?u>0?0:u:B.value.scale.scaleMin,B.value.scale.scaleMax===null?l<0?0:l:B.value.scale.scaleMax,B.value.scale.ticks),p=f+(d>=0?0:Math.abs(d))||1,m=Array(i).fill(0),h=Array(i).fill(0),g=e=>i<=1?K.value.left+K.value.width/2:K.value.left+e/(i-1)*K.value.width;return q.value.filter(e=>!F.value.includes(e.id)).map(r=>{let a=[],o=[],s=[],c=Array(i).fill(null),l=Array(i).fill(null);for(let u=0;u<i;u+=1){let i=n+u,d=r.series?.[i],f=r.signedSeries?.[i],g=d==null||Number.isNaN(d)?0:d,_=r.standalone?g/p:V.value.distributed?g/(ji.value[u]||1):g/p;if(g>=0){let n=e*Math.abs(_);if(r.standalone)c[u]=t,l[u]=t-n;else{let e=m[u],r=e+n;c[u]=t-e,l[u]=t-r,m[u]=r}}else{let n=e*Math.abs(_);if(r.standalone)c[u]=t,l[u]=t+n;else{let e=h[u],r=e+n;c[u]=t+e,l[u]=t+r,h[u]=r}}a.push(u),o.push(g),s.push(f??(g>=0?1:-1))}let u=a.map(e=>({x:g(e),y:l[e]})),d=u.map(e=>e.x),f=o.reduce((e,t)=>e+Math.abs(t||0),0),_=f===0?1:f,ee=o.map((e,t)=>{if(V.value.distributed&&!r.standalone){let n=a[t],r=ji.value[n]||1;return(e||0)/r}return(e||0)/_});return{...r,x:d,points:u,baseY:a.map(e=>c[e]),topY:a.map(e=>l[e]),series:o,signedSeries:s,proportions:ee,rel:a,fullSeries:Array.isArray(r.fullSeries)?r.fullSeries:r.series}})}),X=b(()=>{let e=e=>typeof e==`string`?e.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i,``).trim():``,t=Math.max(...Ii.value.positive,0),n=Math.min(...Ii.value.negative,0),r=Math.max(...Li.value.positive,0),i=Math.min(...Li.value.negative,0),a=Math.max(t,r),o=Math.min(n,i),s=!V.value.distributed&&(B.value.scale.scaleMax!==null||B.value.scale.scaleMin!==null)?ge(B.value.scale.scaleMin===null?o>0?0:o:B.value.scale.scaleMin,B.value.scale.scaleMax===null?a<0?0:a:B.value.scale.scaleMax,B.value.scale.ticks):te(B.value.scale.scaleMin===null?o>0?0:o:B.value.scale.scaleMin,B.value.scale.scaleMax===null?a<0?0:a:B.value.scale.scaleMax,B.value.scale.ticks),c=Number(s.min)||0,l=Number(s.max)||0,u=Math.abs(c),d=l+u||1,f=e=>{if(V.value.distributed){let t=Math.max(0,Math.min(1,e));return minimapH-minimapH*t}return clampY(minimapH-minimapH*(((e??0)+u)/d))};return na.value.map(t=>{let n=t.x.length,r=Array.isArray(t.fullSeries)?t.fullSeries:t.series,i=({left:e=0,unitW:t})=>{let n=r.length;return!Number.isFinite(t)||t<=0||n<=0?[]:n===1?[e+t*.5]:r.map((n,r)=>e+r*t)},a=({minimapH:e})=>!Number.isFinite(e)||e<=0?[]:r.map(t=>f(t||0,e)),o=({minimapH:e})=>{if(!Number.isFinite(e)||e<=0)return[];let t=f(0,e);return r.map(()=>t)};if(n===0)return{...t,points:[],smoothPath:``,straightPath:``,smoothArea:``,straightArea:``,xMinimap:i,yMinimap:a,yMinimapBase:o};let s=t.x.map((e,n)=>({x:e,y:t.topY[n]})),c=t.x.map((e,n)=>({x:e,y:t.baseY[n]})),l=n>=2?h(s):`M${s[0].x},${s[0].y}`,u=n>=2?_(s):`M${s[0].x},${s[0].y}`,d=n>=2?`M${e(l)}`:l,p=n>=2?`M${e(u)}`:u,m=``,g=``;if(V.value.useArea&&n>=2){let t=h([...c].reverse()),n=_([...c].reverse()),r=c[c.length-1];m=`M${s[0].x},${s[0].y} ${e(l)} L${r.x},${r.y} ${e(t)} Z`,g=`M${s[0].x},${s[0].y} ${e(u)} L${r.x},${r.y} ${e(n)} Z`}return{...t,points:s,smoothPath:d,straightPath:p,smoothArea:m,straightArea:g,xMinimap:i,yMinimap:a,yMinimapBase:o}})}),ra=b(()=>$.value===null||$.value===void 0?null:{timeLabel:Va($.value),absoluteIndex:$.value+Y.value.start,seriesIndex:$.value,datapoint:Ba.value,series:X.value,config:L.value}),ia=D(!1),aa=D(!1);function oa(e,t=Y.value.start){let n=J.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function sa(e=!0){if(!ia.value){ia.value=!0;try{let{startIndex:t,endIndex:n,keepState:r}=U.value.zoom,i=r?Math.max(0,J.value):J.value;if(r&&i<=0)return;let a=t??0,o=n==null?i:Math.min(oa(n+1,a),i);fa.value=!0,Y.value.start=a,Y.value.end=o,Ur.value.start=a,Ur.value.end=o,Ei(),aa.value=!0,e&&M.zoomState&&wi(M.zoomState)}finally{queueMicrotask(()=>{fa.value=!1}),ia.value=!1}}}function ca(e){si={...si,...e},oi&&cancelAnimationFrame(oi),oi=requestAnimationFrame(()=>{let e={...Y.value,...si};si={},oi=null,Y.value=e,Ur.value={...e},Ei(),fi({start:Number(Y.value.start),end:Number(Y.value.end)})})}function la(e){if(ia.value||fa.value)return;let t=Number(e);Number.isFinite(t)&&(N(`zoomStart`,{index:t,isZoom:t!==0}),t!==Y.value.start&&ca({start:t}))}function ua(e){if(ia.value||fa.value)return;let t=si.start===void 0?Y.value.start:si.start,n=oa(Number(e),t);Number.isFinite(n)&&(N(`zoomEnd`,{index:n,isZoom:n!==J.value}),(n!==Y.value.end||si.start!==void 0)&&ca({end:n}))}let Z=b(()=>({left:K.value.left,right:K.value.right,width:K.value.width})),da=b(()=>{let e=B.value.y.axisLabels,{prefix:t,suffix:n}=V.value.dataLabels;return Vi.value.map(r=>String(le(e.formatter,r.value,a({p:t,v:r.value,s:n,r:e.rounding}),{datapoint:r})??``)).join(`|`)});vt([da,()=>B.value.y.axisLabels.show,()=>B.value.y.axisLabels.fontSize,()=>B.value.y.axisLabels.bold,()=>B.value.y.position],()=>{B.value.y.axisLabels.show&&rr()},{flush:`post`});let fa=D(!1);vt([()=>M.zoomState,aa],([e,t])=>{t&&e&&wi(e,{transition:!0})},{deep:!0,immediate:!0});let pa=b(()=>Er.value.width),ma=b(()=>Er.value.height);He({timeLabelsEls:Gn,timeLabels:Hi,slicer:Y,configRef:L,rotationPath:[`style`,`chart`,`grid`,`x`,`timeLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`grid`,`x`,`timeLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:pa,height:ma,rotation:z.value.autoRotate.angle});let ha=D(null);function ga(e){let t=W.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y,ok:!0}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height),a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y,ok:!0}}let _a=b(()=>!Wr.value||$r.value==null||ei.value==null?null:{x:Math.min($r.value,ei.value),y:K.value.top,width:Math.abs(ei.value-$r.value),height:K.value.height}),va=b(()=>aa.value?Number(Y.value.start)!==0||Number(Y.value.end)!==Number(J.value):!1);function ya(e){return Math.min(Math.max(e,K.value.left),K.value.right)}function ba(){Ma&&=(cancelAnimationFrame(Ma),0),ha.value=null,ir.value=null,Zn.value=null,$.value=null,Ua(!1,null)}function xa(e){let t=e?.pointerId==null?ti.value:e.pointerId;t!=null&&W.value?.hasPointerCapture?.(t)&&W.value.releasePointerCapture(t),Wr.value=!1,$r.value=null,ei.value=null,ti.value=null}function Sa(){ni.value=!0,setTimeout(()=>{ni.value=!1},0)}function Ca(e){if(!ai.value||!va.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=ri.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?(ri.value={time:0,x:0,y:0,pointerType:null},Sa(),xa(e),ki({force:!0,publish:!0}),!0):(ri.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function wa(e){if(Q.value<=0)return null;if(Q.value===1||Na.value<=0)return 0;let t=(ya(e)-K.value.left)/Na.value;return Math.max(0,Math.min(Q.value-1,Math.round(t)))}function Ta(e,t){let n=wa(e),r=wa(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(Y.value.start)+i,end:Number(Y.value.start)+a+1}}function Ea(e){let t=Ti(e,{transition:!0});return t?(N(`zoomStart`,{index:t.start,isZoom:t.start!==0}),N(`zoomEnd`,{index:t.end,isZoom:t.end!==J.value}),t):null}function Da(){Gr.value=!0,W.value?.classList?.add(`vue-ui-stackline-chart-zoom-pointer-focus`)}function Oa(){Gr.value=!1,W.value?.classList?.remove(`vue-ui-stackline-chart-zoom-pointer-focus`)}function ka(e){if(!ai.value||I.value||e.button!==void 0&&e.button!==0||ti.value!=null&&e.pointerId!==ti.value)return;let t=ga(e);if(!t)return;let{left:n,right:r,top:i,bottom:a}=K.value;t.x<n||t.x>r||t.y<i||t.y>a||Q.value<=1||(Da(),W.value?.focus?.({preventScroll:!0}),ba(),ti.value=e.pointerId,Wr.value=!0,$r.value=ya(t.x),ei.value=ya(t.x))}function Aa(e){if(!ai.value||!Wr.value||ti.value!=null&&e.pointerId!==ti.value)return;let t=ga(e);t&&(ei.value=ya(t.x),$r.value!=null&&Math.abs(ei.value-$r.value)>=2&&!W.value?.hasPointerCapture?.(e.pointerId)&&W.value?.setPointerCapture?.(e.pointerId))}function ja(e){if(!ai.value||!Wr.value||ti.value!=null&&e.pointerId!==ti.value)return;let t=ga(e);t&&(ei.value=ya(t.x));let n=$r.value,r=ei.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,K.value.width*.01)){if(Ca(e))return;xa(e);return}let i=Ta(Math.min(n,r),Math.max(n,r));i?(xa(e),Ea(i)&&(ri.value={time:0,x:0,y:0,pointerType:null},ba(),Sa())):xa(e)}let Ma=0,Q=b(()=>Math.max(1,Y.value.end-Y.value.start)),Na=b(()=>Q.value>1?K.value.width/(Q.value-1):0);function Pa(e){return Q.value<=1?K.value.left+K.value.width/2:K.value.left+e*Na.value}function Fa(e){if(Q.value<=1)return{x:K.value.left,width:K.value.width};let t=e===0?K.value.left:(Pa(e-1)+Pa(e))/2,n=e===Q.value-1?K.value.left+K.value.width:(Pa(e)+Pa(e+1))/2;return{x:t,width:Math.max(0,n-t)}}function Ia(e){I.value||Wr.value||(Ma&&cancelAnimationFrame(Ma),Ma=requestAnimationFrame(()=>{Ma=0;let t=ga(e);if(!t||!W.value){za();return}let{left:n,right:r,top:i,bottom:a}=K.value;if(t.x<n||t.x>r||t.y<i||t.y>a){za();return}let o=0;if(Q.value>1){let e=(t.x-n)/Na.value;o=Math.round(e)}else o=0;o<0&&(o=0),o>Q.value-1&&(o=Q.value-1),ha.value!==o&&(ha.value=o,Ua(!0,o))}))}function La(e){if(ni.value){ni.value=!1;return}if(Wr.value)return;let t=ga(e);if(!t||!W.value)return;let{left:n,right:r,top:i,bottom:a}=K.value;if(t.x<n||t.x>r||t.y<i||t.y>a)return;let o=0;if(Q.value>1){let e=(t.x-n)/Na.value;o=Math.round(e)}else o=0;o<0&&(o=0),o>Q.value-1&&(o=Q.value-1),To({seriesIndex:o,datapoint:_o(o)}),Ra(o)}function Ra(e){let t=JSON.parse(JSON.stringify(X.value)).map(t=>({name:t.name,value:t.series[e]===0?0:t.series[e]||null,proportion:t.proportions[e]||null,color:t.color,id:t.id}));L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:t,seriesIndex:e+Y.value.start}),N(`selectDatapoint`,{datapoint:t,period:Hi.value[e]})}vt(()=>[Y.value.start,Y.value.end,X.value.length],()=>{let e=Q.value;$.value!=null&&(e<=0?$.value=null:($.value<0&&($.value=0),$.value>e-1&&($.value=e-1)))});function za(){Ma&&=(cancelAnimationFrame(Ma),0),ha.value=null,Ua(!1,null)}let $=D(null),Ba=b(()=>{let e=$.value,t=e==null?null:ci(e);return X.value.map(n=>({slotAbsoluteIndex:n.absoluteIndex,shape:n.shape||`circle`,name:n.name,color:n.color,value:e==null?null:n.series.find((t,n)=>n===e),sourceValue:t==null?null:n.seriesSource?.[t],comments:n.comments||[],id:n.id,standalone:!!n.standalone}))});function Va(e){if(e==null||!H.value.showTimeLabel)return null;let t=Hi.value?.[e]?.text||null,n=ta.value?.[e]?.text||null,r=Wi.value?.[e]?.text||null;return H.value.useDefaultTimeFormat?t:n||r}let Ha=b(()=>{let e=H.value.customFormat,t=[...Ba.value].reverse(),n=t.filter(e=>!e.standalone),r=t.filter(e=>e.standalone),i=n.map(e=>e.value).filter(e=>m(e)&&e!==null).reduce((e,t)=>Math.abs(e)+Math.abs(t),0);if(c(e)&&pe(()=>e({absoluteIndex:$.value+Y.value.start,seriesIndex:$.value,datapoint:Ba.value,series:q.value,config:L.value})))return e({absoluteIndex:$.value+Y.value.start,seriesIndex:$.value,datapoint:Ba.value,series:q.value,config:L.value});let{showValue:s,showTotal:l,totalTranslation:u,showPercentage:d,borderColor:f,roundingValue:h,roundingPercentage:g}=H.value,_=e=>!e.shape||![`star`,`triangle`,`square`,`diamond`,`pentagon`,`hexagon`].includes(e.shape)?`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${H.value.backgroundColor}" stroke-width="1" fill="${e.color}" /></svg>`:e.shape===`star`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><polygon stroke="${H.value.backgroundColor}" stroke-width="1" fill="${e.color}" points="${o({plot:{x:6,y:6},radius:5})}" /></svg>`:e.shape===`triangle`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${p({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`:e.shape===`square`?`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${p({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`:e.shape===`diamond`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${p({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`:e.shape===`pentagon`?`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${p({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`:`<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${p({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${e.color}" stroke="${H.value.backgroundColor}" stroke-width="1" /></svg>`,ee=(e,t)=>{let n=t?a({v:isNaN((e.value??0)/(i||1))?0:Math.abs(e.value??0)/(i||1)*100,s:`%`,r:g}):``,r=s&&t?`(`:``,o=s&&t?`)`:``;return`
2
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
3
- <div style="width:20px;height:20px;display:flex;align-items:center;justify-content:center;">${_(e)}</div>
4
- ${e.name}${s||t?`:`:``}
5
- ${s?le(V.value.dataLabels.formatter,e.sourceValue,a({p:V.value.dataLabels.prefix,v:e.sourceValue,s:V.value.dataLabels.suffix,r:h},{datapoint:e})):``} ${r}${n}${o}
6
- </div>
7
- `},v=``,te=Va($.value);return te&&(v+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${f};padding-bottom:6px;margin-bottom:3px;">${te}</div>`),l&&n.length>1&&(v+=`<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
8
- <span>${u}:</span>
9
- <span>${le(V.value.dataLabels.formatter,oe(i),a({p:V.value.dataLabels.prefix,v:oe(i),s:V.value.dataLabels.suffix,r:h}),{datapoint:{name:u,value:oe(i)}})}</span>
10
- </div>`),n.forEach(e=>{v+=ee(e,d)}),r.length&&(v+=`<div style="border-top:1px solid ${Br.value.length?f:`transparent`}; margin:${Br.value.length?`6px 0`:`0`};"></div>`,r.forEach(e=>{v+=ee(e,!1)})),`<div>${v}</div>`});function Ua(e,t=null,n=`pointer`){if(Mi.value)return;$n.value=n,Tn.value=e;let r=X.value.map(e=>({name:e.name,value:[null,void 0,NaN].includes(e.series[t])?null:e.series[t],color:e.color}));e?(Zn.value=t,$.value=t,To({seriesIndex:t,datapoint:r}),L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:r,seriesIndex:t+Y.value.start})):(Zn.value=null,$.value=null,N(`selectX`,{index:null,indexLabel:null,dataset:null}),L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:r,seriesIndex:t+Y.value.start}))}function Wa(e,t){let n=JSON.parse(JSON.stringify(X.value)).map(e=>({name:e.name,value:e.series[t]===0?0:(e.signedSeries[t]===-1&&e.series[t]>=0?-e.series[t]:e.series[t])||null,proportion:e.proportions[t]||null,color:e.color,id:e.id}));N(`selectTimeLabel`,{datapoint:n,absoluteIndex:e.absoluteIndex,label:e.text})}function Ga(){F.value.length?F.value=[]:qa.value.forEach(e=>{F.value.push(e.id)}),N(`selectLegend`,X.value)}function Ka(e){if(F.value.includes(e.id))F.value=F.value.filter(t=>t!==e.id);else{if(F.value.length===q.value.length-1)return;F.value.push(e.id)}N(`selectLegend`,X.value)}let qa=b(()=>q.value.map(e=>({...e,opacity:F.value.includes(e.id)?.5:1,segregate:()=>Ka(e),isSegregated:F.value.includes(e.id)}))),Ja=b(()=>({cy:`stackline-legend`,backgroundColor:U.value.legend.backgroundColor,color:U.value.legend.color,fontSize:U.value.legend.fontSize,paddingBottom:12,fontWeight:U.value.legend.bold?`bold`:``}));function Ya(e){return q.value.length?q.value.find(t=>t.name===e)||(jr.value&&console.warn(`VueUiStackline - Series name not found "${e}"`),null):(jr.value&&console.warn(`VueUiStackline - There are no series to show.`),null)}function Xa(e){let t=Ya(e);t!==null&&F.value.includes(t.id)&&Ka({id:t.id})}function Za(e){let t=Ya(e);t!==null&&(F.value.includes(t.id)||Ka({id:t.id}))}let Qa=b(()=>{if(X.value.length===0)return{head:[],body:[],config:{},columnNames:[]};let e=X.value.map(({name:e,color:t})=>({label:e,color:t})),t=[];return Yi.value.forEach(e=>{let n=e.absoluteIndex,r=[z.value.values?.[n]?e.text:n+1];q.value.forEach(e=>{let t=e.series?.[n],i=Number((t??0).toFixed(L.value.table.td.roundingValue));r.push(i)}),t.push(r)}),{head:e,body:t}});function $a(e=null){let t=[[U.value.title.text],[U.value.title.subtitle.text],[``]],n=[``,...Qa.value.head.map(e=>e.label)],r=Qa.value.body,i=t.concat([n]).concat(r),a=s(i);e?e(a):fe({csvContent:a,title:U.value.title.text||`vue-ui-stackline`})}let eo=b(()=>{let e=[``].concat(X.value.map(e=>e.name),`__SUM__`),t=[],n=Math.max(0,Y.value.end-Y.value.start);for(let e=0;e<n;e+=1){let n=ci(e),r=z.value.values?.[n]?Hi.value?.[e]?.text??n+1:n+1,i=X.value.map(t=>{let n=t.series?.[e]??0;return Number(n.toFixed(L.value.table.td.roundingValue))}),a=X.value.filter(e=>!e.standalone).map(t=>t.series?.[e]??0).reduce((e,t)=>e+t,0);t.push([r].concat(i,Number(a.toFixed(L.value.table.td.roundingValue))))}return{head:e,body:t,config:{th:{backgroundColor:L.value.table.th.backgroundColor,color:L.value.table.th.color,outline:L.value.table.th.outline},td:{backgroundColor:L.value.table.td.backgroundColor,color:L.value.table.td.color,outline:L.value.table.td.outline},breakpoint:L.value.table.responsiveBreakpoint},colNames:[L.value.table.columnNames.period].concat(X.value.map(e=>e.name),L.value.table.columnNames.total)}}),to=b(()=>U.value.backgroundColor),no=b(()=>U.value.legend),ro=b(()=>U.value.title),{isCallbackImaging:io,isCallbackSvg:ao,generateSvg:oo,onGenerateImage:so}=Ae({svg:W,title:ro,legend:no,legendItems:qa,backgroundColor:to,getSvgCallback:()=>L.value.userOptions.callbacks.svg,generateImage:wr});async function co({scale:e=2}={}){if(!wn.value)return;let{imageUri:t,base64:n}=await Oe({domElement:wn.value,base64:!0,img:!0,scale:e}),r=wn.value.getBoundingClientRect(),i={width:r.width,height:r.height,aspectRatio:r.height?r.width/r.height:0},a=await ne(t,e)??i;return{imageUri:t,base64:n,title:U.value.title.text,...a}}let lo=b(()=>Me({config:L,style:U,mutableConfig:G,dialog:vn,accordion:pn,isFullscreen:Mn,parent:wn,maxWidth:800,isCursorPointer:sr}));vt(()=>G.value.showTable,e=>je(e,L,zn));function uo(){G.value.showTable=!1,Bn.value&&Bn.value.setTableIconState(!1)}function fo(e){Mn.value=e,En.value+=1}function po(){G.value.showTable=!G.value.showTable}function mo(){G.value.dataLabels.show=!G.value.dataLabels.show}function ho(){G.value.showTooltip=!G.value.showTooltip}function go(){return X.value}function _o(e){let t=e??0,n=ci(t);return JSON.parse(JSON.stringify(X.value)).map(e=>{let r=e.series[t],i=e.signedSeries?.[t],a=r===0?0:(i===-1&&r>=0?-r:r)||null;return{name:e.name,absoluteIndex:e.absoluteIndex,value:a,proportion:e.proportions?.[t]||null,color:e.color,id:e.id,timeLabel:Wi.value?.[n]||null}})}let vo=b(()=>Array(J.value).fill(0).map((e,t)=>_o(t)));vt(()=>M.selectedXIndex,e=>{if([null,void 0].includes(M.selectedXIndex)){$.value=null;return}let t=e-Y.value.start;t<0||e>=Y.value.end?$.value=null:$.value=t??null},{immediate:!0});let yo=b(()=>{if(V.value.distributed)return{min:-1,max:1};let e=Br.value,t=Vr.value,n=Math.max(1,...[...e,...t].map(e=>e.series?.length||0)),r=Array(n).fill(0),i=Array(n).fill(0);e.forEach(e=>{for(let t=0;t<n;t+=1){let n=e.series[t]??0;n>=0?r[t]+=n:i[t]+=n}});let a=Array(n).fill(0),o=Array(n).fill(0);t.forEach(e=>{for(let t=0;t<n;t+=1){let n=e.series[t]??0;n>0&&(a[t]=Math.max(a[t],n)),n<0&&(o[t]=Math.min(o[t],n))}});let s=Math.max(0,...r,...a),c=Math.min(0,...i,...o),l=B.value.scale.scaleMin,u=B.value.scale.scaleMax,d=B.value.scale.ticks,f=!V.value.distributed&&(l!==null||u!==null)?ge(l===null?c>0?0:c:l,u===null?s<0?0:s:u,d):te(l===null?c>0?0:c:l,u===null?s<0?0:s:u,d);return{min:Number(f.min)||0,max:Number(f.max)||0}});function bo({minimapH:e,unitW:t}){let n=e=>typeof e==`string`?e.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i,``).trim():``;if(!Number.isFinite(e)||e<=0||!Number.isFinite(t)||t<=0)return``;let r=X.value.filter(e=>!e.standalone),i=X.value.filter(e=>e.standalone),a=Math.max(0,...X.value.map(e=>Array.isArray(e.fullSeries)?e.fullSeries.length:e.series.length));if(a<=0)return``;let o=a===1?[t*.5]:Array.from({length:a},(e,n)=>n*t);if(V.value.distributed){let t=Array.from({length:a},(e,t)=>{let n=0;return r.forEach(e=>{let r=(Array.isArray(e.fullSeries)?e.fullSeries:e.series)?.[t];r!=null&&!Number.isNaN(r)&&(n+=Math.abs(r))}),n||1}),s=t=>e-e*Math.max(0,Math.min(1,t||0)),c=[],l=Array(a).fill(0);return r.forEach(e=>{let r=Array.isArray(e.fullSeries)?e.fullSeries:e.series,i=Array(a),u=Array(a);for(let e=0;e<a;e+=1){let n=r?.[e],a=n==null||Number.isNaN(n)?0:Math.abs(n)/t[e];u[e]=l[e],l[e]+=a,i[e]=l[e]}let d=i.map(s),f=u.map(s),p=o.map((e,t)=>({x:e,y:d[t]})),m=o.map((e,t)=>({x:e,y:f[t]})),g=h(p),ee=h([...m].reverse()),v=_(p),te=_([...m].reverse()),ne=m[m.length-1];if(V.value.useArea){let t=V.value.smooth?`M${p[0].x},${p[0].y} ${n(g)} L${ne.x},${ne.y} ${n(ee)} Z`:`M${p[0].x},${p[0].y} ${n(v)} L${ne.x},${ne.y} ${n(te)} Z`;c.push(`<path d="${t}"
11
- fill="${Sn.pattern?`url(#pattern_${P.value}_${e.absoluteIndex})`:(V.value.gradient.show,e.color)}"
12
- opacity="${V.value.areaOpacity}"
13
- stroke="none" />`)}let re=V.value.smooth?`M${p[0].x},${p[0].y} ${n(g)}`:`M${p[0].x},${p[0].y} ${n(v)}`;c.push(`<path d="${re}"
14
- fill="none"
15
- stroke="${e.color}"
16
- stroke-width="${V.value.strokeWidth}"
17
- stroke-linecap="round" />`)}),i.length&&i.forEach(e=>{let r=Array.isArray(e.fullSeries)?e.fullSeries:e.series,i=Array.from({length:a},(e,n)=>s(Math.abs(r?.[n]??0)/t[n])),l=o.map((e,t)=>({x:e,y:i[t]})),u=h(l),d=_(l),f=V.value.smooth?`M${l[0].x},${l[0].y} ${n(u)}`:`M${l[0].x},${l[0].y} ${n(d)}`;c.push(`<path d="${f}"
18
- fill="none"
19
- stroke="${e.color}"
20
- stroke-width="${V.value.strokeWidth}"
21
- stroke-linecap="round" />`)}),c.join(``)}let s=yo.value.min,c=yo.value.max,l=Math.abs(s),u=c+l||1,d=t=>Math.max(0,Math.min(e,t)),f=t=>d(e-e*(((t??0)+l)/u)),p=[];if(r.length){let e=Array(a).fill(0),t=Array(a).fill(0);r.forEach(r=>{let i=Array.isArray(r.fullSeries)?r.fullSeries:r.series,s=Array(a),c=Array(a);for(let n=0;n<a;n+=1){let r=i?.[n]??0;r>=0?(c[n]=e[n],e[n]+=r,s[n]=e[n]):(c[n]=t[n],t[n]+=r,s[n]=t[n])}let l=s.map(f),u=c.map(f),d=o.map((e,t)=>({x:e,y:l[t]})),m=o.map((e,t)=>({x:e,y:u[t]})),g=h(d),ee=h([...m].reverse()),v=_(d),te=_([...m].reverse()),ne=m[m.length-1];if(V.value.useArea){let e=V.value.smooth?`M${d[0].x},${d[0].y} ${n(g)} L${ne.x},${ne.y} ${n(ee)} Z`:`M${d[0].x},${d[0].y} ${n(v)} L${ne.x},${ne.y} ${n(te)} Z`;p.push(`<path d="${e}"
22
- fill="${Sn.pattern?`url(#pattern_${P.value}_${r.absoluteIndex})`:(V.value.gradient.show,r.color)}"
23
- opacity="${V.value.areaOpacity}"
24
- stroke="none" />`)}let re=V.value.smooth?`M${d[0].x},${d[0].y} ${n(g)}`:`M${d[0].x},${d[0].y} ${n(v)}`;p.push(`<path d="${re}"
25
- fill="none"
26
- stroke="${r.color}"
27
- stroke-width="${V.value.strokeWidth}"
28
- stroke-linecap="round" />`)})}return i.length&&i.forEach(e=>{let t=(Array.isArray(e.fullSeries)?e.fullSeries:e.series).map(f),r=o.map((e,n)=>({x:e,y:t[n]})),i=h(r),a=_(r),s=V.value.smooth?`M${r[0].x},${r[0].y} ${n(i)}`:`M${r[0].x},${r[0].y} ${n(a)}`;p.push(`<path d="${s}"
29
- fill="none"
30
- stroke="${e.color}"
31
- stroke-width="${V.value.strokeWidth}"
32
- stroke-linecap="round" />`)}),p.join(``)}function xo(e,t){let n=V.value,r=n.dataLabels;return n.showDistributedPercentage&&n.distributed?yr.value?t===0?!r.hideEmptyPercentages:Math.abs(t)*100>=r.hideUnderPercentage:!r.hideEmptyPercentages||Math.abs(t)>0:yr.value?(vr.value&&jr.value&&console.warn(`Vue Data UI - VueUiStackline - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case.`),Math.abs(e)>So.value*r.hideUnderPercentage/100):vr.value?Math.abs(e)>=r.hideUnderValue:!r.hideEmptyValues||e!==0}let So=b(()=>Math.max(...X.value.flatMap(e=>e.series)));function Co(e,t,n,r,i){let o=i===-1&&e>=0?-e:e;return le(V.value.dataLabels.formatter,o,a({p:V.value.dataLabels.prefix,v:o,s:V.value.dataLabels.suffix,r:V.value.dataLabels.rounding}),{datapoint:t,seriesIndex:n,datapointIndex:r})}function wo(e,t,n,r){return le(V.value.dataLabels.formatter,e,a({v:isNaN(e)?0:e,s:`%`,r:V.value.dataLabels.rounding}),{datapoint:t,seriesIndex:n,datapointIndex:r})}function To({seriesIndex:e,datapoint:t}){let n=Y.value.start+e;N(`selectX`,{dataset:t,index:n,indexLabel:z.value.values[n]})}async function Eo(){N(`copyAlt`,{config:L.value,dataset:X.value}),L.value.userOptions.callbacks.altCopy?await Promise.resolve(L.value.userOptions.callbacks.altCopy({config:L.value,dataset:X.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Do=D(!1);function Oo(){Zn.value=null,Do.value=!0}function ko(){Oa(),Zn.value=null,$n.value=`pointer`,Tn.value=!1,$.value=null,N(`selectX`,{index:null,indexLabel:null,dataset:null}),Do.value=!1}function Ao(e){if(!W.value||I.value||document.activeElement!==W.value||(Oa(),Mi.value)||!Q.value)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(ai.value&&(va.value||Wr.value)){xa(),ki({force:!0,publish:!0});return}Zn.value=null,$n.value=`pointer`,Tn.value=!1,$.value=null,N(`selectX`,{index:null,indexLabel:null,dataset:null});return}if(r){if(Zn.value===null)return;Ra(Zn.value);return}let a=Zn.value,o=ha.value,s=a!==null&&a>=0&&a<Q.value,c=o!==null&&o>=0&&o<Q.value;s?n?(a+=1,a>=Q.value&&(a=0)):t&&(--a,a<0&&(a=Q.value-1)):c?(a=n?o+1:o-1,a>=Q.value&&(a=0),a<0&&(a=Q.value-1)):a=n?0:Q.value-1,Zn.value=a,jo(a),Ua(!0,a,`keyboard`)}function jo(e){if(!Number.isFinite(e)||!W.value)return;let t=K.value.left+e*Na.value,n=K.value.top+K.value.height/2,r=he(t,n,W.value);r&&(Qn.value=r)}let Mo=b(()=>({headers:eo.value?.colNames??[],rows:eo.value?.body??[]}));Te({getData:go,getImage:co,generatePdf:Cr,generateCsv:$a,generateImage:wr,generateSvg:oo,hideSeries:Za,showSeries:Xa,toggleTable:po,toggleLabels:mo,toggleTooltip:ho,toggleAnnotator:ar,toggleFullscreen:fo,copyAlt:Eo,resetZoom:()=>ki({force:!0,publish:!0}),setZoomState:Ti});let No=b(()=>{let e=qr.value.match(/matrix\(([^)]+)\)/)[1].split(`,`).map(Number);return Qe({enabled:R.value?.annotator?.followZoom,area:K.value,range:Y.value,ticks:V.value.distributed?[]:Vi.value,middle:!1,motion:{scaleX:I.value?1:e[0],scaleY:I.value?1:e[3],translateX:I.value?0:e[4],translateY:I.value?0:e[5],transition:!I.value&&Jr.value?`transform ${un}ms cubic-bezier(0.4, 0, 0.2, 1)`:`none`}})});return(i,o)=>(E(),C(`div`,{id:`stackline_${P.value}`,ref_key:`stacklineChart`,ref:wn,class:T({"vue-data-ui-component":!0,"vue-ui-stackline":!0,"vue-data-ui-wrapper-fullscreen":Mn.value}),style:ut(`background:${U.value.backgroundColor};color:${U.value.color};font-family:${L.value.style.fontFamily}; position: relative; ${L.value.responsive?`height: 100%`:``}`),onMouseenter:hr,onMouseleave:gr},[w(`div`,{id:`chart-instructions-${P.value}`,class:`sr-only`},[w(`p`,null,ht(L.value.a11y.translations.keyboardNavigation),1)],8,St),Mo.value?.rows?.length?(E(),x(Ye,{key:0,uid:P.value,head:Mo.value.headers,body:Mo.value.rows,notice:L.value.a11y.translations.tableAvailable,caption:L.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):S(``,!0),R.value.buttons.annotator?(E(),x(A(hn),st({key:1},A(n)(R.value.annotator),{svgRef:A(W),followZoom:R.value?.annotator?.followZoom,annotationViewport:No.value,backgroundColor:U.value.backgroundColor,color:U.value.color,active:I.value,isCursorPointer:sr.value,palette:R.value.annotatorPalette,onClose:ar}),nt({_:2},[O(A(r),e=>({name:e,fn:j(n=>[k(i.$slots,e,lt(ot(A(t)(e,n))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):S(``,!0),k(i.$slots,`userConfig`,{},void 0,!0),Tr.value?(E(),C(`div`,{key:2,ref_key:`noTitle`,ref:An,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):S(``,!0),U.value.title.text?(E(),C(`div`,{key:3,ref_key:`chartTitle`,ref:Dn,style:`width:100%;background:transparent;`},[(E(),x(ke,{key:`title_${Fn.value}`,config:{title:{cy:`stackline-title`,...U.value.title},subtitle:{cy:`stackline-subtitle`,...U.value.title.subtitle}}},null,8,[`config`]))],512)):S(``,!0),w(`div`,{id:`legend-top-${P.value}`},null,8,Ct),R.value.show&&Cn.value&&(A(mr)||A(fr))?(E(),x(A(gn),{ref_key:`userOptionsRef`,ref:Bn,key:`user_option_${En.value}`,backgroundColor:U.value.backgroundColor,color:U.value.color,isPrinting:A(xr),isImaging:A(Sr),uid:P.value,hasTooltip:H.value.show&&R.value.buttons.tooltip,hasPdf:R.value.buttons.pdf,hasImg:R.value.buttons.img,hasSvg:R.value.buttons.svg,hasXls:R.value.buttons.csv,hasTable:R.value.buttons.table,hasLabel:R.value.buttons.labels,hasFullscreen:R.value.buttons.fullscreen,hasAltCopy:R.value.buttons.altCopy,isFullscreen:Mn.value,chartElement:wn.value,position:R.value.position,isTooltip:G.value.showTooltip,titles:{...R.value.buttonTitles},hasAnnotator:R.value.buttons.annotator,isAnnotation:I.value,callbacks:R.value.callbacks,printScale:R.value.print.scale,tableDialog:L.value.table.useDialog,isCursorPointer:sr.value,onToggleFullscreen:fo,onGeneratePdf:A(Cr),onGenerateCsv:$a,onGenerateImage:A(so),onGenerateSvg:A(oo),onToggleTable:po,onToggleLabels:mo,onToggleTooltip:ho,onToggleAnnotator:ar,onCopyAlt:Eo,style:ut({visibility:A(mr)?A(fr)?`visible`:`hidden`:`visible`})},nt({_:2},[O(A(Ne)(i.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:j(t=>[k(i.$slots,e,lt(ot(A(Pe)(e,t))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):S(``,!0),w(`div`,wt,[(E(),C(`svg`,{ref_key:`svgRef`,ref:W,"aria-describedby":`chart-instructions-${P.value}`,xmlns:A(me),viewBox:`0 0 ${K.value.chartWidth<=0?10:K.value.chartWidth} ${K.value.chartHeight<=0?10:K.value.chartHeight}`,class:T({"vue-data-ui-loading":A(lr),"vue-data-ui-fullscreen--on":Mn.value,"vue-data-ui-fulscreen--off":!Mn.value,"vue-data-ui-no-transition":!A(or)||A(Ir),"vue-ui-stackline-chart-zoom-pointer-focus":ai.value&&Gr.value}),style:ut({maxWidth:`100%`,visibility:A(Fr)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:U.value.color,cursor:ai.value?Wr.value?`col-resize`:`crosshair`:void 0,touchAction:ai.value?`pan-y`:void 0,userSelect:ai.value?`none`:void 0}),role:`img`,"aria-live":`polite`,tabindex:`0`,preserveAspectRatio:`xMidYMid`,onMousemove:Ia,onMouseleave:za,onClick:La,onPointerdown:ka,onPointermove:Aa,onPointerup:ja,onPointercancel:xa,onFocus:Oo,onBlur:ko,onKeydown:Ao},[it(A(_n)),k(i.$slots,`svg-underlayer`,{svg:{drawingArea:K.value,data:X.value,isPrintingImg:A(xr)||A(Sr)||A(io),isPrintingSvg:A(ao)}},void 0,!0),w(`defs`,null,[w(`clipPath`,{id:`vue_ui_stackline_zoom_clip_${P.value}`},[w(`rect`,{x:K.value.left,y:K.value.top,width:Math.max(0,K.value.width),height:Math.max(0,K.value.height)},null,8,Dt)],8,Et)]),(E(!0),C(y,null,O(Br.value,e=>(E(),C(y,null,[i.$slots.pattern?(E(),C(`defs`,Ot,[k(i.$slots,`pattern`,st({ref_for:!0},{seriesIndex:e.absoluteIndex,patternId:`pattern_${P.value}_${e.absoluteIndex}`}),void 0,!0)])):S(``,!0)],64))),256)),i.$slots[`chart-background`]?(E(),C(`foreignObject`,{key:0,x:Z.value.left,y:K.value.top,width:Z.value.width,height:K.value.height,style:{pointerEvents:`none`}},[k(i.$slots,`chart-background`,{},void 0,!0)],8,kt)):S(``,!0),V.value.gradient.show?(E(),C(`defs`,At,[(E(!0),C(y,null,O(X.value,(e,t)=>(E(),x(Ke,{t:`linear`,id:`gradient_${e.id}`,key:`gradient_${e.id}_${t}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,e.color,1],[`100%`,A(l)(e.color,V.value.gradient.intensity/100),1]]},null,8,[`id`,`stops`]))),128))])):S(``,!0),B.value.x.showHorizontalLines?(E(!0),C(y,{key:2},O(Vi.value,(e,t)=>(E(),C(`line`,{x1:Z.value.left,x2:Z.value.right,y1:e.y,y2:e.y,stroke:B.value.x.linesColor,"stroke-width":B.value.x.linesThickness,"stroke-dasharray":B.value.x.linesStrokeDasharray,"stroke-linecap":`round`},null,8,jt))),256)):S(``,!0),B.value.y.showVerticalLines?(E(!0),C(y,{key:3},O(Y.value.end-Y.value.start,(e,t)=>(E(),C(`line`,{x1:Pa(t),x2:Pa(t),y1:K.value.top,y2:K.value.bottom,stroke:B.value.y.linesColor,"stroke-width":B.value.y.linesThickness,"stroke-dasharray":B.value.y.linesStrokeDasharray,"stroke-linecap":`round`},null,8,Mt))),256)):S(``,!0),B.value.x.showAxis?(E(),C(`line`,{key:4,x1:Z.value.left,x2:Z.value.right,y1:K.value.bottom,y2:K.value.bottom,stroke:B.value.x.axisColor,"stroke-width":B.value.x.axisThickness,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,Nt)):S(``,!0),B.value.y.showAxis&&!V.value.distributed?(E(),C(`line`,{key:5,x1:Nr.value?Z.value.right:Z.value.left,x2:Nr.value?Z.value.right:Z.value.left,y1:K.value.top,y2:K.value.bottom,stroke:B.value.y.axisColor,"stroke-width":B.value.y.axisThickness,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,Pt)):S(``,!0),B.value.x.axisName.show&&B.value.x.axisName.text?(E(),C(`text`,{key:6,ref_key:`xAxisLabel`,ref:Hn,x:K.value.left+K.value.width/2,y:K.value.chartHeight-3,"font-size":B.value.x.axisName.fontSize,fill:B.value.x.axisName.color,"font-weight":B.value.x.axisName.bold?`bold`:`normal`,"text-anchor":`middle`},ht(B.value.x.axisName.text),9,Ft)):S(``,!0),B.value.y.axisName.show&&B.value.y.axisName.text?(E(),C(`text`,{key:7,ref_key:`yAxisLabel`,ref:Un,transform:`translate(${Nr.value?K.value.chartWidth-B.value.y.axisName.fontSize/2-B.value.y.axisName.offsetX:B.value.y.axisName.fontSize+B.value.y.axisName.offsetX}, ${K.value.top+K.value.height/2}) rotate(-90)`,"font-size":B.value.y.axisName.fontSize,fill:B.value.y.axisName.color,"font-weight":B.value.y.axisName.bold?`bold`:`normal`,"text-anchor":`middle`},ht(B.value.y.axisName.text),9,It)):S(``,!0),B.value.frame.show?(E(),C(`rect`,{key:8,style:{pointerEvents:`none`,transition:`none`,animation:`none !important`},x:Z.value.left,y:K.value.top,width:Z.value.width,height:K.value.height,fill:`transparent`,stroke:B.value.frame.stroke,"stroke-width":B.value.frame.strokeWidth,"stroke-linecap":B.value.frame.strokeLinecap,"stroke-linejoin":B.value.frame.strokeLinejoin,"stroke-dasharray":B.value.frame.strokeDasharray},null,8,Lt)):S(``,!0),w(`g`,{"clip-path":Ci.value},[w(`g`,{class:T([`vue-ui-stackline-zoom-geometry`,{"vue-ui-stackline-zoom-geometry--transitioning":Kr.value}]),style:ut(Si.value)},[(E(!0),C(y,null,O(X.value,e=>(E(),C(y,null,[V.value.useArea&&!e.standalone?(E(),C(`path`,{key:0,d:V.value.smooth?e.smoothArea:e.straightArea,fill:i.$slots.pattern?`url(#pattern_${P.value}_${e.absoluteIndex})`:V.value.gradient.show?`url(#gradient_${e.id})`:e.color,opacity:V.value.areaOpacity,class:T({"vue-data-ui-transition":A(or)&&!A(Ir)})},null,10,zt)):S(``,!0)],64))),256)),(E(!0),C(y,null,O(X.value,e=>(E(),C(`path`,{d:V.value.smooth?e.smoothPath:e.straightPath,stroke:V.value.path.useSerieColor?e.color:V.value.path.stroke,"stroke-width":V.value.strokeWidth,fill:`none`,"stroke-linecap":`round`,class:T({"vue-data-ui-transition":A(or)&&!A(Ir)})},null,10,Bt))),256))],6)],8,Rt),B.value.y.axisLabels.show&&!V.value.distributed?(E(),C(`g`,{key:9,ref_key:`scaleLabels`,ref:Wn},[(E(!0),C(y,null,O(Vi.value,(e,t)=>(E(),C(`line`,{key:`ytick_${t}`,class:T({"vue-data-ui-transition":A(or)&&!A(Ir)}),x1:Nr.value?Z.value.right:Z.value.left,x2:Nr.value?Z.value.right+6:Z.value.left-6,y1:e.y,y2:e.y,stroke:B.value.x.axisColor,"stroke-width":1},null,10,Vt))),128)),(E(!0),C(y,null,O(Vi.value,(e,t)=>(E(),C(`text`,{class:T({"vue-data-ui-transition":A(or)&&!A(Ir)}),transform:`translate(${e.x}, ${e.y+B.value.y.axisLabels.fontSize/3})`,"font-size":B.value.y.axisLabels.fontSize,"font-weight":B.value.y.axisLabels.bold?`bold`:`normal`,fill:B.value.y.axisLabels.color,"text-anchor":Nr.value?`start`:`end`},ht(A(le)(B.value.y.axisLabels.formatter,e.value,A(a)({p:V.value.dataLabels.prefix,v:e.value,s:V.value.dataLabels.suffix,r:B.value.y.axisLabels.rounding}),{datapoint:e})),11,Ht))),256))],512)):S(``,!0),z.value.show?(E(),C(`g`,{key:10,ref_key:`timeLabelsEls`,ref:Gn},[i.$slots[`time-label`]?(E(),C(`g`,Ut,[(E(!0),C(y,null,O(Yi.value,(e,t)=>(E(),C(`g`,null,[k(i.$slots,`time-label`,st({ref_for:!0},{x:K.value.left+Ai.value*t+Ai.value/2,y:K.value.bottom+B.value.x.timeLabels.fontSize*1.3+B.value.x.timeLabels.offsetY,fontSize:B.value.x.timeLabels.fontSize,fill:B.value.x.timeLabels.color,transform:`translate(${K.value.left+Ai.value*t+Ai.value/2}, ${K.value.bottom+z.value.fontSize*1.3+z.value.offsetY}), rotate(${z.value.rotation})`,absoluteIndex:e.absoluteIndex,content:e.text,textAnchor:B.value.x.timeLabels.rotation>0?`start`:B.value.x.timeLabels.rotation<0?`end`:`middle`,show:!0}),void 0,!0)]))),256))])):(E(),C(`g`,Wt,[(E(!0),C(y,null,O(Yi.value,(e,t)=>(E(),C(`g`,null,[String(e.text).includes(`
33
- `)?(E(),C(`text`,{key:t+`-multi`,"text-anchor":B.value.x.timeLabels.rotation>0?`start`:B.value.x.timeLabels.rotation<0?`end`:`middle`,"font-size":B.value.x.timeLabels.fontSize,fill:B.value.x.timeLabels.color,transform:`
34
- translate(
35
- ${Pa(t)},
36
- ${K.value.bottom+z.value.fontSize*1.3+z.value.offsetY}
37
- ),
38
- rotate(${z.value.rotation})
39
- `,style:ut({cursor:sr.value?`pointer`:`default`}),innerHTML:A(d)({content:String(e.text),fontSize:B.value.x.timeLabels.fontSize,fill:B.value.x.timeLabels.color,stroke:U.value.backgroundColor,x:0,y:0}),onClick:()=>Wa(e,t)},null,12,Kt)):(E(),C(`text`,{class:`vue-data-ui-time-label`,key:t,"text-anchor":B.value.x.timeLabels.rotation>0?`start`:B.value.x.timeLabels.rotation<0?`end`:`middle`,"font-size":B.value.x.timeLabels.fontSize,"font-weight":B.value.x.timeLabels.bold?`bold`:`normal`,fill:B.value.x.timeLabels.color,stroke:U.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,transform:`translate(${Pa(t)}, ${K.value.bottom+z.value.fontSize*1.3+z.value.offsetY}), rotate(${z.value.rotation})`,style:ut({cursor:sr.value?`pointer`:`default`}),onClick:()=>Wa(e,t)},ht(e.text),13,Gt))]))),256))]))],512)):S(``,!0),(Vn.value||![null,void 0].includes($.value))&&!U.value.highlighter.useLine?(E(!0),C(y,{key:11},O(Y.value.end-Y.value.start,(e,t)=>(E(),C(`g`,{key:`tooltip_trap_highlighter_${t}`},[w(`rect`,{x:Fa(t).x,y:K.value.top,height:K.value.height,width:Fa(t).width,fill:[ir.value,$.value].includes(t)?A(f)(U.value.highlighter.color,U.value.highlighter.opacity):`transparent`,style:{transition:`none !important`,animation:`none !important`}},null,8,qt)]))),128)):S(``,!0),(Vn.value||![null,void 0].includes($.value))&&U.value.highlighter.useLine?(E(),C(y,{key:12},[![null,void 0].includes($.value)||![null,void 0].includes(ir.value)?(E(),C(`g`,Jt,[w(`line`,{x1:Pa(($.value??ir.value)||0),x2:Pa(($.value??ir.value)||0),y1:A(oe)(K.value.top),y2:A(oe)(K.value.bottom),stroke:U.value.highlighter.color,"stroke-width":U.value.highlighter.lineWidth,"stroke-dasharray":U.value.highlighter.lineDasharray,"stroke-linecap":`round`,style:{transition:`none !important`,animation:`none !important`,"pointer-events":`none`}},null,8,Yt)])):S(``,!0)],64)):S(``,!0),w(`g`,{"clip-path":Ci.value},[w(`g`,{class:T([`vue-ui-stackline-zoom-geometry`,{"vue-ui-stackline-zoom-geometry--transitioning":Kr.value}]),style:ut(Si.value)},[(E(!0),C(y,null,O(X.value,e=>(E(),C(y,{key:`shp_sel_${e.id}`},[Vn.value&&Y.value.end-Y.value.start>V.value.dot.hideAboveMaxSerieLength?(E(),C(`g`,Zt,[$.value==null?S(``,!0):(E(),C(y,{key:0},[e.rel.includes($.value)&&e.fullSeries?.[Y.value.start+$.value]!=null&&!Number.isNaN(e.fullSeries?.[Y.value.start+$.value])?(E(),x(Ue,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:V.value.dot.useSerieColor?e.color:V.value.dot.fill,plot:{x:A(ie)(e.points[e.rel.indexOf($.value)].x),y:A(ie)(e.points[e.rel.indexOf($.value)].y)},radius:V.value.dot.radius*1.3,stroke:V.value.dot.useSerieColor?V.value.dot.stroke:e.color,strokeWidth:V.value.dot.strokeWidth,still:A(lr),class:T({"vue-data-ui-transition":A(or)&&!A(Ir)})},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`still`,`class`])):S(``,!0)],64))])):S(``,!0)],64))),128)),(E(!0),C(y,null,O(X.value,e=>(E(),C(y,{key:`shp_${e.id}`},[Y.value.end-Y.value.start<V.value.dot.hideAboveMaxSerieLength?(E(!0),C(y,{key:0},O(e.points,(t,n)=>(E(),C(`g`,{key:`shp_${e.id}_${Y.value.start+n}`},[e.fullSeries?.[Y.value.start+e.rel[n]]!=null&&!Number.isNaN(e.fullSeries?.[Y.value.start+e.rel[n]])?(E(),x(Ue,{key:0,shape:[`triangle`,`square`,`diamond`,`pentagon`,`hexagon`,`star`].includes(e.shape)?e.shape:`circle`,color:V.value.dot.useSerieColor?e.color:V.value.dot.fill,plot:{x:t.x,y:t.y},radius:Vn.value&&$.value===e.rel[n]?V.value.dot.radius*1.3:V.value.dot.radius,stroke:V.value.dot.useSerieColor?V.value.dot.stroke:e.color,strokeWidth:V.value.dot.strokeWidth,still:A(lr),class:T({"vue-data-ui-transition":A(or)&&!A(Ir)})},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`,`still`,`class`])):S(``,!0)]))),128)):S(``,!0)],64))),128))],6)],8,Xt),G.value.dataLabels.show&&V.value.dataLabels.hideAboveMaxSerieLength>Y.value.end-Y.value.start?(E(),C(y,{key:13},[(E(!0),C(y,null,O(X.value,(e,t)=>(E(),C(`g`,{key:`dl_${e.id}`},[(E(!0),C(y,null,O(e.points,(n,r)=>(E(),C(y,{key:`dp_${e.id}_${Y.value.start+r}`},[xo(e.series[r],e.proportions[r])?(E(),C(`text`,{key:0,class:T({"vue-data-ui-transition":A(or)&&!A(Ir)}),transform:`translate(${n.x}, ${n.y+(e.series[r]>=0?-V.value.dataLabels.fontSize/2+V.value.dataLabels.offsetY:V.value.dataLabels.fontSize*1.2-V.value.dataLabels.offsetY)})`,"font-size":V.value.dataLabels.fontSize,fill:V.value.dataLabels.color,"font-weight":V.value.dataLabels.bold?`bold`:`normal`,"text-anchor":`middle`},ht(V.value.showDistributedPercentage&&V.value.distributed?wo(e.proportions[r]*100,e,t,e.rel[r]):Co(e.series[r],e,t,e.rel[r],e.signedSeries[r])),11,Qt)):S(``,!0)],64))),128))]))),128)),V.value.totalValues.show&&X.value.length>1?(E(),C(`g`,{key:0,ref_key:`sumTop`,ref:Kn},[(E(!0),C(y,null,O(Ri.value,(e,t)=>(E(),C(y,{key:`total_l_${t+Y.value.start}`},[!V.value.dataLabels.hideEmptyValues||e.value!==0?(E(),C(`text`,{key:0,class:T({"vue-data-ui-transition":A(or)&&!A(Ir)}),transform:`translate(${Pa(t)}, ${Bi(t)})`,"text-anchor":`middle`,"font-size":V.value.totalValues.fontSize,"font-weight":V.value.totalValues.bold?`bold`:`normal`,fill:V.value.totalValues.color},ht(Co(e.value,e,t,t,e.sign)),11,$t)):S(``,!0)],64))),128))],512)):S(``,!0)],64)):S(``,!0),_a.value?(E(),C(`rect`,{key:14,x:_a.value.x,y:_a.value.y,width:_a.value.width,height:_a.value.height,fill:ii.value.selection.fill,"fill-opacity":ii.value.selection.fillOpacity,stroke:ii.value.selection.stroke,"stroke-opacity":ii.value.selection.strokeOpacity,"stroke-width":ii.value.selection.strokeWidth,"stroke-dasharray":ii.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,en)):S(``,!0),li.value?(E(),C(`rect`,st({key:15},zr.value,{"data-start":Y.value.start,"data-end":Y.value.end}),null,16,tn)):S(``,!0),k(i.$slots,`svg`,{svg:{drawingArea:K.value,data:X.value,isPrintingImg:A(xr)||A(Sr)||A(io),isPrintingSvg:A(ao)}},void 0,!0)],46,Tt)),i.$slots.hint?(E(),C(`div`,nn,[k(i.$slots,`hint`,lt(ot({hint:L.value.a11y.translations.keyboardNavigation,isVisible:Do.value})),void 0,!0)])):S(``,!0)]),i.$slots.watermark?(E(),C(`div`,rn,[k(i.$slots,`watermark`,lt(ot({isPrinting:A(xr)||A(Sr)||A(io)||A(ao)})),void 0,!0)])):S(``,!0),Rn.value&&(U.value.legend.show||i.$slots.legend)?(E(),x(tt,{key:6,to:U.value.legend.position===`top`?`#legend-top-${P.value}`:`#legend-bottom-${P.value}`},[w(`div`,{ref_key:`chartLegend`,ref:On},[k(i.$slots,`legend`,{legend:qa.value},()=>[U.value.legend.show?(E(),x($e,{key:0,legendSet:qa.value,config:Ja.value,isCursorPointer:sr.value,onClickMarker:o[0]||=({legend:e})=>e.segregate()},nt({item:j(({legend:e})=>[A(lr)?S(``,!0):(E(),C(`div`,{key:0,onClick:t=>e.segregate(),style:ut(`opacity:${F.value.includes(e.id)?.5:1}`)},ht(e.name),13,an))]),legendToggle:j(()=>[qa.value.length>2&&U.value.legend.selectAllToggle.show&&!A(lr)?(E(),x(Je,{key:0,backgroundColor:U.value.legend.selectAllToggle.backgroundColor,color:U.value.legend.selectAllToggle.color,fontSize:U.value.legend.fontSize,checked:F.value.length>0,isCursorPointer:sr.value,onToggle:Ga},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):S(``,!0)]),_:2},[i.$slots.pattern?{name:`legend-pattern`,fn:j(({legend:e,index:t})=>[it(Ue,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${P.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):S(``,!0)],!0)],512)],8,[`to`])):S(``,!0),Cn.value&&R.value.buttons.table?(E(),x(pt(lo.value.component),st({key:7},lo.value.props,{ref_key:`tableUnit`,ref:zn,onClose:uo}),nt({content:j(()=>[it(A(mn),{colNames:eo.value.colNames,head:eo.value.head,body:eo.value.body,config:eo.value.config,title:L.value.table.useDialog?``:lo.value.title,withCloseButton:!L.value.table.useDialog,isCursorPointer:sr.value,onClose:uo},{th:j(({th:e})=>[e===`__SUM__`?(E(),C(`div`,on,[it(A(fn),{name:`sigma`,stroke:eo.value.config.th.color,size:16},null,8,[`stroke`])])):(E(),C(`div`,sn,ht(e),1))]),td:j(({td:e})=>[rt(ht(isNaN(Number(e))?e:A(a)({p:V.value.dataLabels.prefix,v:e,s:V.value.dataLabels.suffix,r:L.value.table.td.roundingValue})),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[L.value.table.useDialog?{name:`title`,fn:j(()=>[rt(ht(lo.value.title),1)]),key:`0`}:void 0,L.value.table.useDialog?{name:`actions`,fn:j(()=>[w(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:o[1]||=e=>$a(R.value.callbacks.csv),style:ut({cursor:sr.value?`pointer`:`default`})},[it(A(fn),{name:`fileCsv`,stroke:lo.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):S(``,!0),U.value.zoom.show&&Cn.value&&aa.value&&J.value>6?(E(),x(qe,{key:8,ref_key:`chartSlicer`,ref:kn,"data-dom-to-png-ignore-layout":``,allMinimaps:Pi.value,background:U.value.zoom.color,borderColor:U.value.backgroundColor,customFormat:U.value.zoom.customFormat,cutNullValues:!1,enableRangeHandles:U.value.zoom.enableRangeHandles,enableSelectionDrag:U.value.zoom.enableSelectionDrag,end:Y.value.end,focusOnDrag:U.value.zoom.focusOnDrag,focusRangeRatio:U.value.zoom.focusRangeRatio,fontSize:U.value.zoom.fontSize,immediate:!U.value.zoom.preview.enable,inputColor:U.value.zoom.color,isPreview:li.value,labelLeft:z.value.values[Y.value.start]?Hi.value?.[0]?.text??``:``,labelRight:z.value.values[Y.value.end-1]?Hi.value?.at(-1)?.text??``:``,max:Math.max(...e.dataset.map(e=>e.series.length)),min:0,minimap:Ni.value,minimapCompact:U.value.zoom.minimap.compact,minimapFrameColor:U.value.zoom.minimap.frameColor,minimapIndicatorColor:U.value.zoom.minimap.indicatorColor,minimapMerged:!1,minimapSelectedColor:U.value.zoom.minimap.selectedColor,minimapSelectedColorOpacity:U.value.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:$.value,minimapSelectionRadius:1,preciseLabels:ea.value.length?ea.value:Wi.value,refreshEndPoint:U.value.zoom.endIndex===null?Math.max(...e.dataset.map(e=>e.series.length)):U.value.zoom.endIndex+1,refreshStartPoint:U.value.zoom.startIndex===null?0:U.value.zoom.startIndex,selectColor:U.value.zoom.highlightColor,selectedSeries:vo.value,smoothMinimap:!1,start:Y.value.start,textColor:U.value.color,timeLabels:Wi.value,usePreciseLabels:z.value.datetimeFormatter.enable&&!U.value.zoom.useDefaultFormat,valueEnd:Y.value.end,valueStart:Y.value.start,verticalHandles:U.value.zoom.minimap.verticalHandles,maxWidth:U.value.zoom.maxWidth,minimapLeftInsetRatio:K.value.chartWidth>0&&U.value.zoom.autoFit?K.value.left/K.value.chartWidth:null,minimapRightInsetRatio:K.value.chartWidth>0&&U.value.zoom.autoFit?(K.value.chartWidth-K.value.right)/K.value.chartWidth:null,isCursorPointer:sr.value,additionalMinimapHeight:U.value.zoom.minimap.additionalHeight,handleType:U.value.zoom.minimap.handleType,handleIconColor:U.value.zoom.minimap.handleIconColor,handleBorderWidth:U.value.zoom.minimap.handleBorderWidth,handleBorderColor:U.value.zoom.minimap.handleBorderColor,handleFill:U.value.zoom.minimap.handleFill,handleWidth:U.value.zoom.minimap.handleWidth,"onUpdate:end":ua,"onUpdate:start":la,onTrapMouse:Hr,onReset:o[2]||=()=>ki({force:!0,publish:!0}),onFutureEnd:o[3]||=e=>ui(`end`,e),onFutureStart:o[4]||=e=>ui(`start`,e)},{"reset-action":j(({reset:e})=>[k(i.$slots,`reset-action`,lt(ot({reset:e})),void 0,!0)]),slotMap:j(({width:e,height:t,unitW:n})=>[w(`g`,{innerHTML:bo({minimapW:e,minimapH:t,unitW:n})},null,8,cn)]),_:3},8,/* @__PURE__ */ `allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth`.split(`.`))):S(``,!0),w(`div`,{id:`legend-bottom-${P.value}`},null,8,ln),it(A(dn),{teleportTo:H.value.teleportTo,show:G.value.showTooltip&&Tn.value,backgroundColor:H.value.backgroundColor,color:H.value.color,fontSize:H.value.fontSize,borderRadius:H.value.borderRadius,borderColor:H.value.borderColor,borderWidth:H.value.borderWidth,backgroundOpacity:H.value.backgroundOpacity,position:H.value.position,offsetX:H.value.offsetX,offsetY:H.value.offsetY,parent:wn.value,content:Ha.value,isFullscreen:Mn.value,isCustom:H.value.customFormat&&typeof H.value.customFormat==`function`,smooth:H.value.smooth,backdropFilter:H.value.backdropFilter,smoothForce:H.value.smoothForce,smoothSnapThreshold:H.value.smoothSnapThreshold,isA11yMode:$n.value===`keyboard`,a11yPosition:Qn.value},{"tooltip-before":j(()=>[k(i.$slots,`tooltip-before`,lt(ot({...ra.value})),void 0,!0)]),tooltip:j(()=>[k(i.$slots,`tooltip`,lt(ot({...ra.value})),void 0,!0)]),"tooltip-after":j(()=>[k(i.$slots,`tooltip-after`,lt(ot({...ra.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),i.$slots.source?(E(),C(`div`,{key:9,ref_key:`source`,ref:jn,dir:`auto`},[k(i.$slots,`source`,{},void 0,!0)],512)):S(``,!0),k(i.$slots,`skeleton`,{},()=>[A(lr)?(E(),x(Se,{key:0})):S(``,!0)],!0)],46,xt))}},[[`__scopeId`,`data-v-0385514d`]]);export{bt as n,dn 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-By3Vb5kz.js";import{$ as a,D as o,Dt as s,Ft as c,Ht as l,J as ee,Q as u,S as te,X as ne,Zt as re,_ as ie,at as ae,b as oe,i as se,in as ce,nt as le,pt as ue,rn as de,sn as fe,t as pe,v as me,w as he,x as ge,yt as _e,zt as ve}from"./lib-rPeBMZrn.js";import{n as ye,t as be}from"./BaseScanner-8NdoBs7B.js";import{n as xe,t as Se}from"./useHints-C-TwxM0Y.js";import{t as Ce}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as we}from"./resolveChartConfig-CIhClE5R.js";import{t as Te}from"./chartImage-DPGnEuYM.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./useChartExport-BZts4KFb.js";import{n as Oe,t as ke}from"./tableIntegration-CNoJ1CIY.js";import{n as Ae,t as je}from"./userOptionsSlots-DYuo-E5m.js";import{t as Me}from"./usePrinter-DVf3YcG5.js";import{t as Ne}from"./useTransitions-ChGGrtrv.js";import{t as Pe}from"./useSvgLabelLayout-42Kats14.js";import{t as Fe}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Ie}from"./Shape-CRe8woTu.js";import{t as Le}from"./useResponsive-CENUxfEL.js";import{t as Re}from"./DefGrad-DKMq1REY.js";import{t as ze}from"./A11yDataTable-DWNlWXzs.js";import{t as Be}from"./useUserOptionState-CXlFnwPv.js";import{t as Ve}from"./useChartAccessibility-DOMuYJfm.js";import{t as He}from"./vue_ui_strip_plot-CwMowrhT.js";import{Fragment as d,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Ue,createTextVNode as We,createVNode as Ge,defineAsyncComponent as _,guardReactiveProps as v,mergeProps as Ke,nextTick as qe,normalizeClass as Je,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as Ye,onMounted as Xe,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as Ze,shallowRef as Qe,toDisplayString as T,toRefs as $e,unref as E,watch as et,withCtx as D}from"vue";var tt=/* @__PURE__ */ e({default:()=>Nt}),nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`viewBox`,`aria-describedby`],ot=[`x`,`y`,`width`,`height`],st={key:1},ct={key:0},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ut={key:1},dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mt=[`transform`,`fill`,`font-size`],ht=[`transform`,`font-size`,`fill`,`text-anchor`],gt=[`transform`,`font-size`,`fill`,`text-anchor`,`innerHTML`],_t=[`fill`,`font-size`,`transform`],vt=[`fill`,`font-size`,`x`,`y`],yt=[`x1`,`x2`,`y1`,`y2`,`stroke`],bt=[`cx`,`cy`,`fill`],xt=[`cx`,`cy`,`fill`],St=[`d`,`fill`,`stroke`,`fill-opacity`,`stroke-opacity`,`stroke-width`,`onMouseenter`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-opacity`,`stroke-width`],wt=[`onMouseenter`],Tt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Et=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],Dt=[`cx`,`cy`,`r`,`fill`,`stroke`],Ot={key:1},kt=[`x`,`y`,`font-size`,`fill`],At={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},jt={key:5,class:`vue-data-ui-watermark`},Mt={style:{display:`flex`,"align-items":`center`}},Nt=/*#__PURE__*/ Ce({__name:`vue-ui-strip-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:Ce,emit:tt}){let Nt=_(()=>import(`./Tooltip-C1q0Qoh7.js`)),Pt=_(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ft=_(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),It=_(()=>import(`./DataTable-Dof6yhO7.js`)),Lt=_(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Rt=_(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),zt=_(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Bt=_(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),Vt=[`classic`,`scatter`,`violin`],{vue_ui_strip_plot:Ht}=i(),O=e,Ut=tt,Wt=f({get(){return!!O.dataset&&O.dataset.length},set(e){return e}}),Gt=S(ne()),Kt=S(0),qt=S(!1),Jt=S(``),k=S(null),Yt=S(null),Xt=S(null),Zt=S(null),Qt=S(!1),$t=S(0),en=S(0),tn=S(null),nn=S(null),rn=S(null),an=S(null),on=S(null),sn=S(null),cn=S(null),ln=S(null),A=S(`pointer`),un=S({x:0,y:0}),dn=S(!1),j=S(xn()),M=f(()=>j.value.userOptions),N=f(()=>j.value.style.chart.tooltip),P=f(()=>j.value.style.chart.labels),F=f(()=>j.value.style.chart.violin),I=f(()=>j.value.style.chart.grid),L=f(()=>j.value.style.chart);xe({config:()=>j.value,dataset:()=>O.dataset,component:`VueUiStripPlot`,rules:[Se.emptyArray,{test:e=>e.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the chart to display related series.`]}]});let{transitionEnabled:fn}=Ne({config:()=>j.value.transitions,dataset:()=>O.dataset}),pn=f(()=>Sn(j.value.type)),R=f(()=>j.value.userOptions.useCursorPointer),mn=f(()=>ce({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,padding:{top:24,left:24,right:24,bottom:24},grid:{stroke:`#6A6A6A`,horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},plots:{stroke:`#6A6A6A`},labels:{bestPlotLabel:{show:!1},axis:{xLabel:``,yLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1}}}}},userConfig:j.value.skeletonConfig??{}})),{loading:hn,FINAL_DATASET:gn,manualLoading:_n}=ye({...$e(O),FINAL_CONFIG:j,prepareConfig:xn,skeletonDataset:O.config?.skeletonDataset??[{name:`_`,color:`#DBDBDB`,plots:[{name:`_`,value:1},{name:`_`,value:2},{name:`_`,value:3}]},{name:`_`,color:`#C4C4C4`,plots:[{name:`_`,value:3},{name:`_`,value:5},{name:`_`,value:8}]},{name:`_`,color:`#ADADAD`,plots:[{name:`_`,value:8},{name:`_`,value:13},{name:`_`,value:21}]},{name:`_`,color:`#969696`,plots:[{name:`_`,value:21},{name:`_`,value:34},{name:`_`,value:55}]},{name:`_`,color:`#808080`,plots:[{name:`_`,value:55},{name:`_`,value:89},{name:`_`,value:144}]}],skeletonConfig:ce({defaultConfig:j.value,userConfig:mn.value})}),{userOptionsVisible:vn,setUserOptionsVisibility:yn,keepUserOptionState:bn}=Be({config:j.value}),{svgRef:z}=Ve({config:L.value.title});function xn(){return we(O.config,Ht,He)}function Sn(e){return Vt.includes(e)?e:`classic`}let Cn=re(O.config);et(()=>O.config,async(e,t)=>{let n=re(e),r=n!==Cn;Cn=n;let i=xn();r?(hn.value||(j.value=i),vn.value=!j.value.userOptions.showOnChartHover,On(),$t.value+=1,en.value+=1,U.value.dataLabels.show=P.value.bestPlotLabel.show,U.value.showTable=j.value.table.show,U.value.showTooltip=N.value.show,j.value.responsive||(V.value=L.value.width,H.value=L.value.height,Rn.value=L.value.plots.radius)):(j.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=j.value.style.chart.tooltip.show)},{deep:!0}),et(()=>O.dataset,e=>{Array.isArray(e)&&e.length>0&&(_n.value=!1)},{deep:!0});let B=Qe(null),wn=Qe(null),Tn=S(!1),En=0;Xe(()=>{On()});let Dn=f(()=>j.value.debug);function On(){ve(O.dataset)?(ae({componentName:`VueUiStripPlot`,type:`dataset`,debug:Dn.value}),_n.value=!0):O.dataset.forEach((e,t)=>{_e({datasetObject:e,requiredAttributes:[`name`,`plots`]}).forEach(e=>{Wt.value=!1,ae({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:Dn.value})}),e.plots&&e.plots.forEach((e,n)=>{_e({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{Wt.value=!1,ae({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:`${t},${n}`,debug:Dn.value})})})}),ve(O.dataset)||(_n.value=j.value.loading),j.value.responsive&&(B.value&&(wn.value&&B.value.unobserve(wn.value),B.value.disconnect()),B.value=new ResizeObserver(()=>{let{width:e,height:t}=Le({chart:k.value,title:L.value.title.text?Yt.value:null,source:Xt.value,noTitle:Zt.value});cancelAnimationFrame(En),En=requestAnimationFrame(()=>{Ln.value=t,V.value=Math.max(.1,e),H.value=Math.max(.1,t-12),Tn.value=!0,j.value.responsiveProportionalSizing?Rn.value=de({relator:Math.min(t,e),adjuster:600,source:L.value.plots.radius,threshold:6,fallback:6}):Rn.value=L.value.plots.radius})}),wn.value=k.value.parentNode,B.value.observe(wn.value)),Qt.value=!0,setTimeout(()=>{Fn.value=!1},Jn.value*50)}Ye(()=>{cancelAnimationFrame(En),B.value&&(wn.value&&B.value.unobserve(wn.value),B.value.disconnect())});let{isPrinting:kn,isImaging:An,generatePdf:jn,generateImage:Mn}=Me({elementId:`strip-plot_${Gt.value}`,fileName:L.value.title.text||`vue-ui-strip-plot`,options:j.value.userOptions.print}),Nn=f(()=>j.value.userOptions.show&&!L.value.title.text),Pn=f(()=>he(j.value.customPalette)),Fn=S(j.value.useCssAnimation),In=S({top:L.value.padding.top,bottom:L.value.padding.bottom,left:L.value.padding.left,right:L.value.padding.right}),V=S(L.value.width),H=S(L.value.height),Ln=S(L.value.height),Rn=S(L.value.plots.radius),U=S({showTable:j.value.table.show,dataLabels:{show:P.value.bestPlotLabel.show},showTooltip:N.value.show});et(j,()=>{U.value={showTable:j.value.table.show,dataLabels:{show:P.value.bestPlotLabel.show},showTooltip:N.value.show},j.value.responsive||(V.value=L.value.width,H.value=L.value.height,Rn.value=L.value.plots.radius)},{immediate:!0});let W=f(()=>Math.min(Rn.value,K.value.stripWidth/2*.9));function G(e){return Number.isFinite(e)?Number(e.toFixed(2)):0}function zn(){return Math.max(0,(K.value.stripWidth/2-W.value*1.8)*.86)*Math.min(1,F.value.widthRatio)}let{metrics:Bn,ready:Vn,settling:Hn,update:Un}=Pe({svgRef:z,canMeasure:()=>!j.value.responsive||Tn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(sn.value).textWidth,yAxisLabelWidth:e(an.value).rotatedWidth,xAxisLabelHeight:e(rn.value).height,timeLabelsHeight:e(on.value).height})});function Wn(){let e=Bn.value.scaleLabelsWidth,t=Bn.value.yAxisLabelWidth;return e+t+(t?24:0)}let Gn=f(()=>Bn.value.xAxisLabelHeight+Bn.value.timeLabelsHeight+(rn.value?P.value.axis.fontSize/3+12+P.value.axis.xLabelOffsetY:0)+(on.value?12:0)),K=f(()=>{let e=Wn(),t=In.value.left+e+P.value.axis.yLabelOffsetX+5,n=V.value-In.value.right,r=Math.max(0,n-t),i=In.value.top+L.value.plots.radius+P.value.bestPlotLabel.fontSize,a=H.value-In.value.bottom-Gn.value,o=Math.max(0,a-i),s=Array.isArray(gn.value)?gn.value.length:0;return{left:t,right:n,top:i,bottom:a,width:r,height:o,stripWidth:s>0?r/s:0,absoluteHeight:H.value}});function Kn(e){return K.value.left+(e+1)*K.value.stripWidth-K.value.stripWidth/2}let qn=f(()=>gn.value.map((e,t)=>{let n=ne();return{...e,id:n,color:e.color?te(e.color):Pn.value[t]||l[t]||l[t%l.length],plots:e.plots.map((r,i)=>({...r,value:oe(r.value),parentId:n,parentName:e.name,parentIndex:t,plotIndex:i,color:e.color?te(e.color):Pn.value[t]||l[t]||l[t%l.length],id:ne()})).sort((e,t)=>e.value-t.value)}})),q=f(()=>(qn.value||[]).map((e,t)=>({...e,plots:e.plots.map(e=>({...e,x:Kn(t)}))}))),Jn=f(()=>Math.max(...q.value.map(e=>e.plots.length))),Yn=f(()=>{let e=q.value.flatMap(e=>e.plots.map(e=>e.value));return{max:Math.max(...e),min:Math.min(...e)}}),Xn=f(()=>{let e=I.value.scaleMin,t=I.value.scaleMax,n=Math.max(2,I.value.scaleSteps),r=Yn.value.min<0?Yn.value.min:0,i=Yn.value.max;if(e===null&&t===null)return ie(r,i,n);if(e!==null&&t!==null)return me(e,t,n);let a=ie(e===null?r:e,t===null?i:t,n);return me(e===null?a.min:e,t===null?a.max:t,n)});function J(e){let t=Xn.value.max-Xn.value.min;return t?K.value.bottom-(e-Xn.value.min)/t*K.value.height:K.value.bottom}let Y=f(()=>(q.value||[]).map((e,t)=>{let n=e.plots.map(e=>({...e,y:J(e.value)})),r=pn.value===`classic`?n.map(()=>0):er(n);return{...e,plots:n.map((e,t)=>({...e,x:e.x+r[t]}))}})),X=f(()=>pn.value===`violin`&&!!F.value?.boxPlot?.show);function Zn(e,t){if(!e.length)return 0;if(e.length===1)return e[0];let n=(e.length-1)*t,r=Math.floor(n),i=n-r,a=e[r+1];return a===void 0?e[r]:e[r]+i*(a-e[r])}let Z=f(()=>X.value?Y.value.map((e,t)=>{let n=e.plots.map(e=>e.value).sort((e,t)=>e-t),r=Zn(n,.25),i=Zn(n,.5),a=Zn(n,.75),o=a-r,s=r-o*1.5,c=a+o*1.5,l=n.find(e=>e>=s),ee=n.slice().reverse().find(e=>e<=c),u=Kn(t),te=Math.max(W.value*2.8,Math.min(zn()*.32,K.value.stripWidth*.12))*Math.min(1.5,F.value.boxPlot.widthRatio);return{id:e.id,boxPlotColor:F.value.boxPlot.useSerieColor?e.color:F.value.boxPlot.color,color:e.color,name:e.name,count:n.length,lowerAdjacent:l??n[0],q1:r,median:i,q3:a,upperAdjacent:ee??n[n.length-1],iqr:o,lowerFence:s,upperFence:c,centerX:u,boxLeft:u-te/2,boxWidth:te,q1Y:J(r),medianY:J(i),q3Y:J(a),lowerY:J(l??n[0]),upperY:J(ee??n[n.length-1])}}):[]),Qn=f(()=>[j.value.table.columnNames.series,F.value.tooltipLabels.lowerAdjacent,F.value.tooltipLabels.q1,F.value.tooltipLabels.median,F.value.tooltipLabels.q3,F.value.tooltipLabels.upperAdjacent,F.value.tooltipLabels.iqr,F.value.tooltipLabels.count]);function $n(e){return a({p:P.value.prefix,v:e,s:P.value.suffix,r:j.value.table.td.roundingValue})}function er(e){let t=pn.value===`violin`?Math.max(0,zn()-W.value*1.15):Math.max(0,K.value.stripWidth/2-W.value*1.5);if(!e.length||!t)return e.map(()=>0);let n=e.map(()=>0),r=W.value*2.1,i=Math.min(t,r),a=[0];for(let e=i;e<=t+i/2;e+=i)a.push(-Math.min(e,t)),a.push(Math.min(e,t));let o=[];return e.forEach((e,t)=>{let i=a.find(t=>o.every(n=>{let i=t-n.offset,a=e.y-n.y;return Math.hypot(i,a)>=r}))??0;n[t]=i,o.push({y:e.y,offset:i})}),n}let tr=f(()=>pn.value===`violin`?Y.value.map((e,t)=>({id:e.id,color:F.value.useSerieColor?e.color:F.value.stroke,fill:F.value.useSerieColor?e.color:F.value.fill,path:nr(e.plots,t),connectors:rr(e.plots,t)})):[]);function nr(e,t){let n=zn();if(!e.length||!K.value.height||!n)return``;let r=Kn(t),i=e.map(e=>e.y),a=ar(i),o=or({yValues:i,bandwidth:a});return o.length>1?o.map(e=>cr({yValues:e,centerX:r,maxWidth:ir({clusterLength:e.length,totalLength:i.length,maxWidth:n}),bandwidth:ar(e)})).join(` `):cr({yValues:i,centerX:r,maxWidth:n,bandwidth:a})}function rr(e,t){if(!e.length)return[];let n=Kn(t),r=e.map(e=>e.y),i=or({yValues:r,bandwidth:ar(r)});return i.length<2?[]:i.slice(1).map((e,t)=>{let r=i[t],a=ar(r),o=ar(e),s=ge(Math.max(...r)+a*2.35,K.value.top,K.value.bottom),c=ge(Math.min(...e)-o*2.35,K.value.top,K.value.bottom);return{x:G(n),y1:G(s),y2:G(c)}})}function ir({clusterLength:e,totalLength:t,maxWidth:n}){let r=(e/t)**.6,i=e<=2?.72:1;return Math.max(W.value*2.2,n*ge(r*i,.18,1))}function ar(e){let t=e.reduce((e,t)=>e+t,0)/Math.max(1,e.length),n=e.reduce((e,n)=>e+(n-t)**2,0)/Math.max(1,e.length),r=Math.sqrt(n),i=e.length<2?Math.max(W.value*2.6,K.value.height/48):W.value*2.1;return ge(1.06*r*e.length**-.2,i,K.value.height/5)}function or({yValues:e,bandwidth:t}){if(e.length<2)return[e];let n=[...e].sort((e,t)=>e-t),r=Math.max(t*1.45,W.value*5),i=[],a=[n[0]];for(let e=1;e<n.length;e+=1)Math.abs(n[e]-n[e-1])>r?(i.push(a),a=[n[e]]):a.push(n[e]);return i.push(a),sr(i)}function sr(e){return e.reduce((e,t)=>{let n=e[e.length-1];if(!n)return e.push(t),e;let r=ar(n),i=ar(t);return Math.max(...n)+r*2.35>=Math.min(...t)-i*2.35?n.push(...t):e.push(t),e},[])}function cr({yValues:e,centerX:t,maxWidth:n,bandwidth:r}){let i=ge(Math.min(...e)-r*2.35,K.value.top,K.value.bottom),a=ge(Math.max(...e)+r*2.35,K.value.top,K.value.bottom),o=Math.max(48,Math.min(120,Math.round((a-i)/Math.max(1,r/4)))),s=Array.from({length:o},(t,n)=>{let s=i+(a-i)*n/Math.max(1,o-1);return{y:s,density:e.reduce((e,t)=>{let n=(s-t)/r;return e+Math.exp(-.5*n*n)},0)}}),c=Math.max(...s.map(e=>e.density));if(!c)return``;let l=s.map((e,t)=>{let r=t===0||t===s.length-1?0:e.density/c*n;return{y:G(e.y),width:G(r)}}),ee=l.map(e=>({x:G(t-e.width),y:e.y})),u=l.slice(0,-1).reverse().map(e=>({x:G(t+e.width),y:e.y}));return`${lr([...ee,...u])} Z`}function lr(e){if(!e.length)return``;if(e.length===1)return`M ${e[0].x} ${e[0].y}`;let t=`M ${e[0].x} ${e[0].y}`;for(let n=1;n<e.length-1;n+=1){let r=e[n],i=e[n+1],a=G((r.x+i.x)/2),o=G((r.y+i.y)/2);t+=` Q ${r.x} ${r.y} ${a} ${o}`}let n=e[e.length-1];return`${t} L ${n.x} ${n.y}`}let ur=f(()=>Xn.value.ticks.map(e=>({y:J(e),x1:K.value.left,x2:K.value.right,value:e}))),dr=S(null),Q=S(null);function fr({datapoint:e,seriesIndex:t}){A.value!==`keyboard`&&(qt.value=!1,Q.value=null,j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function pr({datapoint:e,seriesIndex:t}){Ut(`selectDatapoint`,e),j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:t})}function mr(e,t={}){return se(P.value.formatter,e,a({p:P.value.prefix,v:e,s:P.value.suffix,r:N.value.roundingValue}),t)}function hr({datapoint:e,seriesIndex:t,triggerMode:n=`pointer`}){j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:e,seriesIndex:t}),A.value=n,dr.value={datapoint:e,seriesIndex:t,config:j.value,series:qn.value},qt.value=!0,Q.value=e;let r=N.value.customFormat;if(s(r)&&ue(()=>r({seriesIndex:t,datapoint:e,series:qn.value,config:j.value})))Jt.value=r({seriesIndex:t,datapoint:e,series:qn.value,config:j.value});else{let n=``;n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${L.value.plots.gradient.show?`url(#${e.parentId})`:e.color}"/></svg>${e.name}</div>`,n+=`<div>${mr(e.value,{datapoint:e,seriesIndex:t})}</div>`,Jt.value=`<div>${n}</div>`}}function gr(){A.value!==`keyboard`&&(qt.value=!1,Q.value=null)}function _r({boxPlot:e,seriesIndex:t,triggerMode:n=`pointer`}){A.value=n,Q.value=null,qt.value=!0,dr.value={boxPlot:e,seriesIndex:t,config:j.value,series:qn.value};let r=N.value.customFormat;if(s(r))try{let n={boxPlot:e,seriesIndex:t,series:qn.value,config:j.value};if(ue(()=>r(n))){Jt.value=r(n);return}}catch{}let i=[[F.value.tooltipLabels.upperAdjacent,e.upperAdjacent],[F.value.tooltipLabels.q3,e.q3],[F.value.tooltipLabels.median,e.median],[F.value.tooltipLabels.q1,e.q1],[F.value.tooltipLabels.lowerAdjacent,e.lowerAdjacent],[F.value.tooltipLabels.iqr,e.iqr]],a=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="1" y="1" width="10" height="10" rx="2" stroke="none" fill="${e.color}"/></svg>`,o=i.map(([n,r])=>`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;"><span>${n}</span><b>${mr(r,{boxPlot:e,seriesIndex:t})}</b></div>`).join(``);Jt.value=`<div style="min-width:160px;"><div style="display:flex;flex-direction:row;gap:6px;align-items:center;margin-bottom:6px;">${a}${e.name}</div>`+o+`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;margin-top:6px;"><span>${F.value.tooltipLabels.count}</span><b>${e.count}</b></div></div>`}let vr=f(()=>({head:q.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(t=>({name:`${e.name} - ${t.name}`,color:t.color}))),body:q.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(e=>e.value))}));function yr(e=null){qe(()=>{let t=[],n=[j.value.table.columnNames.series,j.value.table.columnNames.value];X.value?(n=Qn.value,t=Z.value.map(e=>[[e.name],[e.lowerAdjacent],[e.q1],[e.median],[e.q3],[e.upperAdjacent],[e.iqr],[e.count]])):t=vr.value.head.map((e,t)=>[[e.name],[vr.value.body[t]]]);let r=[[L.value.title.text],[L.value.title.subtitle.text],n.map(e=>[e])].concat(t),i=o(r);e?e(i):le({csvContent:i,title:L.value.title.text||`vue-ui-strip-plot`})})}let br=f(()=>{if(X.value){let e=Qn.value;return{colNames:e,head:e,body:Z.value.map(e=>[{color:e.color,name:e.name},$n(e.lowerAdjacent),$n(e.q1),$n(e.median),$n(e.q3),$n(e.upperAdjacent),$n(e.iqr),e.count]),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint}}}let e=[j.value.table.columnNames.series,j.value.table.columnNames.value],t=vr.value.head.map((e,t)=>{let n=a({p:P.value.prefix,v:vr.value.body[t],s:P.value.suffix,r:j.value.table.td.roundingValue});return[{color:e.color,name:e.name},n]}),n={th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint};return{colNames:[j.value.table.columnNames.series,j.value.table.columnNames.value],head:e,body:t,config:n}}),$=S(!1);function xr(e){$.value=e,Kt.value+=1}function Sr(){return q.value}function Cr(){U.value.showTable=!U.value.showTable}function wr(){U.value.dataLabels.show=!U.value.dataLabels.show}function Tr(){U.value.showTooltip=!U.value.showTooltip}let Er=S(!1);function Dr(){Er.value=!Er.value}let Or=Te(k,()=>L.value.title.text),kr=f(()=>q.value.map(e=>e.name)),Ar=S({start:0,end:q.value.length});Fe({timeLabelsEls:on,timeLabels:kr,slicer:Ar,configRef:j,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:V,height:H,targetClass:`.vue-ui-strip-plot-category-name`,rotation:P.value.xAxisLabels.autoRotate.angle});let jr=f(()=>ke({config:j,style:L,mutableConfig:U,dialog:Bt,accordion:Ft,isFullscreen:$,parent:k,maxWidth:800,isCursorPointer:R}));et(()=>U.value.showTable,e=>Oe(e,j,tn));function Mr(){U.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let Nr=f(()=>L.value.backgroundColor),Pr=f(()=>L.value.title),{isCallbackImaging:Fr,isCallbackSvg:Ir,generateSvg:Lr,onGenerateImage:Rr}=De({svg:z,title:Pr,legend:null,legendItems:null,backgroundColor:Nr,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:Mn});async function zr(){Ut(`copyAlt`,{config:j.value,dataset:Y.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Br(){return Y.value.length}function Vr(e){return Y.value[e]?.plots??[]}function Hr(e=cn.value,t=ln.value){return!Number.isInteger(e)||!Number.isInteger(t)?null:Vr(e)[t]??null}function Ur(){cn.value=null,ln.value=null,A.value=`pointer`,qt.value=!1,Q.value=null}function Wr(e){if(!e||!z.value)return;let t=z.value.getBoundingClientRect();un.value={x:t.left+e.x/V.value*t.width,y:t.top+e.y/H.value*t.height}}function Gr(e,t){let n=Hr(e,t);n&&(cn.value=e,ln.value=t,A.value=`keyboard`,Wr(n),hr({datapoint:n,seriesIndex:e,triggerMode:`keyboard`}))}function Kr(){dn.value=!0,cn.value=null,ln.value=null}function qr(){dn.value=!1,Ur()}function Jr(e){if(!z.value||Er.value||document.activeElement!==z.value||!Br())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){Ur();return}let s=cn.value,c=ln.value;if(s===null||c===null)s=0,c=0;else if(t||n){let e=Br();s=n?(s+1)%e:(s-1+e)%e;let t=Vr(s);if(!t.length)return;c=Math.min(c,t.length-1)}else if(r||i){let e=Vr(s);if(!e.length)return;c=r?(c+1)%e.length:(c-1+e.length)%e.length}if(a){let e=Hr();if(!e)return;pr({datapoint:e,seriesIndex:cn.value})}else Gr(s,c)}let Yr=f(()=>({headers:br.value?.colNames??[],rows:br.value?.body?.map(e=>e.map(e=>e&&typeof e==`object`&&`name`in e?e.name:e))??[]}));return Ce({getData:Sr,getImage:Or,generatePdf:jn,generateCsv:yr,generateImage:Mn,generateSvg:Lr,toggleTable:Cr,toggleLabels:wr,toggleTooltip:Tr,toggleAnnotator:Dr,toggleFullscreen:xr,copyAlt:zr}),et(()=>[V.value,H.value,P.value,L.value,j.value.style.fontFamily,O.dataset,Tn.value,sn.value,on.value,rn.value,an.value],Un,{flush:`post`,deep:!0}),(e,i)=>(x(),h(`div`,{ref_key:`stripPlotChart`,ref:k,class:Je(`vue-data-ui-component vue-ui-strip-plot ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`}`),style:b(`font-family:${j.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor};${j.value.responsive?`height:100%`:``}`),id:`strip-plot_${Gt.value}`,onMouseenter:i[2]||=()=>E(yn)(!0),onMouseleave:i[3]||=()=>E(yn)(!1)},[g(`div`,{id:`chart-instructions-${Gt.value}`,class:`sr-only`},[g(`p`,null,T(j.value.a11y.translations.keyboardNavigation),1)],8,rt),Yr.value?.rows?.length?(x(),p(ze,{key:0,uid:Gt.value,head:Yr.value.headers,body:Yr.value.rows,notice:j.value.a11y.translations.tableAvailable,caption:j.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):m(``,!0),M.value.buttons.annotator?(x(),p(E(Rt),Ke({key:1},E(n)(M.value.annotator),{svgRef:E(z),backgroundColor:L.value.backgroundColor,color:L.value.color,active:Er.value,isCursorPointer:R.value,palette:M.value.annotatorPalette,onClose:Dr}),Ue({_:2},[C(E(r),n=>({name:n,fn:D(r=>[w(e.$slots,n,y(v(E(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Nn.value?(x(),h(`div`,{key:2,ref_key:`noTitle`,ref:Zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),L.value.title.text?(x(),h(`div`,{key:3,ref_key:`chartTitle`,ref:Yt,style:`width:100%;background:transparent;padding-bottom:24px`},[(x(),p(Ee,{key:`title_${$t.value}`,config:{title:{cy:`donut-div-title`,...L.value.title},subtitle:{cy:`donut-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),M.value.show&&Wt.value&&(E(bn)||E(vn))?(x(),p(E(Lt),{ref_key:`userOptionsRef`,ref:nn,key:`user_option_${Kt.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:E(kn),isImaging:E(An),uid:Gt.value,hasTooltip:M.value.buttons.tooltip&&N.value.show,hasPdf:M.value.buttons.pdf,hasXls:M.value.buttons.csv,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasTable:M.value.buttons.table,hasLabel:M.value.buttons.labels&&j.value.type!==`violin`,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,isTooltip:U.value.showTooltip,isFullscreen:$.value,titles:{...M.value.buttonTitles},chartElement:k.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:Er.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:xr,onGeneratePdf:E(jn),onGenerateCsv:yr,onGenerateImage:E(Rr),onGenerateSvg:E(Lr),onToggleTable:Cr,onToggleLabels:wr,onToggleTooltip:Tr,onToggleAnnotator:Dr,onCopyAlt:zr,style:b({visibility:E(bn)?E(vn)?`visible`:`hidden`:`visible`})},Ue({_:2},[C(E(Ae)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(v(E(je)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,it,[(x(),h(`svg`,{ref_key:`svgRef`,ref:z,xmlns:E(pe),class:Je({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,"vue-data-ui-no-transition":!E(fn)||E(Hn)}),viewBox:`0 0 ${V.value} ${H.value}`,style:b(`max-width:100%; overflow: visible; background:transparent;color:${L.value.color};;visibility:${E(Vn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${Gt.value}`,tabindex:`0`,onFocus:Kr,onBlur:qr,onKeydown:Jr},[Ge(E(zt)),w(e.$slots,`svg-underlayer`,{svg:{...K.value,isPrintingImg:E(kn)||E(An)||E(Fr),isPrintingSvg:E(Ir),boxPlotSummaries:Z.value,series:q.value}},void 0,!0),e.$slots[`chart-background`]?(x(),h(`foreignObject`,{key:0,x:K.value.left,y:K.value.top,width:Math.max(.1,K.value.width),height:Math.max(.1,K.value.height),style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):m(``,!0),I.value.show?(x(),h(`g`,st,[I.value.horizontalGrid.show?(x(),h(`g`,ct,[(x(!0),h(d,null,C(ur.value,e=>(x(),h(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:I.value.horizontalGrid.stroke,"stroke-width":I.value.horizontalGrid.strokeWidth,"stroke-dasharray":I.value.horizontalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,lt))),256))])):m(``,!0),I.value.verticalGrid.show?(x(),h(`g`,ut,[(x(!0),h(d,null,C(q.value,(e,t)=>(x(),h(`line`,{x1:K.value.left+(t+1)*K.value.stripWidth,x2:K.value.left+(t+1)*K.value.stripWidth,y1:K.value.top,y2:K.value.bottom,stroke:I.value.verticalGrid.stroke,"stroke-width":I.value.verticalGrid.strokeWidth,"stroke-dasharray":I.value.verticalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,dt))),256))])):m(``,!0),g(`line`,{x1:K.value.left,x2:K.value.left,y1:K.value.top,y2:K.value.bottom,stroke:I.value.stroke,"stroke-width":I.value.strokeWidth,"stroke-linecap":`round`},null,8,ft),g(`line`,{x1:K.value.left,x2:K.value.right,y1:K.value.bottom,y2:K.value.bottom,stroke:I.value.stroke,"stroke-width":I.value.strokeWidth,"stroke-linecap":`round`},null,8,pt)])):m(``,!0),P.value.yAxisLabels.show?(x(),h(`g`,{key:2,ref_key:`scaleLabels`,ref:sn},[(x(!0),h(d,null,C(ur.value,(e,t)=>(x(),h(`text`,{class:Je({"vue-data-ui-transition":E(fn)&&!E(Hn)}),key:`sl_${t}`,transform:`translate(${e.x1+P.value.yAxisLabels.offsetX-5}, ${e.y+P.value.yAxisLabels.fontSize/3})`,fill:P.value.yAxisLabels.color,"font-size":P.value.yAxisLabels.fontSize,"text-anchor":`end`},T(E(se)(P.value.formatter,e.value,E(a)({p:P.value.prefix,v:e.value,s:P.value.suffix,r:P.value.yAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),11,mt))),128))],512)):m(``,!0),P.value.xAxisLabels.show?(x(),h(`g`,{key:3,ref_key:`timeLabelsEls`,ref:on},[(x(!0),h(d,null,C(kr.value,(e,t)=>(x(),h(`g`,null,[String(e).includes(`
2
- `)?(x(),h(`text`,{key:1,class:`vue-ui-strip-plot-category-name`,transform:`translate(${K.value.left+(t+1)*K.value.stripWidth-K.value.stripWidth/2}, ${K.value.bottom+P.value.xAxisLabels.fontSize*2+P.value.xAxisLabels.offsetY}), rotate(${P.value.xAxisLabels.rotation})`,"font-size":P.value.xAxisLabels.fontSize,fill:P.value.xAxisLabels.color,"text-anchor":P.value.xAxisLabels.rotation>0?`start`:P.value.xAxisLabels.rotation<0?`end`:`middle`,innerHTML:E(ee)({content:E(fe)(String(e)),fontSize:P.value.xAxisLabels.fontSize,fill:P.value.xAxisLabels.color,x:0,y:0})},null,8,gt)):(x(),h(`text`,{key:0,class:`vue-ui-strip-plot-category-name`,transform:`translate(${K.value.left+(t+1)*K.value.stripWidth-K.value.stripWidth/2}, ${K.value.bottom+P.value.xAxisLabels.fontSize*2+P.value.xAxisLabels.offsetY}), rotate(${P.value.xAxisLabels.rotation})`,"font-size":P.value.xAxisLabels.fontSize,fill:P.value.xAxisLabels.color,"text-anchor":P.value.xAxisLabels.rotation>0?`start`:P.value.xAxisLabels.rotation<0?`end`:`middle`},T(String(e)),9,ht))]))),256))],512)):m(``,!0),P.value.axis.yLabel?(x(),h(`text`,{key:4,ref_key:`yAxisLabel`,ref:an,fill:P.value.axis.color,"font-size":P.value.axis.fontSize,transform:`translate(${P.value.axis.fontSize}, ${K.value.top+K.value.height/2}) rotate(-90)`,"text-anchor":`middle`},T(P.value.axis.yLabel),9,_t)):m(``,!0),P.value.axis.xLabel?(x(),h(`text`,{key:5,ref_key:`xAxisLabel`,ref:rn,fill:P.value.axis.color,"font-size":P.value.axis.fontSize,x:K.value.left+K.value.width/2,y:H.value-P.value.axis.fontSize/3,"text-anchor":`middle`},T(P.value.axis.xLabel),9,vt)):m(``,!0),Q.value?(x(),h(d,{key:6},[g(`line`,{x1:K.value.left,x2:K.value.right,y1:Q.value.y,y2:Q.value.y,stroke:Q.value.color,"stroke-width":1,class:Je({"select-circle":j.value.useCssAnimation})},null,10,yt),g(`circle`,{cx:K.value.left,cy:Q.value.y,r:3,fill:Q.value.color,class:Je({"select-circle":j.value.useCssAnimation})},null,10,bt),g(`circle`,{cx:K.value.right,cy:Q.value.y,r:3,fill:Q.value.color,class:Je({"select-circle":j.value.useCssAnimation})},null,10,xt)],64)):m(``,!0),g(`defs`,null,[(x(!0),h(d,null,C(q.value,e=>(x(),p(Re,{t:`radial`,id:e.id,key:`r_${e.id}`,fy:`30%`,stops:[[`10%`,E(c)(e.color,L.value.plots.gradient.intensity/100),1],[`90%`,E(u)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),(x(!0),h(d,null,C(tr.value,(e,t)=>(x(),h(d,{key:e.id},[e.path?(x(),h(`path`,{key:0,d:e.path,fill:e.fill,stroke:e.color,"fill-opacity":F.value.opacity,"stroke-opacity":F.value.strokeOpacity,"stroke-width":F.value.strokeWidth,style:b({pointerEvents:X.value?`auto`:`none`,cursor:X.value&&R.value?`pointer`:`default`}),onMouseenter:e=>X.value&&Z.value[t]&&_r({boxPlot:Z.value[t],seriesIndex:t,triggerMode:`pointer`}),onMouseleave:i[0]||=e=>X.value&&gr()},null,44,St)):m(``,!0),(x(!0),h(d,null,C(e.connectors,(t,n)=>(x(),h(`line`,{key:`violin_connector_${e.id}_${n}`,x1:t.x,x2:t.x,y1:t.y1,y2:t.y2,stroke:e.color,"stroke-opacity":F.value.strokeOpacity,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,Ct))),128))],64))),128)),(x(!0),h(d,null,C(Z.value,(e,t)=>(x(),h(`g`,{key:`boxplot_${e.id}`,style:b({cursor:R.value?`pointer`:`default`}),onMouseenter:n=>_r({boxPlot:e,seriesIndex:t,triggerMode:`pointer`}),onMouseleave:gr},[g(`line`,{x1:e.centerX,x2:e.centerX,y1:e.upperY,y2:e.lowerY,stroke:E(u)(e.boxPlotColor,.2),"stroke-width":Math.max(1,F.value.strokeWidth),"stroke-linecap":`round`},null,8,Tt),g(`rect`,{x:e.boxLeft,y:Math.min(e.q1Y,e.q3Y),width:e.boxWidth,height:Math.max(1,Math.abs(e.q3Y-e.q1Y)),fill:e.boxPlotColor,stroke:E(u)(e.boxPlotColor,.2),"stroke-width":Math.max(1,F.value.strokeWidth),rx:e.boxWidth/20},null,8,Et),g(`circle`,{cx:e.boxLeft+e.boxWidth/2,cy:e.medianY,r:e.boxWidth/3*Math.min(1,F.value.boxPlot.medianCircleRadiusRatio),fill:F.value.boxPlot.medianCircleFill,stroke:E(u)(e.boxPlotColor,.2)},null,8,Dt)],44,wt))),128)),(x(!0),h(d,null,C(Y.value,(t,n)=>(x(),h(d,null,[X.value?m(``,!0):(x(!0),h(d,{key:0},C(t.plots,(n,r)=>(x(),p(Ie,Ke({ref_for:!0},e.$attrs,{plot:{x:n.x,y:Qt.value?n.y:K.value.top},radius:Q.value&&Q.value.id===n.id?W.value*1.5:W.value,shape:L.value.plots.shape,stroke:L.value.plots.stroke,strokeWidth:L.value.plots.strokeWidth,color:L.value.plots.gradient.show?`url(#${t.id})`:t.color,style:`transition: all 0.2s ease-in-out; opacity:${Q.value?Q.value.id===n.id?1:.2:L.value.plots.opacity};${Fn.value?`transition-delay:${r*50}ms`:``}`,class:{"vue-ui-strip-plot-animated":j.value.useCssAnimation&&Fn.value&&!E(hn),"vue-ui-strip-plot-select-circle":j.value.useCssAnimation&&!Fn.value},onMouseenter:e=>hr({datapoint:n,seriesIndex:r,triggerMode:`pointer`}),onMouseleave:e=>fr({datapoint:n,seriesIndex:r}),onClick:e=>pr({datapoint:n,seriesIndex:r})}),null,16,[`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`color`,`style`,`class`,`onMouseenter`,`onMouseleave`,`onClick`]))),256)),U.value.dataLabels.show&&!X.value?(x(),h(`g`,Ot,[(x(!0),h(d,null,C(t.plots,(e,n)=>(x(),h(d,null,[n===t.plots.length-1||Q.value&&Q.value.id===e.id&&!U.value.showTooltip?(x(),h(`text`,{key:0,x:e.x,y:e.y+P.value.bestPlotLabel.offsetY-W.value*(Q.value&&Q.value.id===e.id&&!U.value.showTooltip?2:1.5),"font-size":P.value.bestPlotLabel.fontSize,fill:P.value.bestPlotLabel.color,"text-anchor":`middle`,style:b(`opacity:${j.value.useCssAnimation?+!Fn.value:1};transition:opacity 0.2s ease-in;`)},T(e.name)+` `+T(P.value.bestPlotLabel.showValue?E(se)(P.value.formatter,e.value,E(a)({p:`(${P.value.prefix}`,v:e.value,s:`${P.value.suffix})`,r:L.value.labels.bestPlotLabel.rounding}),{datapoint:e,seriesIndex:n}):``),13,kt)):m(``,!0)],64))),256))])):m(``,!0)],64))),256)),w(e.$slots,`svg`,{svg:{...K.value,isPrintingImg:E(kn)||E(An)||E(Fr),isPrintingSvg:E(Ir),boxPlotSummaries:Z.value,series:q.value}},void 0,!0)],46,at)),e.$slots.hint?(x(),h(`div`,At,[w(e.$slots,`hint`,y(v({hint:j.value.a11y.translations.keyboardNavigation,isVisible:dn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(x(),h(`div`,jt,[w(e.$slots,`watermark`,y(v({isPrinting:E(kn)||E(An)||E(Fr)||E(Ir)})),void 0,!0)])):m(``,!0),e.$slots.source?(x(),h(`div`,{key:6,ref_key:`source`,ref:Xt,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),Ge(E(Nt),{teleportTo:N.value.teleportTo,show:U.value.showTooltip&&qt.value,backgroundColor:N.value.backgroundColor,color:N.value.color,borderRadius:N.value.borderRadius,borderColor:N.value.borderColor,borderWidth:N.value.borderWidth,fontSize:N.value.fontSize,backgroundOpacity:N.value.backgroundOpacity,position:N.value.position,offsetX:N.value.offsetX,offsetY:N.value.offsetY,parent:k.value,content:Jt.value,isFullscreen:$.value,isCustom:E(s)(N.value.customFormat),smooth:N.value.smooth,backdropFilter:N.value.backdropFilter,smoothForce:N.value.smoothForce,smoothSnapThreshold:N.value.smoothSnapThreshold,isA11yMode:A.value===`keyboard`,a11yPosition:un.value},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,y(v({...dr.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,y(v({...dr.value})),void 0,!0)]),"tooltip-after":D(()=>[w(e.$slots,`tooltip-after`,y(v({...dr.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`]),Wt.value&&M.value.buttons.table?(x(),p(Ze(jr.value.component),Ke({key:7},jr.value.props,{ref_key:`tableUnit`,ref:tn,onClose:Mr}),Ue({content:D(()=>[(x(),p(E(It),{key:`table_${en.value}`,colNames:br.value.colNames,head:br.value.head,body:br.value.body,config:br.value.config,title:j.value.table.useDialog?``:jr.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:R.value,onClose:Mr},{th:D(({th:e})=>[g(`div`,Mt,T(e),1)]),td:D(({td:e})=>[We(T(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[j.value.table.useDialog?{name:`title`,fn:D(()=>[We(T(jr.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:D(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>yr(M.value.callbacks.csv),style:b({cursor:R.value?`pointer`:`default`})},[Ge(E(Pt),{name:`fileCsv`,stroke:jr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),w(e.$slots,`skeleton`,{},()=>[E(hn)?(x(),p(be,{key:0})):m(``,!0)],!0)],46,nt))}},[[`__scopeId`,`data-v-9b6f9fcb`]]);export{tt as n,Nt as t};
@@ -1,14 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{$ as n,C as r,D as i,Ft as a,Ht as o,Jt as ee,X as te,d as s,in as ne,nt as re,r as ie}from"./lib-rPeBMZrn.js";import{n as ae,t as oe}from"./useHints-C-TwxM0Y.js";import{t as se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as c}from"./BaseIcon-CoY0vuL3.js";import{t as l}from"./vue-ui-xy-CpS-ASnd.js";import{t as ce}from"./vue-ui-donut-BlQXnf7O.js";import{Fragment as u,computed as d,createBlock as le,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createTextVNode as h,createVNode as ue,defineAsyncComponent as de,nextTick as fe,normalizeClass as g,normalizeStyle as _,onMounted as pe,openBlock as v,ref as y,renderList as b,toDisplayString as x,unref as S,useCssVars as me,vModelSelect as he,vModelText as ge,watch as _e,withCtx as ve,withDirectives as ye,withKeys as be,withModifiers as xe}from"vue";var Se=/* @__PURE__ */ e({default:()=>dn}),Ce=[`innerHTML`],we=[`data-is-open`],Te={class:`vue-ui-table-export-hub-options`},Ee={class:`vue-ui-table-export-hub-option-wrapper`},De={class:`label`},Oe=[`innerHTML`],ke={class:`vue-ui-table-export-hub-option-wrapper`},Ae={class:`label`},je=[`innerHTML`],Me={class:`vue-ui-table-dialog-field`},Ne={class:`label vue-ui-table-dialog-input-label`,style:{width:`100%`}},Pe={style:{width:`fit-content`}},Fe={class:`vue-ui-table`},Ie={key:0},Le={key:0},Re={key:1},ze={key:0,style:{display:`flex`,"align-items":`center`,"justify-content":`flex-end`}},Be=[`innerHTML`],Ve={key:0,style:{"margin-left":`3px`}},He={key:0},Ue={class:`th-filter`},We={key:0,class:`th-date`},Ge={class:`date-wrapper--inputs`},Ke={class:`date-fieldset`},qe=[`for`],Je=[`id`,`onUpdate:modelValue`,`onInput`],Ye={class:`date-fieldset`},Xe=[`for`],Ze=[`id`,`onUpdate:modelValue`,`onInput`],Qe={class:`date-wrapper--button`},$e=[`onClick`],et=[`innerHTML`],tt=[`innerHTML`],nt=[`innerHTML`],rt=[`onClick`,`disabled`],it=[`placeholder`,`onUpdate:modelValue`,`name`],at=[`onClick`],ot=[`innerHTML`],st=[`innerHTML`],ct=[`innerHTML`],lt=[`onClick`,`innerHTML`],ut=[`innerHTML`],dt={key:5,class:`th-range-filter`},ft=[`for`],pt=[`id`,`max`,`min`,`onUpdate:modelValue`],mt=[`id`,`max`,`min`,`onUpdate:modelValue`],ht=[`for`],gt=[`onClick`,`disabled`],_t=[`id`],vt=[`onClick`],yt=[`onClick`,`onKeyup`],bt=[`innerHTML`,`onClick`,`onKeyup`],xt=[`data-row`],St=[`data-row`],Ct=[`data-row`,`onClick`,`onKeyup`,`id`],wt=[`innerHTML`],Tt={key:1},Et={key:2},Dt={key:5},Ot=[`innerHTML`],kt={key:0},At={style:{"margin-left":`12px`}},jt={class:`format-num`},Mt={style:{"margin-left":`12px`}},Nt={key:0,class:`format-num`},Pt={key:1,class:`format-num`},Ft={key:2},It={style:{"margin-left":`12px`}},Lt={key:0,class:`format-num`},Rt={key:1,class:`format-num`},zt={key:2},Bt={key:1,class:`vue-ui-table-paginator format-num`},Vt={key:2,class:`vue-ui-table-size-warning`},Ht=[`innerHTML`],Ut={key:4,class:`vue-ui-table-pagination format-num`},Wt=[`innerHTML`,`disabled`],Gt=[`disabled`],Kt={for:`pageScroller`,style:{"font-size":`14px`}},qt=[`max`,`value`],Jt={key:1},Yt=[`disabled`],Xt=[`innerHTML`,`disabled`],Zt={class:`vue-ui-table-chart-modal-options`},Qt=[`innerHTML`],$t=[`innerHTML`],en=[`innerHTML`],tn={style:{width:`100%`,height:`fit-content`}},nn={class:`vue-ui-table-fieldset`},rn={class:`vue-ui-table-fieldset-wrapper`},an=[`name`,`id`,`checked`,`onInput`],on=[`for`],sn=[`disabled`],cn=[`innerHTML`],ln={style:{width:`100%`,"margin-bottom":`12px`}},un={key:2,style:{width:`100%`,"margin-bottom":`32px`}},dn=/*#__PURE__*/ se({__name:`vue-ui-table`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`page-change`],setup(e,{expose:se,emit:Se}){me(e=>({v6b779b9d:Ln.value,v71f90aa0:Rn.value,v82bf5584:Hn.value,bc0e3a90:zn.value,v4bc5be6a:Un.value,v542dfbf0:Wn.value,v5935dfae:Bn.value,v23648322:Vn.value,v98d33e98:Gn.value}));let dn=de(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),C=e,fn=Se,{vue_ui_table:pn}=t(),mn=te();y(null);let hn=y(null),gn=y(null),w=y({height:316,type:`bar`,width:512}),T=y({ASC:1,BAR:`bar`,DATE:`date`,DESC:-1,DONUT:`donut`,LINE:`line`,NUMERIC:`numeric`,PERCENTAGE:`percentage`,TEXT:`text`}),_n=y(100),vn=y(100);y(0),y(0),y(400),y(200);let yn=y({CELL:`smart-td-selected`,FIRST_TD:`smart-td-selected-first`,LAST_TD:`smart-td-selected-last`,ROW:`smart-td-selected-neighbor`}),bn=y(void 0),xn=y(void 0),E=y({col:void 0,rows:[]}),D=y(0),O=y(20),Sn=y(!1),Cn=y(!1),k=y({}),A=y({}),wn=y({}),j=y({}),M=y({}),N=y({}),P=y({}),F=y({}),I=y({}),Tn=y(C.config.rowsPerPage?C.config.rowsPerPage:25),En=y([.../* @__PURE__ */ new Set([10,25,50,100,250,500,C.config.rowsPerPage?C.config.rowsPerPage:25,C.dataset.body.length])].sort((e,t)=>e-t)),Dn=y(void 0),L=y(void 0),On=y(void 0),R=y(!1),kn=y(0),An=y(``),jn=y(``),z=y(!1),B=y(JSON.parse(JSON.stringify(C.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),Mn=y(JSON.parse(JSON.stringify(C.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),V=y(JSON.parse(JSON.stringify(C.dataset.header)).map((e,t)=>({average:Object.hasOwn(e,`average`)?e.average:!1,decimals:Object.hasOwn(e,`decimals`)?e.decimals:0,isMultiselect:Object.hasOwn(e,`isMultiselect`)?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,`isPercentage`)?e.isPercentage:!1,isSearch:Object.hasOwn(e,`isSearch`)?e.isSearch:!1,isSort:Object.hasOwn(e,`isSort`)?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,`percentageTo`)?e.percentageTo:void 0,prefix:Object.hasOwn(e,`prefix`)?e.prefix:``,rangeFilter:Object.hasOwn(e,`rangeFilter`)?e.rangeFilter:!1,suffix:Object.hasOwn(e,`suffix`)?e.suffix:``,sum:Object.hasOwn(e,`sum`)?e.sum:!1,type:e.type,index:t}))),Nn=d(()=>hn.value?hn.value.getBoundingClientRect().height+3:3),H=d(()=>{if(!Object.keys(C.config||{}).length)return pn;let e=ne({defaultConfig:pn,userConfig:C.config});return r(e)}),U=d(()=>H.value.style.exportMenu),W=d(()=>H.value.style.title),G=d(()=>H.value.style.th),K=d(()=>H.value.style.inputs),Pn=d(()=>H.value.style.dropdowns),Fn=d(()=>H.value.style.closeButtons),q=d(()=>H.value.style.rows),J=d(()=>H.value.style.pagination),Y=d(()=>H.value.style.chart),In=d(()=>H.value.style);ae({config:()=>H.value,dataset:()=>C.dataset,component:`VueUiTable`,rules:[oe.noHint]});let X=d(()=>H.value.useCursorPointer),Ln=d(()=>G.value.buttons.cancel.inactive.backgroundColor),Rn=d(()=>G.value.buttons.cancel.inactive.color),zn=d(()=>G.value.buttons.cancel.active.backgroundColor),Bn=d(()=>G.value.buttons.filter.active.backgroundColor),Vn=d(()=>G.value.buttons.filter.active.color),Hn=d(()=>a(zn.value,.33)),Un=d(()=>ee(zn.value,33)),Wn=d(()=>a(Bn.value,.33)),Gn=d(()=>ee(Bn,33)),Kn=d(()=>[...V.value].filter(e=>e.type===T.value.DATE)),qn=d(()=>[``,...Kn.value.map(e=>e.name)]),Jn=d(()=>{let e=Kn.value.find(e=>e.name===An.value);return e?e.index:null}),Z=d(()=>{let e=[];if(B.value.length)for(let t=0;t<B.value.length;t+=Tn.value)e.push(B.value.slice(t,t+Tn.value));return e}),Yn=d(()=>Z.value[D.value]),Xn=d(()=>Jn.value==null?[]:Yn.value.map(e=>e.td[Jn.value])),Zn=d(()=>Object.keys(M.value).map(e=>({index:e,name:C.dataset.header[e].name,options:M.value[e]}))),Qn=d(()=>H.value.useChart&&E.value.rows.length>1),$n=d(()=>C.dataset.header.map(e=>e.type).includes(T.value.NUMERIC)),Q=d(()=>({arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,grip:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>`})),er=d(()=>B.value.map(e=>e.td)),tr=d(()=>({sumPercentage:Number((E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0)*100).toFixed(C.dataset.header[E.value.col].decimals)).toLocaleString(),sumRegular:Number(E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0).toFixed(C.dataset.header[E.value.col].decimals)).toLocaleString(),averagePercentage:Number((E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0)/E.value.rows.length*100).toFixed(C.dataset.header[E.value.col].decimals)).toLocaleString(),averageRegular:Number((E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0)/E.value.rows.length).toFixed(C.dataset.header[E.value.col].decimals)).toLocaleString()})),nr=y({width:1e3,height:500});function rr({width:e,height:t}){nr.value={width:e,height:t}}let ir=d(()=>{if(!Qn.value)return[];let e=nr.value.height,t=nr.value.width,n=t/E.value.rows.length,r=Math.max(...E.value.rows.map(e=>e.value)),i=Math.min(...E.value.rows.map(e=>e.value)),o=C.dataset.header[E.value.col].isPercentage&&C.dataset.header[E.value.col].percentageTo,ee=w.value.type===T.value.DONUT&&L.value&&L.value.name,te=C.dataset.header[E.value.col].name+(o?` / ${C.dataset.header[N.value[E.value.col].referenceIndex].name}`:``)+(ee?` ${H.value.translations.by} ${L.value.name}`:``),ne=C.dataset.header[E.value.col].prefix,re=C.dataset.header[E.value.col].suffix,ae=[{name:te,series:E.value.rows.map(e=>e.value),type:`line`,useProgression:!0,smooth:Y.value.layout.line.smooth,color:Y.value.layout.line.stroke,useArea:Y.value.layout.line.useArea}],oe=[{name:te,series:E.value.rows.map(e=>e.value),type:`bar`,useProgression:!0,color:Y.value.layout.bar.fill}],se=Y.value.modal.backgroundColor,c=ie(se),l=C.dataset.header[E.value.col].decimals,ce={useCssAnimation:!1,chart:{width:t,height:e-250,backgroundColor:se,color:c,labels:{fontSize:18,prefix:ne,suffix:re},grid:{stroke:a(c,.5),labels:{color:c,xAxisLabels:{color:c,show:Xn.value.length,values:Xn.value,datetimeFormatter:Y.value.layout.datetimeFormatter,showOnlyAtModulo:Y.value.layout.timeLabels.showOnlyAtModulo,modulo:Y.value.layout.timeLabels.modulo}}},highlighter:{color:c},legend:{color:c,show:!1},title:{text:te,color:c,textAlign:`center`,fontSize:18},tooltip:{showTimeLabel:Xn.value.length,backgroundOpacity:30,color:c,backgroundColor:se,showPercentage:!1,roundingValue:l},userOptions:{buttons:{pdf:!1,csv:!1,table:!1,annotator:!1}},zoom:{show:Y.value.layout.zoom.show,autoFit:Y.value.layout.zoom.autoFit,focusOnDrag:!0,minimap:{show:!0}}},line:{labels:{show:!0,color:c,rounding:l},dot:{useSerieColor:!1,fill:Y.value.layout.line.plot.fill,strokeWidth:Y.value.layout.line.plot.strokeWidth}},bar:{useGradient:!1,border:{useSerieColor:!1,stroke:Y.value.layout.bar.stroke,strokeWidth:Y.value.layout.bar.strokeWidth},labels:{show:!0,color:c,rounding:l}}},u=i>=0?0:Math.abs(i),d=r+u,le=C.dataset.header[E.value.col].isPercentage,f=E.value.rows.map((t,r)=>({x:n*r+n/2,y:(1-(t.value+u)/d)*e,value:le?t.value*100:t.value,suffix:le?`%`:C.dataset.header[E.value.col].suffix?C.dataset.header[E.value.col].suffix:``,prefix:C.dataset.header[E.value.col].prefix?C.dataset.header[E.value.col].prefix:``,index:t.index,absoluteValue:le?Math.abs(t.value)*100:Math.abs(t.value)}));return{donutConfig:{useCssAnimation:!1,userOptions:{position:`left`,buttons:{pdf:!1,csv:!1,table:!1,annotator:!1}},style:{chart:{backgroundColor:se,color:c,layout:{curvedMarkers:!0,donut:{strokeWidth:64},labels:{dataLabels:{suffix:le?`%`:``,prefix:ne},value:{rounding:l},percentage:{color:c,rounding:l},name:{color:c},hollow:{average:{color:c,text:H.value.translations.average,value:{color:c}},total:{color:c,offsetY:-12,text:H.value.translations.total,value:{color:c,offsetY:-12}}}}},legend:{backgroundColor:se,color:c,roundingValue:l,roundingPercentage:l},padding:{left:12,right:12},title:{text:te,color:c,fontSize:18},tooltip:{backgroundOpacity:30,color:c,backgroundColor:se,roundingValue:l,roundingValue:l}}}},xyConfig:ce,xyDatasetLine:ae,xyDatasetBar:oe,progression:f.length>=2&&s(f)}});function ar(){let e=L.value.options.map((e,t)=>({name:e,color:o[t]||o[t%o.length],values:[Yn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>Math.abs(e)+Math.abs(t),0)],absoluteValue:Yn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>e+t,0)})).sort((e,t)=>t.value-e.value);bn.value=e,fe(()=>{w.value.type=T.value.DONUT,z.value=!1})}function or(e,t){return!A.value[e]&&(t.isSort||t.isSearch||t.isMultiselect||t.rangeFilter)&&![T.value.DATE].includes(t.type)}function sr(e=`all`){let t=C.dataset.header.map(e=>e.name),n=e===`all`?B.value.map(e=>e.td):Yn.value.map(e=>e.td),r=[t].concat(n),a=i(r);re({csvContent:a,title:jn.value})}function cr(){let e=document.getElementsByClassName(`th-dropdown`);e.length&&Array.from(e).forEach(e=>{e.dataset.isOpen=!1})}function lr(e,t){let n;clearTimeout(n),n=setTimeout(e,t)}function ur(){let e=document.getElementsByClassName(`tr_${mn}`);Array.from(e).forEach(e=>{Array.from(e.getElementsByTagName(`td`)).forEach(e=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.color):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)})}),Array.from(e).forEach(e=>e.dataset.selected=`false`),D.value>Z.value.length-1&&(D.value=Z.value.length-1),R.value=!1,bn.value=void 0,Dn.value=void 0,w.value.type=T.value.BAR,E.value={col:void 0,rows:[]},_n.value=100,vn.value=100}function dr(e,t){B.value=e.filter(e=>e.td[t]>=P.value[t].min&&e[t]<=P.value[t].max)}function fr(e,t){if(I.value[t]===T.value.ASC&&(e=e.sort((e,n)=>e[t]-n[t])),I.value[t]===T.value.DESC)e=e.sort((e,n)=>n[t]-e[t]);else return 0}function pr(){ur(),Object.keys(P.value).forEach(e=>{dr(B.value,e)}),Object.keys(I.value).forEach(e=>{fr(B.value,e)}),xn.value!==void 0&&fr(B.value,xn.value),C.dataset.header.forEach((e,t)=>{if(e.isPercentage){let e=N.value[t].referenceIndex,n=B.value.map(t=>t.td[e]).reduce((e,t)=>e+t,0);B.value.forEach(r=>{r.td[t]=r.td[e]/n})}}),D.value>Z.value.length-1&&(D.value=Z.value.length-1),[-1].includes(D.value)&&(D.value=0)}function mr(){B.value=Mn.value.filter(e=>{for(let t in F.value)if(!e.td[t].toUpperCase().includes(F.value[t].toUpperCase()))return!1;for(let t in M.value)if(!M.value[t].some(n=>n===e.td[t]))return!1;for(let t in k.value){let n=new Date(e.td[t]),r=new Date(k.value[t].from),i=new Date(k.value[t].to);if(n<r||n>i)return!1}return!0}),pr()}function hr(e){return er.value.map(t=>t[e]).map(e=>isNaN(Number(e))?0:e).reduce((e,t)=>e+t,0)/B.value.length}function gr(e){let t=C.dataset.body.map(t=>new Date(t.td[e])),n=new Date(Math.min(...t)),r=new Date(Math.max(...t)),i=n.getFullYear(),a=r.getFullYear(),o=String(n.getMonth()+1).padStart(2,`0`),ee=String(r.getMonth()+1).padStart(2,`0`),te=String(n.getDate()).padStart(2,`0`),s=String(r.getDate()).padStart(2,`0`);return{from:`${i}-${o}-${te}`,to:`${a}-${ee}-${s}`}}function $(e){return[...new Set(C.dataset.body.map(t=>t.td[e]))]}function _r(e){return er.value.map(t=>t[e]).map(e=>isNaN(Number(e))?0:e).reduce((e,t)=>e+t,0)}function vr(e){return e.includes(NaN)}function yr(e,t){return!M.value[t]||M.value[t].includes(e)}function br(e){return!isNaN(Number(String(e).replaceAll(`%`,``)))}function xr(e,t){let n=t.isSort,r=t.isSearch,i=t.isMultiselect&&M.value[e],a=t.rangeFilter,o=e=>{if(a&&P.value[e])return Math.round(P.value[e].min)===j.value[e].min&&Math.round(P.value[e].max)===j.value[e].max};if(n&&r&&i&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&r&&i)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(n&&r&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&o(e);if(n&&r)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e]);if(n&&i&&a)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&i)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(r&&i&&a)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length&&o(e);if(r&&i)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length;if(r&&a)return[``,void 0].includes(F.value[e])&&o(e);if(r)return[``,void 0].includes(F.value[e]);if(n&&a)return[void 0].includes(I.value[e])&&o(e);if(n)return[void 0].includes(I.value[e]);if(i&&a)return M.value[e].length===$(e).length&&o(e);if(i)return M.value[e].length===$(e).length}function Sr(){return{totalPages:Z.value.length,itemsPerPage:Tn.value,currentPage:D.value,currentPageData:Yn.value.map(e=>e.td)}}se({getCurrentPageData:Sr});function Cr(){fn(`page-change`,Sr())}let wr=y(null);function Tr(e){if(ur(),e===`next`&&D.value<Z.value.length){if(D.value+1>Z.value.length-1)return;D.value+=1}else if(e===`previous`&&D.value>=1)--D.value;else{if(e-1<0||e>Z.value.length||e===`previous`)return;D.value=e-1}Cr(),wr.value&&wr.value.scrollTo({top:0,left:0,behavior:`smooth`})}function Er(e){e.preventDefault();let t=e.keyCode;if(![38,40,37,39].includes(t))return;let n=e.target.id.match(/cell_(\d+)_(\d+)_([0-9a-fA-F-]{36})/),r=parseInt(n[1]),i=parseInt(n[2]),a=document.getElementById(`cell_${r}_${i+1}_${mn}`),o=document.getElementById(`cell_${r}_${i-1}_${mn}`),ee=document.getElementById(`cell_${r+1}_${i}_${mn}`),te=document.getElementById(`cell_${r-1}_${i}_${mn}`),s;switch(!0){case t===39:s=a;break;case t===37:s=o;break;case t===38:s=te;break;case t===40:s=ee;break;default:return}s&&(s.focus(),s.scrollIntoView({behavior:`smooth`,block:`center`}))}function Dr(e){let t=0;for(let n=0;n<e.length;n+=1)t+=e.charCodeAt(n);return t}async function Or(){return new Promise(e=>{let t=[];V.value.forEach((e,n)=>{if(e.isSearch&&Object.assign(F.value,{[n]:``}),e.isMultiselect&&Object.assign(M.value,{[n]:$(n)}),e.type===T.value.DATE&&(Object.assign(k.value,{[n]:gr(n)}),Object.assign(wn.value,{[n]:!1})),(e.isPercentage||e.percentageTo)&&Object.assign(N.value,{[n]:{reference:e.percentageTo,referenceIndex:C.dataset.header.map(e=>e.name).indexOf(e.percentageTo)}}),e.rangeFilter&&(Object.assign(P.value,{[n]:{min:Math.round(Math.min(...C.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...C.dataset.body.map(e=>e.td).map(e=>e[n])))}}),Object.assign(j.value,{[n]:{min:Math.round(Math.min(...C.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...C.dataset.body.map(e=>e.td).map(e=>e[n])))}})),e.isPercentage){let r=C.dataset.header.map(e=>e.name).indexOf(e.percentageTo),i=C.dataset.body.map(e=>e.td[r]).reduce((e,t)=>e+t,0);t.push([n,r,i])}e.type===T.value.NUMERIC&&!e.isPercentage&&Object.assign(A.value,{[n]:vr(C.dataset.body.map(e=>Number(e.td[n])))})}),B.value.forEach((e,n)=>{t.map(t=>{let[n,r,i]=t;e.td[n]=e.td[r]/i}),e.td.forEach((t,r)=>{C.dataset.header[r].type===T.value.TEXT&&C.dataset.header[r].isSearch&&(e[r]=Dr(t)),C.dataset.header[r].type===T.value.DATE&&(e[r]=new Date(t).getTime()),C.dataset.header[r].type===T.value.NUMERIC&&(e[r]=isNaN(Number(t))?r:t),Mn.value[n][r]=e[r]})}),e(!0)})}function kr(e,t){return new Promise((n,r)=>{e().then(e=>{try{n(t(e))}catch(e){r(e)}}).catch(e=>{r(e)})})}async function Ar(e){k.value[e]={from:gr(e).from,to:gr(e).to},wn.value[e]=!1,await fe(),mr()}function jr(e,t,n){let r=n.currentTarget;clearTimeout(gn.value),r.classList.add(`clicked`),gn.value=setTimeout(()=>{r.classList.remove(`clicked`)},200),xn.value=void 0,t.rangeFilter&&(P.value[e].min=j.value[e].min,P.value[e].max=j.value[e].max),t.isMultiselect?(M.value[e]=$(e),t.type===T.value.TEXT&&(I.value[e]=void 0),t.isSearch&&(F.value[e]=``)):t.type===T.value.NUMERIC?I.value[e]=void 0:t.type===T.value.TEXT?(I.value[e]=void 0,F.value[e]=``):t.type===T.value.DATE&&(I.value[e]=void 0),mr()}function Mr({td:e,rowIndex:t,colIndex:n,headerType:r,event:i}){if(r!==T.value.NUMERIC||isNaN(Number(e))){ur();return}E.value.col!==n&&ur();let a=i.currentTarget.parentNode;E.value.col=n,E.value.rows.map(e=>e.index).includes(t)?(a.dataset.selected=`false`,E.value.rows=E.value.rows.filter(e=>e.index!==t),i.currentTarget.classList.remove(yn.value.CELL),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.olor):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)}),i.currentTarget.dataset.row===`even`?(i.currentTarget.style.background=q.value.even.backgroundColor,i.currentTarget.style.color=q.value.even.color):(i.currentTarget.style.background=q.value.odd.backgroundColor,i.currentTarget.style.color=q.value.odd.color)):(a.dataset.selected=`true`,E.value.rows.push({index:t,value:e}),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.selectedNeighbors.backgroundColor,e.style.color=q.value.even.selectedNeighbors.color):(e.style.background=q.value.odd.selectedNeighbors.backgroundColor,e.style.color=q.value.odd.selectedNeighbors.color)}),i.currentTarget.dataset.row===`odd`?(i.currentTarget.style.background=q.value.odd.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.odd.selectedCell.color):(i.currentTarget.style.background=q.value.even.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.even.selectedCell.color)),E.value.rows=E.value.rows.sort((e,t)=>e.index-t.index),w.value.type===T.value.DONUT&&E.value.rows.length>0&&ar()}function Nr(e){E.value.col===e?(Dn.value=void 0,ur()):(Yn.value.forEach((t,n)=>{Mr({td:t.td[e],rowIndex:n,colIndex:e,headerType:T.value.NUMERIC,event:{currentTarget:document.getElementById(`cell_${n}_${e}_${mn}`)}})}),Dn.value=e)}async function Pr(e,t){M.value[t].includes(e)?M.value[t]=M.value[t].filter(t=>t!==e):M.value[t].push(e),await fe(),mr()}function Fr(e){wn.value[e]=gr(e).from!==k.value[e].from||gr(e).to!==k.value[e].to}function Ir(e,t){xn.value=e;let n=t.currentTarget;clearTimeout(gn.value),n.classList.add(`clicked`),gn.value=setTimeout(()=>{n.classList.remove(`clicked`)},200),I.value[e]===1?I.value[e]=T.value.DESC:I.value[e]=T.value.ASC,pr()}function Lr(e,t,n){let r=n.currentTarget;clearTimeout(gn.value),r.classList.add(`clicked`),gn.value=setTimeout(()=>{r.classList.remove(`clicked`)},200);let i=document.getElementById(`th_dropdown_${e}`);i.dataset.isOpen===`false`?i.dataset.isOpen=`true`:i.dataset.isOpen=`false`}function Rr(e){ur(),!e||!e.target.value?D.value=0:D.value=Number(e.target.value),Cr()}let zr=y(null);pe(()=>{if(C.dataset.header.length===0)throw Error(`vue-ui-table error: missing header data.
2
- Provide an array of objects of type:
3
- {
4
- name: string;
5
- type: string; ('text' | 'numeric' | 'date')
6
- average: boolean;
7
- decimals: number | undefined;
8
- sum: boolean;
9
- isSort:boolean;
10
- isSearch: boolean;
11
- isMultiselect: boolean;
12
- isPercentage: boolean;
13
- percentageTo: string; (or '')
14
- }`);if(C.dataset.body.length===0)throw Error(`vue-ui-table error: missing body data`);Cn.value=!0,kr(Or,async()=>{await fe(),Cn.value=!1}),document.addEventListener(`keydown`,e=>{let t=document.activeElement;(t&&Array.from(t.classList).includes(`td-focusable`)&&e.key.includes(`Arrow`)||e.code===`Space`)&&e.preventDefault()}),jn.value=U.value.filename,An.value=Kn.value[0]?.name??``}),_e(()=>C.dataset,e=>{Cn.value=!0,B.value=JSON.parse(JSON.stringify(e.body)).map((e,t)=>({...e,absoluteIndex:t})),Mn.value=JSON.parse(JSON.stringify(e.body)).map((e,t)=>({...e,absoluteIndex:t})),V.value=JSON.parse(JSON.stringify(e.header)).map((e,t)=>({average:Object.hasOwn(e,`average`)?e.average:!1,decimals:Object.hasOwn(e,`decimals`)?e.decimals:0,isMultiselect:Object.hasOwn(e,`isMultiselect`)?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,`isPercentage`)?e.isPercentage:!1,isSearch:Object.hasOwn(e,`isSearch`)?e.isSearch:!1,isSort:Object.hasOwn(e,`isSort`)?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,`percentageTo`)?e.percentageTo:void 0,prefix:Object.hasOwn(e,`prefix`)?e.prefix:``,rangeFilter:Object.hasOwn(e,`rangeFilter`)?e.rangeFilter:!1,suffix:Object.hasOwn(e,`suffix`)?e.suffix:``,sum:Object.hasOwn(e,`sum`)?e.sum:!1,type:e.type,index:t})),E.value={col:void 0,rows:[]},Dn.value=void 0,Tn.value=C.config.rowsPerPage?C.config.rowsPerPage:25,N.value={},k.value={},wn.value={},A.value={},j.value={},P.value={},M.value={},F.value={},I.value={},R.value=!1,bn.value=void 0,L.value=void 0,On.value=void 0,z.value=!1,E.value.col=void 0,E.value.rows=[],kr(Or,async()=>{Rr(),await fe(),Cn.value=!1})},{immediate:!0,deep:!0});let Br=y(null);return _e(Sn,e=>{e&&Br.value&&Br.value.focus()}),_e(R,e=>{e?zr.value&&zr.value.open():zr.value&&zr.value.close()}),(t,r)=>(v(),p(`div`,{class:`vue-data-ui-component vue-ui-table-main`,style:_(`font-family: ${H.value.fontFamily}`)},[U.value.show?(v(),p(`div`,{key:0,class:`vue-ui-table-export-hub`,style:_({top:Nn.value+`px`})},[m(`button`,{onClick:r[0]||=e=>Sn.value=!Sn.value,innerHTML:Q.value.export,style:_(`background:${U.value.backgroundColor};color:${U.value.color};cursor:${X.value?`pointer`:`default`}`)},null,12,Ce),m(`div`,{class:`vue-ui-table-export-hub-dropdown`,"data-is-open":Sn.value||`false`,style:_(`background:${U.value.backgroundColor};color:${U.value.color}`)},[r[24]||=m(`b`,{class:`vue-ui-table-export-hub-title`},` Export `,-1),m(`button`,{class:`close-dropdown`,onClick:r[1]||=e=>Sn.value=!1,style:_(`background:${Fn.value.backgroundColor};color:${Fn.value.color};border-radius:${Fn.value.borderRadius}`)},` ✖ `,4),m(`div`,Te,[m(`div`,Ee,[m(`div`,De,x(H.value.translations.exportAllLabel)+` (`+x(B.value.length)+`) `,1),m(`button`,{id:`exportAll`,onClick:r[2]||=e=>sr(`all`),style:_(`background:${U.value.buttons.backgroundColor};color:${U.value.buttons.color};cursor:${X.value?`pointer`:`default`}`)},[m(`div`,{innerHTML:Q.value.fileDownload},null,8,Oe),m(`span`,null,x(H.value.translations.exportAllButton),1)],4)]),m(`div`,ke,[m(`div`,Ae,x(H.value.translations.exportPageLabel),1),m(`button`,{id:`exportPage`,onClick:r[3]||=e=>sr(`page`),style:_(`background:${U.value.buttons.backgroundColor};color:${U.value.buttons.color};cursor:${X.value?`pointer`:`default`}`)},[m(`div`,{innerHTML:Q.value.fileDownload},null,8,je),m(`span`,null,x(H.value.translations.exportPageButton),1)],4)]),m(`div`,Me,[m(`label`,Ne,[m(`span`,Pe,x(H.value.translations.filename),1),ye(m(`input`,{name:`filename`,ref_key:`filenameInputRef`,ref:Br,onKeydown:r[4]||=be(xe(()=>{},[`stop`]),[`space`]),pattern:`.*`,class:`vue-ui-table-dialog-input`,type:`text`,"onUpdate:modelValue":r[5]||=e=>jn.value=e},null,544),[[ge,jn.value]])]),jn.value?(v(),p(`button`,{key:0,class:`vue-ui-table-dialog-field-button`,onClick:r[6]||=e=>jn.value=``,style:_({cursor:X.value?`pointer`:`default`})},[ue(c,{name:`close`,stroke:U.value.color,size:18},null,8,[`stroke`])],4)):f(``,!0)])])],12,we)],4)):f(``,!0),m(`div`,{class:`vue-ui-table__wrapper`,style:_(`max-height:${H.value.maxHeight}px`),ref_key:`tableWrapper`,ref:wr},[m(`table`,Fe,[W.value.text?(v(),p(`caption`,{key:0,class:`vue-ui-table__caption`,ref_key:`tableCaption`,ref:hn,style:_({textAlign:W.value.textAlign,paddingLeft:W.value.paddingLeft+`px`,paddingRight:W.value.paddingRight+`px`,backgroundColor:W.value.backgroundColor,boxShadow:`${W.value.backgroundColor} -1px 0px 0px 0px`})},[m(`span`,{style:_({fontSize:W.value.fontSize+`px`,fontWeight:W.value.bold?`bold`:`normal`,color:W.value.color})},x(W.value.text),5),W.value.subtitle.text?(v(),p(u,{key:0},[r[25]||=m(`br`,null,null,-1),m(`span`,{style:_({fontSize:W.value.subtitle.fontSize,fontWeight:W.value.subtitle.bold?`bold`:`normal`,color:W.value.subtitle.color})},x(W.value.subtitle.text),5)],64)):f(``,!0)],4)):f(``,!0),m(`thead`,{id:`tableHead`,class:`vue-ui-table__head`,style:_({background:G.value.backgroundColor,boxShadow:`-1px 0 0 ${G.value.backgroundColor}`,top:Nn.value-3+`px`})},[m(`tr`,null,[r[26]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,t)=>(v(),p(`th`,{key:`thead_${t}`,style:_(`overflow: visible;background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`),class:g({"th-has-nan":A.value[t]})},[$n.value&&([T.value.TEXT,T.value.DATE].includes(e.type)||e.isPercentage)?(v(),p(`span`,Ie,[h(x(e.name)+` `,1),e.isPercentage?(v(),p(`span`,Le,` / `+x(e.percentageTo),1)):f(``,!0)])):(v(),p(`span`,Re,x(e.name),1))],6))),128))]),$n.value?(v(),p(u,{key:0},[m(`tr`,null,[r[27]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,t)=>(v(),p(`th`,{key:`thead_${t}`,class:g({"th-numeric":!0,"th-has-nan":A.value[t]}),style:_(`background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`)},[e.sum&&!A.value[t]?(v(),p(`span`,ze,[m(`span`,{innerHTML:Q.value.sum,style:{"margin-bottom":`-4px`,"margin-right":`3px`}},null,8,Be),h(` `+x(S(n)({p:e.prefix,v:Number(_r(t)),s:e.suffix,r:e.decimals}))+` `,1),N.value[t]&&e.percentageTo&&!e.isPercentage?(v(),p(`span`,Ve,` (`+x(isNaN(_r(t)/_r(N.value[t].referenceIndex))?`-`:S(n)({v:_r(t)/_r(N.value[t].referenceIndex)*100,s:`%`,r:e.decimals}))+`) `,1)):f(``,!0)])):f(``,!0)],6))),128))]),m(`tr`,null,[r[28]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,t)=>(v(),p(`th`,{key:`thead_${t}`,class:g({"th-numeric":!0,"th-has-nan":A.value[t]}),style:_(`background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`)},[e.average&&!A.value[t]?(v(),p(`span`,He,` ~ `+x(isNaN(hr(t))?``:S(n)({p:e.prefix,v:Number(hr(t)),s:e.suffix,r:e.decimals})),1)):f(``,!0)],6))),128))]),m(`tr`,null,[r[31]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,t)=>(v(),p(`th`,{key:`thead_${t}`,class:g({"th-has-nan":A.value[t]}),style:_(`background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`)},[m(`div`,Ue,[e.type===T.value.DATE&&k.value[t]?(v(),p(`div`,We,[m(`div`,Ge,[m(`div`,Ke,[m(`label`,{for:`from_${t}`},x(H.value.translations.from),9,qe),ye(m(`input`,{id:`from_${t}`,type:`date`,"onUpdate:modelValue":e=>k.value[t].from=e,onInput:e=>{mr(),Fr(t)},style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,Je),[[ge,k.value[t].from]])]),m(`div`,Ye,[m(`label`,{for:`to_${t}`},x(H.value.translations.to),9,Xe),ye(m(`input`,{id:`to_${t}`,type:`date`,"onUpdate:modelValue":e=>k.value[t].to=e,onInput:e=>{mr(),Fr(t)},style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,Ze),[[ge,k.value[t].to]])])]),m(`div`,Qe,[e.isSort?(v(),p(`button`,{key:0,onClick:e=>Ir(t,e),class:g({"th-button-active":[T.value.DESC,T.value.ASC].includes(I.value[t])}),style:_(`cursor:${X.value?`pointer`:`default`}; background:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.backgroundColor};color:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.color}`)},[I.value[t]===T.value.ASC?(v(),p(`span`,{key:0,innerHTML:[T.value.DATE].includes(e.type)?Q.value.sort09:Q.value.sortAZ},null,8,et)):I.value[t]===T.value.DESC?(v(),p(`span`,{key:1,innerHTML:[T.value.DATE].includes(e.type)?Q.value.sort90:Q.value.sortZA},null,8,tt)):(v(),p(`span`,{key:2,innerHTML:Q.value.arrowSort},null,8,nt))],14,$e)):f(``,!0),m(`button`,{onClick:n=>{Ar(t),jr(t,e,n)},disabled:!wn.value[t]&&xr(t,e),class:`th-reset`,style:_({cursor:X.value?`pointer`:`default`})},` ✖ `,12,rt)])])):f(``,!0),e.isSearch?ye((v(),p(`input`,{key:1,placeholder:H.value.translations.inputPlaceholder,"onUpdate:modelValue":e=>F.value[t]=e,onInput:r[7]||=e=>lr(mr,400),name:`search_${t}`,style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,it)),[[ge,F.value[t]]]):f(``,!0),!A.value[t]&&e.isSort&&e.type!==T.value.DATE?(v(),p(`button`,{key:2,onClick:e=>Ir(t,e),class:g({"th-button-active":[T.value.DESC,T.value.ASC].includes(I.value[t])}),style:_(`cursor:${X.value?`pointer`:`default`};background:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.backgroundColor};color:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.color}`)},[I.value[t]===T.value.ASC?(v(),p(`span`,{key:0,innerHTML:[T.value.NUMERIC].includes(e.type)?Q.value.sort09:Q.value.sortZA},null,8,ot)):I.value[t]===T.value.DESC?(v(),p(`span`,{key:1,innerHTML:[T.value.NUMERIC].includes(e.type)?Q.value.sort90:Q.value.sortAZ},null,8,st)):(v(),p(`span`,{key:2,innerHTML:Q.value.arrowSort},null,8,ct))],14,at)):f(``,!0),e.isMultiselect?(v(),p(`button`,{key:3,onClick:n=>Lr(t,e,n),innerHTML:Q.value.filter,class:g({"th-button-active":M.value[t]&&M.value[t].length!==$(t).length}),style:_(`cursor:${X.value?`pointer`:`default`};background:${M.value[t]&&M.value[t].length!==$(t).length?``:G.value.buttons.filter.inactive.backgroundColor};color:${M.value[t]&&M.value[t].length!==$(t).length?``:G.value.buttons.filter.inactive.color}`)},null,14,lt)):f(``,!0),E.value.col===t&&Qn.value?(v(),p(`button`,{key:4,onClick:r[8]||=e=>R.value=!R.value,innerHTML:Q.value.chart,class:g({"th-button-active":R.value}),style:_(`cursor:${X.value?`pointer`:`default`};background:${R.value?``:G.value.buttons.filter.inactive.backgroundColor};color:${R.value?``:G.value.buttons.filter.inactive.color}`)},null,14,ut)):f(``,!0),e.rangeFilter&&P.value[t]&&!A.value[t]?(v(),p(`div`,dt,[m(`label`,{for:`rangeMin${t}`},[...r[29]||=[m(`span`,{style:{color:`grey`}},`ᒥ`,-1),h(` min `,-1),m(`span`,{style:{color:`grey`}},`ᒣ`,-1)]],8,ft),ye(m(`input`,{type:`number`,id:`rangeMin${t}`,max:j.value[t].max,min:j.value[t].min,"onUpdate:modelValue":e=>P.value[t].min=e,onInput:r[9]||=e=>lr(mr,400),style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,pt),[[ge,P.value[t].min,void 0,{number:!0}]]),ye(m(`input`,{type:`number`,id:`rangeMax${t}`,max:j.value[t].max,min:j.value[t].min,"onUpdate:modelValue":e=>P.value[t].max=e,onInput:r[10]||=e=>lr(mr,400),style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,mt),[[ge,P.value[t].max,void 0,{number:!0}]]),m(`label`,{for:`rangeMax${t}`},[...r[30]||=[m(`span`,{style:{color:`grey`}},`ᒪ`,-1),h(` max `,-1),m(`span`,{style:{color:`grey`}},`ᒧ`,-1)]],8,ht)])):f(``,!0),or(t,e)?(v(),p(`button`,{key:6,onClick:n=>jr(t,e,n),disabled:xr(t,e),class:`th-reset`,style:_({cursor:X.value?`pointer`:`default`})},` ✖ `,12,gt)):f(``,!0),e.isMultiselect?(v(),p(`div`,{key:7,class:`th-dropdown`,"data-is-open":`false`,id:`th_dropdown_${t}`,style:_(`background:${Pn.value.backgroundColor};color:${Pn.value.color}`)},[m(`button`,{class:`close-dropdown`,onClick:n=>Lr(t,e,n),style:_(`cursor:${X.value?`pointer`:`default`};background:${Fn.value.backgroundColor};color:${Fn.value.color}`)},` ✖ `,12,vt),(v(!0),p(u,null,b($(t),(e,n)=>(v(),p(`span`,{class:`th-option`,key:`th_option_${t}_${n}`,onClick:n=>Pr(e,t),onKeyup:[be(n=>Pr(e,t),[`enter`]),be(n=>Pr(e,t),[`space`])],style:_(`opacity:${yr(e,t)?1:.5}`),tabindex:`0`},[yr(e,t)?(v(),p(`span`,{key:0,style:_(`color:${Pn.value.icons.selected.color};margin-right:5px`),class:`th-icon-green`},x(Pn.value.icons.selected.unicode),5)):(v(),p(`span`,{key:1,style:_(`color:${Pn.value.icons.unselected.color};margin-right:5px`),class:`th-icon-red`},x(Pn.value.icons.unselected.unicode),5)),m(`span`,null,x(e),1)],44,yt))),128))],12,_t)):f(``,!0)])],6))),128))])],64)):f(``,!0),m(`tr`,null,[r[32]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,t)=>(v(),p(`th`,{key:`col_selector_${t}`,class:g({"vue-ui-table-col-selector":!A.value[t],"th-has-nan":A.value[t]}),style:_(`background:${t===Dn.value&&!A.value[t]?G.value.selected.backgroundColor:G.value.backgroundColor};color:${t===Dn.value&&!A.value[t]?G.value.selected.color:G.value.color};outline:${G.value.outline}`)},[A.value[t]?f(``,!0):(v(),p(`div`,{key:0,innerHTML:V.value[t].type===T.value.NUMERIC?Q.value.chevronDown:``,class:g({"col-selector":V.value[t].type===T.value.NUMERIC}),tabindex:`0`,style:_({cursor:X.value?`pointer`:`default`}),onClick:xe(e=>Nr(t),[`stop`]),onKeyup:be(e=>Nr(t),[`enter`])},null,46,bt))],6))),128))])],4),m(`tbody`,{onClick:cr,onKeydown:r[11]||=e=>Er(e)},[(v(!0),p(u,null,b(Yn.value,(t,r)=>(v(),p(`tr`,{key:`tbody_${r}`,"data-row":r%2==0?`odd`:`even`,class:g(`tr_${S(mn)}`),style:_(`${r%2==0?`background:${q.value.odd.backgroundColor};color:${q.value.odd.color}`:`background:${q.value.even.backgroundColor};color:${q.value.even.color}`}`)},[m(`td`,{class:`vue-ui-table-td-iteration`,"data-row":r%2==0?`odd`:`even`,style:_({outline:q.value.outline})},x(t.absoluteIndex+1),13,St),(v(!0),p(u,null,b(t.td,(i,a)=>(v(),p(`td`,{"data-row":r%2==0?`odd`:`even`,key:`td_${r}_${a}`,style:_(br(i)||e.dataset.header[a].type===T.value.DATE?`text-align:right;font-variant-numeric: tabular-nums;outline:${q.value.outline}`:`outline:${q.value.outline}`),onClick:t=>Mr({td:i,rowIndex:r,colIndex:a,headerType:e.dataset.header[a].type,event:t}),onKeyup:[be(t=>Mr({td:i,rowIndex:r,colIndex:a,headerType:e.dataset.header[a].type,event:t}),[`enter`]),be(t=>Mr({td:i,rowIndex:r,colIndex:a,headerType:e.dataset.header[a].type,event:t}),[`space`])],class:g({"td-numeric":e.dataset.header[a].type===T.value.NUMERIC,"td-focusable":!0,"td-has-nan":A.value[a]}),id:`cell_${r}_${a}_${S(mn)}`,tabindex:`0`},[t.meta&&t.meta.markerIndices.includes(a)&&t.meta.unicodeIcon?(v(),p(`span`,{key:0,style:_(`color:${t.meta.color};margin-right:3px`),innerHTML:t.meta.unicodeIcon},null,12,wt)):f(``,!0),e.dataset.header[a].type===T.value.DATE?(v(),p(`span`,Tt,x(e.dataset.header[a].prefix)+` `+x(new Date(i).toLocaleString().slice(0,10))+` `+x(e.dataset.header[a].suffix),1)):e.dataset.header[a].isPercentage?(v(),p(`span`,Et,x(S(n)({v:Number(i*100),s:`%`,r:e.dataset.header[a].decimals})),1)):N.value[a]&&e.dataset.header[a].percentageTo&&!e.dataset.header[a].isPercentage?(v(),p(`span`,{key:3,class:g({"td-nan":isNaN(Number(i))})},x(isNaN(Number(i))?`${i} is not ${T.value.NUMERIC}`:S(n)({p:e.dataset.header[a].prefix,v:Number(i),s:e.dataset.header[a].suffix,r:e.dataset.header[a].decimals}))+` (`+x(isNaN(Number(i))?``:S(n)({v:Number(i/_r(N.value[a].referenceIndex)*100),s:`%`,r:e.dataset.header[a].decimals}))+`) `,3)):e.dataset.header[a].type===T.value.NUMERIC?(v(),p(`span`,{key:4,class:g({"td-nan":isNaN(Number(i))})},x(isNaN(Number(i))?`${i} is not ${T.value.NUMERIC}`:S(n)({p:e.dataset.header[a].prefix,v:Number(i.toFixed(e.dataset.header[a].decimals)),s:e.dataset.header[a].suffix,r:e.dataset.header[a].decimals})),3)):(v(),p(`span`,Dt,x(e.dataset.header[a].prefix)+` `+x(i)+` `+x(e.dataset.header[a].suffix),1))],46,Ct))),128))],14,xt))),128))],32)])],4),m(`div`,{class:g({"td-selector-info":!0,"td-selector-info--active":E.value.col!==void 0&&E.value.rows.length}),style:_(`background:${In.value.infoBar.backgroundColor};color:${In.value.infoBar.color}`)},[E.value.col!==void 0&&E.value.rows.length?(v(),p(u,{key:0},[m(`div`,{innerHTML:Q.value.table,class:`td-selector-icon`},null,8,Ot),m(`span`,null,[m(`b`,null,[h(x(e.dataset.header[E.value.col].name)+` `,1),e.dataset.header[E.value.col].isPercentage?(v(),p(`span`,kt,` / `+x(e.dataset.header[N.value[E.value.col].referenceIndex].name),1)):f(``,!0)]),m(`span`,At,[h(x(H.value.translations.nb)+` : `,1),m(`b`,jt,x(E.value.rows.length),1)]),m(`span`,Mt,[h(x(H.value.translations.sum)+` : `,1),e.dataset.header[E.value.col].isPercentage?(v(),p(`b`,Nt,x(tr.value.sumPercentage),1)):(v(),p(`b`,Pt,x(e.dataset.header[E.value.col].prefix)+` `+x(tr.value.sumRegular)+` `+x(e.dataset.header[E.value.col].suffix),1)),e.dataset.header[E.value.col].isPercentage?(v(),p(`b`,Ft,`%`)):f(``,!0)]),m(`span`,It,[h(x(H.value.translations.average)+` : `,1),e.dataset.header[E.value.col].isPercentage?(v(),p(`b`,Lt,x(tr.value.averagePercentage),1)):(v(),p(`b`,Rt,x(e.dataset.header[E.value.col].prefix)+` `+x(tr.value.averageRegular)+` `+x(e.dataset.header[E.value.col].suffix),1)),e.dataset.header[E.value.col].isPercentage?(v(),p(`b`,zt,`%`)):f(``,!0)])]),m(`button`,{onClick:ur,class:`td-selector-info-reset`,style:_(`cursor:${X.value?`pointer`:`default`};background:${Fn.value.backgroundColor};color:${Fn.value.color};border-radius:${Fn.value.borderRadius}`)},` ✖ `,4)],64)):f(``,!0)],6),B.value.length>10?(v(),p(`div`,Bt,[h(x(H.value.translations.totalRows)+` : `+x(e.dataset.body.length)+` | `+x(H.value.translations.paginatorLabel)+` : `,1),B.value.length>10?ye((v(),p(`select`,{key:0,id:`paginatorSelector`,"onUpdate:modelValue":r[12]||=e=>Tn.value=e,onChange:r[13]||=e=>{ur(),Cr()},style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},[(v(!0),p(u,null,b(En.value,(t,n)=>(v(),p(u,null,[B.value.length>t||e.dataset.body.length===t?(v(),p(`option`,{key:`paginator_option_${n}`},x(t),1)):f(``,!0)],64))),256))],36)),[[he,Tn.value,void 0,{number:!0}]]):f(``,!0)])):f(``,!0),Tn.value>=250?(v(),p(`div`,Vt,[m(`span`,{innerHTML:Q.value.warning},null,8,Ht),h(x(H.value.translations.sizeWarning),1)])):f(``,!0),Z.value.length>1&&Z.value.length<=10?(v(),p(`div`,{key:3,class:`vue-ui-table-navigation-indicator`,style:_(`background:${J.value.navigationIndicator.backgroundColor};width:calc(${D.value/(Z.value.length-1)*100}%)`)},null,4)):f(``,!0),Z.value.length>1?(v(),p(`div`,Ut,[m(`button`,{class:`vue-ui-table-navigation`,onClick:r[14]||=xe(e=>Tr(`previous`),[`stop`]),innerHTML:Q.value.chevronLeft,disabled:D.value===0,style:_(`cursor:${X.value?`pointer`:`default`};background:${J.value.buttons.backgroundColor};color:${J.value.buttons.color};opacity:${D.value===0?J.value.buttons.opacityDisabled:1}`)},null,12,Wt),Z.value.length>3?(v(),p(u,{key:0},[m(`button`,{class:`vue-ui-table-navigation`,onClick:r[15]||=xe(e=>Tr(1),[`stop`]),disabled:D.value===0,style:_(`cursor:${X.value?`pointer`:`default`};background:${J.value.buttons.backgroundColor};color:${J.value.buttons.color};opacity:${D.value===0?J.value.buttons.opacityDisabled:1}`)},` 1 `,12,Gt),Z.value.length>10?(v(),p(`div`,{key:0,class:`vue-ui-table-page-scroller-wrapper`,style:_({cursor:X.value?`pointer`:`default`})},[m(`label`,Kt,x(H.value.translations.page)+` `+x(D.value+1)+` / `+x(Z.value.length),1),m(`input`,{class:`vue-ui-table-page-scroller`,id:`pageScroller`,type:`range`,step:`1`,min:0,max:Z.value.length-1,onInput:r[16]||=e=>Rr(e),value:D.value,style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border};accent-color:${K.value.accentColor}`)},null,44,qt)],4)):(v(),p(`span`,Jt,x(H.value.translations.page)+` `+x(D.value+1)+` / `+x(Z.value.length),1)),m(`button`,{class:`vue-ui-table-navigation`,onClick:r[17]||=xe(e=>Tr(Z.value.length),[`stop`]),disabled:D.value===Z.value.length-1,style:_(`cursor:${X.value?`pointer`:`default`};background:${J.value.buttons.backgroundColor};color:${J.value.buttons.color};opacity:${D.value===Z.value.length-1?J.value.buttons.opacityDisabled:1}`)},x(Z.value.length),13,Yt)],64)):(v(),p(u,{key:1},[h(x(H.value.translations.page)+` `+x(D.value+1)+` / `+x(Z.value.length),1)],64)),m(`button`,{class:`vue-ui-table-navigation`,onClick:r[18]||=xe(e=>Tr(`next`),[`stop`]),innerHTML:Q.value.chevronRight,disabled:D.value===Z.value.length-1,style:_(`cursor:${X.value?`pointer`:`default`};background:${J.value.buttons.backgroundColor};color:${J.value.buttons.color};opacity:${D.value===Z.value.length-1?J.value.buttons.opacityDisabled:1}`)},null,12,Xt)])):f(``,!0),ue(S(dn),{ref_key:`chartModal`,ref:zr,backgroundColor:Y.value.modal.backgroundColor,headerColor:Y.value.modal.color,color:Y.value.modal.color,forcedHeight:500,isCursorPointer:X.value,withPadding:``,withFullWidth:``,noLayerUpdate:``,onClose:r[23]||=e=>R.value=!1,onSize:rr},{before:ve(()=>[m(`div`,Zt,[Zn.value.length?(v(),p(`button`,{key:0,onClick:r[19]||=e=>z.value=!0,innerHTML:Q.value.donut,class:g({"is-active-chart":w.value.type===T.value.DONUT||z.value}),style:_(`cursor:${X.value?`pointer`:`default`};background:${w.value.type===T.value.DONUT||z.value?Y.value.modal.buttons.selected.backgroundColor:Y.value.modal.buttons.unselected.backgroundColor};color:${w.value.type===T.value.DONUT||z.value?Y.value.modal.buttons.selected.color:Y.value.modal.buttons.unselected.color}`)},null,14,Qt)):f(``,!0),m(`button`,{onClick:r[20]||=e=>{w.value.type=T.value.LINE,z.value=!1},innerHTML:Q.value.chart,class:g({"is-active-chart":w.value.type===T.value.LINE&&!z.value}),style:_(`cursor:${X.value?`pointer`:`default`};background:${w.value.type===T.value.LINE&&!z.value?Y.value.modal.buttons.selected.backgroundColor:Y.value.modal.buttons.unselected.backgroundColor};color:${w.value.type===T.value.LINE&&!z.value?Y.value.modal.buttons.selected.color:Y.value.modal.buttons.unselected.color}`)},null,14,$t),m(`button`,{onClick:r[21]||=e=>{w.value.type=T.value.BAR,z.value=!1},innerHTML:Q.value.bar,class:g({"is-active-chart":w.value.type===T.value.BAR&&!z.value}),style:_(`cursor:${X.value?`pointer`:`default`};background:${w.value.type===T.value.BAR&&!z.value?Y.value.modal.buttons.selected.backgroundColor:Y.value.modal.buttons.unselected.backgroundColor};color:${w.value.type===T.value.BAR&&!z.value?Y.value.modal.buttons.selected.color:Y.value.modal.buttons.unselected.color}`)},null,14,en)])]),content:ve(()=>[m(`div`,tn,[z.value&&Zn.value.length?(v(),p(`div`,{key:0,style:_(`background:${Y.value.modal.backgroundColor};color:${Y.value.modal.color}`)},[m(`fieldset`,nn,[m(`legend`,null,x(H.value.translations.chooseCategoryColumn),1),m(`div`,rn,[(v(!0),p(u,null,b(Zn.value,(e,t)=>(v(),p(`div`,{key:`donut_radio_${t}`,class:`vue-ui-table-fieldset-option`},[m(`input`,{type:`radio`,name:e.name,id:e.name,checked:L.value&&e.name===L.value.name,onInput:e=>L.value=Zn.value[t],style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border};accent-color:${K.value.accentColor}`)},null,44,an),m(`label`,{for:e.name},x(e.name),9,on)]))),128))]),m(`button`,{class:`vue-ui-table-generate-donut`,disabled:!L.value,onClick:ar,style:_(`cursor:${X.value?`pointer`:`default`};background:${Y.value.modal.buttons.selected.backgroundColor};color:${Y.value.modal.buttons.selected.color}`)},[m(`div`,{style:{"margin-bottom":`-3px`},innerHTML:Q.value.donut},null,8,cn),h(` `+x(H.value.translations.makeDonut),1)],12,sn)])],4)):f(``,!0),[T.value.BAR,T.value.LINE].includes(w.value.type)&&!z.value?(v(),p(u,{key:1},[qn.value.length>1?(v(),p(`label`,{key:0,style:_({color:Y.value.modal.color})},[h(x(H.value.translations.xAxisLabels)+` `,1),ye(m(`select`,{"onUpdate:modelValue":r[22]||=e=>An.value=e},[(v(!0),p(u,null,b(qn.value,e=>(v(),p(`option`,null,x(e),1))),256))],512),[[he,An.value]])],4)):f(``,!0),m(`div`,ln,[w.value.type===T.value.LINE?(v(),le(l,{key:`chart_line_${kn.value}`,dataset:ir.value.xyDatasetLine,config:ir.value.xyConfig},null,8,[`dataset`,`config`])):f(``,!0),w.value.type===T.value.BAR?(v(),le(l,{key:`chart_bar_${kn.value}`,dataset:ir.value.xyDatasetBar,config:ir.value.xyConfig},null,8,[`dataset`,`config`])):f(``,!0)]),E.value.rows.length>=2?(v(),p(`div`,{key:1,class:`chart-trend`,style:_(`color:${Y.value.modal.color}`)},[r[33]||=m(`span`,null,`---`,-1),h(` Trend: `+x(S(n)({v:ir.value.progression.trend*100,s:`%`,r:1})),1)],4)):f(``,!0)],64)):f(``,!0),[T.value.DONUT].includes(w.value.type)&&!z.value?(v(),p(`div`,un,[ue(ce,{dataset:bn.value,config:ir.value.donutConfig},null,8,[`dataset`,`config`])])):f(``,!0)])]),_:1},8,[`backgroundColor`,`headerColor`,`color`,`isCursorPointer`])],4))}},[[`__scopeId`,`data-v-f35b07e9`]]);export{Se as n,dn as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{D as n,Tt as r,X as i,at as ee,m as a,nt as te,r as ne,zt as re}from"./lib-rPeBMZrn.js";import{n as ie,t as ae}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as oe}from"./resolveChartConfig-CIhClE5R.js";import{n as se,t as ce}from"./userOptionsSlots-DYuo-E5m.js";import{t as le}from"./usePrinter-DVf3YcG5.js";import{t as ue}from"./Shape-CRe8woTu.js";import{t as de}from"./useUserOptionState-CXlFnwPv.js";import{t as fe}from"./vue_ui_table_heatmap-vfeY6r97.js";import{Fragment as s,computed as c,createBlock as pe,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as me,createVNode as he,defineAsyncComponent as ge,guardReactiveProps as _e,mergeProps as f,nextTick as ve,normalizeClass as p,normalizeProps as ye,normalizeStyle as m,onMounted as h,openBlock as g,ref as _,renderList as v,renderSlot as y,unref as b,useCssVars as be,useSlots as xe,watch as x,withCtx as S}from"vue";var C=/* @__PURE__ */ e({default:()=>N}),w=[`id`],T={role:`cell`},E={role:`row`},D=[`data-cell`],O={key:0,style:{display:`flex`,"flex-direction":`row`,gap:`2px`,"align-items":`center`}},k=[`height`,`width`],A={key:0,role:`cell`,"data-cell":`sum`},j={key:1,role:`cell`,"data-cell":`average`},M={key:2,role:`cell`,"data-cell":`median`},Se={key:1,ref:`source`,dir:`auto`},N=/*#__PURE__*/ o({__name:`vue-ui-table-heatmap`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(e,{expose:o}){be(e=>({v63f427d8:ke.value,v4016fab3:Oe.value}));let C=ge(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),{vue_ui_table_heatmap:N}=t(),P=e,F=_(i()),I=_(!1),L=_(null),R=_(!1),z=_(0),Ce=xe(),B=c({get:()=>G(),set:e=>e}),V=c(()=>B.value.debug);h(()=>{Ce[`chart-background`]&&V.value&&console.warn(`VueUiTableHeatmap does not support the #chart-background slot.`)}),ie({config:()=>B.value,dataset:()=>P.dataset,component:`VueUiTableHeatmap`,rules:[ae.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]},{test:e=>e.some(e=>e?.values&&e?.values.length>31),message:[`👀 Some series have a number of data points > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of data points to display.`]}]});let{userOptionsVisible:H,setUserOptionsVisibility:U,keepUserOptionState:W}=de({config:B.value});function G(){return oe(P.config,N,fe)}x(()=>P.config,e=>{B.value=G(),H.value=!B.value.userOptions.showOnChartHover,Y()},{deep:!0});let{isPrinting:we,isImaging:Te,generatePdf:K,generateImage:q}=le({elementId:`table_heatmap_${F.value}`,fileName:`vue-ui-table-heatmap`,options:B.value.userOptions.print}),J=c(()=>B.value.table.responsiveBreakpoint),Ee=c(()=>!!P.dataset&&P.dataset.length);h(()=>{Y()});function Y(){re(P.dataset)&&ee({componentName:`VueUiTableHeatmap`,type:`dataset`,debug:V.value});let e=new ResizeObserver(e=>{e.forEach(e=>{I.value=e.contentRect.width<J.value})});L.value&&e.observe(L.value)}let X=c(()=>P.dataset.map(e=>{let t=e.values.map(e=>isNaN(e)?0:e),n=t.reduce((e,t)=>e+t,0);return{...e,values:t,serieExtremes:{max:Math.max(...t),min:Math.min(...t)},sum:n,average:n/t.length,median:a(t),displayValues:[e.name,...e.values],id:i()}})),Z=c(()=>{let e=X.value.flatMap(e=>e.values);return{min:Math.min(...e),max:Math.max(...e)}});function De(e,t){let n=B.value.style.heatmapColors.useIndividualScale;return r(B.value.style.heatmapColors.min,B.value.style.heatmapColors.max,n?t.min:Z.value.min,n?t.max:Z.value.max,e)}let Q=c(()=>X.value.map(e=>({...e,colors:e.displayValues.map(t=>isNaN(t)?B.value.style.backgroundColor:De(t,e.serieExtremes))}))),Oe=c(()=>B.value.style.backgroundColor),ke=c(()=>`${B.value.table.borderWidth}px`);function $(e=null){ve(()=>{let t=Q.value.map(e=>[[e.name],e.displayValues,[e.sum],[e.average],[e.median]]),r=[[[``],B.value.table.head.values,[`sum`],[`average`],[`median`]]].concat(t),i=n(r);e?e(i):te({csvContent:i,title:`vue-ui-table-heatmap`})})}function Ae(e){R.value=e,z.value+=1}return o({generatePdf:K,generateCsv:$,generateImage:q}),(e,t)=>(g(),u(`div`,{ref_key:`tableContainer`,ref:L,style:m(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${B.value.userOptions.show?`36px`:``}; ${R.value?`vue-data-ui-wrapper-fullscreen`:``}; position:relative;`),class:p({"vue-data-ui-component":!0,"vue-ui-responsive":I.value}),id:`table_heatmap_${F.value}`,onMouseenter:t[0]||=()=>b(U)(!0),onMouseleave:t[1]||=()=>b(U)(!1)},[B.value.userOptions.show&&Ee.value&&(b(W)||b(H))?(g(),pe(b(C),{ref:`details`,key:`user_option_${z.value}`,backgroundColor:B.value.style.backgroundColor,color:B.value.style.color,isPrinting:b(we),isImaging:b(Te),uid:F.value,hasPdf:B.value.userOptions.buttons.pdf,hasXls:B.value.userOptions.buttons.csv,hasImg:B.value.userOptions.buttons.img,hasFullscreen:B.value.userOptions.buttons.fullscreen,isFullscreen:R.value,titles:{...B.value.userOptions.buttonTitles},chartElement:L.value,position:B.value.userOptions.position,callbacks:B.value.userOptions.callbacks,printScale:B.value.userOptions.print.scale,onToggleFullscreen:Ae,onGeneratePdf:b(K),onGenerateCsv:$,onGenerateImage:b(q),style:m({visibility:b(W)?b(H)?`visible`:`hidden`:`visible`})},me({_:2},[v(b(se)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,ye(_e(b(ce)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasXls`,`hasImg`,`hasFullscreen`,`isFullscreen`,`titles`,`chartElement`,`position`,`callbacks`,`printScale`,`onGeneratePdf`,`onGenerateImage`,`style`])):l(``,!0),d(`table`,{class:p({"vue-ui-table-heatmap":!0}),style:m(`width:100%;font-family:${B.value.style.fontFamily};background:${B.value.style.backgroundColor};`)},[d(`caption`,null,[y(e.$slots,`caption`,{},void 0,!0)]),d(`thead`,null,[d(`tr`,{role:`row`,style:m(`background:${B.value.table.head.backgroundColor};color:${B.value.table.head.color}`)},[(g(!0),u(s,null,v(B.value.table.head.values,(t,n)=>(g(),u(`th`,T,[y(e.$slots,`head`,f({ref_for:!0},{value:t,rowIndex:n,type:typeof t,isResponsive:I.value}),void 0,!0)]))),256))],4)]),d(`tbody`,null,[(g(!0),u(s,null,v(Q.value,(t,n)=>(g(),u(`tr`,E,[(g(!0),u(s,null,v(t.displayValues,(r,i)=>(g(),u(`td`,{role:`cell`,"data-cell":B.value.table.head.values[i]},[t.color&&i===0?(g(),u(`div`,O,[t.color?(g(),u(`svg`,{key:0,height:B.value.style.shapeSize,width:B.value.style.shapeSize,viewBox:`0 0 20 20`,style:{background:`none`,overflow:`visible`}},[he(ue,{plot:{x:10,y:10},color:t.color,radius:9,shape:t.shape||`circle`},null,8,[`color`,`shape`])],8,k)):l(``,!0),y(e.$slots,`rowTitle`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:I.value}),void 0,!0)])):(g(),u(s,{key:1},[i===0?y(e.$slots,`rowTitle`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:I.value}),void 0,!0,0):l(``,!0),i>0?y(e.$slots,`cell`,f({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:I.value,color:t.colors[i],textColor:b(ne)(t.colors[i])}),void 0,!0,1):l(``,!0)],64))],8,D))),256)),B.value.table.showSum?(g(),u(`td`,A,[y(e.$slots,`sum`,f({ref_for:!0},{value:t.sum,rowIndex:n,isResponsive:I.value}),void 0,!0)])):l(``,!0),B.value.table.showAverage?(g(),u(`td`,j,[y(e.$slots,`average`,f({ref_for:!0},{value:t.average,rowIndex:n,isResponsive:I.value}),void 0,!0)])):l(``,!0),B.value.table.showMedian?(g(),u(`td`,M,[y(e.$slots,`median`,f({ref_for:!0},{value:t.median,rowIndex:n,isResponsive:I.value}),void 0,!0)])):l(``,!0)]))),256))])],4),e.$slots.source?(g(),u(`div`,Se,[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],46,w))}},[[`__scopeId`,`data-v-89cef7a9`]]);export{C as n,N as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{$ as n,D as r,Ht as i,Jt as a,S as o,X as ee,at as s,i as te,m as ne,nt as re,w as ie,yt as ae,zt as oe}from"./lib-rPeBMZrn.js";import{n as se,t as ce}from"./useHints-C-TwxM0Y.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{n as de,t as fe}from"./userOptionsSlots-DYuo-E5m.js";import{t as pe}from"./usePrinter-DVf3YcG5.js";import{t as me}from"./useUserOptionState-CXlFnwPv.js";import{t as he}from"./vClickOutside-BxNzkY17.js";import{t as ge}from"./vue_ui_table_sparkline-Dlfbza49.js";import{Fragment as c,computed as l,createBlock as _e,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as ve,createVNode as p,defineAsyncComponent as ye,mergeProps as be,nextTick as xe,normalizeClass as Se,normalizeStyle as m,onBeforeUnmount as Ce,onMounted as we,openBlock as h,ref as g,renderList as _,renderSlot as Te,shallowRef as Ee,toDisplayString as v,unref as y,useCssVars as De,useSlots as Oe,watch as ke,withCtx as Ae,withDirectives as je}from"vue";var Me=/* @__PURE__ */ e({default:()=>b}),Ne=[`id`],Pe={style:{"z-index":`1`,"padding-right":`24px`}},Fe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Ie={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Le=[`onClick`],Re=[`onClick`],ze=[`data-cell`],Be=[`data-cell`,`onPointerenter`],Ve=[`data-cell`],He=[`data-cell`],Ue=[`data-cell`],We=[`data-cell`],Ge={key:1,ref:`source`,dir:`auto`},b=/*#__PURE__*/ le({__name:`vue-ui-table-sparkline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:le,emit:Me}){De(e=>({v5fe3988e:e.tdo}));let b=ye(()=>import(`./vue-ui-sparkline-BizzsAR5.js`).then(e=>e.n)),x=ye(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ke=ye(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),{vue_ui_table_sparkline:qe}=t(),S=e,Je=Me,C=g(ee()),Ye=g(0),w=g(0),T=g(null),Xe=Oe(),Ze=g(!1),E=l({get:()=>et(),set:e=>e}),D=l(()=>E.value.userOptions),O=l(()=>E.value.sparkline),k=l(()=>E.value.thead),A=l(()=>E.value.tbody),j=l(()=>E.value.title);we(()=>{Xe[`chart-background`]&&E.value.debug&&console.warn(`VueUiTableSparkline does not support the #chart-background slot.`)}),se({config:()=>E.value,dataset:()=>S.dataset,component:`VueUiTableSparkline`,rules:[ce.emptyArray,{test:e=>e.some(e=>e?.values&&e.values.length>500),message:[`👀 One or more series have > 500 datapoints. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values`]},{test:e=>e.some(e=>e?.values&&e.values.length>1095),message:[`👀 One or more series have > 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.`]}]});let M=l(()=>E.value.userOptions.useCursorPointer),{userOptionsVisible:N,setUserOptionsVisibility:Qe,keepUserOptionState:$e}=me({config:E.value});function et(){return ue(S.config,qe,ge)}ke(()=>S.config,e=>{E.value=et(),N.value=!E.value.userOptions.showOnChartHover,st(),w.value+=1},{deep:!0}),ke(()=>S.dataset,e=>{W.value=U.value,w.value+=1},{deep:!0});let{isPrinting:tt,isImaging:nt,generatePdf:rt,generateImage:it}=pe({elementId:`table_${C.value}`,fileName:j.value.text||`vue-ui-table-sparkline`,options:E.value.userOptions.print}),at=l(()=>ie(E.value.customPalette)),P=g(null),F=g(!1),ot=l(()=>E.value.responsiveBreakpoint);we(()=>{st()});let I=g(E.value.colNames),L=Ee(null);function st(){oe(S.dataset)&&s({componentName:`VueUiTableSparkline`,type:`dataset`}),L.value&&L.value.disconnect(),L.value=new ResizeObserver(e=>{e.forEach(e=>{F.value=e.contentRect.width<ot.value})}),P.value&&L.value.observe(P.value),I.value=[];for(let e=0;e<mt.value;e+=1)I.value.push(E.value.colNames[e]||`col ${e}`)}Ce(()=>{L.value&&L.value.disconnect()});function R(e){if([null,void 0].includes(e))return null;let t=Number(e);return Number.isFinite(t)?t:null}function z(e){return typeof e==`number`&&Number.isFinite(e)}function ct(e=[]){return e.map(R).filter(z)}function B(e,t,n){let r=R(e),i=R(t),a=z(r),o=z(i);return a&&o?n===-1?r-i:i-r:a?-1:+!!o}function V(e,t,r={}){let i=R(e);return i===null?`-`:te(E.value.formatter,i,n({p:E.value.prefix,v:i,s:E.value.suffix,r:t}),r)}let H=l(()=>(S.dataset.forEach((e,t)=>{ae({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{s({componentName:`VueUiTableSparkline`,type:`datasetSerieAttribute`,property:e,index:t})})}),S.dataset.map((e,t)=>{let n=e.values||[],r=ct(n),a=r.length?r.reduce((e,t)=>e+t,0):null,ee=r.length?a/r.length:null,s=r.length?ne(r):null;return{...e,values:n,color:o(e.color)||at.value[t]||i[t]||i[t%i.length],sum:a,average:ee,median:s,sparklineDataset:n.map((e,t)=>({period:E.value.colNames[t]||`col ${t}`,value:R(e)}))}})));function lt(e){let t=(e[0]?.values||[]).map((t,n)=>e.map(e=>e?.values?.[n]??null)).map(e=>e.map((e,t)=>[e,t]).sort((e,t)=>B(e[0],t[0],1)).map(e=>e[1]));return e.map((e,n)=>({...e,values:e.values||[],orders:t[n]}))}let U=l(()=>lt(H.value)),W=g(U.value),ut=l(()=>Math.max(...W.value.map(e=>(e.values||[]).length))),dt=g(void 0),ft=g(!1),G=g(void 0),pt=g(1);function K(){ft.value=!1,G.value=void 0,X.value=void 0,pt.value=1,$.value.forEach(e=>e.state=1),Y.value={name:1,sum:1,average:1,median:1},W.value=U.value}function q(e,t,n){if([`name`,`sum`,`average`,`median`].includes(e.type)){ht(e.type,t,n);return}if(!bt(t))return;if(Z.value=t,X.value=void 0,![null,void 0].includes(G.value)&&t!==G.value&&(G.value=void 0,K()),$.value[t].state===n&&G.value===t){G.value=void 0,K();return}ft.value=!0,G.value=t;let r=U.value.map(e=>e.values?.[t]??null),i=n;$.value[t].state=i,pt.value=i,t===dt.value?dt.value=void 0:dt.value=t;let a=r.map((e,t)=>[t,e]).sort((e,t)=>B(e[1],t[1],i)).map(e=>e[0]).map(e=>U.value[e]);W.value=a,w.value+=1}let mt=l(()=>Math.max(...S.dataset.map(e=>(e.values||[]).length))),J=l(()=>{let e=I.value.map(e=>({type:`reg`,value:e}));if(!e.length)for(let t=0;t<mt.value;t+=1)e.push({type:`reg`,value:`col ${t+1}`});E.value.showTotal&&(e=[...e,{type:`sum`,value:E.value.translations.total}]);let t;return t=E.value.showAverage&&E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average},{type:`median`,value:E.value.translations.median}]:E.value.showAverage&&!E.value.showMedian?[...e,{type:`average`,value:E.value.translations.average}]:!E.value.showAverage&&E.value.showMedian?[...e,{type:`median`,value:E.value.translations.median}]:e,E.value.showSparklines?[...t,{type:`chart`,value:E.value.translations.chart}]:t}),Y=g({name:1,sum:1,average:1,median:1}),X=g(void 0);function ht(e,t,n){if(!W.value||W.value.length===0||!xt(e))return;if(X.value!==e&&(X.value=void 0),![null,void 0].includes(G.value)&&t!==G.value&&K(),G.value=void 0,Y.value[e]===n&&X.value){X.value=void 0,K();return}X.value=e,ft.value=!0,Y.value[e]=n,[null,void 0].includes(t)||($.value[t].state=Y.value[e]);let r=Y.value[e],i=[...W.value].sort((t,n)=>{let i=t[e],a=n[e];return typeof i==`string`&&typeof a==`string`?r===-1?i.localeCompare(a):a.localeCompare(i):B(i,a,r)});W.value=i}let Z=g(void 0),Q=g(void 0);function gt({dataIndex:e,serieIndex:t}){Z.value=e,Q.value=t,T.value[e]&&!F.value&&T.value[e].scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})}let _t=g(!1);function vt(e){_t.value=e,Ye.value+=1}function yt(e=null){xe(()=>{let t=[E.value.translations.serie].concat(J.value),n=H.value.map((e,t)=>[[e.name],e.values,[e.sum],[e.average],[e.median]]),i=[t].concat(n),a=r(i);e?e(a):re({csvContent:a,title:j.value.text||`vue-ui-table-sparkline`})})}function bt(e){return E.value.sortedDataColumnIndices.includes(e)}function xt(e){return e.type===`name`||e===`name`?E.value.sortedSeriesName:e.type===`sum`||e===`sum`?E.value.sortedSum:e.type===`average`||e===`average`?E.value.sortedAverage:e.type===`median`||e===`median`?E.value.sortedMedian:!1}function St(e,t,n){return[`sum`,`average`,`median`].includes(t.type)?X.value===t.type&&Y.value[t.type]===n?1:.3:e===G.value&&$.value[e].state===n?1:.3}function Ct(){E.value.resetSortOnClickOutside&&K()}let $=l({get:()=>J.value.map(e=>({state:1})),set:e=>e});function wt(e){e?.stage===`start`?Ze.value=!0:e?.stage===`end`?Ze.value=!1:it()}async function Tt(){Je(`copyAlt`,{config:E.value,dataset:H.value}),E.value.userOptions.callbacks.altCopy?await Promise.resolve(E.value.userOptions.callbacks.altCopy({config:E.value,dataset:H.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return le({generatePdf:rt,generateImage:it,generateCsv:yt,restoreOrder:K,copyAlt:Tt}),(e,t)=>(h(),d(`div`,{ref_key:`tableContainer`,ref:P,class:Se({"vue-data-ui-component":!0,"vue-ui-table-sparkline":!0,"vue-ui-responsive":F.value}),style:{overflow:`hidden`},id:`table_${C.value}`,onMouseenter:t[3]||=()=>y(Qe)(!0),onMouseleave:t[4]||=()=>y(Qe)(!1)},[j.value.text?(h(),d(`div`,{key:0,class:`vue-ui-table-sparkline-caption`,style:m({backgroundColor:j.value.backgroundColor})},[f(`div`,{class:`atom-title`,style:m({fontSize:`${j.value.fontSize}px`,fontWeight:j.value.bold?`bold`:`normal`,color:j.value.color,textAlign:j.value.textAlign})},v(j.value.text),5),j.value.subtitle.text?(h(),d(`div`,{key:0,class:`atom-subtitle`,style:m({fontSize:`${j.value.subtitle.fontSize}px`,fontWeight:j.value.subtitle.bold?`bold`:`normal`,color:j.value.subtitle.color,textAlign:j.value.textAlign})},v(j.value.subtitle.text),5)):u(``,!0)],4)):u(``,!0),f(`div`,{style:{overflow:`auto`},onPointerleave:t[2]||=e=>{Q.value=void 0,Z.value=void 0}},[f(`table`,{class:`vue-ui-data-table`,style:m({fontFamily:E.value.fontFamily,position:`relative`})},[f(`thead`,Pe,[je((h(),d(`tr`,{role:`row`,class:`vue-ui-data-table__thead-row`,style:m({backgroundColor:k.value.backgroundColor,color:k.value.color})},[f(`th`,{role:`cell`,style:m({backgroundColor:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`}),class:`sticky-col-first`},[f(`div`,{style:m({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[f(`span`,null,v(E.value.translations.serie),1),W.value.length>1&&E.value.sortedSeriesName?(h(),d(`div`,Fe,[f(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:t[0]||=e=>q({type:`name`},null,-1),style:m({cursor:M.value?`pointer`:`default`})},[p(y(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:m({opacity:X.value===`name`&&Y.value.name===-1?1:.3})},null,8,[`stroke`,`style`])],4),f(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:t[1]||=e=>q({type:`name`},null,1),style:m({cursor:M.value?`pointer`:`default`})},[p(y(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:m({opacity:X.value===`name`&&Y.value.name===1?1:.3})},null,8,[`stroke`,`style`])],4)])):u(``,!0)],4)],4),(h(!0),d(c,null,_(J.value,(t,n)=>(h(),d(`th`,{role:`cell`,style:m({background:k.value.backgroundColor,border:k.value.outline,textAlign:k.value.textAlign,fontWeight:k.value.bold?`bold`:`normal`,minWidth:n===J.value.length-1?`${O.value.dimensions.width}px`:`48px`,paddingRight:n===J.value.length-1&&D.value.show?`36px`:``}),class:Se({"sticky-col":n===J.value.length-1&&E.value.showSparklines})},[f(`div`,{style:m({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:k.value.textAlign})},[f(`span`,null,v(t.value),1),W.value.length>1&&(bt(n)||xt(t))?(h(),d(`div`,Ie,[f(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:()=>q(t,n,-1),style:m({cursor:M.value?`pointer`:`default`})},[p(y(x),{size:12,name:`arrowBottom`,stroke:k.value.color,style:m({opacity:St(n,t,-1)})},null,8,[`stroke`,`style`])],12,Le),f(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:()=>q(t,n,1),style:m({cursor:M.value?`pointer`:`default`})},[p(y(x),{size:12,name:`arrowTop`,stroke:k.value.color,style:m({opacity:St(n,t,1)})},null,8,[`stroke`,`style`])],12,Re)])):u(``,!0)],4),D.value.show&&n===J.value.length-1&&(y($e)||y(N))?(h(),_e(y(Ke),{ref_for:!0,ref:`details`,key:`user_option_${Ye.value}`,backgroundColor:k.value.backgroundColor,color:k.value.color,isPrinting:y(tt),isImaging:y(nt),uid:C.value,hasPdf:D.value.buttons.pdf,hasXls:D.value.buttons.csv,hasImg:D.value.buttons.img,hasFullscreen:D.value.buttons.fullscreen,hasAltCopy:D.value.buttons.altCopy,isFullscreen:_t.value,titles:{...D.value.buttonTitles},chartElement:P.value,position:D.value.position,callbacks:D.value.callbacks,printScale:D.value.print.scale,isCursorPointer:M.value,onToggleFullscreen:vt,onGeneratePdf:y(rt),onGenerateImage:wt,onGenerateCsv:yt,onCopyAlt:Tt,style:m({visibility:y($e)?y(N)?`visible`:`hidden`:`visible`})},ve({_:2},[_(y(de)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ae(n=>[Te(e.$slots,t,be({ref_for:!0},y(fe)(t,n)),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasXls`,`hasImg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`style`])):u(``,!0)],6))),256))],4)),[[y(he),Ct]])]),f(`tbody`,null,[(h(!0),d(c,null,_(W.value,(e,t)=>(h(),d(`tr`,{role:`row`,style:m({backgroundColor:A.value.backgroundColor,color:A.value.color}),class:Se({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0})},[f(`td`,{role:`cell`,style:m({backgroundColor:A.value.backgroundColor,border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.serie,class:`vue-ui-data-table__tbody__td sticky-col-first`},[f(`div`,{dir:`auto`,style:m({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`6px`,justifyContent:A.value.textAlign})},[A.value.showColorMarker?(h(),d(`span`,{key:0,style:m({color:e.color})},`⬤`,4)):u(``,!0),f(`span`,null,v(e.name??`-`),1)],4)],12,ze),(h(!0),d(c,null,_(ut.value,(n,r)=>(h(),d(`td`,{dir:`auto`,role:`cell`,ref_for:!0,ref_key:`TD`,ref:T,style:m({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,background:Z.value!==void 0&&r===Z.value?A.value.selectedColor.useSerieColor?y(a)(e.color,20):A.value.selectedColor.fallback:``}),"data-cell":J.value[r]?J.value[r].value:``,class:`vue-ui-data-table__tbody__td`,onPointerenter:e=>{Q.value=t,Z.value=r}},v(V(e.values[r],E.value.roundingValues,{datapoint:e,seriesIndex:t,datapointIndex:r})),45,Be))),256)),E.value.showTotal?(h(),d(`td`,{key:0,dir:`auto`,role:`cell`,style:m({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.total,class:`vue-ui-data-table__tbody__td`},v(V(e.sum,E.value.roundingTotal,{datapoint:e.sum,seriesIndex:t})),13,Ve)):u(``,!0),E.value.showAverage?(h(),d(`td`,{key:1,dir:`auto`,role:`cell`,style:m({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.average,class:`vue-ui-data-table__tbody__td`},v(V(e.average,E.value.roundingAverage,{datapoint:e.average,seriesIndex:t})),13,He)):u(``,!0),E.value.showMedian?(h(),d(`td`,{key:2,dir:`auto`,role:`cell`,style:m({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign}),"data-cell":E.value.translations.median,class:`vue-ui-data-table__tbody__td`},v(V(e.median,E.value.roundingMedian,{datapoint:e.median,seriesIndex:t})),13,Ue)):u(``,!0),E.value.showSparklines?(h(),d(`td`,{key:3,role:`cell`,"data-cell":E.value.translations.chart,style:m({border:A.value.outline,fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,textAlign:A.value.textAlign,backgroundColor:A.value.backgroundColor,padding:`0`}),class:`vue-ui-data-table__tbody__td sticky-col`},[p(y(b),{onHoverIndex:({index:e})=>gt({dataIndex:e,serieIndex:t}),"height-ratio":O.value.dimensions.heightRatio,"forced-padding":30,dataset:e.sparklineDataset,showInfo:!1,selectedIndex:Z.value,config:{type:O.value.type,style:{backgroundColor:`transparent`,animation:{show:O.value.animation.show&&!y(tt)&&!y(nt),animationFrames:O.value.animation.animationFrames},padding:{right:12},line:{color:e.color,smooth:O.value.smooth,cutNullValues:O.value.cutNullValues,strokeWidth:O.value.strokeWidth},bar:{color:e.color},area:{color:e.color,opacity:O.value.showArea?16:0,useGradient:O.value.useGradient},verticalIndicator:{color:e.color},plot:{radius:9,stroke:A.value.backgroundColor,strokeWidth:3}}}},null,8,[`onHoverIndex`,`height-ratio`,`dataset`,`selectedIndex`,`config`])],12,We)):u(``,!0)],6))),256))])],4)],32),e.$slots.source?(h(),d(`div`,Ge,[Te(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0)],42,Ne))}},[[`__scopeId`,`data-v-bb68c573`]]);export{Me as n,b 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-By3Vb5kz.js";import{$ as a,Ht as o,Jt as ee,S as s,X as te,at as ne,b as c,i as re,in as ie,t as ae,w as oe,yt as se,zt as ce}from"./lib-rPeBMZrn.js";import{n as le,t as ue}from"./BaseScanner-8NdoBs7B.js";import{n as de,t as fe}from"./useHints-C-TwxM0Y.js";import{t as pe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as me}from"./resolveChartConfig-CIhClE5R.js";import{t as he}from"./img-D4RQwASc.js";import{n as ge}from"./Title-BliHuXfT.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{n as ve,t as ye}from"./userOptionsSlots-DYuo-E5m.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{c as xe}from"./canvas-lib-22VpOI4_.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as Ce}from"./DefGrad-DKMq1REY.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ee}from"./usePrefersMotion-XLHwega2.js";import{t as De}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Oe}from"./vue_ui_thermometer-CRijq6H6.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as ke,createVNode as Ae,defineAsyncComponent as h,guardReactiveProps as g,mergeProps as je,normalizeClass as _,normalizeProps as v,normalizeStyle as Me,onMounted as Ne,openBlock as y,ref as b,renderList as x,renderSlot as S,toDisplayString as C,toRefs as Pe,unref as w,useCssVars as Fe,watch as Ie,withCtx as Le}from"vue";var Re=/* @__PURE__ */ e({default:()=>T}),ze=[`id`],Be={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Ve=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],He=[`id`],Ue=[`id`],We=[`width`,`height`],Ge=[`id`],Ke=[`x`,`y`,`width`,`height`,`rx`,`ry`],qe=[`clip-path`],Je=[`x`,`y`,`height`,`width`],Ye=[`x`,`y`,`height`,`width`,`fill`],Xe=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],Ze=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],Qe=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],$e=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],et=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],tt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],nt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],rt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],it=[`x`,`y`,`height`,`width`],at=[`aria-label`],ot=[`x`,`y`,`height`],st=[`y`,`x`,`fill`,`font-size`,`font-weight`],ct={key:4,class:`vue-data-ui-watermark`},T=/*#__PURE__*/ pe({__name:`vue-ui-thermometer`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:pe,emit:Re}){Fe(e=>({v11885436:Nt.value,v463f216e:Mt.value,a5b97b14:jt.value}));let T=h(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),lt=h(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ut=h(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),{vue_ui_thermometer:dt}=i(),ft=Ee(),E=e,pt=Re,D=b(te()),O=b(null),mt=b(0),ht=b(0),gt=b(null),_t=b(null),k=b(null),A=b(null),vt=u(()=>!!E.dataset&&Object.keys(E.dataset).length);Ne(()=>{Ct()});let j=b(V()),M=u(()=>j.value.userOptions),N=u(()=>j.value.style.chart.graduations),P=u(()=>j.value.style.chart);de({config:()=>j.value,dataset:()=>E.dataset,component:`VueUiThermometer`,rules:[fe.noHint]});let yt=b(P.value.thermometer.width),F=b(P.value.height),I=b(P.value.width),bt=u(()=>j.value.userOptions.useCursorPointer),xt=u(()=>ie({defaultConfig:{userOptions:{show:!1},style:{chart:{animation:{use:!1},backgroundColor:`#99999930`,graduations:{stroke:`#6A6A6A`}}}},userConfig:j.value.skeletonConfig??{}})),{loading:L,FINAL_DATASET:R}=le({...Pe(E),FINAL_CONFIG:j,prepareConfig:V,skeletonDataset:E.config?.skeletonDataset??{value:0,from:-100,to:100,steps:20,colors:{from:`#A1A1A1`,to:`#CACACA`}},skeletonConfig:ie({defaultConfig:j.value,userConfig:xt.value})}),St=u(()=>j.value.debug);function Ct(){if(ce(E.dataset)?ne({componentName:`VueUiThermometer`,type:`dataset`,debug:St.value}):se({datasetObject:E.dataset,requiredAttributes:[`value`,`from`,`to`]}).forEach(e=>{ne({componentName:`VueUiThermometer`,type:`datasetAttribute`,property:e,debug:St.value})}),j.value.responsive){let e=xe(()=>{let{width:e,height:t}=Se({chart:O.value,title:j.value.style.title.text?gt.value:null,source:_t.value});requestAnimationFrame(()=>{F.value=Math.max(.1,t-12),I.value=e,zt()})});k.value&&(A.value&&k.value.unobserve(A.value),k.value.disconnect()),k.value=new ResizeObserver(e),A.value=O.value,k.value.observe(A.value)}zt()}let{userOptionsVisible:z,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=we({config:j.value}),{svgRef:B}=Te({config:j.value.style.title});function V(){return me(E.config,dt,Oe)}Ie(()=>E.config,e=>{j.value=V(),z.value=!j.value.userOptions.showOnChartHover,yt.value=P.value.thermometer.width,F.value=P.value.height,I.value=P.value.width,Ct(),ht.value+=1},{deep:!0});let{isPrinting:H,isImaging:U,generatePdf:Et,generateImage:Dt}=be({elementId:`thermometer__${D.value}`,fileName:j.value.style.title.text||`vue-ui-thermometer`,options:j.value.userOptions.print}),Ot=u(()=>j.value.userOptions.show&&!j.value.style.title.text),W=u(()=>oe(j.value.customPalette)),G=u(()=>R.value.steps||10);function K(e,t,n){let r=[],i=kt(e),a=kt(t);for(let e=0;e<n;e+=1){let t=q(i.red,a.red,e,n),o=q(i.green,a.green,e,n),ee=q(i.blue,a.blue,e,n),s=`#${J(t)}${J(o)}${J(ee)}`;r.push(s)}return r}function kt(e){let t=e.slice(1);return{red:parseInt(t.slice(0,2),16),green:parseInt(t.slice(2,4),16),blue:parseInt(t.slice(4,6),16)}}function q(e,t,n,r){return Math.round(e+(t-e)*n/r)}function J(e){return e.toString(16).padStart(2,`0`)}let Y=u(()=>{let e=Math.max(.1,I.value),t=Math.max(.1,F.value),n=P.value.padding;return{width:e,left:e/2-P.value.thermometer.width/2,right:e/2+P.value.thermometer.width/2,top:n.top,bottom:t-n.bottom-n.top,height:t,thermoHeight:t-n.top-n.bottom,thermoWidth:P.value.thermometer.width}}),At=u(()=>Y.value),X=u(()=>{let e=c(R.value.from)<0?Math.abs(c(R.value.from)):c(R.value.from),t=c(R.value.to)<0?Math.abs(c(R.value.to)):c(R.value.to),n=0;return n=c(R.value.to)>0?e+t:e>t?e-t:t-e,(1-(Math.abs(c(R.value.from))+c(R.value.value))/n)*Y.value.thermoHeight}),jt=u(()=>`${X.value}px`),Mt=u(()=>`${Y.value.thermoHeight}px`),Nt=u(()=>ft.value?`0ms`:`${P.value.animation.speedMs}ms`),Pt=u(()=>{if(R.value.colors){if(!R.value.colors.from)return K(W.value[0]||o[0],s(R.value.colors.to),G.value||10);if(!R.value.colors.to)return K(s(R.value.colors.from),W.value[1]||o[1],G.value||10)}else return K(W.value[1]||o[1],W.value[0]||o[0],G.value||10);return K(s(R.value.colors.from),s(R.value.colors.to),G.value||10)}),Ft=u(()=>{let e=[],t=0,n=Y.value.thermoHeight;for(let r=0;r<n-1;r+=n/G.value)e.push({x:Y.value.left,y:Y.value.top+r,qYLess:Y.value.top+r+n/G.value/4,halfY:Y.value.top+r+n/G.value/2,qYMore:Y.value.top+r+n/G.value/4*3,color:Pt.value[t],height:Math.max(.1,n/G.value)}),t+=1;return e}),Z=b(!1);function It(e){Z.value=e,mt.value+=1}let Q=b(!1);function Lt(){Q.value=!Q.value}async function Rt({scale:e=2}={}){if(!O.value)return;let{width:t,height:n}=O.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await he({domElement:O.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:j.value.style.title.text,width:t,height:n,aspectRatio:r}}let $=u({get:()=>P.value.label.fontSize,set:e=>e}),{autoSizeLabels:zt}=De({svgRef:B,fontSize:P.value.label.fontSize,minFontSize:P.value.label.minFontSize,sizeRef:$,labelClass:`.vue-ui-thermometer-label`}),Bt=u(()=>P.value.backgroundColor),Vt=u(()=>j.value.style.title),{isCallbackImaging:Ht,isCallbackSvg:Ut,generateSvg:Wt,onGenerateImage:Gt}=_e({svg:B,title:Vt,legend:null,legendItems:null,backgroundColor:Bt,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:Dt});async function Kt(){pt(`copyAlt`,{config:j.value,dataset:R.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:R.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let qt=u(()=>`${D.value}-title`),Jt=u(()=>`${D.value}-desc`),Yt=u(()=>re(P.value.label.formatter,R.value.value,a({p:P.value.label.prefix,v:R.value.value,s:P.value.label.suffix,r:P.value.label.rounding}),{datapoint:R.value})),Xt=u(()=>j.value.style.title.text||``),Zt=u(()=>{if(L.value)return`...`;let e=c(R.value.from),t=c(R.value.to);return`Thermometer value: ${Yt.value}. Range: ${e} to ${t}.`});return pe({getImage:Rt,generatePdf:Et,generateImage:Dt,generateSvg:Wt,toggleAnnotator:Lt,toggleFullscreen:It,copyAlt:Kt}),(e,i)=>(y(),p(`div`,{ref_key:`thermoChart`,ref:O,class:_(`vue-data-ui-component vue-ui-thermometer ${Z.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:Me(`width:100%;background:${P.value.backgroundColor};color:${P.value.color};font-family:${j.value.style.fontFamily}`),id:`thermometer__${D.value}`,onMouseenter:i[0]||=()=>w(wt)(!0),onMouseleave:i[1]||=()=>w(wt)(!1)},[M.value.buttons.annotator?(y(),d(w(lt),je({key:0},w(n)(M.value.annotator),{svgRef:w(B),backgroundColor:P.value.backgroundColor,color:P.value.color,active:Q.value,isCursorPointer:bt.value,palette:M.value.annotatorPalette,onClose:Lt}),ke({_:2},[x(w(r),n=>({name:n,fn:Le(r=>[S(e.$slots,n,v(g(w(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Ot.value?(y(),p(`div`,Be,null,512)):f(``,!0),j.value.style.title.text?(y(),p(`div`,{key:2,ref_key:`chartTitle`,ref:gt,style:`width:100%`},[(y(),d(ge,{key:`title_${ht.value}`,config:{title:{cy:`thermometer-div-title`,...j.value.style.title},subtitle:{cy:`thermometer-div-subtitle`,...j.value.style.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),M.value.show&&vt.value&&(w(Tt)||w(z))?(y(),d(w(ut),{ref:`details`,key:`user_options_${mt.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isImaging:w(U),isPrinting:w(H),uid:D.value,hasPdf:M.value.buttons.pdf,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,hasXls:!1,isFullscreen:Z.value,titles:{...M.value.buttonTitles},chartElement:O.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:Q.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,isCursorPointer:bt.value,onToggleFullscreen:It,onGeneratePdf:w(Et),onGenerateImage:w(Gt),onGenerateSvg:w(Wt),onToggleAnnotator:Lt,onCopyAlt:Kt,style:Me({visibility:w(Tt)?w(z)?`visible`:`hidden`:`visible`})},ke({_:2},[x(w(ve)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Le(n=>[S(e.$slots,t,v(g(w(ye)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),(y(),p(`svg`,{ref_key:`svgRef`,ref:B,xmlns:w(ae),class:_({"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value}),width:`100%`,viewBox:`0 0 ${Y.value.width} ${Y.value.height}`,style:`background:transparent`,"aria-labelledby":qt.value,"aria-describedby":Jt.value},[m(`title`,{id:qt.value},C(Xt.value),9,He),m(`desc`,{id:Jt.value},C(Zt.value),9,Ue),Ae(w(T)),S(e.$slots,`svg-underlayer`,{svg:{...At.value,isPrintingImg:w(H)||w(U)||w(Ht),isPrintingSvg:w(Ut)}},void 0,!0),e.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:0,y:0,width:Y.value.width,height:Y.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,We)):f(``,!0),m(`defs`,null,[m(`clipPath`,{id:`vueUiPill-${D.value}`,clipPathUnits:`userSpaceOnUse`},[m(`rect`,{x:Y.value.left,y:Y.value.top,width:Y.value.thermoWidth,height:Y.value.thermoHeight,rx:Y.value.thermoWidth/2,ry:Y.value.thermoWidth/2},null,8,Ke)],8,Ge),(y(!0),p(l,null,x(Ft.value,(e,t)=>(y(),d(Ce,{t:`linear`,id:`vueUiThermometerGradient_${t}_${D.value}`,key:`t_${t}_${D.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,e.color,1],[`50%`,w(ee)(e.color,100-N.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),m(`g`,{"clip-path":`url(#vueUiPill-${D.value})`},[m(`rect`,{x:Y.value.left,y:Y.value.top,height:Y.value.thermoHeight,width:Y.value.thermoWidth,fill:`#FFFFFF`},null,8,Je),(y(!0),p(l,null,x(Ft.value,(e,t)=>(y(),p(`g`,{key:`graduation_${t}`},[m(`rect`,{x:e.x,y:e.y,height:e.height,width:Y.value.thermoWidth,fill:N.value.gradient.show?`url(#vueUiThermometerGradient_${t}_${D.value})`:e.color,"shape-rendering":`crispEdges`},null,8,Ye),N.value.show&&[`both`,`left`].includes(N.value.sides)?(y(),p(`line`,{key:0,x1:e.x,x2:e.x+10,y1:e.y,y2:e.y,"stroke-width":N.value.strokeWidth,stroke:N.value.stroke,"stroke-linecap":`round`},null,8,Xe)):f(``,!0),N.value.showIntermediate?(y(),p(l,{key:1},[N.value.show&&[`both`,`left`].includes(N.value.sides)?(y(),p(`line`,{key:0,x1:e.x,x2:e.x+5,y1:e.halfY,y2:e.halfY,"stroke-width":N.value.strokeWidth/2,stroke:N.value.stroke,"stroke-linecap":`round`},null,8,Ze)):f(``,!0),N.value.show&&[`both`,`left`].includes(N.value.sides)?(y(),p(`line`,{key:1,x1:e.x,x2:e.x+2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":N.value.strokeWidth/2,stroke:N.value.stroke,"stroke-linecap":`round`},null,8,Qe)):f(``,!0),N.value.show&&[`both`,`left`].includes(N.value.sides)?(y(),p(`line`,{key:2,x1:e.x,x2:e.x+2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":N.value.strokeWidth/2,stroke:N.value.stroke,"stroke-linecap":`round`},null,8,$e)):f(``,!0)],64)):f(``,!0),N.value.show&&[`both`,`right`].includes(N.value.sides)?(y(),p(`line`,{key:2,x1:Y.value.right,x2:Y.value.right-10,y1:e.y,y2:e.y,"stroke-width":N.value.strokeWidth,stroke:N.value.stroke,"stroke-linecap":`round`},null,8,et)):f(``,!0),N.value.showIntermediate?(y(),p(l,{key:3},[N.value.show&&[`both`,`right`].includes(N.value.sides)?(y(),p(`line`,{key:0,x1:Y.value.right,x2:Y.value.right-5,y1:e.halfY,y2:e.halfY,"stroke-width":N.value.strokeWidth/2,stroke:N.value.stroke,"stroke-linecap":`round`},null,8,tt)):f(``,!0),N.value.show&&[`both`,`right`].includes(N.value.sides)?(y(),p(`line`,{key:1,x1:Y.value.right,x2:Y.value.right-2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":N.value.strokeWidth/2,stroke:N.value.stroke,"stroke-linecap":`round`},null,8,nt)):f(``,!0),N.value.show&&[`both`,`right`].includes(N.value.sides)?(y(),p(`line`,{key:2,x1:Y.value.right,x2:Y.value.right-2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":N.value.strokeWidth/2,stroke:N.value.stroke,"stroke-linecap":`round`},null,8,rt)):f(``,!0)],64)):f(``,!0)]))),128)),m(`rect`,{class:_({"vue-ui-thermometer-temperature":P.value.animation.use}),x:Y.value.left,y:Y.value.top,height:X.value,width:Y.value.thermoWidth,fill:`#FFFFFF66`},null,10,it)],8,qe),P.value.label.show?(y(),p(`g`,{key:1,role:`status`,"aria-live":`polite`,"aria-label":w(L)?`Loading data`:Yt.value},[w(L)?(y(),p(`rect`,{key:0,x:Y.value.left-60,y:X.value+Y.value.top-$.value/2,width:50,height:$.value,fill:`#6A6A6A40`,rx:`3`},null,8,ot)):(y(),p(`text`,{key:1,"aria-hidden":`true`,class:_({"vue-ui-thermometer-temperature-value":P.value.animation.use,"vue-ui-thermometer-label":!0}),y:X.value+Y.value.top+$.value/3,x:Y.value.left-10,"text-anchor":`end`,fill:P.value.label.color,"font-size":$.value,"font-weight":P.value.label.bold?`bold`:`normal`},C(Yt.value),11,st))],8,at)):f(``,!0),S(e.$slots,`svg`,{svg:{...At.value,isPrintingImg:w(H)||w(U)||w(Ht),isPrintingSvg:w(Ut)}},void 0,!0)],10,Ve)),e.$slots.watermark?(y(),p(`div`,ct,[S(e.$slots,`watermark`,v(g({isPrinting:w(H)||w(U)||w(Ht)||w(Ut)})),void 0,!0)])):f(``,!0),e.$slots.source?(y(),p(`div`,{key:5,ref_key:`source`,ref:_t,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),S(e.$slots,`skeleton`,{},()=>[w(L)?(y(),d(ue,{key:0})):f(``,!0)],!0)],46,ze))}},[[`__scopeId`,`data-v-7f6a52d8`]]);export{Re as n,T as t};