vue-data-ui 3.17.13 → 3.18.0

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 (493) hide show
  1. package/README.md +1 -1
  2. package/dist/A11yDataTable-q2-8fSlJ.js +45 -0
  3. package/dist/Arrow-BU2Z7mfz.js +116 -0
  4. package/dist/BaseDraggableDialog-LE75fWYz.js +272 -0
  5. package/dist/BaseIcon-CL6Y7alf.js +499 -0
  6. package/dist/BaseLegendToggle-BvPOFMVZ.js +56 -0
  7. package/dist/BaseScanner-C7dmAref.js +27 -0
  8. package/dist/BaseZoomControls-DSwf4HhS.js +111 -0
  9. package/dist/ColorPicker-BGbMrtup.js +255 -0
  10. package/dist/DataTable-ZG4GX2Zg.js +150 -0
  11. package/dist/Legend-BPb8i4aC.js +114 -0
  12. package/dist/NonSvgPenAndPaper-BT3YMjgo.js +577 -0
  13. package/dist/PackageVersion-B1cPtZ3Q.js +11 -0
  14. package/dist/PenAndPaper-DxBCVZAx.js +461 -0
  15. package/dist/RecursiveCircles-DPpLel6f.js +117 -0
  16. package/dist/RecursiveLabels-DBMJf_to.js +56 -0
  17. package/dist/RecursiveLinks-D06dBL4a.js +78 -0
  18. package/dist/Shape-Dbug7CtK.js +141 -0
  19. package/dist/Slicer-SEdaKYPX.js +1144 -0
  20. package/dist/SlicerPreview-BLlQTUI_.js +1523 -0
  21. package/dist/SparkTooltip-BaONR2nq.js +93 -0
  22. package/dist/Title-ByyzJzpc.js +87 -0
  23. package/dist/Tooltip-V6Z0Ko-1.js +307 -0
  24. package/dist/UserOptions-Gaw1761w.js +1407 -0
  25. package/dist/_plugin-vue_export-helper-Dq1MygBL.js +8 -0
  26. package/dist/canvas-lib-DTaADQOK.js +79 -0
  27. package/dist/components/arrow.js +2 -5
  28. package/dist/components/vue-ui-3d-bar.js +2 -5
  29. package/dist/components/vue-ui-accordion.js +2 -5
  30. package/dist/components/vue-ui-age-pyramid.js +2 -5
  31. package/dist/components/vue-ui-annotator.js +2 -5
  32. package/dist/components/vue-ui-bullet.js +2 -5
  33. package/dist/components/vue-ui-bump.js +2 -5
  34. package/dist/components/vue-ui-candlestick.js +2 -5
  35. package/dist/components/vue-ui-carousel-table.js +2 -5
  36. package/dist/components/vue-ui-chestnut.js +2 -5
  37. package/dist/components/vue-ui-chord.js +2 -5
  38. package/dist/components/vue-ui-circle-pack.js +2 -5
  39. package/dist/components/vue-ui-cursor.js +2 -5
  40. package/dist/components/vue-ui-dag.js +2 -5
  41. package/dist/components/vue-ui-dashboard.js +2 -5
  42. package/dist/components/vue-ui-digits.js +2 -5
  43. package/dist/components/vue-ui-donut-evolution.js +2 -5
  44. package/dist/components/vue-ui-donut.js +2 -5
  45. package/dist/components/vue-ui-dumbbell.js +2 -5
  46. package/dist/components/vue-ui-flow.js +2 -5
  47. package/dist/components/vue-ui-funnel.js +2 -5
  48. package/dist/components/vue-ui-galaxy.js +2 -5
  49. package/dist/components/vue-ui-gauge.js +2 -5
  50. package/dist/components/vue-ui-geo.js +2 -5
  51. package/dist/components/vue-ui-gizmo.js +2 -5
  52. package/dist/components/vue-ui-heatmap.js +2 -5
  53. package/dist/components/vue-ui-history-plot.js +2 -5
  54. package/dist/components/vue-ui-horizontal-bar.js +2 -5
  55. package/dist/components/vue-ui-icon.js +2 -5
  56. package/dist/components/vue-ui-kpi.js +2 -5
  57. package/dist/components/vue-ui-mini-loader.js +2 -5
  58. package/dist/components/vue-ui-molecule.js +2 -5
  59. package/dist/components/vue-ui-mood-radar.js +2 -5
  60. package/dist/components/vue-ui-nested-donuts.js +2 -5
  61. package/dist/components/vue-ui-onion.js +2 -5
  62. package/dist/components/vue-ui-parallel-coordinate-plot.js +2 -5
  63. package/dist/components/vue-ui-pattern-seed.js +2 -5
  64. package/dist/components/vue-ui-pattern.js +2 -5
  65. package/dist/components/vue-ui-quadrant.js +2 -5
  66. package/dist/components/vue-ui-quick-chart.js +2 -5
  67. package/dist/components/vue-ui-radar.js +2 -5
  68. package/dist/components/vue-ui-rating.js +2 -5
  69. package/dist/components/vue-ui-relation-circle.js +2 -5
  70. package/dist/components/vue-ui-ridgeline.js +2 -5
  71. package/dist/components/vue-ui-rings.js +2 -5
  72. package/dist/components/vue-ui-scatter.js +2 -5
  73. package/dist/components/vue-ui-skeleton.js +2 -5
  74. package/dist/components/vue-ui-smiley.js +2 -5
  75. package/dist/components/vue-ui-spark-trend.js +2 -5
  76. package/dist/components/vue-ui-sparkbar.js +2 -5
  77. package/dist/components/vue-ui-sparkgauge.js +2 -5
  78. package/dist/components/vue-ui-sparkhistogram.js +2 -5
  79. package/dist/components/vue-ui-sparkline.js +2 -5
  80. package/dist/components/vue-ui-sparkstackbar.js +2 -5
  81. package/dist/components/vue-ui-stackbar.js +2 -5
  82. package/dist/components/vue-ui-stackline.js +2 -5
  83. package/dist/components/vue-ui-strip-plot.js +2 -5
  84. package/dist/components/vue-ui-table-heatmap.js +2 -5
  85. package/dist/components/vue-ui-table-sparkline.js +2 -5
  86. package/dist/components/vue-ui-table.js +2 -5
  87. package/dist/components/vue-ui-thermometer.js +2 -5
  88. package/dist/components/vue-ui-timer.js +2 -5
  89. package/dist/components/vue-ui-tiremarks.js +2 -5
  90. package/dist/components/vue-ui-treemap.js +2 -5
  91. package/dist/components/vue-ui-vertical-bar.js +2 -5
  92. package/dist/components/vue-ui-waffle.js +2 -5
  93. package/dist/components/vue-ui-wheel.js +2 -5
  94. package/dist/components/vue-ui-word-cloud.js +2 -5
  95. package/dist/components/vue-ui-world.js +2 -5
  96. package/dist/components/vue-ui-xy-canvas.js +2 -5
  97. package/dist/components/vue-ui-xy.js +2 -5
  98. package/dist/dom-to-png-C9UOX1d2.js +237 -0
  99. package/dist/exposedLib-BQjH823l.js +19 -0
  100. package/dist/geoProjections-CQIkC70z.js +146 -0
  101. package/dist/img-NMY-_LiJ.js +74 -0
  102. package/dist/labelUtils-BiSegLOT.js +19 -0
  103. package/dist/lib-B83ZCydz.js +1879 -0
  104. package/dist/patternUtils-B7BWu5bV.js +258 -0
  105. package/dist/pdf-Ey2KFETK.js +90 -0
  106. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  107. package/dist/style.css +2 -1
  108. package/dist/types/arrow.d.ts +1 -1
  109. package/dist/types/utils.d.ts +23 -0
  110. package/dist/types/vue-data-ui.d.ts +4766 -630
  111. package/dist/types/vue-ui-3d-bar.d.ts +64 -9
  112. package/dist/types/vue-ui-accordion.d.ts +4 -3
  113. package/dist/types/vue-ui-age-pyramid.d.ts +79 -9
  114. package/dist/types/vue-ui-annotator.d.ts +3 -5
  115. package/dist/types/vue-ui-bullet.d.ts +60 -9
  116. package/dist/types/vue-ui-bump.d.ts +65 -9
  117. package/dist/types/vue-ui-candlestick.d.ts +83 -9
  118. package/dist/types/vue-ui-carousel-table.d.ts +36 -6
  119. package/dist/types/vue-ui-chestnut.d.ts +66 -9
  120. package/dist/types/vue-ui-chord.d.ts +78 -9
  121. package/dist/types/vue-ui-circle-pack.d.ts +86 -9
  122. package/dist/types/vue-ui-cursor.d.ts +4 -2
  123. package/dist/types/vue-ui-dag.d.ts +92 -9
  124. package/dist/types/vue-ui-dashboard.d.ts +43 -6
  125. package/dist/types/vue-ui-digits.d.ts +4 -2
  126. package/dist/types/vue-ui-donut-evolution.d.ts +70 -9
  127. package/dist/types/vue-ui-donut.d.ts +92 -9
  128. package/dist/types/vue-ui-dumbbell.d.ts +65 -9
  129. package/dist/types/vue-ui-flow.d.ts +79 -9
  130. package/dist/types/vue-ui-funnel.d.ts +55 -9
  131. package/dist/types/vue-ui-galaxy.d.ts +83 -9
  132. package/dist/types/vue-ui-gauge.d.ts +64 -9
  133. package/dist/types/vue-ui-geo.d.ts +71 -9
  134. package/dist/types/vue-ui-gizmo.d.ts +17 -6
  135. package/dist/types/vue-ui-heatmap.d.ts +73 -9
  136. package/dist/types/vue-ui-history-plot.d.ts +82 -9
  137. package/dist/types/vue-ui-horizontal-bar.d.ts +84 -9
  138. package/dist/types/vue-ui-icon.d.ts +2 -2
  139. package/dist/types/vue-ui-kpi.d.ts +21 -7
  140. package/dist/types/vue-ui-mini-loader.d.ts +5 -3
  141. package/dist/types/vue-ui-molecule.d.ts +86 -9
  142. package/dist/types/vue-ui-mood-radar.d.ts +66 -9
  143. package/dist/types/vue-ui-nested-donuts.d.ts +80 -9
  144. package/dist/types/vue-ui-onion.d.ts +77 -9
  145. package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +92 -9
  146. package/dist/types/vue-ui-pattern-seed.d.ts +1 -1
  147. package/dist/types/vue-ui-pattern.d.ts +2 -2
  148. package/dist/types/vue-ui-quadrant.d.ts +86 -9
  149. package/dist/types/vue-ui-quick-chart.d.ts +79 -9
  150. package/dist/types/vue-ui-radar.d.ts +83 -9
  151. package/dist/types/vue-ui-rating.d.ts +22 -6
  152. package/dist/types/vue-ui-relation-circle.d.ts +66 -9
  153. package/dist/types/vue-ui-ridgeline.d.ts +69 -9
  154. package/dist/types/vue-ui-rings.d.ts +70 -9
  155. package/dist/types/vue-ui-scatter.d.ts +67 -9
  156. package/dist/types/vue-ui-skeleton.d.ts +3 -2
  157. package/dist/types/vue-ui-smiley.d.ts +3 -2
  158. package/dist/types/vue-ui-spark-trend.d.ts +14 -6
  159. package/dist/types/vue-ui-sparkbar.d.ts +27 -6
  160. package/dist/types/vue-ui-sparkgauge.d.ts +20 -6
  161. package/dist/types/vue-ui-sparkhistogram.d.ts +24 -6
  162. package/dist/types/vue-ui-sparkline.d.ts +35 -6
  163. package/dist/types/vue-ui-sparkstackbar.d.ts +35 -6
  164. package/dist/types/vue-ui-stackbar.d.ts +85 -9
  165. package/dist/types/vue-ui-stackline.d.ts +81 -9
  166. package/dist/types/vue-ui-strip-plot.d.ts +66 -9
  167. package/dist/types/vue-ui-table-heatmap.d.ts +52 -6
  168. package/dist/types/vue-ui-table-sparkline.d.ts +30 -6
  169. package/dist/types/vue-ui-table.d.ts +10 -2
  170. package/dist/types/vue-ui-thermometer.d.ts +46 -9
  171. package/dist/types/vue-ui-timer.d.ts +31 -5
  172. package/dist/types/vue-ui-tiremarks.d.ts +46 -9
  173. package/dist/types/vue-ui-treemap.d.ts +73 -9
  174. package/dist/types/vue-ui-vertical-bar.d.ts +2 -2
  175. package/dist/types/vue-ui-waffle.d.ts +72 -9
  176. package/dist/types/vue-ui-wheel.d.ts +46 -9
  177. package/dist/types/vue-ui-word-cloud.d.ts +73 -9
  178. package/dist/types/vue-ui-world.d.ts +68 -9
  179. package/dist/types/vue-ui-xy-canvas.d.ts +75 -9
  180. package/dist/types/vue-ui-xy.d.ts +108 -10
  181. package/dist/useAutoSizeLabelsInsideViewbox-De0rTecW.js +50 -0
  182. package/dist/useChartAccessibility-Do37qcw2.js +12 -0
  183. package/dist/useConfig-KnOLHtlJ.js +7419 -0
  184. package/dist/useFitSvgText-C-MEdAfe.js +63 -0
  185. package/dist/useNestedProp-CcxL1gUU.js +10 -0
  186. package/dist/useObjectBindings-Dc8Rf6Qy.js +189 -0
  187. package/dist/usePanZoom-B-4M_gmY.js +157 -0
  188. package/dist/usePrefersMotion-BywLbIko.js +15 -0
  189. package/dist/usePrinter-CMLF900n.js +49 -0
  190. package/dist/useResponsive-CrAInupd.js +19 -0
  191. package/dist/useStableElementSize-0I1IpHPl.js +77 -0
  192. package/dist/useSvgExport-Dtu973wa.js +755 -0
  193. package/dist/useTableResponsive-DrM1xqII.js +24 -0
  194. package/dist/useThemeCheck-rFK9Zlb_.js +24 -0
  195. package/dist/useTimeLabelCollider-Dm55Emzg.js +57 -0
  196. package/dist/useTimeLabels-C0x7zUXP.js +272 -0
  197. package/dist/useUserOptionState-CjPJPTg2.js +15 -0
  198. package/dist/utils.js +27 -44
  199. package/dist/vClickOutside-CbX_bC9A.js +13 -0
  200. package/dist/vue-data-ui-D1REqS_k.js +274 -0
  201. package/dist/vue-data-ui.js +76 -167
  202. package/dist/vue-ui-3d-bar-vO_kSCd6.js +1747 -0
  203. package/dist/vue-ui-accordion-Cf-jZELj.js +81 -0
  204. package/dist/vue-ui-age-pyramid-DHXhrP_3.js +1226 -0
  205. package/dist/vue-ui-annotator-B0o6czmF.js +2899 -0
  206. package/dist/vue-ui-bullet-C93-cf0H.js +700 -0
  207. package/dist/vue-ui-bump-C_Szk9AZ.js +1239 -0
  208. package/dist/vue-ui-candlestick-6JdMEJKO.js +1802 -0
  209. package/dist/vue-ui-carousel-table-CZ_HK0Iw.js +445 -0
  210. package/dist/vue-ui-chestnut-B8ixU585.js +2000 -0
  211. package/dist/vue-ui-chord-DC5sLapz.js +1381 -0
  212. package/dist/vue-ui-circle-pack-CsmSEwt3.js +1183 -0
  213. package/dist/vue-ui-cursor-B-QODIL3.js +283 -0
  214. package/dist/vue-ui-dag-C9LYfjS_.js +2899 -0
  215. package/dist/vue-ui-dashboard-D-f4ZaLi.js +503 -0
  216. package/dist/vue-ui-digits-CcB3odN7.js +209 -0
  217. package/dist/vue-ui-donut-DR0ngnZC.js +2396 -0
  218. package/dist/vue-ui-donut-evolution-BXpOscCe.js +1490 -0
  219. package/dist/vue-ui-dumbbell-CB_clJWA.js +1517 -0
  220. package/dist/vue-ui-flow-CUiOAEy1.js +1223 -0
  221. package/dist/vue-ui-funnel-BAlGDK0o.js +767 -0
  222. package/dist/vue-ui-galaxy-DbYNfSHb.js +1062 -0
  223. package/dist/vue-ui-gauge-Cie7jykM.js +910 -0
  224. package/dist/vue-ui-geo-Ce_gBRye.js +1504 -0
  225. package/dist/vue-ui-gizmo-B9POi_SN.js +225 -0
  226. package/dist/vue-ui-heatmap-DFfRSbnk.js +1556 -0
  227. package/dist/vue-ui-history-plot-DHp5WFgx.js +1551 -0
  228. package/dist/vue-ui-horizontal-bar-DI4yoARv.js +1669 -0
  229. package/dist/vue-ui-kpi-oUfso4UP.js +96 -0
  230. package/dist/vue-ui-mini-loader-aZMi1_uX.js +125 -0
  231. package/dist/vue-ui-molecule-D72kzel_.js +912 -0
  232. package/dist/vue-ui-mood-radar-Tw2ZFP7Y.js +1138 -0
  233. package/dist/vue-ui-nested-donuts-Bza1LczX.js +1472 -0
  234. package/dist/vue-ui-onion-BOuuib5d.js +1188 -0
  235. package/dist/vue-ui-parallel-coordinate-plot-BuQUq6-o.js +1413 -0
  236. package/dist/vue-ui-pattern-Bj-IPFr2.js +154 -0
  237. package/dist/vue-ui-pattern-seed-abRweCDE.js +61 -0
  238. package/dist/vue-ui-quadrant-zNFIXNt9.js +1966 -0
  239. package/dist/vue-ui-quick-chart-B1a8QVUn.js +2459 -0
  240. package/dist/vue-ui-radar-VFn-YP_2.js +1214 -0
  241. package/dist/vue-ui-rating-Dxgn21FA.js +343 -0
  242. package/dist/vue-ui-relation-circle-B0sZaCgX.js +914 -0
  243. package/dist/vue-ui-ridgeline-BsBAbg5V.js +1612 -0
  244. package/dist/vue-ui-rings-CDwUzMF-.js +1231 -0
  245. package/dist/vue-ui-scatter-Du_b-zM8.js +2380 -0
  246. package/dist/vue-ui-skeleton-BAq6J_6G.js +2556 -0
  247. package/dist/vue-ui-smiley-CoHvkS0c.js +356 -0
  248. package/dist/vue-ui-spark-trend-BmCcJ17C.js +438 -0
  249. package/dist/vue-ui-sparkbar-9z05IMx8.js +393 -0
  250. package/dist/vue-ui-sparkgauge-BlWri9DP.js +255 -0
  251. package/dist/vue-ui-sparkhistogram-CHZTt8d8.js +560 -0
  252. package/dist/vue-ui-sparkline-DirLW9Nd.js +1503 -0
  253. package/dist/vue-ui-sparkstackbar-Dk6cEI2o.js +660 -0
  254. package/dist/vue-ui-stackbar-DNIrGHkt.js +2235 -0
  255. package/dist/vue-ui-stackline-HoWn_ur2.js +2362 -0
  256. package/dist/vue-ui-strip-plot-Bi8u_fLr.js +1328 -0
  257. package/dist/vue-ui-table-XLjOOfdI.js +1338 -0
  258. package/dist/vue-ui-table-heatmap-DvnFiveI.js +334 -0
  259. package/dist/vue-ui-table-sparkline-CSZf8XxP.js +697 -0
  260. package/dist/vue-ui-thermometer-7eUO_7CP.js +753 -0
  261. package/dist/vue-ui-timer-DCbxsREb.js +439 -0
  262. package/dist/vue-ui-tiremarks-p_sfTufv.js +542 -0
  263. package/dist/vue-ui-treemap-BdZOW7TM.js +1575 -0
  264. package/dist/vue-ui-waffle-Bf9dWWCM.js +1350 -0
  265. package/dist/vue-ui-wheel-CZrIiB0K.js +875 -0
  266. package/dist/vue-ui-word-cloud-BeLjxoRe.js +1644 -0
  267. package/dist/vue-ui-world-D9ahzEQ2.js +14252 -0
  268. package/dist/vue-ui-xy-DrvbVuHO.js +4063 -0
  269. package/dist/vue-ui-xy-canvas-DU7vFrQr.js +1774 -0
  270. package/dist/vue_ui_3d_bar-CXKqO5Ej.js +185 -0
  271. package/dist/vue_ui_age_pyramid-BON8QI6X.js +301 -0
  272. package/dist/vue_ui_bullet-CE5sFT7u.js +186 -0
  273. package/dist/vue_ui_bump-frnXaXul.js +201 -0
  274. package/dist/vue_ui_candlestick-sY6UtOop.js +374 -0
  275. package/dist/vue_ui_chestnut-BiUZFv40.js +305 -0
  276. package/dist/vue_ui_chord-DpyR_b9A.js +275 -0
  277. package/dist/vue_ui_circle_pack-DBKz_Fi_.js +130 -0
  278. package/dist/vue_ui_dag-Ci_MOnvd.js +258 -0
  279. package/dist/vue_ui_donut-Cx2_BGcQ.js +358 -0
  280. package/dist/vue_ui_donut_evolution-CAJefrHs.js +717 -0
  281. package/dist/vue_ui_dumbbell-CClzAZTN.js +304 -0
  282. package/dist/vue_ui_flow-CCHO1Lo9.js +238 -0
  283. package/dist/vue_ui_funnel-h8q2mRpC.js +234 -0
  284. package/dist/vue_ui_galaxy-70vtkEBw.js +265 -0
  285. package/dist/vue_ui_gauge-C17CgfzN.js +178 -0
  286. package/dist/vue_ui_geo-C0UbQ0Lc.js +248 -0
  287. package/dist/vue_ui_heatmap-BqPP3J4M.js +319 -0
  288. package/dist/vue_ui_history_plot-C5nytDHh.js +413 -0
  289. package/dist/vue_ui_horizontal_bar-Bqxorkc_.js +341 -0
  290. package/dist/vue_ui_molecule-Dka4JBOp.js +231 -0
  291. package/dist/vue_ui_mood_radar-Dg4ijm53.js +281 -0
  292. package/dist/vue_ui_nested_donuts-BY9cOoHF.js +273 -0
  293. package/dist/vue_ui_onion-DTV9cup-.js +293 -0
  294. package/dist/vue_ui_parallel_coordinate_plot-CNWrDh96.js +278 -0
  295. package/dist/vue_ui_quadrant-3kjYvxpj.js +428 -0
  296. package/dist/vue_ui_quick_chart--VaYQuM4.js +139 -0
  297. package/dist/vue_ui_radar-Dxx9GJmj.js +306 -0
  298. package/dist/vue_ui_relation_circle-Cr0I2SoU.js +98 -0
  299. package/dist/vue_ui_ridgeline-CAtYca4b.js +767 -0
  300. package/dist/vue_ui_rings-DXC1VeX5.js +320 -0
  301. package/dist/vue_ui_scatter-D2S2j0ap.js +479 -0
  302. package/dist/vue_ui_spark_trend-BHMQ6_1p.js +82 -0
  303. package/dist/vue_ui_sparkbar-BR6hbuDE.js +64 -0
  304. package/dist/vue_ui_sparkgauge-xfPRHnMv.js +90 -0
  305. package/dist/vue_ui_sparkhistogram-CJRENZ1C.js +123 -0
  306. package/dist/vue_ui_sparkline-wgk7yO7E.js +151 -0
  307. package/dist/vue_ui_sparkstackbar-C5qZMmAl.js +175 -0
  308. package/dist/vue_ui_stackbar-BW_C3MXw.js +412 -0
  309. package/dist/vue_ui_stackline-DpI2LnjO.js +426 -0
  310. package/dist/vue_ui_strip_plot-8ZelqC5b.js +301 -0
  311. package/dist/vue_ui_table_heatmap-BGUjA0WA.js +80 -0
  312. package/dist/vue_ui_table_sparkline-i0Q-N_we.js +124 -0
  313. package/dist/vue_ui_thermometer-CuN7Gpez.js +123 -0
  314. package/dist/vue_ui_tiremarks-A6UHC0c3.js +122 -0
  315. package/dist/vue_ui_treemap-BQp06q-g.js +328 -0
  316. package/dist/vue_ui_vertical_bar-CJSD1FZS.js +247 -0
  317. package/dist/vue_ui_waffle-C_Ev4l7B.js +292 -0
  318. package/dist/vue_ui_wheel-DdkTPXJU.js +133 -0
  319. package/dist/vue_ui_word_cloud-B1PbsYPc.js +254 -0
  320. package/dist/vue_ui_xy-BYPqfYyx.js +482 -0
  321. package/dist/vue_ui_xy_canvas-CMHGNrLf.js +408 -0
  322. package/package.json +7 -7
  323. package/dist/A11yDataTable-BpmuNomI.js +0 -54
  324. package/dist/Arrow-dSvLFssU.js +0 -101
  325. package/dist/BaseDraggableDialog-Di8Hlru3.js +0 -249
  326. package/dist/BaseIcon-DX0hTWa-.js +0 -476
  327. package/dist/BaseLegendToggle-cMP8M2u0.js +0 -47
  328. package/dist/BaseScanner-C2j3TsSY.js +0 -36
  329. package/dist/BaseZoomControls-CVSC1-SU.js +0 -123
  330. package/dist/ColorPicker-bAxGcXK0.js +0 -271
  331. package/dist/DataTable-cMnb68Ik.js +0 -145
  332. package/dist/Legend-DGN5lY60.js +0 -104
  333. package/dist/NonSvgPenAndPaper-B6E0zEYe.js +0 -573
  334. package/dist/PackageVersion-BfrCAH6_.js +0 -10
  335. package/dist/PenAndPaper-CJDoB5H9.js +0 -527
  336. package/dist/RecursiveCircles-BE6GoMmo.js +0 -101
  337. package/dist/RecursiveLabels-BhQMS9Sm.js +0 -55
  338. package/dist/RecursiveLinks-BDwyYfP-.js +0 -83
  339. package/dist/Shape-CxJ5_Rre.js +0 -116
  340. package/dist/Slicer-D7UcO8sN.js +0 -1145
  341. package/dist/SlicerPreview-D_CgrN_7.js +0 -1580
  342. package/dist/SparkTooltip-D4bM-kfz.js +0 -68
  343. package/dist/Title-BbKoiBk2.js +0 -88
  344. package/dist/Tooltip-Cvt7Fi0Q.js +0 -299
  345. package/dist/UserOptions-DVduN6X7.js +0 -1474
  346. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  347. package/dist/dom-to-png-DGvx6i5V.js +0 -262
  348. package/dist/exposedLib-sJvY1pST.js +0 -22
  349. package/dist/geoProjections-BFq2sOBY.js +0 -162
  350. package/dist/img-CjTQXS0U.js +0 -57
  351. package/dist/labelUtils-DX9oyq3C.js +0 -26
  352. package/dist/lib-DMzrGQHK.js +0 -2477
  353. package/dist/patternUtils-BINhU4Ky.js +0 -615
  354. package/dist/pdf-C4H4o1Cj.js +0 -88
  355. package/dist/useAutoSizeLabelsInsideViewbox-izlGDfwu.js +0 -55
  356. package/dist/useChartAccessibility-cp6XQtqi.js +0 -15
  357. package/dist/useConfig-CG4HT3wS.js +0 -7901
  358. package/dist/useFitSvgText-2crs6Fv5.js +0 -69
  359. package/dist/useNestedProp-DH0BEVVS.js +0 -13
  360. package/dist/useObjectBindings-Dixg-RIe.js +0 -228
  361. package/dist/usePanZoom-BbDhcKWf.js +0 -141
  362. package/dist/usePrefersMotion-Co0nj1eS.js +0 -17
  363. package/dist/usePrinter-C4t8DdQ-.js +0 -51
  364. package/dist/useResponsive-DfdjqQps.js +0 -195
  365. package/dist/useStableElementSize-C48ZVcZQ.js +0 -77
  366. package/dist/useSvgExport-BTG4hVPO.js +0 -870
  367. package/dist/useTableResponsive-BpfiEtzR.js +0 -26
  368. package/dist/useThemeCheck-C9Ccl7U9.js +0 -36
  369. package/dist/useTimeLabelCollider-D3JeJ6Ye.js +0 -86
  370. package/dist/useTimeLabels-Cv0tD9In.js +0 -307
  371. package/dist/useUserOptionState-B7Ej974k.js +0 -19
  372. package/dist/vClickOutside-C6WiFswA.js +0 -13
  373. package/dist/vue-data-ui-D1ZI7Y4l.js +0 -433
  374. package/dist/vue-ui-3d-bar-DEjKYzI5.js +0 -1824
  375. package/dist/vue-ui-accordion-DFtpH_16.js +0 -92
  376. package/dist/vue-ui-age-pyramid-LiC9hTjP.js +0 -1179
  377. package/dist/vue-ui-annotator-DrKnQoHf.js +0 -2991
  378. package/dist/vue-ui-bullet-DdxEINdq.js +0 -769
  379. package/dist/vue-ui-bump-CdgO1V7z.js +0 -1250
  380. package/dist/vue-ui-candlestick-DxJnPwto.js +0 -1775
  381. package/dist/vue-ui-carousel-table-CMefu5TI.js +0 -487
  382. package/dist/vue-ui-chestnut-BnGN72PO.js +0 -2001
  383. package/dist/vue-ui-chord-DWyar45U.js +0 -1457
  384. package/dist/vue-ui-circle-pack-CQ8vF2XH.js +0 -1076
  385. package/dist/vue-ui-cursor-HHOdkmyB.js +0 -260
  386. package/dist/vue-ui-dag-BDWPBElq.js +0 -3209
  387. package/dist/vue-ui-dashboard-Dg_I3X2a.js +0 -627
  388. package/dist/vue-ui-digits-CZmdir8V.js +0 -211
  389. package/dist/vue-ui-donut-BKegKHxj.js +0 -2608
  390. package/dist/vue-ui-donut-evolution-047dE4Lu.js +0 -1578
  391. package/dist/vue-ui-dumbbell-BL4ZMChj.js +0 -1552
  392. package/dist/vue-ui-flow-BAqtyunQ.js +0 -1279
  393. package/dist/vue-ui-funnel-Pl2sEOZs.js +0 -823
  394. package/dist/vue-ui-galaxy-CBF5Wsax.js +0 -1108
  395. package/dist/vue-ui-gauge-COV_S0Vp.js +0 -955
  396. package/dist/vue-ui-geo-CaPXElPf.js +0 -1510
  397. package/dist/vue-ui-gizmo-Csn7up96.js +0 -238
  398. package/dist/vue-ui-heatmap-Cpb0BYLa.js +0 -1694
  399. package/dist/vue-ui-history-plot-ZZEdzFCE.js +0 -1564
  400. package/dist/vue-ui-horizontal-bar-BonPYUZf.js +0 -1735
  401. package/dist/vue-ui-kpi-DoHhSsDK.js +0 -130
  402. package/dist/vue-ui-mini-loader-DOTBVCLE.js +0 -138
  403. package/dist/vue-ui-molecule-mVYnXouV.js +0 -945
  404. package/dist/vue-ui-mood-radar-DPvwnc3z.js +0 -1197
  405. package/dist/vue-ui-nested-donuts-C7E6TXrZ.js +0 -1702
  406. package/dist/vue-ui-onion-BGIlFhGB.js +0 -1207
  407. package/dist/vue-ui-parallel-coordinate-plot-C6G_A9ua.js +0 -1432
  408. package/dist/vue-ui-pattern-mXZW_pvA.js +0 -146
  409. package/dist/vue-ui-pattern-seed-BcNlxb2i.js +0 -36
  410. package/dist/vue-ui-quadrant-CVpIeYOB.js +0 -1918
  411. package/dist/vue-ui-quick-chart-CcV8qn9-.js +0 -2514
  412. package/dist/vue-ui-radar-G4AV1rBo.js +0 -1259
  413. package/dist/vue-ui-rating-CqPlP88P.js +0 -370
  414. package/dist/vue-ui-relation-circle-CkZ8oFVV.js +0 -856
  415. package/dist/vue-ui-ridgeline-CBTyYn6Q.js +0 -1737
  416. package/dist/vue-ui-rings-CSIOqFiP.js +0 -1256
  417. package/dist/vue-ui-scatter-AuC46ufT.js +0 -2345
  418. package/dist/vue-ui-skeleton-YD6rZjY_.js +0 -2475
  419. package/dist/vue-ui-smiley-CY0WFv2j.js +0 -391
  420. package/dist/vue-ui-spark-trend-D8KGIt-R.js +0 -423
  421. package/dist/vue-ui-sparkbar-BjWGJjzN.js +0 -424
  422. package/dist/vue-ui-sparkgauge-Dab5mss7.js +0 -285
  423. package/dist/vue-ui-sparkhistogram-D0rsmiPh.js +0 -559
  424. package/dist/vue-ui-sparkline-BCaauQuX.js +0 -1550
  425. package/dist/vue-ui-sparkstackbar-NT5yD6xA.js +0 -672
  426. package/dist/vue-ui-stackbar-ChBk_A1c.js +0 -2393
  427. package/dist/vue-ui-stackline-Cujamlze.js +0 -2490
  428. package/dist/vue-ui-strip-plot-CGBumG6I.js +0 -1293
  429. package/dist/vue-ui-table-BX2iMku4.js +0 -1726
  430. package/dist/vue-ui-table-heatmap-KXgXYVXm.js +0 -353
  431. package/dist/vue-ui-table-sparkline-C3NWnry0.js +0 -803
  432. package/dist/vue-ui-thermometer-DvdceZB1.js +0 -743
  433. package/dist/vue-ui-timer-XWAbvuAY.js +0 -504
  434. package/dist/vue-ui-tiremarks-B-YI1RlT.js +0 -578
  435. package/dist/vue-ui-treemap-AzorGfmd.js +0 -1757
  436. package/dist/vue-ui-waffle-CKtUvdTE.js +0 -1442
  437. package/dist/vue-ui-wheel-CnsLEArZ.js +0 -908
  438. package/dist/vue-ui-word-cloud-iAme2ihe.js +0 -1644
  439. package/dist/vue-ui-world-D5rrC9rw.js +0 -14452
  440. package/dist/vue-ui-xy-C_Q9chQe.js +0 -4468
  441. package/dist/vue-ui-xy-canvas-DG0299qE.js +0 -2107
  442. package/dist/vue_ui_3d_bar-CL0iX8Qi.js +0 -22
  443. package/dist/vue_ui_age_pyramid-8H8WSL7J.js +0 -22
  444. package/dist/vue_ui_bullet-Ckqieba5.js +0 -22
  445. package/dist/vue_ui_bump-CIht647H.js +0 -22
  446. package/dist/vue_ui_candlestick-BAMn-VGw.js +0 -22
  447. package/dist/vue_ui_chestnut-BloFvDuV.js +0 -22
  448. package/dist/vue_ui_chord-Bc1_ocwK.js +0 -22
  449. package/dist/vue_ui_circle_pack-CLmw8nHe.js +0 -22
  450. package/dist/vue_ui_dag-ZOwuDBZ8.js +0 -22
  451. package/dist/vue_ui_donut-CA4dgV8J.js +0 -22
  452. package/dist/vue_ui_donut_evolution-DFQU-rqE.js +0 -22
  453. package/dist/vue_ui_dumbbell-BCOHDiPk.js +0 -22
  454. package/dist/vue_ui_flow-BErINgox.js +0 -22
  455. package/dist/vue_ui_funnel-yuaMZ-yb.js +0 -22
  456. package/dist/vue_ui_galaxy-D95AN4FT.js +0 -22
  457. package/dist/vue_ui_gauge-BMEuRC4J.js +0 -22
  458. package/dist/vue_ui_geo--kg4VoVX.js +0 -22
  459. package/dist/vue_ui_heatmap-C9u993qE.js +0 -22
  460. package/dist/vue_ui_history_plot-BCKk1CrQ.js +0 -22
  461. package/dist/vue_ui_horizontal_bar-BEagrV0T.js +0 -22
  462. package/dist/vue_ui_molecule-BtvlINUh.js +0 -22
  463. package/dist/vue_ui_mood_radar-BUs6Fdn8.js +0 -22
  464. package/dist/vue_ui_nested_donuts-DvTrWT_C.js +0 -22
  465. package/dist/vue_ui_onion-CxWH9_OZ.js +0 -22
  466. package/dist/vue_ui_parallel_coordinate_plot-DH3cFJ3n.js +0 -22
  467. package/dist/vue_ui_quadrant-DjRs--Uz.js +0 -22
  468. package/dist/vue_ui_quick_chart-DMCjEjPe.js +0 -22
  469. package/dist/vue_ui_radar-DryGBOrz.js +0 -22
  470. package/dist/vue_ui_relation_circle-CCroen7h.js +0 -22
  471. package/dist/vue_ui_ridgeline-j4rVmpEp.js +0 -22
  472. package/dist/vue_ui_rings-CxOrekqA.js +0 -22
  473. package/dist/vue_ui_scatter-Bu1EAy9H.js +0 -22
  474. package/dist/vue_ui_spark_trend-3BjrSprO.js +0 -22
  475. package/dist/vue_ui_sparkbar-BsMzz5Um.js +0 -22
  476. package/dist/vue_ui_sparkgauge-KnjASOZs.js +0 -22
  477. package/dist/vue_ui_sparkhistogram-GBdzIVvS.js +0 -22
  478. package/dist/vue_ui_sparkline-CQ8DJVJx.js +0 -22
  479. package/dist/vue_ui_sparkstackbar-BSexvOuM.js +0 -22
  480. package/dist/vue_ui_stackbar-CuDC4O4b.js +0 -22
  481. package/dist/vue_ui_stackline-QTh-nuxE.js +0 -22
  482. package/dist/vue_ui_strip_plot-B9ypi_F3.js +0 -22
  483. package/dist/vue_ui_table_heatmap-CkvipPVy.js +0 -16
  484. package/dist/vue_ui_table_sparkline-yQdijcyJ.js +0 -22
  485. package/dist/vue_ui_thermometer-BTmjRBH8.js +0 -22
  486. package/dist/vue_ui_tiremarks-DBotWfi8.js +0 -22
  487. package/dist/vue_ui_treemap-D9-AIkT-.js +0 -22
  488. package/dist/vue_ui_vertical_bar-CELc39b8.js +0 -18
  489. package/dist/vue_ui_waffle-M2h-uJQ_.js +0 -22
  490. package/dist/vue_ui_wheel-LqBz3lv4.js +0 -22
  491. package/dist/vue_ui_word_cloud-mKAtBxHR.js +0 -22
  492. package/dist/vue_ui_xy-esktmpg-.js +0 -22
  493. package/dist/vue_ui_xy_canvas-6BBDSowT.js +0 -22
