vue-data-ui 3.15.12 → 3.16.1

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 (218) hide show
  1. package/README.md +132 -59
  2. package/dist/A11yDataTable-KcVAX2cP.js +54 -0
  3. package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
  4. package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
  5. package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
  6. package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
  7. package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
  8. package/dist/ColorPicker-B0mV4xzu.js +255 -0
  9. package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
  10. package/dist/Legend-CS7Xo5LK.js +101 -0
  11. package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
  12. package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
  13. package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
  14. package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
  15. package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
  16. package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
  17. package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
  18. package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
  19. package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
  20. package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-heatmap.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
  91. package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
  92. package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
  93. package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
  94. package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
  95. package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
  96. package/dist/style.css +1 -1
  97. package/dist/types/vue-data-ui.d.ts +59 -0
  98. package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
  99. package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
  100. package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
  101. package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
  102. package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
  103. package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
  104. package/dist/utils.js +3 -3
  105. package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
  106. package/dist/vue-data-ui.js +72 -72
  107. package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
  108. package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
  109. package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
  110. package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
  111. package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
  112. package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
  113. package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
  114. package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
  115. package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
  116. package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
  117. package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
  118. package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
  119. package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
  120. package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
  121. package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
  122. package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
  123. package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
  124. package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
  125. package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
  126. package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
  127. package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
  128. package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
  129. package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
  130. package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
  131. package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
  132. package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
  133. package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
  134. package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
  135. package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
  136. package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
  137. package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
  138. package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
  139. package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
  140. package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
  141. package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
  142. package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
  143. package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
  144. package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
  145. package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
  146. package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
  147. package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
  148. package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
  149. package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
  150. package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
  151. package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
  152. package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
  153. package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
  154. package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
  155. package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
  156. package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
  157. package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
  158. package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
  159. package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
  160. package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
  161. package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
  162. package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
  163. package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
  164. package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
  165. package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
  166. package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
  167. package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
  168. package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
  169. package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
  170. package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
  171. package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
  172. package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
  173. package/package.json +2 -2
  174. package/dist/ColorPicker-j0ySewhI.js +0 -244
  175. package/dist/Legend-1LMMsPxL.js +0 -90
  176. package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
  177. package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
  178. package/dist/vue-ui-bump-C_fKharc.js +0 -1059
  179. package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
  180. package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
  181. package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
  182. package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
  183. package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
  184. package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
  185. package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
  186. package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
  187. package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
  188. package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
  189. package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
  190. package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
  191. package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
  192. package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
  193. package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
  194. package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
  195. package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
  196. package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
  197. package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
  198. package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
  199. package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
  200. package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
  201. package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
  202. package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
  203. package/dist/vue-ui-rings-80ZUki42.js +0 -1083
  204. package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
  205. package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
  206. package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
  207. package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
  208. package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
  209. package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
  210. package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
  211. package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
  212. package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
  213. package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
  214. package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
  215. package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
  216. package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
  217. package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
  218. package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
