vue-data-ui 3.22.13 → 3.23.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 (224) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -1
  3. package/dist/{Arrow-DKx74WtM.js → Arrow-o2qHNvrC.js} +1 -1
  4. package/dist/{BaseDraggableDialog-3n8udWmh.js → BaseDraggableDialog-qTnfhLBz.js} +2 -2
  5. package/dist/{BaseIcon-CP5RWnqt.js → BaseIcon-91MZoczJ.js} +4 -3
  6. package/dist/{BaseLegendToggle-DsWphmIb.js → BaseLegendToggle-CtAPwzr2.js} +1 -1
  7. package/dist/{BaseZoomControls-C9_ygNN4.js → BaseZoomControls-rdzlicuz.js} +2 -2
  8. package/dist/{ColorPicker-3N_HVgXs.js → ColorPicker-CIAkdPrj.js} +2 -2
  9. package/dist/{DataTable-DzPEVvSo.js → DataTable-D4tM9s5Y.js} +2 -2
  10. package/dist/HillActions-BWhxHlrj.js +187 -0
  11. package/dist/{Legend-C0xAnJdO.js → Legend-CQTRlzK-.js} +2 -2
  12. package/dist/{NonSvgPenAndPaper-B_mE5UbR.js → NonSvgPenAndPaper-Cawacw1W.js} +19 -19
  13. package/dist/{PackageVersion-B6Hokxw9.js → PackageVersion--QCMh5k_.js} +1 -1
  14. package/dist/{PenAndPaper-CSMVXpg2.js → PenAndPaper-cE4J8-rA.js} +11 -11
  15. package/dist/{Shape-BfnXr1nJ.js → Shape-BPMV94Ij.js} +3 -3
  16. package/dist/{Slicer-C6qNUmZ4.js → Slicer-5yIrdoJv.js} +15 -15
  17. package/dist/SlicerPreview-DvjLV2TW.js +1689 -0
  18. package/dist/{SparkTooltip-uoUiL_P8.js → SparkTooltip-BaYtEKS6.js} +6 -6
  19. package/dist/Title-BODtwViI.js +87 -0
  20. package/dist/{Tooltip-CA1rtSyl.js → Tooltip-CMTGxeYO.js} +1 -1
  21. package/dist/{UserOptions-DzAFK9cY.js → UserOptions-3ujTo3LD.js} +2 -2
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +2 -0
  49. package/dist/components/vue-ui-history-plot.js +1 -1
  50. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  51. package/dist/components/vue-ui-icon.js +1 -1
  52. package/dist/components/vue-ui-kpi.js +1 -1
  53. package/dist/components/vue-ui-mini-loader.js +1 -1
  54. package/dist/components/vue-ui-molecule.js +1 -1
  55. package/dist/components/vue-ui-mood-radar.js +1 -1
  56. package/dist/components/vue-ui-nested-donuts.js +1 -1
  57. package/dist/components/vue-ui-onion.js +1 -1
  58. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  59. package/dist/components/vue-ui-quadrant.js +1 -1
  60. package/dist/components/vue-ui-quick-chart.js +1 -1
  61. package/dist/components/vue-ui-radar.js +1 -1
  62. package/dist/components/vue-ui-rating.js +1 -1
  63. package/dist/components/vue-ui-relation-circle.js +1 -1
  64. package/dist/components/vue-ui-ridgeline.js +1 -1
  65. package/dist/components/vue-ui-rings.js +1 -1
  66. package/dist/components/vue-ui-scatter.js +1 -1
  67. package/dist/components/vue-ui-skeleton.js +1 -1
  68. package/dist/components/vue-ui-smiley.js +1 -1
  69. package/dist/components/vue-ui-spark-trend.js +1 -1
  70. package/dist/components/vue-ui-sparkbar.js +1 -1
  71. package/dist/components/vue-ui-sparkgauge.js +1 -1
  72. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  73. package/dist/components/vue-ui-sparkline.js +1 -1
  74. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  75. package/dist/components/vue-ui-stackbar.js +1 -1
  76. package/dist/components/vue-ui-stackline.js +1 -1
  77. package/dist/components/vue-ui-strip-plot.js +1 -1
  78. package/dist/components/vue-ui-table-heatmap.js +1 -1
  79. package/dist/components/vue-ui-table-sparkline.js +1 -1
  80. package/dist/components/vue-ui-table.js +1 -1
  81. package/dist/components/vue-ui-thermometer.js +1 -1
  82. package/dist/components/vue-ui-timer.js +1 -1
  83. package/dist/components/vue-ui-tiremarks.js +1 -1
  84. package/dist/components/vue-ui-treemap.js +1 -1
  85. package/dist/components/vue-ui-vertical-bar.js +1 -1
  86. package/dist/components/vue-ui-waffle.js +1 -1
  87. package/dist/components/vue-ui-wheel.js +1 -1
  88. package/dist/components/vue-ui-word-cloud.js +1 -1
  89. package/dist/components/vue-ui-world.js +1 -1
  90. package/dist/components/vue-ui-xy-canvas.js +1 -1
  91. package/dist/components/vue-ui-xy.js +1 -1
  92. package/dist/{dom-to-png-BdAFKZQg.js → dom-to-png-4tdMNGPX.js} +1 -1
  93. package/dist/exposedLib-DWLRqRhv.js +25 -0
  94. package/dist/{img-Bikk1dGb.js → img-DIQG5q8T.js} +1 -1
  95. package/dist/{labelUtils-BUhssos9.js → labelUtils-C5lnc_xc.js} +1 -1
  96. package/dist/{lib-CFm_J26b.js → lib-BuMGJ_a0.js} +216 -173
  97. package/dist/{package-DmDydylu.js → package-BMc_ZieJ.js} +1 -1
  98. package/dist/{pdf-zmz3l2uy.js → pdf-Cnz4NKM9.js} +1 -1
  99. package/dist/{render-common-BIG8JYGK.js → render-common-Ktg2LZFG.js} +21 -21
  100. package/dist/ssr/vue-ui-donut.js +1 -1
  101. package/dist/ssr/vue-ui-xy.js +1 -1
  102. package/dist/ssr.js +2 -2
  103. package/dist/style.css +1 -1
  104. package/dist/types/vue-data-ui.d.ts +493 -0
  105. package/dist/types/vue-ui-hill.d.ts +90 -0
  106. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
  107. package/dist/{useConfig-C0V0eG7L.js → useConfig-BilxnBNr.js} +767 -476
  108. package/dist/useHints-Dq_w2E8B.js +66 -0
  109. package/dist/{useNestedProp-BY6DNN3i.js → useNestedProp--NSEmhOH.js} +1 -1
  110. package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Cwq7NcQz.js} +3 -2
  111. package/dist/{usePrinter-BH-xle1O.js → usePrinter-BFvi4jVy.js} +2 -2
  112. package/dist/useTransitions-g_zBREk2.js +39 -0
  113. package/dist/utils.js +14 -14
  114. package/dist/{vue-data-ui-rkzh6EkO.js → vue-data-ui-EsawKe_W.js} +85 -81
  115. package/dist/vue-data-ui.js +77 -76
  116. package/dist/vue-ui-3d-bar-RSUS2xpL.js +1849 -0
  117. package/dist/{vue-ui-accordion-UA88lv4d.js → vue-ui-accordion-61MlW-Ge.js} +4 -4
  118. package/dist/vue-ui-age-pyramid-CgnPWA93.js +1263 -0
  119. package/dist/vue-ui-annotator-DBRT85HG.js +2913 -0
  120. package/dist/vue-ui-bullet-Bc3-WaN1.js +724 -0
  121. package/dist/{vue-ui-bump-BS7RCf0Z.js → vue-ui-bump-Dvv3iSKr.js} +332 -295
  122. package/dist/{vue-ui-candlestick-BZSGDKrM.js → vue-ui-candlestick-DvvsrIdp.js} +464 -440
  123. package/dist/vue-ui-carousel-table-DtsNVim8.js +463 -0
  124. package/dist/vue-ui-chestnut-ArloORzP.js +2068 -0
  125. package/dist/{vue-ui-chord-D6G7ceE-.js → vue-ui-chord-xX5gWZy8.js} +430 -424
  126. package/dist/vue-ui-circle-pack-D8wykmqg.js +1638 -0
  127. package/dist/{vue-ui-cursor-BpN5MsXM.js → vue-ui-cursor-CxgE6Phh.js} +61 -61
  128. package/dist/{vue-ui-dag-BzgOgXzU.js → vue-ui-dag-C9Sf9vH7.js} +924 -916
  129. package/dist/vue-ui-dashboard-bGmaglAj.js +520 -0
  130. package/dist/{vue-ui-digits-OMPrn8fb.js → vue-ui-digits-DgDE-_Fn.js} +58 -50
  131. package/dist/vue-ui-donut-B_n6wF6B.js +2440 -0
  132. package/dist/{vue-ui-donut-Cp5NbZ1r.js → vue-ui-donut-Bmo149AR.js} +113 -113
  133. package/dist/{vue-ui-donut-evolution-DHVi5rOn.js → vue-ui-donut-evolution-D6vH_hfx.js} +528 -447
  134. package/dist/vue-ui-dumbbell-BX4Ao_wR.js +1582 -0
  135. package/dist/{vue-ui-flow-BusUK3H0.js → vue-ui-flow-Bshw8pT_.js} +415 -407
  136. package/dist/vue-ui-funnel-CjYosIik.js +797 -0
  137. package/dist/vue-ui-galaxy-CvXgy-dy.js +1111 -0
  138. package/dist/vue-ui-gauge-CByT0_vF.js +953 -0
  139. package/dist/{vue-ui-geo-CyFgFKlh.js → vue-ui-geo-C-gSZL2q.js} +378 -363
  140. package/dist/{vue-ui-gizmo-DdeXwCQp.js → vue-ui-gizmo-CJdxyPID.js} +57 -49
  141. package/dist/{vue-ui-heatmap-D8-qJ7fg.js → vue-ui-heatmap-DEEKv8ip.js} +498 -490
  142. package/dist/vue-ui-hill-D7LYAgAL.js +1768 -0
  143. package/dist/{vue-ui-history-plot-C2Aqk2ON.js → vue-ui-history-plot-BhcU94Pt.js} +553 -556
  144. package/dist/vue-ui-horizontal-bar-CfFye5tL.js +1733 -0
  145. package/dist/vue-ui-kpi-DCBnNfTb.js +104 -0
  146. package/dist/vue-ui-mini-loader-CtWpqnLW.js +133 -0
  147. package/dist/vue-ui-molecule-D3igGyOy.js +958 -0
  148. package/dist/{vue-ui-mood-radar-BiOjxFEN.js → vue-ui-mood-radar-sl6DMxqR.js} +349 -341
  149. package/dist/{vue-ui-nested-donuts-Cl1HVvDp.js → vue-ui-nested-donuts-aS4YzaB3.js} +449 -413
  150. package/dist/vue-ui-onion-EhPTZpW_.js +1258 -0
  151. package/dist/vue-ui-parallel-coordinate-plot-DE9wTmQQ.js +1455 -0
  152. package/dist/{vue-ui-quadrant-B21LkUc8.js → vue-ui-quadrant-SaY_RPSE.js} +625 -617
  153. package/dist/vue-ui-quick-chart-CJ9rejnj.js +2389 -0
  154. package/dist/{vue-ui-radar-CyzAyVos.js → vue-ui-radar-CaNen5Fj.js} +356 -310
  155. package/dist/vue-ui-rating--K7rX2an.js +360 -0
  156. package/dist/vue-ui-relation-circle-FLs8vOxQ.js +925 -0
  157. package/dist/vue-ui-ridgeline-Beg5hshN.js +1663 -0
  158. package/dist/{vue-ui-rings-FtcdX8xl.js → vue-ui-rings-BevKD8P-.js} +449 -423
  159. package/dist/{vue-ui-scatter-Cp_-2ahf.js → vue-ui-scatter-CNA7jF-o.js} +721 -702
  160. package/dist/{vue-ui-skeleton-COytVrfN.js → vue-ui-skeleton-B9ZP1w-i.js} +395 -387
  161. package/dist/{vue-ui-smiley-Da2jgkb7.js → vue-ui-smiley-DYnqqk6u.js} +128 -120
  162. package/dist/{vue-ui-spark-trend-DC2KUlEY.js → vue-ui-spark-trend-R0ebpg-G.js} +132 -117
  163. package/dist/{vue-ui-sparkbar-DdxQOFIF.js → vue-ui-sparkbar-DYC3By0v.js} +119 -111
  164. package/dist/{vue-ui-sparkgauge-DTA-fORH.js → vue-ui-sparkgauge-Bw6no-In.js} +76 -68
  165. package/dist/vue-ui-sparkhistogram-DvRKy8rq.js +590 -0
  166. package/dist/{vue-ui-sparkline-DcR_N-zT.js → vue-ui-sparkline-Dz1uzBos.js} +389 -364
  167. package/dist/vue-ui-sparkstackbar-DlnPdZih.js +692 -0
  168. package/dist/vue-ui-stackbar-B-THcavY.js +2350 -0
  169. package/dist/vue-ui-stackline-3dBPoI0h.js +2464 -0
  170. package/dist/{vue-ui-strip-plot-NLCwYvyw.js → vue-ui-strip-plot-ACeYOoHj.js} +505 -484
  171. package/dist/vue-ui-table-heatmap-DVwMqzje.js +364 -0
  172. package/dist/{vue-ui-table-AM9brdwU.js → vue-ui-table-rFy16bp0.js} +512 -504
  173. package/dist/{vue-ui-table-sparkline-BE6DAvur.js → vue-ui-table-sparkline-CABJzK8p.js} +207 -181
  174. package/dist/vue-ui-thermometer-CVQ-H69Q.js +777 -0
  175. package/dist/{vue-ui-timer-BZM5ITG9.js → vue-ui-timer-Bm8LpsnI.js} +66 -58
  176. package/dist/{vue-ui-tiremarks-BCncDpHX.js → vue-ui-tiremarks-DB3f5qiz.js} +127 -119
  177. package/dist/vue-ui-treemap-DP0Sx8Y8.js +1760 -0
  178. package/dist/vue-ui-waffle-iPpdk1Bm.js +1412 -0
  179. package/dist/vue-ui-wheel-BJkEYfLj.js +892 -0
  180. package/dist/{vue-ui-word-cloud-D7R7nhk1.js → vue-ui-word-cloud-B2sxtel9.js} +440 -432
  181. package/dist/{vue-ui-world-DZBt-07p.js → vue-ui-world-BBQZLnzm.js} +343 -335
  182. package/dist/vue-ui-xy-ChZg7AtI.js +1364 -0
  183. package/dist/{vue-ui-xy-CluEZ7lS.js → vue-ui-xy-DZj5DT-q.js} +1633 -1587
  184. package/dist/{vue-ui-xy-canvas-7YSYRdwr.js → vue-ui-xy-canvas-BN2u0bOJ.js} +456 -430
  185. package/dist/vue_ui_hill-dnltu0L-.js +368 -0
  186. package/package.json +2 -2
  187. package/dist/SlicerPreview-Cw6WMVhG.js +0 -1689
  188. package/dist/Title-BuPs74IB.js +0 -87
  189. package/dist/exposedLib-Ciw6TGtP.js +0 -25
  190. package/dist/useAutoSizeLabelsInsideViewbox-C9RNjsGv.js +0 -50
  191. package/dist/useMountedDelay-BAjrhRJb.js +0 -14
  192. package/dist/vue-ui-3d-bar-D5xHEWr1.js +0 -1824
  193. package/dist/vue-ui-age-pyramid-CAJg01c7.js +0 -1246
  194. package/dist/vue-ui-annotator-q3ZKx6ua.js +0 -2905
  195. package/dist/vue-ui-bullet-ByeaWGfI.js +0 -709
  196. package/dist/vue-ui-carousel-table-DO5NRXvX.js +0 -455
  197. package/dist/vue-ui-chestnut-BfeSPeEh.js +0 -2042
  198. package/dist/vue-ui-circle-pack-Cqmlw7AV.js +0 -1610
  199. package/dist/vue-ui-dashboard-DLvGJXJY.js +0 -512
  200. package/dist/vue-ui-donut-ZIRebAWc.js +0 -2418
  201. package/dist/vue-ui-dumbbell-gDYjU2oF.js +0 -1564
  202. package/dist/vue-ui-funnel-BtaYaU0r.js +0 -781
  203. package/dist/vue-ui-galaxy-BMp-HzDh.js +0 -1076
  204. package/dist/vue-ui-gauge-CBou0cFE.js +0 -925
  205. package/dist/vue-ui-horizontal-bar-BuwxI7d1.js +0 -1689
  206. package/dist/vue-ui-kpi-ByxoO01r.js +0 -96
  207. package/dist/vue-ui-mini-loader-D9pprk2c.js +0 -125
  208. package/dist/vue-ui-molecule-BqJJq49_.js +0 -932
  209. package/dist/vue-ui-onion-CRQOxurS.js +0 -1199
  210. package/dist/vue-ui-parallel-coordinate-plot-Dhn18RtR.js +0 -1412
  211. package/dist/vue-ui-quick-chart-DAhSXYnp.js +0 -2443
  212. package/dist/vue-ui-rating-DbxK-ftN.js +0 -352
  213. package/dist/vue-ui-relation-circle-Cb33DMZo.js +0 -917
  214. package/dist/vue-ui-ridgeline-D7aArzQk.js +0 -1627
  215. package/dist/vue-ui-sparkhistogram-D1oFTrvt.js +0 -575
  216. package/dist/vue-ui-sparkstackbar-BlFio0lP.js +0 -674
  217. package/dist/vue-ui-stackbar-Cu13EdVa.js +0 -2322
  218. package/dist/vue-ui-stackline-DKL0o_-3.js +0 -2427
  219. package/dist/vue-ui-table-heatmap-CSI482KG.js +0 -338
  220. package/dist/vue-ui-thermometer-D6Czx7Fb.js +0 -769
  221. package/dist/vue-ui-treemap-BOEYCOdk.js +0 -1727
  222. package/dist/vue-ui-waffle-BrM8IHdG.js +0 -1367
  223. package/dist/vue-ui-wheel-BNsajigQ.js +0 -884
  224. package/dist/vue-ui-xy-Dt_1bSBT.js +0 -1364
