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
@@ -0,0 +1,22 @@
1
+ import{$ as e,Bt as t,Ht as n,It as r,Jt as i,S as a,X as o,Y as s,Yt as c,b as l,f as u,i as d,in as f,j as p,nn as m,p as h,st as g,t as _}from"./lib-rPeBMZrn.js";import{t as v}from"./useConfig-_JwRfIqE.js";import{t as y}from"./vue_ui_donut-B2W2nyAS.js";import{_ as b,a as x,c as S,d as C,g as w,i as T,l as E,n as D,o as O,p as k,r as A,s as ee,t as te,u as j,v as M}from"./render-common-CPA2hfDW.js";var{vue_ui_donut:ne}=v();function re({config:e={}}={}){let t=e??{},r=f({userConfig:t,defaultConfig:ne}),i=r.theme;if(!i)return{...r,customPalette:r.customPalette?.length?r.customPalette:n};let a=f({userConfig:y[i]||{},defaultConfig:r}),o=f({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:m[i]||n}}function N(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function P(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+N(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+N(t,0),0):N(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let r=Array.isArray(t.customPalette)?t.customPalette:n;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,n)=>t.sorted?e.source?.ghost&&!n.source?.ghost?1:n.source?.ghost&&!e.source?.ghost?-1:n.value-e.value:0).map((e,t)=>{let n=e.source,i=e.value,o=(n?.color?a(n.color):``)||r[t%r.length];return{...n,id:n?.id??`donut_serie_${t}`,name:ae(n,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(n?.values)?n.values:[i],color:o,index:t,sourceIndex:e.sourceIndex,patternIndex:n?.patternIndex??t,seriesIndex:n?.seriesIndex??t,ghost:!!n?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:N(P(o,`chart.padding.top`,24),24),right:N(P(o,`chart.padding.right`,24),24),bottom:N(P(o,`chart.padding.bottom`,24),24),left:N(P(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=N(P(o,`chart.donut.radius`,f),f),m=N(P(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:N(P(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=o();function F(){return ue}function I(e){return O(x(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return b(e?.value??e?.absoluteValue??0,0)}function L(e){return w(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:O(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function R(e){return e.reduce((e,t)=>e+Math.abs(b(t.value,0)),0)}function fe(e){let t=x(e,`title`,{}),n=k(t,`subtitle`,{});if(!t.text)return 0;let r=b(t.fontSize,20),i=n.show!==!1&&n.text?b(n.fontSize,14):0;return b(t.paddingTop,12)+r+(i?i+12:0)+b(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=x(n,`legend`,{}),a=b(i.fontSize,12),o=b(i.markerSize,10),s=b(i.itemGap,24),c=b(i.rowGap,8),l=b(i.padding,8),u=b(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Be(e,t),r=D(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function z(e,t){return!x(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function B(e){return!!T(e,`pie`,x(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=z(e,t),s=x(n,`legend.show`,!0),c=x(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=b(x(n,`padding.top`,24),24),f=b(x(n,`padding.right`,24),24),p=b(x(n,`padding.bottom`,24),24),m=b(x(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?b(T(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=b(x(n,`layout.donut.radiusRatio`,.35),.35),S=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*S),w=x(n,`layout.donut.radius`,null),E=w==null?C:Math.min(C,b(w,C)),D=b(x(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(E*D*2,E),12*(1+D)),k=x(n,`layout.donut.thickness`,x(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(E-1,k==null?O:b(k,O)));return{...e,drawingArea:h,center:v,radius:E,thickness:A,innerRadius:B(n)?0:Math.max(0,E-A)}}function he(e,t){let n=b(x(e.config,`layout.donut.rotation`,105.25),105.25);return r({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,B(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:O(e.color,t[n]?.color),value:b(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(b(e.value,0)))),r=t.map(e=>Math.abs(b(e.value,0))/n);return p({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function V(e){return`gradient_${F()}`}function H(e,t){return`polar_gradient_${t}_${F()}`}function _e(e){return T(e.config,`type`,`classic`)!==`classic`||!x(e.config,`useGradient`,!1)?``:C(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${V(e)})`})}function U(e){return`drop_shadow_${F()}`}function ve(e){let{config:t,width:n}=e,r=x(t,`title`,{}),i=k(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?b(r.paddingLeft,12):a===`right`?n-b(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=b(r.fontSize,20),l=b(i.fontSize,14),u=b(r.paddingTop,12)+c,d=[M(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:O(r.color,A(t))})];return i.text&&d.push(M(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:O(i.color||r.color,A(t))})),j(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],a=!!x(n,`useGradient`,!1),o=!!x(n,`layout.donut.useShadow`,!1);if(a){let a=T(n,`type`,`classic`),o=b(x(n,`gradientIntensity`,30),30);if(a===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=B(n)?1:e.thickness/e.radius;r.push(j(`radialGradient`,{id:V(e)},[C(`stop`,{offset:`0%`,"stop-color":i(I(n),0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t)*100}%`,"stop-color":i(`#FFFFFF`,0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":i(`#FFFFFF`,o)}),C(`stop`,{offset:`100%`,"stop-color":i(I(n),0),"stop-opacity":0})].join(``)))}a===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(j(`radialGradient`,{id:H(e,n),cx:`${l(i.middlePoint.x/e.width*100)}%`,cy:`${l(i.middlePoint.y/e.height*100)}%`,r:`62%`},[C(`stop`,{offset:`0%`,"stop-color":c(t.color,.05),"stop-opacity":o/100}),C(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=O(x(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=b(x(n,`layout.donut.shadowOpacity`,.2),.2),a=b(x(n,`layout.donut.shadowBlur`,6),6),o=b(x(n,`layout.donut.shadowOffsetY`,3),3);r.push(j(`filter`,{id:U(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?j(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return x(e.config,`useGradient`,!1)?`url(#${H(e,n)})`:t.color}function W(e){let{config:t}=e;return x(t,`layout.donut.borderColorAuto`,!0)?I(t):O(x(t,`layout.donut.borderColor`,I(t)),I(t))}function G(e){return x(e.config,`layout.donut.useShadow`,!1)?`url(#${U(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=W(e),r=b(x(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{b(t.proportion,0)<=0||(i.push(C(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:I(e.config)})),i.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:G(e)})))}),j(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=W(e),i=b(x(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(C(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:G(e)})))}),j(`g`,{"data-layer":`polar-slices`},a.join(``))}function K(t,n,r=`layout.labels.value.rounding`){let{config:i}=t,a=x(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=e({p:o.prefix??``,v:n.value,s:o.suffix??``,r:b(x(i,r,s.rounding??0),s.rounding??0)});return d(s.formatter,n.value,c,{datapoint:n})}function q(t,n){let{config:r}=t,i=x(r,`layout.labels.percentage`,{}),a=b(n.proportion,0)*100,o=e({v:a,s:`%`,r:b(i.rounding,0)});return d(i.formatter,a,o,{datapoint:n})}function J(e,t){let n=x(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?K(e,t):``,percentage:a?q(e,t):``}}function we(e,t){let{value:n,percentage:r}=J(e,t);return r&&n?`${r} (${n})`:r||n||``}function Y(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?K(e,t):``,s=a?q(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function X(e,t){let n=x(e.config,`layout.labels`,{}).dataLabels??{};if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=b(n.hideUnderValue,0);return b(t.proportion,0)*100>r}function Te(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r=b(n.smallArcClusterThreshold,0),i=b(n.hideUnderValue,0),a=b(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Z(e){return!!x(e.config,`layout.curvedMarkers`,x(e.config,`layout.donut.curvedMarkers`,!1))}function Q(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=b(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,d=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),g=Z(e);function _(e){return{x:l(e.center?.endX??e.endX),y:l(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!g)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,h=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=h)return{x:e,y:t};let s=h/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),h),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function S({arc:e,index:t}){let n=_(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:u(e).x,inlineMarkerY:h(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>S({arc:e,index:t})).filter(({arc:t})=>X(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:d,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:d,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function Ee({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=x(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??u(t,!0,12).x,l=r?.labelY??h(t),d=r?.textAnchor??u(t,!0,12).anchor,{name:f}=J(e,t),p=we(e,t),m=String(f).split(/\n/g),_=f?m.map((t,n)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:O(s.color,A(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},g(t+(n===m.length-1?` `:``)))).join(``):``,v=p?j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},g(p)):``;return j(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":d},`${_}${v}`)}function De(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!T(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=b(r.fontSize??n.value?.fontSize??12,12);O(r.color??n.value?.color??A(e.config),A(e.config)),r.bold??n.value?.bold;let a=b(r.offset,16),o=Q(e,t),s=[];return t.forEach((t,n)=>{if(!X(e,t))return;let c=o[n];Y(e,t),c?s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:b(r.smallArcClusterFontSize,i)})):s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:u(t,!1,a+i/2).x,labelY:h(t,a,a),textAnchor:u(t).anchor},fontSize:i}))}),s.length?j(`g`,{"data-layer":`data-labels`},s.join(``)):``}function Oe(e,n,r=42){return t({initX:n.middlePoint.x,initY:n.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function ke(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function Ae(e,t,n,r){let i=x(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=b(a.fontSize,i.dataLabels?.fontSize??12),c=b(o.fontSize,i.dataLabels?.fontSize??12),l=j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(a.color,A(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},g(String(Y(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:O(o.color,A(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},g(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function je(e,t,n){let r=x(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},c=r.name??{};if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=b(a.fontSize,i.fontSize??12),d=b(c.fontSize,i.fontSize??12),f=O(o.color,A(e.config)),p=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!X(e,t))return;let a=Oe(e,i,42),m=ke(e,a);l?p.push(j(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":m},Ae(e,t,a.x,m))):(p.push(j(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":m,fill:f},te({content:Y(e,t),x:a.x,fontSize:u,fill:f,textAnchor:m}))),c.show&&p.push(j(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":c.bold?`700`:`400`,"text-anchor":m,fill:O(c.color,A(e.config))},s({content:g(String(t.name??``)),fontSize:d,fill:O(c.color,A(e.config)),x:a.x}))))}),p.length?j(`g`,{"data-layer":`polar-data-labels`},p.join(``)):``}function Me(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=x(e.config,`layout.labels.dataLabels`,{}),i=b(r.offset,16),a=b(r.markerFlatLength,12),o=Z(e),s=u(t).x,c=h(t,i,i)-4,l=s+(t.center.endX>t.cx?-a:a),d=`${s},${c}`,f=`${l},${c}`,p=`${t.center.endX},${t.center.endY}`;return o?`M${d} Q${f} ${p}`:`M${d} ${f} ${p}`}function Ne(e,t){let n=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Q(e,t),i=[];return t.forEach((t,a)=>{if(!X(e,t))return;let o=r[a],s=Me(e,t,o);s&&(i.push(C(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":b(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(C(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??u(t).x,cy:o?.markerY??h(t)-3.5,r:b(n.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1})))}),i.length?j(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Pe(e,n,r){let i=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return n.forEach((n,o)=>{let s=r[o];if(!s?.middlePoint||!X(e,n))return;let c=t({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(C(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:n.color,"stroke-width":b(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(C(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:b(i.markerRadius,3),fill:n.color,stroke:I(e.config),"stroke-width":1}))}),a.length?j(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:M(e,{"text-anchor":`middle`,...t})}function Fe(t,n,r){if(T(t.config,`type`,`classic`)!==`classic`||B(t.config)||!n)return``;let i=x(t.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=b(a.fontSize,14),i=!!o.show,c=t.center.y-(i?r:0)+b(a.offsetY,0),l=a.value??{},u=b(l.fontSize,r),f=d(l.formatter,n,e({p:l.prefix??``,v:n,s:l.suffix??``,r:b(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:t.center.x,y:c,fill:O(a.color,A(t.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(f,{"data-cy":`hollow-total-value`,x:t.center.x,y:t.center.y+r-(i?r:0)+b(l.offsetY,0),fill:O(l.color,O(a.color,A(t.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=b(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},f=b(u.fontSize,i),p=d(u.formatter,l,e({p:u.prefix??``,v:l,s:u.suffix??``,r:b(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:t.center.x,y:t.center.y+(c?i:0)+b(o.offsetY,0),fill:O(o.color,A(t.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(p,{"data-cy":`hollow-average-value`,x:t.center.x,y:t.center.y+(c?i:0)+i+b(u.offsetY,0),fill:O(u.color,O(o.color,A(t.config))),"font-size":f,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?j(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Ie(t,n){let{config:r,center:i}=t,a=x(r,`layout.donut.labels.total`,x(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=x(r,`layout.labels.dataLabels`,{}),s=b(a.fontSize,20),c=O(a.color,A(r)),l=d(a.formatter,n,e({p:o.prefix??``,v:n,s:o.suffix??``,r:b(a.rounding,0)}),{total:n});return M(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Le(e,t){let n=R(L(e));return n?b(t.value,0)/n*100:0}function Re(t,n){let r=x(t.config,`legend`,{}),i=x(t.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=e({p:a.prefix??``,v:n.value,s:a.suffix??``,r:b(r.roundingValue,o.rounding??0)});return d(o.formatter,n.value,s,{datapoint:n,serie:n})}function ze(t,n){let r=x(t.config,`legend`,{}),i=x(t.config,`layout.labels`,{}).percentage??{},a=Le(t,n),o=e({v:a,s:`%`,r:b(r.roundingPercentage,i.rounding??0)});return d(i.formatter,a,o,{datapoint:n,serie:n})}function Be(e,t){let n=x(e.config,`legend`,{}),r=[],i=n.showPercentage?ze(e,t):``,a=n.showValue?Re(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function Ve(e,t){let n=x(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=z(e,t),i=O(n.color,A(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(C(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(M(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),j(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function He(e){return j(`g`,{"data-layer":`no-data`},[C(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:O(x(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function Ue(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function We(e,t,n){let r=`${T(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${l(n)}.`;return j(`title`,{},g(r))}async function Ge(e){let t=e.config,n=b(e.width,x(t,`width`,512)),r=b(e.height,x(t,`height`,512)),i=L(e),a=R(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=T(t,`type`,`classic`),u=a>0&&s.some(e=>b(e.proportion,0)>0);return`
2
+ <svg
3
+ xmlns="${_}"
4
+ width="100%"
5
+ viewBox="0 0 ${n} ${r}"
6
+ role="img"
7
+ >
8
+ ${E()}
9
+ ${We(o,i,a)}
10
+ ${S(o)}
11
+ ${ye({...o,polarAreas:c},s)}
12
+ ${ee(o)}
13
+ ${ve(o)}
14
+ ${u?l===`polar`?Ce(o,s,c):Se(o,s):He(o)}
15
+ ${u&&l===`classic`?_e(o):``}
16
+ ${u?l===`polar`?Pe(o,s,c):Ne(o,s):``}
17
+ ${u?Fe(o,a,i):``}
18
+ ${u?l===`polar`?je(o,s,c):De(o,s):``}
19
+ ${u?Ie(o,a):``}
20
+ ${Ve(o,i)}
21
+ ${Ue(o,s)}
22
+ </svg>`.trim()}async function Ke(e={}){return await Ge(le(e))}export{Ke as t};
@@ -0,0 +1,9 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as ee}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-DPGnEuYM.js";import{t as ne}from"./resolveChartConfig-0IvbmIE_.js";import{$ as c,D as re,Ft as ie,Jt as ae,Q as oe,X as se,_ as ce,at as le,b as ue,i as l,in as de,nt as fe,t as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{c as ge}from"./canvas-lib-22VpOI4_.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./useConfig-_JwRfIqE.js";import{t as be}from"./useSvgLabelLayout-42Kats14.js";import{t as xe}from"./usePrinter-DVf3YcG5.js";import{n as Se,t as Ce}from"./BaseScanner-8NdoBs7B.js";import{t as we}from"./useResponsive-CENUxfEL.js";import{t as Te}from"./useChartExport-BZts4KFb.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{t as Oe}from"./useTimeLabelCollider-BTybMUFi.js";import{t as ke}from"./usePrefersMotion-XLHwega2.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./vue_ui_dumbbell-DyyFLbhQ.js";import{t as Me}from"./Legend-W9YVYVX-.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{t as u}from"./DefGrad-DKMq1REY.js";import{t as Pe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as d,Teleport as Fe,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Ie,createTextVNode as Le,createVNode as _,defineAsyncComponent as v,guardReactiveProps as Re,mergeProps as ze,nextTick as Be,normalizeClass as Ve,normalizeProps as He,normalizeStyle as y,onBeforeUnmount as Ue,onMounted as We,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Ge,shallowRef as Ke,toDisplayString as w,toRefs as qe,unref as T,vShow as Je,watch as Ye,withCtx as E,withDirectives as Xe}from"vue";var Ze=/* @__PURE__ */ e({default:()=>It}),Qe=[`id`],$e=[`id`],et=[`id`],tt={style:{position:`relative`}},nt=[`xmlns`,`viewBox`,`aria-describedby`],rt=[`x`,`y`,`width`,`height`],it={key:1},at=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ot={key:2},st=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],lt=[`transform`,`font-size`,`fill`],ut=[`x`,`y`,`font-size`,`fill`,`font-weight`,`onMouseenter`,`onMouseleave`,`onClick`],dt=[`x`,`y`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],ft=[`x`,`y`,`font-size`,`fill`],pt=[`transform`,`font-size`,`fill`,`font-weight`,`text-anchor`],mt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],gt=[`x`,`y`,`height`,`width`,`fill`],_t=[`transform`,`fill`,`font-size`],vt={key:0},yt={key:0},bt=[`d`,`fill`],xt={key:1},St=[`x`,`y`,`height`,`width`,`fill`],Ct=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],wt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Tt={key:7},Et=[`x`,`y`,`fill`,`font-size`],Dt={key:8},Ot=[`x`,`y`,`fill`,`font-size`],kt=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],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=[`id`],Nt=[`xmlns`,`height`,`width`],Pt=[`fill`],Ft={style:{display:`flex`,"align-items":`center`}},It=/*#__PURE__*/ Pe({__name:`vue-ui-dumbbell`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:Pe,emit:Ze}){let It=v(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Lt=v(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),Rt=v(()=>import(`./DataTable-KeuZB1JM.js`)),zt=v(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Bt=v(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Vt=v(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),Ht=v(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_dumbbell:Ut}=ye(),Wt=ke(),D=e,Gt=Ze,Kt=f({get(){return!!D.dataset&&D.dataset.length},set(e){return e}}),O=x(se()),qt=x(0),k=x(null),Jt=x(null),Yt=x(null),Xt=x(null),Zt=x(null),Qt=x(0),$t=x(0),en=x(0),tn=x(!1),nn=x(null),rn=x(null),an=x(null),on=x(null),sn=x(null),cn=x(null),A=x(null),j=x(null),M=x(null),ln=x(!1),N=x(!1),P=x(yn()),F=f(()=>P.value.style.chart.grid.horizontalGrid),un=f(()=>P.value.style.chart.grid.verticalGrid),I=f(()=>P.value.style.chart.labels);f(()=>P.value.style.chart.grid);let L=f(()=>P.value.style.chart.plots),R=f(()=>P.value.style.chart.comparisonLines),z=f(()=>P.value.style.chart);_e({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiDumbbell`,rules:[ve.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the component to display related series.`]}]});let dn=f(()=>P.value.userOptions.useCursorPointer),fn=f(()=>de({defaultConfig:{userOptions:{show:!1},table:{show:!1},useAnimation:!1,style:{chart:{backgroundColor:`#99999930`,padding:{top:12,right:12,bottom:12,left:12},grid:{horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},labels:{axis:{yLabel:``,xLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1},endLabels:{show:!1},startLabels:{show:!1}},legend:{backgroundColor:`transparent`},plots:{endColor:`#969696`,startColor:`#DBDBDB`,stroke:`#6A6A6A`,evaluationColors:{enable:!1}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:pn,FINAL_DATASET:mn,manualLoading:hn}=Se({...qe(D),FINAL_CONFIG:P,prepareConfig:yn,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,start:21,end:34},{name:`_`,start:13,end:21},{name:`_`,start:8,end:13},{name:`_`,start:5,end:8},{name:`_`,start:3,end:5}],skeletonConfig:de({defaultConfig:P.value,userConfig:fn.value})}),{userOptionsVisible:gn,setUserOptionsVisibility:_n,keepUserOptionState:vn}=Ee({config:P.value}),{svgRef:B}=De({config:z.value.title});function yn(){return ne(D.config,Ut,je)}Ye(()=>D.config,e=>{pn.value||(P.value=yn()),gn.value=!P.value.userOptions.showOnChartHover,Cn(),Qt.value+=1,$t.value+=1,en.value+=1,P.value.responsive||(K.value=z.value.rowHeight,q.value=z.value.width),U.value.showTable=P.value.table.show},{deep:!0}),Ye(()=>mn.value,e=>{Array.isArray(e)&&e.length>0&&(hn.value=!1),zn(),Bn()},{deep:!0});let V=Ke(null),H=Ke(null),bn=x(!1),xn=0;We(()=>{tn.value=!0,Cn()});let Sn=f(()=>P.value.debug);function Cn(){he(D.dataset)?le({componentName:`VueUiDumbbell`,type:`dataset`,debug:Sn.value}):D.dataset.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`start`,`end`]}).forEach(e=>{Kt.value=!1,le({componentName:`VueUiDumbbell`,type:`datasetSerieAttribute`,property:e,index:t,debug:Sn.value})})}),P.value.responsive&&(V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(()=>{let{width:e,height:t}=we({chart:k.value,title:z.value.title.text?Jt.value:null,legend:z.value.legend.show?Yt.value:null,source:Xt.value,noTitle:Zt.value}),n=z.value.title.text?24:0,r=z.value.legend.show?24:0;cancelAnimationFrame(xn),xn=requestAnimationFrame(async()=>{q.value=Math.max(.1,e),K.value=Math.max(.1,(Math.max(.1,t)-(n+r))/mn.value.length),tr(),bn.value=!0})}),H.value=k.value.parentNode,V.value.observe(H.value)),tr()}Ue(()=>{cancelAnimationFrame(xn),Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:wn,isImaging:Tn,generatePdf:En,generateImage:Dn}=xe({elementId:`dumbbell_${O.value}`,fileName:z.value.title.text||`vue-ui-dumbbell`,options:P.value.userOptions.print}),On=f(()=>P.value.userOptions.show&&!z.value.title.text),U=x({showTable:P.value.table.show});Ye(P,()=>{U.value={showTable:P.value.table.show}},{immediate:!0});let W=f(()=>mn.value.map((e,t)=>({...e,start:ue(e.start),end:ue(e.end),id:e.id??`${String(e.name)}__${String(e.start)}__${String(e.end)}__${se()}`}))),kn=f(()=>{let e=z.value.grid,t=W.value.flatMap(e=>[e.start,e.end]).map(e=>Number(e)).filter(e=>Number.isFinite(e)),n=t.length?Math.min(...t):0,r=t.length?Math.max(...t):0;return{min:e.scaleMin??Math.min(n,0),max:e.scaleMax??r}}),G=f(()=>ce(kn.value.min,kn.value.max,z.value.grid.scaleSteps)),K=x(z.value.rowHeight),q=x(z.value.width),{metrics:An,ready:jn,settling:Mn,update:Nn}=be({svgRef:B,canMeasure:()=>!P.value.responsive||bn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(on.value).textWidth,yAxisLabelWidth:e(an.value).rotatedWidth,xAxisLabelHeight:e(cn.value).height,timeLabelsHeight:e(sn.value).height})});function Pn(){let e=An.value.scaleLabelsWidth,t=An.value.yAxisLabelWidth;return e+t+(t?24+I.value.axis.yLabelOffsetX:0)}let Fn=f(()=>An.value.xAxisLabelHeight+An.value.timeLabelsHeight),In=f(()=>W.value.length);function Ln(e,t,n){let r=Number(e),i=Number(t.min),a=Number(t.max),o=Number(n.width);if(!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||!Number.isFinite(o))return n.left;let s=a-i;return s<=0?n.left:n.left+(r-i)/s*o}let J=f(()=>{N.value;let e=Pn(),t=z.value.padding,n=I.value.axis.xLabel?I.value.axis.xLabelOffsetY:0,r=K.value*In.value-Fn.value-t.top-t.bottom-n,i=r/In.value,a=K.value*In.value,o=q.value-e-t.left-t.right,s=G.value.ticks.length*(o/G.value.ticks.length);return{left:z.value.padding.left+e,right:q.value-z.value.padding.right,top:z.value.padding.top,bottom:a-z.value.padding.bottom-Fn.value-n,width:o,height:r,rowHeight:i,absoluteHeight:a,widthPlotReference:s}}),Y=f(()=>Math.min(K.value/2*.7,L.value.radius)),Rn=x([]),X=f({get(){let e=J.value,t=G.value;return Rn.value.map((n,r)=>{let i=Ln(n.start,t,e),a=Ln(n.endVal,t,e),o=i+(a-i)/2,s=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end>n.start,ee=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end<n.start,te=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end===n.start||[null,void 0].includes(n.start)||[null,void 0].includes(n.end),ne=s?L.value.evaluationColors.positive:ee?L.value.evaluationColors.negative:L.value.evaluationColors.neutral;return{...n,isPositive:s,isNegative:ee,isNeutral:te,evaluationColor:ne,evaluationGrad:`url(#${s?`positive`:ee?`negative`:`neutral`}_grad_${O.value})`,startX:i,endX:a,centerX:o,y:e.top+r*e.rowHeight+e.rowHeight/2}})},set(e){Rn.value=e}});function zn(){Rn.value=W.value.map(e=>{let t=Number(e.start);return{...e,endVal:Number.isFinite(t)?t:0}})}let Z=x(null);We(()=>{Bn()});function Bn(){if(Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),zn(),!P.value.useAnimation||Wt.value){X.value=Rn.value.map(e=>{let t=Number(e.end);return{...e,endVal:Number.isFinite(t)?t:e.endVal}});return}let e=Math.max(1,Math.min(100,P.value.animationSpeed||100))/100,t=W.value.map(e=>{let t=Number(e.start),n=Number(e.end),r=Number.isFinite(t)?t:0;return(Number.isFinite(n)?n:r)-r}),n=()=>{let r=!0;X.value=Rn.value.map((n,i)=>{let a=Number.isFinite(Number(n.end))?Number(n.end):n.endVal,o=n.endVal+t[i]*e,s=t[i]>=0?Math.min(o,a):Math.max(o,a);return s!==a&&(r=!1),{...n,endVal:s}}),r?Z.value=null:Z.value=requestAnimationFrame(n)};Z.value=requestAnimationFrame(n)}let Vn=f(()=>L.value.evaluationColors.enable?[{name:z.value.legend.labelNegative,color:L.value.gradient.show?`url(#negative_grad_${O.value})`:L.value.evaluationColors.negative},{name:z.value.legend.labelNeutral,color:L.value.gradient.show?`url(#neutral_grad_${O.value})`:L.value.evaluationColors.neutral},{name:z.value.legend.labelPositive,color:L.value.gradient.show?`url(#positive_grad_${O.value})`:L.value.evaluationColors.positive}]:[{name:z.value.legend.labelStart,color:L.value.gradient.show?`url(#start_grad_${O.value})`:L.value.startColor},{name:z.value.legend.labelEnd,color:L.value.gradient.show?`url(#end_grad_${O.value})`:L.value.endColor}]),Hn=f(()=>({cy:`donut-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:z.value.legend.bold?`bold`:``})),Q=f(()=>({head:X.value.map(e=>({name:e.name})),body:X.value.map(e=>({start:e.start,end:e.end}))})),$=f(()=>{let e=[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],t=Q.value.head.map((e,t)=>{let n=c({p:I.value.prefix,v:Q.value.body[t].start,s:I.value.suffix,r:P.value.table.td.roundingValue}),r=c({p:I.value.prefix,v:Q.value.body[t].end,s:I.value.suffix,r:P.value.table.td.roundingValue}),i=c({v:100*(Q.value.body[t].end/Q.value.body[t].start-1),s:`%`,r:P.value.table.td.roundingPercentage});return[{name:e.name},n,r,i]}),n={th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],head:e,body:t,config:n}});function Un(e=null){Be(()=>{let t=Q.value.head.map((e,t)=>[[e.name],[Q.value.body[t].start],[Q.value.body[t].end]]),n=[[z.value.title.text],[z.value.title.subtitle.text],[[P.value.table.columnNames.series],[P.value.table.columnNames.start],[P.value.table.columnNames.end]]].concat(t),r=re(n);e?e(r):fe({csvContent:r,title:z.value.title.text||`vue-ui-dumbbell`})})}let Wn=x(!1);function Gn(e){Wn.value=e,qt.value+=1}function Kn(){return W.value}function qn(){U.value.showTable=!U.value.showTable}let Jn=x(!1);function Yn(){Jn.value=!Jn.value}let Xn=te(k,()=>z.value.title.text),Zn=f(()=>G.value.ticks),Qn=f(()=>({start:0,end:Zn.value.length}));Oe({timeLabelsEls:sn,timeLabels:Zn,slicer:Qn,configRef:P,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:q,height:K,targetClass:`.vue-ui-dumbbell-scale-label`,rotation:I.value.xAxisLabels.autoRotate.angle});function $n({rowHeight:e,fontSize:t,showProgression:n}){if(!n)return!1;let r=e/3,i=e/1.3;return Math.abs(i-r)<t*1.2}let er=(()=>{let e=null,t=0;return n=>{n===N.value?(e=null,t=0):e===null||e!==n?(e=n,t=1):(t+=1,t>=1&&(N.value=n,e=null,t=0))}})(),tr=ge(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=$n({rowHeight:J.value.rowHeight,fontSize:I.value.yAxisLabels.fontSize,showProgression:I.value.yAxisLabels.showProgression});er(e)})})},100);function nr({datapoint:e,seriesIndex:t}){A.value=t,j.value=e,P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function rr({datapoint:e,seriesIndex:t}){A.value=null,j.value=null,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function ir({datapoint:e,seriesIndex:t}){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t}),Gt(`selectDatapoint`,{...e,seriesIndex:t})}let ar=f(()=>{if(j.value===null)return 0;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end);return e&&t?Math.min(j.value.startX,j.value.endX)+Math.abs(j.value.startX-j.value.endX)/2:e&&!t?j.value.startX:t&&!e?j.value.endX:null}),or=f(()=>{if(j.value===null)return``;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end),n=``,r=``;return e&&(n=l(I.value.formatter,j.value.start,c({p:I.value.prefix,v:j.value.start,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),t&&(r=l(I.value.formatter,j.value.end,c({p:I.value.prefix,v:j.value.end,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),e&&t?`${n} → ${r}`:e&&!t?n:t&&!e?r:``}),sr=f(()=>ee({config:P,style:z,mutableConfig:U,dialog:Ht,accordion:Lt,isFullscreen:Wn,parent:k,maxWidth:800,isCursorPointer:dn}));Ye(()=>U.value.showTable,e=>s(e,P,nn));function cr(){U.value.showTable=!1,rn.value&&rn.value.setTableIconState(!1)}let lr=f(()=>Vn.value.map(e=>({...e,shape:`circle`}))),ur=f(()=>z.value.backgroundColor),dr=f(()=>z.value.legend),fr=f(()=>z.value.title),{isCallbackImaging:pr,isCallbackSvg:mr,generateSvg:hr,onGenerateImage:gr}=Te({svg:B,title:fr,legend:dr,legendItems:lr,backgroundColor:ur,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Dn});async function _r(){Gt(`copyAlt`,{config:P.value,dataset:X.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:X.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function vr(e){let t=X.value.length;return t?(e%t+t)%t:null}function yr(){if(M.value!==null){let e=X.value[M.value];e&&rr({datapoint:e,seriesIndex:M.value})}M.value=null,A.value=null,j.value=null}function br(){M.value=null,ln.value=!0}function xr(){yr(),ln.value=!1}function Sr(e){if(!B.value||Jn.value||document.activeElement!==B.value||!X.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){yr();return}if(r){if(M.value===null)return;let e=X.value[M.value];if(!e)return;ir({datapoint:e,seriesIndex:M.value});return}let a=M.value;a=a===null?n?0:X.value.length-1:vr(a+(n?1:-1));let o=X.value[a];o&&(M.value=a,nr({datapoint:o,seriesIndex:a}))}let Cr=f(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,e[1],e[2],e[3]]),caption:P.value.a11y.translations.tableCaption,notice:P.value.a11y.translations.tableAvailable}));return Pe({getData:Kn,getImage:Xn,generatePdf:En,generateCsv:Un,generateImage:Dn,generateSvg:hr,toggleTable:qn,toggleAnnotator:Yn,toggleFullscreen:Gn,copyAlt:_r}),Ye(()=>[q.value,K.value,N.value,I.value,z.value,P.value.style.fontFamily,D.dataset,bn.value,on.value,sn.value,cn.value,an.value],Nn,{flush:`post`,deep:!0}),(e,s)=>(b(),h(`div`,{ref_key:`dumbbellChart`,ref:k,class:Ve(`vue-data-ui-component vue-ui-dumbbell ${Wn.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:y(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${z.value.backgroundColor};${P.value.responsive?`height:100%`:``}`),id:`dumbbell_${O.value}`,onMouseenter:s[1]||=()=>T(_n)(!0),onMouseleave:s[2]||=()=>T(_n)(!1)},[g(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[g(`p`,null,w(P.value.a11y.translations.keyboardNavigation),1)],8,$e),Cr.value.body.length?(b(),p(Ne,{key:0,uid:O.value,head:Cr.value.head,body:Cr.value.body,caption:Cr.value.caption,notice:Cr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),P.value.userOptions.buttons.annotator?(b(),p(T(zt),ze({key:1},T(a)(P.value.userOptions.annotator),{svgRef:T(B),backgroundColor:z.value.backgroundColor,color:z.value.color,active:Jn.value,isCursorPointer:dn.value,palette:P.value.userOptions.annotatorPalette,onClose:Yn}),Ie({_:2},[S(T(o),t=>({name:t,fn:E(n=>[C(e.$slots,t,He(Re(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),On.value?(b(),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),z.value.title.text?(b(),h(`div`,{key:3,ref_key:`chartTitle`,ref:Jt,style:`width:100%;background:transparent;padding-bottom:24px`},[(b(),p(Ae,{key:`title_${Qt.value}`,config:{title:{cy:`donut-div-title`,...z.value.title},subtitle:{cy:`donut-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),g(`div`,{id:`legend-top-${O.value}`},null,8,et),P.value.userOptions.show&&Kt.value&&(T(vn)||T(gn))?(b(),p(T(Bt),ze({ref_key:`userOptionsRef`,ref:rn,key:`user_option_${qt.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isPrinting:T(wn),isImaging:T(Tn),uid:O.value,isFullscreen:Wn.value,chartElement:k.value},T(n)(P.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Jn.value,tableDialog:P.value.table.useDialog,isCursorPointer:dn.value,onToggleFullscreen:Gn,onGeneratePdf:T(En),onGenerateCsv:Un,onGenerateImage:T(gr),onGenerateSvg:T(hr),onToggleTable:qn,onToggleAnnotator:Yn,onCopyAlt:_r,style:{visibility:T(vn)?T(gn)?`visible`:`hidden`:`visible`}}),Ie({_:2},[S(T(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,He(Re(T(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):m(``,!0),g(`div`,tt,[(b(),h(`svg`,{ref_key:`svgRef`,ref:B,xmlns:T(pe),class:Ve({"vue-data-ui-fullscreen--on":Wn.value,"vue-data-ui-fulscreen--off":!Wn.value}),viewBox:`0 0 ${q.value} ${J.value.absoluteHeight<=0?10:J.value.absoluteHeight}`,style:y(`max-width:100%; overflow: visible; background:transparent;color:${z.value.color};visibility:${T(jn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${O.value}`,tabindex:`0`,onFocus:br,onBlur:xr,onKeydown:Sr},[_(T(Vt)),C(e.$slots,`svg-underlayer`,{svg:{...J.value,isPrintingImg:T(wn)||T(Tn)||T(pr),isPrintingSvg:T(mr)}},void 0,!0),e.$slots[`chart-background`]?(b(),h(`foreignObject`,{key:0,x:J.value.left,y:J.value.top,width:Math.max(.1,J.value.width),height:Math.max(.1,J.value.height),style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,rt)):m(``,!0),un.value.show?(b(),h(`g`,it,[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`line`,{x1:J.value.left+t*J.value.width/(G.value.ticks.length-1),x2:J.value.left+t*J.value.width/(G.value.ticks.length-1),y1:J.value.top,y2:J.value.bottom,stroke:un.value.stroke,"stroke-width":un.value.strokeWidth,"stroke-dasharray":un.value.strokeDasharray},null,8,at))),256))])):m(``,!0),F.value.show?(b(),h(`g`,ot,[(b(!0),h(d,null,S(W.value,(e,t)=>(b(),h(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.top+t*J.value.rowHeight,y2:J.value.top+t*J.value.rowHeight,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,st))),256)),g(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.bottom,y2:J.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,ct)])):m(``,!0),I.value.axis.yLabel?(b(),h(`text`,{key:3,ref_key:`yAxisLabel`,ref:an,transform:`translate(${I.value.axis.fontSize}, ${J.value.absoluteHeight/2}), rotate(-90)`,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.yLabel),9,lt)):m(``,!0),I.value.yAxisLabels.show?(b(),h(`g`,{key:4,ref_key:`serieLabels`,ref:on},[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-name`,key:`serieLabel_${e.id}_${t}`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+(!I.value.yAxisLabels.showProgression||N.value?J.value.rowHeight/2:J.value.rowHeight/3)+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"font-weight":I.value.yAxisLabels.bold?`bold`:`normal`,"text-anchor":`end`,onMouseenter:n=>nr({datapoint:e,seriesIndex:t}),onMouseleave:n=>rr({datapoint:e,seriesIndex:t}),onClick:n=>ir({datapoint:e,seriesIndex:t})},w(e.name)+` `+w(N.value&&I.value.yAxisLabels.showProgression?[null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:`(${T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(c)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})})`:``),41,ut))),128)),I.value.yAxisLabels.showProgression&&!N.value?(b(!0),h(d,{key:0},S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-value`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+J.value.rowHeight/1.3+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"text-anchor":`end`,onMouseenter:n=>nr({datapoint:e,seriesIndex:t}),onMouseleave:n=>rr({datapoint:e,seriesIndex:t}),onClick:n=>ir({datapoint:e,seriesIndex:t})},w([null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(c)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})),41,dt))),256)):m(``,!0)],512)):m(``,!0),I.value.axis.xLabel?(b(),h(`text`,{key:5,ref_key:`xAxisLabel`,ref:cn,x:J.value.left+J.value.width/2,y:J.value.absoluteHeight-I.value.axis.fontSize/3,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.xLabel),9,ft)):m(``,!0),I.value.xAxisLabels.show?(b(),h(`g`,{key:6,ref_key:`scaleLabels`,ref:sn},[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-scale-label`,key:`tick_${t}`,transform:`translate(${J.value.left+t*(J.value.width/(G.value.ticks.length-1))}, ${J.value.bottom+I.value.xAxisLabels.fontSize+I.value.xAxisLabels.offsetY}), rotate(${I.value.xAxisLabels.rotation})`,"font-size":I.value.xAxisLabels.fontSize,fill:I.value.xAxisLabels.color,"font-weight":I.value.xAxisLabels.bold?`bold`:`normal`,"text-anchor":I.value.xAxisLabels.rotation>0?`start`:I.value.xAxisLabels.rotation<0?`end`:`middle`},w(T(l)(I.value.formatter,e,T(c)({p:I.value.prefix,v:e,s:I.value.suffix,r:I.value.xAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),9,pt))),128))],512)):m(``,!0),Xe(g(`g`,null,[Xe(g(`path`,{d:`M ${j.value?j.value.startX:J.value.left},${J.value.top} ${j.value?j.value.startX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.startColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(Mn)?`none`:`all 0.3s ease-in-out`})},null,12,mt),[[Je,j.value!==null&&![null,void 0].includes(j.value.start)]]),Xe(g(`path`,{d:`M ${j.value?j.value.endX:J.value.left},${J.value.top} ${j.value?j.value.endX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.endColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(Mn)?`none`:`all 0.3s ease-in-out`})},null,12,ht),[[Je,j.value!==null&&![null,void 0].includes(j.value.end)]]),Xe(g(`rect`,{x:j.value?Math.min(j.value.startX,j.value.endX):J.value.left,y:J.value.top,height:Math.max(.1,J.value.height),width:j.value?Math.max(.1,Math.abs(j.value.endX-j.value.startX)):0,fill:j.value?T(ae)(R.value.rectColor,R.value.rectOpacity):`transparent`,style:y({transition:T(Mn)?`none`:`all 0.3s ease-in-out`})},null,12,gt),[[Je,R.value.showRect&&j.value!==null&&![null,void 0].includes(j.value.start)&&![null,void 0].includes(j.value.end)]]),Xe(g(`text`,{transform:`translate(${ar.value==null?0:ar.value}, ${J.value.top-6})`,fill:R.value.labelColor,"font-size":R.value.labelFontSize,"text-anchor":`middle`,style:y({transition:T(Mn)?`none`:`all 0.3s ease-in-out`})},w(or.value),13,_t),[[Je,j.value!==null&&ar.value!==null&&R.value.showLabel]])],512),[[Je,R.value.show&&A.value!==null]]),g(`defs`,null,[_(u,{t:`radial`,id:`start_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(ie)(L.value.startColor,L.value.gradient.intensity/100),1],[`90%`,T(oe)(L.value.startColor,.1),1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`end_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(ie)(L.value.endColor,L.value.gradient.intensity/100),1],[`90%`,T(oe)(L.value.endColor,.1),1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`positive_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(ie)(L.value.evaluationColors.positive,L.value.gradient.intensity/100),1],[`90%`,T(oe)(L.value.evaluationColors.positive,.1),1],[`100%`,L.value.evaluationColors.positive,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`negative_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(ie)(L.value.evaluationColors.negative,L.value.gradient.intensity/100),1],[`90%`,T(oe)(L.value.evaluationColors.negative,.1),1],[`100%`,L.value.evaluationColors.negative,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`neutral_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(ie)(L.value.evaluationColors.neutral,L.value.gradient.intensity/100),1],[`90%`,T(oe)(L.value.evaluationColors.neutral,.1),1],[`100%`,L.value.evaluationColors.neutral,1]]},null,8,[`id`,`stops`])]),(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`plot_${t}_${e.id}`},[g(`defs`,null,[_(u,{t:`linear`,id:`grad_pos_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.startColor,1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`linear`,id:`grad_neg_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.endColor,1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`])]),![void 0,null].includes(e.end)&&![void 0,null].includes(e.start)?(b(),h(`g`,vt,[L.value.link.type===`curved`?(b(),h(`g`,yt,[g(`path`,{d:`M
2
+ ${e.startX},${e.y+Y.value/2}
3
+ C ${e.centerX},${e.y} ${e.centerX},${e.y}
4
+ ${e.endX},${e.y+Y.value/2}
5
+ L ${e.endX},${e.y-Y.value/2}
6
+ C ${e.centerX},${e.y} ${e.centerX},${e.y}
7
+ ${e.startX},${e.y-Y.value/2}
8
+ Z
9
+ `,fill:L.value.evaluationColors.enable?e.evaluationColor:e.endX>e.startX?`url(#grad_pos_${O.value})`:`url(#grad_neg_${O.value})`},null,8,bt)])):(b(),h(`g`,xt,[g(`rect`,{x:e.endX>e.startX?e.startX:e.endX,y:e.y-L.value.link.strokeWidth/2,height:Math.max(.01,L.value.link.strokeWidth),width:Math.max(.01,Math.abs(e.endX-e.startX)),fill:L.value.evaluationColors.enable?e.evaluationColor:e.endX>e.startX?`url(#grad_pos_${O.value})`:`url(#grad_neg_${O.value})`},null,8,St)]))])):m(``,!0),[null,void 0].includes(e.start)?m(``,!0):(b(),h(`circle`,{key:1,cx:e.startX,cy:e.y,r:Y.value,fill:L.value.gradient.show?L.value.evaluationColors.enable?e.evaluationGrad:`url(#start_grad_${O.value})`:L.value.evaluationColors.enable?e.evaluationColor:L.value.startColor,stroke:L.value.stroke,"stroke-width":L.value.strokeWidth},null,8,Ct)),[null,void 0].includes(e.end)?m(``,!0):(b(),h(`circle`,{key:2,cx:e.endX,cy:e.y,r:Y.value,fill:L.value.gradient.show?L.value.evaluationColors.enable?e.evaluationGrad:`url(#end_grad_${O.value})`:L.value.evaluationColors.enable?e.evaluationColor:L.value.endColor,stroke:L.value.stroke,"stroke-width":L.value.strokeWidth},null,8,wt))]))),128)),I.value.startLabels.show?(b(),h(`g`,Tt,[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`start_label_${t}_${e.id}`},[[null,void 0].includes(e.start)?m(``,!0):(b(),h(`text`,{key:0,x:e.startX,y:e.y+Y.value*2+I.value.startLabels.fontSize/2,fill:L.value.evaluationColors.enable&&I.value.startLabels.useEvaluationColor?e.evaluationColor:I.value.startLabels.useStartColor?L.value.startColor:I.value.startLabels.color,"font-size":I.value.startLabels.fontSize,"text-anchor":`middle`},w(T(l)(I.value.formatter,e.start,T(c)({p:I.value.prefix,v:e.start,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:e,seriesIndex:t})),9,Et))]))),128))])):m(``,!0),I.value.endLabels.show?(b(),h(`g`,Dt,[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`end_label_${t}_${e.id}`},[[null,void 0].includes(e.end)?m(``,!0):(b(),h(`text`,{key:0,x:e.endX,y:e.y-(Y.value*2-I.value.startLabels.fontSize/3),fill:L.value.evaluationColors.enable&&I.value.endLabels.useEvaluationColor?e.evaluationColor:I.value.endLabels.useEndColor?L.value.endColor:I.value.endLabels.color,"font-size":I.value.endLabels.fontSize,"text-anchor":`middle`},w(T(l)(I.value.formatter,e.end,T(c)({p:I.value.prefix,v:e.end,s:I.value.suffix,r:I.value.endLabels.rounding}),{datapoint:e,seriesIndex:t})),9,Ot))]))),128))])):m(``,!0),g(`g`,null,[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`rect`,{x:J.value.left,y:J.value.top+t*Math.max(.1,J.value.rowHeight),width:Math.max(.1,J.value.width),height:Math.max(.1,J.value.rowHeight),fill:A.value===null?`transparent`:A.value===t?T(ae)(z.value.highlighter.color,z.value.highlighter.opacity):`transparent`,onMouseenter:n=>nr({datapoint:e,seriesIndex:t}),onMouseleave:n=>rr({datapoint:e,seriesIndex:t}),onClick:n=>ir({datapoint:e,seriesIndex:t})},null,40,kt))),256))]),C(e.$slots,`svg`,{svg:{...J.value,isPrintingImg:T(wn)||T(Tn)||T(pr),isPrintingSvg:T(mr)}},void 0,!0)],46,nt)),e.$slots.hint?(b(),h(`div`,At,[C(e.$slots,`hint`,He(Re({hint:P.value.a11y.translations.keyboardNavigation,isVisible:ln.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(b(),h(`div`,jt,[C(e.$slots,`watermark`,He(Re({isPrinting:T(wn)||T(Tn)||T(pr)||T(mr)})),void 0,!0)])):m(``,!0),g(`div`,{id:`legend-bottom-${O.value}`},null,8,Mt),tn.value&&(z.value.legend.show||e.$slots.legend)?(b(),p(Fe,{key:6,to:z.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[g(`div`,{ref_key:`chartLegend`,ref:Yt},[C(e.$slots,`legend`,{legend:Vn.value},()=>[z.value.legend.show&&Kt.value?(b(),p(Me,{key:`legend_${en.value}`,legendSet:Vn.value,config:Hn.value,clickable:!1},{item:E(({legend:e})=>[g(`div`,{style:y(`display:flex;align-items:center;gap:4px;font-size:${z.value.legend.fontSize}px`)},[(b(),h(`svg`,{xmlns:T(pe),viewBox:`0 0 20 20`,height:z.value.legend.fontSize,width:z.value.legend.fontSize},[g(`circle`,{cx:10,cy:10,r:9,fill:e.color},null,8,Pt)],8,Nt)),T(pn)?m(``,!0):(b(),h(d,{key:0},[Le(w(e.name),1)],64))],4)]),_:1},8,[`legendSet`,`config`])):m(``,!0)],!0)],512)],8,[`to`])):m(``,!0),e.$slots.source?(b(),h(`div`,{key:7,ref_key:`source`,ref:Xt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),Kt.value&&P.value.userOptions.buttons.table?(b(),p(Ge(sr.value.component),ze({key:8},sr.value.props,{ref_key:`tableUnit`,ref:nn,onClose:cr}),Ie({content:E(()=>[(b(),p(T(Rt),{key:`table_${$t.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:P.value.table.useDialog?``:sr.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:dn.value,onClose:cr},{th:E(({th:e})=>[g(`div`,Ft,w(e),1)]),td:E(({td:e})=>[Le(w(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:E(()=>[Le(w(sr.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:E(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[0]||=e=>Un(P.value.userOptions.callbacks.csv),style:y({cursor:dn.value?`pointer`:`default`})},[_(T(It),{name:`fileCsv`,stroke:sr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),C(e.$slots,`skeleton`,{},()=>[T(pn)?(b(),p(Ce,{key:0})):m(``,!0)],!0)],46,Qe))}},[[`__scopeId`,`data-v-14c186af`]]);export{Ze as n,It as t};
@@ -0,0 +1,3 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as l}from"./chartImage-DPGnEuYM.js";import{$ as u,D as d,Dt as f,Ht as p,S as m,X as h,Zt as g,at as ee,b as _,i as v,in as y,n as te,nn as b,nt as x,r as S,t as ne,w as re,zt as ie}from"./lib-rPeBMZrn.js";import{c as ae}from"./canvas-lib-22VpOI4_.js";import{n as oe,t as se}from"./useHints-C-TwxM0Y.js";import{t as ce}from"./useConfig-_JwRfIqE.js";import{t as le}from"./usePrinter-DVf3YcG5.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{t as fe}from"./useChartExport-BZts4KFb.js";import{t as pe}from"./useNestedProp-DnGoh-XS.js";import{t as me}from"./useResponsive-CENUxfEL.js";import{t as he}from"./useThemeCheck-BKNRbGeC.js";import{t as ge}from"./useUserOptionState-CXlFnwPv.js";import{t as _e}from"./useChartAccessibility-DOMuYJfm.js";import{n as ve}from"./Title-BliHuXfT.js";import{t as ye}from"./vue_ui_flow-aeVlnSsc.js";import{t as be}from"./Legend-W9YVYVX-.js";import{t as xe}from"./A11yDataTable-DWNlWXzs.js";import{t as Se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Ce,Teleport as we,computed as C,createBlock as w,createCommentVNode as T,createElementBlock as E,createElementVNode as D,createSlots as Te,createTextVNode as Ee,createVNode as De,defineAsyncComponent as O,guardReactiveProps as k,mergeProps as Oe,nextTick as ke,normalizeClass as Ae,normalizeProps as A,normalizeStyle as j,onMounted as je,openBlock as M,ref as N,renderList as P,renderSlot as F,resolveDynamicComponent as Me,toDisplayString as I,toRefs as Ne,unref as L,watch as Pe,withCtx as R}from"vue";var Fe=/* @__PURE__ */ e({default:()=>nt}),Ie=[`id`],Le=[`id`],Re={key:2,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},ze=[`id`],Be={style:{position:`relative`}},Ve=[`xmlns`,`aria-describedby`,`viewBox`],He=[`width`,`height`],Ue=[`id`],We=[`stop-color`],Ge=[`stop-color`],Ke=[`d`,`fill`,`stroke`,`stroke-width`],qe=[`data-a11y-node-id`,`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`,`aria-label`,`onMouseenter`,`onMouseleave`,`onClick`],Je={key:1},Ye=[`x`,`y`,`font-size`,`fill`],Xe=[`x`,`y`,`font-size`,`fill`],Ze={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Qe={key:5,class:`vue-data-ui-watermark`},$e=[`id`],et=[`onClick`],tt={style:{display:`flex`,"align-items":`center`}},nt=/*#__PURE__*/ Se({__name:`vue-ui-flow`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:Se,emit:Fe}){let nt=O(()=>import(`./Tooltip-C1q0Qoh7.js`)),rt=O(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),it=O(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),at=O(()=>import(`./DataTable-KeuZB1JM.js`)),ot=O(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),st=O(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),ct=O(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),lt=O(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_flow:ut}=ce(),{isThemeValid:dt,warnInvalidTheme:ft}=he(),z=e,pt=Fe,B=N(h()),V=N(null),mt=N(0),ht=N(0),gt=N(!1),_t=N(``),vt=N(null),yt=N(null),bt=N(null),xt=N(null),St=N(null),Ct=N(!1),wt=N(null),Tt=N(null),Et=N(null),Dt=N(null),Ot=N(null),kt=N({x:0,y:0}),At=N(`pointer`),jt=N(!1),Mt=C(()=>!!z.dataset&&z.dataset.length);je(()=>{Ct.value=!0,Vt()});let H=N(!1);function Nt(e){H.value=e,mt.value+=1}let U=N(Gt()),W=C(()=>U.value.style.chart.nodes.labels),G=C(()=>U.value.style.chart.nodes),Pt=C(()=>U.value.style.chart.links),K=C(()=>U.value.style.chart);oe({config:()=>U.value,dataset:()=>z.dataset,component:`VueUiFlow`,rules:[se.emptyArray,se.noHint]});let Ft=C(()=>U.value.userOptions.useCursorPointer),It=C(()=>y({defaultConfig:{userOptions:{show:!1},nodeCategories:{B:`A`,C:`B`},nodeCategoryColors:{A:`#CACACA`,B:`#AAAAAA`},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{backgroundColor:`transparent`},nodes:{labels:{show:!1},stroke:`#666666`},links:{stroke:`#666666`}}}},userConfig:U.value.skeletonConfig??{}})),{loading:Lt,FINAL_DATASET:Rt,manualLoading:zt}=ue({...Ne(z),FINAL_CONFIG:U,prepareConfig:Gt,skeletonDataset:z.config?.skeletonDataset??[[`A`,`B`,2,`#CACACA`],[`B`,`C`,1,`#CACACA`],[`C`,`D`,.5,`#CACACA`],[`E`,`F`,1,`#AAAAAA`],[`F`,`G`,.5,`#AAAAAA`],[`G`,`H`,.25,`#AAAAAA`]],skeletonConfig:y({defaultConfig:U.value,userConfig:It.value})}),Bt=C(()=>U.value.debug);function Vt(){if(ie(z.dataset)&&(ee({componentName:`VueUiFlow`,type:`dataset`,debug:Bt.value}),zt.value=!0),ie(z.dataset)||(zt.value=U.value.loading),U.value.responsive){let e=ae(()=>{let{width:e,height:t}=me({chart:V.value,title:K.value.title.text?yt.value:null,legend:K.value.legend.show?vt.value:null,source:bt.value});requestAnimationFrame(()=>{Kt.value=e,qt.value=t})});xt.value&&(St.value&&xt.value.unobserve(St.value),xt.value.disconnect()),xt.value=new ResizeObserver(e),St.value=V.value.parentNode,xt.value.observe(St.value)}}let{userOptionsVisible:Ht,setUserOptionsVisibility:Ut,keepUserOptionState:Wt}=ge({config:U.value}),{svgRef:q}=_e({config:K.value.title});function Gt(){let e=pe({userConfig:z.config,defaultConfig:ut}),t=e,n=e.theme;if(n){if(!dt.value(e))ft(e),t=e;else{let r=pe({userConfig:ye[n]||z.config,defaultConfig:e});t={...pe({userConfig:z.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:b[n]||p}}}else t=e;return t.nodeCategories=z.config.nodeCategories||{},t.nodeCategoryColors=z.config.nodeCategoryColors||{},t}let Kt=N(K.value.width),qt=N(K.value.height),Jt=g(z.config);Pe(()=>z.config,(e,t)=>{let n=g(e),r=n!==Jt;Jt=n;let i=Gt();r?(Lt.value||(U.value=i),Ht.value=!U.value.userOptions.showOnChartHover,Vt(),ht.value+=1,J.value.showTable=U.value.table.show):(U.value.style.chart.tooltip=i.style.chart.tooltip,J.value.showTooltip=U.value.style.chart.tooltip.show)},{deep:!0}),Pe(()=>z.dataset,e=>{Array.isArray(e)&&e.length>0&&(zt.value=!1)},{deep:!0});let{isPrinting:Yt,isImaging:Xt,generatePdf:Zt,generateImage:Qt}=le({elementId:`flow_${B.value}`,fileName:K.value.title.text||`vue-ui-flow`,options:U.value.userOptions.print}),$t=C(()=>U.value.userOptions.show&&!K.value.title.text),en=C(()=>re(U.value.customPalette)),tn=C(()=>G.value.width),J=N({showTable:U.value.table.show,showTooltip:K.value.tooltip.show});Pe(U,()=>{J.value={showTable:U.value.table.show,showTooltip:K.value.tooltip.show}},{immediate:!0});let nn=C(()=>!Rt.value||!Rt.value.length?[]:Rt.value.map((e,t)=>[e[0],e[1],_(e[2]),e[3]?m(e[3]):en.value[t]||en.value[t%en.value.length]||p[t]||p[t%p.length]]));function rn(e){let t={},n={};function r(e,r){t[e]||(t[e]={level:null,inflow:0,outflow:0,children:[],color:null,uid:h()}),t[e].level===null&&(t[e].level=r),n[r]||(n[r]=[]),n[r].includes(e)||n[r].push(e)}e.forEach(([e,n,i])=>{let a=t[e]?.level??0,o=a+1;r(e,a),r(n,o),t[e].children.push({target:n,value:i}),t[e].outflow+=i,t[n].inflow+=i});let i=new Set(e.map(([e])=>e)),a=new Set(e.map(([,e])=>e)),o=Array.from(i).filter(e=>!a.has(e)),s={};o.forEach((e,t)=>{s[e]=en.value[t]||p[t%p.length]});let c={};e.forEach(([e,t,n,r])=>{r&&(c[e]=r,c[t]=r)}),Object.keys(t).forEach((e,n)=>{let r=U.value.nodeCategories?.[e],i=r?U.value.nodeCategoryColors?.[r]:null;t[e].color=c[e]||i||(o.includes(e)?s[e]:null)||p[n%p.length]}),Object.keys(t).forEach(e=>{t[e].value=Math.max(t[e].inflow,t[e].outflow)});let l=sn.value,u=cn.value.width,d=cn.value.height,f=Object.keys(n).map(Number).sort((e,t)=>e-t),m=f.length||1,g=m>1?u/(m-1):0,ee=Number(tn.value),v=Number(G.value.gapPx??G.value.gap??8),y=Number(G.value.minHeight||0);function te(e){let r=n[e],i=r.length;if(!i)return 1/0;let a=Math.max(0,(i-1)*v),o=Math.max(0,d-a),s=Math.min(y,i?o/i:0),c=0,l=r.map(e=>t[e].value||0),u=l.reduce((e,t)=>e+t,0);for(let e=0;e<12;e+=1){let e=u>0?(o-c)/u:0,t=[];for(let n=0;n<l.length;n+=1){let r=l[n];r<0||r*e<s&&t.push(n)}if(!t.length)return Math.max(0,e);for(let e of t)c+=s,u-=l[e],l[e]=-1;if(u<=0)return 0}return u>0?Math.max(0,(o-c)/u):0}let b=f.map(te),x=b.length?Math.min(...b):0,S={};f.forEach(e=>{let r=n[e],i=r.length,a=Math.max(0,(i-1)*v),o=Math.max(0,d-a),s=Math.min(y,i?o/i:0),c=r.map(e=>Math.max(s,(t[e].value||0)*x)),u=c.reduce((e,t)=>e+t,0)+a,f=Math.max(0,(d-u)/2);r.forEach((n,r)=>{let a=c[r],o=l.left+e*g,s=f;S[n]={x:o,y:s,absoluteY:s,height:a,i:r,color:t[n].color,value:t[n].value,id:h()},f+=a,r<i-1&&(f+=v)})});let ne=[],re=l.top,ie={},ae={};Object.keys(t).forEach(e=>{ie[e]=S[e]?.y??0,ae[e]=0});let oe=!!Pt.value.smooth,se=.5;return f.forEach(e=>{n[e].forEach(e=>{let n=t[e],r=S[e];if(!n.children||!n.children.length)return;let i=r.y;n.children.forEach(({target:a,value:o})=>{let s=S[a],c=t[a],l=n.outflow>0?o/n.outflow:0,u=c.inflow>0?o/c.inflow:0,d=_(i+re),f=_(i+l*r.height+re),p=ie[a],m=p+u*s.height;ae[a]+=o;let g=c.inflow>0&&ae[a]>=c.inflow-1e-6,v=s.y+s.height;(g||m>v-.25)&&(m=v);let y=_(p+re),te=_(m+re),b=_(r.x+ee),x=_(s.x),ce;if(!oe||x<=b)ce=`M ${b} ${d} L ${b} ${f} L ${x} ${te} L ${x} ${y} Z`;else{let e=x-b,t=_(b+e*se),n=_(x-e*se),r=d,i=y,a=f,o=te;ce=`M ${b} ${r} C ${t} ${r}, ${n} ${i}, ${x} ${i} L ${x} ${o} C ${n} ${o}, ${t} ${a}, ${b} ${a} Z`}ne.push({id:h(),source:e,target:a,path:ce,value:o,sourceColor:n.color,targetColor:t[a].color}),i=f-re,ie[a]=m})})}),{nodeCoordinates:S,links:ne}}let Y=C(()=>{let e=rn(Rt.value);return{nodes:Object.keys(e.nodeCoordinates).map((t,n)=>({...e.nodeCoordinates[t],name:t})),links:e.links}}),an=C(()=>Kt.value),on=C(()=>qt.value),sn=C(()=>K.value.padding),cn=C(()=>({width:Math.max(0,an.value-40-sn.value.right-sn.value.left),height:Math.max(0,on.value-sn.value.top-sn.value.bottom)})),ln=C(()=>({width:an.value,height:on.value}));function un(e){let t={},n={},r=/* @__PURE__ */ new Set;return nn.value.forEach(([e,r,i])=>{t[e]||(t[e]=[]),n[r]||(n[r]=[]),t[e].push(r),n[r].push(e)}),t[e]&&t[e].forEach(e=>r.add(e)),n[e]&&n[e].forEach(e=>r.add(e)),Array.from(r).concat(e)}let X=N(null),Z=N(null),dn=N(null),fn=N(!1),pn=N(null);function mn(){pn.value=null,X.value=null,Z.value=null,gt.value=!1,Dt.value=null,Ot.value=null}function hn(e){if(!q.value||!e)return;let t=q.value.querySelector(`[data-a11y-node-id="${e}"]`);if(!t)return;let n=t.getBoundingClientRect();kt.value={x:n.left+n.width/2,y:n.top+n.height/2}}function gn(e,t,n=`pointer`,r=null){$.value=[],X.value=un(e.name),Z.value=e.name,pn.value=e.id,At.value=n,Dt.value=r,Ot.value=e.id;let i=e.name,a=nn.value,o=0,s=0,c=[],l=[],d=new Set(a.map(([e])=>e)),p=new Set(a.map(([,e])=>e)),m=Array.from(d).filter(e=>!p.has(e)),h=a.filter(([e])=>m.includes(e)).reduce((e,[t,n,r])=>e+r,0),g={};Y.value.nodes.forEach(e=>{g[e.name]=e.color}),a.forEach(([e,t,n])=>{t===i&&(o+=n,c.push({source:e,value:n,color:g[e]})),e===i&&(s+=n,l.push({target:t,value:n,color:g[t]}))});let ee=h>0?Math.max(o,s)/h*100:0,_={name:i,inflow:o,outflow:s,from:c,to:l,percentOfTotal:ee,color:g[i]||`#000000`};U.value.events.datapointEnter&&U.value.events.datapointEnter({datapoint:_,seriesIndex:t}),dn.value={datapoint:_,config:U.value,seriesIndex:t,series:Y.value},gt.value=!0;let y=``,te=K.value.tooltip.customFormat;if(fn.value=!1,f(te))try{let e=te({datapoint:_,series:Y.value,config:U.value});typeof e==`string`&&(_t.value=e,fn.value=!0)}catch{console.warn(`Custom format cannot be applied.`)}if(!fn.value){let e=K.value.tooltip.showPercentage?`<div>${u({p:K.value.tooltip.translations.percentOfTotal,v:_.percentOfTotal,s:`%`,r:K.value.tooltip.roundingPercentage})}</div>`:``;y+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${K.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${_.color}">⏹</span>${_.name}${e}</div>`,_.from.length&&(y+=`<div>${K.value.tooltip.translations.from}</div>`,_.from.forEach(e=>{y+=`<div><span style="color:${e.color}">⏹←</span> ${e.source}: ${v(W.value.formatter,e.value,u({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding}))}</div>`})),_.to.length&&(y+=`<div style="margin-top:6px;">${K.value.tooltip.translations.to}</div>`,_.to.forEach(e=>{y+=`<div><span style="color:${e.color}">⏹→</span> ${e.target}: ${v(W.value.formatter,e.value,u({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding}))}</div>`})),_t.value=y}n===`keyboard`&&ke(()=>{hn(e.id)})}function _n(e){let t=dn.value;U.value.events.datapointLeave&&U.value.events.datapointLeave({datapoint:t,seriesIndex:e}),At.value===`keyboard`&&Ot.value||(pn.value=null,X.value=null,Z.value=null,gt.value=!1)}function vn(e){let t=dn.value;U.value.events.datapointClick&&U.value.events.datapointClick({datapoint:t,seriesIndex:e})}let yn=C(()=>Y.value.links.map(({source:e,target:t,sourceColor:n,targetColor:r,value:i})=>({source:e,target:t,sourceColor:n,targetColor:r,value:i})));function bn(e=null){ke(()=>{let t=yn.value.map((e,t)=>[[e.source],[e.target],[e.value]]),n=[[K.value.title.text],[K.value.title.subtitle.text],[[U.value.table.columnNames.source],[U.value.table.columnNames.target],[U.value.table.columnNames.value]]].concat(t),r=d(n);e?e(r):x({csvContent:r,title:K.value.title.text||`vue-ui-flow`})})}let xn=C(()=>{let e=[U.value.table.columnNames.source,U.value.table.columnNames.target,U.value.table.columnNames.value],t=yn.value.map((e,t)=>[{color:e.sourceColor,name:e.source,shape:`square`},{color:e.targetColor,name:e.target,shape:`square`},u({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding})]),n={th:{backgroundColor:U.value.table.th.backgroundColor,color:U.value.table.th.color,outline:U.value.table.th.outline},td:{backgroundColor:U.value.table.td.backgroundColor,color:U.value.table.td.color,outline:U.value.table.td.outline},breakpoint:U.value.table.responsiveBreakpoint};return{colNames:[U.value.table.columnNames.source,U.value.table.columnNames.target,U.value.table.columnNames.value],head:e,body:t,config:n}}),Sn=C(()=>({headers:xn.value?.colNames??[],rows:xn.value?.body??[]})),Cn=C(()=>[...Y.value.nodes].map((e,t)=>({...e,index:t,centerX:e.x+tn.value/2,centerY:_(e.absoluteY)+K.value.padding.top+e.height/2})).sort((e,t)=>e.x===t.x?e.absoluteY-t.absoluteY:e.x-t.x)),Q=C(()=>{let e=[];return Cn.value.forEach(t=>{let n=e.find(e=>Math.abs(e.x-t.x)<=1);n?n.nodes.push(t):e.push({x:t.x,nodes:[t]})}),e.forEach(e=>{e.nodes.sort((e,t)=>e.absoluteY-t.absoluteY)}),e.sort((e,t)=>e.x-t.x)}),wn=C(()=>{let e=/* @__PURE__ */ new Map;return Cn.value.forEach((t,n)=>{e.set(t.id,n)}),e});function Tn(){return Y.value}function En(){J.value.showTable=!J.value.showTable}let Dn=N(!1);function On(){Dn.value=!Dn.value}function kn(){J.value.showTooltip=!J.value.showTooltip}let An=C(()=>{let e=new Set(Y.value.nodes.map(e=>U.value.nodeCategories[e.name]||`__uncategorized__`));return Array.from(e).map(e=>({name:e,color:U.value.nodeCategoryColors[e]||p[0],shape:`square`,count:Y.value.nodes.filter(t=>(U.value.nodeCategories[t.name]||`__uncategorized__`)===e).length})).map((e,t)=>{let n=$.value.includes(t);return{...e,segregate:()=>Mn({legend:e,i:t}),isSegregated:n,opacity:$.value.length?n?1:.5:1,display:`${e.name} (${e.count})`}})}),jn=C(()=>An.value.filter(e=>e.name!==`__uncategorized__`)),$=N([]);function Mn({legend:e,i:t}){let n=e.name;X.value?.every(e=>U.value.nodeCategories[e]===n)?(X.value=null,Z.value=null,$.value=[]):($.value=[t],X.value=Y.value.nodes.filter(e=>U.value.nodeCategories[e.name]===n).map(e=>e.name),Z.value=null)}let Nn=C(()=>({cy:`flow-legend`,backgroundColor:K.value.legend.backgroundColor,color:K.value.legend.color,fontSize:K.value.legend.fontSize,paddingBottom:K.value.legend.paddingBottom,fontWeight:K.value.legend.bold?`bold`:`normal`})),Pn=l(V,()=>K.value.title.text),Fn=C(()=>c({config:U,style:K,mutableConfig:J,dialog:lt,accordion:it,isFullscreen:H,parent:V,maxWidth:800,isCursorPointer:Ft}));Pe(()=>J.value.showTable,e=>s(e,U,wt));function In(){J.value.showTable=!1,Tt.value&&Tt.value.setTableIconState(!1)}let Ln=C(()=>jn.value.map(e=>({...e,name:e.display}))),Rn=C(()=>K.value.backgroundColor),zn=C(()=>K.value.legend),Bn=C(()=>K.value.title),{isCallbackImaging:Vn,isCallbackSvg:Hn,generateSvg:Un,onGenerateImage:Wn}=fe({svg:q,title:Bn,legend:zn,legendItems:Ln,backgroundColor:Rn,getSvgCallback:()=>U.value.userOptions.callbacks.svg,generateImage:Qt});async function Gn(){pt(`copyAlt`,{config:U.value,dataset:Y.value}),U.value.userOptions.callbacks.altCopy?await Promise.resolve(U.value.userOptions.callbacks.altCopy({config:U.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Kn(e){return Q.value.findIndex(t=>t.nodes.some(t=>t.id===e))}function qn(e,t){let n=Q.value[e];return n?n.nodes.findIndex(e=>e.id===t):-1}function Jn(e,t){let n=Q.value[e];if(!n||!n.nodes.length)return null;let r=n.nodes[0],i=Math.abs(r.centerY-t);for(let e=1;e<n.nodes.length;e+=1){let a=n.nodes[e],o=Math.abs(a.centerY-t);o<i&&(r=a,i=o)}return r}function Yn(){Dt.value=null,Ot.value=null,jt.value=!0}function Xn(){mn(),jt.value=!1}function Zn(e){if(!q.value||Dn.value||document.activeElement!==q.value||!Cn.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){mn();return}if(a){if(Dt.value===null)return;vn(Dt.value);return}if(Ot.value===null){let e=Q.value[0]?.nodes?.[0];if(!e)return;let t=wn.value.get(e.id)??0;gn(e,t,`keyboard`,t);return}let s=wn.value.get(Ot.value);if(s===void 0)return;let c=Cn.value[s];if(!c)return;let l=Kn(c.id);if(l<0)return;let u=null;if(r||i){let e=qn(l,c.id);if(e<0)return;let t=Q.value[l];if(!t?.nodes?.length)return;let n=e+(i?1:-1);n<0&&(n=t.nodes.length-1),n>=t.nodes.length&&(n=0),u=t.nodes[n]}if(t||n){let e=l+(n?1:-1);e<0&&(e=Q.value.length-1),e>=Q.value.length&&(e=0),u=Jn(e,c.centerY)}if(!u)return;let d=wn.value.get(u.id);d!==void 0&&gn(u,d,`keyboard`,d)}return Se({getData:Tn,getImage:Pn,generateCsv:bn,generateImage:Qt,generateSvg:Un,generatePdf:Zt,toggleTable:En,toggleAnnotator:On,toggleTooltip:kn,drillCategory:Mn,unselectNode:_n,toggleFullscreen:Nt,copyAlt:Gn}),(e,s)=>(M(),E(`div`,{ref_key:`flowChart`,ref:V,class:Ae(`vue-data-ui-component vue-ui-flow ${H.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:j(`font-family:${U.value.style.fontFamily};width:100%; text-align:center;background:${K.value.backgroundColor}`),id:`flow_${B.value}`,onMouseenter:s[2]||=()=>L(Ut)(!0),onMouseleave:s[3]||=()=>{L(Ut)(!1),jt.value||mn()}},[D(`div`,{id:`chart-instructions-${B.value}`,class:`sr-only`},[D(`p`,null,I(U.value.a11y.translations.keyboardNavigation),1)],8,Le),Sn.value?.rows?.length?(M(),w(xe,{key:0,uid:B.value,head:Sn.value.headers,body:Sn.value.rows,notice:U.value.a11y.translations.tableAvailable,caption:U.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):T(``,!0),U.value.userOptions.buttons.annotator?(M(),w(L(ot),Oe({key:1},L(a)(U.value.userOptions.annotator),{svgRef:L(q),backgroundColor:K.value.backgroundColor,color:K.value.color,active:Dn.value,palette:U.value.userOptions.annotatorPalette,isCursorPointer:Ft.value,onClose:On}),Te({_:2},[P(L(o),t=>({name:t,fn:R(n=>[F(e.$slots,t,A(k(L(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`palette`,`isCursorPointer`])):T(``,!0),$t.value?(M(),E(`div`,Re,null,512)):T(``,!0),K.value.title.text?(M(),E(`div`,{key:3,ref_key:`chartTitle`,ref:yt,style:`width:100%;background:transparent;padding-bottom:24px`},[(M(),w(ve,{key:`title_${ht.value}`,config:{title:{cy:`flow-title`,...K.value.title},subtitle:{cy:`flow-subtitle`,...K.value.title.subtitle}}},null,8,[`config`]))],512)):T(``,!0),D(`div`,{id:`legend-top-${B.value}`},null,8,ze),U.value.userOptions.show&&Mt.value&&(L(Wt)||L(Ht))?(M(),w(L(st),Oe({ref_key:`userOptionsRef`,ref:Tt,key:`user_option_${mt.value}`,backgroundColor:K.value.backgroundColor,color:K.value.color,isPrinting:L(Yt),isImaging:L(Xt),uid:B.value,isFullscreen:H.value,chartElement:V.value},L(n)(U.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Dn.value,hasTooltip:K.value.tooltip.show&&U.value.userOptions.buttons.tooltip,isTooltip:J.value.showTooltip,tableDialog:U.value.table.useDialog,isCursorPointer:Ft.value,onToggleTooltip:kn,onToggleFullscreen:Nt,onGeneratePdf:L(Zt),onGenerateCsv:bn,onGenerateImage:L(Wn),onGenerateSvg:L(Un),onToggleTable:En,onToggleAnnotator:On,onCopyAlt:Gn,style:{visibility:L(Wt)?L(Ht)?`visible`:`hidden`:`visible`}}),Te({_:2},[P(L(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:R(n=>[F(e.$slots,t,A(k(L(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`hasTooltip`,`isTooltip`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):T(``,!0),D(`div`,Be,[(M(),E(`svg`,{ref_key:`svgRef`,ref:q,xmlns:L(ne),"aria-describedby":`chart-instructions-${B.value}`,viewBox:`0 0 ${ln.value.width} ${ln.value.height}`,class:Ae({"vue-data-ui-fullscreen--on":H.value,"vue-data-ui-fulscreen--off":!H.value}),style:j({maxWidth:`100%`,overflow:`visible`,background:`transparent`,color:K.value.color}),tabindex:`0`,onFocus:Yn,onBlur:Xn,onKeydown:Zn},[De(L(ct)),F(e.$slots,`svg-underlayer`,{svg:{...ln.value,isPrintingImg:L(Yt)||L(Xt)||L(Vn),isPrintingSvg:L(Hn)}},void 0,!0),e.$slots[`chart-background`]?(M(),E(`foreignObject`,{key:0,x:0,y:0,width:ln.value.width,height:ln.value.height,style:{pointerEvents:`none`}},[F(e.$slots,`chart-background`,{},void 0,!0)],8,He)):T(``,!0),D(`defs`,null,[(M(!0),E(Ce,null,P(Y.value.links,(e,t)=>(M(),E(`linearGradient`,{id:e.id,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`},[D(`stop`,{offset:`0%`,"stop-color":e.sourceColor},null,8,We),D(`stop`,{offset:`100%`,"stop-color":e.targetColor},null,8,Ge)],8,Ue))),256))]),(M(!0),E(Ce,null,P(Y.value.links,e=>(M(),E(`path`,{class:`vue-ui-flow-link`,d:e.path,"stroke-linejoin":`round`,"stroke-miterlimit":`1`,fill:`url(#${e.id})`,stroke:Pt.value.stroke,"stroke-width":Pt.value.strokeWidth,style:j(`
2
+ opacity:${X.value?X.value.includes(e.source)&&X.value.includes(e.target)?1:.3:Z.value?[e.target,e.source].includes(Z.value)?1:.3:Pt.value.opacity}
3
+ `)},null,12,Ke))),256)),(M(!0),E(Ce,null,P(Y.value.nodes,(e,t)=>(M(),E(`rect`,{"data-a11y-node-id":e.id,class:`vue-ui-flow-node`,x:e.x,y:L(_)(e.absoluteY)+K.value.padding.top,height:L(_)(e.height),width:tn.value,fill:e.color,stroke:G.value.stroke,"stroke-width":G.value.strokeWidth,rx:G.value.borderRadius,style:j({opacity:X.value?X.value.includes(e.name)?1:.3:1,outline:pn.value!==null&&pn.value===e.id?`2px solid currentColor`:void 0}),"aria-label":`${e.name}: ${L(v)(W.value.formatter,e.value,L(u)({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding}))}`,onMouseenter:n=>gn(e,t,`pointer`,wn.value.get(e.id)),onMouseleave:e=>_n(t),onClick:e=>vn(t)},null,44,qe))),256)),W.value.show?(M(),E(`g`,Je,[(M(!0),E(Ce,null,P(Y.value.nodes,(e,t)=>(M(),E(`text`,{x:e.x+tn.value/2,y:(W.value.showValue?L(_)(e.absoluteY+e.height/2-W.value.fontSize/4):e.absoluteY+e.height/2+W.value.fontSize/3)+K.value.padding.top,"font-size":W.value.fontSize,fill:L(S)(e.color),"text-anchor":`middle`,style:j(`pointer-events: none; opacity:${X.value?+!!X.value.includes(e.name):1}`)},I(W.value.abbreviation.use?L(te)({source:e.name,length:G.value.labels.abbreviation.length}):e.name),13,Ye))),256)),W.value.showValue?(M(!0),E(Ce,{key:0},P(Y.value.nodes,(e,t)=>(M(),E(`text`,{x:e.x+tn.value/2,y:L(_)(e.absoluteY+e.height/2+W.value.fontSize/1.3)+K.value.padding.top,"font-size":W.value.fontSize,fill:L(S)(e.color),"text-anchor":`middle`,style:j(`pointer-events: none; opacity:${X.value?+!!X.value.includes(e.name):1}`)},I(L(v)(W.value.formatter,e.value,L(u)({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding}),{datapoint:e,seriesIndex:t})),13,Xe))),256)):T(``,!0)])):T(``,!0),F(e.$slots,`svg`,{svg:{...ln.value,isPrintingImg:L(Yt)||L(Xt)||L(Vn),isPrintingSvg:L(Hn)}},void 0,!0)],46,Ve)),e.$slots.hint?(M(),E(`div`,Ze,[F(e.$slots,`hint`,A(k({hint:U.value.a11y.translations.keyboardNavigation,isVisible:jt.value})),void 0,!0)])):T(``,!0)]),e.$slots.watermark?(M(),E(`div`,Qe,[F(e.$slots,`watermark`,A(k({isPrinting:L(Yt)||L(Xt)||L(Vn)||L(Hn)})),void 0,!0)])):T(``,!0),D(`div`,{id:`legend-bottom-${B.value}`},null,8,$e),Ct.value&&(K.value.legend.show||e.$slots.legend)?(M(),w(we,{key:6,to:K.value.legend.position===`top`?`#legend-top-${B.value}`:`#legend-bottom-${B.value}`},[D(`div`,{ref_key:`chartLegend`,ref:vt},[F(e.$slots,`legend`,{legend:An.value},()=>[K.value.legend.show&&jn.value.length?(M(),w(be,{key:0,legendSet:jn.value,config:Nn.value,isCursorPointer:Ft.value,onClickMarker:s[0]||=e=>Mn(e)},{item:R(({legend:e,index:t})=>[L(Lt)?T(``,!0):(M(),E(`div`,{key:0,onClick:t=>e.segregate(),style:j(`opacity:${$.value.length?$.value.includes(t)?1:.5:1}`)},I(e.display),13,et))]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):T(``,!0)],!0)],512)],8,[`to`])):T(``,!0),e.$slots.source?(M(),E(`div`,{key:7,ref_key:`source`,ref:bt,dir:`auto`},[F(e.$slots,`source`,{},void 0,!0)],512)):T(``,!0),De(L(nt),{ref_key:`tooltip`,ref:Et,teleportTo:K.value.tooltip.teleportTo,show:J.value.showTooltip&&gt.value,backgroundColor:K.value.tooltip.backgroundColor,color:K.value.tooltip.color,fontSize:K.value.tooltip.fontSize,borderRadius:K.value.tooltip.borderRadius,borderColor:K.value.tooltip.borderColor,borderWidth:K.value.tooltip.borderWidth,backgroundOpacity:K.value.tooltip.backgroundOpacity,position:K.value.tooltip.position,offsetX:K.value.tooltip.offsetX,offsetY:K.value.tooltip.offsetY,parent:V.value,content:_t.value,isCustom:fn.value,isFullscreen:H.value,smooth:K.value.tooltip.smooth,backdropFilter:K.value.tooltip.backdropFilter,smoothForce:K.value.tooltip.smoothForce,smoothSnapThreshold:K.value.tooltip.smoothSnapThreshold,isA11yMode:At.value===`keyboard`,a11yPosition:kt.value},{"tooltip-before":R(()=>[F(e.$slots,`tooltip-before`,A(k({...dn.value})),void 0,!0)]),tooltip:R(()=>[F(e.$slots,`tooltip`,A(k({...dn.value})),void 0,!0)]),"tooltip-after":R(()=>[F(e.$slots,`tooltip-after`,A(k({...dn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Mt.value&&U.value.userOptions.buttons.table?(M(),w(Me(Fn.value.component),Oe({key:8},Fn.value.props,{ref_key:`tableUnit`,ref:wt,onClose:In}),Te({content:R(()=>[De(L(at),{colNames:xn.value.colNames,head:xn.value.head,body:xn.value.body,config:xn.value.config,title:U.value.table.useDialog?``:Fn.value.title,withCloseButton:!U.value.table.useDialog,isCursorPointer:Ft.value,onClose:In},{th:R(({th:e})=>[D(`div`,tt,I(e),1)]),td:R(({td:e})=>[Ee(I(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[U.value.table.useDialog?{name:`title`,fn:R(()=>[Ee(I(Fn.value.title),1)]),key:`0`}:void 0,U.value.table.useDialog?{name:`actions`,fn:R(()=>[D(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>bn(U.value.userOptions.callbacks.csv),style:j({cursor:Ft.value?`pointer`:`default`})},[De(L(rt),{name:`fileCsv`,stroke:Fn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):T(``,!0),F(e.$slots,`skeleton`,{},()=>[L(Lt)?(M(),w(de,{key:0})):T(``,!0)],!0)],46,Ie))}},[[`__scopeId`,`data-v-8dbb78b1`]]);export{Fe as n,nt as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as ee,t as te}from"./annotationSlots-OLiW25XN.js";import{n as a,t as ne}from"./tableIntegration-CNoJ1CIY.js";import{t as re}from"./chartImage-DPGnEuYM.js";import{t as ie}from"./resolveChartConfig-0IvbmIE_.js";import{$ as o,D as ae,Ft as oe,S as se,X as ce,at as le,i as s,nt as ue,r as de,rn as fe,t as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{c as ge}from"./canvas-lib-22VpOI4_.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./useConfig-_JwRfIqE.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{t as xe}from"./useResponsive-CENUxfEL.js";import{t as Se}from"./useChartExport-BZts4KFb.js";import{t as Ce}from"./useUserOptionState-CXlFnwPv.js";import{t as we}from"./useChartAccessibility-DOMuYJfm.js";import{t as Te}from"./usePrefersMotion-XLHwega2.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./vue_ui_funnel-CWrEr790.js";import{t as Oe}from"./DefGrad-DKMq1REY.js";import{t as ke}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as c,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as m,createTextVNode as Ae,createVNode as h,defineAsyncComponent as g,guardReactiveProps as je,mergeProps as _,nextTick as Me,normalizeClass as v,normalizeProps as Ne,normalizeStyle as y,onBeforeUnmount as Pe,onMounted as Fe,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Ie,shallowRef as Le,toDisplayString as w,unref as T,useCssVars as Re,watch as ze,withCtx as E}from"vue";var Be=/* @__PURE__ */ e({default:()=>$e}),Ve=[`id`],He=[`xmlns`,`viewBox`],Ue=[`width`,`height`],We=[`stroke`,`stroke-width`],Ge=[`stroke`,`stroke-width`],Ke=[`x`,`y`,`font-size`,`fill`,`font-weight`],qe=[`points`,`fill`],Je=[`stroke`,`stroke-width`,`rx`],Ye=[`x`,`y`,`font-size`,`fill`,`font-weight`],Xe=[`x`,`y`,`font-size`,`fill`,`font-weight`],Ze={key:5,class:`vue-data-ui-watermark`},Qe={style:{display:`flex`,"align-items":`center`}},$e=/*#__PURE__*/ ke({__name:`vue-ui-funnel`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:ke,emit:Be}){Re(e=>({v33c10cd3:Nt.value}));let $e=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),et=g(()=>import(`./vue-ui-skeleton-BLyh-ESb.js`).then(e=>e.n)),tt=g(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),nt=g(()=>import(`./DataTable-KeuZB1JM.js`)),rt=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),it=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),at=g(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),ot=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_funnel:st}=ye(),D=Te(),O=e,ct=Be,k=x(null),A=x(ce()),lt=x(0),ut=x(0),dt=x(0),ft=x(null),pt=x(null),mt=x(null),j=Le(null),M=Le(null),N=x(!1),ht=x(null),gt=x(null),P=l(()=>!!O.dataset&&O.dataset.length);Fe(yt),Pe(()=>{j.value&&(M.value&&j.value.unobserve(M.value),j.value.disconnect())});function _t(){return ie(O.config,st,De)}let F=l({get:()=>_t(),set:e=>e}),vt=l(()=>F.value.debug),I=l(()=>F.value.style.chart.bars),L=l(()=>F.value.style.chart.circles),R=l(()=>F.value.style.chart);function yt(){if(he(O.dataset)?le({componentName:`VueUiFunnel`,type:`dataset`,debug:vt.value}):O.dataset.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{P.value=!1,le({componentName:`VueUiFunnel`,type:`datasetSerieAttribute`,property:e,index:t,debug:vt.value})})}),F.value.responsive){let e=ge(()=>{let{width:e,height:t}=xe({chart:k.value,title:R.value.title.text?mt.value:null,source:pt.value,noTitle:ft.value});requestAnimationFrame(()=>{U.value.height=t,U.value.width=e,G.value=Ot(),F.value.responsiveProportionalSizing?(H.value.circles=fe({relator:Math.min(e,t),adjuster:600,source:L.value.dataLabels.fontSize,threshold:10,fallback:10}),H.value.names=fe({relator:Math.min(e,t),adjuster:600,source:I.value.dataLabels.name.fontSize,threshold:10,fallback:10}),H.value.values=fe({relator:Math.min(e,t),adjuster:600,source:I.value.dataLabels.value.fontSize,threshold:10,fallback:10})):(H.value.circles=L.value.dataLabels.fontSize,H.value.names=I.value.dataLabels.name.fontSize,H.value.values=I.value.dataLabels.value.fontSize)})});j.value&&(M.value&&j.value.unobserve(M.value),j.value.disconnect()),j.value=new ResizeObserver(e),M.value=k.value.parentNode,j.value.observe(M.value)}}_e({config:()=>F.value,dataset:()=>O.dataset,component:`VueUiFunnel`,rules:[ve.emptyArray,{test:e=>e.length>10,message:[`👀 The dataset has a length > 10. Consider:`,``,`▶️ Aggregating some datapoints into broader categories`]}]});let bt=l(()=>F.value.userOptions.useCursorPointer),{userOptionsVisible:xt,setUserOptionsVisibility:St,keepUserOptionState:Ct}=Ce({config:F.value}),{svgRef:wt}=we({config:R.value.title});ze(()=>O.config,e=>{F.value=_t(),xt.value=!F.value.userOptions.showOnChartHover,yt(),ut.value+=1,dt.value+=1,H.value.circles=L.value.dataLabels.fontSize,H.value.names=I.value.dataLabels.name.fontSize,H.value.values=I.value.dataLabels.value.fontSize,V.value.showTable=F.value.table.show},{deep:!0});let{isPrinting:z,isImaging:B,generatePdf:Tt,generateImage:Et}=be({elementId:`funnel_${A.value}`,fileName:R.value.title.text||`vue-ui-funnel`,options:F.value.userOptions.print}),Dt=l(()=>F.value.userOptions.show&&!R.value.title.text),V=x({showTable:F.value.table.show}),H=x({circles:L.value.dataLabels.fontSize,names:I.value.dataLabels.name.fontSize,values:I.value.dataLabels.value.fontSize}),U=l({get:()=>({height:R.value.height,width:R.value.width}),set:e=>e}),W=l(()=>P.value?O.dataset.map((e,t)=>({...e,color:e.color?se(e.color):oe(I.value.defaultColor,t/O.dataset.length)})):[]);setTimeout(()=>{N.value=!0},W.value.length*150);function Ot(){let e=R.value.padding.left,t=R.value.padding.top;return{left:e,top:t,right:U.value.width-R.value.padding.right,bottom:U.value.height-R.value.padding.bottom,width:U.value.width-e-R.value.padding.right,height:U.value.height-t-R.value.padding.bottom}}let G=x(Ot()),K=l(()=>G.value.height/O.dataset.length),q=l(()=>K.value*I.value.gapRatio),kt=l(()=>G.value.width*R.value.barCircleSpacingRatio),J=l(()=>W.value.map((e,t)=>{let n=K.value-q.value,r=G.value.top+q.value/2*t+(K.value-q.value/2)*t+q.value/2,i=e.value/W.value[0].value,ee=(G.value.width-n-kt.value)*(e.value/W.value[0].value);return{...e,cx:G.value.left+n/2,cy:r+n/2,datapointIndex:t,fill:e.color,height:Math.max(n,0),proportion:i,r:Math.max(n/2,0),width:Math.max(ee,0),x:G.value.left+n+kt.value,y:r}})),At=l(()=>{let e=J.value.map(e=>`${e.x+e.width},${e.y+(K.value-q.value)/2}`);return`${J.value[0].x},${J.value[0].y+(K.value-q.value)/2} ${e.toString()} ${J.value.at(-1).x},${J.value.at(-1).y+(K.value-q.value)/2}`}),jt=l(()=>({x1:J.value[0].cx,y1:J.value[0].cy,x2:J.value.at(-1).cx,y2:J.value.at(-1).cy})),Y=x(!1);function Mt(e){Y.value=e,lt.value+=1}let Nt=l(()=>`${W.value.length*150}ms`),X=x(!1);function Pt(){X.value=!X.value}function Ft(){V.value.showTable=!V.value.showTable}let Z=l(()=>({head:W.value.map(e=>({name:e.name,color:e.color})),body:W.value.map(e=>e.value)})),Q=l(()=>{let e=[F.value.table.columnNames.series,F.value.table.columnNames.value,F.value.table.columnNames.percentage],t=Z.value.head.map((e,t)=>{let n=s(I.value.dataLabels.value.formatter,Z.value.body[t],o({p:I.value.dataLabels.value.prefix,v:Z.value.body[t],s:I.value.dataLabels.value.suffix,r:F.value.table.td.roundingValue}),{datapoint:J.value[t]}),r=s(L.value.dataLabels.formatter,J.value[t].proportion*100,o({v:J.value[t].proportion*100,s:`%`,r:F.value.table.td.roundingPercentage}),{datapoint:J.value[t]});return[{color:e.color,name:e.name},n,r]}),n={th:{backgroundColor:F.value.table.th.backgroundColor,color:F.value.table.th.color,outline:F.value.table.th.outline},td:{backgroundColor:F.value.table.td.backgroundColor,color:F.value.table.td.color,outline:F.value.table.td.outline},breakpoint:F.value.table.responsiveBreakpoint};return{colNames:[F.value.table.columnNames.series,F.value.table.columnNames.value,F.value.table.columnNames.percentage],head:e,body:t,config:n}});function It(e=null){Me(()=>{let t=Z.value.head.map((e,t)=>[[e.name],[Z.value.body[t]],[J.value[t].proportion*100]]),n=[[R.value.title.text],[R.value.title.subtitle.text],[[F.value.table.columnNames.series],[F.value.table.columnNames.value],[`%`]]].concat(t),r=ae(n);e?e(r):ue({csvContent:r,title:R.value.title.text||`vue-ui-funnel`})})}function Lt(){return W.value}let Rt=re(k,()=>R.value.title.text),$=l(()=>ne({config:F,style:R,mutableConfig:V,dialog:ot,accordion:tt,isFullscreen:Y,parent:k,maxWidth:800}));ze(()=>V.value.showTable,e=>a(e,F,ht));function zt(){V.value.showTable=!1,gt.value&&gt.value.setTableIconState(!1)}let Bt=l(()=>R.value.backgroundColor),Vt=l(()=>R.value.title),{isCallbackImaging:Ht,isCallbackSvg:Ut,generateSvg:Wt,onGenerateImage:Gt}=Se({svg:wt,title:Vt,legend:null,legendItems:null,backgroundColor:Bt,getSvgCallback:()=>F.value.userOptions.callbacks.svg,generateImage:Et});async function Kt(){ct(`copyAlt`,{config:F.value,dataset:W.value}),F.value.userOptions.callbacks.altCopy?await Promise.resolve(F.value.userOptions.callbacks.altCopy({config:F.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return ke({getData:Lt,getImage:Rt,generatePdf:Tt,generateCsv:It,generateImage:Et,generateSvg:Wt,toggleTable:Ft,toggleAnnotator:Pt,toggleFullscreen:Mt,copyAlt:Kt}),(e,a)=>(b(),f(`div`,{ref_key:`funnelChart`,ref:k,class:v(`vue-data-ui-component vue-ui-funnel ${Y.value?`vue-data-ui-wrapper-fullscreen`:``} ${F.value.useCssAnimation?``:`vue-ui-dna`}`),style:y(`font-family:${F.value.style.fontFamily};width:100%; ${F.value.responsive?`height:100%;`:``} text-align:center;background:${R.value.backgroundColor}`),id:`funnel_${A.value}`,onMouseenter:a[1]||=()=>T(St)(!0),onMouseleave:a[2]||=()=>T(St)(!1)},[F.value.userOptions.buttons.annotator?(b(),u(T(it),_({key:0},T(ee)(F.value.userOptions.annotator),{svgRef:T(wt),backgroundColor:R.value.backgroundColor,color:R.value.color,active:X.value,isCursorPointer:bt.value,palette:F.value.userOptions.annotatorPalette,onClose:Pt}),m({_:2},[S(T(te),t=>({name:t,fn:E(n=>[C(e.$slots,t,Ne(je(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),Dt.value?(b(),f(`div`,{key:1,ref_key:`noTitle`,ref:ft,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),R.value.title.text?(b(),f(`div`,{key:2,ref_key:`chartTitle`,ref:mt,style:`width:100%;background:transparent;padding-bottom:24px`},[(b(),u(Ee,{key:`title_${ut.value}`,config:{title:{cy:`funnel-div-title`,...R.value.title},subtitle:{cy:`funnel-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),F.value.userOptions.show&&P.value&&(T(Ct)||T(xt))?(b(),u(T(rt),_({ref_key:`userOptionsRef`,ref:gt,key:`user_option_${lt.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:T(z),isImaging:T(B),uid:A.value,hasTooltip:!1,hasLabel:!1,isFullscreen:Y.value,chartElement:k.value},T(n)(F.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:X.value,tableDialog:F.value.table.useDialog,isCursorPointer:bt.value,onToggleAnnotator:Pt,onToggleFullscreen:Mt,onGeneratePdf:T(Tt),onGenerateImage:T(Gt),onGenerateSvg:T(Wt),onToggleTable:Ft,onGenerateCsv:It,onCopyAlt:Kt,style:{visibility:T(Ct)?T(xt)?`visible`:`hidden`:`visible`}}),m({_:2},[S(T(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,Ne(je(T(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):d(``,!0),P.value?(b(),f(`svg`,{key:4,ref_key:`svgRef`,ref:wt,xmlns:T(pe),class:v({"vue-data-ui-fullscreen--on":Y.value,"vue-data-ui-fulscreen--off":!Y.value}),viewBox:`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`,style:y(`max-width:100%; overflow: visible; background:transparent;color:${R.value.color}`)},[h(T(at)),C(e.$slots,`svg-underlayer`,{svg:{...U.value,isPrintingImg:T(z)||T(B)||T(Ht),isPrintingSvg:T(Ut)}},void 0,!0),e.$slots[`chart-background`]?(b(),f(`foreignObject`,{key:0,x:0,y:0,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,Ue)):d(``,!0),p(`defs`,null,[h(Oe,{t:`linear`,id:`funnel_area_${A.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,R.value.backgroundColor,0],[`20%`,R.value.area.color,1],[`100%`,R.value.area.color,1]]},null,8,[`id`,`stops`])]),R.value.circleLinks.show?(b(),f(`line`,_({key:1},jt.value,{stroke:R.value.circleLinks.color,"stroke-width":12*R.value.circleLinks.widthRatio,"stroke-linecap":`round`,class:{animated:F.value.useCssAnimation&&!T(D)},style:{strokeDasharray:F.value.useCssAnimation&&!T(D)?G.value.height:0,strokeDashoffset:F.value.useCssAnimation&&!T(D)?G.value.height:0}}),null,16,We)):d(``,!0),(b(!0),f(c,null,S(J.value,({cx:e,cy:t,r:n,fill:r},i)=>(b(),f(`circle`,_({ref_for:!0},{cx:e,cy:t,r:n,fill:r},{stroke:L.value.stroke,"stroke-width":L.value.strokeWidth,class:{animated:F.value.useCssAnimation&&!N.value&&!T(D)},style:{animationDelay:`${150*i}ms`}}),null,16,Ge))),256)),(b(!0),f(c,null,S(J.value,(e,t)=>(b(),f(`text`,{x:e.cx,y:e.cy+H.value.circles/3+L.value.dataLabels.offsetY,"text-anchor":`middle`,"font-size":H.value.circles,fill:L.value.dataLabels.adaptColorToBackground?T(de)(e.color):L.value.dataLabels.color,"font-weight":L.value.dataLabels.bold?`bold`:`normal`,class:v({animated:F.value.useCssAnimation&&!N.value&&!T(D)}),style:y({animationDelay:`${150*t}ms`})},w(T(s)(L.value.dataLabels.formatter,e.proportion*100,T(o)({v:e.proportion*100,s:`%`,r:L.value.dataLabels.rounding}),{datapoint:e})),15,Ke))),256)),R.value.area.show?(b(),f(`polygon`,{key:2,points:At.value,fill:`url(#funnel_area_${A.value})`,class:v({animated:F.value.useCssAnimation&&!N.value&&!T(D)}),style:y({transition:F.value.useCssAnimation?`all ${150*W.value.length}ms ease-in`:`none`})},null,14,qe)):d(``,!0),(b(!0),f(c,null,S(J.value,({x:e,y:t,height:n,width:r,fill:i},ee)=>(b(),f(`rect`,_({ref_for:!0},{x:e,y:t,height:n,width:r,fill:i},{stroke:I.value.stroke,"stroke-width":I.value.strokeWidth,rx:I.value.borderRadius,class:{animated:F.value.useCssAnimation&&!N.value&&!T(D)},style:{animationDelay:`${150*ee}ms`}}),null,16,Je))),256)),(b(!0),f(c,null,S(J.value,(e,t)=>(b(),f(`g`,null,[p(`text`,{x:e.x+e.width+I.value.dataLabels.name.offsetX+12,y:e.cy-H.value.names/2+I.value.dataLabels.name.offsetY,"text-anchor":`start`,"font-size":H.value.names,fill:I.value.dataLabels.name.color,"font-weight":I.value.dataLabels.name.bold?`bold`:`normal`,class:v({animated:F.value.useCssAnimation&&!N.value&&!T(D)}),style:y({animationDelay:`${150*t}ms`})},w(e.name),15,Ye),p(`text`,{x:e.x+e.width+I.value.dataLabels.value.offsetX+12,y:e.cy+H.value.values+I.value.dataLabels.value.offsetY,"text-anchor":`start`,"font-size":H.value.values,fill:I.value.dataLabels.value.color,"font-weight":I.value.dataLabels.value.bold?`bold`:`normal`,class:v({animated:F.value.useCssAnimation&&!N.value&&!T(D)}),style:y({animationDelay:`${150*t}ms`})},w(T(s)(I.value.dataLabels.value.formatter,e.value,T(o)({p:I.value.dataLabels.value.prefix,v:e.value,s:I.value.dataLabels.value.suffix,r:I.value.dataLabels.value.rounding}),{datapoint:e})),15,Xe)]))),256)),C(e.$slots,`svg`,{svg:{...U.value,isPrintingImg:T(z)||T(B)||T(Ht),isPrintingSvg:T(Ut)}},void 0,!0)],14,He)):d(``,!0),e.$slots.watermark?(b(),f(`div`,Ze,[C(e.$slots,`watermark`,Ne(je({isPrinting:T(z)||T(B)||T(Ht)||T(Ut)})),void 0,!0)])):d(``,!0),P.value?d(``,!0):(b(),u(T(et),{key:6,config:{type:`verticalBar`,style:{backgroundColor:R.value.backgroundColor,verticalBar:{axis:{color:`#CCCCCC`},color:`#CCCCCC`}}}},null,8,[`config`])),e.$slots.source?(b(),f(`div`,{key:7,ref_key:`source`,ref:pt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),P.value&&F.value.userOptions.buttons.table?(b(),u(Ie($.value.component),_({key:8},$.value.props,{ref_key:`tableUnit`,ref:ht,onClose:zt}),m({content:E(()=>[(b(),u(T(nt),{key:`table_${dt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:F.value.table.useDialog?``:$.value.title,withCloseButton:!F.value.table.useDialog,onClose:zt},{th:E(({th:e})=>[p(`div`,Qe,w(e),1)]),td:E(({td:e})=>[Ae(w(e.name?e.name:e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`]))]),_:2},[F.value.table.useDialog?{name:`title`,fn:E(()=>[Ae(w($.value.title),1)]),key:`0`}:void 0,F.value.table.useDialog?{name:`actions`,fn:E(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:a[0]||=e=>It(F.value.userOptions.callbacks.csv)},[h(T($e),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):d(``,!0)],46,Ve))}},[[`__scopeId`,`data-v-a2d6ad2f`]]);export{Be as n,$e as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as ee}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-DPGnEuYM.js";import{n as ne}from"./resolveChartConfig-0IvbmIE_.js";import{$ as c,D as re,Dt as ie,Ht as ae,Kt as oe,S as se,X as ce,Zt as le,at as ue,i as de,in as fe,nt as pe,pt as me,t as he,w as ge,yt as _e,z as ve,zt as ye}from"./lib-rPeBMZrn.js";import{c as be}from"./canvas-lib-22VpOI4_.js";import{n as xe,t as Se}from"./useHints-C-TwxM0Y.js";import{t as Ce}from"./useConfig-_JwRfIqE.js";import{n as we,t as Te}from"./BaseScanner-8NdoBs7B.js";import{t as Ee}from"./usePrinter-DVf3YcG5.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as Oe}from"./useChartExport-BZts4KFb.js";import{t as ke}from"./useTransitions-ChGGrtrv.js";import{t as Ae}from"./useUserOptionState-CXlFnwPv.js";import{t as je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Me}from"./labelUtils-CdtU-yB_.js";import{n as Ne}from"./Title-BliHuXfT.js";import{t as Pe}from"./Legend-W9YVYVX-.js";import{t as Fe}from"./vue_ui_galaxy-DvaSrGxT.js";import{t as Ie}from"./A11yDataTable-DWNlWXzs.js";import{t as Le}from"./BaseLegendToggle-VzX69MCo.js";import{t as Re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as ze,Teleport as Be,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as Ve,createTextVNode as He,createVNode as Ue,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as We,nextTick as Ge,normalizeClass as g,normalizeProps as _,normalizeStyle as Ke,onMounted as qe,openBlock as v,ref as y,renderList as Je,renderSlot as b,resolveDynamicComponent as Ye,toDisplayString as x,toRefs as Xe,unref as S,watch as Ze,withCtx as C}from"vue";var Qe=/* @__PURE__ */ e({default:()=>vt}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`],it=[`width`,`height`],at=[`id`],ot=[`stdDeviation`],st=[`d`,`stroke`,`stroke-width`],ct=[`d`,`stroke`,`stroke-width`],lt=[`filter`],ut=[`d`,`stroke`,`stroke-width`],dt=[`data-a11y-serie-id`,`d`,`stroke-width`,`aria-label`,`onMouseenter`,`onMouseleave`,`onClick`],ft={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},pt={key:5,class:`vue-data-ui-watermark`},mt=[`id`],ht=[`onClick`],gt={key:0},_t={key:1},vt=/*#__PURE__*/ Re({__name:`vue-ui-galaxy`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Re,emit:Qe}){let vt=m(()=>import(`./Tooltip-C1q0Qoh7.js`)),yt=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),bt=m(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),xt=m(()=>import(`./DataTable-KeuZB1JM.js`)),St=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Ct=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),wt=m(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),Tt=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_galaxy:Et}=Ce(),w=e,T=y(ce()),E=y(null),Dt=y(!1),Ot=y(``),D=y(null),kt=y(0),At=y(0),jt=y(0),Mt=y(0),Nt=y(null),Pt=y(null),Ft=y(null),It=y(null),O=y(null),Lt=y(null),Rt=y(!1),zt=y(null),Bt=y(null),k=y(null),Vt=y(null),Ht=y({x:0,y:0}),Ut=y(`pointer`),A=y(!1),Wt=l(()=>!!w.dataset&&w.dataset.length),j=y(Qt()),M=l(()=>j.value.style.chart.layout.arcs),N=l(()=>j.value.style.chart.layout),P=l(()=>j.value.style.chart);xe({config:()=>j.value,dataset:()=>w.dataset,component:`VueUiGalaxy`,rules:[Se.singleSeries,Se.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let{transitionEnabled:Gt}=ke({config:()=>j.value.transitions,dataset:()=>w.dataset}),F=l(()=>j.value.userOptions.useCursorPointer),Kt=l(()=>fe({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,legend:{backgroundColor:`transparent`}}}},userConfig:j.value.skeletonConfig??{}})),{loading:I,FINAL_DATASET:qt}=we({...Xe(w),FINAL_CONFIG:j,prepareConfig:Qt,callback:()=>{Promise.resolve().then(async()=>{await Ge(),B.value.showTable=j.value.table.show})},skeletonDataset:w.config?.skeletonDataset??[{name:`_`,values:[21],color:`#DBDBDB`},{name:`_`,values:[13],color:`#C4C4C4`},{name:`_`,values:[8],color:`#ADADAD`}],skeletonConfig:fe({defaultConfig:j.value,userConfig:Kt.value})});qe(()=>{Rt.value=!0,Jt()});let L=l(()=>j.value.debug);function Jt(){if(ye(w.dataset)?ue({componentName:`VueUiGalaxy`,type:`dataset`,debug:L.value}):L.value&&w.dataset.forEach((e,t)=>{_e({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ue({componentName:`VueUiGalaxy`,type:`datasetSerieAttribute`,property:e,index:t})})}),j.value.responsive){let e=be(()=>{let{width:e,height:t}=De({chart:E.value,title:P.value.title.text?Nt.value:null,legend:P.value.legend.show?Pt.value:null,noTitle:It.value,source:Ft.value});requestAnimationFrame(()=>{on.value=Math.max(.1,e),sn.value=Math.max(.1,t-12)})});O.value&&(Lt.value&&O.value.unobserve(Lt.value),O.value.disconnect()),O.value=new ResizeObserver(e),Lt.value=E.value.parentNode,O.value.observe(Lt.value)}}let{userOptionsVisible:Yt,setUserOptionsVisibility:Xt,keepUserOptionState:Zt}=Ae({config:j.value}),{svgRef:R}=je({config:P.value.title});function Qt(){return ne(w.config,Et,Fe)}let $t=le(w.config);Ze(()=>w.config,(e,t)=>{let n=le(e),r=n!==$t;$t=n;let i=Qt();r?(j.value=i,Yt.value=!j.value.userOptions.showOnChartHover,Jt(),At.value+=1,jt.value+=1,Mt.value+=1,B.value.dataLabels.show=N.value.labels.dataLabels.show,B.value.showTable=j.value.table.show,B.value.showTooltip=P.value.tooltip.show):(j.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=j.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:z,isImaging:en,generatePdf:tn,generateImage:nn}=Ee({elementId:`galaxy_${T.value}`,fileName:P.value.title.text||`vue-ui-galaxy`,options:j.value.userOptions.print}),rn=l(()=>j.value.userOptions.show&&!P.value.title.text),an=l(()=>ge(j.value.customPalette)),B=y({dataLabels:{show:N.value.labels.dataLabels.show},showTable:j.value.table.show,showTooltip:P.value.tooltip.show}),on=y(250),sn=y(180),cn=y(0),ln=y(0),V=l(()=>({width:on.value,height:sn.value,viewBox:`${cn.value} ${ln.value} ${on.value} ${sn.value}`})),un=Qe,H=y([]);function dn(){un(`selectLegend`,K.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function fn(){H.value.length?H.value=[]:J.value.forEach(e=>{H.value.push(e.id)}),dn()}function U(e){H.value.includes(e.id)?H.value=H.value.filter(t=>t!==e.id):H.value.push(e.id),dn()}function pn(e){return W.value.length?W.value.find(t=>t.name===e)||(L.value&&console.warn(`VueUiGalaxy - Series name not found "${e}"`),null):(L.value&&console.warn(`VueUiGalaxy - There are no series to show.`),null)}function mn(e){let t=pn(e);t!==null&&H.value.includes(t.id)&&U({id:t.id})}function hn(e){let t=pn(e);t!==null&&(H.value.includes(t.id)||U({id:t.id}))}let W=l(()=>qt.value.map((e,t)=>({name:e.name,color:se(e.color)||an.value[t]||ae[t]||ae[t%ae.length],value:e.values?oe(e.values).reduce((e,t)=>e+t,0):0,absoluteValues:oe(e.values),id:ce()})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,absoluteIndex:t})));function gn(){return W.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let G=l(()=>W.value.filter(e=>!H.value.includes(e.id)).map(e=>e.value).reduce((e,t)=>e+t,0)),_n=y(190),vn=l(()=>W.value.filter(e=>!H.value.includes(e.id))),yn=l(()=>(M.value.strokeWidth+M.value.borderWidth)/2+(N.value.padding??12)),bn=l(()=>ve({maxPoints:_n.value,a:M.value.a??6,b:M.value.b??6,angleStep:M.value.angleStep??.07,startX:V.value.width/2+M.value.offsetX,startY:V.value.height/2+M.value.offsetY,boxWidth:V.value.width,boxHeight:V.value.height,padding:yn.value})),K=l(()=>{let e=[];for(let t=0;t<vn.value.length;t+=1){let n=vn.value[t],r=n.value/G.value*_n.value+(t>0&&e.length?e[t-1].points:0);e.push({points:r,...n,seriesIndex:t,proportion:n.value/G.value,path:bn.value(r)})}return e.filter(e=>!H.value.includes(e.id)).toSorted((e,t)=>t.points-e.points)});function xn(e){let t=Math.min(on.value,sn.value),n=D.value===e.id&&M.value.hoverEffect.show?M.value.hoverEffect.multiplicator:1,r=(M.value.strokeWidth+M.value.borderWidth)*n,i=M.value.strokeWidth*n,a=M.value.strokeWidth/2*n;return{border:r/180*t,path:i/180*t,blur:a/180*t}}let q=y(!1);function Sn(e){q.value=e,kt.value+=1}let Cn=y(null);function wn(){Dt.value=!1,D.value=null,k.value=null,Vt.value=null}function Tn(e){if(!R.value||!e)return;let t=R.value.querySelector(`[data-a11y-serie-id="${e}"]`);if(!t)return;let n=t.getBoundingClientRect();Ht.value={x:n.left+n.width/2,y:n.top+n.height/2}}function En(e){j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:e.absoluteIndex}),(Vt.value!==e.id||Ut.value!==`keyboard`)&&(Dt.value=!1,D.value=null)}function Dn(e){un(`selectDatapoint`,e),j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:e.absoluteIndex})}function On({val:e,percentage:t,showVal:n,showPercentage:r}){let i=N.value.labels.dataLabels;return Me({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function kn({datapoint:e,_relativeIndex:t,seriesIndex:n,show:r=!1,triggerMode:i=`pointer`,flatIndex:a=null}){if(j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:e,seriesIndex:e.absoluteIndex}),!B.value.showTooltip)return;Ut.value=i,k.value=a,Vt.value=e.id,Cn.value={datapoint:e,seriesIndex:n,series:W.value,config:j.value},Dt.value=r,D.value=e.id;let o=``,s=P.value.tooltip.customFormat;ie(s)&&me(()=>s({seriesIndex:n,datapoint:e,series:W.value,config:j.value}))?Ot.value=s({seriesIndex:n,datapoint:e,series:W.value,config:j.value}):(o+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,o+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${e.color}"/></svg>`,o+=`<b>${On({showVal:P.value.tooltip.showValue,showPercentage:P.value.tooltip.showPercentage,val:de(N.value.labels.dataLabels.formatter,e.value,c({p:N.value.labels.dataLabels.prefix,v:e.value,s:N.value.labels.dataLabels.suffix,r:P.value.tooltip.roundingValue}),{datapoint:e,seriesIndex:n}),percentage:c({v:e.proportion*100,s:`%`,r:P.value.tooltip.roundingPercentage})})}</b></div>`,Ot.value=`<div>${o}</div>`),i===`keyboard`&&Ge(()=>{Tn(e.id)})}let J=l(()=>W.value.map((e,t)=>{let n=de(N.value.labels.dataLabels.formatter,e.value,c({p:N.value.labels.dataLabels.prefix,v:e.value,s:N.value.labels.dataLabels.suffix,r:P.value.legend.roundingValue}),{datapoint:e,index:t}),r=isNaN(e.value/G.value)||H.value.includes(e.id)?`-`:c({v:e.value/G.value*100,s:`%`,r:P.value.legend.roundingPercentage}),i=On({showVal:P.value.legend.showValue,showPercentage:P.value.legend.showPercentage,val:n,percentage:r});return{...e,proportion:(e.value||0)/qt.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0),opacity:H.value.includes(e.id)?.5:1,shape:e.shape||`circle`,segregate:()=>U(e),isSegregated:H.value.includes(e.id),display:`${e.name}${P.value.legend.showPercentage||P.value.legend.showValue?`: `:``}${i}`}})),An=l(()=>({cy:`galaxy-div-legend`,backgroundColor:P.value.legend.backgroundColor,color:P.value.legend.color,fontSize:P.value.legend.fontSize,paddingBottom:12,fontWeight:P.value.legend.bold?`bold`:``})),Y=l(()=>({head:K.value.map(e=>({name:e.name,color:e.color})),body:K.value.map(e=>e.value)}));function jn(e=null){Ge(()=>{let t=Y.value.head.map((e,t)=>[[e.name],[Y.value.body[t]],[isNaN(Y.value.body[t]/G.value)?`-`:Y.value.body[t]/G.value*100]]),n=[[P.value.title.text],[P.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=re(n);e?e(r):pe({csvContent:r,title:P.value.title.text||`vue-ui-galaxy`})})}let X=l(()=>{let e=[`__SUM__`,c({p:N.value.labels.dataLabels.prefix,v:G.value,s:N.value.labels.dataLabels.suffix,r:j.value.table.td.roundingValue}),`100%`],t=Y.value.head.map((e,t)=>{let n=c({p:N.value.labels.dataLabels.prefix,v:Y.value.body[t],s:N.value.labels.dataLabels.suffix,r:j.value.table.td.roundingValue});return[{color:e.color,name:e.name},n,isNaN(Y.value.body[t]/G.value)?`-`:c({v:Y.value.body[t]/G.value*100,s:`%`,r:j.value.table.td.roundingPercentage})]}),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,j.value.table.columnNames.percentage],head:e,body:t,config:n}});function Mn(){B.value.showTable=!B.value.showTable}function Nn(){B.value.showTooltip=!B.value.showTooltip}let Z=y(!1);function Pn(){Z.value=!Z.value}let Fn=te(E,()=>P.value.title.text),Q=l(()=>ee({config:j,style:P,mutableConfig:B,dialog:Tt,accordion:bt,isFullscreen:q,parent:E,maxWidth:500,isCursorPointer:F}));Ze(()=>B.value.showTable,e=>s(e,j,zt));function In(){B.value.showTable=!1,Bt.value&&Bt.value.setTableIconState(!1)}let Ln=l(()=>J.value.map(e=>({...e,name:e.display}))),Rn=l(()=>P.value.backgroundColor),zn=l(()=>P.value.legend),Bn=l(()=>P.value.title),{isCallbackImaging:Vn,isCallbackSvg:Hn,generateSvg:Un,onGenerateImage:Wn}=Oe({svg:R,title:Bn,legend:zn,legendItems:Ln,backgroundColor:Rn,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:nn});async function Gn(){un(`copyAlt`,{config:j.value,dataset:W.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Kn(){k.value=null,Vt.value=null,A.value=!0}function qn(){wn(),A.value=!1}function Jn(e){if(!R.value||Z.value||document.activeElement!==R.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){wn();return}if(r){if(k.value===null)return;let e=$.value[k.value];if(!e)return;Dn(e.datapoint);return}let a=k.value;a===null||a<0||a>=$.value.length?a=n?0:$.value.length-1:(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0));let o=$.value[a];o&&kn({datapoint:o.datapoint,seriesIndex:o.datapoint.seriesIndex,show:!0,triggerMode:`keyboard`,flatIndex:a})}let Yn=l(()=>({headers:X.value?.colNames??[],rows:X.value?.body??[]})),$=l(()=>K.value.map((e,t)=>({datapoint:e,index:t})));return Re({getData:gn,getImage:Fn,generatePdf:tn,generateCsv:jn,generateImage:nn,generateSvg:Un,hideSeries:hn,showSeries:mn,toggleTable:Mn,toggleTooltip:Nn,toggleAnnotator:Pn,toggleFullscreen:Sn,copyAlt:Gn}),(e,s)=>(v(),f(`div`,{ref_key:`galaxyChart`,ref:E,class:g(`vue-data-ui-component vue-ui-galaxy ${q.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`} ${S(I)?`loading`:``}`),style:Ke(`font-family:${j.value.style.fontFamily};width:100%; text-align:center;${P.value.title.text?``:`padding-top:36px`};background:${P.value.backgroundColor}`),id:`galaxy_${T.value}`,onMouseenter:s[2]||=()=>S(Xt)(!0),onMouseleave:s[3]||=()=>{S(Xt)(!1),A.value||wn()}},[p(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[p(`p`,null,x(j.value.a11y.translations.keyboardNavigation),1)],8,et),Yn.value?.rows?.length?(v(),u(Ie,{key:0,uid:T.value,head:Yn.value.headers,body:Yn.value.rows,notice:j.value.a11y.translations.tableAvailable,caption:j.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):d(``,!0),j.value.userOptions.buttons.annotator?(v(),u(S(St),We({key:1},S(a)(j.value.userOptions.annotator),{svgRef:S(R),backgroundColor:P.value.backgroundColor,color:P.value.color,active:Z.value,isCursorPointer:F.value,palette:j.value.userOptions.annotatorPalette,onClose:Pn}),Ve({_:2},[Je(S(o),t=>({name:t,fn:C(n=>[b(e.$slots,t,_(h(S(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),rn.value?(v(),f(`div`,{key:2,ref_key:`noTitle`,ref:It,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),P.value.title.text?(v(),f(`div`,{key:3,ref_key:`chartTitle`,ref:Nt,style:`width:100%;background:transparent;padding-bottom:24px`},[(v(),u(Ne,{key:`title_${At.value}`,config:{title:{cy:`galaxy-div-title`,...P.value.title},subtitle:{cy:`galaxy-div-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),p(`div`,{id:`legend-top-${T.value}`},null,8,tt),j.value.userOptions.show&&Wt.value&&(S(Zt)||S(Yt))?(v(),u(S(Ct),We({ref_key:`userOptionsRef`,ref:Bt,key:`user_option_${kt.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:S(z),isImaging:S(en),uid:T.value,hasTooltip:j.value.userOptions.buttons.tooltip&&P.value.tooltip.show,isTooltip:B.value.showTooltip,isFullscreen:q.value,chartElement:E.value},S(n)(j.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Z.value,tableDialog:j.value.table.useDialog,isCursorPointer:F.value,onToggleFullscreen:Sn,onGeneratePdf:S(tn),onGenerateCsv:jn,onGenerateImage:S(Wn),onGenerateSvg:S(Un),onToggleTable:Mn,onToggleTooltip:Nn,onToggleAnnotator:Pn,onCopyAlt:Gn,style:{visibility:S(Zt)?S(Yt)?`visible`:`hidden`:`visible`}}),Ve({_:2},[Je(S(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,_(h(S(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):d(``,!0),p(`div`,nt,[(v(),f(`svg`,{ref_key:`svgRef`,ref:R,xmlns:S(he),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":q.value,"vue-data-ui-fulscreen--off":!q.value}),viewBox:V.value.viewBox,style:Ke(`max-width:100%; overflow: visible; background:transparent;color:${P.value.color}`),tabindex:`0`,onFocus:Kn,onBlur:qn,onKeydown:Jn},[Ue(S(wt)),b(e.$slots,`svg-underlayer`,{svg:{...V.value,isPrintingImg:S(z)||S(en)||S(Vn),isPrintingSvg:S(Hn)}},void 0,!0),e.$slots[`chart-background`]?(v(),f(`foreignObject`,{key:0,x:0,y:0,width:V.value.width,height:V.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,it)):d(``,!0),p(`defs`,null,[p(`filter`,{id:`blur_${T.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[p(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:100/M.value.gradient.intensity},null,8,ot)],8,at)]),(v(!0),f(ze,null,Je(K.value,e=>(v(),f(`g`,{key:`dp_${e.id}`},[e.value?(v(),f(`path`,{key:0,d:e.path,fill:`none`,stroke:P.value.backgroundColor,"stroke-width":xn(e).border,class:g({"vue-data-ui-transition":S(Gt)}),"stroke-linecap":`round`},null,10,st)):d(``,!0),e.value?(v(),f(`path`,{key:1,d:e.path,fill:`none`,stroke:e.color,"stroke-width":xn(e).path,"stroke-linecap":`round`,class:g({"vue-data-ui-transition":S(Gt),"vue-ui-galaxy-blur":D.value&&D.value!==e.id&&j.value.useBlurOnHover})},null,10,ct)):d(``,!0),e.value&&M.value.gradient.show?(v(),f(`g`,{key:2,filter:`url(#blur_${T.value})`},[p(`path`,{d:e.path,fill:`none`,stroke:M.value.gradient.color,"stroke-width":xn(e).blur,"stroke-linecap":`round`,class:g({"vue-ui-galaxy-gradient":!0,"vue-data-ui-transition":S(Gt),"vue-ui-galaxy-blur":D.value&&D.value!==e.id&&j.value.useBlurOnHover})},null,10,ut)],8,lt)):d(``,!0)]))),128)),(v(!0),f(ze,null,Je(K.value,(e,t)=>(v(),f(`g`,null,[e.value?(v(),f(`path`,{key:0,"data-a11y-serie-id":e.id,d:e.path,fill:`none`,stroke:`transparent`,"stroke-width":M.value.strokeWidth+M.value.borderWidth,"stroke-linecap":`round`,"aria-label":`${e.name}: ${S(c)({p:N.value.labels.dataLabels.prefix,v:e.value,s:N.value.labels.dataLabels.suffix,r:P.value.tooltip.roundingValue})}`,onMouseenter:n=>kn({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0,triggerMode:`pointer`,flatIndex:t}),onMouseleave:t=>En(e),onClick:t=>Dn(e)},null,40,dt)):d(``,!0)]))),256)),b(e.$slots,`svg`,{svg:{...V.value,isPrintingImg:S(z)||S(en)||S(Vn),isPrintingSvg:S(Hn)}},void 0,!0)],46,rt)),e.$slots.hint?(v(),f(`div`,ft,[b(e.$slots,`hint`,_(h({hint:j.value.a11y.translations.keyboardNavigation,isVisible:A.value})),void 0,!0)])):d(``,!0)]),e.$slots.watermark?(v(),f(`div`,pt,[b(e.$slots,`watermark`,_(h({isPrinting:S(z)||S(en)||S(Vn)||S(Hn)})),void 0,!0)])):d(``,!0),p(`div`,{id:`legend-bottom-${T.value}`},null,8,mt),Rt.value&&(P.value.legend.show||e.$slots.legend)?(v(),u(Be,{key:6,to:P.value.legend.position===`top`?`#legend-top-${T.value}`:`#legend-bottom-${T.value}`},[p(`div`,{ref_key:`chartLegend`,ref:Pt},[b(e.$slots,`legend`,{legend:J.value},()=>[P.value.legend.show?(v(),u(Pe,{key:`legend_${Mt.value}`,legendSet:J.value,config:An.value,onClickMarker:s[0]||=({legend:e})=>U(e)},{item:C(({legend:e,index:t})=>[S(I)?d(``,!0):(v(),f(`div`,{key:0,onClick:t=>U(e),style:Ke(`opacity:${H.value.includes(e.id)?.5:1}`)},x(e.display),13,ht))]),legendToggle:C(()=>[J.value.length>2&&P.value.legend.selectAllToggle.show&&!S(I)?(v(),u(Le,{key:0,backgroundColor:P.value.legend.selectAllToggle.backgroundColor,color:P.value.legend.selectAllToggle.color,fontSize:P.value.legend.fontSize,checked:H.value.length>0,onToggle:fn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):d(``,!0)]),_:1},8,[`legendSet`,`config`])):d(``,!0)],!0)],512)],8,[`to`])):d(``,!0),e.$slots.source?(v(),f(`div`,{key:7,ref_key:`source`,ref:Ft,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),Ue(S(vt),{teleportTo:P.value.tooltip.teleportTo,show:B.value.showTooltip&&Dt.value,backgroundColor:P.value.tooltip.backgroundColor,color:P.value.tooltip.color,borderRadius:P.value.tooltip.borderRadius,borderColor:P.value.tooltip.borderColor,borderWidth:P.value.tooltip.borderWidth,fontSize:P.value.tooltip.fontSize,backgroundOpacity:P.value.tooltip.backgroundOpacity,position:P.value.tooltip.position,offsetX:P.value.tooltip.offsetX,offsetY:P.value.tooltip.offsetY,parent:E.value,content:Ot.value,isFullscreen:q.value,isCustom:S(ie)(P.value.tooltip.customFormat),smooth:P.value.tooltip.smooth,backdropFilter:P.value.tooltip.backdropFilter,smoothForce:P.value.tooltip.smoothForce,smoothSnapThreshold:P.value.tooltip.smoothSnapThreshold,isA11yMode:Ut.value===`keyboard`,a11yPosition:Ht.value},{"tooltip-before":C(()=>[b(e.$slots,`tooltip-before`,_(h({...Cn.value})),void 0,!0)]),tooltip:C(()=>[b(e.$slots,`tooltip`,_(h({...Cn.value})),void 0,!0)]),"tooltip-after":C(()=>[b(e.$slots,`tooltip-after`,_(h({...Cn.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&&j.value.userOptions.buttons.table?(v(),u(Ye(Q.value.component),We({key:8},Q.value.props,{ref_key:`tableUnit`,ref:zt,onClose:In}),Ve({content:C(()=>[(v(),u(S(xt),{key:`table_${jt.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:j.value.table.useDialog?``:Q.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:F.value,onClose:In},{th:C(({th:e})=>[e===`__SUM__`?(v(),f(`div`,gt,[Ue(S(yt),{name:`sigma`,stroke:X.value.config.th.color,size:16},null,8,[`stroke`])])):(v(),f(`div`,_t,x(e),1))]),td:C(({td:e})=>[He(x(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[j.value.table.useDialog?{name:`title`,fn:C(()=>[He(x(Q.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:C(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>jn(j.value.userOptions.callbacks.csv),style:Ke({cursor:F.value?`pointer`:`default`})},[Ue(S(yt),{name:`fileCsv`,stroke:Q.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),b(e.$slots,`skeleton`,{},()=>[S(I)?(v(),u(Te,{key:0})):d(``,!0)],!0)],46,$e))}},[[`__scopeId`,`data-v-67236f63`]]);export{Qe as n,vt as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as ee}from"./annotationSlots-OLiW25XN.js";import{t as o}from"./chartImage-DPGnEuYM.js";import{n as te}from"./resolveChartConfig-0IvbmIE_.js";import{$ as s,Bt as c,Ht as ne,It as re,J as ie,Jt as ae,O as oe,S as se,X as ce,at as l,b as le,f as ue,i as de,in as fe,rn as pe,t as me,w as he,yt as ge,zt as _e}from"./lib-rPeBMZrn.js";import{c as ve}from"./canvas-lib-22VpOI4_.js";import{n as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./useConfig-_JwRfIqE.js";import{n as xe,t as Se}from"./BaseScanner-8NdoBs7B.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./useResponsive-CENUxfEL.js";import{t as Te}from"./useChartExport-BZts4KFb.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{t as Oe}from"./usePrefersMotion-XLHwega2.js";import{t as ke}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Ae}from"./vue_ui_gauge-Brc1-auP.js";import{n as je}from"./Title-BliHuXfT.js";import{t as Me}from"./DefGrad-DKMq1REY.js";import{t as Ne}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Pe,createVNode as Fe,defineAsyncComponent as Ie,guardReactiveProps as Le,mergeProps as g,nextTick as Re,normalizeClass as ze,normalizeProps as Be,normalizeStyle as Ve,onBeforeUnmount as He,onMounted as Ue,openBlock as _,ref as v,renderList as y,renderSlot as b,shallowRef as We,toDisplayString as x,toRefs as Ge,unref as S,watch as Ke,withCtx as qe}from"vue";var Je=/* @__PURE__ */ e({default:()=>Et}),Ye=[`id`],Xe={key:0},Ze=[`xmlns`,`viewBox`],Qe=[`width`,`height`],$e=[`id`],et=[`stdDeviation`],tt={key:1},nt=[`d`,`fill`,`stroke`],rt=[`d`,`fill`,`stroke`],it=[`d`,`fill`],at=[`id`,`d`],ot=[`fill`,`font-size`,`font-weight`],st=[`href`,`startOffset`],ct=[`text-anchor`,`fill`,`font-size`,`font-weight`,`innerHTML`],lt=[`d`,`filter`],ut=[`stroke`,`stroke-width`],dt=[`stroke`,`stroke-width`],ft=[`stroke`,`stroke-width`],pt=[`stroke`,`stroke-width`],mt={key:8},ht=[`x`,`y`,`text-anchor`,`font-size`,`font-weight`,`fill`],gt=[`x`,`y`,`font-size`,`font-weight`,`fill`],_t={key:0},vt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],yt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],bt=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`filter`],xt={key:1},St=[`d`,`fill`,`stroke`,`stroke-width`],Ct=[`cx`,`cy`,`fill`,`r`,`stroke-width`,`stroke`],wt=[`x`,`y`,`font-size`,`fill`],Tt={key:4,class:`vue-data-ui-watermark`},Et=/*#__PURE__*/ Ne({__name:`vue-ui-gauge`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:Ne,emit:Je}){let Et=Ie(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Dt=Ie(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Ot=Ie(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),{vue_ui_gauge:kt}=be(),At=Oe(),C=e,jt=Je,Mt=d(()=>!!C.dataset&&Object.keys(C.dataset).length>0&&C.dataset.series&&C.dataset.series.length),w=v(ce()),Nt=v(null),Pt=v(0),T=v(null),Ft=v(null),It=v(null),Lt=v(null),Rt=v(null),zt=v(0),E=v(qt()),D=d(()=>E.value.style.chart.layout.segmentSeparators),O=d(()=>E.value.style.chart.layout.segmentNames),k=d(()=>E.value.style.chart.layout.markers),A=d(()=>E.value.style.chart.layout.pointer),j=d(()=>E.value.style.chart.layout),M=d(()=>E.value.style.chart);ye({config:()=>E.value,dataset:()=>C.dataset,component:`VueUiGauge`,rules:[{test:e=>e?.series&&e.series?.length>6,message:[`👀 The number of steps is > 6, which can make the chart hard to read and labels overlap. Consider:`,``,`▶️ Using broader steps.`]}]});let Bt=d(()=>E.value.userOptions.useCursorPointer),Vt=d(()=>fe({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,animation:{use:!1},layout:{markers:{show:!1},segmentSeparators:{stroke:`#6A6A6A`},segmentNames:{show:!1},indicatorArc:{fill:`#6A6A6A50`},pointer:{stroke:`#6A6A6A`,useRatingColor:!0,circle:{stroke:`#6A6A6A`,color:`#6A6A6A`}}},legend:{show:!1}}}},userConfig:E.value.skeletonConfig??{}})),{loading:Ht,FINAL_DATASET:N,manualLoading:P}=xe({...Ge(C),FINAL_CONFIG:E,prepareConfig:qt,callback:()=>{Promise.resolve().then(async()=>{await Re()})},skeletonDataset:C.config?.skeletonDataset??{value:0,series:[{from:-1,to:0,name:`_`,color:`#A1A1A1`},{from:0,to:1,name:`__`,color:`#CACACA`}]},skeletonConfig:fe({defaultConfig:E.value,userConfig:Vt.value})}),{userOptionsVisible:Ut,setUserOptionsVisibility:Wt,keepUserOptionState:Gt}=Ee({config:E.value}),{svgRef:Kt}=De({config:M.value.title});Ke(()=>C.config,e=>{Ht.value||(E.value=qt()),Ut.value=!E.value.userOptions.showOnChartHover,nn(),zt.value+=1},{deep:!0}),Ke(()=>C.dataset,e=>{nn(),e&&Object.keys(e).length>0&&(P.value=E.value?.loading??!1)},{deep:!0,immediate:!1});function qt(){return te(C.config,kt,Ae)}let{isPrinting:F,isImaging:I,generatePdf:Jt,generateImage:Yt}=Ce({elementId:`vue-ui-gauge_${w.value}`,fileName:M.value.title.text||`vue-ui-gauge`,options:E.value.userOptions.print}),Xt=d(()=>E.value.userOptions.show&&!M.value.title.text),Zt=d(()=>he(E.value.customPalette)),L=d(()=>{if(_e(N.value.series||{}))return{value:0,series:[{from:0,to:0}]};let e=[];(N.value.series||[]).forEach(t=>{e.push(t.from||1e-7),e.push(t.to||1e-7)});let t=Math.max(...e);return{...N.value,series:(N.value.series||[]).map((e,n)=>({...e,color:se(e.color)||Zt.value[n]||ne[n],value:((e.to||0)-(e.from||0))/t*100}))}}),R=v(512),z=v({height:358.4,width:R.value,top:0,bottom:358.4,centerX:179.2,centerY:R.value/2,labelFontSize:18,legendFontSize:M.value.legend.fontSize,pointerRadius:A.value.circle.radius,trackSize:j.value.track.size,pointerSize:A.value.size,pointerStrokeWidth:A.value.strokeWidth,markerOffset:k.value.offsetY+3,segmentFontSize:O.value.fontSize}),B=v(0),V=v(0),H=d(()=>M.value.animation.use&&!At.value),U=v(H.value?Math.min(...N.value.series.map(e=>e.from)):N.value.value),W=null;function Qt(){W!==null&&(cancelAnimationFrame(W),W=null)}Ke(H,e=>{e||(Qt(),U.value=N.value.value)}),Ke(()=>N.value.value,()=>{rn(N.value.value)});let G=d(()=>{let e=z.value.width/2,t=X.value.base,n=Math.PI*((U.value+0-V.value)/(B.value-V.value))+Math.PI;return{x1:e,y1:t,x2:e+X.value.pointerSize*z.value.pointerSize*.9*Math.cos(n),y2:t+X.value.pointerSize*z.value.pointerSize*.9*Math.sin(n)}}),$t=d(()=>{let e=z.value.width/2,t=X.value.base,n=Math.PI*((U.value+0-V.value)/(B.value-V.value))+Math.PI,r=e+X.value.pointerSize*z.value.pointerSize*.9*Math.cos(n),i=t+X.value.pointerSize*z.value.pointerSize*.9*Math.sin(n),a=z.value.pointerRadius,ee=e+a*Math.cos(n+Math.PI/2),o=t+a*Math.sin(n+Math.PI/2),te=e+a*Math.cos(n-Math.PI/2),s=t+a*Math.sin(n-Math.PI/2);return isNaN(r)?null:`M ${r},${i} ${ee},${o} ${te},${s} Z`}),en=d(()=>{for(let e=0;e<L.value.series.length;e+=1){let{color:t,from:n,to:r}=L.value.series[e];if(U.value>=n&&U.value<=r)return t}return`#2D353C`}),K=We(null),q=We(null),J=d({get:()=>z.value.segmentFontSize,set:e=>e}),{autoSizeLabels:tn}=ke({svgRef:Kt,fontSize:z.value.segmentFontSize,minFontSize:O.value.minFontSize,sizeRef:J,labelClass:`.vue-ui-gauge-label-flat`}),Y=d(()=>E.value.debug);function nn(){let e=!1;if(_e(C.dataset)?(l({componentName:`VueUiGauge`,type:`dataset`,debug:Y.value}),P.value=!0,e=!0):(ge({datasetObject:C.dataset,requiredAttributes:[`value`,`series`]}).forEach(t=>{l({componentName:`VueUiGauge`,type:`datasetAttribute`,property:t,debug:Y.value}),P.value=!0,e=!0}),Object.hasOwn(C.dataset,`series`)&&(C.dataset.series.length?C.dataset.series.forEach((t,n)=>{ge({datasetObject:t,requiredAttributes:[`from`,`to`]}).forEach(t=>{l({componentName:`VueUiGauge`,type:`datasetSerieAttribute`,property:t,index:n,debug:Y.value}),P.value=!0,e=!0})}):(l({componentName:`VueUiGauge`,type:`datasetAttributeEmpty`,property:`series`,debug:Y.value}),P.value=!0,e=!0))),P.value=e,rn(N.value.value||0),E.value.responsive){let e=ve(()=>{let{width:e,height:t}=we({chart:T.value,title:M.value.title.text?Ft.value:null,legend:It.value,source:Lt.value,noTitle:Rt.value});t-=12,requestAnimationFrame(()=>{z.value.width=e,z.value.height=t,z.value.centerX=e/2,z.value.centerY=R.value/2/358.4*t,z.value.bottom=t,z.value.labelFontSize=18/R.value*Math.min(t,e)<10?10:18/R.value*Math.min(t,e),z.value.legendFontSize=M.value.legend.fontSize/R.value*Math.min(t,e)<14?14:M.value.legend.fontSize/R.value*Math.min(t,e),z.value.pointerRadius=A.value.circle.radius/R.value*Math.min(t,e),z.value.trackSize=j.value.track.size/R.value*Math.min(t,e),z.value.pointerStrokeWidth=pe({relator:Math.min(e,t),adjuster:R.value,source:A.value.strokeWidth,threshold:2,fallback:2}),z.value.markerOffset=pe({relator:Math.max(e,t),adjuster:R.value,source:k.value.offsetY+3,threshold:2,fallback:2}),z.value.segmentFontSize=pe({relator:Math.min(e,t),adjuster:R.value,source:O.value.fontSize,threshold:8,fallback:8})}),tn()});K.value&&(q.value&&K.value.unobserve(q.value),K.value.disconnect()),K.value=new ResizeObserver(e),q.value=T.value.parentNode,K.value.observe(q.value)}tn()}Ue(()=>{nn()}),He(()=>{Qt(),K.value&&(q.value&&K.value.unobserve(q.value),K.value.disconnect())});function rn(e){let t=[];if((L.value.series||[]).forEach(e=>{t.push(e.from||0),t.push(e.to||0)}),B.value=Math.max(...t),V.value=Math.min(...t),Qt(),!H.value){U.value=e;return}let n=M.value.animation.speed,r=Math.abs(e-U.value)/(n*60);function i(){H.value?(U.value<e?U.value=Math.min(U.value+r,e):U.value>e&&(U.value=Math.max(U.value-r,e)),W=U.value===e?null:requestAnimationFrame(i)):(U.value=e,W=null)}i()}let X=d(()=>{let e=E.value.responsive?Math.min(z.value.width,z.value.height):z.value.width,t=2.5/j.value.radiusRatio;return{arcs:e/t,gradients:e/(t*1.1),base:E.value.responsive?z.value.height/1.618:z.value.height*.7,ratingBase:E.value.responsive?z.value.height/2+z.value.height/4:z.value.height*.9,pointerSize:E.value.responsive?Math.min(z.value.width,z.value.height)/3:z.value.width/3.2}}),Z=d(()=>re({series:L.value.series},z.value.width/2,X.value.base,X.value.arcs,X.value.arcs,1,1,1,180,109.9495,40*z.value.trackSize)),an=d(()=>re({series:L.value.series},z.value.width/2,X.value.base,X.value.arcs*O.value.offsetRatio,X.value.arcs*O.value.offsetRatio,1,1,1,180,109.9495,40*z.value.trackSize)),Q=d(()=>Z.value.map(e=>X.value.arcs*O.value.offsetRatio*(e.nameOffsetRatio||1))),on=d(()=>{let{x:e,y:t}=c({initX:Z.value[0].firstSeparator.x,initY:Z.value[0].firstSeparator.y,centerX:G.value.x1,centerY:G.value.y1,offset:-D.value.offsetIn}),{x:n,y:r}=c({initX:Z.value[0].startX,initY:Z.value[0].startY,centerX:G.value.x1,centerY:G.value.y1,offset:D.value.offsetOut});return{x1:e,y1:t,x2:n,y2:r}}),sn=d(()=>Z.value.map(e=>{let{x:t,y:n}=c({initX:e.separator.x,initY:e.separator.y,centerX:G.value.x1,centerY:G.value.y1,offset:-D.value.offsetIn}),{x:r,y:i}=c({initX:e.endX,initY:e.endY,centerX:G.value.x1,centerY:G.value.y1,offset:D.value.offsetOut});return{x1:t,y1:n,x2:r,y2:i}}));function cn(e){if(e.reduce((e,t)=>e+t,0)>100)throw Error(`Total % must not exceed 100`);let t=0;return e.map(e=>(t+=e,`${t/100*50-e/4}%`))}let ln=d(()=>cn(Z.value.map(e=>e.proportion*100))),un=d(()=>re({series:L.value.series},z.value.width/2,X.value.base,X.value.gradients,X.value.gradients,.95,1,1,180,110.02,2*z.value.trackSize)),dn=d(()=>{let e=V.value>=0?-V.value:Math.abs(V.value);return oe({radius:j.value.indicatorArc.radius*z.value.trackSize,centerX:z.value.width/2,centerY:X.value.base,percentage:le((U.value+e)/(B.value+e))})}),$=v(!1);function fn(e){$.value=e,Pt.value+=1}let pn=v(!1);function mn(){pn.value=!pn.value}let hn=o(T,()=>M.value.title.text),gn=d(()=>M.value.backgroundColor),_n=d(()=>M.value.title),{isCallbackImaging:vn,isCallbackSvg:yn,generateSvg:bn,onGenerateImage:xn}=Te({svg:Kt,title:_n,legend:null,legendItems:null,backgroundColor:gn,getSvgCallback:()=>E.value.userOptions.callbacks.svg,generateImage:Yt});async function Sn(){jt(`copyAlt`,{config:E.value,dataset:L.value}),E.value.userOptions.callbacks.altCopy?await Promise.resolve(E.value.userOptions.callbacks.altCopy({config:E.value,dataset:L.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return Ne({getImage:hn,generatePdf:Jt,generateImage:Yt,generateSvg:bn,toggleAnnotator:mn,toggleFullscreen:fn,copyAlt:Sn}),(e,o)=>(_(),m(`div`,{class:ze(`vue-data-ui-component vue-ui-gauge ${$.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`gaugeChart`,ref:T,id:`vue-ui-gauge_${w.value}`,style:Ve(`font-family:${E.value.style.fontFamily};width:100%; text-align:center;background:${M.value.backgroundColor};${E.value.responsive?`height: 100%`:``}`),onMouseenter:o[0]||=()=>S(Wt)(!0),onMouseleave:o[1]||=()=>S(Wt)(!1)},[E.value.userOptions.buttons.annotator?(_(),f(S(Et),g({key:0},S(a)(E.value.userOptions.annotator),{svgRef:S(Kt),backgroundColor:M.value.backgroundColor,color:M.value.color,active:pn.value,isCursorPointer:Bt.value,palette:E.value.userOptions.annotatorPalette,onClose:mn}),Pe({_:2},[y(S(ee),t=>({name:t,fn:qe(n=>[b(e.$slots,t,Be(Le(S(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Xt.value?(_(),m(`div`,{key:1,ref_key:`noTitle`,ref:Rt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),M.value.title.text?(_(),m(`div`,{key:2,ref_key:`chartTitle`,ref:Ft,style:`width:100%;background:transparent;padding-bottom:12px`},[(_(),f(je,{key:`title_${zt.value}`,config:{title:{cy:`gauge-div-title`,...M.value.title},subtitle:{cy:`gauge-div-subtitle`,...M.value.title.subtitle}}},{default:qe(()=>[E.value.translations.base&&S(N).base?(_(),m(`span`,Xe,x(E.value.translations.base)+`: `+x(S(N).base),1)):p(``,!0)]),_:1},8,[`config`]))],512)):p(``,!0),E.value.userOptions.show&&Mt.value&&(S(Gt)||S(Ut))?(_(),f(S(Dt),g({ref_key:`details`,ref:Nt,key:`user_options_${Pt.value}`,backgroundColor:M.value.backgroundColor,color:M.value.color,isImaging:S(I),isPrinting:S(F),uid:w.value,hasXls:!1,isFullscreen:$.value,chartElement:T.value},S(n)(E.value.userOptions,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:pn.value,isCursorPointer:Bt.value,onToggleFullscreen:fn,onGeneratePdf:S(Jt),onGenerateImage:S(xn),onGenerateSvg:S(bn),onToggleAnnotator:mn,onCopyAlt:Sn,style:{visibility:S(Gt)?S(Ut)?`visible`:`hidden`:`visible`}}),Pe({_:2},[y(S(t)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:qe(n=>[b(e.$slots,t,Be(Le(S(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),(_(),m(`svg`,{ref_key:`svgRef`,ref:Kt,xmlns:S(me),class:ze({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${z.value.width<=0?10:z.value.width} ${z.value.height<=0?10:z.value.height}`,style:Ve(`max-width:100%;overflow:hidden !important;background:transparent;color:${M.value.color}`)},[Fe(S(Ot)),b(e.$slots,`svg-underlayer`,{svg:{...z.value,isPrintingImg:S(F)||S(I)||S(vn),isPrintingSvg:S(yn)}},void 0,!0),e.$slots[`chart-background`]?(_(),m(`foreignObject`,{key:0,x:0,y:0,width:z.value.width<=0?10:z.value.width,height:z.value.height<=0?10:z.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,Qe)):p(``,!0),h(`defs`,null,[Fe(Me,{t:`radial`,id:`gradient_${w.value}`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,S(ae)(`#FFFFFF`,1),1],[`80%`,S(ae)(`#FFFFFF`,j.value.track.gradientIntensity),1],[`100%`,S(ae)(`#FFFFFF`,1),1]]},null,8,[`id`,`stops`])]),h(`defs`,null,[h(`filter`,{id:`blur_${w.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[h(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:100/j.value.track.gradientIntensity},null,8,et)],8,$e)]),e.$slots.pattern?(_(),m(`g`,tt,[(_(!0),m(u,null,y(Z.value,(t,n)=>(_(),m(`defs`,null,[b(e.$slots,`pattern`,g({ref_for:!0},{seriesIndex:n,patternId:`pattern_${w.value}_${n}`}),void 0,!0)]))),256))])):p(``,!0),(_(!0),m(u,null,y(Z.value,(e,t)=>(_(),m(`path`,{key:`arc_${t}`,d:e.arcSlice,fill:e.color,stroke:M.value.backgroundColor,"stroke-linecap":`round`},null,8,nt))),128)),e.$slots.pattern?(_(!0),m(u,{key:2},y(Z.value,(e,t)=>(_(),m(`path`,{key:`arc_${t}`,d:e.arcSlice,fill:`url(#pattern_${w.value}_${t})`,stroke:M.value.backgroundColor,"stroke-linecap":`round`},null,8,rt))),128)):p(``,!0),j.value.indicatorArc.show?(_(),m(`path`,{key:3,d:dn.value,fill:j.value.indicatorArc.fill},null,8,it)):p(``,!0),O.value.show&&O.value.curved?(_(),m(u,{key:4},[(_(!0),m(u,null,y(Z.value,(e,t)=>(_(),m(`path`,{id:`curve_${w.value}_${t}`,d:`M ${G.value.x1},${G.value.y1} m -${Q.value[t]},0 a ${Q.value[t]},${Q.value[t]} 0 1,1 ${2*Q.value[t]},0 a ${Q.value[t]},${Q.value[t]} 0 1,1 -${2*Q.value[t]},0`,fill:`transparent`},null,8,at))),256)),(_(!0),m(u,null,y(Z.value,(e,t)=>(_(),m(`text`,{fill:O.value.useSerieColor?e.color:O.value.color,"font-size":J.value,"font-weight":O.value.bold?`bold`:`normal`,"text-anchor":`middle`},[h(`textPath`,{href:`#curve_${w.value}_${t}`,startOffset:ln.value[t]},x(e.name||``),9,st)],8,ot))),256))],64)):p(``,!0),O.value.show&&!O.value.curved?(_(!0),m(u,{key:5},y(an.value,(e,t)=>(_(),m(`text`,{class:`vue-ui-gauge-label-flat`,"text-anchor":S(ue)(e,!1,12).anchor,fill:O.value.useSerieColor?e.color:O.value.color,"font-size":J.value,"font-weight":O.value.bold?`bold`:`normal`,innerHTML:S(ie)({content:String(e.name??``),fontSize:J.value,fill:O.value.useSerieColor?e.color:O.value.color,x:e.center.endX,y:e.center.endY})},null,8,ct))),256)):p(``,!0),j.value.track.useGradient?(_(!0),m(u,{key:6},y(un.value,(e,t)=>(_(),m(`path`,{key:`arc_${t}`,d:e.arcSlice,fill:`#FFFFFF`,stroke:`none`,"stroke-linecap":`round`,filter:`url(#blur_${w.value})`},null,8,lt))),128)):p(``,!0),D.value.show?(_(),m(u,{key:7},[h(`line`,g(on.value,{stroke:M.value.backgroundColor,"stroke-width":D.value.strokeWidth+2,"stroke-linecap":`round`}),null,16,ut),h(`line`,g(on.value,{stroke:D.value.stroke,"stroke-width":D.value.strokeWidth,"stroke-linecap":`round`}),null,16,dt),(_(!0),m(u,null,y(sn.value,e=>(_(),m(`line`,g({ref_for:!0},e,{stroke:M.value.backgroundColor,"stroke-width":D.value.strokeWidth+2,"stroke-linecap":`round`}),null,16,ft))),256)),(_(!0),m(u,null,y(sn.value,e=>(_(),m(`line`,g({ref_for:!0},e,{stroke:D.value.stroke,"stroke-width":D.value.strokeWidth,"stroke-linecap":`round`}),null,16,pt))),256))],64)):p(``,!0),k.value.show?(_(),m(`g`,mt,[(_(!0),m(u,null,y(Z.value,(e,t)=>(_(),m(`text`,{x:S(c)({centerX:G.value.x1,centerY:X.value.base,initX:e.center.startX,initY:e.center.startY,offset:z.value.markerOffset}).x,y:S(c)({centerX:G.value.x1,centerY:X.value.base,initX:e.center.startX,initY:e.center.startY,offset:z.value.markerOffset}).y,"text-anchor":e.center.startX<G.value.x1-5?`end`:e.center.startX>G.value.x1+5?`start`:`middle`,"font-size":z.value.labelFontSize*k.value.fontSizeRatio,"font-weight":`${k.value.bold?`bold`:`normal`}`,fill:k.value.color},x(S(de)(k.value.formatter,e.from,S(s)({p:k.value.prefix,v:e.from,s:k.value.suffix,r:k.value.roundingValue}))),9,ht))),256))])):p(``,!0),k.value.show?(_(),m(`text`,{key:9,x:S(c)({centerX:z.value.width/2,centerY:X.value.base,initX:Z.value.at(-1).endX,initY:Z.value.at(-1).endY,offset:z.value.markerOffset}).x,y:S(c)({centerX:z.value.width/2,centerY:X.value.base,initX:Z.value.at(-1).endX,initY:Z.value.at(-1).endY,offset:z.value.markerOffset}).y,"text-anchor":`start`,"font-size":z.value.labelFontSize*k.value.fontSizeRatio,"font-weight":`${k.value.bold?`bold`:`normal`}`,fill:k.value.color},x(S(de)(k.value.formatter,B.value,S(s)({p:k.value.prefix,v:B.value,s:k.value.suffix,r:k.value.roundingValue}))),9,gt)):p(``,!0),A.value.show?(_(),m(u,{key:10},[A.value.type===`rounded`?(_(),m(`g`,_t,[isNaN(G.value.x2)?p(``,!0):(_(),m(`line`,{key:0,x1:G.value.x1,y1:G.value.y1,x2:G.value.x2,y2:G.value.y2,stroke:A.value.stroke,"stroke-width":z.value.pointerStrokeWidth,"stroke-linecap":`round`},null,8,vt)),isNaN(G.value.x2)?p(``,!0):(_(),m(`line`,{key:1,x1:G.value.x1,y1:G.value.y1,x2:G.value.x2,y2:G.value.y2,stroke:A.value.useRatingColor?en.value:A.value.color,"stroke-linecap":`round`,"stroke-width":z.value.pointerStrokeWidth*.7},null,8,yt)),!isNaN(G.value.x2)&&j.value.track.useGradient?(_(),m(`line`,{key:2,x1:G.value.x1,y1:G.value.y1,x2:G.value.x2,y2:G.value.y2,stroke:`white`,"stroke-linecap":`round`,"stroke-width":z.value.pointerStrokeWidth*.3,filter:`url(#blur_${w.value})`},null,8,bt)):p(``,!0)])):(_(),m(`g`,xt,[$t.value?(_(),m(`path`,{key:0,d:$t.value,fill:A.value.useRatingColor?en.value:A.value.color,stroke:A.value.stroke,"stroke-width":A.value.circle.strokeWidth,"stroke-linejoin":`round`},null,8,St)):p(``,!0)])),h(`circle`,{cx:z.value.width/2,cy:X.value.base,fill:A.value.circle.color,r:z.value.pointerRadius<=0?1e-4:z.value.pointerRadius,"stroke-width":A.value.circle.strokeWidth,stroke:A.value.circle.stroke},null,8,Ct)],64)):p(``,!0),M.value.legend.show?(_(),m(`text`,{key:11,x:z.value.width/2,y:X.value.ratingBase,"text-anchor":`middle`,"font-size":z.value.legendFontSize,"font-weight":`bold`,fill:M.value.legend.useRatingColor?en.value:M.value.legend.color},x(S(de)(M.value.legend.formatter,U.value,S(s)({p:M.value.legend.prefix+(M.value.legend.showPlusSymbol&&U.value>0?`+`:``),v:U.value,s:M.value.legend.suffix,r:M.value.legend.roundingValue}))),9,wt)):p(``,!0),b(e.$slots,`svg`,{svg:{...z.value,isPrintingImg:S(F)||S(I)||S(vn),isPrintingSvg:S(yn)}},void 0,!0)],14,Ze)),e.$slots.watermark?(_(),m(`div`,Tt,[b(e.$slots,`watermark`,Be(Le({isPrinting:S(F)||S(I)||S(vn)||S(yn)})),void 0,!0)])):p(``,!0),h(`div`,{ref_key:`chartLegend`,ref:It},[b(e.$slots,`legend`,{legend:L.value},void 0,!0)],512),e.$slots.source?(_(),m(`div`,{key:5,ref_key:`source`,ref:Lt,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),b(e.$slots,`skeleton`,{},()=>[S(Ht)?(_(),f(Se,{key:0})):p(``,!0)],!0)],46,Ye))}},[[`__scopeId`,`data-v-f1ec2351`]]);export{Je as n,Et as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s}from"./annotationViewport-X8fvs7pz.js";import{t as c}from"./chartImage-DPGnEuYM.js";import{t as l}from"./resolveChartConfig-0IvbmIE_.js";import{Dt as u,S as d,X as f,Zt as p,in as ee,t as te,tn as ne}from"./lib-rPeBMZrn.js";import{t as re}from"./usePanZoom-CE6Ofyy8.js";import{c as ie}from"./canvas-lib-22VpOI4_.js";import{n as ae}from"./useHints-C-TwxM0Y.js";import{t as oe}from"./useConfig-_JwRfIqE.js";import{n as se,t as ce}from"./BaseScanner-8NdoBs7B.js";import{t as le}from"./usePrinter-DVf3YcG5.js";import{t as ue}from"./useResponsive-CENUxfEL.js";import{t as de}from"./useChartExport-BZts4KFb.js";import{t as fe}from"./useUserOptionState-CXlFnwPv.js";import{t as pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as me}from"./geoProjections-CX3Pvo1N.js";import{n as he}from"./Title-BliHuXfT.js";import{t as ge}from"./vue_ui_geo-COGanKF8.js";import{t as _e}from"./A11yDataTable-DWNlWXzs.js";import{t as ve}from"./BaseZoomControls-D4i_j6vc.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as be,computed as m,createBlock as h,createCommentVNode as g,createElementBlock as _,createElementVNode as v,createSlots as xe,createVNode as Se,defineAsyncComponent as Ce,guardReactiveProps as y,mergeProps as we,nextTick as Te,normalizeClass as Ee,normalizeProps as b,normalizeStyle as De,onBeforeUnmount as Oe,onMounted as ke,openBlock as x,ref as S,renderList as C,renderSlot as w,toDisplayString as Ae,toRefs as je,unref as T,watch as Me,withCtx as Ne}from"vue";var Pe=/* @__PURE__ */ e({default:()=>Je}),Fe=[`id`],Ie=[`id`],Le={style:{position:`relative`}},Re=[`xmlns`,`viewBox`,`aria-describedby`,`id`],ze=[`transform`],Be=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],Ve=[`d`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],He=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseenter`],Ue=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],We=[`x`,`y`,`fill`,`font-size`],Ge={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ke={key:6,class:`vue-data-ui-watermark`},qe=1.5,Je=/*#__PURE__*/ ye({__name:`vue-ui-geo`,props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object],default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:ye,emit:Pe}){let Je=Ce(()=>import(`./Tooltip-C1q0Qoh7.js`)),Ye=Ce(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Xe=Ce(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Ze=Ce(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),E=e,Qe=Pe,{vue_ui_geo:$e}=oe(),D=S(f()),et=S(0),tt=S(0),O=S(null),k=S(!1),nt=S(null),rt=S(null),it=S(null),at=S(null),A=S(null),j=S(null),ot=S(null),st=S(null),M=S(null),ct=S({x:0,y:0}),N=S(`pointer`),lt=S(!1),P=S(!1);function ut(e){P.value=e,et.value+=1}function dt(){return l(E.config,$e,ge)}let F=S(dt()),ft=m(()=>F.value.style.chart.points.labels),I=m(()=>F.value.style.chart.points),L=m(()=>F.value.style.chart);ae({config:()=>F.value,dataset:()=>E.dataset,component:`VueUiGeo`,rules:[{test:e=>e.length>100,message:[`👀 The number of data points > 100, which can make the chart hard to read. Consider:`,``,`▶️ Using filters to reduce the number of data points displayed at the same time, and offer users some level of control.`]}]});let pt=m(()=>F.value.userOptions.useCursorPointer),{userOptionsVisible:mt,keepUserOptionState:ht}=fe({config:F.value}),{svgRef:R}=pe({config:L.value.title}),gt=m(()=>ee({defaultConfig:{map:{geoJson:{type:`FeatureCollection`,features:[{type:`Feature`,properties:{name:`Island A`},geometry:{type:`Polygon`,coordinates:[[[-6,2],[-4,2],[-4,4],[-6,4],[-6,2]]]}},{type:`Feature`,properties:{name:`Island B`},geometry:{type:`Polygon`,coordinates:[[[-2,-1],[1,-1],[1,2],[-2,2],[-2,-1]]]}},{type:`Feature`,properties:{name:`Island C`},geometry:{type:`Polygon`,coordinates:[[[3,-3],[5,-3],[5,-1],[3,-1],[3,-3]]]}},{type:`Feature`,properties:{name:`Island D`},geometry:{type:`Polygon`,coordinates:[[[4,3],[7,3],[7,5],[4,5],[4,3]]]}}]}},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,territory:{fill:`#99999950`,stroke:`#8A8A8A`,strokeWidth:.5}}}},userConfig:F.value.skeletonConfig??{}})),{loading:_t,FINAL_DATASET:vt}=se({...je(E),FINAL_CONFIG:F,prepareConfig:dt,allowEmptyDataset:!0,skeletonDataset:E.config?.skeletonDataset??[],skeletonConfig:ee({defaultConfig:F.value,userConfig:gt.value})}),{isPrinting:yt,isImaging:bt,generatePdf:xt,generateImage:St}=le({elementId:`vue-ui-geo_${D.value}`,fileName:L.value.title.text||`vue-ui-geo`,options:F.value.userOptions.print}),Ct=m(()=>L.value.controls.show?L.value.controls.position===`top`?ot.value?.$el??null:L.value.controls.position===`bottom`?st.value?.$el??null:null:null);function wt(){A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect(),A.value=null,j.value=null)}let z=m(()=>!!F.value.responsive&&!P.value);Me(()=>P.value,async e=>{e?(wt(),H.value=Number(L.value.dimensions.width)||H.value,U.value=Number(L.value.dimensions.height)||U.value,await Te(),k.value=!1,requestAnimationFrame(()=>{k.value||ln()})):F.value.responsive&&(await Te(),Tt())});function Tt(){if(wt(),!z.value)return;let e=ie(()=>{if(!O.value)return;let{width:e,height:t}=ue({chart:O.value,noTitle:Et.value?it.value:null,title:L.value.title.text?rt.value:null,legend:Ct.value,source:at.value});requestAnimationFrame(()=>{H.value=Math.max(.1,Number(e)||.1),U.value=Math.max(.1,Number(t)||.1)-24})});A.value=new ResizeObserver(e),j.value=O.value?O.value.parentNode:null,j.value&&A.value.observe(j.value),e()}let Et=m(()=>F.value.userOptions.show&&!L.value.title.text),B=S({showTooltip:L.value.tooltip.show}),V=S(L.value.zoom.active),Dt=p(E.config);Me(()=>E.config,(e,t)=>{let n=p(e),r=n!==Dt;Dt=n;let i=dt();r?(F.value=i,B.value.showTooltip=L.value.tooltip.show,V.value=L.value.zoom.active,H.value=L.value.dimensions.width,U.value=L.value.dimensions.height,Tt(),tt.value+=1,et.value+=1):(F.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=F.value.style.chart.tooltip.show)},{deep:!0});let{projections:Ot}=me,kt=m(()=>F.value?.projection||`equirectangular`),At=m(()=>{let e=Ot?.[kt.value];return typeof e==`function`?e:Ot.equirectangular}),jt=m(()=>F.value.map.geoJson??null),Mt={aitoff:{width:1e3,height:500},azimuthalEquidistant:{width:1e3,height:1e3},bonne:{width:1e3,height:1e3},equirectangular:{width:1e3,height:700},gallPeters:{width:1e3,height:800},globe:{width:1e3,height:1e3},hammer:{width:1e3,height:500},mercator:{width:1e3,height:750},mollweide:{width:1e3,height:600},robinson:{width:1e3,height:600},sinusoidal:{width:1e3,height:500},vanDerGrinten:{width:1e3,height:1e3},winkelTripel:{width:1e3,height:1e3}},H=S(L.value.dimensions.width),U=S(L.value.dimensions.height),Nt=m(()=>{let e=Mt[kt.value]||Mt.equirectangular;return{width:e.width,height:e.height}}),W=m(()=>{let e=Nt.value,t=H.value,n=U.value,r=Number.isFinite(t)&&t>0,i=Number.isFinite(n)&&n>0;return r&&i?{width:t,height:n}:r&&!i?{width:t,height:t*(e.height/e.width)}:!r&&i?{width:n*(e.width/e.height),height:n}:{width:e.width,height:e.height}}),Pt=m(()=>{let e=F.value?.map?.center,t=[0,0];if(!Array.isArray(e)||e.length!==2)return t;let n=Number(e[0]),r=Number(e[1]);return!Number.isFinite(n)||!Number.isFinite(r)?t:[n,r]});function Ft([e,t]){return At.value([e,t],Nt.value.width,Nt.value.height,Pt.value)}function It(e,t={}){let{defaultName:n=``,namePropertyCandidates:r=[`name`,`nom`,`admin`,`NAME`,`label`,`title`,`description`,`DESCRIPTION`,`NAME_1`,`NAME_2`,`NAME_3`,`NAME_EN`,`name:en`,`name_en`,`localname`,`local_name`],includeNullGeometries:i=!1}=t,a={type:`FeatureCollection`,features:[]};function o(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function s(e){return!o(e)||typeof e.type!=`string`?!1:e.type===`GeometryCollection`?Array.isArray(e.geometries):Object.hasOwn(e,`coordinates`)}function c(e){if(!o(e))return``;for(let t of r){let n=e[t];if(typeof n==`string`&&n.trim())return n.trim()}return``}function l({geometry:e,properties:t,fallbackName:r,featureIndex:i}){let a=o(t)?{...t}:{},s=c(a),l=n?`${n} ${i+1}`:``,u=s||(typeof r==`string`?r.trim():``)||l;return!a.name&&u&&(a.name=u),{type:`Feature`,geometry:e,properties:a}}function u(e,t,n,r,a){let c=Array.isArray(e?.geometries)?e.geometries:[],d=r;for(let e=0;e<c.length;e+=1){let r=c[e];r&&(o(r)&&r.type===`GeometryCollection`?d=u(r,t,n,d,a):s(r)&&(r.coordinates==null&&r.type!==`GeometryCollection`?i&&(a.push(l({geometry:null,properties:t,fallbackName:n,featureIndex:d})),d+=1):(a.push(l({geometry:r,properties:t,fallbackName:n,featureIndex:d})),d+=1)))}return d}function d(e,t,n=0){let r=n;if(e==null)return r;if(Array.isArray(e)){for(let n of e)r=d(n,t,r);return r}if(!o(e)||typeof e.type!=`string`)return r;if(e.type===`FeatureCollection`){let n=Array.isArray(e.features)?e.features:[];for(let e of n)r=d(e,t,r);return r}if(e.type===`Feature`){let n=o(e.properties)?e.properties:{},a=c(n),d=e.geometry??null;return d==null?(i&&(t.push(l({geometry:null,properties:n,fallbackName:a,featureIndex:r})),r+=1),r):o(d)&&d.type===`GeometryCollection`?u(d,n,a,r,t):(s(d)&&(t.push(l({geometry:d,properties:n,fallbackName:a,featureIndex:r})),r+=1),r)}return e.type===`GeometryCollection`?u(e,{},``,r,t):(s(e)&&(t.push(l({geometry:e,properties:{},fallbackName:``,featureIndex:r})),r+=1),r)}let f=[];return d(e,f,0),{...a,features:f}}function Lt(e){let t=Array.isArray(e?.features)?e.features:[];function n(e){if(!e||typeof e!=`object`)return``;let t=[e.name,e.nom,e.admin,e.NAME,e.label,e.title,e.description,e.DESCRIPTION,e.NAME_1,e.NAME_2,e.NAME_3,e.NAME_EN,e[`name:en`],e.name_en,e.localname,e.local_name];for(let e of t)if(typeof e==`string`&&e.trim())return e.trim();for(let t of Object.values(e))if(typeof t==`string`&&t.trim())return t.trim();return``}return t.filter(e=>e&&e.type===`Feature`&&e.geometry).map((e,t)=>{let r=e.properties||{},i=n(r);return{feature:e,geometry:e.geometry,properties:r,name:i,uid:`map-feature-${D.value}-${t}`,index:t}})}let Rt=m(()=>It(jt.value,{defaultName:``,includeNullGeometries:!1})),zt=m(()=>Lt(Rt.value));function Bt(e){if(!e||typeof e.type!=`string`)return``;if(e.type===`GeometryCollection`)return(Array.isArray(e.geometries)?e.geometries:[]).map(e=>Bt(e)).filter(Boolean).join(` `);let t=e=>{if(!Array.isArray(e)||e.length<2)return null;let t=Number(e[0]),n=Number(e[1]);if(!Number.isFinite(t)||!Number.isFinite(n))return null;let r=Ft([t,n]);if(!Array.isArray(r)||r.length<2)return null;let i=Number(r[0]),a=Number(r[1]);return!Number.isFinite(i)||!Number.isFinite(a)?null:[i,a]},n=e=>{let n=(e||[]).map(t).filter(Boolean);return n.length<2?``:`M`+n.map(([e,t])=>`${e},${t}`).join(`L`)},r=e=>(e||[]).map(e=>{let t=n(e);return t?t+`Z`:``}).filter(Boolean).join(` `);return e.type===`Polygon`?r(e.coordinates):e.type===`MultiPolygon`?(e.coordinates||[]).map(r).filter(Boolean).join(` `):e.type===`LineString`?n(e.coordinates):e.type===`MultiLineString`?(e.coordinates||[]).map(n).filter(Boolean).join(` `):``}function Vt(e){return e?e.type===`GeometryCollection`?(Array.isArray(e.geometries)?e.geometries:[]).flatMap(e=>Vt(e)):e.type===`Point`?Array.isArray(e.coordinates)?[e.coordinates]:[]:e.type===`MultiPoint`&&Array.isArray(e.coordinates)?e.coordinates:[]:[]}function Ht(e){return!e||typeof e.type!=`string`?!1:e.type===`GeometryCollection`?(Array.isArray(e.geometries)?e.geometries:[]).some(e=>Ht(e)):e.type===`Point`||e.type===`MultiPoint`}let Ut=m(()=>zt.value.filter(e=>{let t=e.geometry;return t?t.type===`GeometryCollection`?(Array.isArray(t.geometries)?t.geometries:[]).some(e=>e?.type===`Polygon`||e?.type===`MultiPolygon`):t.type===`Polygon`||t.type===`MultiPolygon`:!1})),Wt=m(()=>zt.value.filter(e=>{let t=e.geometry;return t?t.type===`GeometryCollection`?(Array.isArray(t.geometries)?t.geometries:[]).some(e=>e?.type===`LineString`||e?.type===`MultiLineString`):t.type===`LineString`||t.type===`MultiLineString`:!1})),Gt=m(()=>zt.value.filter(e=>{let t=e.geometry;return t?Ht(t):!1})),Kt=m(()=>Ut.value.map(e=>{let t=Bt(e.geometry);return t?{...e,path:t}:null}).filter(Boolean)),qt=m(()=>Wt.value.map(e=>{let t=Bt(e.geometry);return t?{...e,path:t}:null}).filter(Boolean)),Jt=m(()=>{let e=[];function t(e={}){let t=e?.style&&typeof e.style==`object`?e.style:{},n=e.radius??e.r??t.radius??t.r,r=e.color??e.fill??t.color??t.fill,i=e.stroke??t.stroke,a=e.strokeWidth??e.stroke_width??t.strokeWidth??t.stroke_width;return{radius:Number.isFinite(Number(n))?Number(n):Number(I.value.radius),fill:r!=null&&String(r).trim()?d(String(r).trim()):I.value.fill,stroke:i!=null&&String(i).trim()?d(String(i).trim()):I.value.stroke,strokeWidth:Number.isFinite(Number(a))?Number(a):Number(I.value.strokeWidth)}}for(let n of Gt.value){let r=Vt(n.geometry);for(let i=0;i<r.length;i+=1){let a=r[i];if(!Array.isArray(a)||a.length<2)continue;let o=Number(a[0]),s=Number(a[1]);if(!Number.isFinite(o)||!Number.isFinite(s))continue;let c=Ft([o,s]),l=c?.[0],u=c?.[1];if(!Number.isFinite(l)||!Number.isFinite(u))continue;let d=t(n?.feature?.properties&&typeof n.feature.properties==`object`?n.feature.properties:{});e.push({uid:`${n.uid}-geojson-point-${i}`,name:n.name||``,x:l,y:u,...d,originalFeature:n.feature,featureIndex:n.index,pointIndex:i})}}return e});function Yt(e){if(!e||typeof e.type!=`string`)return[];let t=[],n=e=>{if(!Array.isArray(e)||e.length<2)return;let n=Number(e[0]),r=Number(e[1]);if(!Number.isFinite(n)||!Number.isFinite(r))return;let i=Ft([n,r]),a=i?.[0],o=i?.[1];Number.isFinite(a)&&Number.isFinite(o)&&t.push([a,o])},r=e=>{if(Array.isArray(e)){if(e.length>=2&&typeof e[0]==`number`&&typeof e[1]==`number`)n(e);else for(let t of e)r(t)}};if(e.type===`GeometryCollection`&&Array.isArray(e.geometries)){for(let n of e.geometries)t.push(...Yt(n));return t}return e.type===`Point`?(n(e.coordinates),t):e.type===`MultiPoint`?((e.coordinates||[]).forEach(n),t):(r(e.coordinates),t)}function Xt(e){let t=[];for(let n of e)t.push(...Yt(n.geometry));if(!t.length)return null;let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let[e,o]of t)e<n&&(n=e),o<r&&(r=o),e>i&&(i=e),o>a&&(a=o);let o=i-n,s=a-r;return!(o>0)||!(s>0)?null:{minX:n,minY:r,maxX:i,maxY:a,width:o,height:s}}let G=m(()=>Xt(zt.value));function Zt({bounds:e,targetWidth:t,targetHeight:n,padding:r}){if(!e||!(e.width>0)||!(e.height>0))return{scale:1,translateX:0,translateY:0,transform:``};let i=Number.isFinite(Number(r))?Number(r):0,a=Math.max(1,t-i*2),o=Math.max(1,n-i*2),s=a/e.width,c=o/e.height,l=Math.min(s,c),u=e.width*l,d=e.height*l,f=i+(a-u)/2,p=i+(o-d)/2,ee=f-e.minX*l,te=p-e.minY*l;return{scale:l,translateX:ee,translateY:te,transform:`translate(${ee} ${te}) scale(${l})`}}let Qt=m(()=>{let e=G.value;if(!e)return{scale:1,translateX:0,translateY:0,transform:``};let t=F.value?.map?.fitPadding,n=Number.isFinite(Number(t))?Number(t):0;return Zt({bounds:e,targetWidth:W.value.width,targetHeight:W.value.height,padding:n})}),$t=m(()=>`0 0 ${W.value.width} ${W.value.height}`),{viewBox:en,resetZoom:tn,setInitialViewBox:nn,scale:rn,zoomByFactor:an}=re(R,{x:0,y:0,width:W.value.width,height:W.value.height},1,V);function on(){V.value=!V.value}function sn(e){let t=Qt.value,n=Number(t?.scale)||1,r=Number(t?.translateX)||0,i=Number(t?.translateY)||0;return{x:e.x*n+r,y:e.y*n+i}}function cn(){let e=F.value?.map?.center,t=Number(e?.[0]),n=Number(e?.[1]),r=Array.isArray(e)&&e.length===2&&Number.isFinite(t)&&Number.isFinite(n)&&(t!==0||n!==0),i=W.value.width,a=W.value.height;if(!r)return{x:0,y:0,width:i,height:a};let o=Ft([t,n]),s=o?.[0],c=o?.[1];if(!Number.isFinite(s)||!Number.isFinite(c))return{x:0,y:0,width:i,height:a};let l=sn({x:s,y:c});return{x:l.x-i/2,y:l.y-a/2,width:i,height:a}}function ln(){let e=cn();nn(e,{overwriteCurrentIfNotZoomed:!0}),k.value=!0}let un=m(()=>{let e=en.value;return e?`${e.x} ${e.y} ${e.width} ${e.height}`:$t.value});function dn(){an(qe,!0)}function fn(){an(1/qe,!0)}async function pn(){let e=cn();nn(e,{overwriteCurrentIfNotZoomed:!0}),tn(!0)}Me(()=>[F.value.projection,F.value.map.center?.[0],F.value.map.center?.[1],F.value.map.fitPadding,jt.value],async()=>{k.value=!1,await Te(),requestAnimationFrame(()=>{k.value||ln()})},{deep:!1}),Me(()=>[H.value,U.value,z.value],async()=>{z.value&&(await Te(),nn({x:0,y:0,width:W.value.width,height:W.value.height},{overwriteCurrentIfNotZoomed:!0}),k.value=!1,requestAnimationFrame(()=>{k.value||ln()}))},{flush:`post`});function mn(e){return e?e.type===`FeatureCollection`&&Array.isArray(e.features)?e.features.filter(e=>e?.type===`Feature`&&e.geometry?.type===`Point`).map((e,t)=>{let n=e.properties||{},r=n.name||n.label||n.title||`Point ${t+1}`,i=e.geometry.coordinates;return{uid:`map-point-${D.value}-${t}`,name:r,coordinates:i,color:n.color??null,radius:n.radius??null,hoverRadiusRatio:I.value.hoverRadiusRatio,description:n.description??null,original:e,index:t}}):Array.isArray(e)?e.map((e,t)=>{let n=null,r=`Point ${t+1}`,i=null,a=null,o=null;Array.isArray(e)&&e.length>=2?n=[Number(e[0]),Number(e[1])]:e&&typeof e==`object`&&(Array.isArray(e.coordinates)&&e.coordinates.length>=2?n=[Number(e.coordinates[0]),Number(e.coordinates[1])]:Number.isFinite(Number(e.lon))&&Number.isFinite(Number(e.lat))&&(n=[Number(e.lon),Number(e.lat)]),typeof e.name==`string`&&e.name.trim()&&(r=e.name),e.description!=null&&(i=e.description),e.color!=null&&(a=e.color),e.radius!=null&&(o=e.radius));let s=n?n[0]:NaN,c=n?n[1]:NaN;return!Number.isFinite(s)||!Number.isFinite(c)?null:{uid:`map-point-${D.value}-${t}`,name:r,coordinates:[s,c],color:a,radius:o,hoverRadiusRatio:I.value.hoverRadiusRatio,description:i,original:e,index:t}}).filter(Boolean):typeof e==`object`?Object.entries(e).map(([e,t],n)=>{if(!t||typeof t!=`object`)return null;let r=Array.isArray(t.coordinates)?t.coordinates:null;if(!r||r.length<2)return null;let i=Number(r[0]),a=Number(r[1]);return!Number.isFinite(i)||!Number.isFinite(a)?null:{uid:`map-point-${D.value}-${n}-${e}`,name:t.name||e,coordinates:[i,a],color:t.color??null,radius:t.radius??null,hoverRadiusRatio:I.value.hoverRadiusRatio,description:t.description??null,original:t,index:n}}).filter(Boolean):[]:[]}let hn=m(()=>mn(vt.value)),gn=m(()=>hn.value.map(e=>{let t=Ft(e.coordinates),n=t?.[0],r=t?.[1];return!Number.isFinite(n)||!Number.isFinite(r)?null:{...e,x:n,y:r,fill:e.color?d(e.color):I.value.fill,radius:Number.isFinite(Number(e.radius))?Number(e.radius):I.value.radius}}).filter(Boolean)),K=m(()=>gn.value.map((e,t)=>({...e,keyboardIndex:t})));function _n(e){let t=sn(e),n=ne(t.x,t.y,R.value);n&&(ct.value={x:n.x,y:n.y})}let vn=S(!1),yn=S(``),q=S(!1),J=S(null),Y=S(null);function bn(e){yn.value=e,vn.value=!0}function X(){vn.value=!1,yn.value=``}function xn(e){return String(e??``).replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`).replaceAll(`"`,`&quot;`).replaceAll(`'`,`&#039;`)}function Sn(e){nt.value={datapoint:e,seriesIndex:e.index,series:hn.value,config:F.value},q.value=!1;let t=L.value.tooltip.customFormat;if(u(t))try{let e=t(nt.value);if(typeof e==`string`)return q.value=!0,e}catch{console.warn(`Custom format cannot be applied.`),q.value=!1}return`<div><div style="font-weight:600">${xn(e.name)}</div>${e.description==null?``:`<div style="margin-top:6px">${xn(e.description)}</div>`}</div>`}function Cn(e){q.value=!1;let t=L.value.tooltip.customFormat;if(u(t))try{let n=t({datapoint:e,config:F.value});if(typeof n==`string`)return q.value=!0,n}catch{console.warn(`Custom format cannot be applied.`),q.value=!1}let n=typeof e?.name==`string`?e.name.trim():``;return n?`<div><div style="font-weight:600">${xn(n)}</div></div>`:(q.value=!1,``)}function wn(e){F.value.events.territoryEnter&&F.value.events.territoryEnter({datapoint:e,seriesIndex:e.index}),!(typeof e?.name==`string`&&e.name.trim())&&!L.value.territory.hover.enabledWhenEmpty?(Y.value=null,X()):(Y.value=e.uid,bn(Cn(e)))}function Tn(e){Y.value=null,X(),F.value.events.territoryLeave&&F.value.events.territoryLeave({datapoint:e,seriesIndex:e.index})}function En(e){F.value.events.territoryClick&&F.value.events.territoryClick({datapoint:e,seriesIndex:e.index})}function Dn(e,t=null,n=`pointer`){N.value=n,J.value=e.uid,Number.isInteger(t)&&(M.value=t),n===`keyboard`&&_n(e),bn(Sn(e)),F.value.events.datapointEnter&&F.value.events.datapointEnter({datapoint:e,seriesIndex:e.index})}function On(e,t=`pointer`){(t!==`pointer`||N.value!==`keyboard`)&&(J.value=null,X(),t!==`pointer`&&(M.value=null,N.value=`pointer`),F.value.events.datapointLeave&&F.value.events.datapointLeave({datapoint:e,seriesIndex:e.index}))}let kn=m(()=>!!F.value.events.datapointClick&&typeof F.value.events.datapointClick==`function`);function An(e){kn.value&&F.value.events.datapointClick({datapoint:e,seriesIndex:e.index})}let Z=m(()=>L.value.territory);function jn(e){let t=typeof e?.name==`string`?e.name.trim():``;if(!t){Y.value=null,X();return}let n={name:t,uid:e.uid,index:e.featureIndex,properties:{}};Y.value=e.uid,bn(Cn(n))}function Mn(){Y.value=null,X()}let Nn=S(!1);function Pn(){Nn.value=!Nn.value}Me(()=>Nn.value,e=>{V.value=!e});function Fn(){B.value.showTooltip=!B.value.showTooltip}let In=m(()=>L.value.backgroundColor),Ln=m(()=>L.value.title),{isCallbackImaging:Rn,isCallbackSvg:zn,generateSvg:Bn,onGenerateImage:Vn}=de({svg:R,title:Ln,legend:null,legendItems:null,backgroundColor:In,getSvgCallback:()=>F.value.userOptions.callbacks.svg,generateImage:St}),Hn=c(O,()=>L.value.title.text),Q=S(!1),$=null;function Un(){V.value&&(Q.value=!0)}function Wn(){Q.value=!1}function Gn(){V.value&&(Q.value=!0,$&&clearTimeout($),$=setTimeout(()=>{Q.value=!1,$=null},140))}Oe(()=>{$&&clearTimeout($)});async function Kn([e,t],{animated:n=!0}={}){let r=Number(e),i=Number(t);if(!Number.isFinite(r)||!Number.isFinite(i))return;let a=Ft([r,i]),o=a?.[0],s=a?.[1];if(!Number.isFinite(o)||!Number.isFinite(s))return;let c=sn({x:o,y:s}),l=en.value?{...en.value}:{x:0,y:0,width:W.value.width,height:W.value.height},u={x:c.x-l.width/2,y:c.y-l.height/2,width:l.width,height:l.height};if(!n){en.value=u;return}let d={...l},f={...u},p=null,ee=e=>{p??=e;let t=Math.min((e-p)/250,1);en.value={x:d.x+(f.x-d.x)*t,y:d.y+(f.y-d.y)*t,width:d.width+(f.width-d.width)*t,height:d.height+(f.height-d.height)*t},t<1&&requestAnimationFrame(ee)};requestAnimationFrame(ee)}ke(async()=>{Tt(),await Te(),requestAnimationFrame(()=>{k.value||(ln(),(F.value.map.center?.[0]||F.value.map.center?.[1])&&Kn(F.value.map.center,{animated:!1}))})}),Oe(()=>{wt()});async function qn(){Qe(`copyAlt`,{config:F.value,dataset:vt.value}),F.value.userOptions.callbacks.altCopy?await Promise.resolve(F.value.userOptions.callbacks.altCopy({config:F.value,dataset:vt.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Jn(e,t){let n=K.value;if(!n.length)return null;let r=n[e];if(!r)return null;let i=null,a=1/0;for(let o=0;o<n.length;o+=1){if(o===e)continue;let s=n[o],c=s.x-r.x,l=s.y-r.y,u=!1,d=0,f=0;if(t===`right`&&c>0&&(u=!0,d=c,f=Math.abs(l)),t===`left`&&c<0&&(u=!0,d=Math.abs(c),f=Math.abs(l)),t===`down`&&l>0&&(u=!0,d=l,f=Math.abs(c)),t===`up`&&l<0&&(u=!0,d=Math.abs(l),f=Math.abs(c)),!u)continue;let p=d*d+f*f*4;p<a&&(a=p,i=o)}return i}function Yn(e){let t=K.value;return t.length?e===`right`?t.reduce((e,t,n,r)=>t.x<r[e].x?n:e,0):e===`left`?t.reduce((e,t,n,r)=>t.x>r[e].x?n:e,0):e===`down`?t.reduce((e,t,n,r)=>t.y<r[e].y?n:e,0):e===`up`?t.reduce((e,t,n,r)=>t.y>r[e].y?n:e,0):0:null}function Xn(){lt.value=!0}function Zn(){let e=M.value==null?null:K.value[M.value];e?On(e,`keyboard`):(M.value=null,N.value=`pointer`,X(),J.value=null),lt.value=!1}function Qn(e){if(!R.value||Nn.value||document.activeElement!==R.value||!K.value.length)return;let t=e.key===`ArrowRight`,n=e.key===`ArrowLeft`,r=e.key===`ArrowDown`,i=e.key===`ArrowUp`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){let e=M.value==null?null:K.value[M.value];e?On(e,`keyboard`):(M.value=null,N.value=`pointer`,X(),J.value=null);return}if(a){let e=M.value==null?null:K.value[M.value];if(!e)return;An(e);return}let s=t?`right`:n?`left`:r?`down`:`up`,c=null;if(M.value==null?c=Yn(s):(c=Jn(M.value,s),c??=Yn(s)),c==null)return;let l=K.value[c];l&&Dn(l,c,`keyboard`)}let $n=m(()=>({headers:[`Name`,`Latitude`,`Longitude`,`Description`],rows:hn.value.map(e=>{let t=Array.isArray(e.coordinates)?e.coordinates[1]:null,n=Array.isArray(e.coordinates)?e.coordinates[0]:null;return[e.name??``,Number.isFinite(t)?String(t):``,Number.isFinite(n)?String(n):``,e.description??``]})}));ye({getImage:Hn,generatePdf:xt,generateImage:St,generateSvg:Bn,toggleTooltip:Fn,toggleAnnotator:Pn,toggleFullscreen:ut,zoomIn:dn,zoomOut:fn,resetZoom:tn,focusLocation:Kn,copyAlt:qn});let er=m(()=>s(F.value.userOptions?.annotator?.followZoom,en.value));return(e,s)=>(x(),_(`div`,{class:Ee(`vue-data-ui-component vue-ui-geo ${P.value?`vue-data-ui-wrapper-fullscreen`:``} ${z.value?`vue-ui-geo-responsive`:``} ${Q.value?`vue-ui-geo-interacting`:``}`),ref_key:`geoChart`,ref:O,id:`map_${D.value}`,dir:`auto`,style:De({fontFamily:F.value.style.fontFamily,width:`100%`,backgroundColor:L.value.backgroundColor,height:z.value?`${U.value}px`:void 0})},[v(`div`,{id:`chart-instructions-${D.value}`,class:`sr-only`},[v(`p`,null,Ae(F.value.a11y.translations.keyboardNavigation),1)],8,Ie),$n.value?.rows?.length?(x(),h(_e,{key:0,uid:D.value,head:$n.value.headers,body:$n.value.rows,notice:F.value.a11y.translations.tableAvailable,caption:F.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):g(``,!0),Et.value?(x(),_(`div`,{key:1,ref_key:`noTitle`,ref:it,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):g(``,!0),L.value.title.text?(x(),_(`div`,{key:2,ref_key:`chartTitle`,ref:rt,style:`width:100%;background:transparent;padding-bottom:12px`},[(x(),h(he,{key:`title_${tt.value}`,config:{title:{cy:`geo-title`,...L.value.title},subtitle:{cy:`geo-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):g(``,!0),F.value.userOptions.buttons.annotator?(x(),h(T(Xe),we({key:3},T(a)(F.value.userOptions.annotator),{svgRef:T(R),followZoom:F.value.userOptions?.annotator?.followZoom,annotationViewport:er.value,backgroundColor:L.value.backgroundColor,color:L.value.color,active:Nn.value,isCursorPointer:pt.value,palette:F.value.userOptions.annotatorPalette,onClose:Pn}),xe({_:2},[C(T(o),t=>({name:t,fn:Ne(n=>[w(e.$slots,t,b(y(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):g(``,!0),F.value.userOptions.show&&(T(ht)||T(mt))?(x(),h(T(Ye),we({ref:`userOptionsRef`,key:`user_options_${et.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:T(yt),isImaging:T(bt),uid:D.value,hasXls:!1,hasTable:!1,hasTooltip:F.value.userOptions.buttons.tooltip&&L.value.tooltip.show,isZoom:V.value,isFullscreen:P.value,isTooltip:B.value.showTooltip,chartElement:O.value},T(n)(F.value.userOptions,`pdf img svg fullscreen altCopy annotator zoom`),{isAnnotation:Nn.value,isCursorPointer:pt.value,onToggleFullscreen:ut,onGeneratePdf:T(xt),onGenerateImage:T(Vn),onGenerateSvg:T(Bn),onToggleTooltip:Fn,onToggleAnnotator:Pn,onToggleZoom:on,onCopyAlt:qn,style:{visibility:T(ht)?T(mt)?`visible`:`hidden`:`visible`}}),xe({_:2},[C(T(t)(e.$slots,`menuIcon optionTooltip optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ne(n=>[w(e.$slots,t,b(y(T(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isZoom`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):g(``,!0),L.value.controls.position===`top`&&L.value.controls.show&&!T(_t)?(x(),h(ve,{key:5,ref_key:`zoomControlsTop`,ref:ot,config:F.value,scale:T(rn),isFullscreen:P.value,isCursorPointer:pt.value,onZoomIn:dn,onZoomOut:fn,onResetZoom:pn},null,8,[`config`,`scale`,`isFullscreen`,`isCursorPointer`])):g(``,!0),v(`div`,Le,[(x(),_(`svg`,{ref_key:`svgRef`,ref:R,xmlns:T(te),viewBox:un.value,preserveAspectRatio:`xMidYMid meet`,"aria-describedby":`map-keyboard-instructions-${D.value}`,tabindex:`0`,style:De({display:`block`,width:`100%`,height:z.value?`${U.value}px`:`auto`,background:L.value.backgroundColor,touchAction:V.value?`none`:`auto`,cursor:V.value?Q.value?`grabbing`:`grab`:`default`}),id:`vue-ui-geo_${D.value}`,onPointerdown:Un,onPointerup:Wn,onPointercancel:Wn,onPointerleave:Wn,onWheel:Gn,onFocus:Xn,onBlur:Zn,onKeydown:Qn},[Se(T(Ze)),v(`g`,{transform:Qt.value.transform,style:De({pointerEvents:Q.value?`none`:`auto`})},[w(e.$slots,`svg-underlayer`,{svg:{drawingArea:un.value,x:G.value?.minX??0,y:G.value?.minY??0,width:G.value?.width??0,height:G.value?.height??0,isPrintingImg:T(yt)||T(bt)||T(Rn),isPrintingSvg:T(zn),data:{areaPaths:Kt.value,linePaths:qt.value,geoJsonPoints:Jt.value,projectedPoints:gn.value}}},void 0,!0),v(`g`,null,[(x(!0),_(be,null,C(Kt.value,e=>(x(),_(`path`,{class:`vue-ui-geo-territory`,key:e.uid,d:e.path,fill:Y.value===e.uid?Z.value.hover.fill:Z.value.fill,stroke:Y.value===e.uid?Z.value.hover.stroke:Z.value.stroke,"stroke-width":Y.value===e.uid?Z.value.hover.strokeWidth:Z.value.strokeWidth,"vector-effect":`non-scaling-stroke`,onMouseenter:t=>wn(e),onMouseleave:t=>Tn(e),onClick:t=>En(e)},null,40,Be))),128))]),v(`g`,null,[(x(!0),_(be,null,C(qt.value,e=>(x(),_(`path`,{class:`vue-ui-geo-territory`,key:e.uid,d:e.path,fill:`none`,stroke:Y.value===e.uid?Z.value.hover.stroke:Z.value.stroke,"stroke-width":Y.value===e.uid?Z.value.hover.strokeWidth:Z.value.strokeWidth,"vector-effect":`non-scaling-stroke`,onMouseenter:t=>wn(e),onMouseleave:t=>Tn(e),onClick:t=>En(e)},null,40,Ve))),128))]),v(`g`,null,[(x(!0),_(be,null,C(Jt.value,e=>(x(),_(`circle`,{key:e.uid,cx:e.x,cy:e.y,r:e.radius,fill:e.fill,stroke:e.stroke,"stroke-width":e.strokeWidth,"vector-effect":`non-scaling-stroke`,onMouseenter:t=>jn(e),onMouseleave:Mn},null,40,He))),128))]),(x(!0),_(be,null,C(gn.value,(t,n)=>(x(),_(`g`,{key:t.uid},[w(e.$slots,`datapoint`,we({ref_for:!0},{point:t,onPointEnter:Dn,onPointLeave:On,onPointClick:An,highlighted:J.value===t.uid}),()=>[v(`circle`,{class:Ee({"vue-ui-geo-point":!0,"vue-ui-geo-point-with-event":kn.value&&pt.value}),cx:t.x,cy:t.y,r:J.value===t.uid?t.radius*t.hoverRadiusRatio:t.radius,fill:t.fill,stroke:I.value.stroke,"stroke-width":I.value.strokeWidth,"vector-effect":`non-scaling-stroke`,onMouseenter:e=>Dn(t,n),onMouseleave:e=>On(t),onClick:e=>An(t)},null,42,Ue)],!0),ft.value.show?(x(),_(`text`,{key:0,class:`vue-ui-geo-point-label`,x:t.x,y:t.y+(J.value===t.uid?t.radius*t.hoverRadiusRatio:t.radius)+ft.value.offsetY+1*ft.value.fontSizeRatio,"text-anchor":`middle`,fill:ft.value.color,"font-size":1*ft.value.fontSizeRatio},Ae(t.name),9,We)):g(``,!0)]))),128)),w(e.$slots,`svg`,{svg:{drawingArea:un.value,x:G.value?.minX??0,y:G.value?.minY??0,width:G.value?.width??0,height:G.value?.height??0,isPrintingImg:T(yt)||T(bt)||T(Rn),isPrintingSvg:T(zn),data:{areaPaths:Kt.value,linePaths:qt.value,geoJsonPoints:Jt.value,projectedPoints:gn.value}}},void 0,!0)],12,ze)],44,Re)),e.$slots.hint?(x(),_(`div`,Ge,[w(e.$slots,`hint`,b(y({hint:F.value.a11y.translations.keyboardNavigation,isVisible:lt.value})),void 0,!0)])):g(``,!0)]),e.$slots.watermark?(x(),_(`div`,Ke,[w(e.$slots,`watermark`,b(y({isPrinting:T(yt)||T(bt)||T(Rn)||T(zn)})),void 0,!0)])):g(``,!0),L.value.controls.position===`bottom`&&L.value.controls.show&&!T(_t)?(x(),h(ve,{key:7,ref_key:`zoomControlsBottom`,ref:st,config:F.value,scale:T(rn),isFullscreen:P.value,isCursorPointer:pt.value,onZoomIn:dn,onZoomOut:fn,onResetZoom:pn},null,8,[`config`,`scale`,`isFullscreen`,`isCursorPointer`])):g(``,!0),Se(T(Je),{teleportTo:L.value.tooltip.teleportTo,show:B.value.showTooltip&&vn.value,backgroundColor:L.value.tooltip.backgroundColor,color:L.value.tooltip.color,fontSize:L.value.tooltip.fontSize,borderRadius:L.value.tooltip.borderRadius,borderColor:L.value.tooltip.borderColor,borderWidth:L.value.tooltip.borderWidth,backgroundOpacity:L.value.tooltip.backgroundOpacity,position:L.value.tooltip.position,offsetX:L.value.tooltip.offsetX,offsetY:L.value.tooltip.offsetY,parent:O.value,content:yn.value,isCustom:q.value,isFullscreen:P.value,smooth:L.value.tooltip.smooth,backdropFilter:L.value.tooltip.backdropFilter,smoothForce:L.value.tooltip.smoothForce,smoothSnapThreshold:L.value.tooltip.smoothSnapThreshold,isA11yMode:N.value===`keyboard`,a11yPosition:ct.value},{"tooltip-before":Ne(()=>[w(e.$slots,`tooltip-before`,b(y({...nt.value})),void 0,!0)]),tooltip:Ne(()=>[w(e.$slots,`tooltip`,b(y({...nt.value})),void 0,!0)]),"tooltip-after":Ne(()=>[w(e.$slots,`tooltip-after`,b(y({...nt.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),e.$slots.source?(x(),_(`div`,{key:8,ref_key:`source`,ref:at,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):g(``,!0),w(e.$slots,`skeleton`,{},()=>[T(_t)?(x(),h(ce,{key:0})):g(``,!0)],!0)],14,Fe))}},[[`__scopeId`,`data-v-bb0d2d03`]]);export{Pe as n,Je as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./useHints-C-TwxM0Y.js";import{t as ee}from"./useConfig-_JwRfIqE.js";import{$ as r,X as te,at as ne,i,in as a}from"./lib-rPeBMZrn.js";import{t as o}from"./useNestedProp-DnGoh-XS.js";import{n as s,t as c}from"./BaseScanner-8NdoBs7B.js";import{t as l}from"./DefGrad-DKMq1REY.js";import{t as u}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as d,computed as f,createBlock as re,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createVNode as g,defineAsyncComponent as _,normalizeStyle as v,onMounted as y,openBlock as b,ref as x,renderSlot as ie,toDisplayString as S,toRefs as ae,unref as C,useSlots as oe,watch as w}from"vue";var T=/* @__PURE__ */ e({default:()=>B}),E=[`aria-label`,`aria-valuenow`,`aria-valuetext`,`aria-busy`],D=[`viewBox`,`width`],O={key:0},k=[`stroke`],A=[`stroke`],j=[`width`,`fill`],M=[`fill`],N={key:0},P=[`id`],F=[`stroke`],I=[`stroke`,`stroke-dasharray`,`stroke-dashoffset`],L=[`filter`],R=[`stroke`,`stroke-dasharray`,`stroke-dashoffset`],z=[`fill`],B=/*#__PURE__*/ u({__name:`vue-ui-gizmo`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number}},setup(e){let u=_(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),{vue_ui_gizmo:T}=ee(),B=e,V=x(te()),H=oe();y(()=>{W()}),y(()=>{H[`chart-background`]&&U.value&&console.warn(`VueUiGizmo does not support the #chart-background slot.`)});let U=f(()=>G.value.debug);function W(){!B.dataset&&B.dataset!==0&&ne({componentName:`VueUiGizmo`,type:`dataset`,debug:U.value}),B.dataset<0&&U.value&&console.warn(`VueUiGizmo: dataset cannot be negative.`),B.dataset>100&&U.value&&console.warn(`VueUiGizmo: gauge is maxed out, as dataset exceeds 100% (props.dataset = ${B.dataset})`)}let G=x(Y());t({config:()=>G.value,dataset:()=>B.dataset,component:`VueUiGizmo`,rules:[n.noHint]});let K=f(()=>a({defaultConfig:{stroke:`#6A6A6A80`,color:`#6A6A6A`,gradientColor:`#CACACA`,textColor:`transparent`},userConfig:G.value.skeletonConfig??{}})),{loading:q,FINAL_DATASET:J,manualLoading:se}=s({...ae(B),FINAL_CONFIG:G,prepareConfig:Y,dsIsNumber:!0,skeletonDataset:B.config?.skeletonDataset??50,skeletonConfig:a({defaultConfig:G.value,userConfig:K.value})});function Y(){return o({userConfig:B.config,defaultConfig:T})}w(()=>B.config,e=>{G.value=Y(),W()},{deep:!0});let X=f(()=>({battery:{width:G.value.showPercentage?150:80,height:50},gauge:{width:80,height:80}})[G.value.type]),Z=f(()=>Math.min(Math.max(0,J.value),100)),Q=f(()=>Math.max(0,J.value)),$=f(()=>{let e=2*Math.PI*35,t=e-Z.value/100*e;return{dasharray:`${e} ${e}`,dashoffset:t}});return(e,t)=>(b(),m(`div`,{class:`vue-data-ui-component vue-ui-gizmo-wrapper`,role:`progressbar`,"aria-label":G.value.a11y.translations.label,"aria-valuemin":`0`,"aria-valuemax":`100`,"aria-valuenow":C(q)?void 0:Z.value,"aria-valuetext":Z.value+`%`,"aria-busy":C(q)?`true`:`false`},[(b(),m(`svg`,{class:`vue-ui-gizmo`,viewBox:`0 0 ${X.value.width} ${X.value.height}`,width:G.value.size,style:v({background:`transparent`,fontFamily:G.value.fontFamily})},[g(C(u)),G.value.useGradient?(b(),m(`defs`,O,[g(l,{t:`linear`,id:`gizmo_gradient_${V.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,G.value.gradientColor,1],[`100%`,G.value.color,1]]},null,8,[`id`,`stops`])])):p(``,!0),G.value.type===`battery`?(b(),m(d,{key:1},[h(`path`,{d:`M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10`,stroke:G.value.stroke,"stroke-width":2,fill:`none`},null,8,k),h(`path`,{d:`M 70 16 L 70 34`,stroke:G.value.stroke,"stroke-width":2,fill:`none`,style:{opacity:`0.5`}},null,8,A),h(`rect`,{x:10,y:10,height:30,width:55*(Z.value/100),fill:G.value.useGradient?`url(#gizmo_gradient_${V.value})`:G.value.color,rx:2},null,8,j),G.value.showPercentage?(b(),m(`text`,{key:0,x:85,y:32,"text-anchor":`start`,"font-size":`20`,fill:G.value.textColor},S(C(i)(G.value.formatter,Q.value,C(r)({v:Q.value,s:`%`}))),9,M)):p(``,!0)],64)):p(``,!0),G.value.type===`gauge`?(b(),m(d,{key:2},[G.value.useGradient?(b(),m(`defs`,N,[h(`filter`,{id:`blur_${V.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[...t[0]||=[h(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:1},null,-1)]],8,P)])):p(``,!0),h(`circle`,{cx:40,cy:40,r:35,stroke:G.value.stroke,"stroke-width":8,fill:`none`},null,8,F),h(`circle`,{cx:40,cy:40,r:35,stroke:G.value.color,"stroke-width":8,"stroke-dasharray":$.value.dasharray,"stroke-dashoffset":$.value.dashoffset,"stroke-linecap":`round`,fill:`none`,style:{transform:`rotate(-90deg)`,"transform-origin":`50% 50%`}},null,8,I),G.value.useGradient?(b(),m(`g`,{key:1,filter:`url(#blur_${V.value})`},[h(`circle`,{cx:40,cy:40,r:35,stroke:G.value.gradientColor,"stroke-width":1,fill:`none`,"stroke-dasharray":$.value.dasharray,"stroke-dashoffset":$.value.dashoffset,style:{transform:`rotate(-90deg)`,"transform-origin":`50% 50%`}},null,8,R)],8,L)):p(``,!0),G.value.showPercentage?(b(),m(`text`,{key:2,x:40,y:47,"text-anchor":`middle`,"font-size":`20`,fill:G.value.textColor},S(C(i)(G.value.formatter,Q.value,C(r)({v:Q.value,s:`%`}))),9,z)):p(``,!0)],64)):p(``,!0)],12,D)),ie(e.$slots,`skeleton`,{},()=>[C(q)?(b(),re(c,{key:0})):p(``,!0)],!0)],8,E))}},[[`__scopeId`,`data-v-f296c0f3`]]);export{T as n,B as t};