@@ -1,1466 +0,0 @@
1
- import { defineAsyncComponent as le, computed as G, ref as I, toRefs as Vt, watch as $e, shallowRef as it, onMounted as _t, onBeforeUnmount as Ut, openBlock as Y, createElementBlock as K, unref as C, normalizeStyle as Ae, createBlock as se, withCtx as A, renderSlot as P, normalizeProps as V, guardReactiveProps as _, createCommentVNode as L, createSlots as ut, normalizeClass as rt, createVNode as Be, createElementVNode as Xe, Fragment as Lt, renderList as qt, toDisplayString as Ve, resolveDynamicComponent as Ht, mergeProps as jt, createTextVNode as ct, nextTick as _e } from "vue";
2
- import { d as dt, u as Gt } from "./useResponsive-DfdjqQps.js";
3
- import { j as Kt, t as vt, e as Jt, K as Qt, m as eo, p as ze, o as mt, q as ft, r as to, l as oo, X as no, a0 as ao, a1 as lo, T as so } from "./lib-GwPnJSrY.js";
4
- import { u as io } from "./useConfig-CIgyKZ6R.js";
5
- import { u as uo, B as ro } from "./BaseScanner-BhhkKVoj.js";
6
- import { u as co } from "./usePrinter-DiK5R6k-.js";
7
- import { u as vo } from "./useSvgExport-ByUukOZt.js";
8
- import { u as Ue } from "./useNestedProp-BBT0mbHh.js";
9
- import { u as mo } from "./useThemeCheck-D1ZYXUwG.js";
10
- import { u as fo } from "./useUserOptionState-BIvW1Kz7.js";
11
- import { u as ho } from "./useChartAccessibility-9icAAmYg.js";
12
- import po from "./img-BYYzY_QU.js";
13
- import go from "./Title-BfyrP-jp.js";
14
- import bo from "./vue_ui_word_cloud-mKAtBxHR.js";
15
- import { u as yo } from "./usePanZoom-CDF7rb3o.js";
16
- import { B as ht } from "./BaseZoomControls-CoFievy9.js";
17
- import { _ as wo } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
- function xo({
19
- word: o,
20
- fontSize: s,
21
- pad: m,
22
- canvas: c,
23
- ctx: r,
24
- svg: v
25
- }) {
26
- const n = `${v.style && v.style.bold ? "bold " : ""}${s}px Arial`;
27
- r.font = n;
28
- const h = r.measureText(o.name), f = Math.ceil(h.width) + 2 + (m ? m * 2 : 0), p = Math.ceil(s) + 2 + (m ? m * 2 : 0);
29
- c.width = f, c.height = p, r.font = n, r.textAlign = "center", r.textBaseline = "middle", r.fillStyle = "black", r.fillText(o.name, f / 2, p / 2);
30
- const g = r.getImageData(0, 0, f, p).data, w = [], l = [];
31
- let u = f, $ = p, F = 0, k = 0, d = !1;
32
- for (let x = 0; x < p; x += 1) {
33
- const Z = x * f * 4;
34
- let W = -1, D = !1;
35
- for (let X = 0; X < f; X += 1) {
36
- const B = Z + X * 4 + 3;
37
- g[B] > 1 ? (w.push([X, x]), d = !0, X < u && (u = X), X > F && (F = X), x < $ && ($ = x), x > k && (k = x), D || (D = !0, W = X)) : D && (l.push([x, W, X - 1]), D = !1, W = -1);
38
- }
39
- D && l.push([x, W, f - 1]);
40
- }
41
- return d || (u = 0, $ = 0, F = 0, k = 0), {
42
- w: f,
43
- h: p,
44
- wordMask: w,
45
- runs: l,
46
- minX: u,
47
- minY: $,
48
- maxX: F,
49
- maxY: k
50
- };
51
- }
52
- function Co(o) {
53
- const s = [];
54
- if (!o.length) return s;
55
- let m = o[0][1], c = o[0][0], r = c;
56
- for (let v = 1; v < o.length; v += 1) {
57
- const i = o[v][0], n = o[v][1];
58
- n !== m ? (s.push([m, c, r]), m = n, c = i, r = i) : (i === r + 1 || (s.push([m, c, r]), c = i), r = i);
59
- }
60
- return s.push([m, c, r]), s;
61
- }
62
- function yt(o, s) {
63
- return 4294967295 >>> 32 - (s - o + 1) << o >>> 0;
64
- }
65
- function wt(o) {
66
- return 4294967295 << o >>> 0;
67
- }
68
- function xt(o) {
69
- return 4294967295 >>> 31 - o >>> 0;
70
- }
71
- function ko({
72
- maskBits: o,
73
- maskRowStride: s,
74
- maskW: m,
75
- maskH: c,
76
- wx: r,
77
- wy: v,
78
- runs: i
79
- }) {
80
- for (let n = 0; n < i.length; n += 1) {
81
- const h = i[n][0], f = i[n][1], p = i[n][2], b = v + h;
82
- if (b < 0 || b >= c) return !1;
83
- const g = r + f, w = r + p;
84
- if (g < 0 || w >= m) return !1;
85
- const l = b * s, u = g >>> 5, $ = w >>> 5, F = g & 31, k = w & 31;
86
- if (u === $) {
87
- const d = o[l + u], x = yt(F, k);
88
- if (d & x) return !1;
89
- } else {
90
- {
91
- const d = o[l + u], x = wt(F);
92
- if (d & x) return !1;
93
- }
94
- for (let d = u + 1; d < $; d += 1)
95
- if (o[l + d]) return !1;
96
- {
97
- const d = o[l + $], x = xt(k);
98
- if (d & x) return !1;
99
- }
100
- }
101
- }
102
- return !0;
103
- }
104
- function Fo({
105
- maskBits: o,
106
- maskRowStride: s,
107
- maskW: m,
108
- maskH: c,
109
- wx: r,
110
- wy: v,
111
- runs: i
112
- }) {
113
- for (let n = 0; n < i.length; n += 1) {
114
- const h = i[n][0], f = i[n][1], p = i[n][2], b = v + h;
115
- if (b < 0 || b >= c) continue;
116
- const g = r + f, w = r + p;
117
- if (w < 0 || g >= m) continue;
118
- const l = b * s, u = g >>> 5, $ = w >>> 5, F = g & 31, k = w & 31;
119
- if (u === $) {
120
- const d = yt(F, k);
121
- o[l + u] |= d;
122
- } else {
123
- {
124
- const d = wt(F);
125
- o[l + u] |= d;
126
- }
127
- for (let d = u + 1; d < $; d += 1)
128
- o[l + d] = 4294967295;
129
- {
130
- const d = xt(k);
131
- o[l + $] |= d;
132
- }
133
- }
134
- }
135
- }
136
- function So({ wordMask: o, w: s, h: m, dilation: c }) {
137
- const r = new Uint8Array(s * m), v = [];
138
- for (let n = 0; n < o.length; n += 1) {
139
- const h = o[n][0], p = o[n][1] * s + h;
140
- r[p] || (r[p] = 1, v.push(p));
141
- }
142
- for (let n = 0; n < v.length; n += 1) {
143
- const h = v[n], f = h / s | 0, p = h - f * s;
144
- for (let b = -c; b <= c; b += 1) {
145
- const g = f + b;
146
- if (g < 0 || g >= m) continue;
147
- const w = g * s;
148
- for (let l = -c; l <= c; l += 1) {
149
- if (l === 0 && b === 0) continue;
150
- const u = p + l;
151
- u < 0 || u >= s || (r[w + u] = 1);
152
- }
153
- }
154
- }
155
- const i = [];
156
- for (let n = 0; n < r.length; n += 1)
157
- if (r[n]) {
158
- const h = n / s | 0, f = n - h * s;
159
- i.push([f, h]);
160
- }
161
- return i;
162
- }
163
- function $o({
164
- runs: o,
165
- w: s,
166
- h: m,
167
- dilation: c
168
- }) {
169
- const r = new Uint8Array(s * m), v = [];
170
- for (let n = 0; n < o.length; n += 1) {
171
- const h = o[n], f = h[0], p = h[1], b = h[2], g = f * s;
172
- for (let w = p; w <= b; w += 1) {
173
- const l = g + w;
174
- r[l] || (r[l] = 1, v.push(l));
175
- }
176
- }
177
- for (let n = 0; n < v.length; n += 1) {
178
- const h = v[n], f = h / s | 0, p = h - f * s;
179
- for (let b = -c; b <= c; b += 1) {
180
- const g = f + b;
181
- if (g < 0 || g >= m) continue;
182
- const w = g * s;
183
- for (let l = -c; l <= c; l += 1) {
184
- if (l === 0 && b === 0) continue;
185
- const u = p + l;
186
- u < 0 || u >= s || (r[w + u] = 1);
187
- }
188
- }
189
- }
190
- const i = [];
191
- for (let n = 0; n < m; n += 1) {
192
- const h = n * s;
193
- let f = -1, p = !1;
194
- for (let b = 0; b < s; b += 1)
195
- r[h + b] ? p || (p = !0, f = b) : p && (i.push([n, f, b - 1]), p = !1, f = -1);
196
- p && i.push([n, f, s - 1]);
197
- }
198
- return i;
199
- }
200
- function To(o, s) {
201
- const m = o.runs, c = o.w, r = o.h, v = Math.max(1, Math.round(c * s)), i = Math.max(1, Math.round(r * s)), n = new Array(i);
202
- let h = v, f = i, p = 0, b = 0, g = !1;
203
- for (let l = 0; l < m.length; l += 1) {
204
- const u = m[l], $ = u[0], F = u[1], k = u[2], d = Math.round($ * s);
205
- if (d < 0 || d >= i) continue;
206
- const x = Math.round(F * s), Z = Math.round((k + 1) * s) - 1;
207
- if (Z < x) continue;
208
- let W = n[d];
209
- W || (W = [], n[d] = W), W.push([x, Z]), g = !0, x < h && (h = x), Z > p && (p = Z), d < f && (f = d), d > b && (b = d);
210
- }
211
- if (!g)
212
- return {
213
- w: v,
214
- h: i,
215
- runs: [],
216
- minX: 0,
217
- minY: 0,
218
- maxX: 0,
219
- maxY: 0
220
- };
221
- const w = [];
222
- for (let l = 0; l < i; l += 1) {
223
- const u = n[l];
224
- if (!u || u.length === 0) continue;
225
- u.sort((k, d) => k[0] - d[0]);
226
- let $ = u[0][0], F = u[0][1];
227
- for (let k = 1; k < u.length; k += 1) {
228
- const d = u[k][0], x = u[k][1];
229
- d <= F + 1 ? x > F && (F = x) : (w.push([l, $, F]), $ = d, F = x);
230
- }
231
- w.push([l, $, F]);
232
- }
233
- return {
234
- w: v,
235
- h: i,
236
- runs: w,
237
- minX: h,
238
- minY: f,
239
- maxX: p,
240
- maxY: b
241
- };
242
- }
243
- const pt = /* @__PURE__ */ new Map(), gt = /* @__PURE__ */ new Map();
244
- function Mo({ word: o, fontSize: s, pad: m, svg: c }) {
245
- const r = c.style && c.style.bold ? 1 : 0, v = m || 0;
246
- return `${o.name}::${s}::${v}::${r}`;
247
- }
248
- function Io({
249
- word: o,
250
- fontSize: s,
251
- pad: m,
252
- canvas: c,
253
- ctx: r,
254
- svg: v
255
- }) {
256
- const i = Mo({ word: o, fontSize: s, pad: m, svg: v }), n = pt.get(i);
257
- if (n) return { key: i, bitmap: n };
258
- const h = xo({ word: o, fontSize: s, pad: m, canvas: c, ctx: r, svg: v });
259
- return pt.set(i, h), { key: i, bitmap: h };
260
- }
261
- function Po({
262
- bitmapKey: o,
263
- wordMask: s,
264
- w: m,
265
- h: c,
266
- dilation: r
267
- }) {
268
- const v = `${o}::d${r}`, i = gt.get(v);
269
- if (i) return i;
270
- const n = So({ wordMask: s, w: m, h: c, dilation: r }), h = Co(n), f = { wordMask: n, runs: h };
271
- return gt.set(v, f), f;
272
- }
273
- const Oo = 6, Ao = 2, Ct = Math.PI / 180, kt = [], Ft = [];
274
- for (let o = 0; o < 360; o += Oo) {
275
- const s = o * Ct;
276
- kt.push(Math.cos(s)), Ft.push(Math.sin(s));
277
- }
278
- const St = [], $t = [];
279
- for (let o = 0; o < 360; o += Ao) {
280
- const s = o * Ct;
281
- St.push(Math.cos(s)), $t.push(Math.sin(s));
282
- }
283
- function Xo(o, s, m) {
284
- if (!o.length) return;
285
- let c = 1 / 0, r = -1 / 0, v = 1 / 0, i = -1 / 0;
286
- for (let l = 0; l < o.length; l += 1) {
287
- const u = o[l], $ = u.x + u.minX, F = u.x + u.maxX, k = u.y + u.minY, d = u.y + u.maxY;
288
- $ < c && (c = $), F > r && (r = F), k < v && (v = k), d > i && (i = d);
289
- }
290
- if (!isFinite(c) || !isFinite(r) || !isFinite(v) || !isFinite(i)) return;
291
- const n = Math.max(
292
- Math.abs(c),
293
- Math.abs(r)
294
- ), h = Math.max(
295
- Math.abs(v),
296
- Math.abs(i)
297
- );
298
- if (n === 0 || h === 0) return;
299
- const f = 0.9, p = s * 0.5 * f / n, b = m * 0.5 * f / h;
300
- let g = Math.min(p, b);
301
- if (g <= 1) return;
302
- const w = 4;
303
- g > w && (g = w);
304
- for (let l = 0; l < o.length; l += 1) {
305
- const u = o[l];
306
- u.x *= g, u.y *= g, u.width *= g, u.height *= g, u.fontSize *= g, u.minX *= g, u.maxX *= g, u.minY *= g, u.maxY *= g;
307
- }
308
- }
309
- function zo() {
310
- return typeof performance < "u" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
311
- }
312
- function Ro({
313
- value: o,
314
- minimumValue: s,
315
- maximumValue: m,
316
- configuredMinimumFontSize: c,
317
- maximumFontSize: r
318
- }) {
319
- if (m === s)
320
- return r;
321
- const i = (o - s) / (m - s) * (r - c) + c;
322
- return Math.max(
323
- c,
324
- Math.min(r, i)
325
- );
326
- }
327
- function Yo({
328
- currentBitmap: o,
329
- strictPixelPadding: s,
330
- scaleFactor: m,
331
- baseBitmap: c,
332
- bitmapKey: r
333
- }) {
334
- let v = o.runs;
335
- const i = o.w, n = o.h, h = o.minX, f = o.minY, p = o.maxX, b = o.maxY;
336
- return !s || !v.length ? {
337
- runs: v,
338
- bitmapWidth: i,
339
- bitmapHeight: n,
340
- bitmapMinimumX: h,
341
- bitmapMinimumY: f,
342
- bitmapMaximumX: p,
343
- bitmapMaximumY: b
344
- } : m === 1 ? {
345
- runs: Po({
346
- bitmapKey: r,
347
- wordMask: c.wordMask,
348
- w: c.w,
349
- h: c.h,
350
- dilation: 2
351
- }).runs,
352
- bitmapWidth: i,
353
- bitmapHeight: n,
354
- bitmapMinimumX: h,
355
- bitmapMinimumY: f,
356
- bitmapMaximumX: p,
357
- bitmapMaximumY: b
358
- } : {
359
- runs: $o({
360
- runs: v,
361
- w: i,
362
- h: n,
363
- dilation: 2
364
- }),
365
- bitmapWidth: i,
366
- bitmapHeight: n,
367
- bitmapMinimumX: h,
368
- bitmapMinimumY: f,
369
- bitmapMaximumX: p,
370
- bitmapMaximumY: b
371
- };
372
- }
373
- async function bt({
374
- baseBitmap: o,
375
- baseFontSize: s,
376
- minimumScaleFactor: m,
377
- maskBits: c,
378
- maskRowStride: r,
379
- maskWidth: v,
380
- maskHeight: i,
381
- centerX: n,
382
- centerY: h,
383
- maximumRadius: f,
384
- scaleStep: p,
385
- strictPixelPadding: b,
386
- bitmapKey: g,
387
- minimumFontSize: w,
388
- rawWord: l,
389
- cosineArray: u,
390
- sineArray: $,
391
- radiusStep: F,
392
- maximumAttempts: k,
393
- maybeYield: d
394
- }) {
395
- let x = 1;
396
- for (; x >= m; ) {
397
- const Z = x === 1 ? o : To(o, x), W = Yo({
398
- currentBitmap: Z,
399
- strictPixelPadding: b,
400
- scaleFactor: x,
401
- baseBitmap: o,
402
- bitmapKey: g
403
- }), {
404
- runs: D,
405
- bitmapWidth: X,
406
- bitmapHeight: B,
407
- bitmapMinimumX: Q,
408
- bitmapMinimumY: ie,
409
- bitmapMaximumX: ue,
410
- bitmapMaximumY: re
411
- } = W;
412
- let H = 0, q = 0;
413
- for (; H < f && q < k; ) {
414
- for (let e = 0; e < u.length; e += 1) {
415
- q += 1;
416
- const N = Math.round(
417
- n + H * u[e] - X / 2
418
- ), ee = Math.round(
419
- h + H * $[e] - B / 2
420
- );
421
- if (N < 0 || ee < 0 || N + X > v || ee + B > i)
422
- continue;
423
- if (ko({
424
- maskBits: c,
425
- maskRowStride: r,
426
- maskW: v,
427
- maskH: i,
428
- wx: N,
429
- wy: ee,
430
- runs: D
431
- })) {
432
- const { __wcIndex: z, ...E } = l, te = Math.max(
433
- w,
434
- Math.round(s * x)
435
- ), pe = {
436
- ...E,
437
- x: N - v / 2,
438
- y: ee - i / 2,
439
- fontSize: te,
440
- width: X,
441
- height: B,
442
- angle: 0,
443
- minX: Q,
444
- minY: ie,
445
- maxX: ue,
446
- maxY: re
447
- };
448
- return Fo({
449
- maskBits: c,
450
- maskRowStride: r,
451
- maskW: v,
452
- maskH: i,
453
- wx: N,
454
- wy: ee,
455
- runs: D
456
- }), pe;
457
- }
458
- }
459
- H += F, (q & 1023) === 0 && await d();
460
- }
461
- x *= p, await d();
462
- }
463
- return null;
464
- }
465
- async function Wo({
466
- baseBitmap: o,
467
- baseFontSize: s,
468
- minimumScaleFactor: m,
469
- maskBits: c,
470
- maskRowStride: r,
471
- maskWidth: v,
472
- maskHeight: i,
473
- centerX: n,
474
- centerY: h,
475
- maximumRadius: f,
476
- scaleStep: p,
477
- strictPixelPadding: b,
478
- bitmapKey: g,
479
- minimumFontSize: w,
480
- rawWord: l,
481
- maybeYield: u,
482
- spiralRadiusStep: $,
483
- fallbackSpiralRadiusStep: F
484
- }) {
485
- const k = await bt({
486
- baseBitmap: o,
487
- baseFontSize: s,
488
- minimumScaleFactor: m,
489
- maskBits: c,
490
- maskRowStride: r,
491
- maskWidth: v,
492
- maskHeight: i,
493
- centerX: n,
494
- centerY: h,
495
- maximumRadius: f,
496
- scaleStep: p,
497
- strictPixelPadding: b,
498
- bitmapKey: g,
499
- minimumFontSize: w,
500
- rawWord: l,
501
- cosineArray: kt,
502
- sineArray: Ft,
503
- radiusStep: $,
504
- maximumAttempts: 1e4,
505
- maybeYield: u
506
- });
507
- return k || await bt({
508
- baseBitmap: o,
509
- baseFontSize: s,
510
- minimumScaleFactor: m,
511
- maskBits: c,
512
- maskRowStride: r,
513
- maskWidth: v,
514
- maskHeight: i,
515
- centerX: n,
516
- centerY: h,
517
- maximumRadius: f,
518
- scaleStep: p,
519
- strictPixelPadding: b,
520
- bitmapKey: g,
521
- minimumFontSize: w,
522
- rawWord: l,
523
- cosineArray: St,
524
- sineArray: $t,
525
- radiusStep: F,
526
- maximumAttempts: 25e3,
527
- maybeYield: u
528
- });
529
- }
530
- async function Do({
531
- words: o,
532
- proximity: s = 0,
533
- svg: m,
534
- strictPixelPadding: c,
535
- onProgress: r,
536
- debugTiming: v = !1
537
- }) {
538
- const i = zo(), n = i(), h = 12;
539
- let f = n;
540
- async function p() {
541
- i() - f >= h && (await new Promise((E) => setTimeout(E, 0)), f = i());
542
- }
543
- const b = m.width, g = m.height, w = Math.round(b), l = Math.round(g), u = 1, $ = m.minFontSize, F = Math.min(m.maxFontSize, 100), k = o.map((z) => z.value), d = Math.min(...k), x = Math.max(...k);
544
- if (w <= 0 || l <= 0) return [];
545
- const Z = w + 31 >>> 5, W = new Uint32Array(Z * l), D = document.createElement("canvas"), X = D.getContext("2d", { willReadFrequently: !0 });
546
- D.width = w, D.height = l;
547
- const B = 2, Q = 1, ie = Math.max(w, l), ue = Math.floor(w / 2), re = Math.floor(l / 2), q = [...o.map((z, E) => ({
548
- ...z,
549
- __wcIndex: E,
550
- id: z.id != null ? z.id : `${z.name}__${E}`
551
- }))].sort(
552
- (z, E) => E.value - z.value
553
- ), e = [], N = 0.9;
554
- for (let z = 0; z < q.length; z += 1) {
555
- const E = q[z], te = e.length, ce = Ro({
556
- value: E.value,
557
- minimumValue: d,
558
- maximumValue: x,
559
- configuredMinimumFontSize: $,
560
- maximumFontSize: F
561
- }), ge = Io({
562
- word: E,
563
- fontSize: ce,
564
- pad: s,
565
- canvas: D,
566
- ctx: X,
567
- svg: m
568
- }), Te = ge.key, oe = ge.bitmap, be = oe.w, ye = oe.h;
569
- if (be <= 0 || ye <= 0) {
570
- await p();
571
- continue;
572
- }
573
- const we = Math.max(
574
- u / ce,
575
- 0.1
576
- ), Me = await Wo({
577
- baseBitmap: oe,
578
- baseFontSize: ce,
579
- minimumScaleFactor: we,
580
- maskBits: W,
581
- maskRowStride: Z,
582
- maskWidth: w,
583
- maskHeight: l,
584
- centerX: ue,
585
- centerY: re,
586
- maximumRadius: ie,
587
- scaleStep: N,
588
- strictPixelPadding: c,
589
- bitmapKey: Te,
590
- minimumFontSize: u,
591
- rawWord: E,
592
- maybeYield: p,
593
- spiralRadiusStep: B,
594
- fallbackSpiralRadiusStep: Q
595
- });
596
- if (Me && (e.push(Me), r && e.length > te)) {
597
- const me = e[e.length - 1];
598
- r({ word: me, all: e });
599
- }
600
- await p();
601
- }
602
- if (!e.length)
603
- return [];
604
- Xo(e, w, l);
605
- const ve = i() - n;
606
- return v && typeof console < "u" && console.log && console.log(
607
- "[vue-data-ui][word-cloud] positionWordsAsync:",
608
- `${ve.toFixed(2)} ms for ${o.length} words`
609
- ), e.sort((z, E) => E.fontSize - z.fontSize);
610
- }
611
- const Eo = ["id", "data-resizing", "data-relayout"], No = ["xmlns", "viewBox"], Zo = ["width", "height"], Bo = ["transform"], Vo = ["transform"], _o = ["x", "y", "width", "height", "onMouseover", "onMouseleave", "onClick"], Uo = ["fill", "font-weight", "font-size", "transform", "stroke", "stroke-width"], Lo = {
612
- key: 4,
613
- class: "vue-data-ui-watermark"
614
- }, qo = {
615
- key: 5,
616
- "data-dom-to-png-ignore": "",
617
- class: "reset-wrapper"
618
- }, Ho = ["innerHTML"], jo = {
619
- __name: "vue-ui-word-cloud",
620
- props: {
621
- config: {
622
- type: Object,
623
- default() {
624
- return {};
625
- }
626
- },
627
- dataset: {
628
- type: [Array, String],
629
- default() {
630
- return [];
631
- }
632
- }
633
- },
634
- emits: ["copyAlt"],
635
- setup(o, { expose: s, emit: m }) {
636
- const c = le(() => import("./Tooltip-DL3QgjZf.js")), r = le(() => import("./BaseIcon-CNx8Tzl5.js")), v = le(() => import("./vue-ui-accordion-BGHTqIBt.js")), i = le(() => import("./DataTable-Bo1pmAqG.js")), n = le(() => import("./PenAndPaper-DWV1FMIi.js")), h = le(() => import("./UserOptions-CrLqEimB.js")), f = le(() => import("./PackageVersion-DN9d0ME5.js")), p = le(() => import("./BaseDraggableDialog-DSpKTn3R.js")), { vue_ui_word_cloud: b } = io(), { isThemeValid: g, warnInvalidTheme: w } = mo(), l = o, u = m, $ = G({
637
- get() {
638
- return !!l.dataset && l.dataset.length;
639
- },
640
- set(t) {
641
- return t;
642
- }
643
- }), F = I(Kt()), k = I(0), d = I(null), x = I(null), Z = I(null), W = I(0), D = I(0), X = I(!1), B = I(null), Q = I(null), ie = I(!1), ue = I(!1), re = I(null), H = I(!1), q = I(!1), e = I(be()), N = G(() => e.value.userOptions.useCursorPointer), ee = G(() => vt({
644
- defaultConfig: {
645
- userOptions: { show: !1 },
646
- table: { show: !1 },
647
- useCssAnimation: !1,
648
- animationDelayMs: 0,
649
- nodeCategories: {},
650
- nodeCategoryColors: {},
651
- style: {
652
- chart: {
653
- backgroundColor: "#99999930",
654
- words: {
655
- color: "#6A6A6A",
656
- usePalette: !1,
657
- selectedStroke: "#CCCCCC"
658
- }
659
- }
660
- }
661
- },
662
- userConfig: e.value.skeletonConfig ?? {}
663
- })), { loading: ve, FINAL_DATASET: z, manualLoading: E } = uo({
664
- ...Vt(l),
665
- FINAL_CONFIG: e,
666
- prepareConfig: be,
667
- callback: () => {
668
- Promise.resolve().then(() => {
669
- O.value.showTable = e.value.table.show, O.value.showTooltip = e.value.style.chart.tooltip.show, O.value.showZoom = e.value.style.chart.zoom.show;
670
- });
671
- },
672
- skeletonDataset: l.config?.skeletonDataset ?? [
673
- { name: "Lorem", value: 6 },
674
- { name: "ipsum", value: 3 },
675
- { name: "dolor", value: 1 },
676
- { name: "sit", value: 3 },
677
- { name: "amet", value: 3 },
678
- { name: "consectetur", value: 2 },
679
- { name: "adipiscing", value: 1 },
680
- { name: "elit", value: 2 },
681
- { name: "Vivamus", value: 2 },
682
- { name: "pulvinar", value: 1 },
683
- { name: "pretium", value: 1 },
684
- { name: "venenatis", value: 2 },
685
- { name: "Donec", value: 1 },
686
- { name: "imperdiet", value: 3 },
687
- { name: "id", value: 1 },
688
- { name: "porttitor", value: 2 },
689
- { name: "tristique", value: 1 },
690
- { name: "Aenean", value: 2 },
691
- { name: "ac", value: 5 },
692
- { name: "commodo", value: 2 },
693
- { name: "justo", value: 2 },
694
- { name: "Vestibulum", value: 2 },
695
- { name: "placerat", value: 1 },
696
- { name: "molestie", value: 1 },
697
- { name: "nisl", value: 1 },
698
- { name: "lacinia", value: 2 },
699
- { name: "nulla", value: 1 },
700
- { name: "posuere", value: 2 },
701
- { name: "quis", value: 3 },
702
- { name: "ullamcorper", value: 1 },
703
- { name: "eu", value: 1 },
704
- { name: "ex", value: 1 },
705
- { name: "vitae", value: 3 },
706
- { name: "facilisis", value: 1 },
707
- { name: "Aliquam", value: 1 },
708
- { name: "erat", value: 1 },
709
- { name: "volutpat", value: 1 },
710
- { name: "Proin", value: 1 },
711
- { name: "nunc", value: 1 },
712
- { name: "felis", value: 1 },
713
- { name: "gravida", value: 3 },
714
- { name: "sed", value: 1 },
715
- { name: "orci", value: 1 },
716
- { name: "Interdum", value: 1 },
717
- { name: "et", value: 1 },
718
- { name: "malesuada", value: 1 },
719
- { name: "fames", value: 1 },
720
- { name: "ante", value: 1 }
721
- ],
722
- skeletonConfig: vt({
723
- defaultConfig: e.value,
724
- userConfig: ee.value
725
- })
726
- }), te = I(pe());
727
- function pe() {
728
- return typeof z.value == "string" ? Jt(z.value) : z.value.map((t, y) => ({
729
- ...t,
730
- value: Qt(t.value)
731
- }));
732
- }
733
- const { userOptionsVisible: ce, setUserOptionsVisibility: ge, keepUserOptionState: Te } = fo({ config: e.value }), { svgRef: oe } = ho({ config: e.value.style.chart.title });
734
- function be() {
735
- const t = Ue({
736
- userConfig: l.config,
737
- defaultConfig: b
738
- }), y = t.theme;
739
- if (!y) return t;
740
- if (!g.value(t))
741
- return w(t), t;
742
- const a = Ue({
743
- userConfig: bo[y] || l.config,
744
- defaultConfig: t
745
- }), S = Ue({
746
- userConfig: l.config,
747
- defaultConfig: a
748
- });
749
- return {
750
- ...S,
751
- customPalette: S.customPalette.length ? S.customPalette : eo[y] || ze
752
- };
753
- }
754
- const ye = I({ x: 0, y: 0 });
755
- function we() {
756
- const t = {
757
- x: 0,
758
- y: 0,
759
- width: Math.max(10, R.value.width),
760
- height: Math.max(10, R.value.height)
761
- };
762
- Xt(t), ye.value = {
763
- x: t.x + t.width / 2,
764
- y: t.y + t.height / 2
765
- }, ke();
766
- }
767
- const Me = dt(() => {
768
- je();
769
- }, 100), me = I(!1);
770
- $e(() => me.value, (t) => {
771
- t === !1 && (ue.value = !0, Me(), we());
772
- }), $e(() => l.config, (t) => {
773
- e.value = be(), ce.value = !e.value.userOptions.showOnChartHover, Le(), W.value += 1, D.value += 1, O.value.showTable = e.value.table.show, O.value.showTooltip = e.value.style.chart.tooltip.show, O.value.showZoom = e.value.style.chart.zoom.show;
774
- }, { deep: !0 });
775
- const R = I({
776
- width: e.value.style.chart.width,
777
- height: e.value.style.chart.height,
778
- maxFontSize: e.value.style.chart.words.maxFontSize,
779
- minFontSize: e.value.style.chart.words.minFontSize,
780
- bold: e.value.style.chart.words.bold
781
- }), Tt = dt(() => {
782
- const { width: t, height: y } = Gt({
783
- chart: d.value,
784
- title: e.value.style.chart.title.text ? x.value : null,
785
- legend: e.value.style.chart.controls.show ? re.value?.$el : null,
786
- source: Z.value
787
- });
788
- requestAnimationFrame(async () => {
789
- R.value.width = Math.max(10, t), R.value.height = Math.max(10, y - 12), await _e(), me.value = !1;
790
- });
791
- }, 100), Mt = () => {
792
- me.value = !0, Tt();
793
- }, ne = it(null), fe = it(null);
794
- _t(Le);
795
- const Re = G(() => !!e.value.debug);
796
- function Le() {
797
- mt(l.dataset) ? ft({
798
- componentName: "VueUiWordCloud",
799
- type: "dataset",
800
- debug: Re.value
801
- }) : te.value.forEach((t, y) => {
802
- to({
803
- datasetObject: t,
804
- requiredAttributes: ["name", "value"]
805
- }).forEach((a) => {
806
- $.value = !1, ft({
807
- componentName: "VueUiWordCloud",
808
- type: "datasetSerieAttribute",
809
- property: a,
810
- index: y,
811
- debug: Re.value
812
- });
813
- });
814
- }), mt(l.dataset) || (E.value = e.value.loading), e.value.responsive && (ne.value && (fe.value && ne.value.unobserve(fe.value), ne.value.disconnect()), ne.value = new ResizeObserver(Mt), fe.value = d.value.parentNode, ne.value.observe(fe.value)), we();
815
- }
816
- Ut(() => {
817
- ne.value && (fe.value && ne.value.unobserve(fe.value), ne.value.disconnect());
818
- });
819
- const { isPrinting: Ye, isImaging: We, generatePdf: qe, generateImage: He } = co({
820
- elementId: `wordCloud_${F.value}`,
821
- fileName: e.value.style.chart.title.text || "vue-ui-word-cloud",
822
- options: e.value.userOptions.print
823
- }), O = I({
824
- showTable: e.value.table.show,
825
- showTooltip: e.value.style.chart.tooltip.show,
826
- showZoom: e.value.style.chart.zoom.show
827
- });
828
- $e(e, () => {
829
- O.value.showTable = e.value.table.show, O.value.showTooltip = e.value.style.chart.tooltip.show, O.value.showZoom = e.value.style.chart.zoom.show;
830
- }, { immediate: !0 });
831
- function It(t, y, a = "Arial") {
832
- const T = document.createElement("canvas").getContext("2d");
833
- return T.font = `${y}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${a}`, {
834
- width: T.measureText(t).width + e.value.style.chart.words.proximity,
835
- height: y
836
- };
837
- }
838
- const U = I([]), xe = /* @__PURE__ */ new Map();
839
- function je() {
840
- const t = [...te.value].map((T) => T.value), y = Math.max(...t), a = Math.min(...t), S = [...te.value].map((T, M) => {
841
- let j = (T.value - a) / (y - a) * (R.value.maxFontSize - R.value.minFontSize) + R.value.minFontSize;
842
- j = isNaN(j) ? R.value.minFontSize : j;
843
- const de = It(T.name, j);
844
- return {
845
- ...T,
846
- id: T.id ?? `${T.name}__${M}`,
847
- fontSize: j,
848
- width: de.width,
849
- height: de.height,
850
- color: e.value.style.chart.words.usePalette ? e.value.customPalette[M] || e.value.customPalette[M % e.value.customPalette.length] || ze[M] || ze[M % ze.length] : e.value.style.chart.words.color
851
- };
852
- });
853
- U.value.length = 0, xe.clear(), Do({
854
- debugTiming: Re.value,
855
- words: S,
856
- svg: R.value,
857
- proximity: e.value.style.chart.words.proximity,
858
- strictPixelPadding: e.value.strictPixelPadding,
859
- onProgress: ({ all: T }) => {
860
- for (const M of T) {
861
- const j = M.id;
862
- let de = xe.get(j);
863
- if (de === void 0)
864
- de = U.value.length, xe.set(j, de), U.value.push({ ...M });
865
- else {
866
- const J = U.value[de];
867
- J.x = M.x, J.y = M.y, J.width = M.width, J.height = M.height, J.fontSize = M.fontSize, J.minX = M.minX, J.minY = M.minY, J.maxX = M.maxX, J.maxY = M.maxY;
868
- }
869
- }
870
- }
871
- }), U.value.sort((T, M) => M.fontSize - T.fontSize), xe.clear(), U.value.forEach((T, M) => {
872
- xe.set(T.id, M);
873
- }), ie.value = !0, ue.value = !1;
874
- }
875
- const Ie = G(() => {
876
- const t = U.value.map((a) => ({
877
- name: a.name,
878
- color: a.color
879
- })), y = U.value.map((a) => a.value);
880
- return { head: t, body: y };
881
- });
882
- function De(t = null) {
883
- _e(() => {
884
- const y = Ie.value.head.map((T, M) => [[
885
- T.name
886
- ], [Ie.value.body[M]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(y), S = ao(a);
887
- t ? t(S) : lo({ csvContent: S, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
888
- });
889
- }
890
- const Pe = G(() => {
891
- const t = [
892
- e.value.table.columnNames.series,
893
- e.value.table.columnNames.value
894
- ], y = Ie.value.head.map((T, M) => {
895
- const j = oo({ p: e.value.table.td.prefix, v: Ie.value.body[M], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
896
- return [
897
- {
898
- color: T.color,
899
- name: T.name
900
- },
901
- j
902
- ];
903
- }), a = {
904
- th: {
905
- backgroundColor: e.value.table.th.backgroundColor,
906
- color: e.value.table.th.color,
907
- outline: e.value.table.th.outline
908
- },
909
- td: {
910
- backgroundColor: e.value.table.td.backgroundColor,
911
- color: e.value.table.td.color,
912
- outline: e.value.table.td.outline
913
- },
914
- breakpoint: e.value.table.responsiveBreakpoint
915
- };
916
- return {
917
- colNames: [
918
- e.value.table.columnNames.series,
919
- e.value.table.columnNames.value
920
- ],
921
- head: t,
922
- body: y,
923
- config: a
924
- };
925
- }), ae = I(!1);
926
- function Ge(t) {
927
- ae.value = t, k.value += 1;
928
- }
929
- function Pt() {
930
- return U.value;
931
- }
932
- function Ke() {
933
- O.value.showTable = !O.value.showTable;
934
- }
935
- function Je() {
936
- O.value.showTooltip = !O.value.showTooltip;
937
- }
938
- const Ce = I(!1);
939
- function Ee() {
940
- Ce.value = !Ce.value;
941
- }
942
- function Qe() {
943
- O.value.showZoom = !O.value.showZoom;
944
- }
945
- const Ot = G(() => !Ce.value && O.value.showZoom), { viewBox: Oe, resetZoom: ke, isZoom: At, setInitialViewBox: Xt, zoomByFactor: et, scale: tt } = yo(oe, {
946
- x: 0,
947
- y: 0,
948
- width: R.value.width <= 0 ? 10 : R.value.width,
949
- height: R.value.height <= 0 ? 10 : R.value.height
950
- }, 1, Ot);
951
- $e(() => l.dataset, () => {
952
- te.value = pe(), e.value.responsive || (je(), we());
953
- }, { immediate: !0 });
954
- async function zt({ scale: t = 2 } = {}) {
955
- if (!d.value) return;
956
- const { width: y, height: a } = d.value.getBoundingClientRect(), S = y / a, { imageUri: T, base64: M } = await po({ domElement: d.value, base64: !0, img: !0, scale: t });
957
- return {
958
- imageUri: T,
959
- base64: M,
960
- title: e.value.style.chart.title.text,
961
- width: y,
962
- height: a,
963
- aspectRatio: S
964
- };
965
- }
966
- const Fe = G(() => {
967
- const t = e.value.table.useDialog && !e.value.table.show, y = O.value.showTable;
968
- return {
969
- component: t ? p : v,
970
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
971
- props: t ? {
972
- backgroundColor: e.value.table.th.backgroundColor,
973
- color: e.value.table.th.color,
974
- headerColor: e.value.table.th.color,
975
- headerBg: e.value.table.th.backgroundColor,
976
- isFullscreen: ae.value,
977
- fullscreenParent: d.value,
978
- forcedWidth: Math.min(500, window.innerWidth * 0.8),
979
- isCursorPointer: N.value
980
- } : {
981
- hideDetails: !0,
982
- config: {
983
- open: y,
984
- maxHeight: 1e4,
985
- body: {
986
- backgroundColor: e.value.style.chart.backgroundColor,
987
- color: e.value.style.chart.color
988
- },
989
- head: {
990
- backgroundColor: e.value.style.chart.backgroundColor,
991
- color: e.value.style.chart.color
992
- }
993
- }
994
- }
995
- };
996
- });
997
- $e(() => O.value.showTable, (t) => {
998
- e.value.table.show || (t && e.value.table.useDialog && B.value ? B.value.open() : "close" in B.value && B.value.close());
999
- });
1000
- function ot() {
1001
- O.value.showTable = !1, Q.value && Q.value.setTableIconState(!1);
1002
- }
1003
- const Rt = G(() => e.value.style.chart.backgroundColor), Yt = G(() => e.value.style.chart.title), { exportSvg: Wt, getSvg: Dt } = vo({
1004
- svg: oe,
1005
- title: Yt,
1006
- backgroundColor: Rt
1007
- });
1008
- async function nt({ isCb: t }) {
1009
- q.value = !0, await _e();
1010
- try {
1011
- if (t) {
1012
- const { blob: y, url: a, text: S, dataUrl: T } = await Dt();
1013
- await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: y, url: a, text: S, dataUrl: T }));
1014
- } else
1015
- await Promise.resolve(Wt());
1016
- } finally {
1017
- q.value = !1;
1018
- }
1019
- }
1020
- function Et(t) {
1021
- if (t?.stage === "start") {
1022
- H.value = !0;
1023
- return;
1024
- }
1025
- if (t?.stage === "end") {
1026
- H.value = !1;
1027
- return;
1028
- }
1029
- He();
1030
- }
1031
- function at() {
1032
- et(1.5, !0);
1033
- }
1034
- function lt() {
1035
- et(1 / 1.5, !0);
1036
- }
1037
- const he = I(null), Se = I(!1), Ne = I(""), Ze = I(null);
1038
- function Nt(t, y) {
1039
- he.value = null, X.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: y });
1040
- }
1041
- function Zt(t, y) {
1042
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: y });
1043
- }
1044
- function Bt(t, y) {
1045
- if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: y }), !O.value.showTooltip) return;
1046
- he.value = t.id, Ze.value = { datapoint: t, config: e.value };
1047
- const a = e.value.style.chart.tooltip.customFormat;
1048
- if (Se.value = !1, so(a))
1049
- try {
1050
- const S = a({
1051
- datapoint: t,
1052
- config: e.value
1053
- });
1054
- typeof S == "string" && (Ne.value = S, Se.value = !0);
1055
- } catch {
1056
- console.warn("Custom format cannot be applied."), Se.value = !1;
1057
- }
1058
- if (!Se.value) {
1059
- let S = `<svg viewBox="0 0 10 10" height="${e.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${t.color}"/></svg><span>${t.name}:</span><b>${(t.value || 0).toFixed(e.value.style.chart.tooltip.roundingValue)}</b>`;
1060
- Ne.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${S}</div>`;
1061
- }
1062
- X.value = !0;
1063
- }
1064
- async function st() {
1065
- if (u("copyAlt", {
1066
- config: e.value,
1067
- dataset: U.value
1068
- }), !e.value.userOptions.callbacks.altCopy) {
1069
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1070
- return;
1071
- }
1072
- await Promise.resolve(e.value.userOptions.callbacks.altCopy({
1073
- config: e.value,
1074
- dataset: U.value
1075
- }));
1076
- }
1077
- return s({
1078
- getData: Pt,
1079
- getImage: zt,
1080
- generateCsv: De,
1081
- generatePdf: qe,
1082
- generateImage: He,
1083
- generateSvg: nt,
1084
- resetZoom: ke,
1085
- toggleTable: Ke,
1086
- toggleTooltip: Je,
1087
- toggleAnnotator: Ee,
1088
- toggleFullscreen: Ge,
1089
- toggleZoom: Qe,
1090
- copyAlt: st
1091
- }), (t, y) => (Y(), K("div", {
1092
- class: "vue-data-ui-component vue-ui-word-cloud",
1093
- ref_key: "wordCloudChart",
1094
- ref: d,
1095
- id: `wordCloud_${F.value}`,
1096
- "data-resizing": me.value,
1097
- "data-relayout": ue.value,
1098
- style: Ae(`width: 100%; font-family:${e.value.style.fontFamily};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
1099
- onMouseenter: y[3] || (y[3] = () => C(ge)(!0)),
1100
- onMouseleave: y[4] || (y[4] = () => C(ge)(!1))
1101
- }, [
1102
- e.value.userOptions.buttons.annotator ? (Y(), se(C(n), {
1103
- key: 0,
1104
- svgRef: C(oe),
1105
- backgroundColor: e.value.style.chart.backgroundColor,
1106
- color: e.value.style.chart.color,
1107
- active: Ce.value,
1108
- isCursorPointer: N.value,
1109
- onClose: Ee
1110
- }, {
1111
- "annotator-action-close": A(() => [
1112
- P(t.$slots, "annotator-action-close", {}, void 0, !0)
1113
- ]),
1114
- "annotator-action-color": A(({ color: a }) => [
1115
- P(t.$slots, "annotator-action-color", V(_({ color: a })), void 0, !0)
1116
- ]),
1117
- "annotator-action-draw": A(({ mode: a }) => [
1118
- P(t.$slots, "annotator-action-draw", V(_({ mode: a })), void 0, !0)
1119
- ]),
1120
- "annotator-action-undo": A(({ disabled: a }) => [
1121
- P(t.$slots, "annotator-action-undo", V(_({ disabled: a })), void 0, !0)
1122
- ]),
1123
- "annotator-action-redo": A(({ disabled: a }) => [
1124
- P(t.$slots, "annotator-action-redo", V(_({ disabled: a })), void 0, !0)
1125
- ]),
1126
- "annotator-action-delete": A(({ disabled: a }) => [
1127
- P(t.$slots, "annotator-action-delete", V(_({ disabled: a })), void 0, !0)
1128
- ]),
1129
- _: 3
1130
- }, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : L("", !0),
1131
- e.value.style.chart.title.text ? (Y(), K("div", {
1132
- key: 1,
1133
- ref_key: "chartTitle",
1134
- ref: x,
1135
- style: "width:100%;background:transparent;padding-bottom:24px"
1136
- }, [
1137
- (Y(), se(go, {
1138
- key: `title_${W.value}`,
1139
- config: {
1140
- title: {
1141
- ...e.value.style.chart.title
1142
- },
1143
- subtitle: {
1144
- ...e.value.style.chart.title.subtitle
1145
- }
1146
- }
1147
- }, null, 8, ["config"]))
1148
- ], 512)) : L("", !0),
1149
- e.value.userOptions.show && $.value && (C(Te) || C(ce)) ? (Y(), se(C(h), {
1150
- ref_key: "userOptionsRef",
1151
- ref: Q,
1152
- key: `user_option_${k.value}`,
1153
- backgroundColor: e.value.style.chart.backgroundColor,
1154
- color: e.value.style.chart.color,
1155
- isPrinting: C(Ye),
1156
- isImaging: C(We),
1157
- uid: F.value,
1158
- hasPdf: e.value.userOptions.buttons.pdf,
1159
- hasXls: e.value.userOptions.buttons.csv,
1160
- hasImg: e.value.userOptions.buttons.img,
1161
- hasSvg: e.value.userOptions.buttons.svg,
1162
- hasTable: e.value.userOptions.buttons.table,
1163
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
1164
- hasAltCopy: e.value.userOptions.buttons.altCopy,
1165
- isFullscreen: ae.value,
1166
- titles: { ...e.value.userOptions.buttonTitles },
1167
- chartElement: d.value,
1168
- position: e.value.userOptions.position,
1169
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
1170
- isTooltip: O.value.showTooltip,
1171
- hasAnnotator: e.value.userOptions.buttons.annotator,
1172
- isAnnotation: Ce.value,
1173
- callbacks: e.value.userOptions.callbacks,
1174
- printScale: e.value.userOptions.print.scale,
1175
- tableDialog: e.value.table.useDialog,
1176
- hasZoom: e.value.userOptions.buttons.zoom,
1177
- isZoom: O.value.showZoom,
1178
- isCursorPointer: N.value,
1179
- onToggleFullscreen: Ge,
1180
- onGeneratePdf: C(qe),
1181
- onGenerateCsv: De,
1182
- onGenerateImage: Et,
1183
- onGenerateSvg: nt,
1184
- onToggleTable: Ke,
1185
- onToggleTooltip: Je,
1186
- onToggleAnnotator: Ee,
1187
- onToggleZoom: Qe,
1188
- onCopyAlt: st,
1189
- style: Ae({
1190
- visibility: C(Te) ? C(ce) ? "visible" : "hidden" : "visible"
1191
- })
1192
- }, ut({ _: 2 }, [
1193
- t.$slots.menuIcon ? {
1194
- name: "menuIcon",
1195
- fn: A(({ isOpen: a, color: S }) => [
1196
- P(t.$slots, "menuIcon", V(_({ isOpen: a, color: S })), void 0, !0)
1197
- ]),
1198
- key: "0"
1199
- } : void 0,
1200
- t.$slots.optionPdf ? {
1201
- name: "optionPdf",
1202
- fn: A(() => [
1203
- P(t.$slots, "optionPdf", {}, void 0, !0)
1204
- ]),
1205
- key: "1"
1206
- } : void 0,
1207
- t.$slots.optionCsv ? {
1208
- name: "optionCsv",
1209
- fn: A(() => [
1210
- P(t.$slots, "optionCsv", {}, void 0, !0)
1211
- ]),
1212
- key: "2"
1213
- } : void 0,
1214
- t.$slots.optionImg ? {
1215
- name: "optionImg",
1216
- fn: A(() => [
1217
- P(t.$slots, "optionImg", {}, void 0, !0)
1218
- ]),
1219
- key: "3"
1220
- } : void 0,
1221
- t.$slots.optionSvg ? {
1222
- name: "optionSvg",
1223
- fn: A(() => [
1224
- P(t.$slots, "optionSvg", {}, void 0, !0)
1225
- ]),
1226
- key: "4"
1227
- } : void 0,
1228
- t.$slots.optionTable ? {
1229
- name: "optionTable",
1230
- fn: A(() => [
1231
- P(t.$slots, "optionTable", {}, void 0, !0)
1232
- ]),
1233
- key: "5"
1234
- } : void 0,
1235
- t.$slots.optionFullscreen ? {
1236
- name: "optionFullscreen",
1237
- fn: A(({ toggleFullscreen: a, isFullscreen: S }) => [
1238
- P(t.$slots, "optionFullscreen", V(_({ toggleFullscreen: a, isFullscreen: S })), void 0, !0)
1239
- ]),
1240
- key: "6"
1241
- } : void 0,
1242
- t.$slots.optionAnnotator ? {
1243
- name: "optionAnnotator",
1244
- fn: A(({ toggleAnnotator: a, isAnnotator: S }) => [
1245
- P(t.$slots, "optionAnnotator", V(_({ toggleAnnotator: a, isAnnotator: S })), void 0, !0)
1246
- ]),
1247
- key: "7"
1248
- } : void 0,
1249
- t.$slots.optionZoom ? {
1250
- name: "optionZoom",
1251
- fn: A(({ toggleZoom: a, isZoomLocked: S }) => [
1252
- P(t.$slots, "optionZoom", V(_({ toggleZoom: a, isZoomLocked: S })), void 0, !0)
1253
- ]),
1254
- key: "8"
1255
- } : void 0,
1256
- t.$slots.optionAltCopy ? {
1257
- name: "optionAltCopy",
1258
- fn: A(({ altCopy: a }) => [
1259
- P(t.$slots, "optionAltCopy", V(_({ altCopy: a })), void 0, !0)
1260
- ]),
1261
- key: "9"
1262
- } : void 0
1263
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "hasAltCopy", "isFullscreen", "titles", "chartElement", "position", "hasTooltip", "isTooltip", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "hasZoom", "isZoom", "isCursorPointer", "onGeneratePdf", "style"])) : L("", !0),
1264
- e.value.style.chart.controls.position === "top" && e.value.style.chart.controls.show && !C(ve) ? (Y(), se(ht, {
1265
- key: 3,
1266
- ref_key: "zoomControls",
1267
- ref: re,
1268
- config: e.value,
1269
- scale: C(tt),
1270
- isFullscreen: ae.value,
1271
- isCursorPointer: N.value,
1272
- onZoomIn: at,
1273
- onZoomOut: lt,
1274
- onResetZoom: y[0] || (y[0] = (a) => C(ke)(!0))
1275
- }, null, 8, ["config", "scale", "isFullscreen", "isCursorPointer"])) : L("", !0),
1276
- (Y(), K("svg", {
1277
- ref_key: "svgRef",
1278
- ref: oe,
1279
- class: rt({ "vue-data-ui-fullscreen--on": ae.value, "vue-data-ui-fulscreen--off": !ae.value }),
1280
- xmlns: C(no),
1281
- viewBox: `${C(Oe).x} ${C(Oe).y} ${C(Oe).width} ${C(Oe).height}`,
1282
- style: "overflow:hidden;background:transparent;display:block"
1283
- }, [
1284
- Be(C(f)),
1285
- t.$slots["chart-background"] ? (Y(), K("foreignObject", {
1286
- key: 0,
1287
- x: 0,
1288
- y: 0,
1289
- width: R.value.width <= 0 ? 10 : R.value.width,
1290
- height: R.value.height <= 0 ? 10 : R.value.height,
1291
- style: {
1292
- pointerEvents: "none"
1293
- }
1294
- }, [
1295
- P(t.$slots, "chart-background", {}, void 0, !0)
1296
- ], 8, Zo)) : L("", !0),
1297
- Xe("g", {
1298
- transform: `translate(${ye.value.x}, ${ye.value.y})`,
1299
- class: rt({ "wc-finalized": ie.value })
1300
- }, [
1301
- (Y(!0), K(Lt, null, qt(U.value, (a, S) => (Y(), K("g", {
1302
- key: a.id,
1303
- class: "vue-ui-word-cloud-word",
1304
- transform: `translate(${a.x}, ${a.y})`
1305
- }, [
1306
- a.minX !== void 0 ? (Y(), K("rect", {
1307
- key: 0,
1308
- x: a.minX,
1309
- y: a.minY * 1.25,
1310
- width: a.maxX - a.minX,
1311
- height: a.maxY - a.minY,
1312
- fill: "transparent",
1313
- "pointer-events": "visiblePainted",
1314
- onMouseover: (T) => Bt(a, S),
1315
- onMouseleave: (T) => Nt(a, S),
1316
- onClick: (T) => Zt(a, S)
1317
- }, null, 40, _o)) : L("", !0),
1318
- Xe("text", {
1319
- fill: a.color,
1320
- "font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
1321
- x: 0,
1322
- y: 0,
1323
- "font-size": a.fontSize,
1324
- transform: `translate(${a.width / 2}, ${a.height / 2})`,
1325
- "text-anchor": "middle",
1326
- "dominant-baseline": "central",
1327
- "paint-order": "stroke fill",
1328
- stroke: !he.value || he.value === a.id ? e.value.style.chart.words.selectedStroke : void 0,
1329
- "stroke-width": a.height * 0.05,
1330
- "stroke-linecap": "round",
1331
- "stroke-linejoin": "round",
1332
- style: Ae(`
1333
- pointer-events:none;
1334
- fill-opacity:${!he.value || he.value === a.id || !ie.value ? 1 : e.value.style.chart.words.hoverOpacity} !important;
1335
- `)
1336
- }, Ve(a.name), 13, Uo)
1337
- ], 8, Vo))), 128))
1338
- ], 10, Bo),
1339
- P(t.$slots, "svg", {
1340
- svg: {
1341
- ...R.value,
1342
- isPrintingImg: C(Ye) | C(We) | H.value,
1343
- isPrintingSvg: q.value
1344
- }
1345
- }, void 0, !0)
1346
- ], 10, No)),
1347
- t.$slots.watermark ? (Y(), K("div", Lo, [
1348
- P(t.$slots, "watermark", V(_({ isPrinting: C(Ye) || C(We) || H.value || q.value })), void 0, !0)
1349
- ])) : L("", !0),
1350
- C(At) ? (Y(), K("div", qo, [
1351
- P(t.$slots, "reset-action", { reset: C(ke) }, void 0, !0)
1352
- ])) : L("", !0),
1353
- e.value.style.chart.controls.position === "bottom" && e.value.style.chart.controls.show && !C(ve) ? (Y(), se(ht, {
1354
- key: 6,
1355
- ref_key: "zoomControls",
1356
- ref: re,
1357
- config: e.value,
1358
- scale: C(tt),
1359
- isFullscreen: ae.value,
1360
- isCursorPointer: N.value,
1361
- onZoomIn: at,
1362
- onZoomOut: lt,
1363
- onResetZoom: y[1] || (y[1] = (a) => C(ke)(!0))
1364
- }, null, 8, ["config", "scale", "isFullscreen", "isCursorPointer"])) : L("", !0),
1365
- Be(C(c), {
1366
- teleportTo: e.value.style.chart.tooltip.teleportTo,
1367
- show: O.value.showTooltip && X.value,
1368
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1369
- color: e.value.style.chart.tooltip.color,
1370
- fontSize: e.value.style.chart.tooltip.fontSize,
1371
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1372
- borderColor: e.value.style.chart.tooltip.borderColor,
1373
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1374
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1375
- position: e.value.style.chart.tooltip.position,
1376
- offsetY: e.value.style.chart.tooltip.offsetY,
1377
- parent: d.value,
1378
- content: Ne.value,
1379
- isCustom: Se.value,
1380
- isFullscreen: ae.value,
1381
- smooth: e.value.style.chart.tooltip.smooth,
1382
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1383
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1384
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1385
- }, {
1386
- "tooltip-before": A(() => [
1387
- P(t.$slots, "tooltip-before", V(_({ ...Ze.value })), void 0, !0)
1388
- ]),
1389
- "tooltip-after": A(() => [
1390
- P(t.$slots, "tooltip-after", V(_({ ...Ze.value })), void 0, !0)
1391
- ]),
1392
- _: 3
1393
- }, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1394
- t.$slots.source ? (Y(), K("div", {
1395
- key: 7,
1396
- ref_key: "source",
1397
- ref: Z,
1398
- dir: "auto"
1399
- }, [
1400
- P(t.$slots, "source", {}, void 0, !0)
1401
- ], 512)) : L("", !0),
1402
- $.value && e.value.userOptions.buttons.table ? (Y(), se(Ht(Fe.value.component), jt({ key: 8 }, Fe.value.props, {
1403
- ref_key: "tableUnit",
1404
- ref: B,
1405
- onClose: ot
1406
- }), ut({
1407
- content: A(() => [
1408
- (Y(), se(C(i), {
1409
- key: `table_${D.value}`,
1410
- colNames: Pe.value.colNames,
1411
- head: Pe.value.head,
1412
- body: Pe.value.body,
1413
- config: Pe.value.config,
1414
- title: e.value.table.useDialog ? "" : Fe.value.title,
1415
- withCloseButton: !e.value.table.useDialog,
1416
- isCursorPointer: N.value,
1417
- onClose: ot
1418
- }, {
1419
- th: A(({ th: a }) => [
1420
- Xe("div", {
1421
- innerHTML: a,
1422
- style: { display: "flex", "align-items": "center" }
1423
- }, null, 8, Ho)
1424
- ]),
1425
- td: A(({ td: a }) => [
1426
- ct(Ve(a.name || a), 1)
1427
- ]),
1428
- _: 1
1429
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
1430
- ]),
1431
- _: 2
1432
- }, [
1433
- e.value.table.useDialog ? {
1434
- name: "title",
1435
- fn: A(() => [
1436
- ct(Ve(Fe.value.title), 1)
1437
- ]),
1438
- key: "0"
1439
- } : void 0,
1440
- e.value.table.useDialog ? {
1441
- name: "actions",
1442
- fn: A(() => [
1443
- Xe("button", {
1444
- tabindex: "0",
1445
- class: "vue-ui-user-options-button",
1446
- onClick: y[2] || (y[2] = (a) => De(e.value.userOptions.callbacks.csv)),
1447
- style: Ae({ cursor: N.value ? "pointer" : "default" })
1448
- }, [
1449
- Be(C(r), {
1450
- name: "fileCsv",
1451
- stroke: Fe.value.props.color
1452
- }, null, 8, ["stroke"])
1453
- ], 4)
1454
- ]),
1455
- key: "1"
1456
- } : void 0
1457
- ]), 1040)) : L("", !0),
1458
- P(t.$slots, "skeleton", {}, () => [
1459
- C(ve) ? (Y(), se(ro, { key: 0 })) : L("", !0)
1460
- ], !0)
1461
- ], 44, Eo));
1462
- }
1463
- }, fn = /* @__PURE__ */ wo(jo, [["__scopeId", "data-v-ed7a2652"]]);
1464
- export {
1465
- fn as default
1466
- };