@@ -1,870 +0,0 @@
1
- import { isRef as Lt, ref as Ct, onMounted as Pt, watch as Rt, nextTick as Wt, unref as Vt } from "vue";
2
- const et = "http://www.w3.org/2000/svg", yt = "http://www.w3.org/1999/xlink", Bt = 'system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif';
3
- let At = /* @__PURE__ */ new WeakMap();
4
- function gt(N) {
5
- let v = At.get(N);
6
- return v || (v = getComputedStyle(N), At.set(N, v)), v;
7
- }
8
- function Mt() {
9
- At = /* @__PURE__ */ new WeakMap();
10
- }
11
- function P(N) {
12
- return document.createElementNS(et, N);
13
- }
14
- function wt(N) {
15
- return `${N}, ${Bt}`;
16
- }
17
- function Ot({
18
- svg: N,
19
- // ref
20
- title: v,
21
- // computed
22
- legend: F,
23
- // computed
24
- legendItems: rt,
25
- // computed
26
- backgroundColor: ot,
27
- // computed
28
- stretchTitle: I = !1,
29
- // bool (when rotateX is applied on the svg like in VueUiWheel, title transform style needs to be compensated)
30
- titleEmbedded: at = !1
31
- // when title is already part of the svg (VueUiChestnut)
32
- }) {
33
- const lt = Lt(N) ? N : Ct(N), nt = Ct(!1), W = [
34
- "fill",
35
- "fill-opacity",
36
- "stroke",
37
- "stroke-width",
38
- "stroke-opacity",
39
- "opacity",
40
- "color",
41
- "stroke-linecap",
42
- "stroke-linejoin",
43
- "stroke-miterlimit",
44
- "stroke-dasharray",
45
- "stroke-dashoffset",
46
- "font-family",
47
- "font-size",
48
- "font-style",
49
- "font-weight",
50
- "font-variant",
51
- "letter-spacing",
52
- "word-spacing",
53
- "text-anchor",
54
- "dominant-baseline",
55
- "shape-rendering",
56
- "vector-effect",
57
- "paint-order",
58
- "mix-blend-mode",
59
- "isolation",
60
- "filter",
61
- "clip-path",
62
- "mask",
63
- "transform",
64
- "transform-origin",
65
- "visibility",
66
- "display"
67
- ], j = /* @__PURE__ */ new Set(["font-family"]);
68
- async function b({ timeoutMs: e = 4e3, log: o = "warn" } = {}) {
69
- if (typeof window > "u" || typeof document > "u")
70
- return console.warn("SVG export only works in the browser."), null;
71
- const h = performance.now() + e, u = () => {
72
- const C = Vt(lt);
73
- return C && document.contains(C) ? C : null;
74
- };
75
- let c = u();
76
- if (c)
77
- return c;
78
- let t = !1;
79
- const S = (C) => {
80
- if (!t && C)
81
- try {
82
- C.disconnect();
83
- } catch {
84
- }
85
- t = !0;
86
- };
87
- let w;
88
- const A = new Promise((C) => {
89
- try {
90
- w = new MutationObserver(() => {
91
- const M = u();
92
- M && (S(w), C(M));
93
- }), w.observe(document.documentElement, {
94
- childList: !0,
95
- subtree: !0
96
- });
97
- } catch {
98
- C(null);
99
- }
100
- });
101
- for (; performance.now() < h; ) {
102
- const C = await Promise.race([
103
- A,
104
- new Promise((M) => requestAnimationFrame(M))
105
- ]);
106
- if (await Wt(), c = u() || C, c)
107
- return S(w), c;
108
- }
109
- return S(w), console.warn("SVG element not found or not mounted (timed out)."), null;
110
- }
111
- Pt(async () => {
112
- try {
113
- await b(), nt.value = !0;
114
- } catch {
115
- nt.value = !1;
116
- }
117
- }), Rt(lt, async () => {
118
- try {
119
- await b(), nt.value = !0;
120
- } catch {
121
- nt.value = !1;
122
- }
123
- });
124
- const f = /* @__PURE__ */ new Map();
125
- function y(e) {
126
- if (f.has(e))
127
- return f.get(e);
128
- const o = P("svg");
129
- o.setAttribute("width", "0"), o.setAttribute("height", "0"), o.style.position = "absolute", o.style.left = "-99999px", o.style.top = "-99999px";
130
- const h = P(e);
131
- o.appendChild(h), document.body.appendChild(o);
132
- const u = window.getComputedStyle(h), c = {};
133
- for (const t of W)
134
- c[t] = u.getPropertyValue(t);
135
- return document.body.removeChild(o), f.set(e, c), c;
136
- }
137
- function $(e) {
138
- const o = gt(e), h = y(e.tagName.toLowerCase()), u = [];
139
- for (const c of W) {
140
- let t = o.getPropertyValue(c) || "";
141
- const S = h[c] || "";
142
- if (j.has(c)) {
143
- c === "font-family" && t && (t = wt(t)), t && u.push(`${c}:${t};`);
144
- continue;
145
- }
146
- t && t !== S && u.push(`${c}:${t};`);
147
- }
148
- return u.join("");
149
- }
150
- function z(e, o) {
151
- e.getAttribute("width") && o.setAttribute("width", e.getAttribute("width")), e.getAttribute("height") && o.setAttribute("height", e.getAttribute("height")), e.getAttribute("viewBox") && o.setAttribute("viewBox", e.getAttribute("viewBox"));
152
- const h = [
153
- e,
154
- ...Array.from(e.querySelectorAll("*"))
155
- ], u = [
156
- o,
157
- ...Array.from(o.querySelectorAll("*"))
158
- ];
159
- for (let c = 0; c < h.length; c += 1) {
160
- const t = h[c], S = u[c], w = $(t);
161
- w && S.setAttribute("style", w), ["fill", "stroke", "filter", "clip-path", "mask"].forEach((A) => {
162
- const C = t.getAttribute(A);
163
- C && S.setAttribute(A, C);
164
- });
165
- }
166
- }
167
- function L(e) {
168
- const o = e.getAttribute("viewBox");
169
- if (!o)
170
- return null;
171
- const [h, u, c, t] = o.split(/\s+|,/).map(Number);
172
- return [h, u, c, t].some((S) => Number.isNaN(S)) ? null : { minX: h, minY: u, width: c, height: t };
173
- }
174
- function O(e) {
175
- e.getAttribute("xmlns") || e.setAttribute("xmlns", et), e.getAttribute("xmlns:xlink") || e.setAttribute("xmlns:xlink", yt), e.getAttribute("xml:space") || e.setAttribute("xml:space", "preserve");
176
- }
177
- function it(e) {
178
- const o = document.createElement("div");
179
- return o.style.position = "absolute", o.style.left = "-99999px", o.style.top = "-99999px", o.style.width = "0", o.style.height = "0", document.body.appendChild(o), o.appendChild(e), o;
180
- }
181
- function st(e) {
182
- try {
183
- e.remove();
184
- } catch {
185
- }
186
- }
187
- function dt(e, o, h, u, c) {
188
- if (!v.value || !v.value.text)
189
- return 0;
190
- const t = {
191
- text: v.value.text || "",
192
- color: v.value.color || "#111",
193
- fontSize: v.value.fontSize || 20,
194
- bold: !!v.value.bold,
195
- textAlign: (v.value?.textAlign || "center").toLowerCase(),
196
- paddingLeft: v.value.paddingLeft ?? 0,
197
- paddingRight: v.value.paddingRight ?? 0,
198
- subtitle: v.value.subtitle || null
199
- }, S = P("g");
200
- S.setAttribute("id", "__vdu_export_title"), e.appendChild(S);
201
- const w = h + t.paddingLeft, A = h + o - (t.paddingRight || 0), C = h + o / 2;
202
- let M = "start", X = w;
203
- t.textAlign === "center" ? (M = "middle", X = C) : t.textAlign === "right" && (M = "end", X = A);
204
- const D = u, T = Math.round(t.fontSize * 0.4), R = P("text");
205
- R.setAttribute("x", String(X)), R.setAttribute("y", String(D + t.fontSize)), R.setAttribute("text-anchor", M), R.setAttribute("dominant-baseline", "ideographic"), R.setAttribute(
206
- "style",
207
- `font-family:${c}; font-size:${t.fontSize}px; font-weight:${t.bold ? "700" : "400"}; fill:${t.color}; ${I ? "transform: scale(0.65, 1); transform-origin: center;" : ""}`
208
- ), R.textContent = t.text, S.appendChild(R);
209
- let J = t.fontSize;
210
- if (t.subtitle && t.subtitle.text) {
211
- const E = {
212
- color: t.subtitle.color || "#666",
213
- text: t.subtitle.text,
214
- fontSize: t.subtitle.fontSize || Math.max(12, Math.round(t.fontSize * 0.8)),
215
- bold: !!t.subtitle.bold
216
- }, V = P("text");
217
- V.setAttribute("x", String(X)), V.setAttribute("y", String(D + t.fontSize + T + E.fontSize)), V.setAttribute("text-anchor", M), V.setAttribute("dominant-baseline", "ideographic"), V.setAttribute(
218
- "style",
219
- `font-family:${c}; font-size:${E.fontSize}px; font-weight:${E.bold ? "600" : "400"}; fill:${E.color}; ${I ? "transform: scale(0.65, 1); transform-origin: center;" : ""}`
220
- ), V.textContent = E.text, S.appendChild(V), J += T + E.fontSize;
221
- }
222
- return J + Math.round(t.fontSize * 0.4);
223
- }
224
- function q(e, o, h, u, c) {
225
- if (!F.value || !F.value.show || !Array.isArray(rt.value) || !rt.value.length)
226
- return 0;
227
- const t = {
228
- bold: !!F.value.bold,
229
- backgroundColor: F.value.backgroundColor || "transparent",
230
- color: F.value.color || "#111",
231
- fontSize: F.value.fontSize || 14,
232
- paddingX: 14,
233
- paddingY: 10,
234
- itemGapX: 18,
235
- itemGapY: 12,
236
- markerSize: Math.max(
237
- 8,
238
- Math.round((F.value.fontSize || 14) * 0.9)
239
- ),
240
- markerTextGap: 8,
241
- lineHeight: Math.round((F.value.fontSize || 14) * 1.2),
242
- maxWidth: o
243
- }, S = P("g");
244
- S.setAttribute("id", "__vdu_export_legend"), S.setAttribute("transform", `translate(${h}, ${u})`), e.appendChild(S);
245
- const w = P("rect");
246
- w.setAttribute("rx", "6"), w.setAttribute("ry", "6"), w.setAttribute("fill", t.backgroundColor), S.appendChild(w);
247
- const A = P("g");
248
- S.appendChild(A);
249
- const C = P("text");
250
- C.setAttribute("x", "0"), C.setAttribute("y", "0"), C.setAttribute(
251
- "style",
252
- `font-family:${c}; font-size:${t.fontSize}px; font-weight:${t.bold ? "600" : "400"}; opacity:0;`
253
- ), A.appendChild(C);
254
- const M = (s) => (C.textContent = s || "", C.getComputedTextLength()), X = Math.max(1, t.maxWidth - t.paddingX * 2);
255
- function D(s, a) {
256
- const l = String(s || "").split(/\s+/).filter(Boolean), m = [];
257
- if (!l.length)
258
- return [""];
259
- let d = l.shift();
260
- for (; l.length; ) {
261
- const g = `${d} ${l[0]}`;
262
- if (M(g) <= a)
263
- d = g, l.shift();
264
- else if (M(d) > a && d.length > 1) {
265
- let x = "";
266
- for (const H of d) {
267
- const Q = x + H;
268
- if (M(Q) <= a)
269
- x = Q;
270
- else break;
271
- }
272
- const _ = d.slice(x.length);
273
- m.push(x), d = _.length ? _ : l.shift() || "";
274
- } else
275
- m.push(d), d = l.shift() || "";
276
- }
277
- d && m.push(d);
278
- const k = m[m.length - 1] || "";
279
- if (M(k) > a && k.length > 1) {
280
- let g = "";
281
- for (const _ of k) {
282
- const H = g + _;
283
- if (M(H) <= a)
284
- g = H;
285
- else break;
286
- }
287
- const x = k.slice(g.length);
288
- m[m.length - 1] = g, x && m.push(x);
289
- }
290
- return m;
291
- }
292
- const T = Math.PI / 180;
293
- function R(s, a, l, m, d = -90) {
294
- const k = d * T;
295
- let g = "";
296
- for (let x = 0; x < l; x += 1) {
297
- const _ = k + x * 2 * Math.PI / l, H = s + Math.cos(_) * m, Q = a + Math.sin(_) * m;
298
- g += (x === 0 ? "M" : "L") + H + "," + Q;
299
- }
300
- return g + "Z";
301
- }
302
- function J(s, a, l = 5, m, d) {
303
- const k = -90 * T;
304
- let g = "";
305
- for (let x = 0; x < l * 2; x += 1) {
306
- const _ = x % 2 === 0 ? m : d, H = k + x * Math.PI / l, Q = s + Math.cos(H) * _, Y = a + Math.sin(H) * _;
307
- g += (x === 0 ? "M" : "L") + Q + "," + Y;
308
- }
309
- return g + "Z";
310
- }
311
- const E = rt.value.map((s) => {
312
- const a = Math.max(
313
- 1,
314
- X - (t.markerSize + t.markerTextGap)
315
- ), l = D(s.name || "", a), m = Math.max(...l.map(M), 0), d = t.markerSize + t.markerTextGap + m, k = Math.max(
316
- t.markerSize,
317
- l.length * t.lineHeight
318
- );
319
- return {
320
- ...s,
321
- lines: l,
322
- itemW: d,
323
- itemH: k
324
- };
325
- }), V = [];
326
- let n = {
327
- items: [],
328
- width: 0,
329
- height: 0
330
- };
331
- for (const s of E) {
332
- const a = (n.items.length ? t.itemGapX : 0) + s.itemW;
333
- n.items.length && n.width + a > X ? (V.push(n), n = {
334
- items: [s],
335
- width: s.itemW,
336
- height: s.itemH
337
- }) : (n.items.push(s), n.width += a, n.height = Math.max(n.height, s.itemH));
338
- }
339
- n.items.length && V.push(n);
340
- let r = t.paddingY;
341
- for (const s of V) {
342
- let l = Math.max(t.paddingX, (t.maxWidth - s.width) / 2);
343
- for (let m = 0; m < s.items.length; m += 1) {
344
- const d = s.items[m], k = l + t.markerSize / 2, g = r + s.height / 2.5, x = t.markerSize / 2, _ = String(d.shape || "rect").toLowerCase();
345
- if (_ === "circle") {
346
- const p = P("circle");
347
- p.setAttribute("cx", String(k)), p.setAttribute("cy", String(g)), p.setAttribute("r", String(x * 0.8)), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
348
- } else if (_ === "rect" || _ === "square") {
349
- const p = P("path");
350
- p.setAttribute(
351
- "d",
352
- R(k, g, 4, x, -45)
353
- ), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
354
- } else if (_ === "diamond") {
355
- const p = P("path");
356
- p.setAttribute(
357
- "d",
358
- R(k, g, 4, x, 45)
359
- ), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
360
- } else if (_ === "triangle") {
361
- const p = P("path");
362
- p.setAttribute(
363
- "d",
364
- R(k, g, 3, x, -90)
365
- ), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
366
- } else if (_ === "pentagon") {
367
- const p = P("path");
368
- p.setAttribute(
369
- "d",
370
- R(k, g, 5, x, -90)
371
- ), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
372
- } else if (_ === "hexagon") {
373
- const p = P("path");
374
- p.setAttribute(
375
- "d",
376
- R(k, g, 6, x, 0)
377
- ), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
378
- } else if (_ === "star") {
379
- const p = P("path"), tt = x, pt = x * 0.5;
380
- p.setAttribute(
381
- "d",
382
- J(k, g, 5, tt, pt)
383
- ), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
384
- } else {
385
- const p = P("rect");
386
- p.setAttribute("x", String(l)), p.setAttribute(
387
- "y",
388
- String(r + (s.height - t.markerSize) / 2)
389
- ), p.setAttribute("width", String(t.markerSize)), p.setAttribute("height", String(t.markerSize)), p.setAttribute("fill", d.color || "#000"), A.appendChild(p);
390
- }
391
- const H = l + t.markerSize + t.markerTextGap, Q = r + (s.height - d.lines.length * t.lineHeight) / 2 + t.fontSize, Y = P("text");
392
- Y.setAttribute("x", String(H)), Y.setAttribute("y", String(Q)), Y.setAttribute(
393
- "style",
394
- `font-family:${c}; font-size:${t.fontSize}px; font-weight:${t.bold ? "600" : "400"}; fill:${t.color};`
395
- ), Y.setAttribute("dominant-baseline", "ideographic");
396
- let mt = !0;
397
- for (const p of d.lines) {
398
- const tt = P("tspan");
399
- mt || tt.setAttribute("dy", String(t.lineHeight)), tt.setAttribute("x", String(H)), tt.textContent = p, Y.appendChild(tt), mt = !1;
400
- }
401
- A.appendChild(Y), l += d.itemW + (m < s.items.length - 1 ? t.itemGapX : 0);
402
- }
403
- r += s.height + t.itemGapY;
404
- }
405
- V.length && (r -= t.itemGapY);
406
- const i = r + t.paddingY;
407
- return w.setAttribute("x", "0"), w.setAttribute("y", "0"), w.setAttribute("width", String(t.maxWidth)), w.setAttribute("height", String(i)), C.remove(), i + Math.round(t.fontSize * 0.4);
408
- }
409
- function ht(e) {
410
- const o = e.cloneNode(!0);
411
- return o.querySelectorAll("script").forEach((h) => h.remove()), z(e, o), O(o), o;
412
- }
413
- function B(e) {
414
- const o = Array.from(e.childNodes).filter(
415
- (c) => c.nodeType === 1 && c.nodeName.toLowerCase() === "defs"
416
- ), h = Array.from(e.childNodes).filter(
417
- (c) => !(c.nodeType === 1 && c.nodeName.toLowerCase() === "defs")
418
- ), u = document.createElementNS(et, "g");
419
- u.setAttribute("id", "__vdu_export_content");
420
- for (const c of h) u.appendChild(c);
421
- for (const c of o) e.appendChild(c);
422
- return e.appendChild(u), u;
423
- }
424
- function K(e, o) {
425
- o <= 0 || e.setAttribute("transform", `translate(0, ${o})`);
426
- }
427
- function ct(e, o) {
428
- if (o <= 0) return;
429
- const h = L(e), u = e.getAttribute("height");
430
- if (h)
431
- e.setAttribute(
432
- "viewBox",
433
- `${h.minX} ${h.minY} ${h.width} ${h.height + o}`
434
- ), u && e.setAttribute(
435
- "height",
436
- String(Number(u) + o)
437
- );
438
- else if (u)
439
- e.setAttribute("height", String(Number(u) + o));
440
- else {
441
- const c = e.getBBox();
442
- e.setAttribute(
443
- "viewBox",
444
- `0 0 ${Math.max(1, c.width)} ${Math.max(1, c.height + o)}`
445
- );
446
- }
447
- }
448
- function U(e) {
449
- const o = L(e);
450
- if (o)
451
- return o.width;
452
- const h = Number(e.getAttribute("width"));
453
- return !Number.isNaN(h) && h > 0 ? h : e.getBBox().width || 0;
454
- }
455
- function G(e) {
456
- const o = L(e);
457
- if (o) return o.height;
458
- const h = Number(e.getAttribute("height"));
459
- return !Number.isNaN(h) && h > 0 ? h : e.getBBox().height || 0;
460
- }
461
- async function ut(e) {
462
- const o = it(e);
463
- Mt();
464
- try {
465
- if (document.fonts?.ready)
466
- try {
467
- await Promise.race([
468
- document.fonts.ready,
469
- new Promise((T) => setTimeout(T, 4e3))
470
- ]);
471
- } catch {
472
- }
473
- const h = B(e), u = L(e), c = u ? u.minX : 0, t = u ? u.minY : 0, S = Math.max(1, U(e)), w = Math.max(1, G(e)), A = wt(
474
- gt(e).getPropertyValue("font-family") || ""
475
- );
476
- let M = (at ? null : dt(e, S, c, t, A)) ?? 0;
477
- const X = F && F.value && F.value.position ? String(F.value.position).toLowerCase() : "top";
478
- F && F.value && F.value.show && X === "top" && (M += q(
479
- e,
480
- S,
481
- c,
482
- t + M,
483
- A
484
- )), K(h, M);
485
- let D = 0;
486
- F && F.value && F.value.show && X === "bottom" && (D += q(
487
- e,
488
- S,
489
- c,
490
- t + M + w,
491
- A
492
- )), ct(e, M + D), e.style.backgroundColor = ot.value ?? "#FFF", await Et(e, { mode: "raster" }), Tt(e, v.value.text ? -6 : -48);
493
- } finally {
494
- st(o), Mt();
495
- }
496
- }
497
- async function Z() {
498
- const e = await b(), o = ht(e);
499
- await ut(o);
500
- const u = `<?xml version="1.0" standalone="no"?>
501
- ${new XMLSerializer().serializeToString(o)}`, c = new Blob([u], { type: "image/svg+xml;charset=utf-8" }), t = URL.createObjectURL(c), S = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(u)}`;
502
- return { blob: c, url: t, text: u, dataUrl: S };
503
- }
504
- async function ft(e) {
505
- const { url: o } = await Z(), h = e || v.value?.text || "chart", u = document.createElement("a");
506
- u.href = o, u.download = h.endsWith(".svg") ? h : `${h}.svg`, document.body.appendChild(u), u.click(), document.body.removeChild(u), URL.revokeObjectURL(o);
507
- }
508
- return { ready: nt, getSvg: Z, exportSvg: ft };
509
- }
510
- function Tt(N, v = -50) {
511
- if (!v) return;
512
- const F = N.getAttribute("viewBox"), rt = (W) => {
513
- if (!W) return;
514
- const j = N.getAttribute("height");
515
- if (!j) return;
516
- const b = /^(\d+(\.\d+)?)(px)?$/.exec(j.trim());
517
- if (!b) return;
518
- const f = parseFloat(b[1]) || 0, y = Math.max(1, f + W);
519
- N.setAttribute("height", String(y));
520
- };
521
- if (F) {
522
- const W = F.trim().split(/\s+|,/).map(Number);
523
- if (W.length !== 4 || W.some((O) => !Number.isFinite(O)))
524
- return;
525
- const [j, b, f, y] = W, $ = b + v, z = -v, L = Math.max(1, y + z);
526
- N.setAttribute("viewBox", `${j} ${$} ${f} ${L}`), rt(z);
527
- return;
528
- }
529
- let ot = Number(N.getAttribute("width")), I = Number(N.getAttribute("height"));
530
- if (!(ot > 0 && I > 0)) {
531
- const W = N.getBBox();
532
- ot = Math.max(1, W.width || 1), I = Math.max(1, W.height || 1);
533
- }
534
- const at = v, lt = -v, nt = Math.max(1, I + lt);
535
- N.setAttribute("viewBox", `0 ${at} ${ot} ${nt}`), (function() {
536
- const j = N.getAttribute("height");
537
- if (!j) return;
538
- const b = /^(\d+(\.\d+)?)(px)?$/.exec(j.trim());
539
- if (!b) return;
540
- const f = parseFloat(b[1]) || 0, y = Math.max(1, f + lt);
541
- N.setAttribute("height", String(y));
542
- })();
543
- }
544
- async function Et(N, { mode: v = "raster" } = {}) {
545
- const F = Array.from(N.querySelectorAll("foreignObject"));
546
- if (!F.length)
547
- return { converted: 0, rasterized: 0, skipped: 0, errors: 0 };
548
- let rt = 0, ot = 0, I = 0, at = 0;
549
- const lt = (b) => ["div", "p", "span", "strong", "em", "b", "i", "br"].includes(b), nt = (b) => {
550
- try {
551
- const f = b.firstElementChild;
552
- if (!f) return !1;
553
- const y = [f];
554
- for (; y.length; ) {
555
- const $ = y.pop();
556
- if ($.nodeType === 3)
557
- continue;
558
- if ($.nodeType !== 1)
559
- return !1;
560
- const z = ($.tagName || "").toLowerCase();
561
- if (!lt(z) || $.querySelector?.("img,svg,canvas,video,foreignObject"))
562
- return !1;
563
- for (const L of Array.from($.childNodes))
564
- y.push(L);
565
- }
566
- return !0;
567
- } catch {
568
- return !1;
569
- }
570
- };
571
- function W(b) {
572
- try {
573
- const f = b.firstElementChild;
574
- if (!f) return null;
575
- const y = (n, r = 0) => Number.isFinite(+n) ? +n : r, $ = y(b.getAttribute("x"), 0), z = y(b.getAttribute("y"), 0);
576
- let L = y(b.getAttribute("width"), NaN);
577
- if (!Number.isFinite(L) || L <= 0) {
578
- const n = b.getBBox?.();
579
- L = Math.max(1, y(n?.width, 0));
580
- }
581
- const O = (n, r) => {
582
- if (!n) return Math.round(r * 1.2);
583
- const i = n.trim().toLowerCase();
584
- if (i === "normal") return Math.round(r * 1.2);
585
- if (i.endsWith("px"))
586
- return parseFloat(i) || Math.round(r * 1.2);
587
- if (i.endsWith("%"))
588
- return parseFloat(i) / 100 * r || Math.round(r * 1.2);
589
- if (i.endsWith("em")) return (parseFloat(i) || 1) * r;
590
- if (i.endsWith("rem")) {
591
- const a = parseFloat(
592
- getComputedStyle(document.documentElement).fontSize
593
- ) || r;
594
- return (parseFloat(i) || 1) * a;
595
- }
596
- const s = Number(i);
597
- return Number.isFinite(s) ? s * r : Math.round(r * 1.2);
598
- }, it = (n) => {
599
- const r = (s) => {
600
- const a = (s || "").trim().toLowerCase();
601
- if (a.endsWith("px")) return parseFloat(a) || 0;
602
- if (a.endsWith("rem")) {
603
- const m = parseFloat(
604
- getComputedStyle(document.documentElement).fontSize
605
- ) || 16;
606
- return (parseFloat(a) || 0) * m;
607
- }
608
- if (a.endsWith("em")) {
609
- const m = parseFloat(
610
- getComputedStyle(document.body).fontSize
611
- ) || 16;
612
- return (parseFloat(a) || 0) * m;
613
- }
614
- const l = Number(a);
615
- return Number.isFinite(l) ? l : 0;
616
- }, i = (n || "").split(/\s+/).map(r).filter(Number.isFinite);
617
- return i.length ? i.length === 1 ? [i[0], i[0], i[0], i[0]] : i.length === 2 ? [i[0], i[1], i[0], i[1]] : i.length === 3 ? [i[0], i[1], i[2], i[1]] : [i[0], i[1], i[2], i[3]] : [0, 0, 0, 0];
618
- }, st = (n, r) => {
619
- const i = gt(n);
620
- let s = i.getPropertyValue("font-family") || r?.ff || "system-ui";
621
- s = wt(s);
622
- let a = parseFloat(i.getPropertyValue("font-size"));
623
- Number.isFinite(a) || (a = r?.fs || 14);
624
- const l = i.getPropertyValue("font-weight") || r?.fw || "400", m = i.getPropertyValue("font-style") || r?.fsty || "normal", d = i.getPropertyValue("font-stretch") || r?.fstc || "normal", k = i.getPropertyValue("letter-spacing") || r?.lsp || "normal", g = i.getPropertyValue("word-spacing") || r?.wsp || "0px", x = i.getPropertyValue("font-kerning") || r?.kern || "auto", _ = i.getPropertyValue("font-variant-ligatures") || r?.liga || "normal", H = i.getPropertyValue("text-transform") || r?.ttfm || "none", Q = i.getPropertyValue("color") || r?.fill || "#000", Y = i.getPropertyValue("line-height"), mt = !Y || Y.trim().toLowerCase() === "normal" ? r?.lh ?? Math.round(a * 1.2) : O(Y, a), p = (i.getPropertyValue("text-align") || r?.ta || "start").trim().toLowerCase();
625
- let tt = parseFloat(i.getPropertyValue("padding-top")) || 0, pt = parseFloat(i.getPropertyValue("padding-right")) || 0, bt = parseFloat(i.getPropertyValue("padding-bottom")) || 0, xt = parseFloat(i.getPropertyValue("padding-left")) || 0;
626
- const St = i.getPropertyValue("padding");
627
- if (St && tt === 0 && pt === 0 && bt === 0 && xt === 0) {
628
- const [kt, Ft, _t, zt] = it(St);
629
- tt = kt, pt = Ft, bt = _t, xt = zt;
630
- }
631
- const Nt = parseFloat(i.getPropertyValue("border-left-width")) || 0, vt = parseFloat(i.getPropertyValue("border-right-width")) || 0, $t = i.getPropertyValue("box-sizing") || "content-box";
632
- return {
633
- ff: s,
634
- fs: a,
635
- fw: l,
636
- fsty: m,
637
- fstc: d,
638
- lsp: k,
639
- wsp: g,
640
- kern: x,
641
- liga: _,
642
- ttfm: H,
643
- fill: Q,
644
- lh: mt,
645
- ta: p,
646
- padL: xt,
647
- padR: pt,
648
- padT: tt,
649
- padB: bt,
650
- bL: Nt,
651
- bR: vt,
652
- box: $t
653
- };
654
- }, dt = (n) => /^(div|p|section|article|ul|ol|li|h[1-6])$/.test(n), q = { __para__: !0 }, ht = { __br__: !0 }, B = [], K = st(f), ct = (n, r, i) => {
655
- if (n.nodeType === 3) {
656
- const m = (n.nodeValue || "").replace(/\s+/g, " ").trim();
657
- m && B.push({ text: m, style: r, path: i.slice() });
658
- return;
659
- }
660
- if (n.nodeType !== 1) return;
661
- const s = n.tagName.toLowerCase();
662
- if (s === "br") {
663
- B.push({ ...ht, path: i.slice() });
664
- return;
665
- }
666
- const a = st(n, r);
667
- i.push(n);
668
- for (const l of Array.from(n.childNodes))
669
- ct(l, a, i);
670
- i.pop(), dt(s) && B.push({ ...q, path: i.slice() });
671
- };
672
- for (ct(f, K, [f]); B.length && (B.at(-1).__para__ || B.at(-1).__br__); )
673
- B.pop();
674
- if (!B.length) return null;
675
- const U = B.filter((n) => !n.__para__ && !n.__br__), G = (() => {
676
- if (!U.length) return [f];
677
- const n = U.map((s) => s.path), r = Math.min(...n.map((s) => s.length));
678
- let i = 0;
679
- for (; i < r; ) {
680
- const s = n[0][i];
681
- if (n.every((a) => a[i] === s)) i += 1;
682
- else break;
683
- }
684
- return n[0].slice(0, Math.max(1, i));
685
- })(), ut = G[G.length - 1] || f, Z = st(ut);
686
- let ft = 0, e = 0, o = 0;
687
- for (const n of G) {
688
- const r = st(n);
689
- ft += r.padL, e += r.padR, o += r.padT;
690
- }
691
- const h = [Math.max(1, L - ft - e)];
692
- for (const n of G)
693
- try {
694
- const r = gt(n);
695
- if (n.clientWidth && n.clientWidth > 0) {
696
- const a = parseFloat(r.paddingLeft) || 0, l = parseFloat(r.paddingRight) || 0, m = Math.max(1, n.clientWidth - a - l);
697
- h.push(m);
698
- }
699
- const i = r.width, s = parseFloat(i);
700
- if (Number.isFinite(s) && s > 0) {
701
- const a = r.boxSizing || r.getPropertyValue("box-sizing") || "content-box", l = parseFloat(r.paddingLeft) || 0, m = parseFloat(r.paddingRight) || 0, d = parseFloat(r.borderLeftWidth) || 0, k = parseFloat(r.borderRightWidth) || 0, g = a === "border-box" ? Math.max(1, s - l - m - d - k) : Math.max(1, s);
702
- h.push(g);
703
- }
704
- } catch {
705
- }
706
- let u = Math.floor(Math.min(...h.filter(Number.isFinite))) - 1;
707
- u > 0 || (u = 1);
708
- let c = "start", t = $ + ft;
709
- Z.ta === "center" ? (c = "middle", t = $ + ft + u / 2) : (Z.ta === "right" || Z.ta === "end") && (c = "end", t = $ + (L - e));
710
- const S = b.ownerSVGElement || b.closest("svg"), w = document.createElementNS(et, "text");
711
- w.setAttribute("x", String(t)), w.setAttribute("y", String(z + o)), w.setAttribute("text-anchor", c), w.setAttribute("dominant-baseline", "text-before-edge"), w.setAttribute("xml:space", "preserve");
712
- const A = document.createElementNS(et, "text");
713
- A.setAttribute("x", "0"), A.setAttribute("y", "0"), A.setAttribute("opacity", "0"), (S || b).appendChild(A);
714
- const C = (n) => `font-family:${n.ff}; font-size:${n.fs}px; font-weight:${n.fw}; font-style:${n.fsty}; font-stretch:${n.fstc}; letter-spacing:${n.lsp}; word-spacing:${n.wsp}; font-kerning:${n.kern}; font-variant-ligatures:${n.liga}; text-transform:${n.ttfm};`, M = (n, r) => (A.textContent = n || "", A.setAttribute("style", C(r)), A.getComputedTextLength()), X = (n) => M(" ", n), D = [];
715
- let T = [], R = 0;
716
- const J = () => {
717
- T.length && D.push({ segs: T.slice() }), T = [], R = 0;
718
- }, E = (n, r, i) => {
719
- let s = M(n, r);
720
- if (i) {
721
- const a = X(r);
722
- s += a, T.push({ text: " ", ...r, w: a, isSpace: !0 });
723
- }
724
- T.push({ text: n, ...r, w: s }), R += s;
725
- }, V = (n, r, i) => {
726
- let s = "";
727
- for (const a of n) {
728
- const l = s + a;
729
- if (M(l, r) <= i) s = l;
730
- else break;
731
- }
732
- return s || n[0] || "";
733
- };
734
- for (const n of B) {
735
- if (n.__para__ || n.__br__) {
736
- J();
737
- continue;
738
- }
739
- const r = n.style, i = n.text.split(/(\s+)/).filter((l) => l.length > 0), s = (l, m) => {
740
- if (!l) return;
741
- const d = Math.max(1, u), k = M(l, r) + (m ? X(r) : 0);
742
- if (T.length === 0)
743
- if (k <= d)
744
- E(l, r, !1);
745
- else {
746
- let g = l;
747
- for (; g; ) {
748
- const x = V(g, r, d);
749
- E(x, r, !1), g = g.slice(x.length), g && J();
750
- }
751
- }
752
- else if (R + k <= d)
753
- E(l, r, m);
754
- else if (J(), M(l, r) <= d)
755
- E(l, r, !1);
756
- else {
757
- let g = l;
758
- for (; g; ) {
759
- const x = V(g, r, d);
760
- E(x, r, !1), g = g.slice(x.length), g && J();
761
- }
762
- }
763
- };
764
- let a = !1;
765
- for (const l of i) {
766
- if (/^\s+$/.test(l)) {
767
- a = !0;
768
- continue;
769
- }
770
- s(l, a), a = !1;
771
- }
772
- }
773
- J();
774
- for (let n = 0; n < D.length; n += 1) {
775
- const r = D[n].segs, i = Math.max(
776
- ...r.map((a) => a.fs || Z.fs),
777
- Z.fs
778
- );
779
- let s = !0;
780
- for (const a of r) {
781
- const l = document.createElementNS(et, "tspan");
782
- s && (l.setAttribute("x", String(t)), n > 0 && l.setAttribute("dy", String(i)), s = !1), l.setAttribute(
783
- "style",
784
- `${C(a)} fill:${a.fill};`
785
- ), l.textContent = a.text, w.appendChild(l);
786
- }
787
- if (!r.length && n > 0) {
788
- const a = document.createElementNS(et, "tspan");
789
- a.setAttribute("x", String(t)), a.setAttribute("dy", String(i)), a.textContent = "", w.appendChild(a);
790
- }
791
- }
792
- try {
793
- A.remove();
794
- } catch {
795
- }
796
- return w;
797
- } catch {
798
- return null;
799
- }
800
- }
801
- const j = (b) => {
802
- try {
803
- const f = document.createElement("div");
804
- f.style.position = "absolute", f.style.left = "-99999px", f.style.top = "-99999px", f.style.visibility = "hidden", f.style.pointerEvents = "none", f.style.width = "auto", f.style.height = "auto";
805
- const y = b.cloneNode(!0);
806
- y.style.width = "auto", y.style.height = "auto", y.style.display = "inline-block", y.style.maxWidth = "none", y.style.maxHeight = "none", y.style.boxSizing = "content-box", document.body.appendChild(f), f.appendChild(y);
807
- const $ = y.getBoundingClientRect(), z = Math.ceil($.width || y.scrollWidth || 0), L = Math.ceil($.height || y.scrollHeight || 0);
808
- return f.remove(), { w: Math.max(1, z), h: Math.max(1, L) };
809
- } catch {
810
- return { w: 0, h: 0 };
811
- }
812
- };
813
- for (const b of F)
814
- try {
815
- if (b.hasAttribute("data-no-svg-export")) {
816
- b.remove(), I += 1;
817
- continue;
818
- }
819
- if (nt(b)) {
820
- const f = W(b);
821
- if (f) {
822
- b.parentNode.replaceChild(f, b), rt += 1;
823
- continue;
824
- }
825
- }
826
- I += 1;
827
- } catch {
828
- at += 1;
829
- }
830
- if (v === "raster") {
831
- const b = Array.from(N.querySelectorAll("foreignObject"));
832
- for (const f of b)
833
- try {
834
- if (f.hasAttribute("data-no-svg-export")) {
835
- f.remove(), I += 1;
836
- continue;
837
- }
838
- await new Promise((G) => requestAnimationFrame(G));
839
- const y = f.getBBox();
840
- let $ = Math.max(1, Math.ceil(y.width)), z = Math.max(1, Math.ceil(y.height));
841
- const L = f.firstElementChild;
842
- if (L) {
843
- const G = j(L), ut = parseFloat(f.getAttribute("width") || "0") || 0, Z = parseFloat(f.getAttribute("height") || "0") || 0;
844
- $ = Math.max($, ut, G.w), z = Math.max(z, Z, G.h);
845
- }
846
- if (!($ > 0 && z > 0)) {
847
- I += 1;
848
- continue;
849
- }
850
- const O = document.createElementNS(et, "svg");
851
- O.setAttribute("xmlns", et), O.setAttribute("xmlns:xlink", yt), O.setAttribute("width", String($)), O.setAttribute("height", String(z)), O.setAttribute("viewBox", `0 0 ${$} ${z}`);
852
- const it = f.cloneNode(!0);
853
- it.setAttribute("x", "0"), it.setAttribute("y", "0"), it.setAttribute("width", String($)), it.setAttribute("height", String(z)), O.appendChild(it);
854
- const st = new XMLSerializer().serializeToString(O), dt = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(st), q = document.createElement("canvas"), ht = 2;
855
- q.width = Math.max(1, Math.floor($ * ht)), q.height = Math.max(1, Math.floor(z * ht));
856
- const B = q.getContext("2d"), K = new Image();
857
- K.decoding = "sync", K.crossOrigin = "anonymous", await new Promise((G, ut) => {
858
- K.onload = G, K.onerror = ut, K.src = dt;
859
- }), B.drawImage(K, 0, 0, q.width, q.height);
860
- const ct = q.toDataURL("image/png"), U = document.createElementNS(et, "image");
861
- U.setAttributeNS(yt, "href", ct), U.setAttribute("href", ct), U.setAttribute("x", f.getAttribute("x") || String(y.x)), U.setAttribute("y", f.getAttribute("y") || String(y.y)), U.setAttribute("width", String($)), U.setAttribute("height", String(z)), f.parentNode.replaceChild(U, f), ot += 1;
862
- } catch {
863
- at += 1;
864
- }
865
- }
866
- return { converted: rt, rasterized: ot, skipped: I, errors: at };
867
- }
868
- export {
869
- Ot as u
870
- };