vue-data-ui 3.22.6 → 3.22.8
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/{Arrow-Ds4xmpiQ.js → Arrow-DdymhUfY.js} +1 -1
- package/dist/{BaseDraggableDialog-VbypEaAa.js → BaseDraggableDialog-DcfGlH8A.js} +2 -2
- package/dist/{BaseIcon-DcUvOfxf.js → BaseIcon-C2qlyHc7.js} +1 -1
- package/dist/{BaseLegendToggle-DFwIY5bE.js → BaseLegendToggle-DtQ8vyfr.js} +1 -1
- package/dist/{BaseZoomControls-DwolSINF.js → BaseZoomControls-C6zonwhr.js} +2 -2
- package/dist/{ColorPicker-UVDPcrjE.js → ColorPicker-CK2-h611.js} +2 -2
- package/dist/{DataTable-CXfvIulC.js → DataTable-D9NvewTT.js} +2 -2
- package/dist/{Legend-D-635Kag.js → Legend-ROt6ugzW.js} +2 -2
- package/dist/{NonSvgPenAndPaper-pR_1qp3s.js → NonSvgPenAndPaper-BHHNsVVP.js} +29 -29
- package/dist/{PackageVersion-Da7hl-34.js → PackageVersion-DW7zwRcm.js} +1 -1
- package/dist/{PenAndPaper-Bk2-E7V4.js → PenAndPaper-pcgwlYr2.js} +18 -18
- package/dist/{Shape-BSetplwm.js → Shape-UpH0a4Ur.js} +3 -3
- package/dist/{Slicer-ClIGOuoX.js → Slicer-BZ5VnOOS.js} +19 -19
- package/dist/{SlicerPreview-D1n9AW39.js → SlicerPreview-BQFeCw0m.js} +351 -351
- package/dist/{SparkTooltip-CjDAyolg.js → SparkTooltip-BTLN-Kex.js} +6 -6
- package/dist/{Title-C-p0ilWB.js → Title-CcNiYzEo.js} +1 -1
- package/dist/{Tooltip-YabpoXo1.js → Tooltip-CxOrWlFy.js} +1 -1
- package/dist/{UserOptions-BO4VFL8O.js → UserOptions-16uF1ayB.js} +2 -2
- 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-CVJfsfwL.js → dom-to-png-BbwhsRIr.js} +1 -1
- package/dist/exposedLib-VXFp3Z2c.js +19 -0
- package/dist/{geoProjections-Czak6Jn1.js → geoProjections-BbN7z57k.js} +172 -15
- package/dist/{img-B_y5qDdm.js → img-DnP3eXuv.js} +1 -1
- package/dist/{labelUtils-CyVwqXSh.js → labelUtils-DBEh078l.js} +1 -1
- package/dist/{lib-DRBJCmHW.js → lib-JqW18y5I.js} +49 -30
- package/dist/{package-DyQ_PQis.js → package-gp9pYCfN.js} +1 -1
- package/dist/{pdf-CG02qhAH.js → pdf-hj3gzrE7.js} +1 -1
- package/dist/{render-common-CUAlQvAQ.js → render-common-CLn1VXJ9.js} +20 -20
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/utils.d.ts +18 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-DPMOys9n.js → useAutoSizeLabelsInsideViewbox-BGnDfZdg.js} +1 -1
- package/dist/{useNestedProp-BEo2N1Db.js → useNestedProp-DIuuzG1r.js} +1 -1
- package/dist/{usePrinter-CRp5IW3v.js → usePrinter-CqqHmnBI.js} +2 -2
- package/dist/utils.js +23 -23
- package/dist/{vue-data-ui-Bpu4kxlm.js → vue-data-ui-AZZ9Cq-4.js} +68 -68
- package/dist/vue-data-ui.js +77 -77
- package/dist/{vue-ui-3d-bar-BAH0jNtT.js → vue-ui-3d-bar-B3HxJmDI.js} +124 -124
- package/dist/{vue-ui-accordion-CfMrbDoq.js → vue-ui-accordion-YyosvEPo.js} +3 -3
- package/dist/vue-ui-age-pyramid-DTAOc7fn.js +1238 -0
- package/dist/{vue-ui-annotator-CG6rhFpy.js → vue-ui-annotator-CfJXeAOE.js} +6 -6
- package/dist/vue-ui-bullet-CCLnrOLm.js +710 -0
- package/dist/vue-ui-bump-Rq7efdoe.js +1249 -0
- package/dist/vue-ui-candlestick-D-Z9pEaA.js +1829 -0
- package/dist/vue-ui-carousel-table-Lx5Zk4dG.js +455 -0
- package/dist/{vue-ui-chestnut-Cx8T3NEl.js → vue-ui-chestnut-RfWMGUD-.js} +114 -114
- package/dist/{vue-ui-chord-B-sauvLo.js → vue-ui-chord-Db1O_diJ.js} +57 -57
- package/dist/vue-ui-circle-pack-B4Ro7UuI.js +1608 -0
- package/dist/{vue-ui-cursor-DVsEm_4l.js → vue-ui-cursor-DLP7wxsw.js} +61 -61
- package/dist/{vue-ui-dag-Cfi0b9qm.js → vue-ui-dag-DL3zq0F2.js} +37 -37
- package/dist/{vue-ui-dashboard-F_NZ1xoQ.js → vue-ui-dashboard-C2ozZ-LI.js} +69 -69
- package/dist/{vue-ui-digits-BfP1kbj3.js → vue-ui-digits-ThFVNO3l.js} +3 -3
- package/dist/{vue-ui-donut-DlVRnVr_.js → vue-ui-donut-BuTd6dt4.js} +224 -224
- package/dist/{vue-ui-donut-BwAyvV3-.js → vue-ui-donut-C3Rt6j-I.js} +458 -458
- package/dist/vue-ui-donut-evolution-DY46UPF_.js +1510 -0
- package/dist/vue-ui-dumbbell-wK7vUB0x.js +1530 -0
- package/dist/{vue-ui-flow-D_7Idmmw.js → vue-ui-flow-BTUNfWb7.js} +122 -122
- package/dist/vue-ui-funnel-BhoHzyHa.js +777 -0
- package/dist/{vue-ui-galaxy-Bjxbg5_B.js → vue-ui-galaxy-DJ2uNYcN.js} +263 -263
- package/dist/{vue-ui-gauge-Dt0H7DgC.js → vue-ui-gauge-Cf4NqvrO.js} +226 -226
- package/dist/{vue-ui-geo-89DEQb5l.js → vue-ui-geo-ovHu_Sc9.js} +21 -21
- package/dist/{vue-ui-gizmo-CQyLK18v.js → vue-ui-gizmo-DDxEj-qe.js} +7 -7
- package/dist/{vue-ui-heatmap-o6MvoxBK.js → vue-ui-heatmap-Npqnvb1r.js} +282 -282
- package/dist/vue-ui-history-plot-C3Kjy2tc.js +1715 -0
- package/dist/vue-ui-horizontal-bar-D1rCsgqt.js +1683 -0
- package/dist/{vue-ui-kpi-4C-j92D-.js → vue-ui-kpi-BrlfYO-j.js} +4 -4
- package/dist/{vue-ui-mini-loader-Bj4Wv-i8.js → vue-ui-mini-loader-D5we7V_W.js} +2 -2
- package/dist/vue-ui-molecule-CExCqZ08.js +925 -0
- package/dist/{vue-ui-mood-radar-B5W35Fvp.js → vue-ui-mood-radar-DlVh6hwx.js} +27 -27
- package/dist/vue-ui-nested-donuts-3TRV8pN-.js +1487 -0
- package/dist/vue-ui-onion-DwKK9DXn.js +1200 -0
- package/dist/{vue-ui-parallel-coordinate-plot-DBpHCFxa.js → vue-ui-parallel-coordinate-plot-DSp_cwU-.js} +57 -57
- package/dist/vue-ui-quadrant-ByVg-NBs.js +1978 -0
- package/dist/{vue-ui-quick-chart-so_8PzvS.js → vue-ui-quick-chart-WMzSJxGZ.js} +188 -188
- package/dist/{vue-ui-radar-5fQ5AAWD.js → vue-ui-radar-DE-me6OC.js} +64 -64
- package/dist/vue-ui-rating-CzD3EQ3G.js +343 -0
- package/dist/vue-ui-relation-circle-L7-dTqet.js +924 -0
- package/dist/vue-ui-ridgeline-Cp3YP0xe.js +1622 -0
- package/dist/vue-ui-rings-WzWiEo9W.js +1246 -0
- package/dist/vue-ui-scatter-DwrAydha.js +2413 -0
- package/dist/{vue-ui-skeleton-BkxB6Dik.js → vue-ui-skeleton-CuFm4PtB.js} +58 -58
- package/dist/{vue-ui-smiley-C4g0iaF7.js → vue-ui-smiley-D4NnZ1mg.js} +17 -17
- package/dist/{vue-ui-spark-trend-0FELlq4x.js → vue-ui-spark-trend-C38ysZ-c.js} +21 -21
- package/dist/{vue-ui-sparkbar-D-i_VLO6.js → vue-ui-sparkbar-B03ndcUe.js} +80 -80
- package/dist/{vue-ui-sparkgauge-CWw6w_ng.js → vue-ui-sparkgauge-DgPc4vPT.js} +7 -7
- package/dist/{vue-ui-sparkhistogram-DuGpkfma.js → vue-ui-sparkhistogram-D02ff7ZI.js} +115 -115
- package/dist/{vue-ui-sparkline-Bi06lHQd.js → vue-ui-sparkline-DlTfNQj8.js} +464 -464
- package/dist/vue-ui-sparkstackbar-DrmiWFlw.js +662 -0
- package/dist/vue-ui-stackbar-BVdApDnY.js +2332 -0
- package/dist/vue-ui-stackline-QzQQ7lTy.js +2419 -0
- package/dist/vue-ui-strip-plot-C-TFNvgz.js +1729 -0
- package/dist/{vue-ui-table-DBlZswRi.js → vue-ui-table-Q3brrivC.js} +68 -68
- package/dist/{vue-ui-table-heatmap-3xYIDKcP.js → vue-ui-table-heatmap-D0pZbBOH.js} +14 -14
- package/dist/{vue-ui-table-sparkline-BH5PzEnJ.js → vue-ui-table-sparkline-Q6BHPKUn.js} +199 -199
- package/dist/{vue-ui-thermometer-BxMzAqoT.js → vue-ui-thermometer-Bg0RR6m4.js} +26 -26
- package/dist/{vue-ui-timer-ONSitYDm.js → vue-ui-timer-BdzKpoRj.js} +29 -29
- package/dist/{vue-ui-tiremarks-DWXM-9nR.js → vue-ui-tiremarks-DWb69ofh.js} +17 -17
- package/dist/{vue-ui-treemap-B03c4RIy.js → vue-ui-treemap-uUz07Prw.js} +401 -401
- package/dist/vue-ui-waffle-Pi9e7Ae7.js +1362 -0
- package/dist/{vue-ui-wheel-DRP7X8S2.js → vue-ui-wheel-DTfvWYA7.js} +137 -137
- package/dist/{vue-ui-word-cloud-AKpMO97a.js → vue-ui-word-cloud-DqfljAqH.js} +40 -40
- package/dist/vue-ui-world-BtBrH92Z.js +3016 -0
- package/dist/{vue-ui-xy-Bmd11BxR.js → vue-ui-xy-Bvgy2do1.js} +1598 -1596
- package/dist/{vue-ui-xy-DJ8YKPgs.js → vue-ui-xy-D5KsuNR2.js} +259 -259
- package/dist/{vue-ui-xy-canvas-DO_PDGKf.js → vue-ui-xy-canvas-BfgeE3TW.js} +440 -437
- package/package.json +1 -1
- package/dist/exposedLib-CjwriUaG.js +0 -19
- package/dist/vue-ui-age-pyramid-BF5ZuuyI.js +0 -1238
- package/dist/vue-ui-bullet-C_oBS1cr.js +0 -710
- package/dist/vue-ui-bump-BZB1Na8h.js +0 -1249
- package/dist/vue-ui-candlestick-8d_1xO8X.js +0 -1826
- package/dist/vue-ui-carousel-table-BfZNcwmY.js +0 -455
- package/dist/vue-ui-circle-pack-BLh8HnGK.js +0 -1608
- package/dist/vue-ui-donut-evolution-D1k4u6cA.js +0 -1510
- package/dist/vue-ui-dumbbell-DgmvPpK2.js +0 -1530
- package/dist/vue-ui-funnel-BYCFV5TD.js +0 -777
- package/dist/vue-ui-history-plot-B7zuCfdg.js +0 -1715
- package/dist/vue-ui-horizontal-bar-CwB4sc6M.js +0 -1683
- package/dist/vue-ui-molecule-BDrRmwmm.js +0 -925
- package/dist/vue-ui-nested-donuts-wfesrzle.js +0 -1487
- package/dist/vue-ui-onion-B8-psLbF.js +0 -1200
- package/dist/vue-ui-quadrant-BzyGOJR2.js +0 -1978
- package/dist/vue-ui-rating-CKWHDKOT.js +0 -343
- package/dist/vue-ui-relation-circle-Bd_ONHCz.js +0 -924
- package/dist/vue-ui-ridgeline-DVbYznRz.js +0 -1622
- package/dist/vue-ui-rings-c-yLWFHr.js +0 -1246
- package/dist/vue-ui-scatter-QhmE7n1H.js +0 -2413
- package/dist/vue-ui-sparkstackbar-DrKgBUmt.js +0 -662
- package/dist/vue-ui-stackbar-DDvuDGQ_.js +0 -2329
- package/dist/vue-ui-stackline-C0NHBUaE.js +0 -2416
- package/dist/vue-ui-strip-plot-_6LL45i9.js +0 -1729
- package/dist/vue-ui-waffle-afa8HSxz.js +0 -1362
- package/dist/vue-ui-world-CqS-HhZl.js +0 -14264
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { $ as t, B as n, D as r, F as i, G as a, J as o, Kt as s, Lt as c, M as l, O as u, P as d, Rt as f, Tt as p, V as ee, b as te, dt as ne, f as re, i as ie, it as ae, j as oe, kt as se, l as ce, nt as le, t as ue, vt as de, z as fe, zt as m } from "./lib-JqW18y5I.js";
|
|
3
3
|
import { t as pe } from "./useTimeLabels-BmBRv27Y.js";
|
|
4
4
|
import { t as me } from "./useConfig-DYM3f6EI.js";
|
|
5
5
|
import { n as h, t as he } from "./BaseScanner-DZvpgOjM.js";
|
|
6
|
-
import { t as ge } from "./useNestedProp-
|
|
6
|
+
import { t as ge } from "./useNestedProp-DIuuzG1r.js";
|
|
7
7
|
import { t as _e } from "./useThemeCheck-C43Tcqmk.js";
|
|
8
8
|
import { t as ve } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
9
9
|
import { c as ye } from "./canvas-lib-BOP_HS11.js";
|
|
@@ -186,28 +186,28 @@ var Re = {
|
|
|
186
186
|
repeatCount: e.pulseRepeatCount
|
|
187
187
|
}, null, 8, A)], 8, Ue))])) : v("", !0);
|
|
188
188
|
}
|
|
189
|
-
},
|
|
189
|
+
}, j = {
|
|
190
190
|
canvas: null,
|
|
191
191
|
ctx: null
|
|
192
192
|
};
|
|
193
|
-
function
|
|
193
|
+
function Ke() {
|
|
194
194
|
if (typeof document > "u") throw Error("color-utils: document is not available (browser-only).");
|
|
195
|
-
if (!
|
|
195
|
+
if (!j.canvas) {
|
|
196
196
|
let e = document.createElement("canvas");
|
|
197
197
|
e.width = 1, e.height = 1;
|
|
198
198
|
let t = e.getContext("2d", { willReadFrequently: !0 });
|
|
199
199
|
if (!t) throw Error("color-utils: unable to get 2D canvas context.");
|
|
200
|
-
|
|
200
|
+
j.canvas = e, j.ctx = t;
|
|
201
201
|
}
|
|
202
|
-
return
|
|
202
|
+
return j.ctx;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function qe(e) {
|
|
205
205
|
return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function M(e) {
|
|
208
208
|
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function N(e, t = null) {
|
|
211
211
|
if (typeof e != "string" || e.trim().length === 0) throw Error("colorToRgba: inputColor must be a non-empty string.");
|
|
212
212
|
let n = e.trim();
|
|
213
213
|
if (n.toLowerCase() === "transparent") return {
|
|
@@ -216,10 +216,10 @@ function M(e, t = null) {
|
|
|
216
216
|
blue: 0,
|
|
217
217
|
alpha: 0
|
|
218
218
|
};
|
|
219
|
-
let r =
|
|
219
|
+
let r = Je(n, t), i = Ke();
|
|
220
220
|
i.clearRect(0, 0, 1, 1), i.fillStyle = "#000";
|
|
221
221
|
let a = i.fillStyle;
|
|
222
|
-
if (i.fillStyle = r, i.fillStyle === a && !
|
|
222
|
+
if (i.fillStyle = r, i.fillStyle === a && !Ye(r)) throw Error(`colorToRgba: unsupported or invalid color "${e}".`);
|
|
223
223
|
i.fillRect(0, 0, 1, 1);
|
|
224
224
|
let o = i.getImageData(0, 0, 1, 1).data;
|
|
225
225
|
return {
|
|
@@ -229,35 +229,35 @@ function M(e, t = null) {
|
|
|
229
229
|
alpha: o[3] / 255
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function P(e, t = null) {
|
|
233
233
|
if (!Array.isArray(e) || e.length === 0) throw Error("colorsToRgba: colors must be a non-empty array.");
|
|
234
234
|
let n = Array(e.length);
|
|
235
|
-
for (let r = 0; r < e.length; r += 1) n[r] =
|
|
235
|
+
for (let r = 0; r < e.length; r += 1) n[r] = N(e[r], t);
|
|
236
236
|
return n;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function Je(e, t = null) {
|
|
239
239
|
return e !== "currentColor" || typeof window > "u" || !t ? e : window.getComputedStyle(t).color || e;
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Ye(e) {
|
|
242
242
|
let t = e.trim().toLowerCase();
|
|
243
243
|
return t === "black" || t === "#000" || t === "#000000" || t === "rgb(0, 0, 0)" || t === "rgba(0, 0, 0, 1)" || t === "rgba(0, 0, 0, 0)";
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
let t =
|
|
245
|
+
function F(e) {
|
|
246
|
+
let t = M(e / 255);
|
|
247
247
|
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
250
|
-
let t =
|
|
251
|
-
return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055,
|
|
249
|
+
function I(e) {
|
|
250
|
+
let t = M(e), n;
|
|
251
|
+
return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, qe(n * 255);
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
let i =
|
|
253
|
+
function Xe(e, t, n, r) {
|
|
254
|
+
let i = M(n);
|
|
255
255
|
if (r === "linearRGB") {
|
|
256
|
-
let n =
|
|
256
|
+
let n = F(e.red), r = F(e.green), a = F(e.blue), o = F(t.red), s = F(t.green), c = F(t.blue), l = n + (o - n) * i, u = r + (s - r) * i, d = a + (c - a) * i;
|
|
257
257
|
return {
|
|
258
|
-
red:
|
|
259
|
-
green:
|
|
260
|
-
blue:
|
|
258
|
+
red: I(l),
|
|
259
|
+
green: I(u),
|
|
260
|
+
blue: I(d),
|
|
261
261
|
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
262
262
|
};
|
|
263
263
|
}
|
|
@@ -270,79 +270,79 @@ function Ze(e, t, n, r) {
|
|
|
270
270
|
}
|
|
271
271
|
//#endregion
|
|
272
272
|
//#region src/SPG/number-utils.js
|
|
273
|
-
function
|
|
273
|
+
function L(e, t, n) {
|
|
274
274
|
let r = e;
|
|
275
275
|
return r < t && (r = t), r > n && (r = n), r;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function R(e, t) {
|
|
278
278
|
let n = 10 ** t;
|
|
279
279
|
return Math.round(e * n) / n;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function z(e) {
|
|
282
282
|
return Number.isFinite(e) ? e.toString() : "0";
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
let t =
|
|
284
|
+
function Ze(e) {
|
|
285
|
+
let t = L(e, 0, 255).toString(16);
|
|
286
286
|
return t.length === 1 ? "0" + t : t;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Qe(e) {
|
|
289
289
|
if (typeof e != "string") return;
|
|
290
290
|
let t = Number.parseFloat(e);
|
|
291
291
|
return Number.isFinite(t) ? t : void 0;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function $e(e, t, n, r = !0) {
|
|
294
294
|
let i = n - t;
|
|
295
295
|
if (i === 0) return 0;
|
|
296
296
|
let a = (e - t) / i;
|
|
297
|
-
return r ?
|
|
297
|
+
return r ? L(a, 0, 1) : a;
|
|
298
298
|
}
|
|
299
299
|
//#endregion
|
|
300
300
|
//#region src/SPG/index.js
|
|
301
|
-
var
|
|
302
|
-
function
|
|
301
|
+
var et = "http://www.w3.org/2000/svg";
|
|
302
|
+
function tt(e) {
|
|
303
303
|
if (typeof document > "u") throw Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
|
|
304
|
-
let t = document.createElementNS(
|
|
304
|
+
let t = document.createElementNS(et, "svg");
|
|
305
305
|
t.setAttribute("width", "0"), t.setAttribute("height", "0"), t.setAttribute("viewBox", "0 0 0 0"), t.style.position = "absolute", t.style.left = "-10000px", t.style.top = "-10000px", t.style.visibility = "hidden", t.style.pointerEvents = "none";
|
|
306
|
-
let n = document.createElementNS(
|
|
306
|
+
let n = document.createElementNS(et, "path");
|
|
307
307
|
return e === "M " && (e = "M 0,0"), n.setAttribute("d", e), t.appendChild(n), document.body.appendChild(t), {
|
|
308
308
|
svgElement: t,
|
|
309
309
|
pathElement: n
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function nt(e) {
|
|
313
313
|
if (e) try {
|
|
314
314
|
e.svgElement?.remove?.();
|
|
315
315
|
} catch {}
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function rt(e, t, n) {
|
|
318
318
|
if (typeof n == "number" && n > 0) return n;
|
|
319
319
|
let r = t * .75;
|
|
320
320
|
r < .5 && (r = .5), r > 8 && (r = 8);
|
|
321
321
|
let i = e / 2;
|
|
322
322
|
return r > i && i > 0 && (r = i), r <= 0 && (r = 1), r;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function it(e, t, n) {
|
|
325
325
|
if (typeof t == "number" && t >= 1) return Math.floor(t);
|
|
326
326
|
let r = Math.ceil(e / (typeof n == "number" && n > 0 ? n : 2));
|
|
327
327
|
return r < 1 ? 1 : r;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function at(e, t, n, r, i, a) {
|
|
330
330
|
let o = n - t, s = Math.ceil(o / r) + 1;
|
|
331
331
|
s < 2 && (s = 2), s > a && (s = a);
|
|
332
|
-
let c = s > 1 ? o / (s - 1) : 0, l = e.getPointAtLength(t), u = `M ${R(
|
|
332
|
+
let c = s > 1 ? o / (s - 1) : 0, l = e.getPointAtLength(t), u = `M ${z(R(l.x, i))} ${z(R(l.y, i))}`;
|
|
333
333
|
for (let n = 1; n < s; n += 1) {
|
|
334
334
|
let r = t + n * c, a = e.getPointAtLength(r);
|
|
335
|
-
u += ` L ${R(
|
|
335
|
+
u += ` L ${z(R(a.x, i))} ${z(R(a.y, i))}`;
|
|
336
336
|
}
|
|
337
337
|
return u;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function ot(e, t, n, r, i, a) {
|
|
340
340
|
let o = n - t, s = Math.ceil(o / r) + 1;
|
|
341
341
|
s < 2 && (s = 2), s > a && (s = a);
|
|
342
|
-
let c = s > 1 ? o / (s - 1) : 0, l = e.getPointAtLength(t), u = l.x, d = l.x, f = l.y, p = l.y, ee = `M ${R(
|
|
342
|
+
let c = s > 1 ? o / (s - 1) : 0, l = e.getPointAtLength(t), u = l.x, d = l.x, f = l.y, p = l.y, ee = `M ${z(R(l.x, i))} ${z(R(l.y, i))}`;
|
|
343
343
|
for (let n = 1; n < s; n += 1) {
|
|
344
344
|
let r = t + n * c, a = e.getPointAtLength(r);
|
|
345
|
-
a.x < u && (u = a.x), a.x > d && (d = a.x), a.y < f && (f = a.y), a.y > p && (p = a.y), ee += ` L ${R(
|
|
345
|
+
a.x < u && (u = a.x), a.x > d && (d = a.x), a.y < f && (f = a.y), a.y > p && (p = a.y), ee += ` L ${z(R(a.x, i))} ${z(R(a.y, i))}`;
|
|
346
346
|
}
|
|
347
347
|
return {
|
|
348
348
|
pathData: ee,
|
|
@@ -354,7 +354,7 @@ function st(e, t, n, r, i, a) {
|
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function st(e) {
|
|
358
358
|
if (e.length === 1) return [{
|
|
359
359
|
position: 0,
|
|
360
360
|
rgba: e[0]
|
|
@@ -366,21 +366,21 @@ function ct(e) {
|
|
|
366
366
|
};
|
|
367
367
|
return t;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
let i =
|
|
369
|
+
function B(e, t, n, r) {
|
|
370
|
+
let i = L(t, 0, 1), a = r;
|
|
371
371
|
for (a < 0 && (a = 0), a > e.length - 2 && (a = e.length - 2); a > 0 && i < e[a].position;) --a;
|
|
372
372
|
for (; a < e.length - 2 && i > e[a + 1].position;) a += 1;
|
|
373
373
|
let o = e[a], s = e[a + 1], c = s.position - o.position, l = c > 0 ? (i - o.position) / c : 0;
|
|
374
|
-
return
|
|
374
|
+
return W(V(o.rgba, s.rgba, l, n));
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
let i =
|
|
376
|
+
function V(e, t, n, r) {
|
|
377
|
+
let i = L(n, 0, 1);
|
|
378
378
|
if (r === "linearRGB") {
|
|
379
|
-
let n =
|
|
379
|
+
let n = H(e.red), r = H(e.green), a = H(e.blue), o = H(t.red), s = H(t.green), c = H(t.blue), l = n + (o - n) * i, u = r + (s - r) * i, d = a + (c - a) * i;
|
|
380
380
|
return {
|
|
381
|
-
red:
|
|
382
|
-
green:
|
|
383
|
-
blue:
|
|
381
|
+
red: U(l),
|
|
382
|
+
green: U(u),
|
|
383
|
+
blue: U(d),
|
|
384
384
|
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
385
385
|
};
|
|
386
386
|
}
|
|
@@ -391,50 +391,50 @@ function B(e, t, n, r) {
|
|
|
391
391
|
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
function V(e) {
|
|
395
|
-
let t = I(e / 255, 0, 1);
|
|
396
|
-
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
397
|
-
}
|
|
398
394
|
function H(e) {
|
|
399
|
-
let t =
|
|
400
|
-
return
|
|
395
|
+
let t = L(e / 255, 0, 1);
|
|
396
|
+
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
401
397
|
}
|
|
402
398
|
function U(e) {
|
|
403
|
-
let t =
|
|
404
|
-
return t
|
|
399
|
+
let t = L(e, 0, 1), n;
|
|
400
|
+
return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, L(Math.round(n * 255), 0, 255);
|
|
401
|
+
}
|
|
402
|
+
function W(e) {
|
|
403
|
+
let t = L(e.alpha, 0, 1), n = L(Math.round(e.red), 0, 255), r = L(Math.round(e.green), 0, 255), i = L(Math.round(e.blue), 0, 255);
|
|
404
|
+
return t >= 1 ? `#${Ze(n)}${Ze(r)}${Ze(i)}` : `rgba(${n}, ${r}, ${i}, ${R(t, 4).toString()})`;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
let t = `fill="${
|
|
406
|
+
function ct(e) {
|
|
407
|
+
let t = `fill="${G(e.fill ?? "none")}"`, n = Object.keys(e);
|
|
408
408
|
for (let r = 0; r < n.length; r += 1) {
|
|
409
409
|
let i = n[r];
|
|
410
410
|
if (i === "stroke" || i === "d") continue;
|
|
411
411
|
let a = e[i];
|
|
412
|
-
t += ` ${i}="${
|
|
412
|
+
t += ` ${i}="${G(a)}"`;
|
|
413
413
|
}
|
|
414
414
|
return t;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
return `<path d="${
|
|
416
|
+
function lt(e, t, n) {
|
|
417
|
+
return `<path d="${G(e)}" stroke="${G(t)}" ${n} />`;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function ut(e) {
|
|
420
420
|
let t = [], n = e.segmentAttributeMap.fill ?? "none";
|
|
421
|
-
t.push(`fill="${
|
|
421
|
+
t.push(`fill="${G(n)}"`), t.push(`stroke="${G(e.stroke)}"`);
|
|
422
422
|
for (let n of Object.keys(e.segmentAttributeMap)) {
|
|
423
423
|
if (n === "stroke" || n === "d") continue;
|
|
424
424
|
let r = e.segmentAttributeMap[n];
|
|
425
|
-
t.push(`${n}="${
|
|
425
|
+
t.push(`${n}="${G(r)}"`);
|
|
426
426
|
}
|
|
427
|
-
return `<path d="${
|
|
427
|
+
return `<path d="${G(e.pathData)}" ${t.join(" ")} />`;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function dt(e, t) {
|
|
430
430
|
let n = [];
|
|
431
|
-
for (let e of Object.keys(t)) n.push(`${e}="${
|
|
431
|
+
for (let e of Object.keys(t)) n.push(`${e}="${G(t[e])}"`);
|
|
432
432
|
return `<g data-svg-path-gradient="true"${n.length ? " " + n.join(" ") : ""}>${e.join("")}</g>`;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function G(e) {
|
|
435
435
|
return String(e).replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function ft(e, t = null, n = {}) {
|
|
438
438
|
return new Promise((r, i) => {
|
|
439
439
|
let a = null;
|
|
440
440
|
try {
|
|
@@ -442,16 +442,16 @@ function pt(e, t = null, n = {}) {
|
|
|
442
442
|
let i = n.temperatureMode ?? null;
|
|
443
443
|
if (i === null && (!Array.isArray(t) || t.length === 0)) throw Error("SvgPathGradientAsync: colors must be a non-empty array when temperatureMode is not enabled.");
|
|
444
444
|
if ((n.returnMode ?? "string") !== "string") throw Error("SvgPathGradientAsync: only returnMode=\"string\" is supported for the async version.");
|
|
445
|
-
let o = typeof n.decimalPlaces == "number" ? n.decimalPlaces : 3, s = typeof n.flattenTolerance == "number" && n.flattenTolerance > 0 ? n.flattenTolerance : .25, c = n.attrs ? { ...n.attrs } : {}, l = n.groupAttrs ? { ...n.groupAttrs } : {}, u =
|
|
446
|
-
a =
|
|
447
|
-
let f = a.pathElement, p = f.getTotalLength(), ee = i === null ?
|
|
445
|
+
let o = typeof n.decimalPlaces == "number" ? n.decimalPlaces : 3, s = typeof n.flattenTolerance == "number" && n.flattenTolerance > 0 ? n.flattenTolerance : .25, c = n.attrs ? { ...n.attrs } : {}, l = n.groupAttrs ? { ...n.groupAttrs } : {}, u = Qe(c["stroke-width"]), d = typeof n.strokeWidth == "number" && n.strokeWidth > 0 ? n.strokeWidth : typeof u == "number" && u > 0 ? u : 1;
|
|
446
|
+
a = tt(e);
|
|
447
|
+
let f = a.pathElement, p = f.getTotalLength(), ee = i === null ? P(t, n.colorReferenceElement) : [];
|
|
448
448
|
if (i === null && (!(p > 0) || ee.length === 1)) {
|
|
449
|
-
let t =
|
|
449
|
+
let t = dt([ut({
|
|
450
450
|
pathData: e,
|
|
451
|
-
stroke:
|
|
451
|
+
stroke: W(ee[0]),
|
|
452
452
|
segmentAttributeMap: c
|
|
453
453
|
})], l);
|
|
454
|
-
|
|
454
|
+
nt(a), r(t);
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
457
|
let te = n.colorSpace ?? "linearRGB";
|
|
@@ -459,59 +459,59 @@ function pt(e, t = null, n = {}) {
|
|
|
459
459
|
let e = n.temperatureColors;
|
|
460
460
|
if (!Array.isArray(e) || e.length !== 2) throw Error("SvgPathGradientAsync: temperatureColors must be a tuple of exactly 2 colors when temperatureMode is enabled.");
|
|
461
461
|
}
|
|
462
|
-
let ne = i === null ? null :
|
|
463
|
-
let e =
|
|
462
|
+
let ne = i === null ? null : P(n.temperatureColors, n.colorReferenceElement), re = i === null ? (() => {
|
|
463
|
+
let e = st(ee), t = Array(e.length);
|
|
464
464
|
for (let n = 0; n < e.length; n += 1) t[n] = {
|
|
465
465
|
position: e[n].position,
|
|
466
466
|
rgba: e[n].rgba
|
|
467
467
|
};
|
|
468
468
|
return t;
|
|
469
|
-
})() : [], ie =
|
|
470
|
-
|
|
471
|
-
let
|
|
469
|
+
})() : [], ie = rt(p, d, n.maxSegmentLength), ae = it(p, n.segments, ie), oe = p / ae, se = typeof n.overlap == "number" && n.overlap >= 0 ? n.overlap : d * .5, ce = oe * .45;
|
|
470
|
+
se > ce && (se = ce);
|
|
471
|
+
let le = typeof n.samplePointLimitPerSegment == "number" && n.samplePointLimitPerSegment > 10 ? n.samplePointLimitPerSegment : 250, ue = ct(c), de = [], fe = i === null ? null : [], m = i === null ? null : [], pe = 0, me = i === null ? re.length - 2 : 0, h = 0, he = () => {
|
|
472
472
|
let e = performance.now(), t = typeof n.frameBudgetMs == "number" ? n.frameBudgetMs : 8;
|
|
473
|
-
for (; h <
|
|
474
|
-
let e = h *
|
|
475
|
-
if (h !== 0 && (n = e -
|
|
476
|
-
let e =
|
|
477
|
-
|
|
473
|
+
for (; h < ae && performance.now() - e < t;) {
|
|
474
|
+
let e = h * oe, t = (h + 1) * oe, n = e, r = t;
|
|
475
|
+
if (h !== 0 && (n = e - se), h !== ae - 1 && (r = t + se), n = L(n, 0, p), r = L(r, 0, p), r > n) if (i !== null) {
|
|
476
|
+
let e = ot(f, n, r, s, o, le);
|
|
477
|
+
fe.push(e.pathData), m.push(e.bounds);
|
|
478
478
|
} else {
|
|
479
479
|
let e = (n + r) * .5 / p;
|
|
480
480
|
for (; pe < me && e > re[pe + 1].position;) pe += 1;
|
|
481
|
-
let t =
|
|
482
|
-
|
|
481
|
+
let t = B(re, e, te, pe), i = at(f, n, r, s, o, le);
|
|
482
|
+
de.push(lt(i, t, ue));
|
|
483
483
|
}
|
|
484
484
|
h += 1;
|
|
485
485
|
}
|
|
486
|
-
if (h <
|
|
486
|
+
if (h < ae) {
|
|
487
487
|
requestAnimationFrame(he);
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
490
|
if (i !== null) {
|
|
491
491
|
let e = Infinity, t = -Infinity;
|
|
492
|
-
for (let n = 0; n <
|
|
493
|
-
let r =
|
|
492
|
+
for (let n = 0; n < m.length; n += 1) {
|
|
493
|
+
let r = m[n], a = i === "vertical" ? r.minY : r.minX, o = i === "vertical" ? r.maxY : r.maxX;
|
|
494
494
|
a < e && (e = a), o > t && (t = o);
|
|
495
495
|
}
|
|
496
496
|
let n = ne[0], r = ne[1];
|
|
497
|
-
|
|
498
|
-
for (let a = 0; a <
|
|
499
|
-
let o =
|
|
500
|
-
|
|
497
|
+
de.length = 0;
|
|
498
|
+
for (let a = 0; a < m.length; a += 1) {
|
|
499
|
+
let o = m[a], s = $e(((i === "vertical" ? o.minY : o.minX) + (i === "vertical" ? o.maxY : o.maxX)) * .5, e, t, !0), c = W(i === "vertical" ? Xe(n, r, s, te) : Xe(r, n, s, te)), l = fe[a];
|
|
500
|
+
de.push(lt(l, c, ue));
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
let c =
|
|
504
|
-
|
|
503
|
+
let c = dt(de, l);
|
|
504
|
+
nt(a), r(c);
|
|
505
505
|
};
|
|
506
506
|
requestAnimationFrame(he);
|
|
507
507
|
} catch (e) {
|
|
508
|
-
|
|
508
|
+
nt(a), i(e);
|
|
509
509
|
}
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
512
|
//#endregion
|
|
513
513
|
//#region src/atoms/SparklineGradientPath.vue
|
|
514
|
-
var
|
|
514
|
+
var pt = ["innerHTML"], mt = {
|
|
515
515
|
__name: "SparklineGradientPath",
|
|
516
516
|
props: {
|
|
517
517
|
svgPathData: {
|
|
@@ -554,7 +554,7 @@ var mt = ["innerHTML"], ht = {
|
|
|
554
554
|
n.value = "";
|
|
555
555
|
return;
|
|
556
556
|
}
|
|
557
|
-
let a = await
|
|
557
|
+
let a = await ft(t.svgPathData, null, {
|
|
558
558
|
segments: t.segments,
|
|
559
559
|
temperatureMode: "vertical",
|
|
560
560
|
temperatureColors: [t.highColor, t.lowColor],
|
|
@@ -566,54 +566,54 @@ var mt = ["innerHTML"], ht = {
|
|
|
566
566
|
groupAttrs: { class: "vue-ui-sparkline-gradient" }
|
|
567
567
|
});
|
|
568
568
|
i === r && (n.value = a);
|
|
569
|
-
}, { immediate: !0 }), (e, t) => (C(), y("g", { innerHTML: n.value }, null, 8,
|
|
569
|
+
}, { immediate: !0 }), (e, t) => (C(), y("g", { innerHTML: n.value }, null, 8, pt));
|
|
570
570
|
}
|
|
571
|
-
},
|
|
571
|
+
}, ht = /* @__PURE__ */ e({ default: () => K }), gt = ["id"], _t = ["id"], vt = { style: { position: "relative" } }, yt = [
|
|
572
572
|
"xmlns",
|
|
573
573
|
"viewBox",
|
|
574
574
|
"aria-describedby"
|
|
575
|
-
],
|
|
575
|
+
], bt = ["width", "height"], xt = ["id"], St = ["stop-color"], Ct = ["stop-color"], wt = ["id"], Tt = ["stop-color"], Et = ["stop-color"], Dt = ["id"], Ot = ["stop-color"], kt = ["stop-color"], At = ["id"], jt = [
|
|
576
576
|
"id",
|
|
577
577
|
"y1",
|
|
578
578
|
"y2"
|
|
579
|
-
],
|
|
579
|
+
], Mt = ["stop-color", "offset"], Nt = { key: 1 }, Pt = [
|
|
580
580
|
"data-cy",
|
|
581
581
|
"d",
|
|
582
582
|
"fill"
|
|
583
|
-
],
|
|
583
|
+
], Ft = [
|
|
584
584
|
"id",
|
|
585
585
|
"d",
|
|
586
586
|
"stroke-width"
|
|
587
|
-
],
|
|
587
|
+
], It = [
|
|
588
588
|
"d",
|
|
589
589
|
"stroke",
|
|
590
590
|
"stroke-width",
|
|
591
591
|
"stroke-dasharray"
|
|
592
|
-
],
|
|
592
|
+
], Lt = [
|
|
593
593
|
"d",
|
|
594
594
|
"stroke",
|
|
595
595
|
"stroke-width"
|
|
596
|
-
],
|
|
596
|
+
], Rt = [
|
|
597
597
|
"id",
|
|
598
598
|
"d",
|
|
599
599
|
"stroke-width"
|
|
600
|
-
],
|
|
600
|
+
], zt = [
|
|
601
601
|
"d",
|
|
602
602
|
"stroke",
|
|
603
603
|
"stroke-width",
|
|
604
604
|
"stroke-dasharray"
|
|
605
|
-
],
|
|
605
|
+
], Bt = [
|
|
606
606
|
"d",
|
|
607
607
|
"stroke",
|
|
608
608
|
"stroke-width"
|
|
609
|
-
],
|
|
609
|
+
], Vt = [
|
|
610
610
|
"x",
|
|
611
611
|
"y",
|
|
612
612
|
"width",
|
|
613
613
|
"height",
|
|
614
614
|
"fill",
|
|
615
615
|
"rx"
|
|
616
|
-
],
|
|
616
|
+
], Ht = [
|
|
617
617
|
"x1",
|
|
618
618
|
"x2",
|
|
619
619
|
"y1",
|
|
@@ -621,7 +621,7 @@ var mt = ["innerHTML"], ht = {
|
|
|
621
621
|
"stroke",
|
|
622
622
|
"stroke-width",
|
|
623
623
|
"stroke-dasharray"
|
|
624
|
-
],
|
|
624
|
+
], Ut = [
|
|
625
625
|
"x1",
|
|
626
626
|
"x2",
|
|
627
627
|
"y1",
|
|
@@ -629,20 +629,20 @@ var mt = ["innerHTML"], ht = {
|
|
|
629
629
|
"stroke",
|
|
630
630
|
"stroke-dasharray",
|
|
631
631
|
"stroke-width"
|
|
632
|
-
],
|
|
632
|
+
], Wt = [
|
|
633
633
|
"cx",
|
|
634
634
|
"cy",
|
|
635
635
|
"r",
|
|
636
636
|
"fill",
|
|
637
637
|
"stroke",
|
|
638
638
|
"stroke-width"
|
|
639
|
-
],
|
|
639
|
+
], Gt = [
|
|
640
640
|
"x",
|
|
641
641
|
"y",
|
|
642
642
|
"font-size",
|
|
643
643
|
"font-weight",
|
|
644
644
|
"fill"
|
|
645
|
-
],
|
|
645
|
+
], Kt = [
|
|
646
646
|
"x",
|
|
647
647
|
"y",
|
|
648
648
|
"height",
|
|
@@ -650,7 +650,7 @@ var mt = ["innerHTML"], ht = {
|
|
|
650
650
|
"onMouseenter",
|
|
651
651
|
"onMouseleave",
|
|
652
652
|
"onClick"
|
|
653
|
-
],
|
|
653
|
+
], qt = {
|
|
654
654
|
key: 0,
|
|
655
655
|
style: {
|
|
656
656
|
position: "absolute",
|
|
@@ -660,7 +660,7 @@ var mt = ["innerHTML"], ht = {
|
|
|
660
660
|
},
|
|
661
661
|
"data-dom-to-png-ignore": "",
|
|
662
662
|
"aria-hidden": "true"
|
|
663
|
-
},
|
|
663
|
+
}, K = /*#__PURE__*/ ve({
|
|
664
664
|
__name: "vue-ui-sparkline",
|
|
665
665
|
props: {
|
|
666
666
|
config: {
|
|
@@ -694,17 +694,17 @@ var mt = ["innerHTML"], ht = {
|
|
|
694
694
|
},
|
|
695
695
|
emits: ["hoverIndex", "selectDatapoint"],
|
|
696
696
|
setup(e, { emit: ve }) {
|
|
697
|
-
let Re = Oe(() => import("./PackageVersion-
|
|
698
|
-
function
|
|
697
|
+
let Re = Oe(() => import("./PackageVersion-DW7zwRcm.js").then((e) => e.t)), ze = Oe(() => import("./SparkTooltip-BTLN-Kex.js")), { vue_ui_sparkline: Be } = me(), { isThemeValid: Ve, warnInvalidTheme: He } = _e(), Ue = Ce(), k = e, We = _(() => Array.isArray(k.dataset) && k.dataset.length > 0), A = w(a()), j = w(null), Ke = w(null), qe = w(null), M = w(null), N = w(null), P = w(R());
|
|
698
|
+
function Je(e) {
|
|
699
699
|
return k.config?.skeletonDataset && Array.isArray(k.config.skeletonDataset) ? k.config.skeletonDataset.map((e) => ({
|
|
700
700
|
period: "-",
|
|
701
701
|
value: e
|
|
702
|
-
})) :
|
|
702
|
+
})) : le(e).map((e) => ({
|
|
703
703
|
period: "-",
|
|
704
704
|
value: e
|
|
705
705
|
}));
|
|
706
706
|
}
|
|
707
|
-
let
|
|
707
|
+
let Ye = _(() => s({
|
|
708
708
|
defaultConfig: {
|
|
709
709
|
gradientPath: { show: !1 },
|
|
710
710
|
temperatureColors: { show: !1 },
|
|
@@ -725,23 +725,23 @@ var mt = ["innerHTML"], ht = {
|
|
|
725
725
|
tooltip: { show: !1 }
|
|
726
726
|
}
|
|
727
727
|
},
|
|
728
|
-
userConfig:
|
|
729
|
-
})), { loading:
|
|
728
|
+
userConfig: P.value.skeletonConfig ?? {}
|
|
729
|
+
})), { loading: F, FINAL_DATASET: I, manualLoading: Xe } = h({
|
|
730
730
|
...Fe(k),
|
|
731
|
-
FINAL_CONFIG:
|
|
732
|
-
prepareConfig:
|
|
731
|
+
FINAL_CONFIG: P,
|
|
732
|
+
prepareConfig: R,
|
|
733
733
|
callback: () => {
|
|
734
734
|
Promise.resolve().then(async () => {
|
|
735
|
-
await x(),
|
|
735
|
+
await x(), pt();
|
|
736
736
|
});
|
|
737
737
|
},
|
|
738
|
-
skeletonDataset:
|
|
739
|
-
skeletonConfig:
|
|
740
|
-
defaultConfig:
|
|
741
|
-
userConfig:
|
|
738
|
+
skeletonDataset: Je(12),
|
|
739
|
+
skeletonConfig: s({
|
|
740
|
+
defaultConfig: P.value,
|
|
741
|
+
userConfig: Ye.value
|
|
742
742
|
})
|
|
743
|
-
}), { svgRef:
|
|
744
|
-
function
|
|
743
|
+
}), { svgRef: L } = Se({ config: P.value.style.title });
|
|
744
|
+
function R() {
|
|
745
745
|
let e = ge({
|
|
746
746
|
userConfig: k.config,
|
|
747
747
|
defaultConfig: Be
|
|
@@ -760,30 +760,30 @@ var mt = ["innerHTML"], ht = {
|
|
|
760
760
|
else t = e;
|
|
761
761
|
return t;
|
|
762
762
|
}
|
|
763
|
-
let
|
|
764
|
-
function
|
|
765
|
-
if (!
|
|
766
|
-
|
|
763
|
+
let z = _(() => P.value?.style?.line.pulse || {}), Ze = _(() => `${Math.max(200, Number(z.value.durationMs) || 4e3) / 1e3}s`), Qe = w(0), $e = _(() => z.value?.begin || "0ms"), et = w("0;1"), tt = _(() => z.value?.loop === !1 ? "1" : "indefinite"), nt = _(() => z.value?.loop === !1 ? "freeze" : void 0), rt = _(() => z.value.trail.show && st.value.lengthPx || 1), it = _(() => !!z.value?.show && !Q.value && !Ue.value && !F.value && (Y.value?.length || 0) > 1);
|
|
764
|
+
function at() {
|
|
765
|
+
if (!it.value) {
|
|
766
|
+
Qe.value = 0;
|
|
767
767
|
return;
|
|
768
768
|
}
|
|
769
|
-
let e =
|
|
769
|
+
let e = L.value;
|
|
770
770
|
if (!e) return;
|
|
771
|
-
let t = `#${
|
|
771
|
+
let t = `#${K.value}`, n = e.querySelector?.(t);
|
|
772
772
|
if (n && typeof n.getTotalLength == "function") {
|
|
773
773
|
let e = n.getTotalLength();
|
|
774
|
-
Number.isFinite(e) && e > 0 && (
|
|
774
|
+
Number.isFinite(e) && e > 0 && (Qe.value = e);
|
|
775
775
|
return;
|
|
776
776
|
}
|
|
777
777
|
requestAnimationFrame(() => {
|
|
778
778
|
let n = e.querySelector?.(t);
|
|
779
779
|
if (n && typeof n.getTotalLength == "function") {
|
|
780
780
|
let e = n.getTotalLength();
|
|
781
|
-
Number.isFinite(e) && e > 0 && (
|
|
781
|
+
Number.isFinite(e) && e > 0 && (Qe.value = e);
|
|
782
782
|
}
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
|
-
let
|
|
786
|
-
let e =
|
|
785
|
+
let ot = _(() => {
|
|
786
|
+
let e = z.value?.easing || "ease-in-out", t = {
|
|
787
787
|
ease: [
|
|
788
788
|
.25,
|
|
789
789
|
.1,
|
|
@@ -819,7 +819,7 @@ var mt = ["innerHTML"], ht = {
|
|
|
819
819
|
keyTimes: "0;1"
|
|
820
820
|
} : {
|
|
821
821
|
calcMode: "spline",
|
|
822
|
-
keySplines: (e === "cubic-bezier" ? Array.isArray(
|
|
822
|
+
keySplines: (e === "cubic-bezier" ? Array.isArray(z.value?.cubicBezier) && z.value.cubicBezier.length === 4 ? z.value.cubicBezier : [
|
|
823
823
|
.4,
|
|
824
824
|
0,
|
|
825
825
|
.2,
|
|
@@ -827,8 +827,8 @@ var mt = ["innerHTML"], ht = {
|
|
|
827
827
|
] : t[e] || t["ease-in-out"]).join(" "),
|
|
828
828
|
keyTimes: "0;1"
|
|
829
829
|
};
|
|
830
|
-
}),
|
|
831
|
-
let e =
|
|
830
|
+
}), st = _(() => {
|
|
831
|
+
let e = z.value?.trail || {}, t = P.value.style.line.strokeWidth || 1;
|
|
832
832
|
return {
|
|
833
833
|
show: e.show !== !1,
|
|
834
834
|
lengthPx: e.length,
|
|
@@ -837,214 +837,214 @@ var mt = ["innerHTML"], ht = {
|
|
|
837
837
|
fadeIn: .5,
|
|
838
838
|
fadeOut: .2
|
|
839
839
|
};
|
|
840
|
-
}),
|
|
841
|
-
data:
|
|
842
|
-
threshold:
|
|
840
|
+
}), B = _(() => p({
|
|
841
|
+
data: I.value,
|
|
842
|
+
threshold: P.value.downsample.threshold
|
|
843
843
|
}));
|
|
844
844
|
_(() => {
|
|
845
|
-
if (!
|
|
846
|
-
let e =
|
|
845
|
+
if (!P.value.temperatureColors.show) return !1;
|
|
846
|
+
let e = I.value.map(({ value: e }) => e).filter((e) => Number.isFinite(e));
|
|
847
847
|
return new Set(e).size <= 1;
|
|
848
848
|
}), O(() => k.config, (e) => {
|
|
849
|
-
|
|
849
|
+
F.value || (P.value = R()), Zt(), q.value.chartWidth = P.value.style.chartWidth;
|
|
850
850
|
}, { deep: !0 }), O(() => k.dataset, (e) => {
|
|
851
|
-
Array.isArray(e) && e.length > 0 && (
|
|
852
|
-
data:
|
|
851
|
+
Array.isArray(e) && e.length > 0 && (Xe.value = !1), V.value = p({
|
|
852
|
+
data: I.value.map((e) => ({
|
|
853
853
|
...e,
|
|
854
854
|
value: [void 0].includes(e.value) ? null : e.value
|
|
855
855
|
})),
|
|
856
|
-
threshold:
|
|
856
|
+
threshold: P.value.downsample.threshold
|
|
857
857
|
});
|
|
858
858
|
}, { deep: !0 });
|
|
859
|
-
let
|
|
860
|
-
function
|
|
861
|
-
return
|
|
862
|
-
data:
|
|
859
|
+
let V = w(H());
|
|
860
|
+
function H() {
|
|
861
|
+
return p({
|
|
862
|
+
data: I.value.map((e) => P.value.style.animation.show && I.value.length > 1 ? {
|
|
863
863
|
...e,
|
|
864
864
|
value: null
|
|
865
865
|
} : {
|
|
866
866
|
...e,
|
|
867
867
|
value: [void 0].includes(e.value) ? null : e.value
|
|
868
868
|
}),
|
|
869
|
-
threshold:
|
|
869
|
+
threshold: P.value.downsample.threshold
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
|
-
let
|
|
873
|
-
let e = (
|
|
872
|
+
let U = Ne(null), W = Ne(null), ct = w(!1), lt = w(0), ut = w([]), dt = w(""), G = _(() => {
|
|
873
|
+
let e = (B.value || []).map((e) => `${e.period}::${Number.isFinite(e.value) ? e.value : 0}`).join("|"), t = P.value?.style?.animation || {}, n = !!P.value?.gradientPath?.show && !P.value.temperatureColors.show;
|
|
874
874
|
return `${e}#${!!t.show}#${t.animationFrames || 0}#${n}`;
|
|
875
875
|
});
|
|
876
|
-
function
|
|
877
|
-
|
|
876
|
+
function ft() {
|
|
877
|
+
lt.value &&= (cancelAnimationFrame(lt.value), 0), ut.value.forEach((e) => clearTimeout(e)), ut.value = [], ct.value = !1;
|
|
878
878
|
}
|
|
879
|
-
function
|
|
880
|
-
let e =
|
|
881
|
-
if (n && n ===
|
|
882
|
-
if (
|
|
883
|
-
|
|
879
|
+
function pt() {
|
|
880
|
+
let e = P.value?.style?.animation || {}, t = B.value || [], n = G.value, r = !!P.value.gradientPath.show && !P.value.temperatureColors.show;
|
|
881
|
+
if (n && n === dt.value && (ct.value || V.value.length === t.length)) return;
|
|
882
|
+
if (ft(), r || !e.show || F.value || t.length <= 1) {
|
|
883
|
+
V.value = t, dt.value = n;
|
|
884
884
|
return;
|
|
885
885
|
}
|
|
886
|
-
|
|
886
|
+
ct.value = !0, dt.value = n, V.value = [];
|
|
887
887
|
let i = Math.max(1, Number(e.animationFrames) || 1), a = Math.max(1, Math.floor(i / t.length)), o = 0, s = () => {
|
|
888
|
-
if (n !==
|
|
889
|
-
|
|
888
|
+
if (n !== G.value) {
|
|
889
|
+
ft();
|
|
890
890
|
return;
|
|
891
891
|
}
|
|
892
892
|
if (o < t.length) {
|
|
893
|
-
|
|
893
|
+
V.value.push(t[o]);
|
|
894
894
|
let e = setTimeout(() => {
|
|
895
|
-
|
|
895
|
+
lt.value = requestAnimationFrame(s);
|
|
896
896
|
}, a);
|
|
897
|
-
|
|
898
|
-
} else
|
|
897
|
+
ut.value.push(e), o += 1;
|
|
898
|
+
} else V.value = t, ft();
|
|
899
899
|
};
|
|
900
|
-
|
|
900
|
+
lt.value = requestAnimationFrame(s);
|
|
901
901
|
}
|
|
902
|
-
O(
|
|
903
|
-
|
|
902
|
+
O(G, () => {
|
|
903
|
+
pt();
|
|
904
904
|
}), Me(() => {
|
|
905
|
-
|
|
905
|
+
Zt(), pt();
|
|
906
906
|
}), je(() => {
|
|
907
|
-
|
|
907
|
+
ft();
|
|
908
908
|
});
|
|
909
|
-
let
|
|
910
|
-
O(() =>
|
|
911
|
-
e || (await x(),
|
|
912
|
-
}), O(() =>
|
|
913
|
-
e ||
|
|
909
|
+
let ht = w(0);
|
|
910
|
+
O(() => F.value, async (e) => {
|
|
911
|
+
e || (await x(), ht.value += 1);
|
|
912
|
+
}), O(() => ct.value, async (e) => {
|
|
913
|
+
e || F.value || (await x(), ht.value += 1);
|
|
914
914
|
});
|
|
915
|
-
let
|
|
916
|
-
async function
|
|
917
|
-
|
|
915
|
+
let K = _(() => `sparkline_line_path_${A.value}`), Jt = w(!0);
|
|
916
|
+
async function Yt() {
|
|
917
|
+
Jt.value = !1, await x(), Jt.value = !0, await x(), at();
|
|
918
918
|
}
|
|
919
|
-
let
|
|
920
|
-
function
|
|
921
|
-
if (
|
|
919
|
+
let Xt = _(() => !!P.value.debug);
|
|
920
|
+
function Zt() {
|
|
921
|
+
if (se(k.dataset) ? (t({
|
|
922
922
|
componentName: "VueUiSparkline",
|
|
923
923
|
type: "dataset",
|
|
924
|
-
debug:
|
|
925
|
-
}),
|
|
926
|
-
|
|
924
|
+
debug: Xt.value
|
|
925
|
+
}), Xe.value = !0) : k.dataset.forEach((e, n) => {
|
|
926
|
+
ne({
|
|
927
927
|
datasetObject: e,
|
|
928
928
|
requiredAttributes: ["period", "value"]
|
|
929
929
|
}).forEach((e) => {
|
|
930
|
-
|
|
930
|
+
t({
|
|
931
931
|
componentName: "VueUiSparkline",
|
|
932
932
|
type: "datasetSerieAttribute",
|
|
933
933
|
property: e,
|
|
934
|
-
index:
|
|
935
|
-
debug:
|
|
934
|
+
index: n,
|
|
935
|
+
debug: Xt.value
|
|
936
936
|
});
|
|
937
937
|
});
|
|
938
|
-
}),
|
|
938
|
+
}), se(k.dataset) || (Xe.value = P.value.loading), P.value.responsive) {
|
|
939
939
|
let e = ye(() => {
|
|
940
940
|
let { width: e, height: t } = be({
|
|
941
|
-
chart:
|
|
942
|
-
title:
|
|
943
|
-
source:
|
|
941
|
+
chart: j.value,
|
|
942
|
+
title: P.value.style.title.show && k.showInfo ? Ke.value : null,
|
|
943
|
+
source: qe.value
|
|
944
944
|
});
|
|
945
945
|
requestAnimationFrame(() => {
|
|
946
|
-
|
|
946
|
+
q.value.width = e, q.value.height = t, q.value.chartWidth = P.value.style.chartWidth / 500 * e, q.value.padding = k.forcedPadding / 500 * e;
|
|
947
947
|
});
|
|
948
948
|
});
|
|
949
|
-
|
|
949
|
+
U.value && (W.value && U.value.unobserve(W.value), U.value.disconnect()), U.value = new ResizeObserver(e), W.value = j.value.parentNode, U.value.observe(W.value);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
je(() => {
|
|
953
|
-
|
|
953
|
+
U.value && (W.value && U.value.unobserve(W.value), U.value.disconnect());
|
|
954
954
|
});
|
|
955
|
-
let
|
|
955
|
+
let q = w({
|
|
956
956
|
height: 80 * k.heightRatio,
|
|
957
957
|
width: 500,
|
|
958
|
-
chartWidth:
|
|
958
|
+
chartWidth: P.value.style.chartWidth,
|
|
959
959
|
padding: k.forcedPadding
|
|
960
|
-
}),
|
|
961
|
-
let { top: e, right: t, bottom: n, left: r } =
|
|
960
|
+
}), Qt = ve, J = _(() => {
|
|
961
|
+
let { top: e, right: t, bottom: n, left: r } = P.value.style.padding;
|
|
962
962
|
return {
|
|
963
963
|
top: e,
|
|
964
964
|
left: r,
|
|
965
|
-
right:
|
|
966
|
-
bottom:
|
|
967
|
-
start: k.showInfo &&
|
|
968
|
-
width: k.showInfo &&
|
|
969
|
-
height:
|
|
965
|
+
right: q.value.width - t,
|
|
966
|
+
bottom: q.value.height - n,
|
|
967
|
+
start: k.showInfo && P.value.style.dataLabel.show && P.value.style.dataLabel.position === "left" ? q.value.width - q.value.chartWidth + r : q.value.padding + r,
|
|
968
|
+
width: k.showInfo && P.value.style.dataLabel.show ? q.value.chartWidth - r - t : q.value.width - q.value.padding - r - t,
|
|
969
|
+
height: q.value.height - e - n
|
|
970
970
|
};
|
|
971
|
-
}),
|
|
971
|
+
}), $t = _(() => [null, void 0].includes(P.value.style.scaleMin) ? Math.min(...V.value.map((e) => isNaN(e.value) || [
|
|
972
972
|
void 0,
|
|
973
973
|
null,
|
|
974
974
|
"NaN",
|
|
975
975
|
NaN,
|
|
976
976
|
Infinity,
|
|
977
977
|
-Infinity
|
|
978
|
-
].includes(e.value) ? 0 : e.value || 0)) :
|
|
978
|
+
].includes(e.value) ? 0 : e.value || 0)) : P.value.style.scaleMin), en = _(() => [null, void 0].includes(P.value.style.scaleMax) ? Math.max(...V.value.map((e) => isNaN(e.value) || [
|
|
979
979
|
void 0,
|
|
980
980
|
null,
|
|
981
981
|
"NaN",
|
|
982
982
|
NaN,
|
|
983
983
|
Infinity,
|
|
984
984
|
-Infinity
|
|
985
|
-
].includes(e.value) ? 0 : e.value || 0)) :
|
|
986
|
-
let e =
|
|
985
|
+
].includes(e.value) ? 0 : e.value || 0)) : P.value.style.scaleMax), tn = _(() => {
|
|
986
|
+
let e = $t.value >= 0 ? 0 : $t.value;
|
|
987
987
|
return Math.abs(e);
|
|
988
|
-
}),
|
|
989
|
-
function
|
|
990
|
-
return isNaN(e /
|
|
988
|
+
}), nn = _(() => en.value + tn.value), rn = _(() => J.value.bottom - J.value.height * an(tn.value));
|
|
989
|
+
function an(e) {
|
|
990
|
+
return isNaN(e / nn.value) ? 0 : e / nn.value;
|
|
991
991
|
}
|
|
992
|
-
let
|
|
992
|
+
let on = _(() => B.value.length - 1 || 1), sn = w([]), cn = 0;
|
|
993
993
|
Ie(() => {
|
|
994
|
-
let e = ++
|
|
994
|
+
let e = ++cn;
|
|
995
995
|
(async () => {
|
|
996
996
|
let t = await pe({
|
|
997
|
-
values:
|
|
998
|
-
maxDatapoints:
|
|
999
|
-
formatter:
|
|
997
|
+
values: B.value.map((e) => e.period),
|
|
998
|
+
maxDatapoints: B.value.length,
|
|
999
|
+
formatter: P.value.style.dataLabel.datetimeFormatter,
|
|
1000
1000
|
start: 0,
|
|
1001
|
-
end:
|
|
1001
|
+
end: B.value.length
|
|
1002
1002
|
});
|
|
1003
|
-
e ===
|
|
1003
|
+
e === cn && (sn.value = t);
|
|
1004
1004
|
})();
|
|
1005
1005
|
});
|
|
1006
|
-
let
|
|
1006
|
+
let Y = _(() => V.value.map((e, t) => {
|
|
1007
1007
|
let n = isNaN(e.value) || [
|
|
1008
1008
|
void 0,
|
|
1009
1009
|
"NaN",
|
|
1010
1010
|
NaN,
|
|
1011
1011
|
Infinity,
|
|
1012
1012
|
-Infinity
|
|
1013
|
-
].includes(e.value) ? 0 : e.value, r =
|
|
1013
|
+
].includes(e.value) ? 0 : e.value, r = J.value.width / on.value;
|
|
1014
1014
|
return {
|
|
1015
1015
|
value: e.value,
|
|
1016
1016
|
absoluteValue: n,
|
|
1017
|
-
period:
|
|
1018
|
-
plotValue: n +
|
|
1019
|
-
toMax:
|
|
1020
|
-
x:
|
|
1021
|
-
y:
|
|
1017
|
+
period: sn.value && sn.value[t] && sn.value[t].text ? sn.value[t].text : e.period,
|
|
1018
|
+
plotValue: n + tn.value,
|
|
1019
|
+
toMax: an(n + tn.value),
|
|
1020
|
+
x: J.value.start + t * r,
|
|
1021
|
+
y: J.value.bottom - J.value.height * an(n + tn.value),
|
|
1022
1022
|
id: `plot_${A.value}_${t}`,
|
|
1023
|
-
color: Q.value ?
|
|
1023
|
+
color: Q.value ? P.value.style.bar.color : P.value.style.area.useGradient ? m(P.value.style.line.color, .05 * (1 - t / on.value)) : P.value.style.line.color,
|
|
1024
1024
|
width: r
|
|
1025
1025
|
};
|
|
1026
|
-
})),
|
|
1026
|
+
})), ln = _(() => k.selectedIndex !== void 0 && k.selectedIndex !== null && k.selectedIndex >= 0 && k.selectedIndex < Y.value.length ? k.selectedIndex : N.value !== void 0 && N.value !== null && N.value >= 0 && N.value < Y.value.length ? N.value : null), X = w(void 0), un = w(void 0);
|
|
1027
1027
|
function dn(e, t) {
|
|
1028
|
-
|
|
1028
|
+
P.value.events.datapointEnter && P.value.events.datapointEnter({
|
|
1029
1029
|
datapoint: e,
|
|
1030
1030
|
seriesIndex: t
|
|
1031
|
-
}),
|
|
1031
|
+
}), N.value = t, M.value = t, X.value = e, un.value ||= e, Qt("hoverIndex", { index: t });
|
|
1032
1032
|
}
|
|
1033
1033
|
function fn(e, t) {
|
|
1034
|
-
|
|
1034
|
+
P.value.events.datapointLeave && P.value.events.datapointLeave({
|
|
1035
1035
|
datapoint: e,
|
|
1036
1036
|
seriesIndex: t
|
|
1037
|
-
}),
|
|
1037
|
+
}), un.value = X.value, X.value = void 0, N.value = null, M.value = null, Qt("hoverIndex", { index: void 0 });
|
|
1038
1038
|
}
|
|
1039
1039
|
let Z = _(() => {
|
|
1040
1040
|
if (We.value) {
|
|
1041
|
-
let e =
|
|
1041
|
+
let e = Y.value.map((e) => e.absoluteValue), t = e.reduce((e, t) => e + t, 0);
|
|
1042
1042
|
return {
|
|
1043
|
-
latest:
|
|
1043
|
+
latest: Y.value[Y.value.length - 1] ? Y.value[Y.value.length - 1].absoluteValue : 0,
|
|
1044
1044
|
sum: t,
|
|
1045
|
-
average: t /
|
|
1045
|
+
average: t / Y.value.length,
|
|
1046
1046
|
median: re(e),
|
|
1047
|
-
trend:
|
|
1047
|
+
trend: ce(Y.value.map(({ x: e, y: t, absoluteValue: n }) => ({
|
|
1048
1048
|
x: e,
|
|
1049
1049
|
y: t,
|
|
1050
1050
|
value: n
|
|
@@ -1057,17 +1057,17 @@ var mt = ["innerHTML"], ht = {
|
|
|
1057
1057
|
median: null,
|
|
1058
1058
|
trend: null
|
|
1059
1059
|
};
|
|
1060
|
-
}), pn = _(() => We.value ?
|
|
1060
|
+
}), pn = _(() => We.value ? P.value.style.dataLabel.valueType === "latest" ? Z.value.latest : P.value.style.dataLabel.valueType === "sum" ? Z.value.sum : P.value.style.dataLabel.valueType === "average" ? Z.value.average : 0 : 0), Q = _(() => P.value.type && P.value.type === "bar");
|
|
1061
1061
|
function mn(e, t) {
|
|
1062
|
-
|
|
1062
|
+
P.value.events.datapointClick && P.value.events.datapointClick({
|
|
1063
1063
|
datapoint: e,
|
|
1064
1064
|
seriesIndex: t
|
|
1065
|
-
}),
|
|
1065
|
+
}), Qt("selectDatapoint", {
|
|
1066
1066
|
datapoint: e,
|
|
1067
1067
|
index: t
|
|
1068
1068
|
});
|
|
1069
1069
|
}
|
|
1070
|
-
let hn = _(() => Array.isArray(
|
|
1070
|
+
let hn = _(() => Array.isArray(P.value.style.line.dashIndices) && P.value.style.line.dashIndices.length > 0), gn = _(() => P.value.style.line.cutNullValues);
|
|
1071
1071
|
function _n(e) {
|
|
1072
1072
|
return ![
|
|
1073
1073
|
null,
|
|
@@ -1083,112 +1083,112 @@ var mt = ["innerHTML"], ht = {
|
|
|
1083
1083
|
return _n(e[t]?.value) && i && gn.value;
|
|
1084
1084
|
}
|
|
1085
1085
|
function yn(e, t) {
|
|
1086
|
-
return
|
|
1086
|
+
return X.value && e.id === X.value.id || ln.value === t || I.value.length === 1;
|
|
1087
1087
|
}
|
|
1088
1088
|
function bn(e, t) {
|
|
1089
|
-
return Q.value || !_n(e?.value) ? !1 :
|
|
1089
|
+
return Q.value || !_n(e?.value) ? !1 : P.value.style.plot.show && yn(e, t) || vn(Y.value, t);
|
|
1090
1090
|
}
|
|
1091
1091
|
function xn(e, t) {
|
|
1092
|
-
return Math.max(1, yn(e, t) ?
|
|
1092
|
+
return Math.max(1, yn(e, t) ? P.value.style.plot.radius : P.value.style.plot.radius * .7);
|
|
1093
1093
|
}
|
|
1094
1094
|
function Sn(e, t) {
|
|
1095
|
-
return yn(e, t) ?
|
|
1095
|
+
return yn(e, t) ? P.value.style.plot.stroke : P.value.style.backgroundColor;
|
|
1096
1096
|
}
|
|
1097
|
-
let Cn = _(() => gn.value ?
|
|
1098
|
-
if (!
|
|
1099
|
-
let e =
|
|
1100
|
-
return !Array.isArray(e) || !e.length ? null : e.map((e) =>
|
|
1097
|
+
let Cn = _(() => gn.value ? Y.value : Y.value.filter((e) => e.value !== null)), wn = _(() => Y.value.filter((e) => e.value !== null)), Tn = _(() => wn.value.length > 1), En = _(() => Q.value || !Tn.value ? "" : gn.value ? d(Y.value) : l(Cn.value)), Dn = _(() => Q.value || !Tn.value ? "" : gn.value ? n(Y.value) : fe(Cn.value)), On = _(() => Q.value || !hn.value || !Tn.value ? [] : i(Cn.value, P.value.style.line.dashIndices)), kn = _(() => Q.value || !hn.value || !Tn.value ? [] : ee(Cn.value, P.value.style.line.dashIndices)), An = _(() => Q.value || !P.value.style.area.show || !Tn.value ? [] : P.value.style.line.smooth ? oe(Cn.value, J.value.bottom, gn.value).filter(Boolean) : (gn.value ? u(Y.value, J.value.bottom) : r(Cn.value, J.value.bottom)).split(";").filter(Boolean).map((e) => `M${e}Z`)), jn = _(() => Q.value || !P.value.gradientPath.show || P.value.temperatureColors.show ? "" : `M ${(P.value.style.line.smooth ? En.value : Dn.value) || "0,0"}`), Mn = _(() => {
|
|
1098
|
+
if (!P.value.temperatureColors.show) return null;
|
|
1099
|
+
let e = P.value.temperatureColors.colors;
|
|
1100
|
+
return !Array.isArray(e) || !e.length ? null : e.map((e) => te(e));
|
|
1101
1101
|
}), $ = _(() => {
|
|
1102
|
-
if (!
|
|
1103
|
-
let e =
|
|
1104
|
-
return !Array.isArray(e) || !e.length ? null : e.map((e) =>
|
|
1102
|
+
if (!P.value.temperatureColors.show) return null;
|
|
1103
|
+
let e = P.value.temperatureColors.colors;
|
|
1104
|
+
return !Array.isArray(e) || !e.length ? null : e.map((e) => te(e));
|
|
1105
1105
|
});
|
|
1106
1106
|
function Nn(e) {
|
|
1107
1107
|
if (!Number.isFinite(e?.y)) return 0;
|
|
1108
|
-
let t =
|
|
1108
|
+
let t = J.value.height || 1, n = (e.y - J.value.top) / t;
|
|
1109
1109
|
return Math.min(1, Math.max(0, n));
|
|
1110
1110
|
}
|
|
1111
1111
|
function Pn(e) {
|
|
1112
1112
|
let t = Mn.value;
|
|
1113
|
-
return !Array.isArray(t) || !t.length ? e.color :
|
|
1113
|
+
return !Array.isArray(t) || !t.length ? e.color : de({
|
|
1114
1114
|
colors: t,
|
|
1115
1115
|
ratio: Nn(e)
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
1118
|
O(() => [
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1119
|
+
it.value,
|
|
1120
|
+
K.value,
|
|
1121
|
+
Y.value.length,
|
|
1122
|
+
q.value.width,
|
|
1123
|
+
q.value.height,
|
|
1124
|
+
P.value?.style?.line?.smooth
|
|
1125
1125
|
], async () => {
|
|
1126
|
-
await x(),
|
|
1126
|
+
await x(), at();
|
|
1127
1127
|
}, { immediate: !0 }), Me(async () => {
|
|
1128
|
-
await x(),
|
|
1129
|
-
}), O(() =>
|
|
1130
|
-
e || await
|
|
1131
|
-
}), O(() =>
|
|
1132
|
-
e ||
|
|
1128
|
+
await x(), at();
|
|
1129
|
+
}), O(() => F.value, async (e) => {
|
|
1130
|
+
e || await Yt();
|
|
1131
|
+
}), O(() => ct.value, async (e) => {
|
|
1132
|
+
e || F.value || await Yt();
|
|
1133
1133
|
}), O(() => k.selectedIndex, (e) => {
|
|
1134
1134
|
if (e == null) {
|
|
1135
|
-
|
|
1135
|
+
N.value = null, M.value = null, X.value = void 0;
|
|
1136
1136
|
return;
|
|
1137
1137
|
}
|
|
1138
|
-
if (e < 0 || e >=
|
|
1139
|
-
let t =
|
|
1140
|
-
t && (
|
|
1138
|
+
if (e < 0 || e >= Y.value.length) return;
|
|
1139
|
+
let t = Y.value[e];
|
|
1140
|
+
t && (N.value = e, M.value = e, X.value = t);
|
|
1141
1141
|
});
|
|
1142
1142
|
let Fn = w(!1);
|
|
1143
1143
|
function In() {
|
|
1144
|
-
let e =
|
|
1145
|
-
if (e !== null && e >= 0 && e <
|
|
1146
|
-
let t =
|
|
1144
|
+
let e = ln.value;
|
|
1145
|
+
if (e !== null && e >= 0 && e < Y.value.length) {
|
|
1146
|
+
let t = Y.value[e];
|
|
1147
1147
|
if (t) {
|
|
1148
|
-
|
|
1148
|
+
M.value = e, X.value = t, N.value = e, Fn.value = !0;
|
|
1149
1149
|
return;
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
|
|
1152
|
+
M.value = null, !X.value && Y.value.length && dn(Y.value.at(-1), Y.value.length - 1), Fn.value = !0;
|
|
1153
1153
|
}
|
|
1154
1154
|
function Ln() {
|
|
1155
|
-
|
|
1155
|
+
un.value = X.value, (k.selectedIndex === void 0 || k.selectedIndex === null) && (M.value = null, X.value = void 0, N.value = null, Qt("hoverIndex", { index: void 0 })), Fn.value = !1;
|
|
1156
1156
|
}
|
|
1157
1157
|
function Rn(e) {
|
|
1158
|
-
if (!
|
|
1159
|
-
|
|
1158
|
+
if (!L.value || document.activeElement !== L.value) return;
|
|
1159
|
+
un.value = X.value;
|
|
1160
1160
|
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
|
|
1161
1161
|
if (!t && !n) return;
|
|
1162
|
-
let r =
|
|
1162
|
+
let r = Y.value.length;
|
|
1163
1163
|
if (!r) return;
|
|
1164
1164
|
e.preventDefault(), e.stopPropagation();
|
|
1165
|
-
let i =
|
|
1165
|
+
let i = M.value, a = i !== null && i >= 0 && i < r, o = X.value ? Y.value.findIndex((e) => e.id === X.value.id) : -1;
|
|
1166
1166
|
a ? n ? (i += 1, i >= r && (i = 0)) : t && (--i, i < 0 && (i = r - 1)) : o !== null && o >= 0 && o < r ? (i = n ? o + 1 : o - 1, i >= r && (i = 0), i < 0 && (i = r - 1)) : i = n ? 0 : r - 1;
|
|
1167
|
-
let s =
|
|
1168
|
-
s && (
|
|
1167
|
+
let s = Y.value[i];
|
|
1168
|
+
s && (M.value = i, dn(s, i));
|
|
1169
1169
|
}
|
|
1170
1170
|
let zn = _(() => ({
|
|
1171
|
-
headers: [
|
|
1172
|
-
rows:
|
|
1171
|
+
headers: [P.value.translations.period, P.value.translations.value],
|
|
1172
|
+
rows: Y.value.map((e) => [e.period, e.absoluteValue])
|
|
1173
1173
|
}));
|
|
1174
1174
|
return (t, n) => (C(), y("div", {
|
|
1175
1175
|
ref_key: "sparklineChart",
|
|
1176
|
-
ref:
|
|
1176
|
+
ref: j,
|
|
1177
1177
|
class: "vue-data-ui-component vue-ui-sparkline",
|
|
1178
1178
|
id: A.value,
|
|
1179
|
-
style: S(`width:100%;font-family:${
|
|
1179
|
+
style: S(`width:100%;font-family:${P.value.style.fontFamily};`)
|
|
1180
1180
|
}, [
|
|
1181
1181
|
b("p", {
|
|
1182
1182
|
id: `chart-instructions-${A.value}`,
|
|
1183
1183
|
class: "sr-only"
|
|
1184
|
-
}, Pe(
|
|
1184
|
+
}, Pe(P.value.a11y.translations.keyboardNavigation), 9, _t),
|
|
1185
1185
|
zn.value?.rows?.length ? (C(), Te(xe, {
|
|
1186
1186
|
key: 0,
|
|
1187
1187
|
uid: A.value,
|
|
1188
1188
|
head: zn.value.headers,
|
|
1189
1189
|
body: zn.value.rows,
|
|
1190
|
-
notice:
|
|
1191
|
-
caption:
|
|
1190
|
+
notice: P.value.a11y.translations.tableAvailable,
|
|
1191
|
+
caption: P.value.a11y.translations.tableCaption
|
|
1192
1192
|
}, null, 8, [
|
|
1193
1193
|
"uid",
|
|
1194
1194
|
"head",
|
|
@@ -1197,29 +1197,29 @@ var mt = ["innerHTML"], ht = {
|
|
|
1197
1197
|
"caption"
|
|
1198
1198
|
])) : v("", !0),
|
|
1199
1199
|
E(t.$slots, "before", Ae(ke({
|
|
1200
|
-
selected:
|
|
1200
|
+
selected: X.value,
|
|
1201
1201
|
latest: Z.value.latest,
|
|
1202
1202
|
sum: Z.value.sum,
|
|
1203
1203
|
average: Z.value.average,
|
|
1204
1204
|
median: Z.value.median,
|
|
1205
1205
|
trend: Z.value.trend
|
|
1206
1206
|
})), void 0, !0),
|
|
1207
|
-
|
|
1207
|
+
P.value.style.title.show && e.showInfo ? (C(), y("div", {
|
|
1208
1208
|
key: 1,
|
|
1209
1209
|
ref_key: "chartTitle",
|
|
1210
|
-
ref:
|
|
1210
|
+
ref: Ke,
|
|
1211
1211
|
class: "vue-ui-sparkline-title",
|
|
1212
|
-
style: S(`display:flex;align-items:center;width:100%;color:${
|
|
1213
|
-
}, [b("span", { style: S(`padding:${
|
|
1214
|
-
b("div",
|
|
1212
|
+
style: S(`display:flex;align-items:center;width:100%;color:${P.value.style.title.color};background:${P.value.style.backgroundColor};justify-content:${P.value.style.title.textAlign === "left" ? "flex-start" : P.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${P.value.style.title.fontSize * 2}px;font-size:${P.value.style.title.fontSize}px;font-weight:${P.value.style.title.bold ? "bold" : "normal"};`)
|
|
1213
|
+
}, [b("span", { style: S(`padding:${P.value.style.title.textAlign === "left" ? "0 0 0 12px" : P.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`) }, Pe(X.value ? X.value.period : P.value.style.title.text), 5)], 4)) : v("", !0),
|
|
1214
|
+
b("div", vt, [(C(), y("svg", {
|
|
1215
1215
|
ref_key: "svgRef",
|
|
1216
|
-
ref:
|
|
1216
|
+
ref: L,
|
|
1217
1217
|
xmlns: D(ue),
|
|
1218
|
-
viewBox: `0 0 ${
|
|
1219
|
-
style: S(`background:${
|
|
1218
|
+
viewBox: `0 0 ${q.value.width} ${q.value.height}`,
|
|
1219
|
+
style: S(`background:${P.value.style.backgroundColor};overflow:visible;direction:ltr`),
|
|
1220
1220
|
tabindex: "0",
|
|
1221
1221
|
"aria-describedby": `chart-instructions-${A.value}`,
|
|
1222
|
-
onMouseleave: n[0] ||= (e) =>
|
|
1222
|
+
onMouseleave: n[0] ||= (e) => un.value = void 0,
|
|
1223
1223
|
onFocus: In,
|
|
1224
1224
|
onBlur: Ln,
|
|
1225
1225
|
onKeydown: Rn
|
|
@@ -1229,10 +1229,10 @@ var mt = ["innerHTML"], ht = {
|
|
|
1229
1229
|
key: 0,
|
|
1230
1230
|
x: 0,
|
|
1231
1231
|
y: 0,
|
|
1232
|
-
width:
|
|
1233
|
-
height:
|
|
1232
|
+
width: q.value.width <= 0 ? 10 : q.value.width,
|
|
1233
|
+
height: q.value.height <= 0 ? 10 : q.value.height,
|
|
1234
1234
|
style: { pointerEvents: "none" }
|
|
1235
|
-
}, [E(t.$slots, "chart-background", {}, void 0, !0)], 8,
|
|
1235
|
+
}, [E(t.$slots, "chart-background", {}, void 0, !0)], 8, bt)) : v("", !0),
|
|
1236
1236
|
b("defs", null, [
|
|
1237
1237
|
b("linearGradient", {
|
|
1238
1238
|
x1: "0%",
|
|
@@ -1242,33 +1242,33 @@ var mt = ["innerHTML"], ht = {
|
|
|
1242
1242
|
id: `sparkline_gradient_${A.value}`
|
|
1243
1243
|
}, [b("stop", {
|
|
1244
1244
|
offset: "0%",
|
|
1245
|
-
"stop-color": D(
|
|
1246
|
-
}, null, 8,
|
|
1245
|
+
"stop-color": D(f)(D(m)(P.value.style.area.color, .05), P.value.style.area.opacity)
|
|
1246
|
+
}, null, 8, St), b("stop", {
|
|
1247
1247
|
offset: "100%",
|
|
1248
|
-
"stop-color": D(
|
|
1249
|
-
}, null, 8,
|
|
1248
|
+
"stop-color": D(f)(P.value.style.area.color, P.value.style.area.opacity)
|
|
1249
|
+
}, null, 8, Ct)], 8, xt),
|
|
1250
1250
|
b("linearGradient", {
|
|
1251
1251
|
x2: "0%",
|
|
1252
1252
|
y2: "100%",
|
|
1253
1253
|
id: `sparkline_bar_gradient_pos_${A.value}`
|
|
1254
1254
|
}, [b("stop", {
|
|
1255
1255
|
offset: "0%",
|
|
1256
|
-
"stop-color":
|
|
1257
|
-
}, null, 8,
|
|
1256
|
+
"stop-color": P.value.style.bar.color
|
|
1257
|
+
}, null, 8, Tt), b("stop", {
|
|
1258
1258
|
offset: "100%",
|
|
1259
|
-
"stop-color": D(
|
|
1260
|
-
}, null, 8,
|
|
1259
|
+
"stop-color": D(m)(P.value.style.bar.color, .05)
|
|
1260
|
+
}, null, 8, Et)], 8, wt),
|
|
1261
1261
|
b("linearGradient", {
|
|
1262
1262
|
x2: "0%",
|
|
1263
1263
|
y2: "100%",
|
|
1264
1264
|
id: `sparkline_bar_gradient_neg_${A.value}`
|
|
1265
1265
|
}, [b("stop", {
|
|
1266
1266
|
offset: "0%",
|
|
1267
|
-
"stop-color": D(
|
|
1268
|
-
}, null, 8,
|
|
1267
|
+
"stop-color": D(m)(P.value.style.bar.color, .05)
|
|
1268
|
+
}, null, 8, Ot), b("stop", {
|
|
1269
1269
|
offset: "100%",
|
|
1270
|
-
"stop-color":
|
|
1271
|
-
}, null, 8,
|
|
1270
|
+
"stop-color": P.value.style.bar.color
|
|
1271
|
+
}, null, 8, kt)], 8, Dt),
|
|
1272
1272
|
b("filter", {
|
|
1273
1273
|
id: `sparkline_pulse_glow_${A.value}`,
|
|
1274
1274
|
filterUnits: "userSpaceOnUse",
|
|
@@ -1280,99 +1280,99 @@ var mt = ["innerHTML"], ht = {
|
|
|
1280
1280
|
in: "SourceGraphic",
|
|
1281
1281
|
stdDeviation: "3",
|
|
1282
1282
|
result: "blur"
|
|
1283
|
-
}, null, -1), b("feMerge", null, [b("feMergeNode", { in: "blur" }), b("feMergeNode", { in: "SourceGraphic" })], -1)]], 8,
|
|
1284
|
-
|
|
1283
|
+
}, null, -1), b("feMerge", null, [b("feMergeNode", { in: "blur" }), b("feMergeNode", { in: "SourceGraphic" })], -1)]], 8, At),
|
|
1284
|
+
P.value.temperatureColors.show && $.value ? (C(), y("linearGradient", {
|
|
1285
1285
|
key: 0,
|
|
1286
1286
|
id: `temperature_grad_sparkline_${A.value}`,
|
|
1287
1287
|
gradientUnits: "userSpaceOnUse",
|
|
1288
1288
|
x1: "0",
|
|
1289
1289
|
x2: "0",
|
|
1290
|
-
y1:
|
|
1291
|
-
y2:
|
|
1290
|
+
y1: J.value.top,
|
|
1291
|
+
y2: J.value.bottom
|
|
1292
1292
|
}, [(C(!0), y(g, null, T($.value, (e, t) => (C(), y("stop", {
|
|
1293
1293
|
key: `temperature_grad_stop_${t}_${A.value}`,
|
|
1294
1294
|
"stop-color": e,
|
|
1295
|
-
offset: $.value.length === 1 ? "0%" : D(
|
|
1296
|
-
}, null, 8,
|
|
1295
|
+
offset: $.value.length === 1 ? "0%" : D(c)(t, $.value.length)
|
|
1296
|
+
}, null, 8, Mt))), 128))], 8, jt)) : v("", !0)
|
|
1297
1297
|
]),
|
|
1298
|
-
|
|
1298
|
+
P.value.style.area.show && !Q.value && An.value.length ? (C(), y("g", Nt, [(C(!0), y(g, null, T(An.value, (e, t) => (C(), y("path", {
|
|
1299
1299
|
key: `sparkline_area_${t}_${A.value}`,
|
|
1300
1300
|
class: "vue-ui-sparkline-area",
|
|
1301
|
-
"data-cy":
|
|
1301
|
+
"data-cy": P.value.style.line.smooth ? "sparkline-smooth-area" : "sparkline-angle-area",
|
|
1302
1302
|
d: e,
|
|
1303
|
-
fill:
|
|
1303
|
+
fill: P.value.style.area.useGradient ? `url(#sparkline_gradient_${A.value})` : D(f)(P.value.style.area.color, P.value.style.area.opacity),
|
|
1304
1304
|
"stroke-linecap": "round",
|
|
1305
1305
|
"stroke-linejoin": "round",
|
|
1306
|
-
style: S({ transition: D(
|
|
1307
|
-
}, null, 12,
|
|
1308
|
-
|
|
1309
|
-
id:
|
|
1306
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1307
|
+
}, null, 12, Pt))), 128))])) : v("", !0),
|
|
1308
|
+
P.value.style.line.smooth && !Q.value ? (C(), y(g, { key: 2 }, [b("path", {
|
|
1309
|
+
id: K.value,
|
|
1310
1310
|
d: `M ${En.value || "0,0"}`,
|
|
1311
1311
|
fill: "none",
|
|
1312
1312
|
stroke: "transparent",
|
|
1313
|
-
"stroke-width":
|
|
1313
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1314
1314
|
"stroke-linecap": "round",
|
|
1315
1315
|
"stroke-linejoin": "round"
|
|
1316
|
-
}, null, 8,
|
|
1316
|
+
}, null, 8, Ft), hn.value ? (C(!0), y(g, { key: 0 }, T(On.value, (e) => (C(), y("path", {
|
|
1317
1317
|
key: e.path,
|
|
1318
1318
|
class: "vue-ui-sparkline-path",
|
|
1319
1319
|
d: `M ${e.path}`,
|
|
1320
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` :
|
|
1320
|
+
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` : P.value.style.line.color,
|
|
1321
1321
|
fill: "none",
|
|
1322
|
-
"stroke-width":
|
|
1322
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1323
1323
|
"stroke-linecap": "round",
|
|
1324
1324
|
"stroke-linejoin": "round",
|
|
1325
|
-
"stroke-dasharray": e.dashed ?
|
|
1326
|
-
style: S({ transition: D(
|
|
1327
|
-
}, null, 12,
|
|
1325
|
+
"stroke-dasharray": e.dashed ? P.value.style.line.dashArray : 0,
|
|
1326
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1327
|
+
}, null, 12, It))), 128)) : (C(), y("path", {
|
|
1328
1328
|
key: 1,
|
|
1329
1329
|
class: "vue-ui-sparkline-path",
|
|
1330
1330
|
d: `M ${En.value || "0,0"}`,
|
|
1331
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` :
|
|
1331
|
+
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` : P.value.style.line.color,
|
|
1332
1332
|
fill: "none",
|
|
1333
|
-
"stroke-width":
|
|
1333
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1334
1334
|
"stroke-linecap": "round",
|
|
1335
1335
|
"stroke-linejoin": "round",
|
|
1336
|
-
style: S({ transition: D(
|
|
1337
|
-
}, null, 12,
|
|
1338
|
-
!
|
|
1339
|
-
id:
|
|
1336
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1337
|
+
}, null, 12, Lt))], 64)) : v("", !0),
|
|
1338
|
+
!P.value.style.line.smooth && !Q.value ? (C(), y(g, { key: 3 }, [b("path", {
|
|
1339
|
+
id: K.value,
|
|
1340
1340
|
d: `M ${Dn.value || "0,0"}`,
|
|
1341
1341
|
fill: "none",
|
|
1342
1342
|
stroke: "transparent",
|
|
1343
|
-
"stroke-width":
|
|
1343
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1344
1344
|
"stroke-linecap": "round",
|
|
1345
1345
|
"stroke-linejoin": "round"
|
|
1346
|
-
}, null, 8,
|
|
1346
|
+
}, null, 8, Rt), hn.value ? (C(!0), y(g, { key: 0 }, T(kn.value, (e) => (C(), y("path", {
|
|
1347
1347
|
key: e.path,
|
|
1348
1348
|
class: "vue-ui-sparkline-path",
|
|
1349
1349
|
d: `M ${e.path}`,
|
|
1350
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` :
|
|
1350
|
+
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` : P.value.style.line.color,
|
|
1351
1351
|
fill: "none",
|
|
1352
|
-
"stroke-width":
|
|
1352
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1353
1353
|
"stroke-linecap": "round",
|
|
1354
1354
|
"stroke-linejoin": "round",
|
|
1355
|
-
"stroke-dasharray": e.dashed ?
|
|
1356
|
-
style: S({ transition: D(
|
|
1357
|
-
}, null, 12,
|
|
1355
|
+
"stroke-dasharray": e.dashed ? P.value.style.line.dashArray * 2 : 0,
|
|
1356
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1357
|
+
}, null, 12, zt))), 128)) : (C(), y("path", {
|
|
1358
1358
|
key: 1,
|
|
1359
1359
|
class: "vue-ui-sparkline-path",
|
|
1360
1360
|
d: `M ${Dn.value || "0,0"}`,
|
|
1361
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` :
|
|
1361
|
+
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` : P.value.style.line.color,
|
|
1362
1362
|
fill: "none",
|
|
1363
|
-
"stroke-width":
|
|
1363
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1364
1364
|
"stroke-linecap": "round",
|
|
1365
1365
|
"stroke-linejoin": "round",
|
|
1366
|
-
style: S({ transition: D(
|
|
1367
|
-
}, null, 12,
|
|
1368
|
-
jn.value && !$.value ? (C(), Te(
|
|
1366
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1367
|
+
}, null, 12, Bt))], 64)) : v("", !0),
|
|
1368
|
+
jn.value && !$.value ? (C(), Te(mt, {
|
|
1369
1369
|
key: 4,
|
|
1370
1370
|
svgPathData: jn.value,
|
|
1371
|
-
enabled:
|
|
1372
|
-
strokeWidth:
|
|
1373
|
-
highColor:
|
|
1374
|
-
lowColor:
|
|
1375
|
-
segments:
|
|
1371
|
+
enabled: P.value.gradientPath.show && !Q.value && !$.value,
|
|
1372
|
+
strokeWidth: P.value.style.line.strokeWidth,
|
|
1373
|
+
highColor: P.value.gradientPath.colors.high,
|
|
1374
|
+
lowColor: P.value.gradientPath.colors.low,
|
|
1375
|
+
segments: P.value.gradientPath.segments
|
|
1376
1376
|
}, null, 8, [
|
|
1377
1377
|
"svgPathData",
|
|
1378
1378
|
"enabled",
|
|
@@ -1381,23 +1381,23 @@ var mt = ["innerHTML"], ht = {
|
|
|
1381
1381
|
"lowColor",
|
|
1382
1382
|
"segments"
|
|
1383
1383
|
])) : v("", !0),
|
|
1384
|
-
|
|
1384
|
+
Jt.value && it.value ? (C(), Te(Ge, {
|
|
1385
1385
|
key: 5,
|
|
1386
1386
|
uid: A.value,
|
|
1387
|
-
svgRef: D(
|
|
1388
|
-
pulsePathId:
|
|
1389
|
-
pulsePathLength:
|
|
1390
|
-
pulseDur:
|
|
1391
|
-
pulseBegin:
|
|
1392
|
-
pulseRepeatCount:
|
|
1393
|
-
pulseFillMode:
|
|
1394
|
-
pulseKeyPoints:
|
|
1395
|
-
pulseMotion:
|
|
1396
|
-
pulse:
|
|
1397
|
-
pulseTrail:
|
|
1398
|
-
pulseTrailLength:
|
|
1387
|
+
svgRef: D(L),
|
|
1388
|
+
pulsePathId: K.value,
|
|
1389
|
+
pulsePathLength: Qe.value,
|
|
1390
|
+
pulseDur: Ze.value,
|
|
1391
|
+
pulseBegin: $e.value,
|
|
1392
|
+
pulseRepeatCount: tt.value,
|
|
1393
|
+
pulseFillMode: nt.value,
|
|
1394
|
+
pulseKeyPoints: et.value,
|
|
1395
|
+
pulseMotion: ot.value,
|
|
1396
|
+
pulse: z.value,
|
|
1397
|
+
pulseTrail: st.value,
|
|
1398
|
+
pulseTrailLength: rt.value,
|
|
1399
1399
|
prefersReducedMotion: D(Ue),
|
|
1400
|
-
loading: D(
|
|
1400
|
+
loading: D(F),
|
|
1401
1401
|
isBar: Q.value
|
|
1402
1402
|
}, null, 8, [
|
|
1403
1403
|
"uid",
|
|
@@ -1417,106 +1417,106 @@ var mt = ["innerHTML"], ht = {
|
|
|
1417
1417
|
"loading",
|
|
1418
1418
|
"isBar"
|
|
1419
1419
|
])) : v("", !0),
|
|
1420
|
-
(C(!0), y(g, null, T(
|
|
1420
|
+
(C(!0), y(g, null, T(Y.value, (e, t) => (C(), y("g", null, [Q.value ? (C(), y("rect", {
|
|
1421
1421
|
key: 0,
|
|
1422
1422
|
x: e.x - e.width / 2,
|
|
1423
|
-
y: isNaN(e.absoluteValue > 0 ? e.y :
|
|
1423
|
+
y: isNaN(e.absoluteValue > 0 ? e.y : rn.value) ? 0 : e.absoluteValue > 0 ? e.y : rn.value,
|
|
1424
1424
|
width: e.width,
|
|
1425
|
-
height: isNaN(Math.abs(e.y -
|
|
1425
|
+
height: isNaN(Math.abs(e.y - rn.value)) ? 0 : Math.abs(e.y - rn.value),
|
|
1426
1426
|
fill: e.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${A.value})` : `url(#sparkline_bar_gradient_neg_${A.value})`,
|
|
1427
|
-
rx:
|
|
1428
|
-
}, null, 8,
|
|
1427
|
+
rx: P.value.style.bar.borderRadius
|
|
1428
|
+
}, null, 8, Vt)) : v("", !0), P.value.style.verticalIndicator.show && (X.value && e.id === X.value.id || ln.value === t) ? (C(), y("line", {
|
|
1429
1429
|
key: 1,
|
|
1430
1430
|
x1: e.x,
|
|
1431
1431
|
x2: e.x,
|
|
1432
|
-
y1:
|
|
1433
|
-
y2:
|
|
1434
|
-
stroke:
|
|
1435
|
-
"stroke-width":
|
|
1432
|
+
y1: J.value.top - 6,
|
|
1433
|
+
y2: J.value.bottom,
|
|
1434
|
+
stroke: P.value.style.verticalIndicator.color || e.color,
|
|
1435
|
+
"stroke-width": P.value.style.verticalIndicator.strokeWidth,
|
|
1436
1436
|
"stroke-linecap": "round",
|
|
1437
|
-
"stroke-dasharray":
|
|
1438
|
-
}, null, 8,
|
|
1439
|
-
|
|
1437
|
+
"stroke-dasharray": P.value.style.verticalIndicator.strokeDasharray || 0
|
|
1438
|
+
}, null, 8, Ht)) : v("", !0)]))), 256)),
|
|
1439
|
+
$t.value < 0 ? (C(), y("line", {
|
|
1440
1440
|
key: 6,
|
|
1441
|
-
x1:
|
|
1442
|
-
x2:
|
|
1443
|
-
y1: D(
|
|
1444
|
-
y2: D(
|
|
1445
|
-
stroke:
|
|
1446
|
-
"stroke-dasharray":
|
|
1447
|
-
"stroke-width":
|
|
1441
|
+
x1: J.value.start,
|
|
1442
|
+
x2: J.value.start + J.value.width,
|
|
1443
|
+
y1: D(ae)(rn.value, J.value.bottom),
|
|
1444
|
+
y2: D(ae)(rn.value, J.value.bottom),
|
|
1445
|
+
stroke: P.value.style.zeroLine.color,
|
|
1446
|
+
"stroke-dasharray": P.value.style.zeroLine.strokeWidth * 2,
|
|
1447
|
+
"stroke-width": P.value.style.zeroLine.strokeWidth,
|
|
1448
1448
|
"stroke-linecap": "round"
|
|
1449
|
-
}, null, 8,
|
|
1450
|
-
(C(!0), y(g, null, T(
|
|
1449
|
+
}, null, 8, Ut)) : v("", !0),
|
|
1450
|
+
(C(!0), y(g, null, T(Y.value, (e, t) => (C(), y("g", { key: `sparkline_plot_${e.id}` }, [bn(e, t) ? (C(), y("circle", {
|
|
1451
1451
|
key: 0,
|
|
1452
1452
|
cx: e.x,
|
|
1453
1453
|
cy: e.y,
|
|
1454
1454
|
r: xn(e, t),
|
|
1455
1455
|
fill: Pn(e),
|
|
1456
1456
|
stroke: Sn(e, t),
|
|
1457
|
-
"stroke-width":
|
|
1458
|
-
}, null, 8,
|
|
1459
|
-
e.showInfo &&
|
|
1457
|
+
"stroke-width": P.value.style.plot.strokeWidth
|
|
1458
|
+
}, null, 8, Wt)) : v("", !0)]))), 128)),
|
|
1459
|
+
e.showInfo && P.value.style.dataLabel.show ? (C(), y("text", {
|
|
1460
1460
|
key: 7,
|
|
1461
|
-
x:
|
|
1462
|
-
y:
|
|
1463
|
-
"font-size":
|
|
1464
|
-
"font-weight":
|
|
1465
|
-
fill:
|
|
1466
|
-
}, Pe(
|
|
1467
|
-
p:
|
|
1468
|
-
v:
|
|
1469
|
-
s:
|
|
1470
|
-
r:
|
|
1471
|
-
}), { datapoint:
|
|
1472
|
-
p:
|
|
1461
|
+
x: P.value.style.dataLabel.position === "left" ? 12 + P.value.style.dataLabel.offsetX : J.value.width + 12 + P.value.style.dataLabel.offsetX,
|
|
1462
|
+
y: q.value.height / 2 + P.value.style.dataLabel.fontSize / 2.5 + P.value.style.dataLabel.offsetY,
|
|
1463
|
+
"font-size": P.value.style.dataLabel.fontSize,
|
|
1464
|
+
"font-weight": P.value.style.dataLabel.bold ? "bold" : "normal",
|
|
1465
|
+
fill: P.value.style.dataLabel.color
|
|
1466
|
+
}, Pe(X.value ? D(ie)(P.value.style.dataLabel.formatter, X.value.absoluteValue, D(o)({
|
|
1467
|
+
p: P.value.style.dataLabel.prefix,
|
|
1468
|
+
v: X.value.absoluteValue,
|
|
1469
|
+
s: P.value.style.dataLabel.suffix,
|
|
1470
|
+
r: P.value.style.dataLabel.roundingValue
|
|
1471
|
+
}), { datapoint: X.value }) : D(ie)(P.value.style.dataLabel.formatter, pn.value, D(o)({
|
|
1472
|
+
p: P.value.style.dataLabel.prefix,
|
|
1473
1473
|
v: pn.value,
|
|
1474
|
-
s:
|
|
1475
|
-
r:
|
|
1476
|
-
}))), 9,
|
|
1477
|
-
(C(!0), y(g, null, T(
|
|
1478
|
-
x: e.x - (
|
|
1479
|
-
y:
|
|
1480
|
-
height:
|
|
1481
|
-
width:
|
|
1474
|
+
s: P.value.style.dataLabel.suffix,
|
|
1475
|
+
r: P.value.style.dataLabel.roundingValue
|
|
1476
|
+
}))), 9, Gt)) : v("", !0),
|
|
1477
|
+
(C(!0), y(g, null, T(Y.value, (e, t) => (C(), y("rect", {
|
|
1478
|
+
x: e.x - (J.value.width / (on.value + 1) > q.value.padding ? q.value.padding : J.value.width / (on.value + 1)) / 2,
|
|
1479
|
+
y: J.value.top - 6,
|
|
1480
|
+
height: J.value.height + 6,
|
|
1481
|
+
width: J.value.width / (on.value + 1) > q.value.padding ? q.value.padding : J.value.width / (on.value + 1),
|
|
1482
1482
|
fill: "transparent",
|
|
1483
1483
|
onMouseenter: () => dn(e, t),
|
|
1484
1484
|
onMouseleave: () => fn(e, t),
|
|
1485
1485
|
onClick: () => mn(e, t)
|
|
1486
|
-
}, null, 40,
|
|
1486
|
+
}, null, 40, Kt))), 256)),
|
|
1487
1487
|
E(t.$slots, "svg", { svg: {
|
|
1488
|
-
...
|
|
1489
|
-
drawingArea:
|
|
1490
|
-
timeLabels:
|
|
1491
|
-
series:
|
|
1492
|
-
hoveredIndex:
|
|
1488
|
+
...q.value,
|
|
1489
|
+
drawingArea: J.value,
|
|
1490
|
+
timeLabels: sn.value,
|
|
1491
|
+
series: Y.value,
|
|
1492
|
+
hoveredIndex: M.value
|
|
1493
1493
|
} }, void 0, !0)
|
|
1494
|
-
], 44,
|
|
1495
|
-
hint:
|
|
1494
|
+
], 44, yt)), t.$slots.hint ? (C(), y("div", qt, [E(t.$slots, "hint", Ae(ke({
|
|
1495
|
+
hint: P.value.a11y.translations.keyboardNavigation,
|
|
1496
1496
|
isVisible: Fn.value
|
|
1497
1497
|
})), void 0, !0)])) : v("", !0)]),
|
|
1498
|
-
|
|
1498
|
+
X.value && P.value.style.tooltip.show ? (C(), Te(D(ze), {
|
|
1499
1499
|
key: 2,
|
|
1500
|
-
x:
|
|
1501
|
-
y:
|
|
1502
|
-
prevX:
|
|
1503
|
-
prevY:
|
|
1504
|
-
offsetY:
|
|
1505
|
-
svgRef: D(
|
|
1506
|
-
background:
|
|
1507
|
-
color:
|
|
1508
|
-
fontSize:
|
|
1509
|
-
borderWidth:
|
|
1510
|
-
borderColor:
|
|
1511
|
-
borderRadius:
|
|
1512
|
-
backgroundOpacity:
|
|
1500
|
+
x: X.value.x,
|
|
1501
|
+
y: X.value.y,
|
|
1502
|
+
prevX: un.value.x,
|
|
1503
|
+
prevY: un.value.y,
|
|
1504
|
+
offsetY: P.value.style.plot.radius * 3 + P.value.style.tooltip.offsetY,
|
|
1505
|
+
svgRef: D(L),
|
|
1506
|
+
background: P.value.style.tooltip.backgroundColor,
|
|
1507
|
+
color: P.value.style.tooltip.color,
|
|
1508
|
+
fontSize: P.value.style.tooltip.fontSize,
|
|
1509
|
+
borderWidth: P.value.style.tooltip.borderWidth,
|
|
1510
|
+
borderColor: P.value.style.tooltip.borderColor,
|
|
1511
|
+
borderRadius: P.value.style.tooltip.borderRadius,
|
|
1512
|
+
backgroundOpacity: P.value.style.tooltip.backgroundOpacity
|
|
1513
1513
|
}, {
|
|
1514
|
-
default: Le(() => [E(t.$slots, "tooltip", Ae(ke({ ...
|
|
1515
|
-
p:
|
|
1516
|
-
v:
|
|
1517
|
-
s:
|
|
1518
|
-
r:
|
|
1519
|
-
}), { datapoint:
|
|
1514
|
+
default: Le(() => [E(t.$slots, "tooltip", Ae(ke({ ...X.value })), () => [Ee(Pe(X.value.period) + ": " + Pe(D(ie)(P.value.style.dataLabel.formatter, X.value.absoluteValue, D(o)({
|
|
1515
|
+
p: P.value.style.dataLabel.prefix,
|
|
1516
|
+
v: X.value.absoluteValue,
|
|
1517
|
+
s: P.value.style.dataLabel.suffix,
|
|
1518
|
+
r: P.value.style.dataLabel.roundingValue
|
|
1519
|
+
}), { datapoint: X.value })), 1)], !0)]),
|
|
1520
1520
|
_: 3
|
|
1521
1521
|
}, 8, [
|
|
1522
1522
|
"x",
|
|
@@ -1536,12 +1536,12 @@ var mt = ["innerHTML"], ht = {
|
|
|
1536
1536
|
t.$slots.source ? (C(), y("div", {
|
|
1537
1537
|
key: 3,
|
|
1538
1538
|
ref_key: "source",
|
|
1539
|
-
ref:
|
|
1539
|
+
ref: qe,
|
|
1540
1540
|
dir: "auto"
|
|
1541
1541
|
}, [E(t.$slots, "source", {}, void 0, !0)], 512)) : v("", !0),
|
|
1542
|
-
E(t.$slots, "skeleton", {}, () => [D(
|
|
1543
|
-
], 12,
|
|
1542
|
+
E(t.$slots, "skeleton", {}, () => [D(F) ? (C(), Te(he, { key: 0 })) : v("", !0)], !0)
|
|
1543
|
+
], 12, gt));
|
|
1544
1544
|
}
|
|
1545
1545
|
}, [["__scopeId", "data-v-9fa1c607"]]);
|
|
1546
1546
|
//#endregion
|
|
1547
|
-
export {
|
|
1547
|
+
export { ht as n, K as t };
|