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