vue-data-ui 3.16.3 → 3.16.5
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/dist/{PackageVersion-DTMK4Sxp.js → PackageVersion-CvtT2-UH.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.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-kpi.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-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-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-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.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{vue-data-ui-aaiQyff_.js → vue-data-ui-XhJQD-ri.js} +60 -60
- package/dist/vue-data-ui.js +60 -60
- package/dist/{vue-ui-3d-bar-6Orm7dBW.js → vue-ui-3d-bar-BhzRmNak.js} +1 -1
- package/dist/{vue-ui-age-pyramid-BBhea9rK.js → vue-ui-age-pyramid-CZCn6OMX.js} +1 -1
- package/dist/{vue-ui-bullet-BkehDcCq.js → vue-ui-bullet-BRyBDt56.js} +1 -1
- package/dist/{vue-ui-bump-Blrjd7uJ.js → vue-ui-bump-Dulq2vNg.js} +1 -1
- package/dist/{vue-ui-candlestick-6Op5ajNE.js → vue-ui-candlestick-BJD25FJV.js} +1 -1
- package/dist/{vue-ui-carousel-table-FnDUTYU9.js → vue-ui-carousel-table-DCHtRFDV.js} +1 -1
- package/dist/{vue-ui-chestnut-BXlDXANA.js → vue-ui-chestnut-46054xSO.js} +1 -1
- package/dist/{vue-ui-chord-BFjsmQrI.js → vue-ui-chord-CSdFVJx2.js} +1 -1
- package/dist/{vue-ui-circle-pack-CTaG4Sjw.js → vue-ui-circle-pack-CmPyW4rp.js} +1 -1
- package/dist/{vue-ui-cursor-C60X0cfA.js → vue-ui-cursor-QZjpAemm.js} +1 -1
- package/dist/{vue-ui-dag-BjaYW6LU.js → vue-ui-dag-C051dx6c.js} +1 -1
- package/dist/{vue-ui-dashboard-8yFAKIdS.js → vue-ui-dashboard-zCwCXCfe.js} +57 -57
- package/dist/{vue-ui-digits-CFqwcQDp.js → vue-ui-digits-HPy7kRgm.js} +1 -1
- package/dist/{vue-ui-donut-CcXMIU5e.js → vue-ui-donut-DxOwX8nC.js} +1 -1
- package/dist/{vue-ui-donut-evolution-D_dHDull.js → vue-ui-donut-evolution-KD1WwwLS.js} +1 -1
- package/dist/{vue-ui-dumbbell-CuRrHdyZ.js → vue-ui-dumbbell-0BJ1t72z.js} +1 -1
- package/dist/{vue-ui-flow-CUL8n2QX.js → vue-ui-flow-lPRZK-_Q.js} +1 -1
- package/dist/{vue-ui-funnel-WyskZmfo.js → vue-ui-funnel-WJG6UU4c.js} +1 -1
- package/dist/{vue-ui-galaxy-CE2uP4Sh.js → vue-ui-galaxy-Cnqgwc0G.js} +1 -1
- package/dist/{vue-ui-gauge--c7HiLxL.js → vue-ui-gauge-BXFwr3H7.js} +1 -1
- package/dist/{vue-ui-geo-B2wXUa-9.js → vue-ui-geo-DeYdEiHT.js} +1 -1
- package/dist/{vue-ui-gizmo-UXGGCMcf.js → vue-ui-gizmo-C0-M2WoG.js} +1 -1
- package/dist/{vue-ui-heatmap-D8oeN8E_.js → vue-ui-heatmap-DctMvoRr.js} +1 -1
- package/dist/{vue-ui-history-plot-Cfxm9Baf.js → vue-ui-history-plot-sLaCn8jd.js} +1 -1
- package/dist/{vue-ui-horizontal-bar-C5iWeO6u.js → vue-ui-horizontal-bar-reisxCWX.js} +1 -1
- package/dist/{vue-ui-kpi-B8PqMSoW.js → vue-ui-kpi-z3S4DcoQ.js} +1 -1
- package/dist/{vue-ui-molecule-D3_zGag1.js → vue-ui-molecule-CQEaLq9E.js} +1 -1
- package/dist/{vue-ui-mood-radar-AjtdTfsY.js → vue-ui-mood-radar-BGIt_k-N.js} +1 -1
- package/dist/{vue-ui-nested-donuts-CufH58ng.js → vue-ui-nested-donuts-BxXAWrhM.js} +1 -1
- package/dist/{vue-ui-onion-BZHbTiT3.js → vue-ui-onion-CMKIYAuh.js} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-7MLMSc7M.js → vue-ui-parallel-coordinate-plot-Tb8aJ91r.js} +1 -1
- package/dist/{vue-ui-quadrant-CUd64mux.js → vue-ui-quadrant-CLAqGLQH.js} +1 -1
- package/dist/{vue-ui-quick-chart-DtWig7op.js → vue-ui-quick-chart-BK2SOFv9.js} +1 -1
- package/dist/{vue-ui-radar-3DZlLt0W.js → vue-ui-radar-BY7vIWHL.js} +1 -1
- package/dist/{vue-ui-relation-circle-DtNVikp0.js → vue-ui-relation-circle-BlUbhTZ5.js} +1 -1
- package/dist/{vue-ui-ridgeline-yE_vP2VB.js → vue-ui-ridgeline-Bsfw_4y_.js} +1 -1
- package/dist/{vue-ui-rings-0cvfKey4.js → vue-ui-rings-BaORhzZH.js} +1 -1
- package/dist/{vue-ui-scatter-Bxlj4PyZ.js → vue-ui-scatter-D8afRw4d.js} +1 -1
- package/dist/{vue-ui-skeleton-C4KjaDNQ.js → vue-ui-skeleton-BE5ADLxq.js} +1 -1
- package/dist/{vue-ui-spark-trend-C46YfT0J.js → vue-ui-spark-trend-C2QdubPf.js} +1 -1
- package/dist/{vue-ui-sparkbar-9jlaVtT1.js → vue-ui-sparkbar-BxP_TDR3.js} +1 -1
- package/dist/{vue-ui-sparkgauge-D9_fYGM6.js → vue-ui-sparkgauge-CgHAoaeu.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-DF8y017b.js → vue-ui-sparkhistogram-0m7QAV93.js} +1 -1
- package/dist/{vue-ui-sparkline-C4mZ6GmQ.js → vue-ui-sparkline-DNt9nHQ9.js} +569 -557
- package/dist/{vue-ui-sparkstackbar-D7AGReBK.js → vue-ui-sparkstackbar-RU8zQLfe.js} +1 -1
- package/dist/{vue-ui-stackbar-CWseWooY.js → vue-ui-stackbar-C3qGXmTQ.js} +1 -1
- package/dist/{vue-ui-stackline-CCHtER37.js → vue-ui-stackline-W24y7z12.js} +1 -1
- package/dist/{vue-ui-strip-plot-d6DjlkDf.js → vue-ui-strip-plot--MWxAM0R.js} +1 -1
- package/dist/{vue-ui-table-BucTndCA.js → vue-ui-table-BtkypjfT.js} +2 -2
- package/dist/{vue-ui-table-sparkline-BqYyMreS.js → vue-ui-table-sparkline-DKbkhX_x.js} +1 -1
- package/dist/{vue-ui-thermometer-eGZo5cfd.js → vue-ui-thermometer-qaGYZUMd.js} +1 -1
- package/dist/{vue-ui-timer-CZNtC31b.js → vue-ui-timer-CpQYSD-K.js} +1 -1
- package/dist/{vue-ui-tiremarks-DLdAn9OG.js → vue-ui-tiremarks-CUiSLMlj.js} +1 -1
- package/dist/{vue-ui-treemap-aXYya4cc.js → vue-ui-treemap-CMfWyA5N.js} +1 -1
- package/dist/{vue-ui-waffle-DZTSuhOI.js → vue-ui-waffle-H02mH3Rc.js} +1 -1
- package/dist/{vue-ui-wheel-DuuDKbZ8.js → vue-ui-wheel-agcFNYTs.js} +1 -1
- package/dist/{vue-ui-word-cloud-CD4r9vs5.js → vue-ui-word-cloud-B0fNWUVr.js} +1 -1
- package/dist/{vue-ui-world-DzllEOCk.js → vue-ui-world-B8mANOO8.js} +1 -1
- package/dist/{vue-ui-xy-tirrubIL.js → vue-ui-xy-DgyEEqnJ.js} +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { j as
|
|
3
|
-
import { t as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import
|
|
12
|
-
import { A as
|
|
13
|
-
import { _ as
|
|
14
|
-
const
|
|
1
|
+
import { computed as g, watch as z, nextTick as te, onBeforeUnmount as ot, openBlock as f, createElementBlock as y, Fragment as Z, renderList as ge, createElementVNode as M, createCommentVNode as _, ref as L, defineAsyncComponent as mt, toRefs as qt, shallowRef as bt, onMounted as kt, watchEffect as Gt, normalizeStyle as H, toDisplayString as Le, createBlock as _e, renderSlot as pe, normalizeProps as Ze, guardReactiveProps as Je, unref as b, createVNode as Ot, withCtx as jt, createTextVNode as zt } from "vue";
|
|
2
|
+
import { j as Yt, t as wt, aD as Qe, o as xt, q as $t, r as Xt, v as Ve, Y as Kt, ap as Ut, c as St, b as Ht, O as Zt, N as Jt, s as Qt, X as ea, u as We, V as ta, G as Mt, k as et, l as tt, aE as aa } from "./lib-DBptbyyI.js";
|
|
3
|
+
import { t as la, u as na } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as ra } from "./useConfig-CpJA0VZa.js";
|
|
5
|
+
import { u as ua, B as oa } from "./BaseScanner-BhhkKVoj.js";
|
|
6
|
+
import { u as at } from "./useNestedProp-Bf5XFbs8.js";
|
|
7
|
+
import { u as sa } from "./useThemeCheck-D1ZYXUwG.js";
|
|
8
|
+
import { u as ia } from "./useTimeLabels-C-A2uZKi.js";
|
|
9
|
+
import { u as da } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import { u as ca } from "./usePrefersMotion-CUKm8_t8.js";
|
|
11
|
+
import va from "./vue_ui_sparkline-CQ8DJVJx.js";
|
|
12
|
+
import { A as ha } from "./A11yDataTable-KcVAX2cP.js";
|
|
13
|
+
import { _ as fa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const pa = {
|
|
15
15
|
key: 0,
|
|
16
16
|
style: { "pointer-events": "none" }
|
|
17
|
-
},
|
|
17
|
+
}, ga = ["r", "fill", "filter"], ya = ["begin", "dur", "repeatCount", "fill", "calcMode", "keySplines", "keyTimes", "keyPoints"], ma = ["href"], ba = ["dur", "repeatCount", "fill", "values"], ka = ["r", "fill"], wa = ["begin", "dur", "repeatCount", "calcMode", "keySplines", "keyTimes", "keyPoints"], xa = ["href"], $a = ["dur", "repeatCount"], Sa = {
|
|
18
18
|
__name: "SparklinePulse",
|
|
19
19
|
props: {
|
|
20
20
|
uid: { type: String, required: !0 },
|
|
@@ -35,24 +35,24 @@ const ha = {
|
|
|
35
35
|
isBar: { type: Boolean, required: !0 }
|
|
36
36
|
},
|
|
37
37
|
setup(e) {
|
|
38
|
-
const a = e, n =
|
|
38
|
+
const a = e, n = g(() => Math.min(a.pulseTrailLength, 45)), s = g(() => !!a.pulse?.show && !a.isBar && !a.prefersReducedMotion && !a.loading && Number(a.pulsePathLength) > 0);
|
|
39
39
|
function o() {
|
|
40
40
|
const i = a.svgRef?.value;
|
|
41
41
|
i && (typeof i.pauseAnimations == "function" && i.pauseAnimations(), typeof i.setCurrentTime == "function" && i.setCurrentTime(0), typeof i.unpauseAnimations == "function" && i.unpauseAnimations());
|
|
42
42
|
}
|
|
43
|
-
function d(i,
|
|
43
|
+
function d(i, S) {
|
|
44
44
|
if (typeof i != "string") return i;
|
|
45
45
|
const v = i.trim().match(/^([\d.]+)\s*(ms|s)$/);
|
|
46
46
|
if (!v) return i;
|
|
47
|
-
const
|
|
48
|
-
return Number.isNaN(
|
|
47
|
+
const x = Number(v[1]), I = v[2];
|
|
48
|
+
return Number.isNaN(x) ? i : `${x + S}${I}`;
|
|
49
49
|
}
|
|
50
50
|
function h(i) {
|
|
51
51
|
return (n.value - i) / n.value * a.pulse.radius;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const
|
|
55
|
-
return `0;${
|
|
53
|
+
function m(i) {
|
|
54
|
+
const S = a.pulse.trail.opacity, v = (n.value - i) / n.value, x = i === 0 ? 1 : v * S;
|
|
55
|
+
return `0;${x};${x};0`;
|
|
56
56
|
}
|
|
57
57
|
return z(
|
|
58
58
|
() => a.loading,
|
|
@@ -68,19 +68,19 @@ const ha = {
|
|
|
68
68
|
async () => {
|
|
69
69
|
await te(), o();
|
|
70
70
|
}
|
|
71
|
-
),
|
|
71
|
+
), ot(() => {
|
|
72
72
|
o();
|
|
73
|
-
}), (i,
|
|
74
|
-
(f(!0),
|
|
75
|
-
|
|
76
|
-
key: `sparkline_dot_${
|
|
77
|
-
r: h(
|
|
73
|
+
}), (i, S) => s.value ? (f(), y("g", pa, [
|
|
74
|
+
(f(!0), y(Z, null, ge(n.value, (v, x) => (f(), y(Z, null, [
|
|
75
|
+
x % 3 === 0 ? (f(), y("circle", {
|
|
76
|
+
key: `sparkline_dot_${x}_${e.pulsePathId}`,
|
|
77
|
+
r: h(x),
|
|
78
78
|
fill: e.pulse.color,
|
|
79
79
|
filter: `url(#sparkline_pulse_glow_${e.uid})`,
|
|
80
80
|
opacity: "0"
|
|
81
81
|
}, [
|
|
82
|
-
|
|
83
|
-
begin: d(e.pulseBegin,
|
|
82
|
+
M("animateMotion", {
|
|
83
|
+
begin: d(e.pulseBegin, x * 10),
|
|
84
84
|
dur: e.pulseDur,
|
|
85
85
|
repeatCount: e.pulseRepeatCount,
|
|
86
86
|
fill: e.pulseFillMode,
|
|
@@ -90,27 +90,27 @@ const ha = {
|
|
|
90
90
|
keyPoints: e.pulseKeyPoints,
|
|
91
91
|
rotate: "auto"
|
|
92
92
|
}, [
|
|
93
|
-
|
|
93
|
+
M("mpath", {
|
|
94
94
|
href: `#${e.pulsePathId}`
|
|
95
|
-
}, null, 8,
|
|
96
|
-
], 8,
|
|
97
|
-
|
|
95
|
+
}, null, 8, ma)
|
|
96
|
+
], 8, ya),
|
|
97
|
+
M("animate", {
|
|
98
98
|
attributeName: "opacity",
|
|
99
99
|
dur: e.pulseDur,
|
|
100
100
|
repeatCount: e.pulseRepeatCount,
|
|
101
101
|
fill: e.pulseFillMode,
|
|
102
|
-
values:
|
|
102
|
+
values: m(x),
|
|
103
103
|
keyTimes: "0;0.1;0.9;1"
|
|
104
|
-
}, null, 8,
|
|
105
|
-
], 8,
|
|
104
|
+
}, null, 8, ba)
|
|
105
|
+
], 8, ga)) : _("", !0)
|
|
106
106
|
], 64))), 256)),
|
|
107
|
-
(f(),
|
|
107
|
+
(f(), y("circle", {
|
|
108
108
|
key: `sparkline_halo_${e.pulsePathId}`,
|
|
109
109
|
r: Math.max(e.pulse.radius * 1.3),
|
|
110
110
|
fill: e.pulse.color,
|
|
111
111
|
opacity: "0"
|
|
112
112
|
}, [
|
|
113
|
-
|
|
113
|
+
M("animateMotion", {
|
|
114
114
|
begin: e.pulseBegin,
|
|
115
115
|
dur: e.pulseDur,
|
|
116
116
|
repeatCount: e.pulseRepeatCount,
|
|
@@ -120,95 +120,95 @@ const ha = {
|
|
|
120
120
|
keyPoints: e.pulseKeyPoints,
|
|
121
121
|
rotate: "auto"
|
|
122
122
|
}, [
|
|
123
|
-
|
|
123
|
+
M("mpath", {
|
|
124
124
|
href: `#${e.pulsePathId}`
|
|
125
|
-
}, null, 8,
|
|
126
|
-
], 8,
|
|
127
|
-
|
|
125
|
+
}, null, 8, xa)
|
|
126
|
+
], 8, wa),
|
|
127
|
+
M("animate", {
|
|
128
128
|
attributeName: "opacity",
|
|
129
129
|
values: "0;0.35;0.35;0",
|
|
130
130
|
keyTimes: "0;0.15;0.85;1",
|
|
131
131
|
dur: e.pulseDur,
|
|
132
132
|
repeatCount: e.pulseRepeatCount
|
|
133
|
-
}, null, 8,
|
|
134
|
-
], 8,
|
|
135
|
-
])) :
|
|
133
|
+
}, null, 8, $a)
|
|
134
|
+
], 8, ka))
|
|
135
|
+
])) : _("", !0);
|
|
136
136
|
}
|
|
137
|
-
},
|
|
137
|
+
}, qe = {
|
|
138
138
|
canvas: null,
|
|
139
139
|
ctx: null
|
|
140
140
|
};
|
|
141
|
-
function
|
|
141
|
+
function Ma() {
|
|
142
142
|
if (typeof document > "u")
|
|
143
143
|
throw new Error("color-utils: document is not available (browser-only).");
|
|
144
|
-
if (!
|
|
144
|
+
if (!qe.canvas) {
|
|
145
145
|
const e = document.createElement("canvas");
|
|
146
146
|
e.width = 1, e.height = 1;
|
|
147
147
|
const a = e.getContext("2d", { willReadFrequently: !0 });
|
|
148
148
|
if (!a)
|
|
149
149
|
throw new Error("color-utils: unable to get 2D canvas context.");
|
|
150
|
-
|
|
150
|
+
qe.canvas = e, qe.ctx = a;
|
|
151
151
|
}
|
|
152
|
-
return
|
|
152
|
+
return qe.ctx;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Aa(e) {
|
|
155
155
|
return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function it(e) {
|
|
158
158
|
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Ca(e, a = null) {
|
|
161
161
|
if (typeof e != "string" || e.trim().length === 0)
|
|
162
162
|
throw new Error("colorToRgba: inputColor must be a non-empty string.");
|
|
163
163
|
const n = e.trim();
|
|
164
164
|
if (n.toLowerCase() === "transparent")
|
|
165
165
|
return { red: 0, green: 0, blue: 0, alpha: 0 };
|
|
166
|
-
const s =
|
|
166
|
+
const s = La(n, a), o = Ma();
|
|
167
167
|
o.clearRect(0, 0, 1, 1), o.fillStyle = "#000";
|
|
168
168
|
const d = o.fillStyle;
|
|
169
|
-
if (o.fillStyle = s, o.fillStyle === d && !
|
|
169
|
+
if (o.fillStyle = s, o.fillStyle === d && !_a(s))
|
|
170
170
|
throw new Error(`colorToRgba: unsupported or invalid color "${e}".`);
|
|
171
171
|
o.fillRect(0, 0, 1, 1);
|
|
172
|
-
const
|
|
172
|
+
const m = o.getImageData(0, 0, 1, 1).data;
|
|
173
173
|
return {
|
|
174
|
-
red:
|
|
175
|
-
green:
|
|
176
|
-
blue:
|
|
177
|
-
alpha:
|
|
174
|
+
red: m[0],
|
|
175
|
+
green: m[1],
|
|
176
|
+
blue: m[2],
|
|
177
|
+
alpha: m[3] / 255
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function At(e, a = null) {
|
|
181
181
|
if (!Array.isArray(e) || e.length === 0)
|
|
182
182
|
throw new Error("colorsToRgba: colors must be a non-empty array.");
|
|
183
183
|
const n = new Array(e.length);
|
|
184
184
|
for (let s = 0; s < e.length; s += 1)
|
|
185
|
-
n[s] =
|
|
185
|
+
n[s] = Ca(e[s], a);
|
|
186
186
|
return n;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function La(e, a = null) {
|
|
189
189
|
return e !== "currentColor" || typeof window > "u" || !a ? e : window.getComputedStyle(a).color || e;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function _a(e) {
|
|
192
192
|
const a = e.trim().toLowerCase();
|
|
193
193
|
return a === "black" || a === "#000" || a === "#000000" || a === "rgb(0, 0, 0)" || a === "rgba(0, 0, 0, 1)" || a === "rgba(0, 0, 0, 0)";
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
const a =
|
|
195
|
+
function xe(e) {
|
|
196
|
+
const a = it(e / 255);
|
|
197
197
|
return a <= 0.04045 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4);
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
const a =
|
|
199
|
+
function lt(e) {
|
|
200
|
+
const a = it(e);
|
|
201
201
|
let n;
|
|
202
|
-
return a <= 31308e-7 ? n = a * 12.92 : n = 1.055 * Math.pow(a, 1 / 2.4) - 0.055,
|
|
202
|
+
return a <= 31308e-7 ? n = a * 12.92 : n = 1.055 * Math.pow(a, 1 / 2.4) - 0.055, Aa(n * 255);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
const o =
|
|
204
|
+
function Ct(e, a, n, s) {
|
|
205
|
+
const o = it(n);
|
|
206
206
|
if (s === "linearRGB") {
|
|
207
|
-
const d =
|
|
207
|
+
const d = xe(e.red), h = xe(e.green), m = xe(e.blue), i = xe(a.red), S = xe(a.green), v = xe(a.blue), x = d + (i - d) * o, I = h + (S - h) * o, B = m + (v - m) * o;
|
|
208
208
|
return {
|
|
209
|
-
red:
|
|
210
|
-
green:
|
|
211
|
-
blue:
|
|
209
|
+
red: lt(x),
|
|
210
|
+
green: lt(I),
|
|
211
|
+
blue: lt(B),
|
|
212
212
|
alpha: e.alpha + (a.alpha - e.alpha) * o
|
|
213
213
|
};
|
|
214
214
|
}
|
|
@@ -227,41 +227,41 @@ function ae(e, a) {
|
|
|
227
227
|
const n = Math.pow(10, a);
|
|
228
228
|
return Math.round(e * n) / n;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function ie(e) {
|
|
231
231
|
return Number.isFinite(e) ? e.toString() : "0";
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function nt(e) {
|
|
234
234
|
const n = j(e, 0, 255).toString(16);
|
|
235
235
|
return n.length === 1 ? "0" + n : n;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Pa(e) {
|
|
238
238
|
if (typeof e != "string") return;
|
|
239
239
|
const a = Number.parseFloat(e);
|
|
240
240
|
return Number.isFinite(a) ? a : void 0;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Na(e, a, n, s = !0) {
|
|
243
243
|
const o = n - a;
|
|
244
244
|
if (o === 0) return 0;
|
|
245
245
|
const d = (e - a) / o;
|
|
246
246
|
return s ? j(d, 0, 1) : d;
|
|
247
247
|
}
|
|
248
|
-
const
|
|
249
|
-
function
|
|
248
|
+
const Lt = "http://www.w3.org/2000/svg";
|
|
249
|
+
function Ia(e) {
|
|
250
250
|
if (typeof document > "u")
|
|
251
251
|
throw new Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
|
|
252
|
-
const a = document.createElementNS(
|
|
252
|
+
const a = document.createElementNS(Lt, "svg");
|
|
253
253
|
a.setAttribute("width", "0"), a.setAttribute("height", "0"), a.setAttribute("viewBox", "0 0 0 0"), a.style.position = "absolute", a.style.left = "-10000px", a.style.top = "-10000px", a.style.visibility = "hidden", a.style.pointerEvents = "none";
|
|
254
|
-
const n = document.createElementNS(
|
|
254
|
+
const n = document.createElementNS(Lt, "path");
|
|
255
255
|
return e === "M " && (e = "M 0,0"), n.setAttribute("d", e), a.appendChild(n), document.body.appendChild(a), { svgElement: a, pathElement: n };
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function rt(e) {
|
|
258
258
|
if (e)
|
|
259
259
|
try {
|
|
260
260
|
e.svgElement?.remove?.();
|
|
261
261
|
} catch {
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function Ta(e, a, n) {
|
|
265
265
|
if (typeof n == "number" && n > 0)
|
|
266
266
|
return n;
|
|
267
267
|
let s = a * 0.75;
|
|
@@ -269,70 +269,70 @@ function Na(e, a, n) {
|
|
|
269
269
|
const o = e / 2;
|
|
270
270
|
return s > o && o > 0 && (s = o), s <= 0 && (s = 1), s;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Ra(e, a, n) {
|
|
273
273
|
if (typeof a == "number" && a >= 1)
|
|
274
274
|
return Math.floor(a);
|
|
275
275
|
const s = typeof n == "number" && n > 0 ? n : 2, o = Math.ceil(e / s);
|
|
276
276
|
return o < 1 ? 1 : o;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Ba(e, a, n, s, o, d) {
|
|
279
279
|
const h = n - a;
|
|
280
|
-
let
|
|
281
|
-
|
|
282
|
-
const i =
|
|
283
|
-
let v = `M ${
|
|
284
|
-
ae(
|
|
280
|
+
let m = Math.ceil(h / s) + 1;
|
|
281
|
+
m < 2 && (m = 2), m > d && (m = d);
|
|
282
|
+
const i = m > 1 ? h / (m - 1) : 0, S = e.getPointAtLength(a);
|
|
283
|
+
let v = `M ${ie(ae(S.x, o))} ${ie(
|
|
284
|
+
ae(S.y, o)
|
|
285
285
|
)}`;
|
|
286
|
-
for (let
|
|
287
|
-
const
|
|
288
|
-
v += ` L ${
|
|
289
|
-
ae(
|
|
286
|
+
for (let x = 1; x < m; x += 1) {
|
|
287
|
+
const I = a + x * i, B = e.getPointAtLength(I);
|
|
288
|
+
v += ` L ${ie(ae(B.x, o))} ${ie(
|
|
289
|
+
ae(B.y, o)
|
|
290
290
|
)}`;
|
|
291
291
|
}
|
|
292
292
|
return v;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Da(e, a, n, s, o, d) {
|
|
295
295
|
const h = n - a;
|
|
296
|
-
let
|
|
297
|
-
|
|
298
|
-
const i =
|
|
299
|
-
let v =
|
|
300
|
-
ae(
|
|
296
|
+
let m = Math.ceil(h / s) + 1;
|
|
297
|
+
m < 2 && (m = 2), m > d && (m = d);
|
|
298
|
+
const i = m > 1 ? h / (m - 1) : 0, S = e.getPointAtLength(a);
|
|
299
|
+
let v = S.x, x = S.x, I = S.y, B = S.y, E = `M ${ie(ae(S.x, o))} ${ie(
|
|
300
|
+
ae(S.y, o)
|
|
301
301
|
)}`;
|
|
302
|
-
for (let
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
ae(
|
|
302
|
+
for (let A = 1; A < m; A += 1) {
|
|
303
|
+
const t = a + A * i, F = e.getPointAtLength(t);
|
|
304
|
+
F.x < v && (v = F.x), F.x > x && (x = F.x), F.y < I && (I = F.y), F.y > B && (B = F.y), E += ` L ${ie(ae(F.x, o))} ${ie(
|
|
305
|
+
ae(F.y, o)
|
|
306
306
|
)}`;
|
|
307
307
|
}
|
|
308
308
|
return {
|
|
309
|
-
pathData:
|
|
310
|
-
bounds: { minX: v, maxX:
|
|
309
|
+
pathData: E,
|
|
310
|
+
bounds: { minX: v, maxX: x, minY: I, maxY: B }
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function Ea(e) {
|
|
314
314
|
if (e.length === 1) return [{ position: 0, rgba: e[0] }];
|
|
315
315
|
const a = new Array(e.length), n = e.length - 1;
|
|
316
316
|
for (let s = 0; s < e.length; s += 1)
|
|
317
317
|
a[s] = { position: s / n, rgba: e[s] };
|
|
318
318
|
return a;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Fa(e, a, n, s) {
|
|
321
321
|
const o = j(a, 0, 1);
|
|
322
322
|
let d = s;
|
|
323
323
|
for (d < 0 && (d = 0), d > e.length - 2 && (d = e.length - 2); d > 0 && o < e[d].position; ) d -= 1;
|
|
324
324
|
for (; d < e.length - 2 && o > e[d + 1].position; ) d += 1;
|
|
325
|
-
const h = e[d],
|
|
326
|
-
return
|
|
325
|
+
const h = e[d], m = e[d + 1], i = m.position - h.position, S = i > 0 ? (o - h.position) / i : 0, v = Va(h.rgba, m.rgba, S, n);
|
|
326
|
+
return st(v);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Va(e, a, n, s) {
|
|
329
329
|
const o = j(n, 0, 1);
|
|
330
330
|
if (s === "linearRGB") {
|
|
331
|
-
const d =
|
|
331
|
+
const d = $e(e.red), h = $e(e.green), m = $e(e.blue), i = $e(a.red), S = $e(a.green), v = $e(a.blue), x = d + (i - d) * o, I = h + (S - h) * o, B = m + (v - m) * o;
|
|
332
332
|
return {
|
|
333
|
-
red:
|
|
334
|
-
green:
|
|
335
|
-
blue:
|
|
333
|
+
red: ut(x),
|
|
334
|
+
green: ut(I),
|
|
335
|
+
blue: ut(B),
|
|
336
336
|
alpha: e.alpha + (a.alpha - e.alpha) * o
|
|
337
337
|
};
|
|
338
338
|
}
|
|
@@ -343,25 +343,25 @@ function Ea(e, a, n, s) {
|
|
|
343
343
|
alpha: e.alpha + (a.alpha - e.alpha) * o
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function $e(e) {
|
|
347
347
|
const a = j(e / 255, 0, 1);
|
|
348
348
|
return a <= 0.04045 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function ut(e) {
|
|
351
351
|
const a = j(e, 0, 1);
|
|
352
352
|
let n;
|
|
353
353
|
a <= 31308e-7 ? n = a * 12.92 : n = 1.055 * Math.pow(a, 1 / 2.4) - 0.055;
|
|
354
354
|
const s = Math.round(n * 255);
|
|
355
355
|
return j(s, 0, 255);
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function st(e) {
|
|
358
358
|
const a = j(e.alpha, 0, 1), n = j(Math.round(e.red), 0, 255), s = j(Math.round(e.green), 0, 255), o = j(Math.round(e.blue), 0, 255);
|
|
359
359
|
if (a >= 1)
|
|
360
|
-
return `#${
|
|
360
|
+
return `#${nt(n)}${nt(s)}${nt(o)}`;
|
|
361
361
|
const d = ae(a, 4).toString();
|
|
362
362
|
return `rgba(${n}, ${s}, ${o}, ${d})`;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Wa(e) {
|
|
365
365
|
const a = e.fill ?? "none";
|
|
366
366
|
let n = `fill="${le(a)}"`;
|
|
367
367
|
const s = Object.keys(e);
|
|
@@ -373,10 +373,10 @@ function Fa(e) {
|
|
|
373
373
|
}
|
|
374
374
|
return n;
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function _t(e, a, n) {
|
|
377
377
|
return `<path d="${le(e)}" stroke="${le(a)}" ${n} />`;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function qa(e) {
|
|
380
380
|
const a = [], n = e.segmentAttributeMap.fill ?? "none";
|
|
381
381
|
a.push(`fill="${le(n)}"`), a.push(`stroke="${le(e.stroke)}"`);
|
|
382
382
|
for (const s of Object.keys(e.segmentAttributeMap)) {
|
|
@@ -386,7 +386,7 @@ function Va(e) {
|
|
|
386
386
|
}
|
|
387
387
|
return `<path d="${le(e.pathData)}" ${a.join(" ")} />`;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Pt(e, a) {
|
|
390
390
|
const n = [];
|
|
391
391
|
for (const o of Object.keys(a))
|
|
392
392
|
n.push(`${o}="${le(a[o])}"`);
|
|
@@ -395,7 +395,7 @@ function Lt(e, a) {
|
|
|
395
395
|
function le(e) {
|
|
396
396
|
return String(e).replaceAll("&", "&").replaceAll('"', """).replaceAll("<", "<").replaceAll(">", ">");
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Ga(e, a = null, n = {}) {
|
|
399
399
|
return new Promise((s, o) => {
|
|
400
400
|
let d = null;
|
|
401
401
|
try {
|
|
@@ -406,110 +406,110 @@ function Wa(e, a = null, n = {}) {
|
|
|
406
406
|
throw new Error("SvgPathGradientAsync: colors must be a non-empty array when temperatureMode is not enabled.");
|
|
407
407
|
if ((n.returnMode ?? "string") !== "string")
|
|
408
408
|
throw new Error('SvgPathGradientAsync: only returnMode="string" is supported for the async version.');
|
|
409
|
-
const i = typeof n.decimalPlaces == "number" ? n.decimalPlaces : 3,
|
|
410
|
-
d =
|
|
411
|
-
const
|
|
412
|
-
if (h === null && (!(
|
|
413
|
-
const
|
|
409
|
+
const i = typeof n.decimalPlaces == "number" ? n.decimalPlaces : 3, S = typeof n.flattenTolerance == "number" && n.flattenTolerance > 0 ? n.flattenTolerance : 0.25, v = n.attrs ? { ...n.attrs } : {}, x = n.groupAttrs ? { ...n.groupAttrs } : {}, I = Pa(v["stroke-width"]), B = typeof n.strokeWidth == "number" && n.strokeWidth > 0 ? n.strokeWidth : typeof I == "number" && I > 0 ? I : 1;
|
|
410
|
+
d = Ia(e);
|
|
411
|
+
const E = d.pathElement, A = E.getTotalLength(), t = h === null ? At(a, n.colorReferenceElement) : [];
|
|
412
|
+
if (h === null && (!(A > 0) || t.length === 1)) {
|
|
413
|
+
const G = st(t[0]), J = Pt(
|
|
414
414
|
[
|
|
415
|
-
|
|
415
|
+
qa({
|
|
416
416
|
pathData: e,
|
|
417
|
-
stroke:
|
|
417
|
+
stroke: G,
|
|
418
418
|
segmentAttributeMap: v
|
|
419
419
|
})
|
|
420
420
|
],
|
|
421
|
-
|
|
421
|
+
x
|
|
422
422
|
);
|
|
423
|
-
|
|
423
|
+
rt(d), s(J);
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
|
-
const
|
|
426
|
+
const F = n.colorSpace ?? "linearRGB";
|
|
427
427
|
if (h !== null) {
|
|
428
|
-
const
|
|
429
|
-
if (!Array.isArray(
|
|
428
|
+
const G = n.temperatureColors;
|
|
429
|
+
if (!Array.isArray(G) || G.length !== 2)
|
|
430
430
|
throw new Error("SvgPathGradientAsync: temperatureColors must be a tuple of exactly 2 colors when temperatureMode is enabled.");
|
|
431
431
|
}
|
|
432
|
-
const
|
|
433
|
-
const
|
|
434
|
-
for (let
|
|
435
|
-
|
|
436
|
-
return
|
|
437
|
-
})() : [],
|
|
438
|
-
let
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
let
|
|
443
|
-
const
|
|
444
|
-
let
|
|
445
|
-
const
|
|
446
|
-
const
|
|
447
|
-
for (;
|
|
448
|
-
const
|
|
449
|
-
let
|
|
450
|
-
if (
|
|
432
|
+
const Pe = h !== null ? At(n.temperatureColors, n.colorReferenceElement) : null, P = h === null ? (() => {
|
|
433
|
+
const G = Ea(t), J = new Array(G.length);
|
|
434
|
+
for (let q = 0; q < G.length; q += 1)
|
|
435
|
+
J[q] = { position: G[q].position, rgba: G[q].rgba };
|
|
436
|
+
return J;
|
|
437
|
+
})() : [], de = Ta(A, B, n.maxSegmentLength), ne = Ra(A, n.segments, de), X = A / ne;
|
|
438
|
+
let re = typeof n.overlap == "number" && n.overlap >= 0 ? n.overlap : B * 0.5;
|
|
439
|
+
const W = X * 0.45;
|
|
440
|
+
re > W && (re = W);
|
|
441
|
+
const Ne = typeof n.samplePointLimitPerSegment == "number" && n.samplePointLimitPerSegment > 10 ? n.samplePointLimitPerSegment : 250, ce = Wa(v), ye = [], Ie = h !== null ? [] : null, ve = h !== null ? [] : null;
|
|
442
|
+
let me = 0;
|
|
443
|
+
const Ge = h === null ? P.length - 2 : 0;
|
|
444
|
+
let Y = 0;
|
|
445
|
+
const be = () => {
|
|
446
|
+
const G = performance.now(), J = typeof n.frameBudgetMs == "number" ? n.frameBudgetMs : 8;
|
|
447
|
+
for (; Y < ne && performance.now() - G < J; ) {
|
|
448
|
+
const V = Y * X, ue = (Y + 1) * X;
|
|
449
|
+
let N = V, D = ue;
|
|
450
|
+
if (Y !== 0 && (N = V - re), Y !== ne - 1 && (D = ue + re), N = j(N, 0, A), D = j(D, 0, A), D > N)
|
|
451
451
|
if (h !== null) {
|
|
452
|
-
const
|
|
453
|
-
W,
|
|
454
|
-
B,
|
|
452
|
+
const T = Da(
|
|
455
453
|
E,
|
|
456
|
-
|
|
454
|
+
N,
|
|
455
|
+
D,
|
|
456
|
+
S,
|
|
457
457
|
i,
|
|
458
|
-
|
|
458
|
+
Ne
|
|
459
459
|
);
|
|
460
|
-
|
|
460
|
+
Ie.push(T.pathData), ve.push(T.bounds);
|
|
461
461
|
} else {
|
|
462
|
-
const
|
|
463
|
-
for (;
|
|
464
|
-
|
|
465
|
-
const K =
|
|
466
|
-
|
|
462
|
+
const R = (N + D) * 0.5 / A;
|
|
463
|
+
for (; me < Ge && R > P[me + 1].position; )
|
|
464
|
+
me += 1;
|
|
465
|
+
const K = Fa(
|
|
466
|
+
P,
|
|
467
|
+
R,
|
|
467
468
|
F,
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
), U = Ia(
|
|
471
|
-
W,
|
|
472
|
-
B,
|
|
469
|
+
me
|
|
470
|
+
), U = Ba(
|
|
473
471
|
E,
|
|
474
|
-
|
|
472
|
+
N,
|
|
473
|
+
D,
|
|
474
|
+
S,
|
|
475
475
|
i,
|
|
476
|
-
|
|
476
|
+
Ne
|
|
477
477
|
);
|
|
478
|
-
|
|
479
|
-
|
|
478
|
+
ye.push(
|
|
479
|
+
_t(U, K, ce)
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
|
-
|
|
482
|
+
Y += 1;
|
|
483
483
|
}
|
|
484
|
-
if (
|
|
485
|
-
requestAnimationFrame(
|
|
484
|
+
if (Y < ne) {
|
|
485
|
+
requestAnimationFrame(be);
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
if (h !== null) {
|
|
489
|
-
let
|
|
490
|
-
for (let
|
|
491
|
-
const
|
|
492
|
-
K <
|
|
489
|
+
let V = Number.POSITIVE_INFINITY, ue = Number.NEGATIVE_INFINITY;
|
|
490
|
+
for (let T = 0; T < ve.length; T += 1) {
|
|
491
|
+
const R = ve[T], K = h === "vertical" ? R.minY : R.minX, U = h === "vertical" ? R.maxY : R.maxX;
|
|
492
|
+
K < V && (V = K), U > ue && (ue = U);
|
|
493
493
|
}
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
for (let
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
|
|
494
|
+
const N = Pe[0], D = Pe[1];
|
|
495
|
+
ye.length = 0;
|
|
496
|
+
for (let T = 0; T < ve.length; T += 1) {
|
|
497
|
+
const R = ve[T], K = h === "vertical" ? R.minY : R.minX, U = h === "vertical" ? R.maxY : R.maxX, Se = (K + U) * 0.5, he = Na(Se, V, ue, !0), Me = h === "vertical" ? Ct(N, D, he, F) : Ct(D, N, he, F), Te = st(Me), fe = Ie[T];
|
|
498
|
+
ye.push(
|
|
499
|
+
_t(fe, Te, ce)
|
|
500
500
|
);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
const
|
|
504
|
-
|
|
503
|
+
const q = Pt(ye, x);
|
|
504
|
+
rt(d), s(q);
|
|
505
505
|
};
|
|
506
|
-
requestAnimationFrame(
|
|
506
|
+
requestAnimationFrame(be);
|
|
507
507
|
} catch (h) {
|
|
508
|
-
|
|
508
|
+
rt(d), o(h);
|
|
509
509
|
}
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
|
-
const
|
|
512
|
+
const Oa = ["innerHTML"], ja = {
|
|
513
513
|
__name: "SparklineGradientPath",
|
|
514
514
|
props: {
|
|
515
515
|
svgPathData: { type: String, required: !0 },
|
|
@@ -520,7 +520,7 @@ const qa = ["innerHTML"], Ga = {
|
|
|
520
520
|
segments: { type: Number, required: !0 }
|
|
521
521
|
},
|
|
522
522
|
setup(e) {
|
|
523
|
-
const a = e, n =
|
|
523
|
+
const a = e, n = L("");
|
|
524
524
|
let s = 0;
|
|
525
525
|
return z(
|
|
526
526
|
() => [
|
|
@@ -537,7 +537,7 @@ const qa = ["innerHTML"], Ga = {
|
|
|
537
537
|
n.value = "";
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
const h = await
|
|
540
|
+
const h = await Ga(a.svgPathData, null, {
|
|
541
541
|
segments: a.segments,
|
|
542
542
|
temperatureMode: "vertical",
|
|
543
543
|
temperatureColors: [a.highColor, a.lowColor],
|
|
@@ -551,14 +551,14 @@ const qa = ["innerHTML"], Ga = {
|
|
|
551
551
|
d === s && (n.value = h);
|
|
552
552
|
},
|
|
553
553
|
{ immediate: !0 }
|
|
554
|
-
), (o, d) => (f(),
|
|
554
|
+
), (o, d) => (f(), y("g", { innerHTML: n.value }, null, 8, Oa));
|
|
555
555
|
}
|
|
556
|
-
},
|
|
556
|
+
}, za = ["id"], Ya = ["id"], Xa = { style: { position: "relative" } }, Ka = ["xmlns", "viewBox", "aria-describedby"], Ua = ["width", "height"], Ha = ["id"], Za = ["stop-color"], Ja = ["stop-color"], Qa = ["id"], el = ["stop-color"], tl = ["stop-color"], al = ["id"], ll = ["stop-color"], nl = ["stop-color"], rl = ["id"], ul = ["id"], ol = ["stop-color", "offset"], sl = { key: 1 }, il = ["d", "fill"], dl = ["d", "fill"], cl = ["id", "d", "stroke-width"], vl = ["d", "stroke", "stroke-width", "stroke-dasharray"], hl = ["d", "stroke", "stroke-width"], fl = ["id", "d", "stroke-width"], pl = ["d", "stroke", "stroke-width", "stroke-dasharray"], gl = ["d", "stroke", "stroke-width"], yl = ["x", "y", "width", "height", "fill", "rx"], ml = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], bl = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], kl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], wl = ["x", "y", "font-size", "font-weight", "fill"], xl = ["x", "y", "height", "width", "onMouseenter", "onMouseleave", "onClick"], $l = {
|
|
557
557
|
key: 0,
|
|
558
558
|
style: { position: "absolute", top: "100%", left: "0", width: "100%" },
|
|
559
559
|
"data-dom-to-png-ignore": "",
|
|
560
560
|
"aria-hidden": "true"
|
|
561
|
-
},
|
|
561
|
+
}, Sl = {
|
|
562
562
|
__name: "vue-ui-sparkline",
|
|
563
563
|
props: {
|
|
564
564
|
config: {
|
|
@@ -592,11 +592,11 @@ const qa = ["innerHTML"], Ga = {
|
|
|
592
592
|
},
|
|
593
593
|
emits: ["hoverIndex", "selectDatapoint"],
|
|
594
594
|
setup(e, { emit: a }) {
|
|
595
|
-
const n =
|
|
596
|
-
function
|
|
597
|
-
return i.config?.skeletonDataset && Array.isArray(i.config.skeletonDataset) ? i.config.skeletonDataset.map((u) => ({ period: "-", value: u })) :
|
|
595
|
+
const n = mt(() => import("./PackageVersion-CvtT2-UH.js")), s = mt(() => import("./SparkTooltip-BorBpltj.js")), { vue_ui_sparkline: o } = ra(), { isThemeValid: d, warnInvalidTheme: h } = sa(), m = ca(), i = e, S = g(() => Array.isArray(i.dataset) && i.dataset.length > 0), v = L(Yt()), x = L(null), I = L(null), B = L(null), E = L(null), A = L(null), t = L(re());
|
|
596
|
+
function F(l) {
|
|
597
|
+
return i.config?.skeletonDataset && Array.isArray(i.config.skeletonDataset) ? i.config.skeletonDataset.map((u) => ({ period: "-", value: u })) : aa(l).map((u) => ({ period: "-", value: u }));
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const Pe = g(() => wt({
|
|
600
600
|
defaultConfig: {
|
|
601
601
|
gradientPath: { show: !1 },
|
|
602
602
|
temperatureColors: { show: !1 },
|
|
@@ -614,23 +614,23 @@ const qa = ["innerHTML"], Ga = {
|
|
|
614
614
|
}
|
|
615
615
|
},
|
|
616
616
|
userConfig: t.value.skeletonConfig ?? {}
|
|
617
|
-
})), { loading: P, FINAL_DATASET:
|
|
618
|
-
...
|
|
617
|
+
})), { loading: P, FINAL_DATASET: de, manualLoading: ne } = ua({
|
|
618
|
+
...qt(i),
|
|
619
619
|
FINAL_CONFIG: t,
|
|
620
|
-
prepareConfig:
|
|
620
|
+
prepareConfig: re,
|
|
621
621
|
callback: () => {
|
|
622
622
|
Promise.resolve().then(async () => {
|
|
623
|
-
await te(),
|
|
623
|
+
await te(), Me();
|
|
624
624
|
});
|
|
625
625
|
},
|
|
626
|
-
skeletonDataset:
|
|
627
|
-
skeletonConfig:
|
|
626
|
+
skeletonDataset: F(12),
|
|
627
|
+
skeletonConfig: wt({
|
|
628
628
|
defaultConfig: t.value,
|
|
629
|
-
userConfig:
|
|
629
|
+
userConfig: Pe.value
|
|
630
630
|
})
|
|
631
|
-
}), { svgRef:
|
|
632
|
-
function
|
|
633
|
-
const l =
|
|
631
|
+
}), { svgRef: X } = da({ config: t.value.style.title });
|
|
632
|
+
function re() {
|
|
633
|
+
const l = at({
|
|
634
634
|
userConfig: i.config,
|
|
635
635
|
defaultConfig: o
|
|
636
636
|
});
|
|
@@ -640,12 +640,12 @@ const qa = ["innerHTML"], Ga = {
|
|
|
640
640
|
if (!d.value(l))
|
|
641
641
|
h(l), u = l;
|
|
642
642
|
else {
|
|
643
|
-
const c =
|
|
644
|
-
userConfig:
|
|
643
|
+
const c = at({
|
|
644
|
+
userConfig: va[r] || i.config,
|
|
645
645
|
defaultConfig: l
|
|
646
646
|
});
|
|
647
647
|
u = {
|
|
648
|
-
...
|
|
648
|
+
...at({
|
|
649
649
|
userConfig: i.config,
|
|
650
650
|
defaultConfig: c
|
|
651
651
|
})
|
|
@@ -655,30 +655,30 @@ const qa = ["innerHTML"], Ga = {
|
|
|
655
655
|
u = l;
|
|
656
656
|
return u;
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
660
|
-
if (!
|
|
661
|
-
|
|
658
|
+
const W = g(() => t.value?.style?.line.pulse || {}), Ne = g(() => `${Math.max(200, Number(W.value.durationMs) || 4e3) / 1e3}s`), ce = L(0), ye = g(() => W.value?.begin || "0ms"), Ie = L("0;1"), ve = g(() => W.value?.loop === !1 ? "1" : "indefinite"), me = g(() => W.value?.loop === !1 ? "freeze" : void 0), Ge = g(() => W.value.trail.show && J.value.lengthPx || 1), Y = g(() => !!W.value?.show && !O.value && !m.value && !P.value && (p.value?.length || 0) > 1);
|
|
659
|
+
function be() {
|
|
660
|
+
if (!Y.value) {
|
|
661
|
+
ce.value = 0;
|
|
662
662
|
return;
|
|
663
663
|
}
|
|
664
|
-
const l =
|
|
664
|
+
const l = X.value;
|
|
665
665
|
if (!l) return;
|
|
666
|
-
const u = `#${
|
|
666
|
+
const u = `#${fe.value}`, r = l.querySelector?.(u);
|
|
667
667
|
if (r && typeof r.getTotalLength == "function") {
|
|
668
668
|
const c = r.getTotalLength();
|
|
669
|
-
Number.isFinite(c) && c > 0 && (
|
|
669
|
+
Number.isFinite(c) && c > 0 && (ce.value = c);
|
|
670
670
|
return;
|
|
671
671
|
}
|
|
672
672
|
requestAnimationFrame(() => {
|
|
673
673
|
const c = l.querySelector?.(u);
|
|
674
674
|
if (c && typeof c.getTotalLength == "function") {
|
|
675
|
-
const
|
|
676
|
-
Number.isFinite(
|
|
675
|
+
const w = c.getTotalLength();
|
|
676
|
+
Number.isFinite(w) && w > 0 && (ce.value = w);
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
|
-
const
|
|
681
|
-
const l =
|
|
680
|
+
const G = g(() => {
|
|
681
|
+
const l = W.value?.easing || "ease-in-out", u = {
|
|
682
682
|
ease: [0.25, 0.1, 0.25, 1],
|
|
683
683
|
"ease-in": [0.42, 0, 1, 1],
|
|
684
684
|
"ease-out": [0, 0, 0.58, 1],
|
|
@@ -694,11 +694,11 @@ const qa = ["innerHTML"], Ga = {
|
|
|
694
694
|
keyTimes: "0;1"
|
|
695
695
|
} : {
|
|
696
696
|
calcMode: "spline",
|
|
697
|
-
keySplines: (l === "cubic-bezier" ? Array.isArray(
|
|
697
|
+
keySplines: (l === "cubic-bezier" ? Array.isArray(W.value?.cubicBezier) && W.value.cubicBezier.length === 4 ? W.value.cubicBezier : [0.4, 0, 0.2, 1] : u[l] || u["ease-in-out"]).join(" "),
|
|
698
698
|
keyTimes: "0;1"
|
|
699
699
|
};
|
|
700
|
-
}),
|
|
701
|
-
const l =
|
|
700
|
+
}), J = g(() => {
|
|
701
|
+
const l = W.value?.trail || {}, u = t.value.style.line.strokeWidth || 1;
|
|
702
702
|
return {
|
|
703
703
|
show: l.show !== !1,
|
|
704
704
|
lengthPx: l.length,
|
|
@@ -707,25 +707,25 @@ const qa = ["innerHTML"], Ga = {
|
|
|
707
707
|
fadeIn: 0.5,
|
|
708
708
|
fadeOut: 0.2
|
|
709
709
|
};
|
|
710
|
-
}),
|
|
711
|
-
data:
|
|
710
|
+
}), q = g(() => Qe({
|
|
711
|
+
data: de.value,
|
|
712
712
|
threshold: t.value.downsample.threshold
|
|
713
713
|
}));
|
|
714
714
|
z(() => i.config, (l) => {
|
|
715
|
-
P.value || (t.value =
|
|
715
|
+
P.value || (t.value = re()), vt(), $.value.chartWidth = t.value.style.chartWidth;
|
|
716
716
|
}, { deep: !0 }), z(() => i.dataset, (l) => {
|
|
717
|
-
Array.isArray(l) && l.length > 0 && (
|
|
718
|
-
data:
|
|
717
|
+
Array.isArray(l) && l.length > 0 && (ne.value = !1), V.value = Qe({
|
|
718
|
+
data: de.value.map((u) => ({
|
|
719
719
|
...u,
|
|
720
720
|
value: [void 0].includes(u.value) ? null : u.value
|
|
721
721
|
})),
|
|
722
722
|
threshold: t.value.downsample.threshold
|
|
723
723
|
});
|
|
724
724
|
}, { deep: !0 });
|
|
725
|
-
const
|
|
726
|
-
function
|
|
727
|
-
return
|
|
728
|
-
data:
|
|
725
|
+
const V = L(ue());
|
|
726
|
+
function ue() {
|
|
727
|
+
return Qe({
|
|
728
|
+
data: de.value.map((l) => t.value.style.animation.show && de.value.length > 1 ? {
|
|
729
729
|
...l,
|
|
730
730
|
value: null
|
|
731
731
|
} : {
|
|
@@ -735,175 +735,175 @@ const qa = ["innerHTML"], Ga = {
|
|
|
735
735
|
threshold: t.value.downsample.threshold
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
|
-
const
|
|
739
|
-
const u = (
|
|
738
|
+
const N = bt(null), D = bt(null), T = L(!1), R = L(0), K = L([]), U = L(""), Se = g(() => {
|
|
739
|
+
const u = (q.value || []).map((w) => `${w.period}::${Number.isFinite(w.value) ? w.value : 0}`).join("|"), r = t.value?.style?.animation || {}, c = !!t.value?.gradientPath?.show && !t.value.temperatureColors.show;
|
|
740
740
|
return `${u}#${!!r.show}#${r.animationFrames || 0}#${c}`;
|
|
741
741
|
});
|
|
742
|
-
function
|
|
743
|
-
|
|
742
|
+
function he() {
|
|
743
|
+
R.value && (cancelAnimationFrame(R.value), R.value = 0), K.value.forEach((l) => clearTimeout(l)), K.value = [], T.value = !1;
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
const l = t.value?.style?.animation || {}, u =
|
|
747
|
-
if (r && r ===
|
|
745
|
+
function Me() {
|
|
746
|
+
const l = t.value?.style?.animation || {}, u = q.value || [], r = Se.value, c = !!t.value.gradientPath.show && !t.value.temperatureColors.show;
|
|
747
|
+
if (r && r === U.value && (T.value || V.value.length === u.length))
|
|
748
748
|
return;
|
|
749
|
-
if (
|
|
750
|
-
|
|
749
|
+
if (he(), c || !l.show || P.value || u.length <= 1) {
|
|
750
|
+
V.value = u, U.value = r;
|
|
751
751
|
return;
|
|
752
752
|
}
|
|
753
|
-
|
|
754
|
-
const
|
|
753
|
+
T.value = !0, U.value = r, V.value = [];
|
|
754
|
+
const w = Math.max(1, Number(l.animationFrames) || 1), He = Math.max(1, Math.floor(w / u.length));
|
|
755
755
|
let ee = 0;
|
|
756
|
-
const
|
|
757
|
-
if (r !==
|
|
758
|
-
|
|
756
|
+
const Ee = () => {
|
|
757
|
+
if (r !== Se.value) {
|
|
758
|
+
he();
|
|
759
759
|
return;
|
|
760
760
|
}
|
|
761
761
|
if (ee < u.length) {
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
},
|
|
766
|
-
|
|
762
|
+
V.value.push(u[ee]);
|
|
763
|
+
const Fe = setTimeout(() => {
|
|
764
|
+
R.value = requestAnimationFrame(Ee);
|
|
765
|
+
}, He);
|
|
766
|
+
K.value.push(Fe), ee += 1;
|
|
767
767
|
} else
|
|
768
|
-
|
|
768
|
+
V.value = u, he();
|
|
769
769
|
};
|
|
770
|
-
|
|
770
|
+
R.value = requestAnimationFrame(Ee);
|
|
771
771
|
}
|
|
772
|
-
z(
|
|
773
|
-
|
|
774
|
-
}),
|
|
775
|
-
|
|
776
|
-
}),
|
|
777
|
-
|
|
772
|
+
z(Se, () => {
|
|
773
|
+
Me();
|
|
774
|
+
}), kt(() => {
|
|
775
|
+
vt(), Me();
|
|
776
|
+
}), ot(() => {
|
|
777
|
+
he();
|
|
778
778
|
});
|
|
779
|
-
const
|
|
779
|
+
const Te = L(0);
|
|
780
780
|
z(
|
|
781
781
|
() => P.value,
|
|
782
782
|
async (l) => {
|
|
783
|
-
l || (await te(),
|
|
783
|
+
l || (await te(), Te.value += 1);
|
|
784
784
|
}
|
|
785
785
|
), z(
|
|
786
|
-
() =>
|
|
786
|
+
() => T.value,
|
|
787
787
|
async (l) => {
|
|
788
|
-
l || P.value || (await te(),
|
|
788
|
+
l || P.value || (await te(), Te.value += 1);
|
|
789
789
|
}
|
|
790
790
|
);
|
|
791
|
-
const
|
|
792
|
-
async function
|
|
793
|
-
|
|
791
|
+
const fe = g(() => `sparkline_line_path_${v.value}`), Oe = L(!0);
|
|
792
|
+
async function dt() {
|
|
793
|
+
Oe.value = !1, await te(), Oe.value = !0, await te(), be();
|
|
794
794
|
}
|
|
795
|
-
const
|
|
796
|
-
function
|
|
797
|
-
if (
|
|
795
|
+
const ct = g(() => !!t.value.debug);
|
|
796
|
+
function vt() {
|
|
797
|
+
if (xt(i.dataset) ? ($t({
|
|
798
798
|
componentName: "VueUiSparkline",
|
|
799
799
|
type: "dataset",
|
|
800
|
-
debug:
|
|
801
|
-
}),
|
|
802
|
-
|
|
800
|
+
debug: ct.value
|
|
801
|
+
}), ne.value = !0) : i.dataset.forEach((l, u) => {
|
|
802
|
+
Xt({
|
|
803
803
|
datasetObject: l,
|
|
804
804
|
requiredAttributes: ["period", "value"]
|
|
805
805
|
}).forEach((r) => {
|
|
806
|
-
|
|
806
|
+
$t({
|
|
807
807
|
componentName: "VueUiSparkline",
|
|
808
808
|
type: "datasetSerieAttribute",
|
|
809
809
|
property: r,
|
|
810
810
|
index: u,
|
|
811
|
-
debug:
|
|
811
|
+
debug: ct.value
|
|
812
812
|
});
|
|
813
813
|
});
|
|
814
|
-
}),
|
|
815
|
-
const l =
|
|
816
|
-
const { width: u, height: r } =
|
|
817
|
-
chart:
|
|
818
|
-
title: t.value.style.title.show && i.showInfo ?
|
|
819
|
-
source:
|
|
814
|
+
}), xt(i.dataset) || (ne.value = t.value.loading), t.value.responsive) {
|
|
815
|
+
const l = la(() => {
|
|
816
|
+
const { width: u, height: r } = na({
|
|
817
|
+
chart: x.value,
|
|
818
|
+
title: t.value.style.title.show && i.showInfo ? I.value : null,
|
|
819
|
+
source: B.value
|
|
820
820
|
});
|
|
821
821
|
requestAnimationFrame(() => {
|
|
822
|
-
|
|
822
|
+
$.value.width = u, $.value.height = r, $.value.chartWidth = t.value.style.chartWidth / 500 * u, $.value.padding = i.forcedPadding / 500 * u;
|
|
823
823
|
});
|
|
824
824
|
});
|
|
825
|
-
|
|
825
|
+
N.value && (D.value && N.value.unobserve(D.value), N.value.disconnect()), N.value = new ResizeObserver(l), D.value = x.value.parentNode, N.value.observe(D.value);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
|
|
829
|
-
|
|
828
|
+
ot(() => {
|
|
829
|
+
N.value && (D.value && N.value.unobserve(D.value), N.value.disconnect());
|
|
830
830
|
});
|
|
831
|
-
const
|
|
831
|
+
const $ = L({
|
|
832
832
|
height: 80 * i.heightRatio,
|
|
833
833
|
width: 500,
|
|
834
834
|
chartWidth: t.value.style.chartWidth,
|
|
835
835
|
padding: i.forcedPadding
|
|
836
|
-
}),
|
|
836
|
+
}), Re = a, C = g(() => {
|
|
837
837
|
const { top: l, right: u, bottom: r, left: c } = t.value.style.padding;
|
|
838
838
|
return {
|
|
839
839
|
top: l,
|
|
840
840
|
left: c,
|
|
841
|
-
right:
|
|
842
|
-
bottom:
|
|
843
|
-
start: i.showInfo && t.value.style.dataLabel.show && t.value.style.dataLabel.position === "left" ?
|
|
844
|
-
width: i.showInfo && t.value.style.dataLabel.show ?
|
|
845
|
-
height:
|
|
841
|
+
right: $.value.width - u,
|
|
842
|
+
bottom: $.value.height - r,
|
|
843
|
+
start: i.showInfo && t.value.style.dataLabel.show && t.value.style.dataLabel.position === "left" ? $.value.width - $.value.chartWidth + c : $.value.padding + c,
|
|
844
|
+
width: i.showInfo && t.value.style.dataLabel.show ? $.value.chartWidth - c - u : $.value.width - $.value.padding - c - u,
|
|
845
|
+
height: $.value.height - l - r
|
|
846
846
|
};
|
|
847
|
-
}),
|
|
848
|
-
const l =
|
|
847
|
+
}), je = g(() => [null, void 0].includes(t.value.style.scaleMin) ? Math.min(...V.value.map((l) => isNaN(l.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(l.value) ? 0 : l.value || 0)) : t.value.style.scaleMin), Nt = g(() => [null, void 0].includes(t.value.style.scaleMax) ? Math.max(...V.value.map((l) => isNaN(l.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(l.value) ? 0 : l.value || 0)) : t.value.style.scaleMax), Ae = g(() => {
|
|
848
|
+
const l = je.value >= 0 ? 0 : je.value;
|
|
849
849
|
return Math.abs(l);
|
|
850
|
-
}),
|
|
851
|
-
function
|
|
852
|
-
return isNaN(l /
|
|
850
|
+
}), ht = g(() => Nt.value + Ae.value), ke = g(() => C.value.bottom - C.value.height * ze(Ae.value));
|
|
851
|
+
function ze(l) {
|
|
852
|
+
return isNaN(l / ht.value) ? 0 : l / ht.value;
|
|
853
853
|
}
|
|
854
|
-
const
|
|
855
|
-
let
|
|
856
|
-
|
|
857
|
-
const l = ++
|
|
854
|
+
const we = g(() => q.value.length - 1 || 1), Ce = L([]);
|
|
855
|
+
let ft = 0;
|
|
856
|
+
Gt(() => {
|
|
857
|
+
const l = ++ft;
|
|
858
858
|
(async () => {
|
|
859
|
-
const u = await
|
|
860
|
-
values:
|
|
861
|
-
maxDatapoints:
|
|
859
|
+
const u = await ia({
|
|
860
|
+
values: q.value.map((r) => r.period),
|
|
861
|
+
maxDatapoints: q.value.length,
|
|
862
862
|
formatter: t.value.style.dataLabel.datetimeFormatter,
|
|
863
863
|
start: 0,
|
|
864
|
-
end:
|
|
864
|
+
end: q.value.length
|
|
865
865
|
});
|
|
866
|
-
l ===
|
|
866
|
+
l === ft && (Ce.value = u);
|
|
867
867
|
})();
|
|
868
868
|
});
|
|
869
|
-
const
|
|
870
|
-
const r = isNaN(l.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(l.value) ? 0 : l.value || 0, c =
|
|
869
|
+
const p = g(() => V.value.map((l, u) => {
|
|
870
|
+
const r = isNaN(l.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(l.value) ? 0 : l.value || 0, c = C.value.width / we.value;
|
|
871
871
|
return {
|
|
872
872
|
value: l.value,
|
|
873
873
|
absoluteValue: r,
|
|
874
874
|
period: Ce.value && Ce.value[u] && Ce.value[u].text ? Ce.value[u].text : l.period,
|
|
875
875
|
plotValue: r + Ae.value,
|
|
876
|
-
toMax:
|
|
877
|
-
x:
|
|
878
|
-
y:
|
|
876
|
+
toMax: ze(r + Ae.value),
|
|
877
|
+
x: C.value.start + u * c,
|
|
878
|
+
y: C.value.bottom - C.value.height * ze(r + Ae.value),
|
|
879
879
|
id: `plot_${v.value}_${u}`,
|
|
880
|
-
color: O.value ? t.value.style.bar.color : t.value.style.area.useGradient ?
|
|
880
|
+
color: O.value ? t.value.style.bar.color : t.value.style.area.useGradient ? Ve(t.value.style.line.color, 0.05 * (1 - u / we.value)) : t.value.style.line.color,
|
|
881
881
|
width: c
|
|
882
882
|
};
|
|
883
|
-
})),
|
|
884
|
-
const l = { x:
|
|
885
|
-
return
|
|
883
|
+
})), pt = g(() => i.selectedIndex !== void 0 && i.selectedIndex !== null && i.selectedIndex >= 0 && i.selectedIndex < p.value.length ? i.selectedIndex : A.value !== void 0 && A.value !== null && A.value >= 0 && A.value < p.value.length ? A.value : null), It = g(() => {
|
|
884
|
+
const l = { x: p.value[0].x || 0, y: ($.value.height || 0) - 6 }, u = { x: p.value[p.value.length - 1].x || 0, y: ($.value.height || 0) - 6 }, r = [];
|
|
885
|
+
return p.value.forEach((c) => {
|
|
886
886
|
r.push(`${c.x || 0},${c.y || 0} `);
|
|
887
887
|
}), [l.x, l.y, ...r, u.x, u.y].toString();
|
|
888
|
-
}),
|
|
889
|
-
function
|
|
890
|
-
t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: l, seriesIndex: u }),
|
|
888
|
+
}), k = L(void 0), oe = L(void 0);
|
|
889
|
+
function Ye(l, u) {
|
|
890
|
+
t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: l, seriesIndex: u }), A.value = u, E.value = u, k.value = l, oe.value || (oe.value = l), Re("hoverIndex", { index: u });
|
|
891
891
|
}
|
|
892
|
-
function
|
|
893
|
-
t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: l, seriesIndex: u }),
|
|
892
|
+
function Tt(l, u) {
|
|
893
|
+
t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: l, seriesIndex: u }), oe.value = k.value, k.value = void 0, A.value = null, E.value = null, Re("hoverIndex", { index: void 0 });
|
|
894
894
|
}
|
|
895
|
-
const
|
|
896
|
-
if (
|
|
897
|
-
const l =
|
|
895
|
+
const se = g(() => {
|
|
896
|
+
if (S.value) {
|
|
897
|
+
const l = p.value.map((r) => r.absoluteValue), u = l.reduce((r, c) => r + c, 0);
|
|
898
898
|
return {
|
|
899
|
-
latest:
|
|
899
|
+
latest: p.value[p.value.length - 1] ? p.value[p.value.length - 1].absoluteValue : 0,
|
|
900
900
|
sum: u,
|
|
901
|
-
average: u /
|
|
902
|
-
median:
|
|
903
|
-
trend:
|
|
901
|
+
average: u / p.value.length,
|
|
902
|
+
median: Ut(l),
|
|
903
|
+
trend: Kt(p.value.map(({ x: r, y: c, absoluteValue: w }) => ({
|
|
904
904
|
x: r,
|
|
905
905
|
y: c,
|
|
906
|
-
value:
|
|
906
|
+
value: w
|
|
907
907
|
}))).trend
|
|
908
908
|
};
|
|
909
909
|
} else
|
|
@@ -914,189 +914,201 @@ const qa = ["innerHTML"], Ga = {
|
|
|
914
914
|
median: null,
|
|
915
915
|
trend: null
|
|
916
916
|
};
|
|
917
|
-
}),
|
|
918
|
-
function
|
|
919
|
-
t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: l, seriesIndex: u }),
|
|
917
|
+
}), gt = g(() => S.value ? t.value.style.dataLabel.valueType === "latest" ? se.value.latest : t.value.style.dataLabel.valueType === "sum" ? se.value.sum : t.value.style.dataLabel.valueType === "average" ? se.value.average : 0 : 0), O = g(() => t.value.type && t.value.type === "bar");
|
|
918
|
+
function Rt(l, u) {
|
|
919
|
+
t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: l, seriesIndex: u }), Re("selectDatapoint", { datapoint: l, index: u });
|
|
920
920
|
}
|
|
921
|
-
const
|
|
922
|
-
|
|
921
|
+
const Be = g(() => Array.isArray(t.value.style.line.dashIndices) && t.value.style.line.dashIndices.length > 0), Xe = g(() => O.value ? "" : St(p.value)), Ke = g(() => O.value ? "" : Ht(p.value)), Bt = g(() => O.value || !Be.value ? [] : Zt(
|
|
922
|
+
p.value,
|
|
923
923
|
t.value.style.line.dashIndices
|
|
924
|
-
)),
|
|
925
|
-
|
|
924
|
+
)), Dt = g(() => O.value || !Be.value ? [] : Jt(
|
|
925
|
+
p.value,
|
|
926
926
|
t.value.style.line.dashIndices
|
|
927
|
-
)),
|
|
927
|
+
)), yt = g(() => O.value || !t.value.gradientPath.show || t.value.temperatureColors.show ? "" : `M ${(t.value.style.line.smooth ? Xe.value : Ke.value) || "0,0"}`), Q = g(() => !t.value.temperatureColors.show || t.value.temperatureColors.colors.length === 0 ? null : t.value.temperatureColors.colors.map((l) => Qt(l)));
|
|
928
928
|
z(
|
|
929
929
|
() => [
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
930
|
+
Y.value,
|
|
931
|
+
fe.value,
|
|
932
|
+
p.value.length,
|
|
933
|
+
$.value.width,
|
|
934
|
+
$.value.height,
|
|
935
935
|
t.value?.style?.line?.smooth
|
|
936
936
|
],
|
|
937
937
|
async () => {
|
|
938
|
-
await te(),
|
|
938
|
+
await te(), be();
|
|
939
939
|
},
|
|
940
940
|
{ immediate: !0 }
|
|
941
|
-
),
|
|
942
|
-
await te(),
|
|
941
|
+
), kt(async () => {
|
|
942
|
+
await te(), be();
|
|
943
943
|
}), z(
|
|
944
944
|
() => P.value,
|
|
945
945
|
async (l) => {
|
|
946
|
-
l || await
|
|
946
|
+
l || await dt();
|
|
947
947
|
}
|
|
948
948
|
), z(
|
|
949
|
-
() =>
|
|
949
|
+
() => T.value,
|
|
950
950
|
async (l) => {
|
|
951
|
-
l || P.value || await
|
|
951
|
+
l || P.value || await dt();
|
|
952
952
|
}
|
|
953
953
|
), z(
|
|
954
954
|
() => i.selectedIndex,
|
|
955
955
|
(l) => {
|
|
956
|
-
if (l == null
|
|
957
|
-
|
|
958
|
-
|
|
956
|
+
if (l == null) {
|
|
957
|
+
A.value = null, E.value = null, k.value = void 0;
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
if (l < 0 || l >= p.value.length) return;
|
|
961
|
+
const u = p.value[l];
|
|
962
|
+
u && (A.value = l, E.value = l, k.value = u);
|
|
959
963
|
}
|
|
960
964
|
);
|
|
961
|
-
const
|
|
962
|
-
function
|
|
963
|
-
|
|
965
|
+
const De = L(!1);
|
|
966
|
+
function Et() {
|
|
967
|
+
const l = pt.value;
|
|
968
|
+
if (l !== null && l >= 0 && l < p.value.length) {
|
|
969
|
+
const u = p.value[l];
|
|
970
|
+
if (u) {
|
|
971
|
+
E.value = l, k.value = u, A.value = l, De.value = !0;
|
|
972
|
+
return;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
E.value = null, !k.value && p.value.length && Ye(p.value.at(-1), p.value.length - 1), De.value = !0;
|
|
964
976
|
}
|
|
965
|
-
function
|
|
966
|
-
|
|
977
|
+
function Ft() {
|
|
978
|
+
oe.value = k.value, (i.selectedIndex === void 0 || i.selectedIndex === null) && (E.value = null, k.value = void 0, A.value = null, Re("hoverIndex", { index: void 0 })), De.value = !1;
|
|
967
979
|
}
|
|
968
|
-
function
|
|
969
|
-
if (!
|
|
970
|
-
|
|
980
|
+
function Vt(l) {
|
|
981
|
+
if (!X.value || document.activeElement !== X.value) return;
|
|
982
|
+
oe.value = k.value;
|
|
971
983
|
const u = l.key === "ArrowLeft", r = l.key === "ArrowRight";
|
|
972
984
|
if (!u && !r) return;
|
|
973
|
-
const c =
|
|
985
|
+
const c = p.value.length;
|
|
974
986
|
if (!c) return;
|
|
975
987
|
l.preventDefault(), l.stopPropagation();
|
|
976
|
-
let
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
const
|
|
980
|
-
|
|
988
|
+
let w = E.value;
|
|
989
|
+
const He = w !== null && w >= 0 && w < c, ee = k.value ? p.value.findIndex((Wt) => Wt.id === k.value.id) : -1, Ee = ee !== null && ee >= 0 && ee < c;
|
|
990
|
+
He ? r ? (w += 1, w >= c && (w = 0)) : u && (w -= 1, w < 0 && (w = c - 1)) : Ee ? (w = r ? ee + 1 : ee - 1, w >= c && (w = 0), w < 0 && (w = c - 1)) : r ? w = 0 : w = c - 1;
|
|
991
|
+
const Fe = p.value[w];
|
|
992
|
+
Fe && (E.value = w, Ye(Fe, w));
|
|
981
993
|
}
|
|
982
|
-
const
|
|
994
|
+
const Ue = g(() => {
|
|
983
995
|
const l = [
|
|
984
996
|
t.value.translations.period,
|
|
985
997
|
t.value.translations.value
|
|
986
|
-
], u =
|
|
998
|
+
], u = p.value.map((r) => [r.period, r.absoluteValue]);
|
|
987
999
|
return { headers: l, rows: u };
|
|
988
1000
|
});
|
|
989
|
-
return (l, u) => (f(),
|
|
1001
|
+
return (l, u) => (f(), y("div", {
|
|
990
1002
|
ref_key: "sparklineChart",
|
|
991
|
-
ref:
|
|
1003
|
+
ref: x,
|
|
992
1004
|
class: "vue-data-ui-component vue-ui-sparkline",
|
|
993
1005
|
id: v.value,
|
|
994
1006
|
style: H(`width:100%;font-family:${t.value.style.fontFamily};`)
|
|
995
1007
|
}, [
|
|
996
|
-
|
|
1008
|
+
M("p", {
|
|
997
1009
|
id: `chart-instructions-${v.value}`,
|
|
998
1010
|
class: "sr-only"
|
|
999
|
-
}, Le(t.value.a11y.translations.keyboardNavigation), 9,
|
|
1000
|
-
|
|
1011
|
+
}, Le(t.value.a11y.translations.keyboardNavigation), 9, Ya),
|
|
1012
|
+
Ue.value?.rows?.length ? (f(), _e(ha, {
|
|
1001
1013
|
key: 0,
|
|
1002
1014
|
uid: v.value,
|
|
1003
|
-
head:
|
|
1004
|
-
body:
|
|
1015
|
+
head: Ue.value.headers,
|
|
1016
|
+
body: Ue.value.rows,
|
|
1005
1017
|
notice: t.value.a11y.translations.tableAvailable,
|
|
1006
1018
|
caption: t.value.a11y.translations.tableCaption
|
|
1007
|
-
}, null, 8, ["uid", "head", "body", "notice", "caption"])) :
|
|
1008
|
-
|
|
1009
|
-
selected:
|
|
1010
|
-
latest:
|
|
1011
|
-
sum:
|
|
1012
|
-
average:
|
|
1013
|
-
median:
|
|
1014
|
-
trend:
|
|
1019
|
+
}, null, 8, ["uid", "head", "body", "notice", "caption"])) : _("", !0),
|
|
1020
|
+
pe(l.$slots, "before", Ze(Je({
|
|
1021
|
+
selected: k.value,
|
|
1022
|
+
latest: se.value.latest,
|
|
1023
|
+
sum: se.value.sum,
|
|
1024
|
+
average: se.value.average,
|
|
1025
|
+
median: se.value.median,
|
|
1026
|
+
trend: se.value.trend
|
|
1015
1027
|
})), void 0, !0),
|
|
1016
|
-
t.value.style.title.show && e.showInfo ? (f(),
|
|
1028
|
+
t.value.style.title.show && e.showInfo ? (f(), y("div", {
|
|
1017
1029
|
key: 1,
|
|
1018
1030
|
ref_key: "chartTitle",
|
|
1019
|
-
ref:
|
|
1031
|
+
ref: I,
|
|
1020
1032
|
class: "vue-ui-sparkline-title",
|
|
1021
1033
|
style: H(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign === "left" ? "flex-start" : t.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${t.value.style.title.fontSize * 2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold ? "bold" : "normal"};`)
|
|
1022
1034
|
}, [
|
|
1023
|
-
|
|
1035
|
+
M("span", {
|
|
1024
1036
|
style: H(`padding:${t.value.style.title.textAlign === "left" ? "0 0 0 12px" : t.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
|
|
1025
|
-
}, Le(
|
|
1026
|
-
], 4)) :
|
|
1027
|
-
|
|
1028
|
-
(f(),
|
|
1037
|
+
}, Le(k.value ? k.value.period : t.value.style.title.text), 5)
|
|
1038
|
+
], 4)) : _("", !0),
|
|
1039
|
+
M("div", Xa, [
|
|
1040
|
+
(f(), y("svg", {
|
|
1029
1041
|
ref_key: "svgRef",
|
|
1030
|
-
ref:
|
|
1031
|
-
xmlns: b(
|
|
1032
|
-
viewBox: `0 0 ${
|
|
1042
|
+
ref: X,
|
|
1043
|
+
xmlns: b(ea),
|
|
1044
|
+
viewBox: `0 0 ${$.value.width} ${$.value.height}`,
|
|
1033
1045
|
style: H(`background:${t.value.style.backgroundColor};overflow:visible;direction:ltr`),
|
|
1034
1046
|
tabindex: "0",
|
|
1035
1047
|
"aria-describedby": `chart-instructions-${v.value}`,
|
|
1036
|
-
onMouseleave: u[0] || (u[0] = (r) =>
|
|
1037
|
-
onFocus:
|
|
1038
|
-
onBlur:
|
|
1039
|
-
onKeydown:
|
|
1048
|
+
onMouseleave: u[0] || (u[0] = (r) => oe.value = void 0),
|
|
1049
|
+
onFocus: Et,
|
|
1050
|
+
onBlur: Ft,
|
|
1051
|
+
onKeydown: Vt
|
|
1040
1052
|
}, [
|
|
1041
|
-
|
|
1042
|
-
l.$slots["chart-background"] ? (f(),
|
|
1053
|
+
Ot(b(n)),
|
|
1054
|
+
l.$slots["chart-background"] ? (f(), y("foreignObject", {
|
|
1043
1055
|
key: 0,
|
|
1044
1056
|
x: 0,
|
|
1045
1057
|
y: 0,
|
|
1046
|
-
width:
|
|
1047
|
-
height:
|
|
1058
|
+
width: $.value.width <= 0 ? 10 : $.value.width,
|
|
1059
|
+
height: $.value.height <= 0 ? 10 : $.value.height,
|
|
1048
1060
|
style: {
|
|
1049
1061
|
pointerEvents: "none"
|
|
1050
1062
|
}
|
|
1051
1063
|
}, [
|
|
1052
|
-
|
|
1053
|
-
], 8,
|
|
1054
|
-
|
|
1055
|
-
|
|
1064
|
+
pe(l.$slots, "chart-background", {}, void 0, !0)
|
|
1065
|
+
], 8, Ua)) : _("", !0),
|
|
1066
|
+
M("defs", null, [
|
|
1067
|
+
M("linearGradient", {
|
|
1056
1068
|
x1: "0%",
|
|
1057
1069
|
y1: "0%",
|
|
1058
1070
|
x2: "100%",
|
|
1059
1071
|
y2: "0%",
|
|
1060
1072
|
id: `sparkline_gradient_${v.value}`
|
|
1061
1073
|
}, [
|
|
1062
|
-
|
|
1074
|
+
M("stop", {
|
|
1063
1075
|
offset: "0%",
|
|
1064
|
-
"stop-color": b(
|
|
1065
|
-
}, null, 8,
|
|
1066
|
-
|
|
1076
|
+
"stop-color": b(We)(b(Ve)(t.value.style.area.color, 0.05), t.value.style.area.opacity)
|
|
1077
|
+
}, null, 8, Za),
|
|
1078
|
+
M("stop", {
|
|
1067
1079
|
offset: "100%",
|
|
1068
|
-
"stop-color": b(
|
|
1069
|
-
}, null, 8,
|
|
1070
|
-
], 8,
|
|
1071
|
-
|
|
1080
|
+
"stop-color": b(We)(t.value.style.area.color, t.value.style.area.opacity)
|
|
1081
|
+
}, null, 8, Ja)
|
|
1082
|
+
], 8, Ha),
|
|
1083
|
+
M("linearGradient", {
|
|
1072
1084
|
x2: "0%",
|
|
1073
1085
|
y2: "100%",
|
|
1074
1086
|
id: `sparkline_bar_gradient_pos_${v.value}`
|
|
1075
1087
|
}, [
|
|
1076
|
-
|
|
1088
|
+
M("stop", {
|
|
1077
1089
|
offset: "0%",
|
|
1078
1090
|
"stop-color": t.value.style.bar.color
|
|
1079
|
-
}, null, 8,
|
|
1080
|
-
|
|
1091
|
+
}, null, 8, el),
|
|
1092
|
+
M("stop", {
|
|
1081
1093
|
offset: "100%",
|
|
1082
|
-
"stop-color": b(
|
|
1083
|
-
}, null, 8,
|
|
1084
|
-
], 8,
|
|
1085
|
-
|
|
1094
|
+
"stop-color": b(Ve)(t.value.style.bar.color, 0.05)
|
|
1095
|
+
}, null, 8, tl)
|
|
1096
|
+
], 8, Qa),
|
|
1097
|
+
M("linearGradient", {
|
|
1086
1098
|
x2: "0%",
|
|
1087
1099
|
y2: "100%",
|
|
1088
1100
|
id: `sparkline_bar_gradient_neg_${v.value}`
|
|
1089
1101
|
}, [
|
|
1090
|
-
|
|
1102
|
+
M("stop", {
|
|
1091
1103
|
offset: "0%",
|
|
1092
|
-
"stop-color": b(
|
|
1093
|
-
}, null, 8,
|
|
1094
|
-
|
|
1104
|
+
"stop-color": b(Ve)(t.value.style.bar.color, 0.05)
|
|
1105
|
+
}, null, 8, ll),
|
|
1106
|
+
M("stop", {
|
|
1095
1107
|
offset: "100%",
|
|
1096
1108
|
"stop-color": t.value.style.bar.color
|
|
1097
|
-
}, null, 8,
|
|
1098
|
-
], 8,
|
|
1099
|
-
|
|
1109
|
+
}, null, 8, nl)
|
|
1110
|
+
], 8, al),
|
|
1111
|
+
M("filter", {
|
|
1100
1112
|
id: `sparkline_pulse_glow_${v.value}`,
|
|
1101
1113
|
filterUnits: "userSpaceOnUse",
|
|
1102
1114
|
x: "-50",
|
|
@@ -1104,62 +1116,62 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1104
1116
|
width: "100",
|
|
1105
1117
|
height: "100"
|
|
1106
1118
|
}, [...u[1] || (u[1] = [
|
|
1107
|
-
|
|
1119
|
+
M("feGaussianBlur", {
|
|
1108
1120
|
in: "SourceGraphic",
|
|
1109
1121
|
stdDeviation: "3",
|
|
1110
1122
|
result: "blur"
|
|
1111
1123
|
}, null, -1),
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1124
|
+
M("feMerge", null, [
|
|
1125
|
+
M("feMergeNode", { in: "blur" }),
|
|
1126
|
+
M("feMergeNode", { in: "SourceGraphic" })
|
|
1115
1127
|
], -1)
|
|
1116
|
-
])], 8,
|
|
1117
|
-
t.value.temperatureColors.show && Q.value ? (f(),
|
|
1128
|
+
])], 8, rl),
|
|
1129
|
+
t.value.temperatureColors.show && Q.value ? (f(), y("linearGradient", {
|
|
1118
1130
|
key: 0,
|
|
1119
1131
|
id: `temperature_grad_sparkline_${v.value}`,
|
|
1120
1132
|
gradientTransform: "rotate(90)"
|
|
1121
1133
|
}, [
|
|
1122
|
-
(f(!0),
|
|
1134
|
+
(f(!0), y(Z, null, ge(Q.value, (r, c) => (f(), y("stop", {
|
|
1123
1135
|
key: `temperature_grad_stop_${c}_${v.value}`,
|
|
1124
1136
|
"stop-color": r,
|
|
1125
|
-
offset: b(
|
|
1126
|
-
}, null, 8,
|
|
1127
|
-
], 8,
|
|
1137
|
+
offset: b(ta)(c, Q.value.length)
|
|
1138
|
+
}, null, 8, ol))), 128))
|
|
1139
|
+
], 8, ul)) : _("", !0)
|
|
1128
1140
|
]),
|
|
1129
|
-
t.value.style.area.show && !O.value &&
|
|
1130
|
-
t.value.style.line.smooth ? (f(),
|
|
1141
|
+
t.value.style.area.show && !O.value && p.value[0] && p.value.length > 1 ? (f(), y("g", sl, [
|
|
1142
|
+
t.value.style.line.smooth ? (f(), y("path", {
|
|
1131
1143
|
key: 0,
|
|
1132
1144
|
class: "vue-ui-sparkline-area",
|
|
1133
|
-
d: `M ${
|
|
1134
|
-
fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : b(
|
|
1145
|
+
d: `M ${p.value[0].x},${C.value.bottom} ${b(St)(p.value)} L ${p.value.at(-1).x},${C.value.bottom} Z`,
|
|
1146
|
+
fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : b(We)(t.value.style.area.color, t.value.style.area.opacity),
|
|
1135
1147
|
"stroke-linecap": "round",
|
|
1136
1148
|
"stroke-linejoin": "round",
|
|
1137
1149
|
style: H({
|
|
1138
1150
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1139
1151
|
})
|
|
1140
|
-
}, null, 12,
|
|
1152
|
+
}, null, 12, il)) : (f(), y("path", {
|
|
1141
1153
|
key: 1,
|
|
1142
1154
|
class: "vue-ui-sparkline-area",
|
|
1143
|
-
d: `M${
|
|
1144
|
-
fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : b(
|
|
1155
|
+
d: `M${It.value}Z`,
|
|
1156
|
+
fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : b(We)(t.value.style.area.color, t.value.style.area.opacity),
|
|
1145
1157
|
"stroke-linecap": "round",
|
|
1146
1158
|
"stroke-linejoin": "round",
|
|
1147
1159
|
style: H({
|
|
1148
1160
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1149
1161
|
})
|
|
1150
|
-
}, null, 12,
|
|
1151
|
-
])) :
|
|
1152
|
-
t.value.style.line.smooth && !O.value ? (f(),
|
|
1153
|
-
|
|
1154
|
-
id:
|
|
1155
|
-
d: `M ${
|
|
1162
|
+
}, null, 12, dl))
|
|
1163
|
+
])) : _("", !0),
|
|
1164
|
+
t.value.style.line.smooth && !O.value ? (f(), y(Z, { key: 2 }, [
|
|
1165
|
+
M("path", {
|
|
1166
|
+
id: fe.value,
|
|
1167
|
+
d: `M ${Xe.value || "0,0"}`,
|
|
1156
1168
|
fill: "none",
|
|
1157
1169
|
stroke: "transparent",
|
|
1158
1170
|
"stroke-width": t.value.style.line.strokeWidth,
|
|
1159
1171
|
"stroke-linecap": "round",
|
|
1160
1172
|
"stroke-linejoin": "round"
|
|
1161
|
-
}, null, 8,
|
|
1162
|
-
|
|
1173
|
+
}, null, 8, cl),
|
|
1174
|
+
Be.value ? (f(!0), y(Z, { key: 0 }, ge(Bt.value, (r) => (f(), y("path", {
|
|
1163
1175
|
key: r.path,
|
|
1164
1176
|
class: "vue-ui-sparkline-path",
|
|
1165
1177
|
d: `M ${r.path}`,
|
|
@@ -1172,10 +1184,10 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1172
1184
|
style: H({
|
|
1173
1185
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1174
1186
|
})
|
|
1175
|
-
}, null, 12,
|
|
1187
|
+
}, null, 12, vl))), 128)) : (f(), y("path", {
|
|
1176
1188
|
key: 1,
|
|
1177
1189
|
class: "vue-ui-sparkline-path",
|
|
1178
|
-
d: `M ${
|
|
1190
|
+
d: `M ${Xe.value || "0,0"}`,
|
|
1179
1191
|
stroke: Q.value ? `url(#temperature_grad_sparkline_${v.value})` : t.value.style.line.color,
|
|
1180
1192
|
fill: "none",
|
|
1181
1193
|
"stroke-width": t.value.style.line.strokeWidth,
|
|
@@ -1184,19 +1196,19 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1184
1196
|
style: H({
|
|
1185
1197
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1186
1198
|
})
|
|
1187
|
-
}, null, 12,
|
|
1188
|
-
], 64)) :
|
|
1189
|
-
!t.value.style.line.smooth && !O.value ? (f(),
|
|
1190
|
-
|
|
1191
|
-
id:
|
|
1192
|
-
d: `M ${
|
|
1199
|
+
}, null, 12, hl))
|
|
1200
|
+
], 64)) : _("", !0),
|
|
1201
|
+
!t.value.style.line.smooth && !O.value ? (f(), y(Z, { key: 3 }, [
|
|
1202
|
+
M("path", {
|
|
1203
|
+
id: fe.value,
|
|
1204
|
+
d: `M ${Ke.value || "0,0"}`,
|
|
1193
1205
|
fill: "none",
|
|
1194
1206
|
stroke: "transparent",
|
|
1195
1207
|
"stroke-width": t.value.style.line.strokeWidth,
|
|
1196
1208
|
"stroke-linecap": "round",
|
|
1197
1209
|
"stroke-linejoin": "round"
|
|
1198
|
-
}, null, 8,
|
|
1199
|
-
|
|
1210
|
+
}, null, 8, fl),
|
|
1211
|
+
Be.value ? (f(!0), y(Z, { key: 0 }, ge(Dt.value, (r) => (f(), y("path", {
|
|
1200
1212
|
key: r.path,
|
|
1201
1213
|
class: "vue-ui-sparkline-path",
|
|
1202
1214
|
d: `M ${r.path}`,
|
|
@@ -1209,10 +1221,10 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1209
1221
|
style: H({
|
|
1210
1222
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1211
1223
|
})
|
|
1212
|
-
}, null, 12,
|
|
1224
|
+
}, null, 12, pl))), 128)) : (f(), y("path", {
|
|
1213
1225
|
key: 1,
|
|
1214
1226
|
class: "vue-ui-sparkline-path",
|
|
1215
|
-
d: `M ${
|
|
1227
|
+
d: `M ${Ke.value || "0,0"}`,
|
|
1216
1228
|
stroke: Q.value ? `url(#temperature_grad_sparkline_${v.value})` : t.value.style.line.color,
|
|
1217
1229
|
fill: "none",
|
|
1218
1230
|
"stroke-width": t.value.style.line.strokeWidth,
|
|
@@ -1221,71 +1233,71 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1221
1233
|
style: H({
|
|
1222
1234
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1223
1235
|
})
|
|
1224
|
-
}, null, 12,
|
|
1225
|
-
], 64)) :
|
|
1226
|
-
|
|
1236
|
+
}, null, 12, gl))
|
|
1237
|
+
], 64)) : _("", !0),
|
|
1238
|
+
yt.value && !Q.value ? (f(), _e(ja, {
|
|
1227
1239
|
key: 4,
|
|
1228
|
-
svgPathData:
|
|
1240
|
+
svgPathData: yt.value,
|
|
1229
1241
|
enabled: t.value.gradientPath.show && !O.value && !Q.value,
|
|
1230
1242
|
strokeWidth: t.value.style.line.strokeWidth,
|
|
1231
1243
|
highColor: t.value.gradientPath.colors.high,
|
|
1232
1244
|
lowColor: t.value.gradientPath.colors.low,
|
|
1233
1245
|
segments: t.value.gradientPath.segments
|
|
1234
|
-
}, null, 8, ["svgPathData", "enabled", "strokeWidth", "highColor", "lowColor", "segments"])) :
|
|
1235
|
-
|
|
1246
|
+
}, null, 8, ["svgPathData", "enabled", "strokeWidth", "highColor", "lowColor", "segments"])) : _("", !0),
|
|
1247
|
+
Oe.value && Y.value ? (f(), _e(Sa, {
|
|
1236
1248
|
key: 5,
|
|
1237
1249
|
uid: v.value,
|
|
1238
|
-
svgRef: b(
|
|
1239
|
-
pulsePathId:
|
|
1240
|
-
pulsePathLength:
|
|
1241
|
-
pulseDur:
|
|
1242
|
-
pulseBegin:
|
|
1243
|
-
pulseRepeatCount:
|
|
1244
|
-
pulseFillMode:
|
|
1245
|
-
pulseKeyPoints:
|
|
1246
|
-
pulseMotion:
|
|
1247
|
-
pulse:
|
|
1248
|
-
pulseTrail:
|
|
1249
|
-
pulseTrailLength:
|
|
1250
|
-
prefersReducedMotion: b(
|
|
1250
|
+
svgRef: b(X),
|
|
1251
|
+
pulsePathId: fe.value,
|
|
1252
|
+
pulsePathLength: ce.value,
|
|
1253
|
+
pulseDur: Ne.value,
|
|
1254
|
+
pulseBegin: ye.value,
|
|
1255
|
+
pulseRepeatCount: ve.value,
|
|
1256
|
+
pulseFillMode: me.value,
|
|
1257
|
+
pulseKeyPoints: Ie.value,
|
|
1258
|
+
pulseMotion: G.value,
|
|
1259
|
+
pulse: W.value,
|
|
1260
|
+
pulseTrail: J.value,
|
|
1261
|
+
pulseTrailLength: Ge.value,
|
|
1262
|
+
prefersReducedMotion: b(m),
|
|
1251
1263
|
loading: b(P),
|
|
1252
1264
|
isBar: O.value
|
|
1253
|
-
}, null, 8, ["uid", "svgRef", "pulsePathId", "pulsePathLength", "pulseDur", "pulseBegin", "pulseRepeatCount", "pulseFillMode", "pulseKeyPoints", "pulseMotion", "pulse", "pulseTrail", "pulseTrailLength", "prefersReducedMotion", "loading", "isBar"])) :
|
|
1254
|
-
(f(!0),
|
|
1255
|
-
O.value ? (f(),
|
|
1265
|
+
}, null, 8, ["uid", "svgRef", "pulsePathId", "pulsePathLength", "pulseDur", "pulseBegin", "pulseRepeatCount", "pulseFillMode", "pulseKeyPoints", "pulseMotion", "pulse", "pulseTrail", "pulseTrailLength", "prefersReducedMotion", "loading", "isBar"])) : _("", !0),
|
|
1266
|
+
(f(!0), y(Z, null, ge(p.value, (r, c) => (f(), y("g", null, [
|
|
1267
|
+
O.value ? (f(), y("rect", {
|
|
1256
1268
|
key: 0,
|
|
1257
1269
|
x: r.x - r.width / 2,
|
|
1258
|
-
y: isNaN(r.absoluteValue > 0 ? r.y :
|
|
1270
|
+
y: isNaN(r.absoluteValue > 0 ? r.y : ke.value) ? 0 : r.absoluteValue > 0 ? r.y : ke.value,
|
|
1259
1271
|
width: r.width,
|
|
1260
|
-
height: isNaN(Math.abs(r.y -
|
|
1272
|
+
height: isNaN(Math.abs(r.y - ke.value)) ? 0 : Math.abs(r.y - ke.value),
|
|
1261
1273
|
fill: r.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${v.value})` : `url(#sparkline_bar_gradient_neg_${v.value})`,
|
|
1262
1274
|
rx: t.value.style.bar.borderRadius
|
|
1263
|
-
}, null, 8,
|
|
1264
|
-
t.value.style.verticalIndicator.show && (
|
|
1275
|
+
}, null, 8, yl)) : _("", !0),
|
|
1276
|
+
t.value.style.verticalIndicator.show && (k.value && r.id === k.value.id || pt.value === c) ? (f(), y("line", {
|
|
1265
1277
|
key: 1,
|
|
1266
1278
|
x1: r.x,
|
|
1267
1279
|
x2: r.x,
|
|
1268
|
-
y1:
|
|
1269
|
-
y2:
|
|
1280
|
+
y1: C.value.top - 6,
|
|
1281
|
+
y2: C.value.bottom,
|
|
1270
1282
|
stroke: t.value.style.verticalIndicator.color || r.color,
|
|
1271
1283
|
"stroke-width": t.value.style.verticalIndicator.strokeWidth,
|
|
1272
1284
|
"stroke-linecap": "round",
|
|
1273
1285
|
"stroke-dasharray": t.value.style.verticalIndicator.strokeDasharray || 0
|
|
1274
|
-
}, null, 8,
|
|
1286
|
+
}, null, 8, ml)) : _("", !0)
|
|
1275
1287
|
]))), 256)),
|
|
1276
|
-
|
|
1288
|
+
je.value < 0 ? (f(), y("line", {
|
|
1277
1289
|
key: 6,
|
|
1278
|
-
x1:
|
|
1279
|
-
x2:
|
|
1280
|
-
y1: b(
|
|
1281
|
-
y2: b(
|
|
1290
|
+
x1: C.value.start,
|
|
1291
|
+
x2: C.value.start + C.value.width,
|
|
1292
|
+
y1: b(Mt)(ke.value, C.value.bottom),
|
|
1293
|
+
y2: b(Mt)(ke.value, C.value.bottom),
|
|
1282
1294
|
stroke: t.value.style.zeroLine.color,
|
|
1283
1295
|
"stroke-dasharray": t.value.style.zeroLine.strokeWidth * 2,
|
|
1284
1296
|
"stroke-width": t.value.style.zeroLine.strokeWidth,
|
|
1285
1297
|
"stroke-linecap": "round"
|
|
1286
|
-
}, null, 8,
|
|
1287
|
-
t.value.style.plot.show ? (f(!0),
|
|
1288
|
-
|
|
1298
|
+
}, null, 8, bl)) : _("", !0),
|
|
1299
|
+
t.value.style.plot.show ? (f(!0), y(Z, { key: 7 }, ge(p.value, (r, c) => (f(), y("g", null, [
|
|
1300
|
+
k.value && r.id === k.value.id || e.selectedIndex === c || b(de).length === 1 ? (f(), y("circle", {
|
|
1289
1301
|
key: 0,
|
|
1290
1302
|
cx: r.x,
|
|
1291
1303
|
cy: r.y,
|
|
@@ -1293,49 +1305,49 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1293
1305
|
fill: r.color,
|
|
1294
1306
|
stroke: t.value.style.plot.stroke,
|
|
1295
1307
|
"stroke-width": t.value.style.plot.strokeWidth
|
|
1296
|
-
}, null, 8,
|
|
1297
|
-
]))), 256)) :
|
|
1298
|
-
e.showInfo && t.value.style.dataLabel.show ? (f(),
|
|
1308
|
+
}, null, 8, kl)) : _("", !0)
|
|
1309
|
+
]))), 256)) : _("", !0),
|
|
1310
|
+
e.showInfo && t.value.style.dataLabel.show ? (f(), y("text", {
|
|
1299
1311
|
key: 8,
|
|
1300
|
-
x: t.value.style.dataLabel.position === "left" ? 12 + t.value.style.dataLabel.offsetX :
|
|
1301
|
-
y:
|
|
1312
|
+
x: t.value.style.dataLabel.position === "left" ? 12 + t.value.style.dataLabel.offsetX : C.value.width + 12 + t.value.style.dataLabel.offsetX,
|
|
1313
|
+
y: $.value.height / 2 + t.value.style.dataLabel.fontSize / 2.5 + t.value.style.dataLabel.offsetY,
|
|
1302
1314
|
"font-size": t.value.style.dataLabel.fontSize,
|
|
1303
1315
|
"font-weight": t.value.style.dataLabel.bold ? "bold" : "normal",
|
|
1304
1316
|
fill: t.value.style.dataLabel.color
|
|
1305
|
-
}, Le(
|
|
1317
|
+
}, Le(k.value ? b(et)(
|
|
1306
1318
|
t.value.style.dataLabel.formatter,
|
|
1307
|
-
|
|
1308
|
-
b(
|
|
1309
|
-
{ datapoint:
|
|
1310
|
-
) : b(
|
|
1319
|
+
k.value.absoluteValue,
|
|
1320
|
+
b(tt)({ p: t.value.style.dataLabel.prefix, v: k.value.absoluteValue, s: t.value.style.dataLabel.suffix, r: t.value.style.dataLabel.roundingValue }),
|
|
1321
|
+
{ datapoint: k.value }
|
|
1322
|
+
) : b(et)(
|
|
1311
1323
|
t.value.style.dataLabel.formatter,
|
|
1312
|
-
|
|
1313
|
-
b(
|
|
1314
|
-
)), 9,
|
|
1315
|
-
(f(!0),
|
|
1316
|
-
x: r.x - (
|
|
1317
|
-
y:
|
|
1318
|
-
height:
|
|
1319
|
-
width:
|
|
1324
|
+
gt.value,
|
|
1325
|
+
b(tt)({ p: t.value.style.dataLabel.prefix, v: gt.value, s: t.value.style.dataLabel.suffix, r: t.value.style.dataLabel.roundingValue })
|
|
1326
|
+
)), 9, wl)) : _("", !0),
|
|
1327
|
+
(f(!0), y(Z, null, ge(p.value, (r, c) => (f(), y("rect", {
|
|
1328
|
+
x: r.x - (C.value.width / (we.value + 1) > $.value.padding ? $.value.padding : C.value.width / (we.value + 1)) / 2,
|
|
1329
|
+
y: C.value.top - 6,
|
|
1330
|
+
height: C.value.height + 6,
|
|
1331
|
+
width: C.value.width / (we.value + 1) > $.value.padding ? $.value.padding : C.value.width / (we.value + 1),
|
|
1320
1332
|
fill: "transparent",
|
|
1321
|
-
onMouseenter: () =>
|
|
1322
|
-
onMouseleave: () =>
|
|
1323
|
-
onClick: () =>
|
|
1324
|
-
}, null, 40,
|
|
1325
|
-
|
|
1326
|
-
], 44,
|
|
1327
|
-
l.$slots.hint ? (f(),
|
|
1328
|
-
|
|
1329
|
-
])) :
|
|
1333
|
+
onMouseenter: () => Ye(r, c),
|
|
1334
|
+
onMouseleave: () => Tt(r, c),
|
|
1335
|
+
onClick: () => Rt(r, c)
|
|
1336
|
+
}, null, 40, xl))), 256)),
|
|
1337
|
+
pe(l.$slots, "svg", { svg: $.value }, void 0, !0)
|
|
1338
|
+
], 44, Ka)),
|
|
1339
|
+
l.$slots.hint ? (f(), y("div", $l, [
|
|
1340
|
+
pe(l.$slots, "hint", Ze(Je({ hint: t.value.a11y.translations.keyboardNavigation, isVisible: De.value })), void 0, !0)
|
|
1341
|
+
])) : _("", !0)
|
|
1330
1342
|
]),
|
|
1331
|
-
|
|
1343
|
+
k.value && t.value.style.tooltip.show ? (f(), _e(b(s), {
|
|
1332
1344
|
key: 2,
|
|
1333
|
-
x:
|
|
1334
|
-
y:
|
|
1335
|
-
prevX:
|
|
1336
|
-
prevY:
|
|
1345
|
+
x: k.value.x,
|
|
1346
|
+
y: k.value.y,
|
|
1347
|
+
prevX: oe.value.x,
|
|
1348
|
+
prevY: oe.value.y,
|
|
1337
1349
|
offsetY: t.value.style.plot.radius * 3 + t.value.style.tooltip.offsetY,
|
|
1338
|
-
svgRef: b(
|
|
1350
|
+
svgRef: b(X),
|
|
1339
1351
|
background: t.value.style.tooltip.backgroundColor,
|
|
1340
1352
|
color: t.value.style.tooltip.color,
|
|
1341
1353
|
fontSize: t.value.style.tooltip.fontSize,
|
|
@@ -1344,37 +1356,37 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1344
1356
|
borderRadius: t.value.style.tooltip.borderRadius,
|
|
1345
1357
|
backgroundOpacity: t.value.style.tooltip.backgroundOpacity
|
|
1346
1358
|
}, {
|
|
1347
|
-
default:
|
|
1348
|
-
|
|
1349
|
-
|
|
1359
|
+
default: jt(() => [
|
|
1360
|
+
pe(l.$slots, "tooltip", Ze(Je({ ...k.value })), () => [
|
|
1361
|
+
zt(Le(k.value.period) + ": " + Le(b(et)(
|
|
1350
1362
|
t.value.style.dataLabel.formatter,
|
|
1351
|
-
|
|
1352
|
-
b(
|
|
1363
|
+
k.value.absoluteValue,
|
|
1364
|
+
b(tt)({
|
|
1353
1365
|
p: t.value.style.dataLabel.prefix,
|
|
1354
|
-
v:
|
|
1366
|
+
v: k.value.absoluteValue,
|
|
1355
1367
|
s: t.value.style.dataLabel.suffix,
|
|
1356
1368
|
r: t.value.style.dataLabel.roundingValue
|
|
1357
1369
|
}),
|
|
1358
|
-
{ datapoint:
|
|
1370
|
+
{ datapoint: k.value }
|
|
1359
1371
|
)), 1)
|
|
1360
1372
|
], !0)
|
|
1361
1373
|
]),
|
|
1362
1374
|
_: 3
|
|
1363
|
-
}, 8, ["x", "y", "prevX", "prevY", "offsetY", "svgRef", "background", "color", "fontSize", "borderWidth", "borderColor", "borderRadius", "backgroundOpacity"])) :
|
|
1364
|
-
l.$slots.source ? (f(),
|
|
1375
|
+
}, 8, ["x", "y", "prevX", "prevY", "offsetY", "svgRef", "background", "color", "fontSize", "borderWidth", "borderColor", "borderRadius", "backgroundOpacity"])) : _("", !0),
|
|
1376
|
+
l.$slots.source ? (f(), y("div", {
|
|
1365
1377
|
key: 3,
|
|
1366
1378
|
ref_key: "source",
|
|
1367
|
-
ref:
|
|
1379
|
+
ref: B,
|
|
1368
1380
|
dir: "auto"
|
|
1369
1381
|
}, [
|
|
1370
|
-
|
|
1371
|
-
], 512)) :
|
|
1372
|
-
|
|
1373
|
-
b(P) ? (f(), _e(
|
|
1382
|
+
pe(l.$slots, "source", {}, void 0, !0)
|
|
1383
|
+
], 512)) : _("", !0),
|
|
1384
|
+
pe(l.$slots, "skeleton", {}, () => [
|
|
1385
|
+
b(P) ? (f(), _e(oa, { key: 0 })) : _("", !0)
|
|
1374
1386
|
], !0)
|
|
1375
|
-
], 12,
|
|
1387
|
+
], 12, za));
|
|
1376
1388
|
}
|
|
1377
|
-
},
|
|
1389
|
+
}, Fl = /* @__PURE__ */ fa(Sl, [["__scopeId", "data-v-5e51bb77"]]);
|
|
1378
1390
|
export {
|
|
1379
|
-
|
|
1391
|
+
Fl as default
|
|
1380
1392
|
};
|