vue-data-ui 3.23.9 → 3.23.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -40
- package/dist/{Arrow-CF0VFcBH.js → Arrow-DrF4NNJO.js} +1 -1
- package/dist/{BaseDraggableDialog-LoqqwRtV.js → BaseDraggableDialog-Dr_Q6Yt5.js} +2 -2
- package/dist/{BaseIcon-BfndwIWE.js → BaseIcon-BbElSC8_.js} +1 -1
- package/dist/{BaseLegendToggle-DZVucLnv.js → BaseLegendToggle-CtEdLr4R.js} +1 -1
- package/dist/{BaseZoomControls-BZvCnZEi.js → BaseZoomControls-Cvq4UmNG.js} +2 -2
- package/dist/{ColorPicker--ayG2YHf.js → ColorPicker-ChOgAmCi.js} +2 -2
- package/dist/{DataTable-BbKgJ5UI.js → DataTable-CmyEubtT.js} +2 -2
- package/dist/{HillActions-BD9j_sOU.js → HillActions-3HneGJhS.js} +1 -1
- package/dist/{Legend-CQxUgOd-.js → Legend-BJtY2RA9.js} +2 -2
- package/dist/{NonSvgPenAndPaper-4ypecDg1.js → NonSvgPenAndPaper-DmxzHJtV.js} +3 -3
- package/dist/{PackageVersion-B629oKuX.js → PackageVersion-C0b7KAMa.js} +1 -1
- package/dist/{PenAndPaper-C0UZ74fa.js → PenAndPaper-CIa1F5Jq.js} +3 -3
- package/dist/{Shape-C21CMlWS.js → Shape-BAL5bQmA.js} +1 -1
- package/dist/{SlicerPreview-wUw1hFwe.js → SlicerPreview-BRRyc1p7.js} +426 -426
- package/dist/{SparkTooltip-CjsbIhzi.js → SparkTooltip-Bou05CV_.js} +1 -1
- package/dist/{Title-BE3qg9xl.js → Title-CaVA8EIw.js} +1 -1
- package/dist/{Tooltip-DhjyfHwz.js → Tooltip-CVxJe3UW.js} +1 -1
- package/dist/{UserOptions-Dt98of5H.js → UserOptions-WH7-49V0.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-hill.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-BYIvdTe8.js → dom-to-png-COvyU2SG.js} +1 -1
- package/dist/exposedLib-DrUEXSyf.js +28 -0
- package/dist/{img-Bnokohej.js → img-Bkzj3lDD.js} +1 -1
- package/dist/{labelUtils-BeVpDvTJ.js → labelUtils-iX76cA2-.js} +1 -1
- package/dist/{lib-Bttd6u5E.js → lib-Dqr_-I6Y.js} +166 -163
- package/dist/{package-C01DAl-Z.js → package-D7_0M69J.js} +1 -1
- package/dist/{pdf-CVIDfCrS.js → pdf-Bk_9lTdQ.js} +1 -1
- package/dist/{render-common-Dv5BvuwZ.js → render-common-B0f5NTO9.js} +12 -12
- 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/vue-data-ui.d.ts +13 -2
- package/dist/types/vue-ui-dag.d.ts +2 -0
- package/dist/{useNestedProp-vPNvh7rV.js → useNestedProp-CulPqtou.js} +1 -1
- package/dist/{usePrinter-DN5bYhTG.js → usePrinter-CEiH1b6R.js} +2 -2
- package/dist/utils.js +9 -9
- package/dist/{vue-data-ui-DDZLOx_v.js → vue-data-ui-BlZHZHoH.js} +69 -69
- package/dist/vue-data-ui.js +73 -73
- package/dist/{vue-ui-3d-bar-C9Y9Uklb.js → vue-ui-3d-bar-CtT2BovY.js} +379 -381
- package/dist/{vue-ui-accordion-CLU_su1P.js → vue-ui-accordion-C6L7glHU.js} +3 -3
- package/dist/{vue-ui-age-pyramid-D98P16h3.js → vue-ui-age-pyramid-BhGNgnLB.js} +27 -27
- package/dist/{vue-ui-annotator-QjHngrui.js → vue-ui-annotator-BwIu0JUV.js} +9 -9
- package/dist/vue-ui-bullet-BI7KJyJx.js +700 -0
- package/dist/{vue-ui-bump-BP7UOMFX.js → vue-ui-bump-BCQ97z1G.js} +325 -325
- package/dist/{vue-ui-candlestick-XPQeeduK.js → vue-ui-candlestick-Cs7I5MQS.js} +245 -245
- package/dist/{vue-ui-carousel-table-D39rMqRb.js → vue-ui-carousel-table-CDjAjc4b.js} +108 -108
- package/dist/{vue-ui-chestnut-B0xezYHS.js → vue-ui-chestnut-d6GxjfcP.js} +86 -86
- package/dist/vue-ui-chord-BuConnPN.js +1345 -0
- package/dist/vue-ui-circle-pack-CmxANHap.js +1633 -0
- package/dist/{vue-ui-cursor-JXCd2JAw.js → vue-ui-cursor-CQcnZYBv.js} +3 -3
- package/dist/{vue-ui-dag-D42c5rJN.js → vue-ui-dag-DKUZN-aQ.js} +923 -885
- package/dist/{vue-ui-dashboard-9-9eUWEy.js → vue-ui-dashboard-ciI4wMe6.js} +69 -69
- package/dist/{vue-ui-digits-CCkSVNpz.js → vue-ui-digits-DWf1vzYE.js} +3 -3
- package/dist/{vue-ui-donut-BnVCS9Ll.js → vue-ui-donut-CvCViwSI.js} +64 -64
- package/dist/vue-ui-donut-DZTtuFAG.js +2413 -0
- package/dist/{vue-ui-donut-evolution-CgjBE6EG.js → vue-ui-donut-evolution-BvZX3Gi8.js} +347 -347
- package/dist/{vue-ui-dumbbell-CVX2tGDU.js → vue-ui-dumbbell-BZywCpHd.js} +233 -236
- package/dist/vue-ui-flow-D5jcKr_S.js +1214 -0
- package/dist/vue-ui-funnel-7zX5QnQx.js +747 -0
- package/dist/{vue-ui-galaxy-CThLjvdQ.js → vue-ui-galaxy-BuGd-Ojm.js} +323 -325
- package/dist/vue-ui-gauge-BlDQIpBk.js +932 -0
- package/dist/{vue-ui-geo-DwNCnH_W.js → vue-ui-geo-PWGZw4Un.js} +34 -34
- package/dist/{vue-ui-gizmo-BkQUnPvN.js → vue-ui-gizmo-CTxB3PAl.js} +10 -10
- package/dist/{vue-ui-heatmap-COX6rafn.js → vue-ui-heatmap-sFF5IbM8.js} +472 -472
- package/dist/{vue-ui-hill-7BisXEYH.js → vue-ui-hill-DO3r2s-i.js} +10 -10
- package/dist/vue-ui-history-plot-Cj-Olvhn.js +1695 -0
- package/dist/vue-ui-horizontal-bar-B34aYuDZ.js +1708 -0
- package/dist/{vue-ui-kpi-R9bl7je_.js → vue-ui-kpi-Co6y1YlE.js} +3 -3
- package/dist/{vue-ui-mini-loader-SNMKnmMa.js → vue-ui-mini-loader-BVSIAFYi.js} +2 -2
- package/dist/{vue-ui-molecule-CNtY2_yF.js → vue-ui-molecule-ERAB4YzZ.js} +157 -163
- package/dist/{vue-ui-mood-radar-DUxhOQpR.js → vue-ui-mood-radar-BPp7L6OP.js} +302 -304
- package/dist/{vue-ui-nested-donuts-Bbub_wCe.js → vue-ui-nested-donuts-CX5ut2yp.js} +110 -113
- package/dist/vue-ui-onion-CWYJTUCq.js +1233 -0
- package/dist/vue-ui-parallel-coordinate-plot-DJrV-dVt.js +1430 -0
- package/dist/{vue-ui-quadrant-CFvonilu.js → vue-ui-quadrant-wj8Up03L.js} +32 -32
- package/dist/{vue-ui-quick-chart-iEJt6333.js → vue-ui-quick-chart-CPYdScHL.js} +153 -153
- package/dist/{vue-ui-radar-ClZ_OIr5.js → vue-ui-radar-D3gLQcI5.js} +41 -41
- package/dist/{vue-ui-rating-BnXrMeGg.js → vue-ui-rating-dBCk6ECe.js} +26 -26
- package/dist/vue-ui-relation-circle-DeNBOPjz.js +903 -0
- package/dist/vue-ui-ridgeline-DQcZJ_hv.js +1614 -0
- package/dist/vue-ui-rings-CF9NfFW2.js +1250 -0
- package/dist/vue-ui-scatter-U_xxKOte.js +2403 -0
- package/dist/{vue-ui-skeleton-Drk48XZi.js → vue-ui-skeleton-GA4wzjXV.js} +3 -3
- package/dist/{vue-ui-smiley-BQuXRW4o.js → vue-ui-smiley-D1pW2Fdy.js} +23 -23
- package/dist/{vue-ui-spark-trend-CYcS6-FN.js → vue-ui-spark-trend-BXRGMn5-.js} +23 -23
- package/dist/{vue-ui-sparkbar-eqLrT50j.js → vue-ui-sparkbar-96D0eR-o.js} +24 -24
- package/dist/{vue-ui-sparkgauge-C_b1h4DY.js → vue-ui-sparkgauge-BWBek2u2.js} +61 -61
- package/dist/{vue-ui-sparkhistogram-BzJr83-i.js → vue-ui-sparkhistogram-Cqs068RX.js} +15 -15
- package/dist/vue-ui-sparkline-B8cyY_P1.js +1584 -0
- package/dist/{vue-ui-sparkstackbar-O6Ojc2m8.js → vue-ui-sparkstackbar-C0BkLc2b.js} +207 -207
- package/dist/vue-ui-stackbar-DtsOc7B_.js +2332 -0
- package/dist/{vue-ui-stackline-D7d_Yqid.js → vue-ui-stackline-MSs0pdhE.js} +751 -747
- package/dist/{vue-ui-strip-plot-AljSBqsw.js → vue-ui-strip-plot-Df-TomML.js} +63 -66
- package/dist/vue-ui-table-BKSRQGVK.js +1352 -0
- package/dist/{vue-ui-table-heatmap-DRABMw2H.js → vue-ui-table-heatmap-CglQqfWH.js} +84 -84
- package/dist/{vue-ui-table-sparkline-OScDr7Z5.js → vue-ui-table-sparkline-B7Dh-fN2.js} +11 -11
- package/dist/vue-ui-thermometer-DXuLn8NC.js +756 -0
- package/dist/{vue-ui-timer--q-f8RPJ.js → vue-ui-timer-orCjVwS4.js} +12 -12
- package/dist/{vue-ui-tiremarks-B2Fji5g0.js → vue-ui-tiremarks-DNoQ6Fl2.js} +12 -12
- package/dist/{vue-ui-treemap-CHqCU3Mt.js → vue-ui-treemap-90_Clj0e.js} +51 -54
- package/dist/vue-ui-waffle-BSQXyJ1S.js +1610 -0
- package/dist/{vue-ui-wheel-Dz2QzZcJ.js → vue-ui-wheel-CfU0Nnn0.js} +28 -28
- package/dist/{vue-ui-word-cloud-DBp8kZ4A.js → vue-ui-word-cloud-AgMvmPlI.js} +38 -41
- package/dist/{vue-ui-world-DbYSOiC4.js → vue-ui-world-D0Z9B6M2.js} +120 -123
- package/dist/{vue-ui-xy-C23skZ-G.js → vue-ui-xy-5Te2TfRK.js} +1645 -1641
- package/dist/vue-ui-xy-canvas-BHpBO5dS.js +1823 -0
- package/dist/{vue-ui-xy-CrHCmWhv.js → vue-ui-xy-ua_mFu_a.js} +99 -99
- package/package.json +1 -1
- package/dist/exposedLib-C0DPCgFj.js +0 -28
- package/dist/vue-ui-bullet-GgRg9sbN.js +0 -700
- package/dist/vue-ui-chord-eOIKOfDO.js +0 -1345
- package/dist/vue-ui-circle-pack-kCN1R-pw.js +0 -1636
- package/dist/vue-ui-donut-HrEXYDqO.js +0 -2415
- package/dist/vue-ui-flow-R-fW_EeT.js +0 -1217
- package/dist/vue-ui-funnel-CT3ixpCM.js +0 -750
- package/dist/vue-ui-gauge-DRXsVxYq.js +0 -932
- package/dist/vue-ui-history-plot-Bn_M0AFg.js +0 -1698
- package/dist/vue-ui-horizontal-bar-CkRRidx3.js +0 -1708
- package/dist/vue-ui-onion-Bix9MN3w.js +0 -1233
- package/dist/vue-ui-parallel-coordinate-plot-6SI2vJOo.js +0 -1430
- package/dist/vue-ui-relation-circle-CZ68uWhc.js +0 -903
- package/dist/vue-ui-ridgeline-BSiPLA08.js +0 -1614
- package/dist/vue-ui-rings-mGN_bpo1.js +0 -1252
- package/dist/vue-ui-scatter-C0PouRMY.js +0 -2403
- package/dist/vue-ui-sparkline-CyJKVGYw.js +0 -1584
- package/dist/vue-ui-stackbar-J5QzbBaA.js +0 -2328
- package/dist/vue-ui-table-CBdCPS2r.js +0 -1352
- package/dist/vue-ui-thermometer-DWmM_Hn9.js +0 -756
- package/dist/vue-ui-waffle-C1ksX6OD.js +0 -1612
- package/dist/vue-ui-xy-canvas-B-KxaFGF.js +0 -1819
|
@@ -0,0 +1,1584 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { A as t, H as n, Ht as r, I as i, L as a, N as o, Nt as s, Ot as c, P as l, S as u, U as d, Ut as f, V as p, Vt as ee, X as te, Xt as ne, at as re, d as ie, i as m, k as ae, m as oe, mt as se, nt as ce, q as le, st as ue, t as de, xt as fe } from "./lib-Dqr_-I6Y.js";
|
|
3
|
+
import { n as pe, t as me } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as h } from "./useTimeLabels-d2f-W1L4.js";
|
|
5
|
+
import { t as he } from "./useConfig-DwdGsXTx.js";
|
|
6
|
+
import { n as ge, t as _e } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as ve } from "./useNestedProp-CulPqtou.js";
|
|
8
|
+
import { t as ye } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as be } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
10
|
+
import { l as xe, t as Se } from "./useResponsive-ZtArZtUf.js";
|
|
11
|
+
import { t as Ce } from "./DefGrad-DVBqDjhO.js";
|
|
12
|
+
import { t as we } from "./A11yDataTable-DdRsVULz.js";
|
|
13
|
+
import { t as Te } from "./useChartAccessibility-DYqac8yF.js";
|
|
14
|
+
import { t as Ee } from "./usePrefersMotion-BC-CsqR1.js";
|
|
15
|
+
import { t as De } from "./vue_ui_sparkline-auZhap6Y.js";
|
|
16
|
+
import { Fragment as g, computed as _, createBlock as Oe, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as ke, createVNode as Ae, defineAsyncComponent as je, guardReactiveProps as Me, nextTick as x, normalizeProps as Ne, normalizeStyle as S, onBeforeUnmount as Pe, onMounted as Fe, openBlock as C, ref as w, renderList as T, renderSlot as E, shallowRef as Ie, toDisplayString as Le, toRefs as Re, unref as D, watch as O, watchEffect as ze, withCtx as Be } from "vue";
|
|
17
|
+
//#region src/atoms/SparklinePulse.vue
|
|
18
|
+
var Ve = {
|
|
19
|
+
key: 0,
|
|
20
|
+
style: { "pointer-events": "none" }
|
|
21
|
+
}, He = [
|
|
22
|
+
"r",
|
|
23
|
+
"fill",
|
|
24
|
+
"filter"
|
|
25
|
+
], Ue = [
|
|
26
|
+
"begin",
|
|
27
|
+
"dur",
|
|
28
|
+
"repeatCount",
|
|
29
|
+
"fill",
|
|
30
|
+
"calcMode",
|
|
31
|
+
"keySplines",
|
|
32
|
+
"keyTimes",
|
|
33
|
+
"keyPoints"
|
|
34
|
+
], We = ["href"], Ge = [
|
|
35
|
+
"dur",
|
|
36
|
+
"repeatCount",
|
|
37
|
+
"fill",
|
|
38
|
+
"values"
|
|
39
|
+
], Ke = ["r", "fill"], k = [
|
|
40
|
+
"begin",
|
|
41
|
+
"dur",
|
|
42
|
+
"repeatCount",
|
|
43
|
+
"calcMode",
|
|
44
|
+
"keySplines",
|
|
45
|
+
"keyTimes",
|
|
46
|
+
"keyPoints"
|
|
47
|
+
], qe = ["href"], A = ["dur", "repeatCount"], Je = {
|
|
48
|
+
__name: "SparklinePulse",
|
|
49
|
+
props: {
|
|
50
|
+
uid: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: !0
|
|
53
|
+
},
|
|
54
|
+
svgRef: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: null
|
|
57
|
+
},
|
|
58
|
+
pulsePathId: {
|
|
59
|
+
type: String,
|
|
60
|
+
required: !0
|
|
61
|
+
},
|
|
62
|
+
pulsePathLength: {
|
|
63
|
+
type: Number,
|
|
64
|
+
required: !0
|
|
65
|
+
},
|
|
66
|
+
pulseDur: {
|
|
67
|
+
type: String,
|
|
68
|
+
required: !0
|
|
69
|
+
},
|
|
70
|
+
pulseBegin: {
|
|
71
|
+
type: String,
|
|
72
|
+
required: !0
|
|
73
|
+
},
|
|
74
|
+
pulseRepeatCount: {
|
|
75
|
+
type: String,
|
|
76
|
+
required: !0
|
|
77
|
+
},
|
|
78
|
+
pulseFillMode: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: void 0
|
|
81
|
+
},
|
|
82
|
+
pulseKeyPoints: {
|
|
83
|
+
type: String,
|
|
84
|
+
required: !0
|
|
85
|
+
},
|
|
86
|
+
pulseMotion: {
|
|
87
|
+
type: Object,
|
|
88
|
+
required: !0
|
|
89
|
+
},
|
|
90
|
+
pulse: {
|
|
91
|
+
type: Object,
|
|
92
|
+
required: !0
|
|
93
|
+
},
|
|
94
|
+
pulseTrail: {
|
|
95
|
+
type: Object,
|
|
96
|
+
required: !0
|
|
97
|
+
},
|
|
98
|
+
pulseTrailLength: {
|
|
99
|
+
type: Number,
|
|
100
|
+
required: !0
|
|
101
|
+
},
|
|
102
|
+
prefersReducedMotion: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
required: !0
|
|
105
|
+
},
|
|
106
|
+
loading: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
required: !0
|
|
109
|
+
},
|
|
110
|
+
isBar: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
required: !0
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
setup(e) {
|
|
116
|
+
let t = e, n = _(() => Math.min(t.pulseTrailLength, 45)), r = _(() => !!t.pulse?.show && !t.isBar && !t.prefersReducedMotion && !t.loading && Number(t.pulsePathLength) > 0);
|
|
117
|
+
function i() {
|
|
118
|
+
let e = t.svgRef?.value;
|
|
119
|
+
e && (typeof e.pauseAnimations == "function" && e.pauseAnimations(), typeof e.setCurrentTime == "function" && e.setCurrentTime(0), typeof e.unpauseAnimations == "function" && e.unpauseAnimations());
|
|
120
|
+
}
|
|
121
|
+
function a(e, t) {
|
|
122
|
+
if (typeof e != "string") return e;
|
|
123
|
+
let n = e.trim().match(/^([\d.]+)\s*(ms|s)$/);
|
|
124
|
+
if (!n) return e;
|
|
125
|
+
let r = Number(n[1]), i = n[2];
|
|
126
|
+
return Number.isNaN(r) ? e : `${r + t}${i}`;
|
|
127
|
+
}
|
|
128
|
+
function o(e) {
|
|
129
|
+
return (n.value - e) / n.value * t.pulse.radius;
|
|
130
|
+
}
|
|
131
|
+
function s(e) {
|
|
132
|
+
let r = t.pulse.trail.opacity, i = (n.value - e) / n.value, a = e === 0 ? 1 : i * r;
|
|
133
|
+
return `0;${a};${a};0`;
|
|
134
|
+
}
|
|
135
|
+
return O(() => t.loading, async (e) => {
|
|
136
|
+
if (e) {
|
|
137
|
+
i();
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
await x(), i();
|
|
141
|
+
}), O(() => t.pulsePathId, async () => {
|
|
142
|
+
await x(), i();
|
|
143
|
+
}), Pe(() => {
|
|
144
|
+
i();
|
|
145
|
+
}), (t, i) => r.value ? (C(), y("g", Ve, [(C(!0), y(g, null, T(n.value, (t, n) => (C(), y(g, null, [n % 3 == 0 ? (C(), y("circle", {
|
|
146
|
+
key: `sparkline_dot_${n}_${e.pulsePathId}`,
|
|
147
|
+
r: o(n),
|
|
148
|
+
fill: e.pulse.color,
|
|
149
|
+
filter: `url(#sparkline_pulse_glow_${e.uid})`,
|
|
150
|
+
opacity: "0"
|
|
151
|
+
}, [b("animateMotion", {
|
|
152
|
+
begin: a(e.pulseBegin, n * 10),
|
|
153
|
+
dur: e.pulseDur,
|
|
154
|
+
repeatCount: e.pulseRepeatCount,
|
|
155
|
+
fill: e.pulseFillMode,
|
|
156
|
+
calcMode: e.pulseMotion.calcMode,
|
|
157
|
+
keySplines: e.pulseMotion.keySplines || void 0,
|
|
158
|
+
keyTimes: e.pulseMotion.keyTimes || void 0,
|
|
159
|
+
keyPoints: e.pulseKeyPoints,
|
|
160
|
+
rotate: "auto"
|
|
161
|
+
}, [b("mpath", { href: `#${e.pulsePathId}` }, null, 8, We)], 8, Ue), b("animate", {
|
|
162
|
+
attributeName: "opacity",
|
|
163
|
+
dur: e.pulseDur,
|
|
164
|
+
repeatCount: e.pulseRepeatCount,
|
|
165
|
+
fill: e.pulseFillMode,
|
|
166
|
+
values: s(n),
|
|
167
|
+
keyTimes: "0;0.1;0.9;1"
|
|
168
|
+
}, null, 8, Ge)], 8, He)) : v("", !0)], 64))), 256)), (C(), y("circle", {
|
|
169
|
+
key: `sparkline_halo_${e.pulsePathId}`,
|
|
170
|
+
r: Math.max(e.pulse.radius * 1.3),
|
|
171
|
+
fill: e.pulse.color,
|
|
172
|
+
opacity: "0"
|
|
173
|
+
}, [b("animateMotion", {
|
|
174
|
+
begin: e.pulseBegin,
|
|
175
|
+
dur: e.pulseDur,
|
|
176
|
+
repeatCount: e.pulseRepeatCount,
|
|
177
|
+
calcMode: e.pulseMotion.calcMode,
|
|
178
|
+
keySplines: e.pulseMotion.keySplines || void 0,
|
|
179
|
+
keyTimes: e.pulseMotion.keyTimes || void 0,
|
|
180
|
+
keyPoints: e.pulseKeyPoints,
|
|
181
|
+
rotate: "auto"
|
|
182
|
+
}, [b("mpath", { href: `#${e.pulsePathId}` }, null, 8, qe)], 8, k), b("animate", {
|
|
183
|
+
attributeName: "opacity",
|
|
184
|
+
values: "0;0.35;0.35;0",
|
|
185
|
+
keyTimes: "0;0.15;0.85;1",
|
|
186
|
+
dur: e.pulseDur,
|
|
187
|
+
repeatCount: e.pulseRepeatCount
|
|
188
|
+
}, null, 8, A)], 8, Ke))])) : v("", !0);
|
|
189
|
+
}
|
|
190
|
+
}, j = {
|
|
191
|
+
canvas: null,
|
|
192
|
+
ctx: null
|
|
193
|
+
};
|
|
194
|
+
function Ye() {
|
|
195
|
+
if (typeof document > "u") throw Error("color-utils: document is not available (browser-only).");
|
|
196
|
+
if (!j.canvas) {
|
|
197
|
+
let e = document.createElement("canvas");
|
|
198
|
+
e.width = 1, e.height = 1;
|
|
199
|
+
let t = e.getContext("2d", { willReadFrequently: !0 });
|
|
200
|
+
if (!t) throw Error("color-utils: unable to get 2D canvas context.");
|
|
201
|
+
j.canvas = e, j.ctx = t;
|
|
202
|
+
}
|
|
203
|
+
return j.ctx;
|
|
204
|
+
}
|
|
205
|
+
function Xe(e) {
|
|
206
|
+
return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
|
|
207
|
+
}
|
|
208
|
+
function M(e) {
|
|
209
|
+
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
210
|
+
}
|
|
211
|
+
function N(e, t = null) {
|
|
212
|
+
if (typeof e != "string" || e.trim().length === 0) throw Error("colorToRgba: inputColor must be a non-empty string.");
|
|
213
|
+
let n = e.trim();
|
|
214
|
+
if (n.toLowerCase() === "transparent") return {
|
|
215
|
+
red: 0,
|
|
216
|
+
green: 0,
|
|
217
|
+
blue: 0,
|
|
218
|
+
alpha: 0
|
|
219
|
+
};
|
|
220
|
+
let r = Ze(n, t), i = Ye();
|
|
221
|
+
i.clearRect(0, 0, 1, 1), i.fillStyle = "#000";
|
|
222
|
+
let a = i.fillStyle;
|
|
223
|
+
if (i.fillStyle = r, i.fillStyle === a && !Qe(r)) throw Error(`colorToRgba: unsupported or invalid color "${e}".`);
|
|
224
|
+
i.fillRect(0, 0, 1, 1);
|
|
225
|
+
let o = i.getImageData(0, 0, 1, 1).data;
|
|
226
|
+
return {
|
|
227
|
+
red: o[0],
|
|
228
|
+
green: o[1],
|
|
229
|
+
blue: o[2],
|
|
230
|
+
alpha: o[3] / 255
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function P(e, t = null) {
|
|
234
|
+
if (!Array.isArray(e) || e.length === 0) throw Error("colorsToRgba: colors must be a non-empty array.");
|
|
235
|
+
let n = Array(e.length);
|
|
236
|
+
for (let r = 0; r < e.length; r += 1) n[r] = N(e[r], t);
|
|
237
|
+
return n;
|
|
238
|
+
}
|
|
239
|
+
function Ze(e, t = null) {
|
|
240
|
+
return e !== "currentColor" || typeof window > "u" || !t ? e : window.getComputedStyle(t).color || e;
|
|
241
|
+
}
|
|
242
|
+
function Qe(e) {
|
|
243
|
+
let t = e.trim().toLowerCase();
|
|
244
|
+
return t === "black" || t === "#000" || t === "#000000" || t === "rgb(0, 0, 0)" || t === "rgba(0, 0, 0, 1)" || t === "rgba(0, 0, 0, 0)";
|
|
245
|
+
}
|
|
246
|
+
function F(e) {
|
|
247
|
+
let t = M(e / 255);
|
|
248
|
+
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
249
|
+
}
|
|
250
|
+
function I(e) {
|
|
251
|
+
let t = M(e), n;
|
|
252
|
+
return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, Xe(n * 255);
|
|
253
|
+
}
|
|
254
|
+
function $e(e, t, n, r) {
|
|
255
|
+
let i = M(n);
|
|
256
|
+
if (r === "linearRGB") {
|
|
257
|
+
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;
|
|
258
|
+
return {
|
|
259
|
+
red: I(l),
|
|
260
|
+
green: I(u),
|
|
261
|
+
blue: I(d),
|
|
262
|
+
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
return {
|
|
266
|
+
red: e.red + (t.red - e.red) * i,
|
|
267
|
+
green: e.green + (t.green - e.green) * i,
|
|
268
|
+
blue: e.blue + (t.blue - e.blue) * i,
|
|
269
|
+
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/SPG/number-utils.js
|
|
274
|
+
function L(e, t, n) {
|
|
275
|
+
let r = e;
|
|
276
|
+
return r < t && (r = t), r > n && (r = n), r;
|
|
277
|
+
}
|
|
278
|
+
function R(e, t) {
|
|
279
|
+
let n = 10 ** t;
|
|
280
|
+
return Math.round(e * n) / n;
|
|
281
|
+
}
|
|
282
|
+
function z(e) {
|
|
283
|
+
return Number.isFinite(e) ? e.toString() : "0";
|
|
284
|
+
}
|
|
285
|
+
function et(e) {
|
|
286
|
+
let t = L(e, 0, 255).toString(16);
|
|
287
|
+
return t.length === 1 ? "0" + t : t;
|
|
288
|
+
}
|
|
289
|
+
function tt(e) {
|
|
290
|
+
if (typeof e != "string") return;
|
|
291
|
+
let t = Number.parseFloat(e);
|
|
292
|
+
return Number.isFinite(t) ? t : void 0;
|
|
293
|
+
}
|
|
294
|
+
function nt(e, t, n, r = !0) {
|
|
295
|
+
let i = n - t;
|
|
296
|
+
if (i === 0) return 0;
|
|
297
|
+
let a = (e - t) / i;
|
|
298
|
+
return r ? L(a, 0, 1) : a;
|
|
299
|
+
}
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region src/SPG/index.js
|
|
302
|
+
var rt = "http://www.w3.org/2000/svg";
|
|
303
|
+
function it(e) {
|
|
304
|
+
if (typeof document > "u") throw Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
|
|
305
|
+
let t = document.createElementNS(rt, "svg");
|
|
306
|
+
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";
|
|
307
|
+
let n = document.createElementNS(rt, "path");
|
|
308
|
+
return e === "M " && (e = "M 0,0"), n.setAttribute("d", e), t.appendChild(n), document.body.appendChild(t), {
|
|
309
|
+
svgElement: t,
|
|
310
|
+
pathElement: n
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function at(e) {
|
|
314
|
+
if (e) try {
|
|
315
|
+
e.svgElement?.remove?.();
|
|
316
|
+
} catch {}
|
|
317
|
+
}
|
|
318
|
+
function ot(e, t, n) {
|
|
319
|
+
if (typeof n == "number" && n > 0) return n;
|
|
320
|
+
let r = t * .75;
|
|
321
|
+
r < .5 && (r = .5), r > 8 && (r = 8);
|
|
322
|
+
let i = e / 2;
|
|
323
|
+
return r > i && i > 0 && (r = i), r <= 0 && (r = 1), r;
|
|
324
|
+
}
|
|
325
|
+
function st(e, t, n) {
|
|
326
|
+
if (typeof t == "number" && t >= 1) return Math.floor(t);
|
|
327
|
+
let r = Math.ceil(e / (typeof n == "number" && n > 0 ? n : 2));
|
|
328
|
+
return r < 1 ? 1 : r;
|
|
329
|
+
}
|
|
330
|
+
function ct(e, t, n, r, i, a) {
|
|
331
|
+
let o = n - t, s = Math.ceil(o / r) + 1;
|
|
332
|
+
s < 2 && (s = 2), s > a && (s = a);
|
|
333
|
+
let c = s > 1 ? o / (s - 1) : 0, l = e.getPointAtLength(t), u = `M ${z(R(l.x, i))} ${z(R(l.y, i))}`;
|
|
334
|
+
for (let n = 1; n < s; n += 1) {
|
|
335
|
+
let r = t + n * c, a = e.getPointAtLength(r);
|
|
336
|
+
u += ` L ${z(R(a.x, i))} ${z(R(a.y, i))}`;
|
|
337
|
+
}
|
|
338
|
+
return u;
|
|
339
|
+
}
|
|
340
|
+
function lt(e, t, n, r, i, a) {
|
|
341
|
+
let o = n - t, s = Math.ceil(o / r) + 1;
|
|
342
|
+
s < 2 && (s = 2), s > a && (s = a);
|
|
343
|
+
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))}`;
|
|
344
|
+
for (let n = 1; n < s; n += 1) {
|
|
345
|
+
let r = t + n * c, a = e.getPointAtLength(r);
|
|
346
|
+
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))}`;
|
|
347
|
+
}
|
|
348
|
+
return {
|
|
349
|
+
pathData: ee,
|
|
350
|
+
bounds: {
|
|
351
|
+
minX: u,
|
|
352
|
+
maxX: d,
|
|
353
|
+
minY: f,
|
|
354
|
+
maxY: p
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function ut(e) {
|
|
359
|
+
if (e.length === 1) return [{
|
|
360
|
+
position: 0,
|
|
361
|
+
rgba: e[0]
|
|
362
|
+
}];
|
|
363
|
+
let t = Array(e.length), n = e.length - 1;
|
|
364
|
+
for (let r = 0; r < e.length; r += 1) t[r] = {
|
|
365
|
+
position: r / n,
|
|
366
|
+
rgba: e[r]
|
|
367
|
+
};
|
|
368
|
+
return t;
|
|
369
|
+
}
|
|
370
|
+
function B(e, t, n, r) {
|
|
371
|
+
let i = L(t, 0, 1), a = r;
|
|
372
|
+
for (a < 0 && (a = 0), a > e.length - 2 && (a = e.length - 2); a > 0 && i < e[a].position;) --a;
|
|
373
|
+
for (; a < e.length - 2 && i > e[a + 1].position;) a += 1;
|
|
374
|
+
let o = e[a], s = e[a + 1], c = s.position - o.position, l = c > 0 ? (i - o.position) / c : 0;
|
|
375
|
+
return W(V(o.rgba, s.rgba, l, n));
|
|
376
|
+
}
|
|
377
|
+
function V(e, t, n, r) {
|
|
378
|
+
let i = L(n, 0, 1);
|
|
379
|
+
if (r === "linearRGB") {
|
|
380
|
+
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;
|
|
381
|
+
return {
|
|
382
|
+
red: U(l),
|
|
383
|
+
green: U(u),
|
|
384
|
+
blue: U(d),
|
|
385
|
+
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
return {
|
|
389
|
+
red: e.red + (t.red - e.red) * i,
|
|
390
|
+
green: e.green + (t.green - e.green) * i,
|
|
391
|
+
blue: e.blue + (t.blue - e.blue) * i,
|
|
392
|
+
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function H(e) {
|
|
396
|
+
let t = L(e / 255, 0, 1);
|
|
397
|
+
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
398
|
+
}
|
|
399
|
+
function U(e) {
|
|
400
|
+
let t = L(e, 0, 1), n;
|
|
401
|
+
return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, L(Math.round(n * 255), 0, 255);
|
|
402
|
+
}
|
|
403
|
+
function W(e) {
|
|
404
|
+
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);
|
|
405
|
+
return t >= 1 ? `#${et(n)}${et(r)}${et(i)}` : `rgba(${n}, ${r}, ${i}, ${R(t, 4).toString()})`;
|
|
406
|
+
}
|
|
407
|
+
function dt(e) {
|
|
408
|
+
let t = `fill="${G(e.fill ?? "none")}"`, n = Object.keys(e);
|
|
409
|
+
for (let r = 0; r < n.length; r += 1) {
|
|
410
|
+
let i = n[r];
|
|
411
|
+
if (i === "stroke" || i === "d") continue;
|
|
412
|
+
let a = e[i];
|
|
413
|
+
t += ` ${i}="${G(a)}"`;
|
|
414
|
+
}
|
|
415
|
+
return t;
|
|
416
|
+
}
|
|
417
|
+
function ft(e, t, n) {
|
|
418
|
+
return `<path d="${G(e)}" stroke="${G(t)}" ${n} />`;
|
|
419
|
+
}
|
|
420
|
+
function pt(e) {
|
|
421
|
+
let t = [], n = e.segmentAttributeMap.fill ?? "none";
|
|
422
|
+
t.push(`fill="${G(n)}"`), t.push(`stroke="${G(e.stroke)}"`);
|
|
423
|
+
for (let n of Object.keys(e.segmentAttributeMap)) {
|
|
424
|
+
if (n === "stroke" || n === "d") continue;
|
|
425
|
+
let r = e.segmentAttributeMap[n];
|
|
426
|
+
t.push(`${n}="${G(r)}"`);
|
|
427
|
+
}
|
|
428
|
+
return `<path d="${G(e.pathData)}" ${t.join(" ")} />`;
|
|
429
|
+
}
|
|
430
|
+
function mt(e, t) {
|
|
431
|
+
let n = [];
|
|
432
|
+
for (let e of Object.keys(t)) n.push(`${e}="${G(t[e])}"`);
|
|
433
|
+
return `<g data-svg-path-gradient="true"${n.length ? " " + n.join(" ") : ""}>${e.join("")}</g>`;
|
|
434
|
+
}
|
|
435
|
+
function G(e) {
|
|
436
|
+
return String(e).replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
437
|
+
}
|
|
438
|
+
function ht(e, t = null, n = {}) {
|
|
439
|
+
return new Promise((r, i) => {
|
|
440
|
+
let a = null;
|
|
441
|
+
try {
|
|
442
|
+
if (!e || typeof e != "string") throw Error("SvgPathGradientAsync: pathData must be a non-empty string.");
|
|
443
|
+
let i = n.temperatureMode ?? null;
|
|
444
|
+
if (i === null && (!Array.isArray(t) || t.length === 0)) throw Error("SvgPathGradientAsync: colors must be a non-empty array when temperatureMode is not enabled.");
|
|
445
|
+
if ((n.returnMode ?? "string") !== "string") throw Error("SvgPathGradientAsync: only returnMode=\"string\" is supported for the async version.");
|
|
446
|
+
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 = tt(c["stroke-width"]), d = typeof n.strokeWidth == "number" && n.strokeWidth > 0 ? n.strokeWidth : typeof u == "number" && u > 0 ? u : 1;
|
|
447
|
+
a = it(e);
|
|
448
|
+
let f = a.pathElement, p = f.getTotalLength(), ee = i === null ? P(t, n.colorReferenceElement) : [];
|
|
449
|
+
if (i === null && (!(p > 0) || ee.length === 1)) {
|
|
450
|
+
let t = mt([pt({
|
|
451
|
+
pathData: e,
|
|
452
|
+
stroke: W(ee[0]),
|
|
453
|
+
segmentAttributeMap: c
|
|
454
|
+
})], l);
|
|
455
|
+
at(a), r(t);
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
let te = n.colorSpace ?? "linearRGB";
|
|
459
|
+
if (i !== null) {
|
|
460
|
+
let e = n.temperatureColors;
|
|
461
|
+
if (!Array.isArray(e) || e.length !== 2) throw Error("SvgPathGradientAsync: temperatureColors must be a tuple of exactly 2 colors when temperatureMode is enabled.");
|
|
462
|
+
}
|
|
463
|
+
let ne = i === null ? null : P(n.temperatureColors, n.colorReferenceElement), re = i === null ? (() => {
|
|
464
|
+
let e = ut(ee), t = Array(e.length);
|
|
465
|
+
for (let n = 0; n < e.length; n += 1) t[n] = {
|
|
466
|
+
position: e[n].position,
|
|
467
|
+
rgba: e[n].rgba
|
|
468
|
+
};
|
|
469
|
+
return t;
|
|
470
|
+
})() : [], ie = ot(p, d, n.maxSegmentLength), m = st(p, n.segments, ie), ae = p / m, oe = typeof n.overlap == "number" && n.overlap >= 0 ? n.overlap : d * .5, se = ae * .45;
|
|
471
|
+
oe > se && (oe = se);
|
|
472
|
+
let ce = typeof n.samplePointLimitPerSegment == "number" && n.samplePointLimitPerSegment > 10 ? n.samplePointLimitPerSegment : 250, le = dt(c), ue = [], de = i === null ? null : [], fe = i === null ? null : [], pe = 0, me = i === null ? re.length - 2 : 0, h = 0, he = () => {
|
|
473
|
+
let e = performance.now(), t = typeof n.frameBudgetMs == "number" ? n.frameBudgetMs : 8;
|
|
474
|
+
for (; h < m && performance.now() - e < t;) {
|
|
475
|
+
let e = h * ae, t = (h + 1) * ae, n = e, r = t;
|
|
476
|
+
if (h !== 0 && (n = e - oe), h !== m - 1 && (r = t + oe), n = L(n, 0, p), r = L(r, 0, p), r > n) if (i !== null) {
|
|
477
|
+
let e = lt(f, n, r, s, o, ce);
|
|
478
|
+
de.push(e.pathData), fe.push(e.bounds);
|
|
479
|
+
} else {
|
|
480
|
+
let e = (n + r) * .5 / p;
|
|
481
|
+
for (; pe < me && e > re[pe + 1].position;) pe += 1;
|
|
482
|
+
let t = B(re, e, te, pe), i = ct(f, n, r, s, o, ce);
|
|
483
|
+
ue.push(ft(i, t, le));
|
|
484
|
+
}
|
|
485
|
+
h += 1;
|
|
486
|
+
}
|
|
487
|
+
if (h < m) {
|
|
488
|
+
requestAnimationFrame(he);
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
if (i !== null) {
|
|
492
|
+
let e = Infinity, t = -Infinity;
|
|
493
|
+
for (let n = 0; n < fe.length; n += 1) {
|
|
494
|
+
let r = fe[n], a = i === "vertical" ? r.minY : r.minX, o = i === "vertical" ? r.maxY : r.maxX;
|
|
495
|
+
a < e && (e = a), o > t && (t = o);
|
|
496
|
+
}
|
|
497
|
+
let n = ne[0], r = ne[1];
|
|
498
|
+
ue.length = 0;
|
|
499
|
+
for (let a = 0; a < fe.length; a += 1) {
|
|
500
|
+
let o = fe[a], s = nt(((i === "vertical" ? o.minY : o.minX) + (i === "vertical" ? o.maxY : o.maxX)) * .5, e, t, !0), c = W(i === "vertical" ? $e(n, r, s, te) : $e(r, n, s, te)), l = de[a];
|
|
501
|
+
ue.push(ft(l, c, le));
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
let c = mt(ue, l);
|
|
505
|
+
at(a), r(c);
|
|
506
|
+
};
|
|
507
|
+
requestAnimationFrame(he);
|
|
508
|
+
} catch (e) {
|
|
509
|
+
at(a), i(e);
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region src/atoms/SparklineGradientPath.vue
|
|
515
|
+
var gt = ["innerHTML"], _t = {
|
|
516
|
+
__name: "SparklineGradientPath",
|
|
517
|
+
props: {
|
|
518
|
+
svgPathData: {
|
|
519
|
+
type: String,
|
|
520
|
+
required: !0
|
|
521
|
+
},
|
|
522
|
+
enabled: {
|
|
523
|
+
type: Boolean,
|
|
524
|
+
required: !0
|
|
525
|
+
},
|
|
526
|
+
strokeWidth: {
|
|
527
|
+
type: Number,
|
|
528
|
+
required: !0
|
|
529
|
+
},
|
|
530
|
+
highColor: {
|
|
531
|
+
type: String,
|
|
532
|
+
required: !0
|
|
533
|
+
},
|
|
534
|
+
lowColor: {
|
|
535
|
+
type: String,
|
|
536
|
+
required: !0
|
|
537
|
+
},
|
|
538
|
+
segments: {
|
|
539
|
+
type: Number,
|
|
540
|
+
required: !0
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
setup(e) {
|
|
544
|
+
let t = e, n = w(""), r = 0;
|
|
545
|
+
return O(() => [
|
|
546
|
+
t.enabled,
|
|
547
|
+
t.svgPathData,
|
|
548
|
+
t.strokeWidth,
|
|
549
|
+
t.highColor,
|
|
550
|
+
t.lowColor,
|
|
551
|
+
t.segments
|
|
552
|
+
], async ([e]) => {
|
|
553
|
+
let i = ++r;
|
|
554
|
+
if (!e) {
|
|
555
|
+
n.value = "";
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
let a = await ht(t.svgPathData, null, {
|
|
559
|
+
segments: t.segments,
|
|
560
|
+
temperatureMode: "vertical",
|
|
561
|
+
temperatureColors: [t.highColor, t.lowColor],
|
|
562
|
+
attrs: {
|
|
563
|
+
"stroke-width": t.strokeWidth,
|
|
564
|
+
"stroke-linecap": "round",
|
|
565
|
+
"stroke-linejoin": "round"
|
|
566
|
+
},
|
|
567
|
+
groupAttrs: { class: "vue-ui-sparkline-gradient" }
|
|
568
|
+
});
|
|
569
|
+
i === r && (n.value = a);
|
|
570
|
+
}, { immediate: !0 }), (e, t) => (C(), y("g", { innerHTML: n.value }, null, 8, gt));
|
|
571
|
+
}
|
|
572
|
+
}, vt = /* @__PURE__ */ e({ default: () => K }), yt = ["id"], bt = ["id"], xt = { style: { position: "relative" } }, St = [
|
|
573
|
+
"xmlns",
|
|
574
|
+
"viewBox",
|
|
575
|
+
"aria-describedby"
|
|
576
|
+
], Ct = ["width", "height"], wt = ["id"], Tt = [
|
|
577
|
+
"id",
|
|
578
|
+
"y1",
|
|
579
|
+
"y2"
|
|
580
|
+
], Et = ["stop-color", "offset"], Dt = { key: 1 }, Ot = [
|
|
581
|
+
"data-cy",
|
|
582
|
+
"d",
|
|
583
|
+
"fill"
|
|
584
|
+
], kt = [
|
|
585
|
+
"id",
|
|
586
|
+
"d",
|
|
587
|
+
"stroke-width"
|
|
588
|
+
], At = [
|
|
589
|
+
"d",
|
|
590
|
+
"stroke",
|
|
591
|
+
"stroke-width",
|
|
592
|
+
"stroke-dasharray"
|
|
593
|
+
], jt = [
|
|
594
|
+
"d",
|
|
595
|
+
"stroke",
|
|
596
|
+
"stroke-width"
|
|
597
|
+
], Mt = [
|
|
598
|
+
"id",
|
|
599
|
+
"d",
|
|
600
|
+
"stroke-width"
|
|
601
|
+
], Nt = [
|
|
602
|
+
"d",
|
|
603
|
+
"stroke",
|
|
604
|
+
"stroke-width",
|
|
605
|
+
"stroke-dasharray"
|
|
606
|
+
], Pt = [
|
|
607
|
+
"d",
|
|
608
|
+
"stroke",
|
|
609
|
+
"stroke-width"
|
|
610
|
+
], Ft = [
|
|
611
|
+
"x",
|
|
612
|
+
"y",
|
|
613
|
+
"width",
|
|
614
|
+
"height",
|
|
615
|
+
"fill",
|
|
616
|
+
"rx"
|
|
617
|
+
], It = [
|
|
618
|
+
"x1",
|
|
619
|
+
"x2",
|
|
620
|
+
"y1",
|
|
621
|
+
"y2",
|
|
622
|
+
"stroke",
|
|
623
|
+
"stroke-width",
|
|
624
|
+
"stroke-dasharray"
|
|
625
|
+
], Lt = [
|
|
626
|
+
"x1",
|
|
627
|
+
"x2",
|
|
628
|
+
"y1",
|
|
629
|
+
"y2",
|
|
630
|
+
"stroke",
|
|
631
|
+
"stroke-dasharray",
|
|
632
|
+
"stroke-width"
|
|
633
|
+
], Rt = [
|
|
634
|
+
"cx",
|
|
635
|
+
"cy",
|
|
636
|
+
"r",
|
|
637
|
+
"fill",
|
|
638
|
+
"stroke",
|
|
639
|
+
"stroke-width"
|
|
640
|
+
], zt = [
|
|
641
|
+
"x",
|
|
642
|
+
"y",
|
|
643
|
+
"font-size",
|
|
644
|
+
"font-weight",
|
|
645
|
+
"fill"
|
|
646
|
+
], Bt = [
|
|
647
|
+
"x",
|
|
648
|
+
"y",
|
|
649
|
+
"height",
|
|
650
|
+
"width",
|
|
651
|
+
"onMouseenter",
|
|
652
|
+
"onMouseleave",
|
|
653
|
+
"onClick"
|
|
654
|
+
], Vt = {
|
|
655
|
+
key: 0,
|
|
656
|
+
style: {
|
|
657
|
+
position: "absolute",
|
|
658
|
+
top: "100%",
|
|
659
|
+
left: "0",
|
|
660
|
+
width: "100%"
|
|
661
|
+
},
|
|
662
|
+
"data-dom-to-png-ignore": "",
|
|
663
|
+
"aria-hidden": "true"
|
|
664
|
+
}, K = /*#__PURE__*/ be({
|
|
665
|
+
__name: "vue-ui-sparkline",
|
|
666
|
+
props: {
|
|
667
|
+
config: {
|
|
668
|
+
type: Object,
|
|
669
|
+
default() {
|
|
670
|
+
return {};
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
dataset: {
|
|
674
|
+
type: Array,
|
|
675
|
+
default() {
|
|
676
|
+
return [];
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
showInfo: {
|
|
680
|
+
type: Boolean,
|
|
681
|
+
default: !0
|
|
682
|
+
},
|
|
683
|
+
selectedIndex: {
|
|
684
|
+
type: Number,
|
|
685
|
+
default: void 0
|
|
686
|
+
},
|
|
687
|
+
heightRatio: {
|
|
688
|
+
type: Number,
|
|
689
|
+
default: 1
|
|
690
|
+
},
|
|
691
|
+
forcedPadding: {
|
|
692
|
+
type: Number,
|
|
693
|
+
default: 30
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
emits: ["hoverIndex", "selectDatapoint"],
|
|
697
|
+
setup(e, { emit: be }) {
|
|
698
|
+
let Ve = je(() => import("./PackageVersion-C0b7KAMa.js").then((e) => e.t)), He = je(() => import("./SparkTooltip-Bou05CV_.js")), { vue_ui_sparkline: Ue } = he(), { isThemeValid: We, warnInvalidTheme: Ge } = ye(), Ke = Ee(), k = e, qe = _(() => Array.isArray(k.dataset) && k.dataset.length > 0), A = w(le()), j = w(null), Ye = w(null), Xe = w(null), M = w(null), N = w(null), P = w(R());
|
|
699
|
+
pe({
|
|
700
|
+
config: () => P.value,
|
|
701
|
+
dataset: () => k.dataset,
|
|
702
|
+
component: "VueUiSparkline",
|
|
703
|
+
rules: [
|
|
704
|
+
me.emptyArray,
|
|
705
|
+
{
|
|
706
|
+
test: (e) => e.length > 500,
|
|
707
|
+
message: [
|
|
708
|
+
"👀 The dataset has > 500 datapoints. Consider if you really need this level of detail.",
|
|
709
|
+
"",
|
|
710
|
+
"▶️ Use larger time scales, or aggregated values"
|
|
711
|
+
]
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
test: (e) => e.length > 1095,
|
|
715
|
+
message: [
|
|
716
|
+
"👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.",
|
|
717
|
+
"",
|
|
718
|
+
"▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted."
|
|
719
|
+
]
|
|
720
|
+
}
|
|
721
|
+
]
|
|
722
|
+
});
|
|
723
|
+
function Ze(e) {
|
|
724
|
+
return k.config?.skeletonDataset && Array.isArray(k.config.skeletonDataset) ? k.config.skeletonDataset.map((e) => ({
|
|
725
|
+
period: "-",
|
|
726
|
+
value: e
|
|
727
|
+
})) : re(e).map((e) => ({
|
|
728
|
+
period: "-",
|
|
729
|
+
value: e
|
|
730
|
+
}));
|
|
731
|
+
}
|
|
732
|
+
let Qe = _(() => ne({
|
|
733
|
+
defaultConfig: {
|
|
734
|
+
gradientPath: { show: !1 },
|
|
735
|
+
temperatureColors: { show: !1 },
|
|
736
|
+
style: {
|
|
737
|
+
backgroundColor: "#99999930",
|
|
738
|
+
scaleMin: 0,
|
|
739
|
+
scaleMax: null,
|
|
740
|
+
animation: { show: !1 },
|
|
741
|
+
line: {
|
|
742
|
+
color: "#AAAAAA",
|
|
743
|
+
pulse: { show: !1 },
|
|
744
|
+
dashIndices: []
|
|
745
|
+
},
|
|
746
|
+
bar: { color: "#AAAAAA" },
|
|
747
|
+
area: { color: "#CACACA" },
|
|
748
|
+
zeroLine: { color: "#6A6A6A" },
|
|
749
|
+
dataLabel: { show: !1 },
|
|
750
|
+
tooltip: { show: !1 }
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
userConfig: P.value.skeletonConfig ?? {}
|
|
754
|
+
})), { loading: F, FINAL_DATASET: I, manualLoading: $e } = ge({
|
|
755
|
+
...Re(k),
|
|
756
|
+
FINAL_CONFIG: P,
|
|
757
|
+
prepareConfig: R,
|
|
758
|
+
callback: () => {
|
|
759
|
+
Promise.resolve().then(async () => {
|
|
760
|
+
await x(), gt();
|
|
761
|
+
});
|
|
762
|
+
},
|
|
763
|
+
skeletonDataset: Ze(12),
|
|
764
|
+
skeletonConfig: ne({
|
|
765
|
+
defaultConfig: P.value,
|
|
766
|
+
userConfig: Qe.value
|
|
767
|
+
})
|
|
768
|
+
}), { svgRef: L } = Te({ config: P.value.style.title });
|
|
769
|
+
function R() {
|
|
770
|
+
let e = ve({
|
|
771
|
+
userConfig: k.config,
|
|
772
|
+
defaultConfig: Ue
|
|
773
|
+
}), t = {}, n = e.theme;
|
|
774
|
+
if (n) if (!We.value(e)) Ge(e), t = e;
|
|
775
|
+
else {
|
|
776
|
+
let r = ve({
|
|
777
|
+
userConfig: De[n] || k.config,
|
|
778
|
+
defaultConfig: e
|
|
779
|
+
});
|
|
780
|
+
t = { ...ve({
|
|
781
|
+
userConfig: k.config,
|
|
782
|
+
defaultConfig: r
|
|
783
|
+
}) };
|
|
784
|
+
}
|
|
785
|
+
else t = e;
|
|
786
|
+
return t;
|
|
787
|
+
}
|
|
788
|
+
let z = _(() => P.value?.style?.line.pulse || {}), et = _(() => `${Math.max(200, Number(z.value.durationMs) || 4e3) / 1e3}s`), tt = w(0), nt = _(() => z.value?.begin || "0ms"), rt = w("0;1"), it = _(() => z.value?.loop === !1 ? "1" : "indefinite"), at = _(() => z.value?.loop === !1 ? "freeze" : void 0), ot = _(() => z.value.trail.show && ut.value.lengthPx || 1), st = _(() => !!z.value?.show && !Q.value && !Ke.value && !F.value && (Y.value?.length || 0) > 1);
|
|
789
|
+
function ct() {
|
|
790
|
+
if (!st.value) {
|
|
791
|
+
tt.value = 0;
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
794
|
+
let e = L.value;
|
|
795
|
+
if (!e) return;
|
|
796
|
+
let t = `#${K.value}`, n = e.querySelector?.(t);
|
|
797
|
+
if (n && typeof n.getTotalLength == "function") {
|
|
798
|
+
let e = n.getTotalLength();
|
|
799
|
+
Number.isFinite(e) && e > 0 && (tt.value = e);
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
requestAnimationFrame(() => {
|
|
803
|
+
let n = e.querySelector?.(t);
|
|
804
|
+
if (n && typeof n.getTotalLength == "function") {
|
|
805
|
+
let e = n.getTotalLength();
|
|
806
|
+
Number.isFinite(e) && e > 0 && (tt.value = e);
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
let lt = _(() => {
|
|
811
|
+
let e = z.value?.easing || "ease-in-out", t = {
|
|
812
|
+
ease: [
|
|
813
|
+
.25,
|
|
814
|
+
.1,
|
|
815
|
+
.25,
|
|
816
|
+
1
|
|
817
|
+
],
|
|
818
|
+
"ease-in": [
|
|
819
|
+
.42,
|
|
820
|
+
0,
|
|
821
|
+
1,
|
|
822
|
+
1
|
|
823
|
+
],
|
|
824
|
+
"ease-out": [
|
|
825
|
+
0,
|
|
826
|
+
0,
|
|
827
|
+
.58,
|
|
828
|
+
1
|
|
829
|
+
],
|
|
830
|
+
"ease-in-out": [
|
|
831
|
+
.42,
|
|
832
|
+
0,
|
|
833
|
+
.58,
|
|
834
|
+
1
|
|
835
|
+
]
|
|
836
|
+
};
|
|
837
|
+
return e === "linear" ? {
|
|
838
|
+
calcMode: "linear",
|
|
839
|
+
keySplines: null,
|
|
840
|
+
keyTimes: "0;1"
|
|
841
|
+
} : e === "steps" ? {
|
|
842
|
+
calcMode: "discrete",
|
|
843
|
+
keySplines: null,
|
|
844
|
+
keyTimes: "0;1"
|
|
845
|
+
} : {
|
|
846
|
+
calcMode: "spline",
|
|
847
|
+
keySplines: (e === "cubic-bezier" ? Array.isArray(z.value?.cubicBezier) && z.value.cubicBezier.length === 4 ? z.value.cubicBezier : [
|
|
848
|
+
.4,
|
|
849
|
+
0,
|
|
850
|
+
.2,
|
|
851
|
+
1
|
|
852
|
+
] : t[e] || t["ease-in-out"]).join(" "),
|
|
853
|
+
keyTimes: "0;1"
|
|
854
|
+
};
|
|
855
|
+
}), ut = _(() => {
|
|
856
|
+
let e = z.value?.trail || {}, t = P.value.style.line.strokeWidth || 1;
|
|
857
|
+
return {
|
|
858
|
+
show: e.show !== !1,
|
|
859
|
+
lengthPx: e.length,
|
|
860
|
+
width: Math.max(1, Number(e.strokeWidth) || t * 2.2),
|
|
861
|
+
opacity: Math.min(1, Math.max(0, Number(e.opacity) ?? .6)),
|
|
862
|
+
fadeIn: .5,
|
|
863
|
+
fadeOut: .2
|
|
864
|
+
};
|
|
865
|
+
}), B = _(() => c({
|
|
866
|
+
data: I.value,
|
|
867
|
+
threshold: P.value.downsample.threshold
|
|
868
|
+
}));
|
|
869
|
+
_(() => {
|
|
870
|
+
if (!P.value.temperatureColors.show) return !1;
|
|
871
|
+
let e = I.value.map(({ value: e }) => e).filter((e) => Number.isFinite(e));
|
|
872
|
+
return new Set(e).size <= 1;
|
|
873
|
+
}), O(() => k.config, (e) => {
|
|
874
|
+
F.value || (P.value = R()), Gt(), q.value.chartWidth = P.value.style.chartWidth;
|
|
875
|
+
}, { deep: !0 }), O(() => k.dataset, (e) => {
|
|
876
|
+
Array.isArray(e) && e.length > 0 && ($e.value = !1), V.value = c({
|
|
877
|
+
data: I.value.map((e) => ({
|
|
878
|
+
...e,
|
|
879
|
+
value: [void 0].includes(e.value) ? null : e.value
|
|
880
|
+
})),
|
|
881
|
+
threshold: P.value.downsample.threshold
|
|
882
|
+
});
|
|
883
|
+
}, { deep: !0 });
|
|
884
|
+
let V = w(H());
|
|
885
|
+
function H() {
|
|
886
|
+
return c({
|
|
887
|
+
data: I.value.map((e) => P.value.style.animation.show && I.value.length > 1 ? {
|
|
888
|
+
...e,
|
|
889
|
+
value: null
|
|
890
|
+
} : {
|
|
891
|
+
...e,
|
|
892
|
+
value: [void 0].includes(e.value) ? null : e.value
|
|
893
|
+
}),
|
|
894
|
+
threshold: P.value.downsample.threshold
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
let U = Ie(null), W = Ie(null), dt = w(!1), ft = w(0), pt = w([]), mt = w(""), G = _(() => {
|
|
898
|
+
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;
|
|
899
|
+
return `${e}#${!!t.show}#${t.animationFrames || 0}#${n}`;
|
|
900
|
+
});
|
|
901
|
+
function ht() {
|
|
902
|
+
ft.value &&= (cancelAnimationFrame(ft.value), 0), pt.value.forEach((e) => clearTimeout(e)), pt.value = [], dt.value = !1;
|
|
903
|
+
}
|
|
904
|
+
function gt() {
|
|
905
|
+
let e = P.value?.style?.animation || {}, t = B.value || [], n = G.value, r = !!P.value.gradientPath.show && !P.value.temperatureColors.show;
|
|
906
|
+
if (n && n === mt.value && (dt.value || V.value.length === t.length)) return;
|
|
907
|
+
if (ht(), r || !e.show || F.value || t.length <= 1 || Ke.value) {
|
|
908
|
+
V.value = t, mt.value = n;
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
dt.value = !0, mt.value = n, V.value = [];
|
|
912
|
+
let i = Math.max(1, Number(e.animationFrames) || 1), a = Math.max(1, Math.floor(i / t.length)), o = 0, s = () => {
|
|
913
|
+
if (n !== G.value) {
|
|
914
|
+
ht();
|
|
915
|
+
return;
|
|
916
|
+
}
|
|
917
|
+
if (o < t.length) {
|
|
918
|
+
V.value.push(t[o]);
|
|
919
|
+
let e = setTimeout(() => {
|
|
920
|
+
ft.value = requestAnimationFrame(s);
|
|
921
|
+
}, a);
|
|
922
|
+
pt.value.push(e), o += 1;
|
|
923
|
+
} else V.value = t, ht();
|
|
924
|
+
};
|
|
925
|
+
ft.value = requestAnimationFrame(s);
|
|
926
|
+
}
|
|
927
|
+
O(G, () => {
|
|
928
|
+
gt();
|
|
929
|
+
}), Fe(() => {
|
|
930
|
+
Gt(), gt();
|
|
931
|
+
}), Pe(() => {
|
|
932
|
+
ht();
|
|
933
|
+
});
|
|
934
|
+
let vt = w(0);
|
|
935
|
+
O(() => F.value, async (e) => {
|
|
936
|
+
e || (await x(), vt.value += 1);
|
|
937
|
+
}), O(() => dt.value, async (e) => {
|
|
938
|
+
e || F.value || (await x(), vt.value += 1);
|
|
939
|
+
});
|
|
940
|
+
let K = _(() => `sparkline_line_path_${A.value}`), Ht = w(!0);
|
|
941
|
+
async function Ut() {
|
|
942
|
+
Ht.value = !1, await x(), Ht.value = !0, await x(), ct();
|
|
943
|
+
}
|
|
944
|
+
let Wt = _(() => P.value.debug);
|
|
945
|
+
function Gt() {
|
|
946
|
+
if (s(k.dataset) ? (ce({
|
|
947
|
+
componentName: "VueUiSparkline",
|
|
948
|
+
type: "dataset",
|
|
949
|
+
debug: Wt.value
|
|
950
|
+
}), $e.value = !0) : Wt.value && k.dataset.forEach((e, t) => {
|
|
951
|
+
se({
|
|
952
|
+
datasetObject: e,
|
|
953
|
+
requiredAttributes: ["period", "value"]
|
|
954
|
+
}).forEach((e) => {
|
|
955
|
+
ce({
|
|
956
|
+
componentName: "VueUiSparkline",
|
|
957
|
+
type: "datasetSerieAttribute",
|
|
958
|
+
property: e,
|
|
959
|
+
index: t
|
|
960
|
+
});
|
|
961
|
+
});
|
|
962
|
+
}), s(k.dataset) || ($e.value = P.value.loading), P.value.responsive) {
|
|
963
|
+
let e = xe(() => {
|
|
964
|
+
let { width: e, height: t } = Se({
|
|
965
|
+
chart: j.value,
|
|
966
|
+
title: P.value.style.title.show && k.showInfo ? Ye.value : null,
|
|
967
|
+
source: Xe.value
|
|
968
|
+
});
|
|
969
|
+
requestAnimationFrame(() => {
|
|
970
|
+
q.value.width = e, q.value.height = t, q.value.chartWidth = P.value.style.chartWidth / 500 * e, q.value.padding = k.forcedPadding / 500 * e;
|
|
971
|
+
});
|
|
972
|
+
});
|
|
973
|
+
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);
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
Pe(() => {
|
|
977
|
+
U.value && (W.value && U.value.unobserve(W.value), U.value.disconnect());
|
|
978
|
+
});
|
|
979
|
+
let q = w({
|
|
980
|
+
height: 80 * k.heightRatio,
|
|
981
|
+
width: 500,
|
|
982
|
+
chartWidth: P.value.style.chartWidth,
|
|
983
|
+
padding: k.forcedPadding
|
|
984
|
+
}), Kt = be, J = _(() => {
|
|
985
|
+
let { top: e, right: t, bottom: n, left: r } = P.value.style.padding;
|
|
986
|
+
return {
|
|
987
|
+
top: e,
|
|
988
|
+
left: r,
|
|
989
|
+
right: q.value.width - t,
|
|
990
|
+
bottom: q.value.height - n,
|
|
991
|
+
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,
|
|
992
|
+
width: k.showInfo && P.value.style.dataLabel.show ? q.value.chartWidth - r - t : q.value.width - q.value.padding - r - t,
|
|
993
|
+
height: q.value.height - e - n
|
|
994
|
+
};
|
|
995
|
+
}), qt = _(() => [null, void 0].includes(P.value.style.scaleMin) ? Math.min(...V.value.map((e) => isNaN(e.value) || [
|
|
996
|
+
void 0,
|
|
997
|
+
null,
|
|
998
|
+
"NaN",
|
|
999
|
+
NaN,
|
|
1000
|
+
Infinity,
|
|
1001
|
+
-Infinity
|
|
1002
|
+
].includes(e.value) ? 0 : e.value || 0)) : P.value.style.scaleMin), Jt = _(() => [null, void 0].includes(P.value.style.scaleMax) ? Math.max(...V.value.map((e) => isNaN(e.value) || [
|
|
1003
|
+
void 0,
|
|
1004
|
+
null,
|
|
1005
|
+
"NaN",
|
|
1006
|
+
NaN,
|
|
1007
|
+
Infinity,
|
|
1008
|
+
-Infinity
|
|
1009
|
+
].includes(e.value) ? 0 : e.value || 0)) : P.value.style.scaleMax), Yt = _(() => {
|
|
1010
|
+
let e = qt.value >= 0 ? 0 : qt.value;
|
|
1011
|
+
return Math.abs(e);
|
|
1012
|
+
}), Xt = _(() => Jt.value + Yt.value), Zt = _(() => J.value.bottom - J.value.height * Qt(Yt.value));
|
|
1013
|
+
function Qt(e) {
|
|
1014
|
+
return isNaN(e / Xt.value) ? 0 : e / Xt.value;
|
|
1015
|
+
}
|
|
1016
|
+
let $t = _(() => B.value.length - 1 || 1), en = w([]), tn = 0;
|
|
1017
|
+
ze(() => {
|
|
1018
|
+
let e = ++tn;
|
|
1019
|
+
(async () => {
|
|
1020
|
+
let t = await h({
|
|
1021
|
+
values: B.value.map((e) => e.period),
|
|
1022
|
+
maxDatapoints: B.value.length,
|
|
1023
|
+
formatter: P.value.style.dataLabel.datetimeFormatter,
|
|
1024
|
+
start: 0,
|
|
1025
|
+
end: B.value.length
|
|
1026
|
+
});
|
|
1027
|
+
e === tn && (en.value = t);
|
|
1028
|
+
})();
|
|
1029
|
+
});
|
|
1030
|
+
let Y = _(() => V.value.map((e, t) => {
|
|
1031
|
+
let n = isNaN(e.value) || [
|
|
1032
|
+
void 0,
|
|
1033
|
+
"NaN",
|
|
1034
|
+
NaN,
|
|
1035
|
+
Infinity,
|
|
1036
|
+
-Infinity
|
|
1037
|
+
].includes(e.value) ? 0 : e.value, r = J.value.width / $t.value;
|
|
1038
|
+
return {
|
|
1039
|
+
value: e.value,
|
|
1040
|
+
absoluteValue: n,
|
|
1041
|
+
period: en.value && en.value[t] && en.value[t].text ? en.value[t].text : e.period,
|
|
1042
|
+
plotValue: n + Yt.value,
|
|
1043
|
+
toMax: Qt(n + Yt.value),
|
|
1044
|
+
x: J.value.start + t * r,
|
|
1045
|
+
y: J.value.bottom - J.value.height * Qt(n + Yt.value),
|
|
1046
|
+
id: `plot_${A.value}_${t}`,
|
|
1047
|
+
color: Q.value ? P.value.style.bar.color : P.value.style.area.useGradient ? f(P.value.style.line.color, .05 * (1 - t / $t.value)) : P.value.style.line.color,
|
|
1048
|
+
width: r
|
|
1049
|
+
};
|
|
1050
|
+
})), nn = _(() => 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), rn = w(void 0);
|
|
1051
|
+
function an(e, t) {
|
|
1052
|
+
P.value.events.datapointEnter && P.value.events.datapointEnter({
|
|
1053
|
+
datapoint: e,
|
|
1054
|
+
seriesIndex: t
|
|
1055
|
+
}), N.value = t, M.value = t, X.value = e, rn.value ||= e, Kt("hoverIndex", { index: t });
|
|
1056
|
+
}
|
|
1057
|
+
function on(e, t) {
|
|
1058
|
+
P.value.events.datapointLeave && P.value.events.datapointLeave({
|
|
1059
|
+
datapoint: e,
|
|
1060
|
+
seriesIndex: t
|
|
1061
|
+
}), rn.value = X.value, X.value = void 0, N.value = null, M.value = null, Kt("hoverIndex", { index: void 0 });
|
|
1062
|
+
}
|
|
1063
|
+
let Z = _(() => {
|
|
1064
|
+
if (qe.value) {
|
|
1065
|
+
let e = Y.value.map((e) => e.absoluteValue), t = e.reduce((e, t) => e + t, 0);
|
|
1066
|
+
return {
|
|
1067
|
+
latest: Y.value[Y.value.length - 1] ? Y.value[Y.value.length - 1].absoluteValue : 0,
|
|
1068
|
+
sum: t,
|
|
1069
|
+
average: t / Y.value.length,
|
|
1070
|
+
median: oe(e),
|
|
1071
|
+
trend: ie(Y.value.map(({ x: e, y: t, absoluteValue: n }) => ({
|
|
1072
|
+
x: e,
|
|
1073
|
+
y: t,
|
|
1074
|
+
value: n
|
|
1075
|
+
}))).trend
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1078
|
+
return {
|
|
1079
|
+
latest: null,
|
|
1080
|
+
sum: null,
|
|
1081
|
+
average: null,
|
|
1082
|
+
median: null,
|
|
1083
|
+
trend: null
|
|
1084
|
+
};
|
|
1085
|
+
}), sn = _(() => qe.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");
|
|
1086
|
+
function cn(e, t) {
|
|
1087
|
+
P.value.events.datapointClick && P.value.events.datapointClick({
|
|
1088
|
+
datapoint: e,
|
|
1089
|
+
seriesIndex: t
|
|
1090
|
+
}), Kt("selectDatapoint", {
|
|
1091
|
+
datapoint: e,
|
|
1092
|
+
index: t
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
let ln = _(() => Array.isArray(P.value.style.line.dashIndices) && P.value.style.line.dashIndices.length > 0), un = _(() => P.value.style.line.cutNullValues);
|
|
1096
|
+
function dn(e) {
|
|
1097
|
+
return ![
|
|
1098
|
+
null,
|
|
1099
|
+
void 0,
|
|
1100
|
+
"NaN",
|
|
1101
|
+
NaN,
|
|
1102
|
+
Infinity,
|
|
1103
|
+
-Infinity
|
|
1104
|
+
].includes(e);
|
|
1105
|
+
}
|
|
1106
|
+
function fn(e, t) {
|
|
1107
|
+
let n = e[t - 1], r = e[t + 1], i = !!n && !!r && n.value == null && r.value == null || !n && !!r && r.value == null || !!n && !r && n.value == null;
|
|
1108
|
+
return dn(e[t]?.value) && i && un.value;
|
|
1109
|
+
}
|
|
1110
|
+
function pn(e, t) {
|
|
1111
|
+
return X.value && e.id === X.value.id || nn.value === t || I.value.length === 1;
|
|
1112
|
+
}
|
|
1113
|
+
function mn(e, t) {
|
|
1114
|
+
return Q.value || !dn(e?.value) ? !1 : P.value.style.plot.show && pn(e, t) || fn(Y.value, t);
|
|
1115
|
+
}
|
|
1116
|
+
function hn(e, t) {
|
|
1117
|
+
return Math.max(1, pn(e, t) ? P.value.style.plot.radius : P.value.style.plot.radius * .7);
|
|
1118
|
+
}
|
|
1119
|
+
function gn(e, t) {
|
|
1120
|
+
return pn(e, t) ? P.value.style.plot.stroke : P.value.style.backgroundColor;
|
|
1121
|
+
}
|
|
1122
|
+
let _n = _(() => un.value ? Y.value : Y.value.filter((e) => e.value !== null)), vn = _(() => Y.value.filter((e) => e.value !== null)), yn = _(() => vn.value.length > 1), bn = _(() => Q.value || !yn.value ? "" : un.value ? i(Y.value) : l(_n.value)), xn = _(() => Q.value || !yn.value ? "" : un.value ? n(Y.value) : p(_n.value)), Sn = _(() => Q.value || !ln.value || !yn.value ? [] : a(_n.value, P.value.style.line.dashIndices)), Cn = _(() => Q.value || !ln.value || !yn.value ? [] : d(_n.value, P.value.style.line.dashIndices)), wn = _(() => Q.value || !P.value.style.area.show || !yn.value ? [] : P.value.style.line.smooth ? o(_n.value, J.value.bottom, un.value).filter(Boolean) : (un.value ? t(Y.value, J.value.bottom) : ae(_n.value, J.value.bottom)).split(";").filter(Boolean).map((e) => `M${e}Z`)), Tn = _(() => Q.value || !P.value.gradientPath.show || P.value.temperatureColors.show ? "" : `M ${(P.value.style.line.smooth ? bn.value : xn.value) || "0,0"}`), En = _(() => {
|
|
1123
|
+
if (!P.value.temperatureColors.show) return null;
|
|
1124
|
+
let e = P.value.temperatureColors.colors;
|
|
1125
|
+
return !Array.isArray(e) || !e.length ? null : e.map((e) => u(e));
|
|
1126
|
+
}), $ = _(() => {
|
|
1127
|
+
if (!P.value.temperatureColors.show) return null;
|
|
1128
|
+
let e = P.value.temperatureColors.colors;
|
|
1129
|
+
return !Array.isArray(e) || !e.length ? null : e.map((e) => u(e));
|
|
1130
|
+
});
|
|
1131
|
+
function Dn(e) {
|
|
1132
|
+
if (!Number.isFinite(e?.y)) return 0;
|
|
1133
|
+
let t = J.value.height || 1, n = (e.y - J.value.top) / t;
|
|
1134
|
+
return Math.min(1, Math.max(0, n));
|
|
1135
|
+
}
|
|
1136
|
+
function On(e) {
|
|
1137
|
+
let t = En.value;
|
|
1138
|
+
return !Array.isArray(t) || !t.length ? e.color : fe({
|
|
1139
|
+
colors: t,
|
|
1140
|
+
ratio: Dn(e)
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
1143
|
+
O(() => [
|
|
1144
|
+
st.value,
|
|
1145
|
+
K.value,
|
|
1146
|
+
Y.value.length,
|
|
1147
|
+
q.value.width,
|
|
1148
|
+
q.value.height,
|
|
1149
|
+
P.value?.style?.line?.smooth
|
|
1150
|
+
], async () => {
|
|
1151
|
+
await x(), ct();
|
|
1152
|
+
}, { immediate: !0 }), Fe(async () => {
|
|
1153
|
+
await x(), ct();
|
|
1154
|
+
}), O(() => F.value, async (e) => {
|
|
1155
|
+
e || await Ut();
|
|
1156
|
+
}), O(() => dt.value, async (e) => {
|
|
1157
|
+
e || F.value || await Ut();
|
|
1158
|
+
}), O(() => k.selectedIndex, (e) => {
|
|
1159
|
+
if (e == null) {
|
|
1160
|
+
N.value = null, M.value = null, X.value = void 0;
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1163
|
+
if (e < 0 || e >= Y.value.length) return;
|
|
1164
|
+
let t = Y.value[e];
|
|
1165
|
+
t && (N.value = e, M.value = e, X.value = t);
|
|
1166
|
+
});
|
|
1167
|
+
let kn = w(!1);
|
|
1168
|
+
function An() {
|
|
1169
|
+
let e = nn.value;
|
|
1170
|
+
if (e !== null && e >= 0 && e < Y.value.length) {
|
|
1171
|
+
let t = Y.value[e];
|
|
1172
|
+
if (t) {
|
|
1173
|
+
M.value = e, X.value = t, N.value = e, kn.value = !0;
|
|
1174
|
+
return;
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
M.value = null, !X.value && Y.value.length && an(Y.value.at(-1), Y.value.length - 1), kn.value = !0;
|
|
1178
|
+
}
|
|
1179
|
+
function jn() {
|
|
1180
|
+
rn.value = X.value, (k.selectedIndex === void 0 || k.selectedIndex === null) && (M.value = null, X.value = void 0, N.value = null, Kt("hoverIndex", { index: void 0 })), kn.value = !1;
|
|
1181
|
+
}
|
|
1182
|
+
function Mn(e) {
|
|
1183
|
+
if (!L.value || document.activeElement !== L.value) return;
|
|
1184
|
+
rn.value = X.value;
|
|
1185
|
+
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
|
|
1186
|
+
if (!t && !n) return;
|
|
1187
|
+
let r = Y.value.length;
|
|
1188
|
+
if (!r) return;
|
|
1189
|
+
e.preventDefault(), e.stopPropagation();
|
|
1190
|
+
let i = M.value, a = i !== null && i >= 0 && i < r, o = X.value ? Y.value.findIndex((e) => e.id === X.value.id) : -1;
|
|
1191
|
+
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;
|
|
1192
|
+
let s = Y.value[i];
|
|
1193
|
+
s && (M.value = i, an(s, i));
|
|
1194
|
+
}
|
|
1195
|
+
let Nn = _(() => ({
|
|
1196
|
+
headers: [P.value.translations.period, P.value.translations.value],
|
|
1197
|
+
rows: Y.value.map((e) => [e.period, e.absoluteValue])
|
|
1198
|
+
}));
|
|
1199
|
+
return (t, n) => (C(), y("div", {
|
|
1200
|
+
ref_key: "sparklineChart",
|
|
1201
|
+
ref: j,
|
|
1202
|
+
class: "vue-data-ui-component vue-ui-sparkline",
|
|
1203
|
+
id: A.value,
|
|
1204
|
+
style: S(`width:100%;font-family:${P.value.style.fontFamily};`)
|
|
1205
|
+
}, [
|
|
1206
|
+
b("p", {
|
|
1207
|
+
id: `chart-instructions-${A.value}`,
|
|
1208
|
+
class: "sr-only"
|
|
1209
|
+
}, Le(P.value.a11y.translations.keyboardNavigation), 9, bt),
|
|
1210
|
+
Nn.value?.rows?.length ? (C(), Oe(we, {
|
|
1211
|
+
key: 0,
|
|
1212
|
+
uid: A.value,
|
|
1213
|
+
head: Nn.value.headers,
|
|
1214
|
+
body: Nn.value.rows,
|
|
1215
|
+
notice: P.value.a11y.translations.tableAvailable,
|
|
1216
|
+
caption: P.value.a11y.translations.tableCaption
|
|
1217
|
+
}, null, 8, [
|
|
1218
|
+
"uid",
|
|
1219
|
+
"head",
|
|
1220
|
+
"body",
|
|
1221
|
+
"notice",
|
|
1222
|
+
"caption"
|
|
1223
|
+
])) : v("", !0),
|
|
1224
|
+
E(t.$slots, "before", Ne(Me({
|
|
1225
|
+
selected: X.value,
|
|
1226
|
+
latest: Z.value.latest,
|
|
1227
|
+
sum: Z.value.sum,
|
|
1228
|
+
average: Z.value.average,
|
|
1229
|
+
median: Z.value.median,
|
|
1230
|
+
trend: Z.value.trend
|
|
1231
|
+
})), void 0, !0),
|
|
1232
|
+
P.value.style.title.show && e.showInfo ? (C(), y("div", {
|
|
1233
|
+
key: 1,
|
|
1234
|
+
ref_key: "chartTitle",
|
|
1235
|
+
ref: Ye,
|
|
1236
|
+
class: "vue-ui-sparkline-title",
|
|
1237
|
+
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"};`)
|
|
1238
|
+
}, [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"}`) }, Le(X.value ? X.value.period : P.value.style.title.text), 5)], 4)) : v("", !0),
|
|
1239
|
+
b("div", xt, [(C(), y("svg", {
|
|
1240
|
+
ref_key: "svgRef",
|
|
1241
|
+
ref: L,
|
|
1242
|
+
xmlns: D(de),
|
|
1243
|
+
viewBox: `0 0 ${q.value.width} ${q.value.height}`,
|
|
1244
|
+
style: S(`background:${P.value.style.backgroundColor};overflow:visible;direction:ltr`),
|
|
1245
|
+
tabindex: "0",
|
|
1246
|
+
"aria-describedby": `chart-instructions-${A.value}`,
|
|
1247
|
+
onMouseleave: n[0] ||= (e) => rn.value = void 0,
|
|
1248
|
+
onFocus: An,
|
|
1249
|
+
onBlur: jn,
|
|
1250
|
+
onKeydown: Mn
|
|
1251
|
+
}, [
|
|
1252
|
+
Ae(D(Ve)),
|
|
1253
|
+
t.$slots["chart-background"] ? (C(), y("foreignObject", {
|
|
1254
|
+
key: 0,
|
|
1255
|
+
x: 0,
|
|
1256
|
+
y: 0,
|
|
1257
|
+
width: q.value.width <= 0 ? 10 : q.value.width,
|
|
1258
|
+
height: q.value.height <= 0 ? 10 : q.value.height,
|
|
1259
|
+
style: { pointerEvents: "none" }
|
|
1260
|
+
}, [E(t.$slots, "chart-background", {}, void 0, !0)], 8, Ct)) : v("", !0),
|
|
1261
|
+
b("defs", null, [
|
|
1262
|
+
Ae(Ce, {
|
|
1263
|
+
t: "linear",
|
|
1264
|
+
x1: "0%",
|
|
1265
|
+
y1: "0%",
|
|
1266
|
+
x2: "100%",
|
|
1267
|
+
y2: "0%",
|
|
1268
|
+
id: `sparkline_gradient_${A.value}`,
|
|
1269
|
+
stops: [[
|
|
1270
|
+
"0%",
|
|
1271
|
+
D(r)(D(f)(P.value.style.area.color, .05), P.value.style.area.opacity),
|
|
1272
|
+
1
|
|
1273
|
+
], [
|
|
1274
|
+
"100%",
|
|
1275
|
+
D(r)(P.value.style.area.color, P.value.style.area.opacity),
|
|
1276
|
+
1
|
|
1277
|
+
]]
|
|
1278
|
+
}, null, 8, ["id", "stops"]),
|
|
1279
|
+
Ae(Ce, {
|
|
1280
|
+
t: "linear",
|
|
1281
|
+
x2: "0%",
|
|
1282
|
+
y2: "100%",
|
|
1283
|
+
id: `sparkline_bar_gradient_pos_${A.value}`,
|
|
1284
|
+
stops: [[
|
|
1285
|
+
"0%",
|
|
1286
|
+
P.value.style.bar.color,
|
|
1287
|
+
1
|
|
1288
|
+
], [
|
|
1289
|
+
"100%",
|
|
1290
|
+
D(f)(P.value.style.bar.color, .05),
|
|
1291
|
+
1
|
|
1292
|
+
]]
|
|
1293
|
+
}, null, 8, ["id", "stops"]),
|
|
1294
|
+
Ae(Ce, {
|
|
1295
|
+
t: "linear",
|
|
1296
|
+
x2: "0%",
|
|
1297
|
+
y2: "100%",
|
|
1298
|
+
id: `sparkline_bar_gradient_neg_${A.value}`,
|
|
1299
|
+
stops: [[
|
|
1300
|
+
"0%",
|
|
1301
|
+
D(f)(P.value.style.bar.color, .05),
|
|
1302
|
+
1
|
|
1303
|
+
], [
|
|
1304
|
+
"100%",
|
|
1305
|
+
P.value.style.bar.color,
|
|
1306
|
+
1
|
|
1307
|
+
]]
|
|
1308
|
+
}, null, 8, ["id", "stops"]),
|
|
1309
|
+
b("filter", {
|
|
1310
|
+
id: `sparkline_pulse_glow_${A.value}`,
|
|
1311
|
+
filterUnits: "userSpaceOnUse",
|
|
1312
|
+
x: "-50",
|
|
1313
|
+
y: "-50",
|
|
1314
|
+
width: "100",
|
|
1315
|
+
height: "100"
|
|
1316
|
+
}, [...n[1] ||= [b("feGaussianBlur", {
|
|
1317
|
+
in: "SourceGraphic",
|
|
1318
|
+
stdDeviation: "3",
|
|
1319
|
+
result: "blur"
|
|
1320
|
+
}, null, -1), b("feMerge", null, [b("feMergeNode", { in: "blur" }), b("feMergeNode", { in: "SourceGraphic" })], -1)]], 8, wt),
|
|
1321
|
+
P.value.temperatureColors.show && $.value ? (C(), y("linearGradient", {
|
|
1322
|
+
key: 0,
|
|
1323
|
+
id: `temperature_grad_sparkline_${A.value}`,
|
|
1324
|
+
gradientUnits: "userSpaceOnUse",
|
|
1325
|
+
x1: "0",
|
|
1326
|
+
x2: "0",
|
|
1327
|
+
y1: J.value.top,
|
|
1328
|
+
y2: J.value.bottom
|
|
1329
|
+
}, [(C(!0), y(g, null, T($.value, (e, t) => (C(), y("stop", {
|
|
1330
|
+
key: `temperature_grad_stop_${t}_${A.value}`,
|
|
1331
|
+
"stop-color": e,
|
|
1332
|
+
offset: $.value.length === 1 ? "0%" : D(ee)(t, $.value.length)
|
|
1333
|
+
}, null, 8, Et))), 128))], 8, Tt)) : v("", !0)
|
|
1334
|
+
]),
|
|
1335
|
+
P.value.style.area.show && !Q.value && wn.value.length ? (C(), y("g", Dt, [(C(!0), y(g, null, T(wn.value, (e, t) => (C(), y("path", {
|
|
1336
|
+
key: `sparkline_area_${t}_${A.value}`,
|
|
1337
|
+
class: "vue-ui-sparkline-area",
|
|
1338
|
+
"data-cy": P.value.style.line.smooth ? "sparkline-smooth-area" : "sparkline-angle-area",
|
|
1339
|
+
d: e,
|
|
1340
|
+
fill: P.value.style.area.useGradient ? `url(#sparkline_gradient_${A.value})` : D(r)(P.value.style.area.color, P.value.style.area.opacity),
|
|
1341
|
+
"stroke-linecap": "round",
|
|
1342
|
+
"stroke-linejoin": "round",
|
|
1343
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1344
|
+
}, null, 12, Ot))), 128))])) : v("", !0),
|
|
1345
|
+
P.value.style.line.smooth && !Q.value ? (C(), y(g, { key: 2 }, [b("path", {
|
|
1346
|
+
id: K.value,
|
|
1347
|
+
d: `M ${bn.value || "0,0"}`,
|
|
1348
|
+
fill: "none",
|
|
1349
|
+
stroke: "transparent",
|
|
1350
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1351
|
+
"stroke-linecap": "round",
|
|
1352
|
+
"stroke-linejoin": "round"
|
|
1353
|
+
}, null, 8, kt), ln.value ? (C(!0), y(g, { key: 0 }, T(Sn.value, (e) => (C(), y("path", {
|
|
1354
|
+
key: e.path,
|
|
1355
|
+
class: "vue-ui-sparkline-path",
|
|
1356
|
+
d: `M ${e.path}`,
|
|
1357
|
+
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` : P.value.style.line.color,
|
|
1358
|
+
fill: "none",
|
|
1359
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1360
|
+
"stroke-linecap": "round",
|
|
1361
|
+
"stroke-linejoin": "round",
|
|
1362
|
+
"stroke-dasharray": e.dashed ? P.value.style.line.dashArray : 0,
|
|
1363
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1364
|
+
}, null, 12, At))), 128)) : (C(), y("path", {
|
|
1365
|
+
key: 1,
|
|
1366
|
+
class: "vue-ui-sparkline-path",
|
|
1367
|
+
d: `M ${bn.value || "0,0"}`,
|
|
1368
|
+
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` : P.value.style.line.color,
|
|
1369
|
+
fill: "none",
|
|
1370
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1371
|
+
"stroke-linecap": "round",
|
|
1372
|
+
"stroke-linejoin": "round",
|
|
1373
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1374
|
+
}, null, 12, jt))], 64)) : v("", !0),
|
|
1375
|
+
!P.value.style.line.smooth && !Q.value ? (C(), y(g, { key: 3 }, [b("path", {
|
|
1376
|
+
id: K.value,
|
|
1377
|
+
d: `M ${xn.value || "0,0"}`,
|
|
1378
|
+
fill: "none",
|
|
1379
|
+
stroke: "transparent",
|
|
1380
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1381
|
+
"stroke-linecap": "round",
|
|
1382
|
+
"stroke-linejoin": "round"
|
|
1383
|
+
}, null, 8, Mt), ln.value ? (C(!0), y(g, { key: 0 }, T(Cn.value, (e) => (C(), y("path", {
|
|
1384
|
+
key: e.path,
|
|
1385
|
+
class: "vue-ui-sparkline-path",
|
|
1386
|
+
d: `M ${e.path}`,
|
|
1387
|
+
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` : P.value.style.line.color,
|
|
1388
|
+
fill: "none",
|
|
1389
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1390
|
+
"stroke-linecap": "round",
|
|
1391
|
+
"stroke-linejoin": "round",
|
|
1392
|
+
"stroke-dasharray": e.dashed ? P.value.style.line.dashArray * 2 : 0,
|
|
1393
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1394
|
+
}, null, 12, Nt))), 128)) : (C(), y("path", {
|
|
1395
|
+
key: 1,
|
|
1396
|
+
class: "vue-ui-sparkline-path",
|
|
1397
|
+
d: `M ${xn.value || "0,0"}`,
|
|
1398
|
+
stroke: $.value ? `url(#temperature_grad_sparkline_${A.value})` : P.value.style.line.color,
|
|
1399
|
+
fill: "none",
|
|
1400
|
+
"stroke-width": P.value.style.line.strokeWidth,
|
|
1401
|
+
"stroke-linecap": "round",
|
|
1402
|
+
"stroke-linejoin": "round",
|
|
1403
|
+
style: S({ transition: D(F) ? void 0 : "all 0.2s" })
|
|
1404
|
+
}, null, 12, Pt))], 64)) : v("", !0),
|
|
1405
|
+
Tn.value && !$.value ? (C(), Oe(_t, {
|
|
1406
|
+
key: 4,
|
|
1407
|
+
svgPathData: Tn.value,
|
|
1408
|
+
enabled: P.value.gradientPath.show && !Q.value && !$.value,
|
|
1409
|
+
strokeWidth: P.value.style.line.strokeWidth,
|
|
1410
|
+
highColor: P.value.gradientPath.colors.high,
|
|
1411
|
+
lowColor: P.value.gradientPath.colors.low,
|
|
1412
|
+
segments: P.value.gradientPath.segments
|
|
1413
|
+
}, null, 8, [
|
|
1414
|
+
"svgPathData",
|
|
1415
|
+
"enabled",
|
|
1416
|
+
"strokeWidth",
|
|
1417
|
+
"highColor",
|
|
1418
|
+
"lowColor",
|
|
1419
|
+
"segments"
|
|
1420
|
+
])) : v("", !0),
|
|
1421
|
+
Ht.value && st.value ? (C(), Oe(Je, {
|
|
1422
|
+
key: 5,
|
|
1423
|
+
uid: A.value,
|
|
1424
|
+
svgRef: D(L),
|
|
1425
|
+
pulsePathId: K.value,
|
|
1426
|
+
pulsePathLength: tt.value,
|
|
1427
|
+
pulseDur: et.value,
|
|
1428
|
+
pulseBegin: nt.value,
|
|
1429
|
+
pulseRepeatCount: it.value,
|
|
1430
|
+
pulseFillMode: at.value,
|
|
1431
|
+
pulseKeyPoints: rt.value,
|
|
1432
|
+
pulseMotion: lt.value,
|
|
1433
|
+
pulse: z.value,
|
|
1434
|
+
pulseTrail: ut.value,
|
|
1435
|
+
pulseTrailLength: ot.value,
|
|
1436
|
+
prefersReducedMotion: D(Ke),
|
|
1437
|
+
loading: D(F),
|
|
1438
|
+
isBar: Q.value
|
|
1439
|
+
}, null, 8, [
|
|
1440
|
+
"uid",
|
|
1441
|
+
"svgRef",
|
|
1442
|
+
"pulsePathId",
|
|
1443
|
+
"pulsePathLength",
|
|
1444
|
+
"pulseDur",
|
|
1445
|
+
"pulseBegin",
|
|
1446
|
+
"pulseRepeatCount",
|
|
1447
|
+
"pulseFillMode",
|
|
1448
|
+
"pulseKeyPoints",
|
|
1449
|
+
"pulseMotion",
|
|
1450
|
+
"pulse",
|
|
1451
|
+
"pulseTrail",
|
|
1452
|
+
"pulseTrailLength",
|
|
1453
|
+
"prefersReducedMotion",
|
|
1454
|
+
"loading",
|
|
1455
|
+
"isBar"
|
|
1456
|
+
])) : v("", !0),
|
|
1457
|
+
(C(!0), y(g, null, T(Y.value, (e, t) => (C(), y("g", null, [Q.value ? (C(), y("rect", {
|
|
1458
|
+
key: 0,
|
|
1459
|
+
x: e.x - e.width / 2,
|
|
1460
|
+
y: isNaN(e.absoluteValue > 0 ? e.y : Zt.value) ? 0 : e.absoluteValue > 0 ? e.y : Zt.value,
|
|
1461
|
+
width: e.width,
|
|
1462
|
+
height: isNaN(Math.abs(e.y - Zt.value)) ? 0 : Math.abs(e.y - Zt.value),
|
|
1463
|
+
fill: e.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${A.value})` : `url(#sparkline_bar_gradient_neg_${A.value})`,
|
|
1464
|
+
rx: P.value.style.bar.borderRadius
|
|
1465
|
+
}, null, 8, Ft)) : v("", !0), P.value.style.verticalIndicator.show && (X.value && e.id === X.value.id || nn.value === t) ? (C(), y("line", {
|
|
1466
|
+
key: 1,
|
|
1467
|
+
x1: e.x,
|
|
1468
|
+
x2: e.x,
|
|
1469
|
+
y1: J.value.top - 6,
|
|
1470
|
+
y2: J.value.bottom,
|
|
1471
|
+
stroke: P.value.style.verticalIndicator.color || e.color,
|
|
1472
|
+
"stroke-width": P.value.style.verticalIndicator.strokeWidth,
|
|
1473
|
+
"stroke-linecap": "round",
|
|
1474
|
+
"stroke-dasharray": P.value.style.verticalIndicator.strokeDasharray || 0
|
|
1475
|
+
}, null, 8, It)) : v("", !0)]))), 256)),
|
|
1476
|
+
qt.value < 0 ? (C(), y("line", {
|
|
1477
|
+
key: 6,
|
|
1478
|
+
x1: J.value.start,
|
|
1479
|
+
x2: J.value.start + J.value.width,
|
|
1480
|
+
y1: D(ue)(Zt.value, J.value.bottom),
|
|
1481
|
+
y2: D(ue)(Zt.value, J.value.bottom),
|
|
1482
|
+
stroke: P.value.style.zeroLine.color,
|
|
1483
|
+
"stroke-dasharray": P.value.style.zeroLine.strokeWidth * 2,
|
|
1484
|
+
"stroke-width": P.value.style.zeroLine.strokeWidth,
|
|
1485
|
+
"stroke-linecap": "round"
|
|
1486
|
+
}, null, 8, Lt)) : v("", !0),
|
|
1487
|
+
(C(!0), y(g, null, T(Y.value, (e, t) => (C(), y("g", { key: `sparkline_plot_${e.id}` }, [mn(e, t) ? (C(), y("circle", {
|
|
1488
|
+
key: 0,
|
|
1489
|
+
cx: e.x,
|
|
1490
|
+
cy: e.y,
|
|
1491
|
+
r: hn(e, t),
|
|
1492
|
+
fill: On(e),
|
|
1493
|
+
stroke: gn(e, t),
|
|
1494
|
+
"stroke-width": P.value.style.plot.strokeWidth
|
|
1495
|
+
}, null, 8, Rt)) : v("", !0)]))), 128)),
|
|
1496
|
+
e.showInfo && P.value.style.dataLabel.show ? (C(), y("text", {
|
|
1497
|
+
key: 7,
|
|
1498
|
+
x: P.value.style.dataLabel.position === "left" ? 12 + P.value.style.dataLabel.offsetX : J.value.width + 12 + P.value.style.dataLabel.offsetX,
|
|
1499
|
+
y: q.value.height / 2 + P.value.style.dataLabel.fontSize / 2.5 + P.value.style.dataLabel.offsetY,
|
|
1500
|
+
"font-size": P.value.style.dataLabel.fontSize,
|
|
1501
|
+
"font-weight": P.value.style.dataLabel.bold ? "bold" : "normal",
|
|
1502
|
+
fill: P.value.style.dataLabel.color
|
|
1503
|
+
}, Le(X.value ? D(m)(P.value.style.dataLabel.formatter, X.value.absoluteValue, D(te)({
|
|
1504
|
+
p: P.value.style.dataLabel.prefix,
|
|
1505
|
+
v: X.value.absoluteValue,
|
|
1506
|
+
s: P.value.style.dataLabel.suffix,
|
|
1507
|
+
r: P.value.style.dataLabel.roundingValue
|
|
1508
|
+
}), { datapoint: X.value }) : D(m)(P.value.style.dataLabel.formatter, sn.value, D(te)({
|
|
1509
|
+
p: P.value.style.dataLabel.prefix,
|
|
1510
|
+
v: sn.value,
|
|
1511
|
+
s: P.value.style.dataLabel.suffix,
|
|
1512
|
+
r: P.value.style.dataLabel.roundingValue
|
|
1513
|
+
}))), 9, zt)) : v("", !0),
|
|
1514
|
+
(C(!0), y(g, null, T(Y.value, (e, t) => (C(), y("rect", {
|
|
1515
|
+
x: e.x - (J.value.width / ($t.value + 1) > q.value.padding ? q.value.padding : J.value.width / ($t.value + 1)) / 2,
|
|
1516
|
+
y: J.value.top - 6,
|
|
1517
|
+
height: J.value.height + 6,
|
|
1518
|
+
width: J.value.width / ($t.value + 1) > q.value.padding ? q.value.padding : J.value.width / ($t.value + 1),
|
|
1519
|
+
fill: "transparent",
|
|
1520
|
+
onMouseenter: () => an(e, t),
|
|
1521
|
+
onMouseleave: () => on(e, t),
|
|
1522
|
+
onClick: () => cn(e, t)
|
|
1523
|
+
}, null, 40, Bt))), 256)),
|
|
1524
|
+
E(t.$slots, "svg", { svg: {
|
|
1525
|
+
...q.value,
|
|
1526
|
+
drawingArea: J.value,
|
|
1527
|
+
timeLabels: en.value,
|
|
1528
|
+
series: Y.value,
|
|
1529
|
+
hoveredIndex: M.value
|
|
1530
|
+
} }, void 0, !0)
|
|
1531
|
+
], 44, St)), t.$slots.hint ? (C(), y("div", Vt, [E(t.$slots, "hint", Ne(Me({
|
|
1532
|
+
hint: P.value.a11y.translations.keyboardNavigation,
|
|
1533
|
+
isVisible: kn.value
|
|
1534
|
+
})), void 0, !0)])) : v("", !0)]),
|
|
1535
|
+
X.value && P.value.style.tooltip.show ? (C(), Oe(D(He), {
|
|
1536
|
+
key: 2,
|
|
1537
|
+
x: X.value.x,
|
|
1538
|
+
y: X.value.y,
|
|
1539
|
+
prevX: rn.value.x,
|
|
1540
|
+
prevY: rn.value.y,
|
|
1541
|
+
offsetY: P.value.style.plot.radius * 3 + P.value.style.tooltip.offsetY,
|
|
1542
|
+
svgRef: D(L),
|
|
1543
|
+
background: P.value.style.tooltip.backgroundColor,
|
|
1544
|
+
color: P.value.style.tooltip.color,
|
|
1545
|
+
fontSize: P.value.style.tooltip.fontSize,
|
|
1546
|
+
borderWidth: P.value.style.tooltip.borderWidth,
|
|
1547
|
+
borderColor: P.value.style.tooltip.borderColor,
|
|
1548
|
+
borderRadius: P.value.style.tooltip.borderRadius,
|
|
1549
|
+
backgroundOpacity: P.value.style.tooltip.backgroundOpacity
|
|
1550
|
+
}, {
|
|
1551
|
+
default: Be(() => [E(t.$slots, "tooltip", Ne(Me({ ...X.value })), () => [ke(Le(X.value.period) + ": " + Le(D(m)(P.value.style.dataLabel.formatter, X.value.absoluteValue, D(te)({
|
|
1552
|
+
p: P.value.style.dataLabel.prefix,
|
|
1553
|
+
v: X.value.absoluteValue,
|
|
1554
|
+
s: P.value.style.dataLabel.suffix,
|
|
1555
|
+
r: P.value.style.dataLabel.roundingValue
|
|
1556
|
+
}), { datapoint: X.value })), 1)], !0)]),
|
|
1557
|
+
_: 3
|
|
1558
|
+
}, 8, [
|
|
1559
|
+
"x",
|
|
1560
|
+
"y",
|
|
1561
|
+
"prevX",
|
|
1562
|
+
"prevY",
|
|
1563
|
+
"offsetY",
|
|
1564
|
+
"svgRef",
|
|
1565
|
+
"background",
|
|
1566
|
+
"color",
|
|
1567
|
+
"fontSize",
|
|
1568
|
+
"borderWidth",
|
|
1569
|
+
"borderColor",
|
|
1570
|
+
"borderRadius",
|
|
1571
|
+
"backgroundOpacity"
|
|
1572
|
+
])) : v("", !0),
|
|
1573
|
+
t.$slots.source ? (C(), y("div", {
|
|
1574
|
+
key: 3,
|
|
1575
|
+
ref_key: "source",
|
|
1576
|
+
ref: Xe,
|
|
1577
|
+
dir: "auto"
|
|
1578
|
+
}, [E(t.$slots, "source", {}, void 0, !0)], 512)) : v("", !0),
|
|
1579
|
+
E(t.$slots, "skeleton", {}, () => [D(F) ? (C(), Oe(_e, { key: 0 })) : v("", !0)], !0)
|
|
1580
|
+
], 12, yt));
|
|
1581
|
+
}
|
|
1582
|
+
}, [["__scopeId", "data-v-4d09c790"]]);
|
|
1583
|
+
//#endregion
|
|
1584
|
+
export { vt as n, K as t };
|