@@ -1,1610 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { At as t, C as n, Dt as r, E as i, Gt as a, J as o, K as s, Nt as c, Q as l, U as u, Wt as d, Y as f, bt as p, et as m, i as h, qt as g, r as _, t as ee, x as te } from "./lib-CFm_J26b.js";
3
- import { t as ne } from "./useConfig-C0V0eG7L.js";
4
- import { t as re } from "./usePrinter-BH-xle1O.js";
5
- import { n as ie, t as ae } from "./BaseScanner-DZvpgOjM.js";
6
- import { t as oe } from "./useSvgExport-Ba9qBr9M.js";
7
- import { t as se } from "./useNestedProp-BY6DNN3i.js";
8
- import { t as ce } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as le } from "./img-Bikk1dGb.js";
10
- import { n as ue } from "./Title-BuPs74IB.js";
11
- import { t as de } from "./_plugin-vue_export-helper-B3ysoDQm.js";
12
- import { l as fe, t as pe } from "./useResponsive-ZtArZtUf.js";
13
- import { t as me } from "./DefGrad-DVBqDjhO.js";
14
- import { t as he } from "./A11yDataTable-DdRsVULz.js";
15
- import { t as ge } from "./useUserOptionState-DK-_1ddE.js";
16
- import { t as _e } from "./useChartAccessibility-DYqac8yF.js";
17
- import { t as ve } from "./usePanZoom-CYU3B4T3.js";
18
- import { t as ye } from "./vue_ui_circle_pack-DZC_rdfn.js";
19
- import { Fragment as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as be, createTextVNode as xe, createVNode as Se, defineAsyncComponent as w, guardReactiveProps as T, mergeProps as Ce, nextTick as we, normalizeClass as Te, normalizeProps as E, normalizeStyle as D, onBeforeUnmount as Ee, onMounted as De, openBlock as O, ref as k, renderList as Oe, renderSlot as A, resolveDynamicComponent as ke, toDisplayString as Ae, toRefs as je, unref as j, useCssVars as Me, watch as Ne, withCtx as M } from "vue";
20
- //#region src/packCircles.js
21
- function Pe(e, t = 0) {
22
- let n = e.reduce((e, { x: n, r }) => Math.min(e, n - r - t), Infinity), r = e.reduce((e, { x: n, r }) => Math.max(e, n + r + t), -Infinity), i = e.reduce((e, { y: n, r }) => Math.min(e, n - r - t), Infinity), a = e.reduce((e, { y: n, r }) => Math.max(e, n + r + t), -Infinity);
23
- return [
24
- n,
25
- i,
26
- r - n,
27
- a - i
28
- ];
29
- }
30
- function Fe(e, t, n) {
31
- let r = e._, i = e.next._, a = r.r + i.r, o = (r.x * i.r + i.x * r.r) / a, s = (r.y * i.r + i.y * r.r) / a;
32
- return Math.max(Math.abs(o * n), Math.abs(s * t));
33
- }
34
- function Ie(e, t, n) {
35
- let r = Fe, i = e.length;
36
- if (!i) return e;
37
- e.sort((e, t) => t.r - e.r);
38
- let a, o, s;
39
- if (a = e[0], a.x = 0, a.y = 0, !(i > 1)) return e;
40
- if (o = e[1], a.x = -o.r, o.x = a.r, o.y = 0, !(i > 2)) return Re(e, n, t), e;
41
- Le(o, a, s = e[2]), a = new Ge(a), o = new Ge(o), s = new Ge(s), a.next = s.previous = o, o.next = a.previous = s, s.next = o.previous = a;
42
- packLoop: for (let c = 3; c < i; ++c) {
43
- Le(a._, o._, s = e[c]), s = new Ge(s);
44
- let i = o.next, l = a.previous, u = o._.r, d = a._.r;
45
- do
46
- if (u <= d) {
47
- if (N(i._, s._)) {
48
- o = i, a.next = o, o.previous = a, --c;
49
- continue packLoop;
50
- }
51
- u += i._.r, i = i.next;
52
- } else {
53
- if (N(l._, s._)) {
54
- a = l, a.next = o, o.previous = a, --c;
55
- continue packLoop;
56
- }
57
- d += l._.r, l = l.previous;
58
- }
59
- while (i !== l.next);
60
- s.previous = a, s.next = o, a.next = o.previous = o = s;
61
- let f = a, p = r(a, n, t), m = a.next;
62
- for (; m !== o;) {
63
- let e = r(m, n, t);
64
- e < p && (f = m, p = e), m = m.next;
65
- }
66
- a = f, o = a.next;
67
- }
68
- return Re(e, n, t), Ve(e, n, t), e;
69
- }
70
- function Le(e, t, n) {
71
- let r = e.x - t.x, i = e.y - t.y, a = r * r + i * i;
72
- if (a) {
73
- let o = (t.r + n.r) ** 2, s = (e.r + n.r) ** 2;
74
- if (o > s) {
75
- let t = (a + s - o) / (2 * a), c = Math.sqrt(Math.max(0, s / a - t * t));
76
- n.x = e.x - t * r - c * i, n.y = e.y - t * i + c * r;
77
- } else {
78
- let e = (a + o - s) / (2 * a), c = Math.sqrt(Math.max(0, o / a - e * e));
79
- n.x = t.x + e * r - c * i, n.y = t.y + e * i + c * r;
80
- }
81
- } else n.x = t.x + n.r, n.y = t.y;
82
- }
83
- function N(e, t) {
84
- let n = e.r + t.r - 1e-6, r = t.x - e.x, i = t.y - e.y;
85
- return n > 0 && n * n > r * r + i * i;
86
- }
87
- function Re(e, t, n) {
88
- if (e.length < 4) return;
89
- let r = e[0].r, i = e.findIndex((e) => e.r < r * .6), a = i === -1 ? Math.min(e.length, 12) : i, o = e.slice(0, Math.max(3, a));
90
- for (let t = 0; t < 80; t += 1) {
91
- let t = !1;
92
- for (let n = 0; n < o.length; n += 1) {
93
- let r = o[n], i = .06 * (1 - n / Math.max(1, o.length)), a = r.x * (1 - i), s = r.y * (1 - i);
94
- ze(r, a, s, e, n) && (r.x = a, r.y = s, t = !0);
95
- }
96
- if (Be(o), !t) break;
97
- }
98
- let s = o.reduce((e, t) => e + t.x, 0) / o.length, c = o.reduce((e, t) => e + t.y, 0) / o.length;
99
- for (let t of e) t.x -= s, t.y -= c;
100
- }
101
- function ze(e, t, n, r) {
102
- let i = e.x, a = e.y;
103
- e.x = t, e.y = n;
104
- for (let t of r) if (t !== e && N(e, t)) return e.x = i, e.y = a, !1;
105
- return e.x = i, e.y = a, !0;
106
- }
107
- function Be(e) {
108
- for (let t = 0; t < 6; t += 1) {
109
- let t = !1;
110
- for (let n = 0; n < e.length - 1; n += 1) for (let r = n + 1; r < e.length; r += 1) {
111
- let i = e[n], a = e[r], o = a.x - i.x, s = a.y - i.y, c = Math.sqrt(o * o + s * s) || 1e-6, l = i.r + a.r;
112
- if (c < l) {
113
- let e = (l - c) / 2, n = o / c, r = s / c;
114
- i.x -= n * e, i.y -= r * e, a.x += n * e, a.y += r * e, t = !0;
115
- }
116
- }
117
- if (!t) break;
118
- }
119
- }
120
- function Ve(e, t, n) {
121
- if (e.length < 6) return;
122
- let r = e[0].r, i = e.findIndex((e) => e.r <= r * .45);
123
- if (i !== -1) for (let r = i; r < e.length; r += 1) {
124
- let i = e[r], a = He(i, e.slice(0, r), t, n);
125
- a && (i.x = a.x, i.y = a.y);
126
- }
127
- }
128
- function He(e, t, n, r) {
129
- if (t.length < 2) return null;
130
- let i = null, a = Infinity;
131
- for (let o = 0; o < t.length - 1; o += 1) for (let s = o + 1; s < t.length; s += 1) {
132
- let c = t[o], l = t[s], u = Ue(c, l, e.r);
133
- for (let o of u) {
134
- if (!o) continue;
135
- let s = {
136
- ...e,
137
- x: o.x,
138
- y: o.y
139
- };
140
- if (!P(s, t)) continue;
141
- let c = We(s, t, n, r);
142
- c < a && (a = c, i = o);
143
- }
144
- }
145
- return i;
146
- }
147
- function Ue(e, t, n) {
148
- let r = e.r + n, i = t.r + n, a = t.x - e.x, o = t.y - e.y, s = a * a + o * o, c = Math.sqrt(s);
149
- if (!c || c > r + i || c < Math.abs(r - i)) return [];
150
- let l = (r * r - i * i + s) / (2 * c), u = r * r - l * l;
151
- if (u < 0) return [];
152
- let d = Math.sqrt(u), f = a / c, p = o / c, m = e.x + l * f, h = e.y + l * p, g = -p * d, _ = f * d;
153
- return [{
154
- x: m + g,
155
- y: h + _
156
- }, {
157
- x: m - g,
158
- y: h - _
159
- }];
160
- }
161
- function P(e, t) {
162
- for (let n of t) if (N(n, e)) return !1;
163
- return !0;
164
- }
165
- function We(e, t, n, r) {
166
- let i = e.x / Math.max(1, n), a = e.y / Math.max(1, r), o = i * i + a * a, s = [];
167
- for (let n of t) {
168
- let t = e.x - n.x, r = e.y - n.y, i = Math.sqrt(t * t + r * r) - (e.r + n.r);
169
- s.push(i);
170
- }
171
- s.sort((e, t) => e - t);
172
- let c = s[0] ?? 0, l = s[1] ?? c, u = s[2] ?? l;
173
- return c * 8 + l * 4 + u * 2 + o * e.r * 12;
174
- }
175
- var Ge = class {
176
- constructor(e) {
177
- this._ = e, this.next = null, this.previous = null;
178
- }
179
- }, Ke = /* @__PURE__ */ e({ default: () => pt }), qe = ["id"], Je = ["id"], Ye = [
180
- "xmlns",
181
- "aria-describedby",
182
- "viewBox"
183
- ], Xe = [
184
- "x",
185
- "y",
186
- "width",
187
- "height"
188
- ], Ze = { key: 0 }, Qe = [
189
- "x",
190
- "y",
191
- "width",
192
- "height",
193
- "stroke",
194
- "stroke-width",
195
- "fill",
196
- "rx",
197
- "onMouseenter",
198
- "onMouseout",
199
- "onClick"
200
- ], $e = [
201
- "x",
202
- "y",
203
- "width",
204
- "height",
205
- "stroke",
206
- "stroke-width",
207
- "fill",
208
- "rx"
209
- ], et = [
210
- "x",
211
- "y",
212
- "width",
213
- "height",
214
- "fill",
215
- "rx"
216
- ], tt = [
217
- "x",
218
- "y",
219
- "font-size",
220
- "fill",
221
- "font-weight"
222
- ], nt = [
223
- "x",
224
- "y",
225
- "font-size",
226
- "fill",
227
- "font-weight"
228
- ], rt = {
229
- key: 1,
230
- style: { pointerEvents: "none" }
231
- }, it = [
232
- "x1",
233
- "y1",
234
- "x2",
235
- "y2",
236
- "stroke",
237
- "stroke-width",
238
- "stroke-dasharray",
239
- "opacity"
240
- ], at = [
241
- "x",
242
- "y",
243
- "width",
244
- "height",
245
- "rx",
246
- "fill",
247
- "stroke",
248
- "stroke-width",
249
- "filter"
250
- ], ot = [
251
- "cx",
252
- "cy",
253
- "r",
254
- "fill"
255
- ], st = [
256
- "x",
257
- "y",
258
- "font-size",
259
- "fill",
260
- "font-family"
261
- ], ct = ["x", "dy"], lt = {
262
- key: 0,
263
- style: {
264
- position: "absolute",
265
- top: "100%",
266
- left: "0",
267
- width: "100%"
268
- },
269
- "data-dom-to-png-ignore": "",
270
- "aria-hidden": "true"
271
- }, ut = {
272
- key: 5,
273
- class: "vue-data-ui-watermark"
274
- }, dt = {
275
- key: 6,
276
- "data-dom-to-png-ignore": "",
277
- class: "reset-wrapper"
278
- }, ft = ["innerHTML"], pt = /*#__PURE__*/ de({
279
- __name: "vue-ui-circle-pack",
280
- props: {
281
- config: {
282
- type: Object,
283
- default() {
284
- return {};
285
- }
286
- },
287
- dataset: {
288
- type: Array,
289
- default() {
290
- return [];
291
- }
292
- }
293
- },
294
- emits: ["selectDatapoint", "copyAlt"],
295
- setup(e, { expose: de, emit: Fe }) {
296
- Me((e) => ({ b39799b6: tr.value }));
297
- let Le = w(() => import("./Tooltip-CA1rtSyl.js")), N = w(() => import("./BaseIcon-CP5RWnqt.js").then((e) => e.n)), Re = w(() => import("./vue-ui-accordion-UA88lv4d.js").then((e) => e.n)), ze = w(() => import("./DataTable-DzPEVvSo.js")), Be = w(() => import("./UserOptions-DzAFK9cY.js").then((e) => e.n)), Ve = w(() => import("./PenAndPaper-CSMVXpg2.js").then((e) => e.t)), He = w(() => import("./PackageVersion-B6Hokxw9.js").then((e) => e.t)), Ue = w(() => import("./BaseDraggableDialog-3n8udWmh.js").then((e) => e.n)), P = e, We = Fe, { vue_ui_circle_pack: Ge } = ne(), { isThemeValid: Ke, warnInvalidTheme: pt } = ce(), mt = y(() => !!P.dataset && P.dataset.length), F = k(s()), I = k(null), ht = k(null), gt = k(null), _t = k(0), vt = k(0), yt = k(0), bt = k(null), L = k(null), xt = k(null), St = k(!1), Ct = k(""), R = k(null), wt = k(!1), Tt = k(!1), z = k(null), Et = k({
298
- x: 0,
299
- y: 0
300
- }), Dt = k("pointer"), Ot = k(!1), B = k(Ft()), V = y(() => B.value.userOptions.useCursorPointer), kt = y(() => g({
301
- defaultConfig: {
302
- userOptions: { show: !1 },
303
- table: { show: !1 },
304
- style: { chart: {
305
- backgroundColor: "#99999930",
306
- circles: {
307
- stroke: "#6A6A6A",
308
- labels: {
309
- name: { show: !1 },
310
- value: { show: !1 }
311
- }
312
- }
313
- } }
314
- },
315
- userConfig: B.value.skeletonConfig ?? {}
316
- })), { loading: At, FINAL_DATASET: jt } = ie({
317
- ...je(P),
318
- FINAL_CONFIG: B,
319
- prepareConfig: Ft,
320
- skeletonDataset: P.config?.skeletonDataset ?? [
321
- {
322
- name: "_",
323
- value: 13,
324
- color: "#F2F2F2"
325
- },
326
- {
327
- name: "_",
328
- value: 8,
329
- color: "#DBDBDB"
330
- },
331
- {
332
- name: "_",
333
- value: 5,
334
- color: "#ADADAD"
335
- },
336
- {
337
- name: "_",
338
- value: 3,
339
- color: "#969696"
340
- },
341
- {
342
- name: "_",
343
- value: 2,
344
- color: "#808080"
345
- },
346
- {
347
- name: "_",
348
- value: 1,
349
- color: "#696969"
350
- }
351
- ],
352
- skeletonConfig: g({
353
- defaultConfig: B.value,
354
- userConfig: kt.value
355
- })
356
- }), { svgRef: H } = _e({ config: B.value.style.chart.title }), { userOptionsVisible: Mt, setUserOptionsVisibility: Nt, keepUserOptionState: Pt } = ge({ config: B.value });
357
- function Ft() {
358
- let e = se({
359
- userConfig: P.config,
360
- defaultConfig: Ge
361
- }), t = e.theme;
362
- if (!t) return e;
363
- if (!Ke.value(e)) return pt(e), e;
364
- let n = se({
365
- userConfig: ye[t] || P.config,
366
- defaultConfig: e
367
- }), r = se({
368
- userConfig: P.config,
369
- defaultConfig: n
370
- });
371
- return {
372
- ...r,
373
- customPalette: r.customPalette.length ? r.customPalette : a[t] || c
374
- };
375
- }
376
- Ne(() => P.config, (e) => {
377
- B.value = Ft(), Mt.value = !B.value.userOptions.showOnChartHover, rn(), _t.value += 1, vt.value += 1, U.value.showTable = B.value.table.show, U.value.showTooltip = B.value.style.chart.tooltip.show, U.value.showZoom = B.value.style.chart.zoom?.show ?? !1;
378
- }, { deep: !0 });
379
- let { isPrinting: It, isImaging: Lt, generatePdf: Rt, generateImage: zt } = re({
380
- elementId: `vue-ui-circle-pack_${F.value}`,
381
- fileName: B.value.style.chart.title.text || "vue-ui-circle-pack",
382
- options: B.value.userOptions.print
383
- }), Bt = y(() => B.value.userOptions.show && !B.value.style.chart.title.text), U = k({
384
- showTable: B.value.table.show,
385
- showTooltip: B.value.style.chart.tooltip.show,
386
- showZoom: B.value.style.chart.zoom?.show ?? !1
387
- });
388
- Ne(B, () => {
389
- U.value = {
390
- showTable: B.value.table.show,
391
- showTooltip: B.value.style.chart.tooltip.show,
392
- showZoom: B.value.style.chart.zoom?.show ?? !1
393
- };
394
- }, { immediate: !0 });
395
- let W = k({
396
- h: 10,
397
- w: 10
398
- }), Vt = k([
399
- 0,
400
- 0,
401
- 100,
402
- 100
403
- ]), Ht = y(() => B.value.debug), Ut = y(() => {
404
- let e = B.value.style?.chart || {};
405
- return e.dimensions && typeof e.dimensions.width == "number" ? e.dimensions.width : typeof e.width == "number" ? e.width : 300;
406
- }), Wt = y(() => {
407
- let e = B.value.style?.chart || {};
408
- return e.dimensions && typeof e.dimensions.height == "number" ? e.dimensions.height : typeof e.height == "number" ? e.height : 300;
409
- }), G = k([]), K = k([]), q = k(null), J = k(null);
410
- function Gt(e, t) {
411
- W.value = {
412
- w: e,
413
- h: t
414
- };
415
- let n = Y.value.map(Kt);
416
- if (!n.length) {
417
- let n = {
418
- x: 0,
419
- y: 0,
420
- width: e,
421
- height: t
422
- };
423
- G.value = [], K.value = [], Vt.value = [
424
- n.x,
425
- n.y,
426
- n.width,
427
- n.height
428
- ], bn(n);
429
- return;
430
- }
431
- let r = Ie(n, t, e), [i, a, o, s] = Pe(r, 1), c = Math.min(o ? e / o : 1, s ? t / s : 1), l = (e - o * c) / 2, u = (t - s * c) / 2, d = r.map((e) => ({
432
- ...e,
433
- x: (e.x - i) * c + l,
434
- y: (e.y - a) * c + u,
435
- r: e.r * c
436
- }));
437
- G.value = Qt(d), K.value = G.value;
438
- let f = An({
439
- x: 0,
440
- y: 0,
441
- width: e,
442
- height: t
443
- });
444
- Vt.value = [
445
- f.x,
446
- f.y,
447
- f.width,
448
- f.height
449
- ], bn(f);
450
- }
451
- function Kt(e) {
452
- return {
453
- ...e,
454
- children: Array.isArray(e.children) ? e.children.map(Kt) : []
455
- };
456
- }
457
- function qt(e) {
458
- let t = Number(e?.value);
459
- return Number.isFinite(t) && t > 0 ? t : Array.isArray(e?.children) ? e.children.reduce((e, t) => e + qt(t), 0) : 0;
460
- }
461
- function Jt(e, t) {
462
- let n = a[B.value.theme || "default"] || c, r = an.value.length ? an.value : n.length ? n : c;
463
- return te(e.color) || r[t % r.length] || c[t % c.length];
464
- }
465
- function Yt(e) {
466
- return !Array.isArray(e.children) || !e.children.length ? 1 : e.children.reduce((e, t) => e + Yt(t), 0);
467
- }
468
- function Xt(e, t = null, n = 0, r = []) {
469
- return Array.isArray(e) ? e.map((e, i) => {
470
- let a = qt(e);
471
- if (!Number.isFinite(a) || a <= 0) return null;
472
- let o = s(), c = [...r, i], l = c.reduce((e, t, n) => e + t + n, 0), u = e.color || t?.color ? te(e.color || t?.color) : Jt(e, l), d = Xt(e.children, {
473
- id: o,
474
- name: e.name,
475
- color: u,
476
- rootId: t?.rootId ?? o
477
- }, n + 1, c);
478
- return {
479
- ...e,
480
- value: a,
481
- r: a,
482
- id: o,
483
- color: u,
484
- depth: n,
485
- parentId: t?.id ?? null,
486
- parentName: t?.name ?? null,
487
- rootId: t?.rootId ?? o,
488
- hasChildren: d.length > 0,
489
- childCount: d.length,
490
- leafCount: d.length ? Yt({ children: d }) : 1,
491
- hierarchyPath: c,
492
- children: d
493
- };
494
- }).filter(Boolean) : [];
495
- }
496
- function Zt(e) {
497
- if (!Array.isArray(e.children) || !e.children.length) return [];
498
- let t = e.r * 2;
499
- if (!t) return [];
500
- let n = Ie(e.children.map(Kt), t, t), [r, i, a, o] = Pe(n, 1), s = Math.min(a ? t / a : 1, o ? t / o : 1) * .9, c = a * s, l = o * s, u = e.x - c / 2, d = e.y - l / 2;
501
- return n.map((e) => ({
502
- ...e,
503
- x: (e.x - r) * s + u,
504
- y: (e.y - i) * s + d,
505
- r: e.r * s
506
- }));
507
- }
508
- function Qt(e) {
509
- let t = [];
510
- return e.forEach((e) => {
511
- let n = Zt(e);
512
- t.push({
513
- ...e,
514
- children: n
515
- }), t.push(...Qt(n));
516
- }), t;
517
- }
518
- function $t(e, t) {
519
- return !e || !t || !Array.isArray(e.hierarchyPath) || !Array.isArray(t.hierarchyPath) || e.hierarchyPath.length <= t.hierarchyPath.length ? !1 : t.hierarchyPath.every((t, n) => e.hierarchyPath[n] === t);
520
- }
521
- function en(e) {
522
- return e.hasChildren ? B.value.style.chart.circles.labels.parents.show : B.value.style.chart.circles.labels.children.show;
523
- }
524
- function tn() {
525
- if (!B.value.responsive || !I.value) return;
526
- let e = fe(() => {
527
- let { width: e, height: t } = pe({
528
- chart: I.value,
529
- title: B.value.style.chart.title.text ? ht.value : null,
530
- legend: null,
531
- source: bt.value,
532
- noTitle: gt.value
533
- });
534
- requestAnimationFrame(() => {
535
- !e || !t || (H.value && (H.value.setAttribute("width", e), H.value.setAttribute("height", t)), Gt(e, t));
536
- });
537
- });
538
- q.value && (J.value && q.value.unobserve(J.value), q.value.disconnect()), q.value = new ResizeObserver(e), J.value = I.value.parentNode || I.value, J.value && q.value.observe(J.value), e();
539
- }
540
- function nn() {
541
- q.value && (J.value && q.value.unobserve(J.value), q.value.disconnect(), q.value = null, J.value = null);
542
- }
543
- async function rn() {
544
- t(P.dataset) && m({
545
- componentName: "VueUiCirclePack",
546
- type: "dataset",
547
- debug: Ht.value
548
- });
549
- let e = Ut.value, n = Wt.value;
550
- Gt(e, n), B.value.responsive ? tn() : nn();
551
- }
552
- De(rn), Ee(() => {
553
- nn();
554
- }), Ne(() => jt.value, async (e) => {
555
- await rn();
556
- }, { deep: !0 });
557
- let an = y(() => n(B.value.customPalette)), Y = y(() => Xt(jt.value)), on = y(() => G.value.length ? Math.max(...G.value.map((e) => e.r)) : 0);
558
- function sn(e, t) {
559
- return on.value ? t / on.value * e : 0;
560
- }
561
- function cn(e, t) {
562
- B.value.events.datapointLeave && B.value.events.datapointLeave({
563
- datapoint: e,
564
- seriesIndex: t
565
- }), !(Dt.value === "keyboard" && R.value?.id === e?.id) && (St.value = !1, R.value = null, z.value = null, Dt.value = "pointer");
566
- }
567
- function ln(e, t) {
568
- We("selectDatapoint", e), B.value.events.datapointClick && B.value.events.datapointClick({
569
- datapoint: e,
570
- seriesIndex: t
571
- });
572
- }
573
- let un = k(null), dn = k(!1);
574
- function fn(e, t, n = "pointer") {
575
- R.value = e, z.value = t, Dt.value = n, B.value.events.datapointEnter && B.value.events.datapointEnter({
576
- datapoint: e,
577
- seriesIndex: t
578
- }), un.value = {
579
- datapoint: e,
580
- seriesIndex: t,
581
- config: B.value,
582
- series: K.value
583
- }, St.value = !0;
584
- let r = B.value.style.chart.tooltip.customFormat;
585
- if (dn.value = !1, p(r)) try {
586
- let n = r({
587
- seriesIndex: t,
588
- datapoint: e,
589
- series: K.value,
590
- config: B.value
591
- });
592
- typeof n == "string" && (Ct.value = n, dn.value = !0);
593
- } catch {
594
- console.warn("Custom format cannot be applied."), dn.value = !1;
595
- }
596
- if (!dn.value) {
597
- let t = "";
598
- t += `
599
- <div style="display:flex;align-items:center;gap:4px;">
600
- <svg viewBox="0 0 10 10" height="${B.value.style.chart.tooltip.fontSize}" width="${B.value.style.chart.tooltip.fontSize}">
601
- <circle
602
- cx="5"
603
- cy="5"
604
- r="5"
605
- fill="${B.value.style.chart.circles.gradient.show ? `url(#${e.id})` : e.color}"
606
- />
607
- </svg>
608
- <span>${e.name}: <b>${pn(e)}</b></span>
609
- </div>
610
- `, Ct.value = t;
611
- }
612
- }
613
- function pn(e) {
614
- return h(B.value.style.chart.circles.labels.value.formatter, e.value, f({
615
- p: B.value.style.chart.circles.labels.value.prefix,
616
- v: e.value,
617
- s: B.value.style.chart.circles.labels.value.suffix,
618
- r: B.value.style.chart.circles.labels.value.rounding
619
- }));
620
- }
621
- function mn(e) {
622
- if (!e) return 0;
623
- let t = pn(e), n = e.r / (t.length || 1) * (t.length === 1 ? 1 : 2);
624
- return Math.min(e.r / 2.5, n);
625
- }
626
- let X = k(!1);
627
- function hn(e) {
628
- X.value = e, yt.value += 1;
629
- }
630
- let Z = k(!1);
631
- function gn() {
632
- Z.value = !Z.value;
633
- }
634
- let _n = y(() => !Z.value && U.value.showZoom), { viewBox: Q, resetZoom: vn, isZoom: yn, setInitialViewBox: bn } = ve(H, {
635
- x: 0,
636
- y: 0,
637
- width: Math.max(10, W.value.w),
638
- height: Math.max(10, W.value.h)
639
- }, B.value.style.chart.zoom?.speed ?? 1, _n);
640
- function xn(e, t, n = 0) {
641
- return !(e.x + e.width + n < t.x || t.x + t.width + n < e.x || e.y + e.height + n < t.y || t.y + t.height + n < e.y);
642
- }
643
- function Sn(e, t, n = 0) {
644
- let r = Math.min(Math.max(t.x, e.x - n), e.x + e.width + n), i = Math.min(Math.max(t.y, e.y - n), e.y + e.height + n), a = t.x - r, o = t.y - i;
645
- return a * a + o * o <= t.r * t.r;
646
- }
647
- function Cn(e, t) {
648
- let n = Math.max(4, Math.min(t.width, t.height) * .01);
649
- return {
650
- ...e,
651
- x: Math.min(Math.max(e.x, t.x + n), t.x + t.width - e.width - n),
652
- y: Math.min(Math.max(e.y, t.y + n), t.y + t.height - e.height - n)
653
- };
654
- }
655
- function wn(e) {
656
- let t = [e.name];
657
- return B.value.style.chart.circles.labels.value.show && t.push(pn(e)), t.filter(Boolean);
658
- }
659
- function Tn(e, t, n, r, i) {
660
- let a = e.x, o = e.y;
661
- return {
662
- right: {
663
- x: a + e.r + i,
664
- y: o - n / 2,
665
- anchorX: a + e.r,
666
- anchorY: o
667
- },
668
- left: {
669
- x: a - e.r - i - t,
670
- y: o - n / 2,
671
- anchorX: a - e.r,
672
- anchorY: o
673
- },
674
- top: {
675
- x: a - t / 2,
676
- y: o - e.r - i - n,
677
- anchorX: a,
678
- anchorY: o - e.r
679
- },
680
- bottom: {
681
- x: a - t / 2,
682
- y: o + e.r + i,
683
- anchorX: a,
684
- anchorY: o + e.r
685
- },
686
- topRight: {
687
- x: a + e.r * .7 + i,
688
- y: o - e.r * .7 - i - n,
689
- anchorX: a + e.r * .7,
690
- anchorY: o - e.r * .7
691
- },
692
- topLeft: {
693
- x: a - e.r * .7 - i - t,
694
- y: o - e.r * .7 - i - n,
695
- anchorX: a - e.r * .7,
696
- anchorY: o - e.r * .7
697
- },
698
- bottomRight: {
699
- x: a + e.r * .7 + i,
700
- y: o + e.r * .7 + i,
701
- anchorX: a + e.r * .7,
702
- anchorY: o + e.r * .7
703
- },
704
- bottomLeft: {
705
- x: a - e.r * .7 - i - t,
706
- y: o + e.r * .7 + i,
707
- anchorX: a - e.r * .7,
708
- anchorY: o + e.r * .7
709
- }
710
- }[r];
711
- }
712
- function En(e, t) {
713
- let n = [], r = t.get(e.parentId);
714
- for (; r;) n.push(r), r = t.get(r.parentId);
715
- return n;
716
- }
717
- function Dn(e, t, n, r, i, a) {
718
- let o = e.x, s = e.y, c = t || e, l = a * .6, u = {
719
- right: {
720
- x: c.x + c.r + a,
721
- y: s - r / 2
722
- },
723
- left: {
724
- x: c.x - c.r - a - n,
725
- y: s - r / 2
726
- },
727
- top: {
728
- x: o - n / 2,
729
- y: c.y - c.r - a - r
730
- },
731
- bottom: {
732
- x: o - n / 2,
733
- y: c.y + c.r + a
734
- },
735
- topRight: {
736
- x: c.x + c.r + a,
737
- y: c.y - c.r - a - r - l
738
- },
739
- topLeft: {
740
- x: c.x - c.r - a - n,
741
- y: c.y - c.r - a - r - l
742
- },
743
- bottomRight: {
744
- x: c.x + c.r + a,
745
- y: c.y + c.r + a + l
746
- },
747
- bottomLeft: {
748
- x: c.x - c.r - a - n,
749
- y: c.y + c.r + a + l
750
- }
751
- }[i], d = u.x + n / 2, f = u.y + r / 2, p = Math.atan2(f - s, d - o);
752
- return {
753
- ...u,
754
- anchorX: o + Math.cos(p) * e.r,
755
- anchorY: s + Math.sin(p) * e.r
756
- };
757
- }
758
- function On(e, t = {}) {
759
- let { clamp: n = !0 } = t;
760
- if (!G.value.length || !W.value.w || !W.value.h || !B.value.style.chart.parentTooltips.show) return [];
761
- let r = Math.max(8, B.value.style.chart.parentTooltips.fontSizeRatio * 10), i = r * 1.25, a = r * .75, o = r * .55, s = Math.max(8, Math.min(e.width, e.height) * .025), c = Math.max(2, Math.min(e.width, e.height) * .006), l = [
762
- "right",
763
- "left",
764
- "top",
765
- "bottom",
766
- "topRight",
767
- "topLeft",
768
- "bottomRight",
769
- "bottomLeft"
770
- ], u = [], d = new Map(G.value.map((e) => [e.id, e]));
771
- return G.value.filter((e) => e.hasChildren && e.name).sort((e, t) => t.r - e.r).forEach((t) => {
772
- let f = En(t, d).at(-1), p = wn(t), m = p.reduce((e, t) => Math.max(e, String(t).length), 0), h = Math.max(r * 5, m * r * .62 + a * 2), g = p.length * i + o * 2, _ = f ? l.map((e) => Dn(t, f, h, g, e, s)) : [], ee = l.map((e) => Tn(t, h, g, e, s)), te = [..._, ...ee].map((t) => {
773
- let r = n ? Cn({
774
- x: t.x,
775
- y: t.y,
776
- width: h,
777
- height: g
778
- }, e) : {
779
- x: t.x,
780
- y: t.y,
781
- width: h,
782
- height: g
783
- };
784
- return {
785
- ...r,
786
- anchorX: t.anchorX,
787
- anchorY: t.anchorY,
788
- lineX: r.x + r.width / 2,
789
- lineY: r.y + r.height / 2
790
- };
791
- }).find((e) => !u.some((t) => xn(e, t, c)) && !G.value.some((t) => Sn(e, t, c)));
792
- te && u.push({
793
- ...te,
794
- datapoint: t,
795
- id: `parent_tooltip_${t.id}`,
796
- color: t.color,
797
- lines: p,
798
- fontSize: r,
799
- lineHeight: i,
800
- paddingX: a,
801
- paddingY: o
802
- });
803
- }), u;
804
- }
805
- let kn = y(() => On(Q.value, { clamp: !0 }));
806
- function An(e) {
807
- let t = On(e, { clamp: !1 });
808
- if (!t.length) return e;
809
- let n = Math.min(e.x, ...t.map((e) => e.x)), r = Math.min(e.y, ...t.map((e) => e.y)), i = Math.max(e.x + e.width, ...t.map((e) => e.x + e.width)), a = Math.max(e.y + e.height, ...t.map((e) => e.y + e.height)), o = Math.max(8, Math.min(e.width, e.height) * .025);
810
- return {
811
- x: n - o,
812
- y: r - o,
813
- width: i - n + o * 2,
814
- height: a - r + o * 2
815
- };
816
- }
817
- function jn(e) {
818
- let t = [];
819
- function n(e, r = 0, i = "") {
820
- e.forEach((e) => {
821
- t.push({
822
- name: e.name,
823
- value: e.value,
824
- color: e.color,
825
- parentName: i,
826
- depth: r
827
- }), Array.isArray(e.children) && e.children.length && n(e.children, r + 1, e.name);
828
- });
829
- }
830
- return n(e), t;
831
- }
832
- let Mn = y(() => {
833
- let e = jn(Y.value);
834
- return {
835
- head: K.value.map((e) => ({
836
- name: e.name,
837
- value: e.value,
838
- color: e.color
839
- })).toSorted((e, t) => t.value - e.value),
840
- body: e.map((e) => e.value),
841
- hierarchy: e
842
- };
843
- }), Nn = y(() => jn(Y.value).map((e) => ({
844
- ...e,
845
- name: `${"- ".repeat(e.depth)}${e.name}`
846
- })));
847
- function Pn(e = null) {
848
- we(() => {
849
- let t = Nn.value.map((e) => [
850
- [e.name],
851
- [e.parentName || ""],
852
- [e.depth],
853
- [e.value]
854
- ]), n = i([
855
- [B.value.style.chart.title.text],
856
- [B.value.style.chart.title.subtitle.text],
857
- [
858
- [B.value.table.columnNames.datapoint],
859
- ["Parent"],
860
- ["Depth"],
861
- [B.value.table.columnNames.value]
862
- ]
863
- ].concat(t));
864
- e ? e(n) : l({
865
- csvContent: n,
866
- title: B.value.style.chart.title.text || "vue-ui-circle-pack"
867
- });
868
- });
869
- }
870
- let $ = y(() => {
871
- let e = [
872
- B.value.table.columnNames.datapoint,
873
- B.value.table.columnNames.parent,
874
- B.value.table.columnNames.depth,
875
- B.value.table.columnNames.value
876
- ], t = Mn.value.hierarchy.map((e) => {
877
- let t = f({
878
- p: B.value.style.chart.circles.labels.value.prefix,
879
- v: e.value,
880
- s: B.value.style.chart.circles.labels.value.suffix,
881
- r: B.value.style.chart.circles.labels.value.rounding
882
- });
883
- return [
884
- {
885
- color: e.color,
886
- name: `${" ".repeat(e.depth)}${e.name}`
887
- },
888
- e.parentName ?? "",
889
- e.depth ?? 0,
890
- t
891
- ];
892
- }), n = {
893
- th: {
894
- backgroundColor: B.value.table.th.backgroundColor,
895
- color: B.value.table.th.color,
896
- outline: B.value.table.th.outline
897
- },
898
- td: {
899
- backgroundColor: B.value.table.td.backgroundColor,
900
- color: B.value.table.td.color,
901
- outline: B.value.table.td.outline
902
- },
903
- breakpoint: B.value.table.responsiveBreakpoint
904
- };
905
- return {
906
- colNames: [
907
- B.value.table.columnNames.datapoint,
908
- B.value.table.columnNames.parent,
909
- B.value.table.columnNames.depth,
910
- B.value.table.columnNames.value
911
- ],
912
- head: e,
913
- body: t,
914
- config: n
915
- };
916
- });
917
- function Fn() {
918
- U.value.showTable = !U.value.showTable;
919
- }
920
- function In() {
921
- U.value.showTooltip = !U.value.showTooltip;
922
- }
923
- function Ln() {
924
- U.value.showZoom = !U.value.showZoom;
925
- }
926
- function Rn() {
927
- return Y.value;
928
- }
929
- async function zn({ scale: e = 2 } = {}) {
930
- if (!I.value) return;
931
- let { width: t, height: n } = I.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await le({
932
- domElement: I.value,
933
- base64: !0,
934
- img: !0,
935
- scale: e
936
- });
937
- return {
938
- imageUri: i,
939
- base64: a,
940
- title: B.value.style.chart.title.text,
941
- width: t,
942
- height: n,
943
- aspectRatio: r
944
- };
945
- }
946
- let Bn = y(() => {
947
- let e = B.value.table.useDialog && !B.value.table.show, t = U.value.showTable;
948
- return {
949
- component: e ? Ue : Re,
950
- title: `${B.value.style.chart.title.text}${B.value.style.chart.title.subtitle.text ? `: ${B.value.style.chart.title.subtitle.text}` : ""}`,
951
- props: e ? {
952
- backgroundColor: B.value.table.th.backgroundColor,
953
- color: B.value.table.th.color,
954
- headerColor: B.value.table.th.color,
955
- headerBg: B.value.table.th.backgroundColor,
956
- isFullscreen: X.value,
957
- fullscreenParent: I.value,
958
- forcedWidth: Math.min(500, window.innerWidth * .8),
959
- isCursorPointer: V.value
960
- } : {
961
- hideDetails: !0,
962
- config: {
963
- open: t,
964
- maxHeight: 1e4,
965
- body: {
966
- backgroundColor: B.value.style.chart.backgroundColor,
967
- color: B.value.style.chart.color
968
- },
969
- head: {
970
- backgroundColor: B.value.style.chart.backgroundColor,
971
- color: B.value.style.chart.color
972
- }
973
- }
974
- }
975
- };
976
- });
977
- Ne(() => U.value.showTable, (e) => {
978
- B.value.table.show || (e && B.value.table.useDialog && L.value ? L.value.open() : L.value && "close" in L.value && L.value.close());
979
- });
980
- function Vn() {
981
- U.value.showTable = !1, xt.value && xt.value.setTableIconState(!1);
982
- }
983
- let Hn = y(() => B.value.style.chart.backgroundColor), { exportSvg: Un, getSvg: Wn } = oe({
984
- svg: H,
985
- title: y(() => B.value.style.chart.title),
986
- backgroundColor: Hn
987
- });
988
- async function Gn({ isCb: e }) {
989
- Tt.value = !0, await we();
990
- try {
991
- if (e) {
992
- let { blob: e, url: t, text: n, dataUrl: r } = await Wn();
993
- await Promise.resolve(B.value.userOptions.callbacks.svg({
994
- blob: e,
995
- url: t,
996
- text: n,
997
- dataUrl: r
998
- }));
999
- } else await Promise.resolve(Un());
1000
- } finally {
1001
- Tt.value = !1;
1002
- }
1003
- }
1004
- function Kn(e) {
1005
- if (e?.stage === "start") {
1006
- wt.value = !0;
1007
- return;
1008
- }
1009
- if (e?.stage === "end") {
1010
- wt.value = !1;
1011
- return;
1012
- }
1013
- zt();
1014
- }
1015
- async function qn() {
1016
- if (We("copyAlt", {
1017
- config: B.value,
1018
- dataset: Y.value,
1019
- flattenedDataset: K.value
1020
- }), !B.value.userOptions.callbacks.altCopy) {
1021
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1022
- return;
1023
- }
1024
- await Promise.resolve(B.value.userOptions.callbacks.altCopy({
1025
- config: B.value,
1026
- dataset: Y.value,
1027
- flattenedDataset: K.value
1028
- }));
1029
- }
1030
- function Jn(e) {
1031
- if (!Number.isFinite(e) || !H.value) return;
1032
- let t = G.value[e];
1033
- if (!t) return;
1034
- let n = d(t.x, t.y, H.value);
1035
- n && (Et.value = n);
1036
- }
1037
- function Yn() {
1038
- if (z.value !== null) {
1039
- let e = G.value[z.value];
1040
- e && cn(e, z.value);
1041
- }
1042
- z.value = null, Dt.value = "pointer", St.value = !1, R.value = null;
1043
- }
1044
- function Xn() {
1045
- z.value = null, Ot.value = !0;
1046
- }
1047
- function Zn() {
1048
- Yn(), Ot.value = !1;
1049
- }
1050
- function Qn(e, t) {
1051
- let n = G.value.length;
1052
- return n ? e === null || e < 0 || e >= n ? t === "next" ? 0 : n - 1 : t === "previous" ? (e - 1 + n) % n : (e + 1) % n : null;
1053
- }
1054
- function $n(e) {
1055
- if (!H.value || Z.value || document.activeElement !== H.value || !G.value.length) return;
1056
- let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1057
- if (!t && !n && !r && !i) return;
1058
- if (e.preventDefault(), e.stopPropagation(), i) {
1059
- Yn();
1060
- return;
1061
- }
1062
- if (r) {
1063
- if (z.value === null) return;
1064
- let e = G.value[z.value];
1065
- if (!e) return;
1066
- ln(e, z.value);
1067
- return;
1068
- }
1069
- let a = z.value;
1070
- a === null || a < 0 || a >= G.value.length ? a = n ? 0 : G.value.length - 1 : n ? a = Qn(a, "next") : t && (a = Qn(a, "previous"));
1071
- let o = G.value[a];
1072
- o && (z.value = a, Jn(a), fn(o, a, "keyboard"));
1073
- }
1074
- let er = y(() => ({
1075
- headers: $.value?.colNames ?? [],
1076
- rows: $.value?.body?.map((e) => [e[0]?.name ?? "", e[1]]) ?? []
1077
- })), tr = y(() => B.value.style.chart.color);
1078
- return de({
1079
- getData: Rn,
1080
- getImage: zn,
1081
- generateCsv: Pn,
1082
- generatePdf: Rt,
1083
- generateImage: zt,
1084
- generateSvg: Gn,
1085
- toggleTable: Fn,
1086
- toggleAnnotator: gn,
1087
- toggleFullscreen: hn,
1088
- copyAlt: qn,
1089
- toggleZoom: Ln,
1090
- resetZoom: vn
1091
- }), (e, t) => (O(), S("div", {
1092
- id: `vue-ui-circle-pack_${F.value}`,
1093
- class: Te(`vue-data-ui-component vue-ui-circle-pack ${X.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${j(At) ? "loading" : ""}`),
1094
- ref_key: "circlePackChart",
1095
- ref: I,
1096
- style: D(`font-family:${B.value.style.fontFamily};text-align:center;background:${B.value.style.chart.backgroundColor};`),
1097
- onMouseenter: t[2] ||= () => j(Nt)(!0),
1098
- onMouseleave: t[3] ||= () => j(Nt)(!1)
1099
- }, [
1100
- C("div", {
1101
- id: `chart-instructions-${F.value}`,
1102
- class: "sr-only"
1103
- }, [C("p", null, Ae(B.value.a11y.translations.keyboardNavigation), 1)], 8, Je),
1104
- er.value?.rows?.length ? (O(), b(he, {
1105
- key: 0,
1106
- uid: F.value,
1107
- head: er.value.headers,
1108
- body: er.value.rows,
1109
- notice: B.value.a11y.translations.tableAvailable,
1110
- caption: B.value.a11y.translations.tableCaption
1111
- }, null, 8, [
1112
- "uid",
1113
- "head",
1114
- "body",
1115
- "notice",
1116
- "caption"
1117
- ])) : x("", !0),
1118
- B.value.userOptions.buttons.annotator ? (O(), b(j(Ve), {
1119
- key: 1,
1120
- svgRef: j(H),
1121
- backgroundColor: B.value.style.chart.backgroundColor,
1122
- color: B.value.style.chart.color,
1123
- active: Z.value,
1124
- scale: on.value / 100,
1125
- isCursorPointer: V.value,
1126
- onClose: gn
1127
- }, {
1128
- "annotator-action-close": M(() => [A(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1129
- "annotator-action-color": M(({ color: t }) => [A(e.$slots, "annotator-action-color", E(T({ color: t })), void 0, !0)]),
1130
- "annotator-action-draw": M(({ mode: t }) => [A(e.$slots, "annotator-action-draw", E(T({ mode: t })), void 0, !0)]),
1131
- "annotator-action-undo": M(({ disabled: t }) => [A(e.$slots, "annotator-action-undo", E(T({ disabled: t })), void 0, !0)]),
1132
- "annotator-action-redo": M(({ disabled: t }) => [A(e.$slots, "annotator-action-redo", E(T({ disabled: t })), void 0, !0)]),
1133
- "annotator-action-delete": M(({ disabled: t }) => [A(e.$slots, "annotator-action-delete", E(T({ disabled: t })), void 0, !0)]),
1134
- _: 3
1135
- }, 8, [
1136
- "svgRef",
1137
- "backgroundColor",
1138
- "color",
1139
- "active",
1140
- "scale",
1141
- "isCursorPointer"
1142
- ])) : x("", !0),
1143
- A(e.$slots, "userConfig", {}, void 0, !0),
1144
- Bt.value ? (O(), S("div", {
1145
- key: 2,
1146
- ref_key: "noTitle",
1147
- ref: gt,
1148
- class: "vue-data-ui-no-title-space",
1149
- style: "height:36px; width: 100%;background:transparent"
1150
- }, null, 512)) : x("", !0),
1151
- B.value.style.chart.title.text ? (O(), S("div", {
1152
- key: 3,
1153
- ref_key: "chartTitle",
1154
- ref: ht,
1155
- style: "width:100%;background:transparent;padding-bottom:12px"
1156
- }, [(O(), b(ue, {
1157
- key: `title_${_t.value}`,
1158
- config: {
1159
- title: {
1160
- cy: "donut-div-title",
1161
- ...B.value.style.chart.title
1162
- },
1163
- subtitle: {
1164
- cy: "donut-div-subtitle",
1165
- ...B.value.style.chart.title.subtitle
1166
- }
1167
- }
1168
- }, null, 8, ["config"]))], 512)) : x("", !0),
1169
- B.value.userOptions.show && mt.value && (j(Pt) || j(Mt)) ? (O(), b(j(Be), {
1170
- ref_key: "userOptionsRef",
1171
- ref: xt,
1172
- key: `user_option_${yt.value}`,
1173
- backgroundColor: B.value.style.chart.backgroundColor,
1174
- color: B.value.style.chart.color,
1175
- isPrinting: j(It),
1176
- isImaging: j(Lt),
1177
- uid: F.value,
1178
- hasTooltip: B.value.userOptions.buttons.tooltip,
1179
- isTooltip: U.value.showTooltip,
1180
- hasLabel: !1,
1181
- hasPdf: B.value.userOptions.buttons.pdf,
1182
- hasImg: B.value.userOptions.buttons.img,
1183
- hasSvg: B.value.userOptions.buttons.svg,
1184
- hasXls: B.value.userOptions.buttons.csv,
1185
- hasTable: B.value.userOptions.buttons.table,
1186
- hasFullscreen: B.value.userOptions.buttons.fullscreen,
1187
- hasAltCopy: B.value.userOptions.buttons.altCopy,
1188
- isFullscreen: X.value,
1189
- chartElement: I.value,
1190
- position: B.value.userOptions.position,
1191
- callbacks: B.value.userOptions.callbacks,
1192
- printScale: B.value.userOptions.print.scale,
1193
- titles: { ...B.value.userOptions.buttonTitles },
1194
- hasAnnotator: B.value.userOptions.buttons.annotator,
1195
- isAnnotation: Z.value,
1196
- tableDialog: B.value.table.useDialog,
1197
- isCursorPointer: V.value,
1198
- hasZoom: B.value.userOptions.buttons.zoom,
1199
- isZoom: U.value.showZoom,
1200
- onToggleFullscreen: hn,
1201
- onGeneratePdf: j(Rt),
1202
- onGenerateCsv: Pn,
1203
- onGenerateImage: Kn,
1204
- onGenerateSvg: Gn,
1205
- onToggleTable: Fn,
1206
- onToggleTooltip: In,
1207
- onToggleAnnotator: gn,
1208
- onToggleZoom: Ln,
1209
- onCopyAlt: qn,
1210
- style: D({ visibility: j(Pt) ? j(Mt) ? "visible" : "hidden" : "visible" })
1211
- }, be({ _: 2 }, [
1212
- e.$slots.menuIcon ? {
1213
- name: "menuIcon",
1214
- fn: M(({ isOpen: t, color: n }) => [A(e.$slots, "menuIcon", E(T({
1215
- isOpen: t,
1216
- color: n
1217
- })), void 0, !0)]),
1218
- key: "0"
1219
- } : void 0,
1220
- e.$slots.optionTooltip ? {
1221
- name: "optionTooltip",
1222
- fn: M(() => [A(e.$slots, "optionTooltip", {}, void 0, !0)]),
1223
- key: "1"
1224
- } : void 0,
1225
- e.$slots.optionPdf ? {
1226
- name: "optionPdf",
1227
- fn: M(() => [A(e.$slots, "optionPdf", {}, void 0, !0)]),
1228
- key: "2"
1229
- } : void 0,
1230
- e.$slots.optionCsv ? {
1231
- name: "optionCsv",
1232
- fn: M(() => [A(e.$slots, "optionCsv", {}, void 0, !0)]),
1233
- key: "3"
1234
- } : void 0,
1235
- e.$slots.optionImg ? {
1236
- name: "optionImg",
1237
- fn: M(() => [A(e.$slots, "optionImg", {}, void 0, !0)]),
1238
- key: "4"
1239
- } : void 0,
1240
- e.$slots.optionSvg ? {
1241
- name: "optionSvg",
1242
- fn: M(() => [A(e.$slots, "optionSvg", {}, void 0, !0)]),
1243
- key: "5"
1244
- } : void 0,
1245
- e.$slots.optionTable ? {
1246
- name: "optionTable",
1247
- fn: M(() => [A(e.$slots, "optionTable", {}, void 0, !0)]),
1248
- key: "6"
1249
- } : void 0,
1250
- e.$slots.optionFullscreen ? {
1251
- name: "optionFullscreen",
1252
- fn: M(({ toggleFullscreen: t, isFullscreen: n }) => [A(e.$slots, "optionFullscreen", E(T({
1253
- toggleFullscreen: t,
1254
- isFullscreen: n
1255
- })), void 0, !0)]),
1256
- key: "7"
1257
- } : void 0,
1258
- e.$slots.optionAnnotator ? {
1259
- name: "optionAnnotator",
1260
- fn: M(({ toggleAnnotator: t, isAnnotator: n }) => [A(e.$slots, "optionAnnotator", E(T({
1261
- toggleAnnotator: t,
1262
- isAnnotator: n
1263
- })), void 0, !0)]),
1264
- key: "8"
1265
- } : void 0,
1266
- e.$slots.optionZoom ? {
1267
- name: "optionZoom",
1268
- fn: M(({ toggleZoom: t, isZoomLocked: n }) => [A(e.$slots, "optionZoom", E(T({
1269
- toggleZoom: t,
1270
- isZoomLocked: n
1271
- })), void 0, !0)]),
1272
- key: "9"
1273
- } : void 0,
1274
- e.$slots.optionAltCopy ? {
1275
- name: "optionAltCopy",
1276
- fn: M(({ altCopy: t }) => [A(e.$slots, "optionAltCopy", E(T({ altCopy: t })), void 0, !0)]),
1277
- key: "10"
1278
- } : void 0,
1279
- e.$slots["custom-menu-before"] ? {
1280
- name: "custom-menu-before",
1281
- fn: M(() => [A(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1282
- key: "11"
1283
- } : void 0,
1284
- e.$slots["custom-menu-after"] ? {
1285
- name: "custom-menu-after",
1286
- fn: M(() => [A(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1287
- key: "12"
1288
- } : void 0
1289
- ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.isTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.printScale.titles.hasAnnotator.isAnnotation.tableDialog.isCursorPointer.hasZoom.isZoom.onGeneratePdf.style".split("."))) : x("", !0),
1290
- C("div", { class: Te({
1291
- "vue-ui-circle-pack-svg-container": !0,
1292
- "not-responsive": !B.value.responsive
1293
- }) }, [(O(), S("svg", {
1294
- ref_key: "svgRef",
1295
- ref: H,
1296
- xmlns: j(ee),
1297
- "aria-describedby": `chart-instructions-${F.value}`,
1298
- viewBox: `${j(Q).x} ${j(Q).y} ${j(Q).width} ${j(Q).height}`,
1299
- preserveAspectRatio: "xMidYMid meet",
1300
- class: Te({
1301
- "vue-data-ui-fullscreen--on": X.value,
1302
- "vue-data-ui-fulscreen--off": !X.value,
1303
- "not-responsive": !B.value.responsive
1304
- }),
1305
- style: D(`display:block;${B.value.responsive ? "width:100%;height:auto" : "height:100%;"};overflow:${U.value.showZoom ? "hidden" : "visible"};background:transparent;color:${B.value.style.chart.color};background:${B.value.style.chart.backgroundColor};`),
1306
- tabindex: "0",
1307
- onFocus: Xn,
1308
- onBlur: Zn,
1309
- onKeydown: $n
1310
- }, [
1311
- Se(j(He)),
1312
- e.$slots["chart-background"] ? (O(), S("foreignObject", {
1313
- key: 0,
1314
- x: j(Q).x,
1315
- y: j(Q).y,
1316
- width: W.value.w,
1317
- height: W.value.h,
1318
- style: { pointerEvents: "none" }
1319
- }, [A(e.$slots, "chart-background", {}, void 0, !0)], 8, Xe)) : x("", !0),
1320
- (O(!0), S(v, null, Oe(G.value, (t, n) => (O(), S(v, { key: t.id }, [
1321
- C("defs", null, [Se(me, {
1322
- t: "radial",
1323
- id: t.id,
1324
- fy: "30%",
1325
- stops: [
1326
- [
1327
- "10%",
1328
- j(r)(t.color, B.value.style.chart.circles.gradient.intensity / 100),
1329
- 1
1330
- ],
1331
- [
1332
- "90%",
1333
- j(o)(t.color, .1),
1334
- 1
1335
- ],
1336
- [
1337
- "100%",
1338
- t.color,
1339
- 1
1340
- ]
1341
- ]
1342
- }, null, 8, ["id", "stops"])]),
1343
- e.$slots.pattern ? (O(), S("g", Ze, [C("defs", null, [A(e.$slots, "pattern", Ce({ ref_for: !0 }, {
1344
- ...t,
1345
- patternId: `pattern_${F.value}_${t.id}`
1346
- }), void 0, !0)])])) : x("", !0),
1347
- C("rect", {
1348
- x: t.x - t.r,
1349
- y: t.y - t.r,
1350
- width: t.r * 2,
1351
- height: t.r * 2,
1352
- stroke: B.value.style.chart.circles.stroke,
1353
- "stroke-width": B.value.style.chart.circles.strokeWidth * (on.value || 1) / 100,
1354
- fill: B.value.style.chart.circles.gradient.show ? `url(#${t.id})` : t.color,
1355
- rx: t.r,
1356
- onMouseenter: (e) => fn(t, n, "pointer"),
1357
- onMouseout: (e) => cn(t, n),
1358
- onClick: (e) => ln(t, n)
1359
- }, null, 40, Qe),
1360
- e.$slots.pattern ? (O(), S("rect", {
1361
- key: 1,
1362
- x: t.x - t.r,
1363
- y: t.y - t.r,
1364
- width: t.r * 2,
1365
- height: t.r * 2,
1366
- stroke: B.value.style.chart.circles.stroke,
1367
- "stroke-width": B.value.style.chart.circles.strokeWidth * (on.value || 1) / 100,
1368
- fill: `url(#pattern_${F.value}_${t.id})`,
1369
- rx: t.r,
1370
- style: { pointerEvents: "none" }
1371
- }, null, 8, $e)) : x("", !0)
1372
- ], 64))), 128)),
1373
- (O(!0), S(v, null, Oe(G.value, (e, t) => (O(), S(v, { key: e.id }, [e.hasChildren ? x("", !0) : (O(), S("rect", {
1374
- key: 0,
1375
- x: e.x - e.r,
1376
- y: e.y - e.r,
1377
- width: e.r * 2,
1378
- height: e.r * 2,
1379
- stroke: "none",
1380
- fill: R.value && R.value.id === e.id ? B.value.style.chart.circles.gradient.show ? `url(#${e.id})` : e.color : "transparent",
1381
- rx: e.r,
1382
- style: D({
1383
- filter: R.value && R.value.id === e.id ? `drop-shadow(0px 0px 6px ${B.value.style.chart.circles.selectedShadowColor})` : "none",
1384
- opacity: +!!R.value,
1385
- pointerEvents: "none",
1386
- transition: "opacity 0.2s ease-in-out"
1387
- })
1388
- }, null, 12, et))], 64))), 128)),
1389
- (O(!0), S(v, null, Oe(G.value, (t, n) => (O(), S(v, { key: t.id }, [e.$slots["data-label"] && en(t) ? A(e.$slots, "data-label", Ce({ ref_for: !0 }, {
1390
- ...t,
1391
- createTSpans: j(u),
1392
- fontSize: {
1393
- name: t.r / 3 * B.value.style.chart.circles.labels.name.fontSizeRatio,
1394
- value: mn(t) * B.value.style.chart.circles.labels.value.fontSizeRatio
1395
- },
1396
- color: B.value.style.chart.circles.labels.name.color ? B.value.style.chart.circles.labels.name.color : j(_)(t.color)
1397
- }), void 0, !0, 0) : (O(), S(v, { key: 1 }, [B.value.style.chart.circles.labels.name.show && t.name && en(t) ? (O(), S("text", {
1398
- key: 0,
1399
- style: {
1400
- pointerEvents: "none",
1401
- transition: "opacity 0.2s ease-in-out"
1402
- },
1403
- x: t.x,
1404
- y: t.y + sn(t.r, B.value.style.chart.circles.labels.name.offsetY) - t.r / 10,
1405
- "font-size": t.r / 3 * B.value.style.chart.circles.labels.name.fontSizeRatio,
1406
- fill: B.value.style.chart.circles.labels.name.color === "auto" ? j(_)(t.color) : B.value.style.chart.circles.labels.name.color,
1407
- "font-weight": B.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
1408
- "text-anchor": "middle"
1409
- }, Ae(t.name), 9, tt)) : x("", !0), B.value.style.chart.circles.labels.value.show && en(t) ? (O(), S("text", {
1410
- key: 1,
1411
- style: {
1412
- pointerEvents: "none",
1413
- transition: "opacity 0.2s ease-in-out"
1414
- },
1415
- x: t.x,
1416
- y: t.y + sn(t.r, B.value.style.chart.circles.labels.value.offsetY) + t.r / 2.5,
1417
- "font-size": mn(t) * B.value.style.chart.circles.labels.value.fontSizeRatio,
1418
- fill: B.value.style.chart.circles.labels.value.color === "auto" ? j(_)(t.color) : B.value.style.chart.circles.labels.value.color,
1419
- "font-weight": B.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
1420
- "text-anchor": "middle"
1421
- }, Ae(pn(t)), 9, nt)) : x("", !0)], 64)), A(e.$slots, "circle", Ce({ ref_for: !0 }, {
1422
- ...t,
1423
- showLabel: en(t),
1424
- isSelected: R.value?.id === t.id,
1425
- isDescendantOfSelected: $t(t, R.value),
1426
- uid: `${n}_${F.value}`
1427
- }), void 0, !0)], 64))), 128)),
1428
- kn.value.length && B.value.style.chart.parentTooltips.show ? (O(), S("g", rt, [(O(!0), S(v, null, Oe(kn.value, (t) => (O(), S("g", { key: t.id }, [
1429
- C("line", {
1430
- x1: t.anchorX,
1431
- y1: t.anchorY,
1432
- x2: t.lineX,
1433
- y2: t.lineY,
1434
- stroke: B.value.style.chart.parentTooltips.link.useSerieColor ? t.color : B.value.style.chart.parentTooltips.link.stroke,
1435
- "stroke-width": B.value.style.chart.parentTooltips.link.strokeWidth,
1436
- "stroke-linecap": "round",
1437
- "stroke-dasharray": B.value.style.chart.parentTooltips.link.strokeDasharray,
1438
- opacity: B.value.style.chart.parentTooltips.link.opacity
1439
- }, null, 8, it),
1440
- C("rect", {
1441
- x: t.x,
1442
- y: t.y,
1443
- width: t.width,
1444
- height: t.height,
1445
- rx: Math.max(3, t.fontSize / 2.5) * B.value.style.chart.parentTooltips.borderRadiusRatio,
1446
- fill: B.value.style.chart.parentTooltips.backgroundColor,
1447
- stroke: B.value.style.chart.parentTooltips.useSerieColor ? t.color : B.value.style.chart.parentTooltips.stroke,
1448
- "stroke-width": B.value.style.chart.parentTooltips.strokeWidth,
1449
- filter: B.value.style.chart.parentTooltips.filter
1450
- }, null, 8, at),
1451
- A(e.$slots, "parent-tooltip", Ce({ ref_for: !0 }, { ...t }), () => [C("circle", {
1452
- cx: t.x + t.paddingX * 1.3,
1453
- cy: t.y + t.paddingY + t.lineHeight / 2,
1454
- r: t.fontSize * .35,
1455
- fill: t.color
1456
- }, null, 8, ot), C("text", {
1457
- x: t.x + t.paddingX + t.fontSize,
1458
- y: t.y + t.paddingY + t.fontSize,
1459
- "font-size": t.fontSize,
1460
- fill: B.value.style.chart.parentTooltips.color,
1461
- "font-family": B.value.style.fontFamily,
1462
- "text-anchor": "start"
1463
- }, [(O(!0), S(v, null, Oe(t.lines, (e, n) => (O(), S("tspan", {
1464
- key: `${t.id}_${n}`,
1465
- x: t.x + t.paddingX + t.fontSize,
1466
- dy: n === 0 ? 0 : t.lineHeight
1467
- }, Ae(e), 9, ct))), 128))], 8, st)], !0)
1468
- ]))), 128))])) : x("", !0),
1469
- A(e.$slots, "svg", { svg: {
1470
- drawingArea: { ...j(Q) },
1471
- width: W.value.w,
1472
- height: W.value.h,
1473
- isPrintingImg: j(It) || j(Lt) || wt.value,
1474
- isPrintingSvg: Tt.value
1475
- } }, void 0, !0)
1476
- ], 46, Ye)), e.$slots.hint ? (O(), S("div", lt, [A(e.$slots, "hint", E(T({
1477
- hint: B.value.a11y.translations.keyboardNavigation,
1478
- isVisible: Ot.value
1479
- })), void 0, !0)])) : x("", !0)], 2),
1480
- e.$slots.watermark ? (O(), S("div", ut, [A(e.$slots, "watermark", E(T({ isPrinting: j(It) || j(Lt) || wt.value || Tt.value })), void 0, !0)])) : x("", !0),
1481
- j(yn) ? (O(), S("div", dt, [A(e.$slots, "reset-action", { reset: j(vn) }, () => [C("button", {
1482
- "data-cy-reset": "",
1483
- tabindex: "0",
1484
- role: "button",
1485
- class: "vue-data-ui-refresh-button",
1486
- style: D({
1487
- background: B.value.style.chart.backgroundColor,
1488
- cursor: V.value ? "pointer" : "default"
1489
- }),
1490
- onClick: t[0] ||= (e) => j(vn)(!0)
1491
- }, [Se(j(N), {
1492
- name: "refresh",
1493
- stroke: B.value.style.chart.color
1494
- }, null, 8, ["stroke"])], 4)], !0)])) : x("", !0),
1495
- e.$slots.source ? (O(), S("div", {
1496
- key: 7,
1497
- ref_key: "source",
1498
- ref: bt,
1499
- dir: "auto"
1500
- }, [A(e.$slots, "source", {}, void 0, !0)], 512)) : x("", !0),
1501
- Se(j(Le), {
1502
- teleportTo: B.value.style.chart.tooltip.teleportTo,
1503
- show: U.value.showTooltip && St.value,
1504
- backgroundColor: B.value.style.chart.tooltip.backgroundColor,
1505
- color: B.value.style.chart.tooltip.color,
1506
- fontSize: B.value.style.chart.tooltip.fontSize,
1507
- borderRadius: B.value.style.chart.tooltip.borderRadius,
1508
- borderColor: B.value.style.chart.tooltip.borderColor,
1509
- borderWidth: B.value.style.chart.tooltip.borderWidth,
1510
- backgroundOpacity: B.value.style.chart.tooltip.backgroundOpacity,
1511
- position: B.value.style.chart.tooltip.position,
1512
- offsetX: B.value.style.chart.tooltip.offsetX,
1513
- offsetY: B.value.style.chart.tooltip.offsetY,
1514
- parent: I.value,
1515
- content: Ct.value,
1516
- isCustom: dn.value,
1517
- isFullscreen: X.value,
1518
- smooth: B.value.style.chart.tooltip.smooth,
1519
- backdropFilter: B.value.style.chart.tooltip.backdropFilter,
1520
- smoothForce: B.value.style.chart.tooltip.smoothForce,
1521
- smoothSnapThreshold: B.value.style.chart.tooltip.smoothSnapThrehsold,
1522
- isA11yMode: Dt.value === "keyboard",
1523
- a11yPosition: Et.value
1524
- }, {
1525
- "tooltip-before": M(() => [A(e.$slots, "tooltip-before", E(T({ ...un.value })), void 0, !0)]),
1526
- tooltip: M(() => [A(e.$slots, "tooltip", E(T({ ...un.value })), void 0, !0)]),
1527
- "tooltip-after": M(() => [A(e.$slots, "tooltip-after", E(T({ ...un.value })), void 0, !0)]),
1528
- _: 3
1529
- }, 8, [
1530
- "teleportTo",
1531
- "show",
1532
- "backgroundColor",
1533
- "color",
1534
- "fontSize",
1535
- "borderRadius",
1536
- "borderColor",
1537
- "borderWidth",
1538
- "backgroundOpacity",
1539
- "position",
1540
- "offsetX",
1541
- "offsetY",
1542
- "parent",
1543
- "content",
1544
- "isCustom",
1545
- "isFullscreen",
1546
- "smooth",
1547
- "backdropFilter",
1548
- "smoothForce",
1549
- "smoothSnapThreshold",
1550
- "isA11yMode",
1551
- "a11yPosition"
1552
- ]),
1553
- mt.value && B.value.userOptions.buttons.table ? (O(), b(ke(Bn.value.component), Ce({ key: 8 }, Bn.value.props, {
1554
- ref_key: "tableUnit",
1555
- ref: L,
1556
- onClose: Vn
1557
- }), be({
1558
- content: M(() => [(O(), b(j(ze), {
1559
- key: `table_${vt.value}`,
1560
- colNames: $.value.colNames,
1561
- head: $.value.head,
1562
- body: $.value.body,
1563
- config: $.value.config,
1564
- title: B.value.table.useDialog ? "" : Bn.value.title,
1565
- withCloseButton: !B.value.table.useDialog,
1566
- isCursorPointer: V.value,
1567
- onClose: Vn
1568
- }, {
1569
- th: M(({ th: e }) => [C("div", {
1570
- innerHTML: e,
1571
- style: {
1572
- display: "flex",
1573
- "align-items": "center"
1574
- }
1575
- }, null, 8, ft)]),
1576
- td: M(({ td: e }) => [xe(Ae(e.name || e), 1)]),
1577
- _: 1
1578
- }, 8, [
1579
- "colNames",
1580
- "head",
1581
- "body",
1582
- "config",
1583
- "title",
1584
- "withCloseButton",
1585
- "isCursorPointer"
1586
- ]))]),
1587
- _: 2
1588
- }, [B.value.table.useDialog ? {
1589
- name: "title",
1590
- fn: M(() => [xe(Ae(Bn.value.title), 1)]),
1591
- key: "0"
1592
- } : void 0, B.value.table.useDialog ? {
1593
- name: "actions",
1594
- fn: M(() => [C("button", {
1595
- tabindex: "0",
1596
- class: "vue-ui-user-options-button",
1597
- onClick: t[1] ||= (e) => Pn(B.value.userOptions.callbacks.csv),
1598
- style: D({ cursor: V.value ? "pointer" : "default" })
1599
- }, [Se(j(N), {
1600
- name: "fileCsv",
1601
- stroke: Bn.value.props.color
1602
- }, null, 8, ["stroke"])], 4)]),
1603
- key: "1"
1604
- } : void 0]), 1040)) : x("", !0),
1605
- A(e.$slots, "skeleton", {}, () => [j(At) ? (O(), b(ae, { key: 0 })) : x("", !0)], !0)
1606
- ], 46, qe));
1607
- }
1608
- }, [["__scopeId", "data-v-a9dfcd55"]]);
1609
- //#endregion
1610
- export { Ke as n, pt as t };