vue-data-ui 3.22.7 → 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-DaGI9u-b.js → Arrow-DdymhUfY.js} +1 -1
- package/dist/{BaseDraggableDialog-1wwwdwV2.js → BaseDraggableDialog-DcfGlH8A.js} +2 -2
- package/dist/{BaseIcon-_-BX7be3.js → BaseIcon-C2qlyHc7.js} +1 -1
- package/dist/{BaseLegendToggle-CHnlKalt.js → BaseLegendToggle-DtQ8vyfr.js} +1 -1
- package/dist/{BaseZoomControls-C9bdZSCj.js → BaseZoomControls-C6zonwhr.js} +2 -2
- package/dist/{ColorPicker-TB3KhY3j.js → ColorPicker-CK2-h611.js} +2 -2
- package/dist/{DataTable-CVF7DoZn.js → DataTable-D9NvewTT.js} +2 -2
- package/dist/{Legend-kAr7Vqqu.js → Legend-ROt6ugzW.js} +2 -2
- package/dist/{NonSvgPenAndPaper-CEiv7_gM.js → NonSvgPenAndPaper-BHHNsVVP.js} +3 -3
- package/dist/{PackageVersion-Dse0n05o.js → PackageVersion-DW7zwRcm.js} +1 -1
- package/dist/{PenAndPaper-gaV1QPpP.js → PenAndPaper-pcgwlYr2.js} +3 -3
- package/dist/{Shape-CiQIxyyT.js → Shape-UpH0a4Ur.js} +3 -3
- package/dist/{Slicer-6FOtg9py.js → Slicer-BZ5VnOOS.js} +19 -19
- package/dist/{SlicerPreview-DUywypFu.js → SlicerPreview-BQFeCw0m.js} +351 -351
- package/dist/{SparkTooltip-B-qsPj68.js → SparkTooltip-BTLN-Kex.js} +6 -6
- package/dist/{Title-PiTKr6sp.js → Title-CcNiYzEo.js} +1 -1
- package/dist/{Tooltip-B8yYfISA.js → Tooltip-CxOrWlFy.js} +1 -1
- package/dist/{UserOptions-BL9VlHop.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-BZjYWNEg.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_abIg0o.js → img-DnP3eXuv.js} +1 -1
- package/dist/{labelUtils-CTDRZdP1.js → labelUtils-DBEh078l.js} +1 -1
- package/dist/{lib-EAmk-PgA.js → lib-JqW18y5I.js} +36 -30
- package/dist/{package-DeMimPej.js → package-gp9pYCfN.js} +1 -1
- package/dist/{pdf-B6qrdEqB.js → pdf-hj3gzrE7.js} +1 -1
- package/dist/{render-common-DMai0gHB.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-CyOGrdD_.js → useAutoSizeLabelsInsideViewbox-BGnDfZdg.js} +1 -1
- package/dist/{useNestedProp-D8XqxgOU.js → useNestedProp-DIuuzG1r.js} +1 -1
- package/dist/{usePrinter-DnGzpp6Q.js → usePrinter-CqqHmnBI.js} +2 -2
- package/dist/utils.js +24 -24
- package/dist/{vue-data-ui-D6qVWloL.js → vue-data-ui-AZZ9Cq-4.js} +68 -68
- package/dist/vue-data-ui.js +77 -77
- package/dist/vue-ui-3d-bar-B3HxJmDI.js +1757 -0
- package/dist/{vue-ui-accordion-Dzz8XhX3.js → vue-ui-accordion-YyosvEPo.js} +3 -3
- package/dist/vue-ui-age-pyramid-DTAOc7fn.js +1238 -0
- package/dist/{vue-ui-annotator-DXZumSP8.js → vue-ui-annotator-CfJXeAOE.js} +67 -67
- 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-RfWMGUD-.js +2010 -0
- package/dist/vue-ui-chord-Db1O_diJ.js +1391 -0
- package/dist/vue-ui-circle-pack-B4Ro7UuI.js +1608 -0
- package/dist/{vue-ui-cursor-DLJcFwRZ.js → vue-ui-cursor-DLP7wxsw.js} +61 -61
- package/dist/{vue-ui-dag-DemsIecS.js → vue-ui-dag-DL3zq0F2.js} +43 -43
- package/dist/{vue-ui-dashboard-DWHD_wNN.js → vue-ui-dashboard-C2ozZ-LI.js} +69 -69
- package/dist/{vue-ui-digits-sIKc85vS.js → vue-ui-digits-ThFVNO3l.js} +3 -3
- package/dist/{vue-ui-donut-Dp6GW0dw.js → vue-ui-donut-BuTd6dt4.js} +201 -201
- package/dist/{vue-ui-donut-CLheJPcO.js → vue-ui-donut-C3Rt6j-I.js} +592 -592
- package/dist/{vue-ui-donut-evolution-zmRPpJLj.js → vue-ui-donut-evolution-DY46UPF_.js} +442 -442
- package/dist/{vue-ui-dumbbell-bSbgHd0U.js → vue-ui-dumbbell-wK7vUB0x.js} +238 -238
- package/dist/{vue-ui-flow-q_M7O1BK.js → vue-ui-flow-BTUNfWb7.js} +119 -119
- package/dist/{vue-ui-funnel-BEZUEuuh.js → vue-ui-funnel-BhoHzyHa.js} +162 -162
- package/dist/{vue-ui-galaxy-DCCWmIyH.js → vue-ui-galaxy-DJ2uNYcN.js} +342 -342
- package/dist/{vue-ui-gauge-B1ljgfE1.js → vue-ui-gauge-Cf4NqvrO.js} +55 -55
- package/dist/{vue-ui-geo-CM59rpnj.js → vue-ui-geo-ovHu_Sc9.js} +14 -14
- package/dist/{vue-ui-gizmo-D2RL6IVp.js → vue-ui-gizmo-DDxEj-qe.js} +62 -62
- package/dist/{vue-ui-heatmap-BX6PQxML.js → vue-ui-heatmap-Npqnvb1r.js} +163 -163
- package/dist/{vue-ui-history-plot-DaHAeQph.js → vue-ui-history-plot-C3Kjy2tc.js} +371 -371
- package/dist/vue-ui-horizontal-bar-D1rCsgqt.js +1683 -0
- package/dist/{vue-ui-kpi-DLbP7lJR.js → vue-ui-kpi-BrlfYO-j.js} +4 -4
- package/dist/{vue-ui-mini-loader-DPHzHsM7.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-CCWaPr0P.js → vue-ui-mood-radar-DlVh6hwx.js} +45 -45
- 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-DSp_cwU-.js +1416 -0
- package/dist/{vue-ui-quadrant-T_UmRAAy.js → vue-ui-quadrant-ByVg-NBs.js} +58 -58
- package/dist/vue-ui-quick-chart-WMzSJxGZ.js +2469 -0
- package/dist/{vue-ui-radar-CHjeGOMC.js → vue-ui-radar-DE-me6OC.js} +79 -79
- package/dist/vue-ui-rating-CzD3EQ3G.js +343 -0
- package/dist/{vue-ui-relation-circle-DRZGQ_UX.js → vue-ui-relation-circle-L7-dTqet.js} +167 -167
- 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-Fmue6DAG.js → vue-ui-skeleton-CuFm4PtB.js} +58 -58
- package/dist/{vue-ui-smiley-BVMI5vUy.js → vue-ui-smiley-D4NnZ1mg.js} +16 -16
- package/dist/{vue-ui-spark-trend-DfZeLiWA.js → vue-ui-spark-trend-C38ysZ-c.js} +99 -99
- package/dist/{vue-ui-sparkbar-Cl1e49sw.js → vue-ui-sparkbar-B03ndcUe.js} +30 -30
- package/dist/{vue-ui-sparkgauge-DDNNBIdf.js → vue-ui-sparkgauge-DgPc4vPT.js} +48 -48
- package/dist/{vue-ui-sparkhistogram-ny_liYa6.js → vue-ui-sparkhistogram-D02ff7ZI.js} +72 -72
- package/dist/vue-ui-sparkline-DlTfNQj8.js +1547 -0
- package/dist/{vue-ui-sparkstackbar-BfF5-Wg2.js → vue-ui-sparkstackbar-DrmiWFlw.js} +110 -110
- package/dist/{vue-ui-stackbar-B-2Me3d-.js → vue-ui-stackbar-BVdApDnY.js} +82 -82
- package/dist/{vue-ui-stackline-CdvVPQUM.js → vue-ui-stackline-QzQQ7lTy.js} +636 -636
- package/dist/vue-ui-strip-plot-C-TFNvgz.js +1729 -0
- package/dist/{vue-ui-table-Dr1dK3d_.js → vue-ui-table-Q3brrivC.js} +62 -62
- package/dist/{vue-ui-table-heatmap-D-Qrm3oX.js → vue-ui-table-heatmap-D0pZbBOH.js} +14 -14
- package/dist/vue-ui-table-sparkline-Q6BHPKUn.js +712 -0
- package/dist/{vue-ui-thermometer-BUrtIfuo.js → vue-ui-thermometer-Bg0RR6m4.js} +115 -115
- package/dist/{vue-ui-timer-B5bkNNHS.js → vue-ui-timer-BdzKpoRj.js} +5 -5
- package/dist/{vue-ui-tiremarks-Bn8b-ZSz.js → vue-ui-tiremarks-DWb69ofh.js} +13 -13
- package/dist/{vue-ui-treemap-LMWiicop.js → vue-ui-treemap-uUz07Prw.js} +457 -457
- package/dist/vue-ui-waffle-Pi9e7Ae7.js +1362 -0
- package/dist/{vue-ui-wheel-CeVwXtEX.js → vue-ui-wheel-DTfvWYA7.js} +130 -130
- package/dist/{vue-ui-word-cloud-D81-qJLw.js → vue-ui-word-cloud-DqfljAqH.js} +27 -27
- package/dist/vue-ui-world-BtBrH92Z.js +3016 -0
- package/dist/{vue-ui-xy-C2p9H2IX.js → vue-ui-xy-Bvgy2do1.js} +714 -714
- package/dist/{vue-ui-xy-OhwS0kcZ.js → vue-ui-xy-D5KsuNR2.js} +116 -116
- package/dist/{vue-ui-xy-canvas-DLKDdH35.js → vue-ui-xy-canvas-BfgeE3TW.js} +58 -58
- package/package.json +1 -1
- package/dist/exposedLib-Be0ifkti.js +0 -19
- package/dist/vue-ui-3d-bar-CjNuWXoA.js +0 -1757
- package/dist/vue-ui-age-pyramid-CC7Dxli-.js +0 -1238
- package/dist/vue-ui-bullet-Dde6FhbR.js +0 -710
- package/dist/vue-ui-bump-C5pni1JV.js +0 -1249
- package/dist/vue-ui-candlestick-Ctw65O4_.js +0 -1829
- package/dist/vue-ui-carousel-table-BEUvhUH0.js +0 -455
- package/dist/vue-ui-chestnut-C3IbAdkQ.js +0 -2010
- package/dist/vue-ui-chord-5eCWG4br.js +0 -1391
- package/dist/vue-ui-circle-pack-Cq4lkmee.js +0 -1608
- package/dist/vue-ui-horizontal-bar-CTW6l4n3.js +0 -1683
- package/dist/vue-ui-molecule-aD0SMTiX.js +0 -925
- package/dist/vue-ui-nested-donuts--BCPWkl7.js +0 -1487
- package/dist/vue-ui-onion-s4iMCGAP.js +0 -1200
- package/dist/vue-ui-parallel-coordinate-plot-CfgvpyoC.js +0 -1416
- package/dist/vue-ui-quick-chart-D1OWBgQJ.js +0 -2469
- package/dist/vue-ui-rating-Bek8Tgr-.js +0 -343
- package/dist/vue-ui-ridgeline-DIODGiu8.js +0 -1622
- package/dist/vue-ui-rings-CcdUSXGG.js +0 -1246
- package/dist/vue-ui-scatter-CixnqLoi.js +0 -2413
- package/dist/vue-ui-sparkline-BNxdO-Bx.js +0 -1547
- package/dist/vue-ui-strip-plot-CRXPXA5V.js +0 -1729
- package/dist/vue-ui-table-sparkline-C31Q32My.js +0 -712
- package/dist/vue-ui-waffle-B_L3gkky.js +0 -1362
- package/dist/vue-ui-world-B7npRmTa.js +0 -14264
|
@@ -1,1547 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { A as t, B as n, D as r, E as i, Gt as a, It as o, Lt as s, N as c, Ot as l, P as u, Q as d, R as ee, Rt as f, W as te, _t as ne, b as re, f as ie, i as ae, j as oe, l as se, q as p, rt as ce, t as le, tt as ue, ut as de, wt as fe, z as pe } from "./lib-EAmk-PgA.js";
|
|
3
|
-
import { t as me } from "./useTimeLabels-BmBRv27Y.js";
|
|
4
|
-
import { t as he } from "./useConfig-DYM3f6EI.js";
|
|
5
|
-
import { n as m, t as ge } from "./BaseScanner-DZvpgOjM.js";
|
|
6
|
-
import { t as _e } from "./useNestedProp-D8XqxgOU.js";
|
|
7
|
-
import { t as ve } from "./useThemeCheck-C43Tcqmk.js";
|
|
8
|
-
import { t as ye } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
9
|
-
import { c as be } from "./canvas-lib-BOP_HS11.js";
|
|
10
|
-
import { t as xe } from "./useResponsive-BfnK0KxU.js";
|
|
11
|
-
import { t as Se } from "./A11yDataTable-DdRsVULz.js";
|
|
12
|
-
import { t as Ce } from "./useChartAccessibility-DYqac8yF.js";
|
|
13
|
-
import { t as we } from "./usePrefersMotion-BC-CsqR1.js";
|
|
14
|
-
import { t as Te } from "./vue_ui_sparkline-auZhap6Y.js";
|
|
15
|
-
import { Fragment as h, computed as g, createBlock as Ee, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as De, createVNode as Oe, defineAsyncComponent as ke, guardReactiveProps as Ae, nextTick as b, normalizeProps as je, normalizeStyle as x, onBeforeUnmount as Me, onMounted as Ne, openBlock as S, ref as C, renderList as w, renderSlot as T, shallowRef as Pe, toDisplayString as Fe, toRefs as Ie, unref as E, watch as D, watchEffect as Le, withCtx as Re } from "vue";
|
|
16
|
-
//#region src/atoms/SparklinePulse.vue
|
|
17
|
-
var ze = {
|
|
18
|
-
key: 0,
|
|
19
|
-
style: { "pointer-events": "none" }
|
|
20
|
-
}, Be = [
|
|
21
|
-
"r",
|
|
22
|
-
"fill",
|
|
23
|
-
"filter"
|
|
24
|
-
], Ve = [
|
|
25
|
-
"begin",
|
|
26
|
-
"dur",
|
|
27
|
-
"repeatCount",
|
|
28
|
-
"fill",
|
|
29
|
-
"calcMode",
|
|
30
|
-
"keySplines",
|
|
31
|
-
"keyTimes",
|
|
32
|
-
"keyPoints"
|
|
33
|
-
], He = ["href"], Ue = [
|
|
34
|
-
"dur",
|
|
35
|
-
"repeatCount",
|
|
36
|
-
"fill",
|
|
37
|
-
"values"
|
|
38
|
-
], We = ["r", "fill"], O = [
|
|
39
|
-
"begin",
|
|
40
|
-
"dur",
|
|
41
|
-
"repeatCount",
|
|
42
|
-
"calcMode",
|
|
43
|
-
"keySplines",
|
|
44
|
-
"keyTimes",
|
|
45
|
-
"keyPoints"
|
|
46
|
-
], Ge = ["href"], k = ["dur", "repeatCount"], Ke = {
|
|
47
|
-
__name: "SparklinePulse",
|
|
48
|
-
props: {
|
|
49
|
-
uid: {
|
|
50
|
-
type: String,
|
|
51
|
-
required: !0
|
|
52
|
-
},
|
|
53
|
-
svgRef: {
|
|
54
|
-
type: Object,
|
|
55
|
-
default: null
|
|
56
|
-
},
|
|
57
|
-
pulsePathId: {
|
|
58
|
-
type: String,
|
|
59
|
-
required: !0
|
|
60
|
-
},
|
|
61
|
-
pulsePathLength: {
|
|
62
|
-
type: Number,
|
|
63
|
-
required: !0
|
|
64
|
-
},
|
|
65
|
-
pulseDur: {
|
|
66
|
-
type: String,
|
|
67
|
-
required: !0
|
|
68
|
-
},
|
|
69
|
-
pulseBegin: {
|
|
70
|
-
type: String,
|
|
71
|
-
required: !0
|
|
72
|
-
},
|
|
73
|
-
pulseRepeatCount: {
|
|
74
|
-
type: String,
|
|
75
|
-
required: !0
|
|
76
|
-
},
|
|
77
|
-
pulseFillMode: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: void 0
|
|
80
|
-
},
|
|
81
|
-
pulseKeyPoints: {
|
|
82
|
-
type: String,
|
|
83
|
-
required: !0
|
|
84
|
-
},
|
|
85
|
-
pulseMotion: {
|
|
86
|
-
type: Object,
|
|
87
|
-
required: !0
|
|
88
|
-
},
|
|
89
|
-
pulse: {
|
|
90
|
-
type: Object,
|
|
91
|
-
required: !0
|
|
92
|
-
},
|
|
93
|
-
pulseTrail: {
|
|
94
|
-
type: Object,
|
|
95
|
-
required: !0
|
|
96
|
-
},
|
|
97
|
-
pulseTrailLength: {
|
|
98
|
-
type: Number,
|
|
99
|
-
required: !0
|
|
100
|
-
},
|
|
101
|
-
prefersReducedMotion: {
|
|
102
|
-
type: Boolean,
|
|
103
|
-
required: !0
|
|
104
|
-
},
|
|
105
|
-
loading: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
required: !0
|
|
108
|
-
},
|
|
109
|
-
isBar: {
|
|
110
|
-
type: Boolean,
|
|
111
|
-
required: !0
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
setup(e) {
|
|
115
|
-
let t = e, n = g(() => Math.min(t.pulseTrailLength, 45)), r = g(() => !!t.pulse?.show && !t.isBar && !t.prefersReducedMotion && !t.loading && Number(t.pulsePathLength) > 0);
|
|
116
|
-
function i() {
|
|
117
|
-
let e = t.svgRef?.value;
|
|
118
|
-
e && (typeof e.pauseAnimations == "function" && e.pauseAnimations(), typeof e.setCurrentTime == "function" && e.setCurrentTime(0), typeof e.unpauseAnimations == "function" && e.unpauseAnimations());
|
|
119
|
-
}
|
|
120
|
-
function a(e, t) {
|
|
121
|
-
if (typeof e != "string") return e;
|
|
122
|
-
let n = e.trim().match(/^([\d.]+)\s*(ms|s)$/);
|
|
123
|
-
if (!n) return e;
|
|
124
|
-
let r = Number(n[1]), i = n[2];
|
|
125
|
-
return Number.isNaN(r) ? e : `${r + t}${i}`;
|
|
126
|
-
}
|
|
127
|
-
function o(e) {
|
|
128
|
-
return (n.value - e) / n.value * t.pulse.radius;
|
|
129
|
-
}
|
|
130
|
-
function s(e) {
|
|
131
|
-
let r = t.pulse.trail.opacity, i = (n.value - e) / n.value, a = e === 0 ? 1 : i * r;
|
|
132
|
-
return `0;${a};${a};0`;
|
|
133
|
-
}
|
|
134
|
-
return D(() => t.loading, async (e) => {
|
|
135
|
-
if (e) {
|
|
136
|
-
i();
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
await b(), i();
|
|
140
|
-
}), D(() => t.pulsePathId, async () => {
|
|
141
|
-
await b(), i();
|
|
142
|
-
}), Me(() => {
|
|
143
|
-
i();
|
|
144
|
-
}), (t, i) => r.value ? (S(), v("g", ze, [(S(!0), v(h, null, w(n.value, (t, n) => (S(), v(h, null, [n % 3 == 0 ? (S(), v("circle", {
|
|
145
|
-
key: `sparkline_dot_${n}_${e.pulsePathId}`,
|
|
146
|
-
r: o(n),
|
|
147
|
-
fill: e.pulse.color,
|
|
148
|
-
filter: `url(#sparkline_pulse_glow_${e.uid})`,
|
|
149
|
-
opacity: "0"
|
|
150
|
-
}, [y("animateMotion", {
|
|
151
|
-
begin: a(e.pulseBegin, n * 10),
|
|
152
|
-
dur: e.pulseDur,
|
|
153
|
-
repeatCount: e.pulseRepeatCount,
|
|
154
|
-
fill: e.pulseFillMode,
|
|
155
|
-
calcMode: e.pulseMotion.calcMode,
|
|
156
|
-
keySplines: e.pulseMotion.keySplines || void 0,
|
|
157
|
-
keyTimes: e.pulseMotion.keyTimes || void 0,
|
|
158
|
-
keyPoints: e.pulseKeyPoints,
|
|
159
|
-
rotate: "auto"
|
|
160
|
-
}, [y("mpath", { href: `#${e.pulsePathId}` }, null, 8, He)], 8, Ve), y("animate", {
|
|
161
|
-
attributeName: "opacity",
|
|
162
|
-
dur: e.pulseDur,
|
|
163
|
-
repeatCount: e.pulseRepeatCount,
|
|
164
|
-
fill: e.pulseFillMode,
|
|
165
|
-
values: s(n),
|
|
166
|
-
keyTimes: "0;0.1;0.9;1"
|
|
167
|
-
}, null, 8, Ue)], 8, Be)) : _("", !0)], 64))), 256)), (S(), v("circle", {
|
|
168
|
-
key: `sparkline_halo_${e.pulsePathId}`,
|
|
169
|
-
r: Math.max(e.pulse.radius * 1.3),
|
|
170
|
-
fill: e.pulse.color,
|
|
171
|
-
opacity: "0"
|
|
172
|
-
}, [y("animateMotion", {
|
|
173
|
-
begin: e.pulseBegin,
|
|
174
|
-
dur: e.pulseDur,
|
|
175
|
-
repeatCount: e.pulseRepeatCount,
|
|
176
|
-
calcMode: e.pulseMotion.calcMode,
|
|
177
|
-
keySplines: e.pulseMotion.keySplines || void 0,
|
|
178
|
-
keyTimes: e.pulseMotion.keyTimes || void 0,
|
|
179
|
-
keyPoints: e.pulseKeyPoints,
|
|
180
|
-
rotate: "auto"
|
|
181
|
-
}, [y("mpath", { href: `#${e.pulsePathId}` }, null, 8, Ge)], 8, O), y("animate", {
|
|
182
|
-
attributeName: "opacity",
|
|
183
|
-
values: "0;0.35;0.35;0",
|
|
184
|
-
keyTimes: "0;0.15;0.85;1",
|
|
185
|
-
dur: e.pulseDur,
|
|
186
|
-
repeatCount: e.pulseRepeatCount
|
|
187
|
-
}, null, 8, k)], 8, We))])) : _("", !0);
|
|
188
|
-
}
|
|
189
|
-
}, A = {
|
|
190
|
-
canvas: null,
|
|
191
|
-
ctx: null
|
|
192
|
-
};
|
|
193
|
-
function qe() {
|
|
194
|
-
if (typeof document > "u") throw Error("color-utils: document is not available (browser-only).");
|
|
195
|
-
if (!A.canvas) {
|
|
196
|
-
let e = document.createElement("canvas");
|
|
197
|
-
e.width = 1, e.height = 1;
|
|
198
|
-
let t = e.getContext("2d", { willReadFrequently: !0 });
|
|
199
|
-
if (!t) throw Error("color-utils: unable to get 2D canvas context.");
|
|
200
|
-
A.canvas = e, A.ctx = t;
|
|
201
|
-
}
|
|
202
|
-
return A.ctx;
|
|
203
|
-
}
|
|
204
|
-
function Je(e) {
|
|
205
|
-
return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
|
|
206
|
-
}
|
|
207
|
-
function j(e) {
|
|
208
|
-
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
209
|
-
}
|
|
210
|
-
function M(e, t = null) {
|
|
211
|
-
if (typeof e != "string" || e.trim().length === 0) throw Error("colorToRgba: inputColor must be a non-empty string.");
|
|
212
|
-
let n = e.trim();
|
|
213
|
-
if (n.toLowerCase() === "transparent") return {
|
|
214
|
-
red: 0,
|
|
215
|
-
green: 0,
|
|
216
|
-
blue: 0,
|
|
217
|
-
alpha: 0
|
|
218
|
-
};
|
|
219
|
-
let r = Ye(n, t), i = qe();
|
|
220
|
-
i.clearRect(0, 0, 1, 1), i.fillStyle = "#000";
|
|
221
|
-
let a = i.fillStyle;
|
|
222
|
-
if (i.fillStyle = r, i.fillStyle === a && !Xe(r)) throw Error(`colorToRgba: unsupported or invalid color "${e}".`);
|
|
223
|
-
i.fillRect(0, 0, 1, 1);
|
|
224
|
-
let o = i.getImageData(0, 0, 1, 1).data;
|
|
225
|
-
return {
|
|
226
|
-
red: o[0],
|
|
227
|
-
green: o[1],
|
|
228
|
-
blue: o[2],
|
|
229
|
-
alpha: o[3] / 255
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
function N(e, t = null) {
|
|
233
|
-
if (!Array.isArray(e) || e.length === 0) throw Error("colorsToRgba: colors must be a non-empty array.");
|
|
234
|
-
let n = Array(e.length);
|
|
235
|
-
for (let r = 0; r < e.length; r += 1) n[r] = M(e[r], t);
|
|
236
|
-
return n;
|
|
237
|
-
}
|
|
238
|
-
function Ye(e, t = null) {
|
|
239
|
-
return e !== "currentColor" || typeof window > "u" || !t ? e : window.getComputedStyle(t).color || e;
|
|
240
|
-
}
|
|
241
|
-
function Xe(e) {
|
|
242
|
-
let t = e.trim().toLowerCase();
|
|
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
|
-
}
|
|
245
|
-
function P(e) {
|
|
246
|
-
let t = j(e / 255);
|
|
247
|
-
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
248
|
-
}
|
|
249
|
-
function F(e) {
|
|
250
|
-
let t = j(e), n;
|
|
251
|
-
return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, Je(n * 255);
|
|
252
|
-
}
|
|
253
|
-
function Ze(e, t, n, r) {
|
|
254
|
-
let i = j(n);
|
|
255
|
-
if (r === "linearRGB") {
|
|
256
|
-
let n = P(e.red), r = P(e.green), a = P(e.blue), o = P(t.red), s = P(t.green), c = P(t.blue), l = n + (o - n) * i, u = r + (s - r) * i, d = a + (c - a) * i;
|
|
257
|
-
return {
|
|
258
|
-
red: F(l),
|
|
259
|
-
green: F(u),
|
|
260
|
-
blue: F(d),
|
|
261
|
-
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
return {
|
|
265
|
-
red: e.red + (t.red - e.red) * i,
|
|
266
|
-
green: e.green + (t.green - e.green) * i,
|
|
267
|
-
blue: e.blue + (t.blue - e.blue) * i,
|
|
268
|
-
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
//#endregion
|
|
272
|
-
//#region src/SPG/number-utils.js
|
|
273
|
-
function I(e, t, n) {
|
|
274
|
-
let r = e;
|
|
275
|
-
return r < t && (r = t), r > n && (r = n), r;
|
|
276
|
-
}
|
|
277
|
-
function L(e, t) {
|
|
278
|
-
let n = 10 ** t;
|
|
279
|
-
return Math.round(e * n) / n;
|
|
280
|
-
}
|
|
281
|
-
function R(e) {
|
|
282
|
-
return Number.isFinite(e) ? e.toString() : "0";
|
|
283
|
-
}
|
|
284
|
-
function Qe(e) {
|
|
285
|
-
let t = I(e, 0, 255).toString(16);
|
|
286
|
-
return t.length === 1 ? "0" + t : t;
|
|
287
|
-
}
|
|
288
|
-
function $e(e) {
|
|
289
|
-
if (typeof e != "string") return;
|
|
290
|
-
let t = Number.parseFloat(e);
|
|
291
|
-
return Number.isFinite(t) ? t : void 0;
|
|
292
|
-
}
|
|
293
|
-
function et(e, t, n, r = !0) {
|
|
294
|
-
let i = n - t;
|
|
295
|
-
if (i === 0) return 0;
|
|
296
|
-
let a = (e - t) / i;
|
|
297
|
-
return r ? I(a, 0, 1) : a;
|
|
298
|
-
}
|
|
299
|
-
//#endregion
|
|
300
|
-
//#region src/SPG/index.js
|
|
301
|
-
var tt = "http://www.w3.org/2000/svg";
|
|
302
|
-
function nt(e) {
|
|
303
|
-
if (typeof document > "u") throw Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
|
|
304
|
-
let t = document.createElementNS(tt, "svg");
|
|
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(tt, "path");
|
|
307
|
-
return e === "M " && (e = "M 0,0"), n.setAttribute("d", e), t.appendChild(n), document.body.appendChild(t), {
|
|
308
|
-
svgElement: t,
|
|
309
|
-
pathElement: n
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
function rt(e) {
|
|
313
|
-
if (e) try {
|
|
314
|
-
e.svgElement?.remove?.();
|
|
315
|
-
} catch {}
|
|
316
|
-
}
|
|
317
|
-
function it(e, t, n) {
|
|
318
|
-
if (typeof n == "number" && n > 0) return n;
|
|
319
|
-
let r = t * .75;
|
|
320
|
-
r < .5 && (r = .5), r > 8 && (r = 8);
|
|
321
|
-
let i = e / 2;
|
|
322
|
-
return r > i && i > 0 && (r = i), r <= 0 && (r = 1), r;
|
|
323
|
-
}
|
|
324
|
-
function at(e, t, n) {
|
|
325
|
-
if (typeof t == "number" && t >= 1) return Math.floor(t);
|
|
326
|
-
let r = Math.ceil(e / (typeof n == "number" && n > 0 ? n : 2));
|
|
327
|
-
return r < 1 ? 1 : r;
|
|
328
|
-
}
|
|
329
|
-
function ot(e, t, n, r, i, a) {
|
|
330
|
-
let o = n - t, s = Math.ceil(o / r) + 1;
|
|
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(L(l.x, i))} ${R(L(l.y, i))}`;
|
|
333
|
-
for (let n = 1; n < s; n += 1) {
|
|
334
|
-
let r = t + n * c, a = e.getPointAtLength(r);
|
|
335
|
-
u += ` L ${R(L(a.x, i))} ${R(L(a.y, i))}`;
|
|
336
|
-
}
|
|
337
|
-
return u;
|
|
338
|
-
}
|
|
339
|
-
function st(e, t, n, r, i, a) {
|
|
340
|
-
let o = n - t, s = Math.ceil(o / r) + 1;
|
|
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, ee = l.y, f = l.y, te = `M ${R(L(l.x, i))} ${R(L(l.y, i))}`;
|
|
343
|
-
for (let n = 1; n < s; n += 1) {
|
|
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 < ee && (ee = a.y), a.y > f && (f = a.y), te += ` L ${R(L(a.x, i))} ${R(L(a.y, i))}`;
|
|
346
|
-
}
|
|
347
|
-
return {
|
|
348
|
-
pathData: te,
|
|
349
|
-
bounds: {
|
|
350
|
-
minX: u,
|
|
351
|
-
maxX: d,
|
|
352
|
-
minY: ee,
|
|
353
|
-
maxY: f
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
function ct(e) {
|
|
358
|
-
if (e.length === 1) return [{
|
|
359
|
-
position: 0,
|
|
360
|
-
rgba: e[0]
|
|
361
|
-
}];
|
|
362
|
-
let t = Array(e.length), n = e.length - 1;
|
|
363
|
-
for (let r = 0; r < e.length; r += 1) t[r] = {
|
|
364
|
-
position: r / n,
|
|
365
|
-
rgba: e[r]
|
|
366
|
-
};
|
|
367
|
-
return t;
|
|
368
|
-
}
|
|
369
|
-
function z(e, t, n, r) {
|
|
370
|
-
let i = I(t, 0, 1), a = r;
|
|
371
|
-
for (a < 0 && (a = 0), a > e.length - 2 && (a = e.length - 2); a > 0 && i < e[a].position;) --a;
|
|
372
|
-
for (; a < e.length - 2 && i > e[a + 1].position;) a += 1;
|
|
373
|
-
let o = e[a], s = e[a + 1], c = s.position - o.position, l = c > 0 ? (i - o.position) / c : 0;
|
|
374
|
-
return U(B(o.rgba, s.rgba, l, n));
|
|
375
|
-
}
|
|
376
|
-
function B(e, t, n, r) {
|
|
377
|
-
let i = I(n, 0, 1);
|
|
378
|
-
if (r === "linearRGB") {
|
|
379
|
-
let n = V(e.red), r = V(e.green), a = V(e.blue), o = V(t.red), s = V(t.green), c = V(t.blue), l = n + (o - n) * i, u = r + (s - r) * i, d = a + (c - a) * i;
|
|
380
|
-
return {
|
|
381
|
-
red: H(l),
|
|
382
|
-
green: H(u),
|
|
383
|
-
blue: H(d),
|
|
384
|
-
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
return {
|
|
388
|
-
red: e.red + (t.red - e.red) * i,
|
|
389
|
-
green: e.green + (t.green - e.green) * i,
|
|
390
|
-
blue: e.blue + (t.blue - e.blue) * i,
|
|
391
|
-
alpha: e.alpha + (t.alpha - e.alpha) * i
|
|
392
|
-
};
|
|
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
|
-
function H(e) {
|
|
399
|
-
let t = I(e, 0, 1), n;
|
|
400
|
-
return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, I(Math.round(n * 255), 0, 255);
|
|
401
|
-
}
|
|
402
|
-
function U(e) {
|
|
403
|
-
let t = I(e.alpha, 0, 1), n = I(Math.round(e.red), 0, 255), r = I(Math.round(e.green), 0, 255), i = I(Math.round(e.blue), 0, 255);
|
|
404
|
-
return t >= 1 ? `#${Qe(n)}${Qe(r)}${Qe(i)}` : `rgba(${n}, ${r}, ${i}, ${L(t, 4).toString()})`;
|
|
405
|
-
}
|
|
406
|
-
function lt(e) {
|
|
407
|
-
let t = `fill="${W(e.fill ?? "none")}"`, n = Object.keys(e);
|
|
408
|
-
for (let r = 0; r < n.length; r += 1) {
|
|
409
|
-
let i = n[r];
|
|
410
|
-
if (i === "stroke" || i === "d") continue;
|
|
411
|
-
let a = e[i];
|
|
412
|
-
t += ` ${i}="${W(a)}"`;
|
|
413
|
-
}
|
|
414
|
-
return t;
|
|
415
|
-
}
|
|
416
|
-
function ut(e, t, n) {
|
|
417
|
-
return `<path d="${W(e)}" stroke="${W(t)}" ${n} />`;
|
|
418
|
-
}
|
|
419
|
-
function dt(e) {
|
|
420
|
-
let t = [], n = e.segmentAttributeMap.fill ?? "none";
|
|
421
|
-
t.push(`fill="${W(n)}"`), t.push(`stroke="${W(e.stroke)}"`);
|
|
422
|
-
for (let n of Object.keys(e.segmentAttributeMap)) {
|
|
423
|
-
if (n === "stroke" || n === "d") continue;
|
|
424
|
-
let r = e.segmentAttributeMap[n];
|
|
425
|
-
t.push(`${n}="${W(r)}"`);
|
|
426
|
-
}
|
|
427
|
-
return `<path d="${W(e.pathData)}" ${t.join(" ")} />`;
|
|
428
|
-
}
|
|
429
|
-
function ft(e, t) {
|
|
430
|
-
let n = [];
|
|
431
|
-
for (let e of Object.keys(t)) n.push(`${e}="${W(t[e])}"`);
|
|
432
|
-
return `<g data-svg-path-gradient="true"${n.length ? " " + n.join(" ") : ""}>${e.join("")}</g>`;
|
|
433
|
-
}
|
|
434
|
-
function W(e) {
|
|
435
|
-
return String(e).replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
436
|
-
}
|
|
437
|
-
function pt(e, t = null, n = {}) {
|
|
438
|
-
return new Promise((r, i) => {
|
|
439
|
-
let a = null;
|
|
440
|
-
try {
|
|
441
|
-
if (!e || typeof e != "string") throw Error("SvgPathGradientAsync: pathData must be a non-empty string.");
|
|
442
|
-
let i = n.temperatureMode ?? null;
|
|
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
|
-
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 = $e(c["stroke-width"]), d = typeof n.strokeWidth == "number" && n.strokeWidth > 0 ? n.strokeWidth : typeof u == "number" && u > 0 ? u : 1;
|
|
446
|
-
a = nt(e);
|
|
447
|
-
let ee = a.pathElement, f = ee.getTotalLength(), te = i === null ? N(t, n.colorReferenceElement) : [];
|
|
448
|
-
if (i === null && (!(f > 0) || te.length === 1)) {
|
|
449
|
-
let t = ft([dt({
|
|
450
|
-
pathData: e,
|
|
451
|
-
stroke: U(te[0]),
|
|
452
|
-
segmentAttributeMap: c
|
|
453
|
-
})], l);
|
|
454
|
-
rt(a), r(t);
|
|
455
|
-
return;
|
|
456
|
-
}
|
|
457
|
-
let ne = n.colorSpace ?? "linearRGB";
|
|
458
|
-
if (i !== null) {
|
|
459
|
-
let e = n.temperatureColors;
|
|
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
|
-
}
|
|
462
|
-
let re = i === null ? null : N(n.temperatureColors, n.colorReferenceElement), ie = i === null ? (() => {
|
|
463
|
-
let e = ct(te), t = Array(e.length);
|
|
464
|
-
for (let n = 0; n < e.length; n += 1) t[n] = {
|
|
465
|
-
position: e[n].position,
|
|
466
|
-
rgba: e[n].rgba
|
|
467
|
-
};
|
|
468
|
-
return t;
|
|
469
|
-
})() : [], ae = it(f, d, n.maxSegmentLength), oe = at(f, n.segments, ae), se = f / oe, p = typeof n.overlap == "number" && n.overlap >= 0 ? n.overlap : d * .5, ce = se * .45;
|
|
470
|
-
p > ce && (p = ce);
|
|
471
|
-
let le = typeof n.samplePointLimitPerSegment == "number" && n.samplePointLimitPerSegment > 10 ? n.samplePointLimitPerSegment : 250, ue = lt(c), de = [], fe = i === null ? null : [], pe = i === null ? null : [], me = 0, he = i === null ? ie.length - 2 : 0, m = 0, ge = () => {
|
|
472
|
-
let e = performance.now(), t = typeof n.frameBudgetMs == "number" ? n.frameBudgetMs : 8;
|
|
473
|
-
for (; m < oe && performance.now() - e < t;) {
|
|
474
|
-
let e = m * se, t = (m + 1) * se, n = e, r = t;
|
|
475
|
-
if (m !== 0 && (n = e - p), m !== oe - 1 && (r = t + p), n = I(n, 0, f), r = I(r, 0, f), r > n) if (i !== null) {
|
|
476
|
-
let e = st(ee, n, r, s, o, le);
|
|
477
|
-
fe.push(e.pathData), pe.push(e.bounds);
|
|
478
|
-
} else {
|
|
479
|
-
let e = (n + r) * .5 / f;
|
|
480
|
-
for (; me < he && e > ie[me + 1].position;) me += 1;
|
|
481
|
-
let t = z(ie, e, ne, me), i = ot(ee, n, r, s, o, le);
|
|
482
|
-
de.push(ut(i, t, ue));
|
|
483
|
-
}
|
|
484
|
-
m += 1;
|
|
485
|
-
}
|
|
486
|
-
if (m < oe) {
|
|
487
|
-
requestAnimationFrame(ge);
|
|
488
|
-
return;
|
|
489
|
-
}
|
|
490
|
-
if (i !== null) {
|
|
491
|
-
let e = Infinity, t = -Infinity;
|
|
492
|
-
for (let n = 0; n < pe.length; n += 1) {
|
|
493
|
-
let r = pe[n], a = i === "vertical" ? r.minY : r.minX, o = i === "vertical" ? r.maxY : r.maxX;
|
|
494
|
-
a < e && (e = a), o > t && (t = o);
|
|
495
|
-
}
|
|
496
|
-
let n = re[0], r = re[1];
|
|
497
|
-
de.length = 0;
|
|
498
|
-
for (let a = 0; a < pe.length; a += 1) {
|
|
499
|
-
let o = pe[a], s = et(((i === "vertical" ? o.minY : o.minX) + (i === "vertical" ? o.maxY : o.maxX)) * .5, e, t, !0), c = U(i === "vertical" ? Ze(n, r, s, ne) : Ze(r, n, s, ne)), l = fe[a];
|
|
500
|
-
de.push(ut(l, c, ue));
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
let c = ft(de, l);
|
|
504
|
-
rt(a), r(c);
|
|
505
|
-
};
|
|
506
|
-
requestAnimationFrame(ge);
|
|
507
|
-
} catch (e) {
|
|
508
|
-
rt(a), i(e);
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
//#endregion
|
|
513
|
-
//#region src/atoms/SparklineGradientPath.vue
|
|
514
|
-
var mt = ["innerHTML"], ht = {
|
|
515
|
-
__name: "SparklineGradientPath",
|
|
516
|
-
props: {
|
|
517
|
-
svgPathData: {
|
|
518
|
-
type: String,
|
|
519
|
-
required: !0
|
|
520
|
-
},
|
|
521
|
-
enabled: {
|
|
522
|
-
type: Boolean,
|
|
523
|
-
required: !0
|
|
524
|
-
},
|
|
525
|
-
strokeWidth: {
|
|
526
|
-
type: Number,
|
|
527
|
-
required: !0
|
|
528
|
-
},
|
|
529
|
-
highColor: {
|
|
530
|
-
type: String,
|
|
531
|
-
required: !0
|
|
532
|
-
},
|
|
533
|
-
lowColor: {
|
|
534
|
-
type: String,
|
|
535
|
-
required: !0
|
|
536
|
-
},
|
|
537
|
-
segments: {
|
|
538
|
-
type: Number,
|
|
539
|
-
required: !0
|
|
540
|
-
}
|
|
541
|
-
},
|
|
542
|
-
setup(e) {
|
|
543
|
-
let t = e, n = C(""), r = 0;
|
|
544
|
-
return D(() => [
|
|
545
|
-
t.enabled,
|
|
546
|
-
t.svgPathData,
|
|
547
|
-
t.strokeWidth,
|
|
548
|
-
t.highColor,
|
|
549
|
-
t.lowColor,
|
|
550
|
-
t.segments
|
|
551
|
-
], async ([e]) => {
|
|
552
|
-
let i = ++r;
|
|
553
|
-
if (!e) {
|
|
554
|
-
n.value = "";
|
|
555
|
-
return;
|
|
556
|
-
}
|
|
557
|
-
let a = await pt(t.svgPathData, null, {
|
|
558
|
-
segments: t.segments,
|
|
559
|
-
temperatureMode: "vertical",
|
|
560
|
-
temperatureColors: [t.highColor, t.lowColor],
|
|
561
|
-
attrs: {
|
|
562
|
-
"stroke-width": t.strokeWidth,
|
|
563
|
-
"stroke-linecap": "round",
|
|
564
|
-
"stroke-linejoin": "round"
|
|
565
|
-
},
|
|
566
|
-
groupAttrs: { class: "vue-ui-sparkline-gradient" }
|
|
567
|
-
});
|
|
568
|
-
i === r && (n.value = a);
|
|
569
|
-
}, { immediate: !0 }), (e, t) => (S(), v("g", { innerHTML: n.value }, null, 8, mt));
|
|
570
|
-
}
|
|
571
|
-
}, gt = /* @__PURE__ */ e({ default: () => G }), _t = ["id"], vt = ["id"], yt = { style: { position: "relative" } }, bt = [
|
|
572
|
-
"xmlns",
|
|
573
|
-
"viewBox",
|
|
574
|
-
"aria-describedby"
|
|
575
|
-
], xt = ["width", "height"], St = ["id"], Ct = ["stop-color"], wt = ["stop-color"], Tt = ["id"], Et = ["stop-color"], Dt = ["stop-color"], Ot = ["id"], kt = ["stop-color"], At = ["stop-color"], jt = ["id"], Mt = [
|
|
576
|
-
"id",
|
|
577
|
-
"y1",
|
|
578
|
-
"y2"
|
|
579
|
-
], Nt = ["stop-color", "offset"], Pt = { key: 1 }, Ft = [
|
|
580
|
-
"data-cy",
|
|
581
|
-
"d",
|
|
582
|
-
"fill"
|
|
583
|
-
], It = [
|
|
584
|
-
"id",
|
|
585
|
-
"d",
|
|
586
|
-
"stroke-width"
|
|
587
|
-
], Lt = [
|
|
588
|
-
"d",
|
|
589
|
-
"stroke",
|
|
590
|
-
"stroke-width",
|
|
591
|
-
"stroke-dasharray"
|
|
592
|
-
], Rt = [
|
|
593
|
-
"d",
|
|
594
|
-
"stroke",
|
|
595
|
-
"stroke-width"
|
|
596
|
-
], zt = [
|
|
597
|
-
"id",
|
|
598
|
-
"d",
|
|
599
|
-
"stroke-width"
|
|
600
|
-
], Bt = [
|
|
601
|
-
"d",
|
|
602
|
-
"stroke",
|
|
603
|
-
"stroke-width",
|
|
604
|
-
"stroke-dasharray"
|
|
605
|
-
], Vt = [
|
|
606
|
-
"d",
|
|
607
|
-
"stroke",
|
|
608
|
-
"stroke-width"
|
|
609
|
-
], Ht = [
|
|
610
|
-
"x",
|
|
611
|
-
"y",
|
|
612
|
-
"width",
|
|
613
|
-
"height",
|
|
614
|
-
"fill",
|
|
615
|
-
"rx"
|
|
616
|
-
], Ut = [
|
|
617
|
-
"x1",
|
|
618
|
-
"x2",
|
|
619
|
-
"y1",
|
|
620
|
-
"y2",
|
|
621
|
-
"stroke",
|
|
622
|
-
"stroke-width",
|
|
623
|
-
"stroke-dasharray"
|
|
624
|
-
], Wt = [
|
|
625
|
-
"x1",
|
|
626
|
-
"x2",
|
|
627
|
-
"y1",
|
|
628
|
-
"y2",
|
|
629
|
-
"stroke",
|
|
630
|
-
"stroke-dasharray",
|
|
631
|
-
"stroke-width"
|
|
632
|
-
], Gt = [
|
|
633
|
-
"cx",
|
|
634
|
-
"cy",
|
|
635
|
-
"r",
|
|
636
|
-
"fill",
|
|
637
|
-
"stroke",
|
|
638
|
-
"stroke-width"
|
|
639
|
-
], Kt = [
|
|
640
|
-
"x",
|
|
641
|
-
"y",
|
|
642
|
-
"font-size",
|
|
643
|
-
"font-weight",
|
|
644
|
-
"fill"
|
|
645
|
-
], qt = [
|
|
646
|
-
"x",
|
|
647
|
-
"y",
|
|
648
|
-
"height",
|
|
649
|
-
"width",
|
|
650
|
-
"onMouseenter",
|
|
651
|
-
"onMouseleave",
|
|
652
|
-
"onClick"
|
|
653
|
-
], Jt = {
|
|
654
|
-
key: 0,
|
|
655
|
-
style: {
|
|
656
|
-
position: "absolute",
|
|
657
|
-
top: "100%",
|
|
658
|
-
left: "0",
|
|
659
|
-
width: "100%"
|
|
660
|
-
},
|
|
661
|
-
"data-dom-to-png-ignore": "",
|
|
662
|
-
"aria-hidden": "true"
|
|
663
|
-
}, G = /*#__PURE__*/ ye({
|
|
664
|
-
__name: "vue-ui-sparkline",
|
|
665
|
-
props: {
|
|
666
|
-
config: {
|
|
667
|
-
type: Object,
|
|
668
|
-
default() {
|
|
669
|
-
return {};
|
|
670
|
-
}
|
|
671
|
-
},
|
|
672
|
-
dataset: {
|
|
673
|
-
type: Array,
|
|
674
|
-
default() {
|
|
675
|
-
return [];
|
|
676
|
-
}
|
|
677
|
-
},
|
|
678
|
-
showInfo: {
|
|
679
|
-
type: Boolean,
|
|
680
|
-
default: !0
|
|
681
|
-
},
|
|
682
|
-
selectedIndex: {
|
|
683
|
-
type: Number,
|
|
684
|
-
default: void 0
|
|
685
|
-
},
|
|
686
|
-
heightRatio: {
|
|
687
|
-
type: Number,
|
|
688
|
-
default: 1
|
|
689
|
-
},
|
|
690
|
-
forcedPadding: {
|
|
691
|
-
type: Number,
|
|
692
|
-
default: 30
|
|
693
|
-
}
|
|
694
|
-
},
|
|
695
|
-
emits: ["hoverIndex", "selectDatapoint"],
|
|
696
|
-
setup(e, { emit: ye }) {
|
|
697
|
-
let ze = ke(() => import("./PackageVersion-Dse0n05o.js").then((e) => e.t)), Be = ke(() => import("./SparkTooltip-B-qsPj68.js")), { vue_ui_sparkline: Ve } = he(), { isThemeValid: He, warnInvalidTheme: Ue } = ve(), We = we(), O = e, Ge = g(() => Array.isArray(O.dataset) && O.dataset.length > 0), k = C(te()), A = C(null), qe = C(null), Je = C(null), j = C(null), M = C(null), N = C(L());
|
|
698
|
-
function Ye(e) {
|
|
699
|
-
return O.config?.skeletonDataset && Array.isArray(O.config.skeletonDataset) ? O.config.skeletonDataset.map((e) => ({
|
|
700
|
-
period: "-",
|
|
701
|
-
value: e
|
|
702
|
-
})) : ue(e).map((e) => ({
|
|
703
|
-
period: "-",
|
|
704
|
-
value: e
|
|
705
|
-
}));
|
|
706
|
-
}
|
|
707
|
-
let Xe = g(() => a({
|
|
708
|
-
defaultConfig: {
|
|
709
|
-
gradientPath: { show: !1 },
|
|
710
|
-
temperatureColors: { show: !1 },
|
|
711
|
-
style: {
|
|
712
|
-
backgroundColor: "#99999930",
|
|
713
|
-
scaleMin: 0,
|
|
714
|
-
scaleMax: null,
|
|
715
|
-
animation: { show: !1 },
|
|
716
|
-
line: {
|
|
717
|
-
color: "#AAAAAA",
|
|
718
|
-
pulse: { show: !1 },
|
|
719
|
-
dashIndices: []
|
|
720
|
-
},
|
|
721
|
-
bar: { color: "#AAAAAA" },
|
|
722
|
-
area: { color: "#CACACA" },
|
|
723
|
-
zeroLine: { color: "#6A6A6A" },
|
|
724
|
-
dataLabel: { show: !1 },
|
|
725
|
-
tooltip: { show: !1 }
|
|
726
|
-
}
|
|
727
|
-
},
|
|
728
|
-
userConfig: N.value.skeletonConfig ?? {}
|
|
729
|
-
})), { loading: P, FINAL_DATASET: F, manualLoading: Ze } = m({
|
|
730
|
-
...Ie(O),
|
|
731
|
-
FINAL_CONFIG: N,
|
|
732
|
-
prepareConfig: L,
|
|
733
|
-
callback: () => {
|
|
734
|
-
Promise.resolve().then(async () => {
|
|
735
|
-
await b(), mt();
|
|
736
|
-
});
|
|
737
|
-
},
|
|
738
|
-
skeletonDataset: Ye(12),
|
|
739
|
-
skeletonConfig: a({
|
|
740
|
-
defaultConfig: N.value,
|
|
741
|
-
userConfig: Xe.value
|
|
742
|
-
})
|
|
743
|
-
}), { svgRef: I } = Ce({ config: N.value.style.title });
|
|
744
|
-
function L() {
|
|
745
|
-
let e = _e({
|
|
746
|
-
userConfig: O.config,
|
|
747
|
-
defaultConfig: Ve
|
|
748
|
-
}), t = {}, n = e.theme;
|
|
749
|
-
if (n) if (!He.value(e)) Ue(e), t = e;
|
|
750
|
-
else {
|
|
751
|
-
let r = _e({
|
|
752
|
-
userConfig: Te[n] || O.config,
|
|
753
|
-
defaultConfig: e
|
|
754
|
-
});
|
|
755
|
-
t = { ..._e({
|
|
756
|
-
userConfig: O.config,
|
|
757
|
-
defaultConfig: r
|
|
758
|
-
}) };
|
|
759
|
-
}
|
|
760
|
-
else t = e;
|
|
761
|
-
return t;
|
|
762
|
-
}
|
|
763
|
-
let R = g(() => N.value?.style?.line.pulse || {}), Qe = g(() => `${Math.max(200, Number(R.value.durationMs) || 4e3) / 1e3}s`), $e = C(0), et = g(() => R.value?.begin || "0ms"), tt = C("0;1"), nt = g(() => R.value?.loop === !1 ? "1" : "indefinite"), rt = g(() => R.value?.loop === !1 ? "freeze" : void 0), it = g(() => R.value.trail.show && ct.value.lengthPx || 1), at = g(() => !!R.value?.show && !Q.value && !We.value && !P.value && (J.value?.length || 0) > 1);
|
|
764
|
-
function ot() {
|
|
765
|
-
if (!at.value) {
|
|
766
|
-
$e.value = 0;
|
|
767
|
-
return;
|
|
768
|
-
}
|
|
769
|
-
let e = I.value;
|
|
770
|
-
if (!e) return;
|
|
771
|
-
let t = `#${G.value}`, n = e.querySelector?.(t);
|
|
772
|
-
if (n && typeof n.getTotalLength == "function") {
|
|
773
|
-
let e = n.getTotalLength();
|
|
774
|
-
Number.isFinite(e) && e > 0 && ($e.value = e);
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
requestAnimationFrame(() => {
|
|
778
|
-
let n = e.querySelector?.(t);
|
|
779
|
-
if (n && typeof n.getTotalLength == "function") {
|
|
780
|
-
let e = n.getTotalLength();
|
|
781
|
-
Number.isFinite(e) && e > 0 && ($e.value = e);
|
|
782
|
-
}
|
|
783
|
-
});
|
|
784
|
-
}
|
|
785
|
-
let st = g(() => {
|
|
786
|
-
let e = R.value?.easing || "ease-in-out", t = {
|
|
787
|
-
ease: [
|
|
788
|
-
.25,
|
|
789
|
-
.1,
|
|
790
|
-
.25,
|
|
791
|
-
1
|
|
792
|
-
],
|
|
793
|
-
"ease-in": [
|
|
794
|
-
.42,
|
|
795
|
-
0,
|
|
796
|
-
1,
|
|
797
|
-
1
|
|
798
|
-
],
|
|
799
|
-
"ease-out": [
|
|
800
|
-
0,
|
|
801
|
-
0,
|
|
802
|
-
.58,
|
|
803
|
-
1
|
|
804
|
-
],
|
|
805
|
-
"ease-in-out": [
|
|
806
|
-
.42,
|
|
807
|
-
0,
|
|
808
|
-
.58,
|
|
809
|
-
1
|
|
810
|
-
]
|
|
811
|
-
};
|
|
812
|
-
return e === "linear" ? {
|
|
813
|
-
calcMode: "linear",
|
|
814
|
-
keySplines: null,
|
|
815
|
-
keyTimes: "0;1"
|
|
816
|
-
} : e === "steps" ? {
|
|
817
|
-
calcMode: "discrete",
|
|
818
|
-
keySplines: null,
|
|
819
|
-
keyTimes: "0;1"
|
|
820
|
-
} : {
|
|
821
|
-
calcMode: "spline",
|
|
822
|
-
keySplines: (e === "cubic-bezier" ? Array.isArray(R.value?.cubicBezier) && R.value.cubicBezier.length === 4 ? R.value.cubicBezier : [
|
|
823
|
-
.4,
|
|
824
|
-
0,
|
|
825
|
-
.2,
|
|
826
|
-
1
|
|
827
|
-
] : t[e] || t["ease-in-out"]).join(" "),
|
|
828
|
-
keyTimes: "0;1"
|
|
829
|
-
};
|
|
830
|
-
}), ct = g(() => {
|
|
831
|
-
let e = R.value?.trail || {}, t = N.value.style.line.strokeWidth || 1;
|
|
832
|
-
return {
|
|
833
|
-
show: e.show !== !1,
|
|
834
|
-
lengthPx: e.length,
|
|
835
|
-
width: Math.max(1, Number(e.strokeWidth) || t * 2.2),
|
|
836
|
-
opacity: Math.min(1, Math.max(0, Number(e.opacity) ?? .6)),
|
|
837
|
-
fadeIn: .5,
|
|
838
|
-
fadeOut: .2
|
|
839
|
-
};
|
|
840
|
-
}), z = g(() => fe({
|
|
841
|
-
data: F.value,
|
|
842
|
-
threshold: N.value.downsample.threshold
|
|
843
|
-
}));
|
|
844
|
-
g(() => {
|
|
845
|
-
if (!N.value.temperatureColors.show) return !1;
|
|
846
|
-
let e = F.value.map(({ value: e }) => e).filter((e) => Number.isFinite(e));
|
|
847
|
-
return new Set(e).size <= 1;
|
|
848
|
-
}), D(() => O.config, (e) => {
|
|
849
|
-
P.value || (N.value = L()), Qt(), K.value.chartWidth = N.value.style.chartWidth;
|
|
850
|
-
}, { deep: !0 }), D(() => O.dataset, (e) => {
|
|
851
|
-
Array.isArray(e) && e.length > 0 && (Ze.value = !1), B.value = fe({
|
|
852
|
-
data: F.value.map((e) => ({
|
|
853
|
-
...e,
|
|
854
|
-
value: [void 0].includes(e.value) ? null : e.value
|
|
855
|
-
})),
|
|
856
|
-
threshold: N.value.downsample.threshold
|
|
857
|
-
});
|
|
858
|
-
}, { deep: !0 });
|
|
859
|
-
let B = C(V());
|
|
860
|
-
function V() {
|
|
861
|
-
return fe({
|
|
862
|
-
data: F.value.map((e) => N.value.style.animation.show && F.value.length > 1 ? {
|
|
863
|
-
...e,
|
|
864
|
-
value: null
|
|
865
|
-
} : {
|
|
866
|
-
...e,
|
|
867
|
-
value: [void 0].includes(e.value) ? null : e.value
|
|
868
|
-
}),
|
|
869
|
-
threshold: N.value.downsample.threshold
|
|
870
|
-
});
|
|
871
|
-
}
|
|
872
|
-
let H = Pe(null), U = Pe(null), lt = C(!1), ut = C(0), dt = C([]), ft = C(""), W = g(() => {
|
|
873
|
-
let e = (z.value || []).map((e) => `${e.period}::${Number.isFinite(e.value) ? e.value : 0}`).join("|"), t = N.value?.style?.animation || {}, n = !!N.value?.gradientPath?.show && !N.value.temperatureColors.show;
|
|
874
|
-
return `${e}#${!!t.show}#${t.animationFrames || 0}#${n}`;
|
|
875
|
-
});
|
|
876
|
-
function pt() {
|
|
877
|
-
ut.value &&= (cancelAnimationFrame(ut.value), 0), dt.value.forEach((e) => clearTimeout(e)), dt.value = [], lt.value = !1;
|
|
878
|
-
}
|
|
879
|
-
function mt() {
|
|
880
|
-
let e = N.value?.style?.animation || {}, t = z.value || [], n = W.value, r = !!N.value.gradientPath.show && !N.value.temperatureColors.show;
|
|
881
|
-
if (n && n === ft.value && (lt.value || B.value.length === t.length)) return;
|
|
882
|
-
if (pt(), r || !e.show || P.value || t.length <= 1) {
|
|
883
|
-
B.value = t, ft.value = n;
|
|
884
|
-
return;
|
|
885
|
-
}
|
|
886
|
-
lt.value = !0, ft.value = n, B.value = [];
|
|
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 !== W.value) {
|
|
889
|
-
pt();
|
|
890
|
-
return;
|
|
891
|
-
}
|
|
892
|
-
if (o < t.length) {
|
|
893
|
-
B.value.push(t[o]);
|
|
894
|
-
let e = setTimeout(() => {
|
|
895
|
-
ut.value = requestAnimationFrame(s);
|
|
896
|
-
}, a);
|
|
897
|
-
dt.value.push(e), o += 1;
|
|
898
|
-
} else B.value = t, pt();
|
|
899
|
-
};
|
|
900
|
-
ut.value = requestAnimationFrame(s);
|
|
901
|
-
}
|
|
902
|
-
D(W, () => {
|
|
903
|
-
mt();
|
|
904
|
-
}), Ne(() => {
|
|
905
|
-
Qt(), mt();
|
|
906
|
-
}), Me(() => {
|
|
907
|
-
pt();
|
|
908
|
-
});
|
|
909
|
-
let gt = C(0);
|
|
910
|
-
D(() => P.value, async (e) => {
|
|
911
|
-
e || (await b(), gt.value += 1);
|
|
912
|
-
}), D(() => lt.value, async (e) => {
|
|
913
|
-
e || P.value || (await b(), gt.value += 1);
|
|
914
|
-
});
|
|
915
|
-
let G = g(() => `sparkline_line_path_${k.value}`), Yt = C(!0);
|
|
916
|
-
async function Xt() {
|
|
917
|
-
Yt.value = !1, await b(), Yt.value = !0, await b(), ot();
|
|
918
|
-
}
|
|
919
|
-
let Zt = g(() => !!N.value.debug);
|
|
920
|
-
function Qt() {
|
|
921
|
-
if (l(O.dataset) ? (d({
|
|
922
|
-
componentName: "VueUiSparkline",
|
|
923
|
-
type: "dataset",
|
|
924
|
-
debug: Zt.value
|
|
925
|
-
}), Ze.value = !0) : O.dataset.forEach((e, t) => {
|
|
926
|
-
de({
|
|
927
|
-
datasetObject: e,
|
|
928
|
-
requiredAttributes: ["period", "value"]
|
|
929
|
-
}).forEach((e) => {
|
|
930
|
-
d({
|
|
931
|
-
componentName: "VueUiSparkline",
|
|
932
|
-
type: "datasetSerieAttribute",
|
|
933
|
-
property: e,
|
|
934
|
-
index: t,
|
|
935
|
-
debug: Zt.value
|
|
936
|
-
});
|
|
937
|
-
});
|
|
938
|
-
}), l(O.dataset) || (Ze.value = N.value.loading), N.value.responsive) {
|
|
939
|
-
let e = be(() => {
|
|
940
|
-
let { width: e, height: t } = xe({
|
|
941
|
-
chart: A.value,
|
|
942
|
-
title: N.value.style.title.show && O.showInfo ? qe.value : null,
|
|
943
|
-
source: Je.value
|
|
944
|
-
});
|
|
945
|
-
requestAnimationFrame(() => {
|
|
946
|
-
K.value.width = e, K.value.height = t, K.value.chartWidth = N.value.style.chartWidth / 500 * e, K.value.padding = O.forcedPadding / 500 * e;
|
|
947
|
-
});
|
|
948
|
-
});
|
|
949
|
-
H.value && (U.value && H.value.unobserve(U.value), H.value.disconnect()), H.value = new ResizeObserver(e), U.value = A.value.parentNode, H.value.observe(U.value);
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
Me(() => {
|
|
953
|
-
H.value && (U.value && H.value.unobserve(U.value), H.value.disconnect());
|
|
954
|
-
});
|
|
955
|
-
let K = C({
|
|
956
|
-
height: 80 * O.heightRatio,
|
|
957
|
-
width: 500,
|
|
958
|
-
chartWidth: N.value.style.chartWidth,
|
|
959
|
-
padding: O.forcedPadding
|
|
960
|
-
}), $t = ye, q = g(() => {
|
|
961
|
-
let { top: e, right: t, bottom: n, left: r } = N.value.style.padding;
|
|
962
|
-
return {
|
|
963
|
-
top: e,
|
|
964
|
-
left: r,
|
|
965
|
-
right: K.value.width - t,
|
|
966
|
-
bottom: K.value.height - n,
|
|
967
|
-
start: O.showInfo && N.value.style.dataLabel.show && N.value.style.dataLabel.position === "left" ? K.value.width - K.value.chartWidth + r : K.value.padding + r,
|
|
968
|
-
width: O.showInfo && N.value.style.dataLabel.show ? K.value.chartWidth - r - t : K.value.width - K.value.padding - r - t,
|
|
969
|
-
height: K.value.height - e - n
|
|
970
|
-
};
|
|
971
|
-
}), en = g(() => [null, void 0].includes(N.value.style.scaleMin) ? Math.min(...B.value.map((e) => isNaN(e.value) || [
|
|
972
|
-
void 0,
|
|
973
|
-
null,
|
|
974
|
-
"NaN",
|
|
975
|
-
NaN,
|
|
976
|
-
Infinity,
|
|
977
|
-
-Infinity
|
|
978
|
-
].includes(e.value) ? 0 : e.value || 0)) : N.value.style.scaleMin), tn = g(() => [null, void 0].includes(N.value.style.scaleMax) ? Math.max(...B.value.map((e) => isNaN(e.value) || [
|
|
979
|
-
void 0,
|
|
980
|
-
null,
|
|
981
|
-
"NaN",
|
|
982
|
-
NaN,
|
|
983
|
-
Infinity,
|
|
984
|
-
-Infinity
|
|
985
|
-
].includes(e.value) ? 0 : e.value || 0)) : N.value.style.scaleMax), nn = g(() => {
|
|
986
|
-
let e = en.value >= 0 ? 0 : en.value;
|
|
987
|
-
return Math.abs(e);
|
|
988
|
-
}), rn = g(() => tn.value + nn.value), an = g(() => q.value.bottom - q.value.height * on(nn.value));
|
|
989
|
-
function on(e) {
|
|
990
|
-
return isNaN(e / rn.value) ? 0 : e / rn.value;
|
|
991
|
-
}
|
|
992
|
-
let sn = g(() => z.value.length - 1 || 1), cn = C([]), ln = 0;
|
|
993
|
-
Le(() => {
|
|
994
|
-
let e = ++ln;
|
|
995
|
-
(async () => {
|
|
996
|
-
let t = await me({
|
|
997
|
-
values: z.value.map((e) => e.period),
|
|
998
|
-
maxDatapoints: z.value.length,
|
|
999
|
-
formatter: N.value.style.dataLabel.datetimeFormatter,
|
|
1000
|
-
start: 0,
|
|
1001
|
-
end: z.value.length
|
|
1002
|
-
});
|
|
1003
|
-
e === ln && (cn.value = t);
|
|
1004
|
-
})();
|
|
1005
|
-
});
|
|
1006
|
-
let J = g(() => B.value.map((e, t) => {
|
|
1007
|
-
let n = isNaN(e.value) || [
|
|
1008
|
-
void 0,
|
|
1009
|
-
"NaN",
|
|
1010
|
-
NaN,
|
|
1011
|
-
Infinity,
|
|
1012
|
-
-Infinity
|
|
1013
|
-
].includes(e.value) ? 0 : e.value, r = q.value.width / sn.value;
|
|
1014
|
-
return {
|
|
1015
|
-
value: e.value,
|
|
1016
|
-
absoluteValue: n,
|
|
1017
|
-
period: cn.value && cn.value[t] && cn.value[t].text ? cn.value[t].text : e.period,
|
|
1018
|
-
plotValue: n + nn.value,
|
|
1019
|
-
toMax: on(n + nn.value),
|
|
1020
|
-
x: q.value.start + t * r,
|
|
1021
|
-
y: q.value.bottom - q.value.height * on(n + nn.value),
|
|
1022
|
-
id: `plot_${k.value}_${t}`,
|
|
1023
|
-
color: Q.value ? N.value.style.bar.color : N.value.style.area.useGradient ? f(N.value.style.line.color, .05 * (1 - t / sn.value)) : N.value.style.line.color,
|
|
1024
|
-
width: r
|
|
1025
|
-
};
|
|
1026
|
-
})), un = g(() => O.selectedIndex !== void 0 && O.selectedIndex !== null && O.selectedIndex >= 0 && O.selectedIndex < J.value.length ? O.selectedIndex : M.value !== void 0 && M.value !== null && M.value >= 0 && M.value < J.value.length ? M.value : null), Y = C(void 0), X = C(void 0);
|
|
1027
|
-
function dn(e, t) {
|
|
1028
|
-
N.value.events.datapointEnter && N.value.events.datapointEnter({
|
|
1029
|
-
datapoint: e,
|
|
1030
|
-
seriesIndex: t
|
|
1031
|
-
}), M.value = t, j.value = t, Y.value = e, X.value ||= e, $t("hoverIndex", { index: t });
|
|
1032
|
-
}
|
|
1033
|
-
function fn(e, t) {
|
|
1034
|
-
N.value.events.datapointLeave && N.value.events.datapointLeave({
|
|
1035
|
-
datapoint: e,
|
|
1036
|
-
seriesIndex: t
|
|
1037
|
-
}), X.value = Y.value, Y.value = void 0, M.value = null, j.value = null, $t("hoverIndex", { index: void 0 });
|
|
1038
|
-
}
|
|
1039
|
-
let Z = g(() => {
|
|
1040
|
-
if (Ge.value) {
|
|
1041
|
-
let e = J.value.map((e) => e.absoluteValue), t = e.reduce((e, t) => e + t, 0);
|
|
1042
|
-
return {
|
|
1043
|
-
latest: J.value[J.value.length - 1] ? J.value[J.value.length - 1].absoluteValue : 0,
|
|
1044
|
-
sum: t,
|
|
1045
|
-
average: t / J.value.length,
|
|
1046
|
-
median: ie(e),
|
|
1047
|
-
trend: se(J.value.map(({ x: e, y: t, absoluteValue: n }) => ({
|
|
1048
|
-
x: e,
|
|
1049
|
-
y: t,
|
|
1050
|
-
value: n
|
|
1051
|
-
}))).trend
|
|
1052
|
-
};
|
|
1053
|
-
} else return {
|
|
1054
|
-
latest: null,
|
|
1055
|
-
sum: null,
|
|
1056
|
-
average: null,
|
|
1057
|
-
median: null,
|
|
1058
|
-
trend: null
|
|
1059
|
-
};
|
|
1060
|
-
}), pn = g(() => Ge.value ? N.value.style.dataLabel.valueType === "latest" ? Z.value.latest : N.value.style.dataLabel.valueType === "sum" ? Z.value.sum : N.value.style.dataLabel.valueType === "average" ? Z.value.average : 0 : 0), Q = g(() => N.value.type && N.value.type === "bar");
|
|
1061
|
-
function mn(e, t) {
|
|
1062
|
-
N.value.events.datapointClick && N.value.events.datapointClick({
|
|
1063
|
-
datapoint: e,
|
|
1064
|
-
seriesIndex: t
|
|
1065
|
-
}), $t("selectDatapoint", {
|
|
1066
|
-
datapoint: e,
|
|
1067
|
-
index: t
|
|
1068
|
-
});
|
|
1069
|
-
}
|
|
1070
|
-
let hn = g(() => Array.isArray(N.value.style.line.dashIndices) && N.value.style.line.dashIndices.length > 0), gn = g(() => N.value.style.line.cutNullValues);
|
|
1071
|
-
function _n(e) {
|
|
1072
|
-
return ![
|
|
1073
|
-
null,
|
|
1074
|
-
void 0,
|
|
1075
|
-
"NaN",
|
|
1076
|
-
NaN,
|
|
1077
|
-
Infinity,
|
|
1078
|
-
-Infinity
|
|
1079
|
-
].includes(e);
|
|
1080
|
-
}
|
|
1081
|
-
function vn(e, t) {
|
|
1082
|
-
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;
|
|
1083
|
-
return _n(e[t]?.value) && i && gn.value;
|
|
1084
|
-
}
|
|
1085
|
-
function yn(e, t) {
|
|
1086
|
-
return Y.value && e.id === Y.value.id || un.value === t || F.value.length === 1;
|
|
1087
|
-
}
|
|
1088
|
-
function bn(e, t) {
|
|
1089
|
-
return Q.value || !_n(e?.value) ? !1 : N.value.style.plot.show && yn(e, t) || vn(J.value, t);
|
|
1090
|
-
}
|
|
1091
|
-
function xn(e, t) {
|
|
1092
|
-
return Math.max(1, yn(e, t) ? N.value.style.plot.radius : N.value.style.plot.radius * .7);
|
|
1093
|
-
}
|
|
1094
|
-
function Sn(e, t) {
|
|
1095
|
-
return yn(e, t) ? N.value.style.plot.stroke : N.value.style.backgroundColor;
|
|
1096
|
-
}
|
|
1097
|
-
let Cn = g(() => gn.value ? J.value : J.value.filter((e) => e.value !== null)), wn = g(() => J.value.filter((e) => e.value !== null)), Tn = g(() => wn.value.length > 1), En = g(() => Q.value || !Tn.value ? "" : gn.value ? c(J.value) : oe(Cn.value)), Dn = g(() => Q.value || !Tn.value ? "" : gn.value ? pe(J.value) : ee(Cn.value)), On = g(() => Q.value || !hn.value || !Tn.value ? [] : u(Cn.value, N.value.style.line.dashIndices)), kn = g(() => Q.value || !hn.value || !Tn.value ? [] : n(Cn.value, N.value.style.line.dashIndices)), An = g(() => Q.value || !N.value.style.area.show || !Tn.value ? [] : N.value.style.line.smooth ? t(Cn.value, q.value.bottom, gn.value).filter(Boolean) : (gn.value ? r(J.value, q.value.bottom) : i(Cn.value, q.value.bottom)).split(";").filter(Boolean).map((e) => `M${e}Z`)), jn = g(() => Q.value || !N.value.gradientPath.show || N.value.temperatureColors.show ? "" : `M ${(N.value.style.line.smooth ? En.value : Dn.value) || "0,0"}`), Mn = g(() => {
|
|
1098
|
-
if (!N.value.temperatureColors.show) return null;
|
|
1099
|
-
let e = N.value.temperatureColors.colors;
|
|
1100
|
-
return !Array.isArray(e) || !e.length ? null : e.map((e) => re(e));
|
|
1101
|
-
}), $ = g(() => {
|
|
1102
|
-
if (!N.value.temperatureColors.show) return null;
|
|
1103
|
-
let e = N.value.temperatureColors.colors;
|
|
1104
|
-
return !Array.isArray(e) || !e.length ? null : e.map((e) => re(e));
|
|
1105
|
-
});
|
|
1106
|
-
function Nn(e) {
|
|
1107
|
-
if (!Number.isFinite(e?.y)) return 0;
|
|
1108
|
-
let t = q.value.height || 1, n = (e.y - q.value.top) / t;
|
|
1109
|
-
return Math.min(1, Math.max(0, n));
|
|
1110
|
-
}
|
|
1111
|
-
function Pn(e) {
|
|
1112
|
-
let t = Mn.value;
|
|
1113
|
-
return !Array.isArray(t) || !t.length ? e.color : ne({
|
|
1114
|
-
colors: t,
|
|
1115
|
-
ratio: Nn(e)
|
|
1116
|
-
});
|
|
1117
|
-
}
|
|
1118
|
-
D(() => [
|
|
1119
|
-
at.value,
|
|
1120
|
-
G.value,
|
|
1121
|
-
J.value.length,
|
|
1122
|
-
K.value.width,
|
|
1123
|
-
K.value.height,
|
|
1124
|
-
N.value?.style?.line?.smooth
|
|
1125
|
-
], async () => {
|
|
1126
|
-
await b(), ot();
|
|
1127
|
-
}, { immediate: !0 }), Ne(async () => {
|
|
1128
|
-
await b(), ot();
|
|
1129
|
-
}), D(() => P.value, async (e) => {
|
|
1130
|
-
e || await Xt();
|
|
1131
|
-
}), D(() => lt.value, async (e) => {
|
|
1132
|
-
e || P.value || await Xt();
|
|
1133
|
-
}), D(() => O.selectedIndex, (e) => {
|
|
1134
|
-
if (e == null) {
|
|
1135
|
-
M.value = null, j.value = null, Y.value = void 0;
|
|
1136
|
-
return;
|
|
1137
|
-
}
|
|
1138
|
-
if (e < 0 || e >= J.value.length) return;
|
|
1139
|
-
let t = J.value[e];
|
|
1140
|
-
t && (M.value = e, j.value = e, Y.value = t);
|
|
1141
|
-
});
|
|
1142
|
-
let Fn = C(!1);
|
|
1143
|
-
function In() {
|
|
1144
|
-
let e = un.value;
|
|
1145
|
-
if (e !== null && e >= 0 && e < J.value.length) {
|
|
1146
|
-
let t = J.value[e];
|
|
1147
|
-
if (t) {
|
|
1148
|
-
j.value = e, Y.value = t, M.value = e, Fn.value = !0;
|
|
1149
|
-
return;
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
j.value = null, !Y.value && J.value.length && dn(J.value.at(-1), J.value.length - 1), Fn.value = !0;
|
|
1153
|
-
}
|
|
1154
|
-
function Ln() {
|
|
1155
|
-
X.value = Y.value, (O.selectedIndex === void 0 || O.selectedIndex === null) && (j.value = null, Y.value = void 0, M.value = null, $t("hoverIndex", { index: void 0 })), Fn.value = !1;
|
|
1156
|
-
}
|
|
1157
|
-
function Rn(e) {
|
|
1158
|
-
if (!I.value || document.activeElement !== I.value) return;
|
|
1159
|
-
X.value = Y.value;
|
|
1160
|
-
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
|
|
1161
|
-
if (!t && !n) return;
|
|
1162
|
-
let r = J.value.length;
|
|
1163
|
-
if (!r) return;
|
|
1164
|
-
e.preventDefault(), e.stopPropagation();
|
|
1165
|
-
let i = j.value, a = i !== null && i >= 0 && i < r, o = Y.value ? J.value.findIndex((e) => e.id === Y.value.id) : -1;
|
|
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 = J.value[i];
|
|
1168
|
-
s && (j.value = i, dn(s, i));
|
|
1169
|
-
}
|
|
1170
|
-
let zn = g(() => ({
|
|
1171
|
-
headers: [N.value.translations.period, N.value.translations.value],
|
|
1172
|
-
rows: J.value.map((e) => [e.period, e.absoluteValue])
|
|
1173
|
-
}));
|
|
1174
|
-
return (t, n) => (S(), v("div", {
|
|
1175
|
-
ref_key: "sparklineChart",
|
|
1176
|
-
ref: A,
|
|
1177
|
-
class: "vue-data-ui-component vue-ui-sparkline",
|
|
1178
|
-
id: k.value,
|
|
1179
|
-
style: x(`width:100%;font-family:${N.value.style.fontFamily};`)
|
|
1180
|
-
}, [
|
|
1181
|
-
y("p", {
|
|
1182
|
-
id: `chart-instructions-${k.value}`,
|
|
1183
|
-
class: "sr-only"
|
|
1184
|
-
}, Fe(N.value.a11y.translations.keyboardNavigation), 9, vt),
|
|
1185
|
-
zn.value?.rows?.length ? (S(), Ee(Se, {
|
|
1186
|
-
key: 0,
|
|
1187
|
-
uid: k.value,
|
|
1188
|
-
head: zn.value.headers,
|
|
1189
|
-
body: zn.value.rows,
|
|
1190
|
-
notice: N.value.a11y.translations.tableAvailable,
|
|
1191
|
-
caption: N.value.a11y.translations.tableCaption
|
|
1192
|
-
}, null, 8, [
|
|
1193
|
-
"uid",
|
|
1194
|
-
"head",
|
|
1195
|
-
"body",
|
|
1196
|
-
"notice",
|
|
1197
|
-
"caption"
|
|
1198
|
-
])) : _("", !0),
|
|
1199
|
-
T(t.$slots, "before", je(Ae({
|
|
1200
|
-
selected: Y.value,
|
|
1201
|
-
latest: Z.value.latest,
|
|
1202
|
-
sum: Z.value.sum,
|
|
1203
|
-
average: Z.value.average,
|
|
1204
|
-
median: Z.value.median,
|
|
1205
|
-
trend: Z.value.trend
|
|
1206
|
-
})), void 0, !0),
|
|
1207
|
-
N.value.style.title.show && e.showInfo ? (S(), v("div", {
|
|
1208
|
-
key: 1,
|
|
1209
|
-
ref_key: "chartTitle",
|
|
1210
|
-
ref: qe,
|
|
1211
|
-
class: "vue-ui-sparkline-title",
|
|
1212
|
-
style: x(`display:flex;align-items:center;width:100%;color:${N.value.style.title.color};background:${N.value.style.backgroundColor};justify-content:${N.value.style.title.textAlign === "left" ? "flex-start" : N.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${N.value.style.title.fontSize * 2}px;font-size:${N.value.style.title.fontSize}px;font-weight:${N.value.style.title.bold ? "bold" : "normal"};`)
|
|
1213
|
-
}, [y("span", { style: x(`padding:${N.value.style.title.textAlign === "left" ? "0 0 0 12px" : N.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`) }, Fe(Y.value ? Y.value.period : N.value.style.title.text), 5)], 4)) : _("", !0),
|
|
1214
|
-
y("div", yt, [(S(), v("svg", {
|
|
1215
|
-
ref_key: "svgRef",
|
|
1216
|
-
ref: I,
|
|
1217
|
-
xmlns: E(le),
|
|
1218
|
-
viewBox: `0 0 ${K.value.width} ${K.value.height}`,
|
|
1219
|
-
style: x(`background:${N.value.style.backgroundColor};overflow:visible;direction:ltr`),
|
|
1220
|
-
tabindex: "0",
|
|
1221
|
-
"aria-describedby": `chart-instructions-${k.value}`,
|
|
1222
|
-
onMouseleave: n[0] ||= (e) => X.value = void 0,
|
|
1223
|
-
onFocus: In,
|
|
1224
|
-
onBlur: Ln,
|
|
1225
|
-
onKeydown: Rn
|
|
1226
|
-
}, [
|
|
1227
|
-
Oe(E(ze)),
|
|
1228
|
-
t.$slots["chart-background"] ? (S(), v("foreignObject", {
|
|
1229
|
-
key: 0,
|
|
1230
|
-
x: 0,
|
|
1231
|
-
y: 0,
|
|
1232
|
-
width: K.value.width <= 0 ? 10 : K.value.width,
|
|
1233
|
-
height: K.value.height <= 0 ? 10 : K.value.height,
|
|
1234
|
-
style: { pointerEvents: "none" }
|
|
1235
|
-
}, [T(t.$slots, "chart-background", {}, void 0, !0)], 8, xt)) : _("", !0),
|
|
1236
|
-
y("defs", null, [
|
|
1237
|
-
y("linearGradient", {
|
|
1238
|
-
x1: "0%",
|
|
1239
|
-
y1: "0%",
|
|
1240
|
-
x2: "100%",
|
|
1241
|
-
y2: "0%",
|
|
1242
|
-
id: `sparkline_gradient_${k.value}`
|
|
1243
|
-
}, [y("stop", {
|
|
1244
|
-
offset: "0%",
|
|
1245
|
-
"stop-color": E(s)(E(f)(N.value.style.area.color, .05), N.value.style.area.opacity)
|
|
1246
|
-
}, null, 8, Ct), y("stop", {
|
|
1247
|
-
offset: "100%",
|
|
1248
|
-
"stop-color": E(s)(N.value.style.area.color, N.value.style.area.opacity)
|
|
1249
|
-
}, null, 8, wt)], 8, St),
|
|
1250
|
-
y("linearGradient", {
|
|
1251
|
-
x2: "0%",
|
|
1252
|
-
y2: "100%",
|
|
1253
|
-
id: `sparkline_bar_gradient_pos_${k.value}`
|
|
1254
|
-
}, [y("stop", {
|
|
1255
|
-
offset: "0%",
|
|
1256
|
-
"stop-color": N.value.style.bar.color
|
|
1257
|
-
}, null, 8, Et), y("stop", {
|
|
1258
|
-
offset: "100%",
|
|
1259
|
-
"stop-color": E(f)(N.value.style.bar.color, .05)
|
|
1260
|
-
}, null, 8, Dt)], 8, Tt),
|
|
1261
|
-
y("linearGradient", {
|
|
1262
|
-
x2: "0%",
|
|
1263
|
-
y2: "100%",
|
|
1264
|
-
id: `sparkline_bar_gradient_neg_${k.value}`
|
|
1265
|
-
}, [y("stop", {
|
|
1266
|
-
offset: "0%",
|
|
1267
|
-
"stop-color": E(f)(N.value.style.bar.color, .05)
|
|
1268
|
-
}, null, 8, kt), y("stop", {
|
|
1269
|
-
offset: "100%",
|
|
1270
|
-
"stop-color": N.value.style.bar.color
|
|
1271
|
-
}, null, 8, At)], 8, Ot),
|
|
1272
|
-
y("filter", {
|
|
1273
|
-
id: `sparkline_pulse_glow_${k.value}`,
|
|
1274
|
-
filterUnits: "userSpaceOnUse",
|
|
1275
|
-
x: "-50",
|
|
1276
|
-
y: "-50",
|
|
1277
|
-
width: "100",
|
|
1278
|
-
height: "100"
|
|
1279
|
-
}, [...n[1] ||= [y("feGaussianBlur", {
|
|
1280
|
-
in: "SourceGraphic",
|
|
1281
|
-
stdDeviation: "3",
|
|
1282
|
-
result: "blur"
|
|
1283
|
-
}, null, -1), y("feMerge", null, [y("feMergeNode", { in: "blur" }), y("feMergeNode", { in: "SourceGraphic" })], -1)]], 8, jt),
|
|
1284
|
-
N.value.temperatureColors.show && $.value ? (S(), v("linearGradient", {
|
|
1285
|
-
key: 0,
|
|
1286
|
-
id: `temperature_grad_sparkline_${k.value}`,
|
|
1287
|
-
gradientUnits: "userSpaceOnUse",
|
|
1288
|
-
x1: "0",
|
|
1289
|
-
x2: "0",
|
|
1290
|
-
y1: q.value.top,
|
|
1291
|
-
y2: q.value.bottom
|
|
1292
|
-
}, [(S(!0), v(h, null, w($.value, (e, t) => (S(), v("stop", {
|
|
1293
|
-
key: `temperature_grad_stop_${t}_${k.value}`,
|
|
1294
|
-
"stop-color": e,
|
|
1295
|
-
offset: $.value.length === 1 ? "0%" : E(o)(t, $.value.length)
|
|
1296
|
-
}, null, 8, Nt))), 128))], 8, Mt)) : _("", !0)
|
|
1297
|
-
]),
|
|
1298
|
-
N.value.style.area.show && !Q.value && An.value.length ? (S(), v("g", Pt, [(S(!0), v(h, null, w(An.value, (e, t) => (S(), v("path", {
|
|
1299
|
-
key: `sparkline_area_${t}_${k.value}`,
|
|
1300
|
-
class: "vue-ui-sparkline-area",
|
|
1301
|
-
"data-cy": N.value.style.line.smooth ? "sparkline-smooth-area" : "sparkline-angle-area",
|
|
1302
|
-
d: e,
|
|
1303
|
-
fill: N.value.style.area.useGradient ? `url(#sparkline_gradient_${k.value})` : E(s)(N.value.style.area.color, N.value.style.area.opacity),
|
|
1304
|
-
"stroke-linecap": "round",
|
|
1305
|
-
"stroke-linejoin": "round",
|
|
1306
|
-
style: x({ transition: E(P) ? void 0 : "all 0.2s" })
|
|
1307
|
-
}, null, 12, Ft))), 128))])) : _("", !0),
|
|
1308
|
-
N.value.style.line.smooth && !Q.value ? (S(), v(h, { key: 2 }, [y("path", {
|
|
1309
|
-
id: G.value,
|
|
1310
|
-
d: `M ${En.value || "0,0"}`,
|
|
1311
|
-
fill: "none",
|
|
1312
|
-
stroke: "transparent",
|
|
1313
|
-
"stroke-width": N.value.style.line.strokeWidth,
|
|
1314
|
-
"stroke-linecap": "round",
|
|
1315
|
-
"stroke-linejoin": "round"
|
|
1316
|
-
}, null, 8, It), hn.value ? (S(!0), v(h, { key: 0 }, w(On.value, (e) => (S(), v("path", {
|
|
1317
|
-
key: e.path,
|
|
1318
|
-
class: "vue-ui-sparkline-path",
|
|
1319
|
-
d: `M ${e.path}`,
|
|
1320
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : N.value.style.line.color,
|
|
1321
|
-
fill: "none",
|
|
1322
|
-
"stroke-width": N.value.style.line.strokeWidth,
|
|
1323
|
-
"stroke-linecap": "round",
|
|
1324
|
-
"stroke-linejoin": "round",
|
|
1325
|
-
"stroke-dasharray": e.dashed ? N.value.style.line.dashArray : 0,
|
|
1326
|
-
style: x({ transition: E(P) ? void 0 : "all 0.2s" })
|
|
1327
|
-
}, null, 12, Lt))), 128)) : (S(), v("path", {
|
|
1328
|
-
key: 1,
|
|
1329
|
-
class: "vue-ui-sparkline-path",
|
|
1330
|
-
d: `M ${En.value || "0,0"}`,
|
|
1331
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : N.value.style.line.color,
|
|
1332
|
-
fill: "none",
|
|
1333
|
-
"stroke-width": N.value.style.line.strokeWidth,
|
|
1334
|
-
"stroke-linecap": "round",
|
|
1335
|
-
"stroke-linejoin": "round",
|
|
1336
|
-
style: x({ transition: E(P) ? void 0 : "all 0.2s" })
|
|
1337
|
-
}, null, 12, Rt))], 64)) : _("", !0),
|
|
1338
|
-
!N.value.style.line.smooth && !Q.value ? (S(), v(h, { key: 3 }, [y("path", {
|
|
1339
|
-
id: G.value,
|
|
1340
|
-
d: `M ${Dn.value || "0,0"}`,
|
|
1341
|
-
fill: "none",
|
|
1342
|
-
stroke: "transparent",
|
|
1343
|
-
"stroke-width": N.value.style.line.strokeWidth,
|
|
1344
|
-
"stroke-linecap": "round",
|
|
1345
|
-
"stroke-linejoin": "round"
|
|
1346
|
-
}, null, 8, zt), hn.value ? (S(!0), v(h, { key: 0 }, w(kn.value, (e) => (S(), v("path", {
|
|
1347
|
-
key: e.path,
|
|
1348
|
-
class: "vue-ui-sparkline-path",
|
|
1349
|
-
d: `M ${e.path}`,
|
|
1350
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : N.value.style.line.color,
|
|
1351
|
-
fill: "none",
|
|
1352
|
-
"stroke-width": N.value.style.line.strokeWidth,
|
|
1353
|
-
"stroke-linecap": "round",
|
|
1354
|
-
"stroke-linejoin": "round",
|
|
1355
|
-
"stroke-dasharray": e.dashed ? N.value.style.line.dashArray * 2 : 0,
|
|
1356
|
-
style: x({ transition: E(P) ? void 0 : "all 0.2s" })
|
|
1357
|
-
}, null, 12, Bt))), 128)) : (S(), v("path", {
|
|
1358
|
-
key: 1,
|
|
1359
|
-
class: "vue-ui-sparkline-path",
|
|
1360
|
-
d: `M ${Dn.value || "0,0"}`,
|
|
1361
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : N.value.style.line.color,
|
|
1362
|
-
fill: "none",
|
|
1363
|
-
"stroke-width": N.value.style.line.strokeWidth,
|
|
1364
|
-
"stroke-linecap": "round",
|
|
1365
|
-
"stroke-linejoin": "round",
|
|
1366
|
-
style: x({ transition: E(P) ? void 0 : "all 0.2s" })
|
|
1367
|
-
}, null, 12, Vt))], 64)) : _("", !0),
|
|
1368
|
-
jn.value && !$.value ? (S(), Ee(ht, {
|
|
1369
|
-
key: 4,
|
|
1370
|
-
svgPathData: jn.value,
|
|
1371
|
-
enabled: N.value.gradientPath.show && !Q.value && !$.value,
|
|
1372
|
-
strokeWidth: N.value.style.line.strokeWidth,
|
|
1373
|
-
highColor: N.value.gradientPath.colors.high,
|
|
1374
|
-
lowColor: N.value.gradientPath.colors.low,
|
|
1375
|
-
segments: N.value.gradientPath.segments
|
|
1376
|
-
}, null, 8, [
|
|
1377
|
-
"svgPathData",
|
|
1378
|
-
"enabled",
|
|
1379
|
-
"strokeWidth",
|
|
1380
|
-
"highColor",
|
|
1381
|
-
"lowColor",
|
|
1382
|
-
"segments"
|
|
1383
|
-
])) : _("", !0),
|
|
1384
|
-
Yt.value && at.value ? (S(), Ee(Ke, {
|
|
1385
|
-
key: 5,
|
|
1386
|
-
uid: k.value,
|
|
1387
|
-
svgRef: E(I),
|
|
1388
|
-
pulsePathId: G.value,
|
|
1389
|
-
pulsePathLength: $e.value,
|
|
1390
|
-
pulseDur: Qe.value,
|
|
1391
|
-
pulseBegin: et.value,
|
|
1392
|
-
pulseRepeatCount: nt.value,
|
|
1393
|
-
pulseFillMode: rt.value,
|
|
1394
|
-
pulseKeyPoints: tt.value,
|
|
1395
|
-
pulseMotion: st.value,
|
|
1396
|
-
pulse: R.value,
|
|
1397
|
-
pulseTrail: ct.value,
|
|
1398
|
-
pulseTrailLength: it.value,
|
|
1399
|
-
prefersReducedMotion: E(We),
|
|
1400
|
-
loading: E(P),
|
|
1401
|
-
isBar: Q.value
|
|
1402
|
-
}, null, 8, [
|
|
1403
|
-
"uid",
|
|
1404
|
-
"svgRef",
|
|
1405
|
-
"pulsePathId",
|
|
1406
|
-
"pulsePathLength",
|
|
1407
|
-
"pulseDur",
|
|
1408
|
-
"pulseBegin",
|
|
1409
|
-
"pulseRepeatCount",
|
|
1410
|
-
"pulseFillMode",
|
|
1411
|
-
"pulseKeyPoints",
|
|
1412
|
-
"pulseMotion",
|
|
1413
|
-
"pulse",
|
|
1414
|
-
"pulseTrail",
|
|
1415
|
-
"pulseTrailLength",
|
|
1416
|
-
"prefersReducedMotion",
|
|
1417
|
-
"loading",
|
|
1418
|
-
"isBar"
|
|
1419
|
-
])) : _("", !0),
|
|
1420
|
-
(S(!0), v(h, null, w(J.value, (e, t) => (S(), v("g", null, [Q.value ? (S(), v("rect", {
|
|
1421
|
-
key: 0,
|
|
1422
|
-
x: e.x - e.width / 2,
|
|
1423
|
-
y: isNaN(e.absoluteValue > 0 ? e.y : an.value) ? 0 : e.absoluteValue > 0 ? e.y : an.value,
|
|
1424
|
-
width: e.width,
|
|
1425
|
-
height: isNaN(Math.abs(e.y - an.value)) ? 0 : Math.abs(e.y - an.value),
|
|
1426
|
-
fill: e.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${k.value})` : `url(#sparkline_bar_gradient_neg_${k.value})`,
|
|
1427
|
-
rx: N.value.style.bar.borderRadius
|
|
1428
|
-
}, null, 8, Ht)) : _("", !0), N.value.style.verticalIndicator.show && (Y.value && e.id === Y.value.id || un.value === t) ? (S(), v("line", {
|
|
1429
|
-
key: 1,
|
|
1430
|
-
x1: e.x,
|
|
1431
|
-
x2: e.x,
|
|
1432
|
-
y1: q.value.top - 6,
|
|
1433
|
-
y2: q.value.bottom,
|
|
1434
|
-
stroke: N.value.style.verticalIndicator.color || e.color,
|
|
1435
|
-
"stroke-width": N.value.style.verticalIndicator.strokeWidth,
|
|
1436
|
-
"stroke-linecap": "round",
|
|
1437
|
-
"stroke-dasharray": N.value.style.verticalIndicator.strokeDasharray || 0
|
|
1438
|
-
}, null, 8, Ut)) : _("", !0)]))), 256)),
|
|
1439
|
-
en.value < 0 ? (S(), v("line", {
|
|
1440
|
-
key: 6,
|
|
1441
|
-
x1: q.value.start,
|
|
1442
|
-
x2: q.value.start + q.value.width,
|
|
1443
|
-
y1: E(ce)(an.value, q.value.bottom),
|
|
1444
|
-
y2: E(ce)(an.value, q.value.bottom),
|
|
1445
|
-
stroke: N.value.style.zeroLine.color,
|
|
1446
|
-
"stroke-dasharray": N.value.style.zeroLine.strokeWidth * 2,
|
|
1447
|
-
"stroke-width": N.value.style.zeroLine.strokeWidth,
|
|
1448
|
-
"stroke-linecap": "round"
|
|
1449
|
-
}, null, 8, Wt)) : _("", !0),
|
|
1450
|
-
(S(!0), v(h, null, w(J.value, (e, t) => (S(), v("g", { key: `sparkline_plot_${e.id}` }, [bn(e, t) ? (S(), v("circle", {
|
|
1451
|
-
key: 0,
|
|
1452
|
-
cx: e.x,
|
|
1453
|
-
cy: e.y,
|
|
1454
|
-
r: xn(e, t),
|
|
1455
|
-
fill: Pn(e),
|
|
1456
|
-
stroke: Sn(e, t),
|
|
1457
|
-
"stroke-width": N.value.style.plot.strokeWidth
|
|
1458
|
-
}, null, 8, Gt)) : _("", !0)]))), 128)),
|
|
1459
|
-
e.showInfo && N.value.style.dataLabel.show ? (S(), v("text", {
|
|
1460
|
-
key: 7,
|
|
1461
|
-
x: N.value.style.dataLabel.position === "left" ? 12 + N.value.style.dataLabel.offsetX : q.value.width + 12 + N.value.style.dataLabel.offsetX,
|
|
1462
|
-
y: K.value.height / 2 + N.value.style.dataLabel.fontSize / 2.5 + N.value.style.dataLabel.offsetY,
|
|
1463
|
-
"font-size": N.value.style.dataLabel.fontSize,
|
|
1464
|
-
"font-weight": N.value.style.dataLabel.bold ? "bold" : "normal",
|
|
1465
|
-
fill: N.value.style.dataLabel.color
|
|
1466
|
-
}, Fe(Y.value ? E(ae)(N.value.style.dataLabel.formatter, Y.value.absoluteValue, E(p)({
|
|
1467
|
-
p: N.value.style.dataLabel.prefix,
|
|
1468
|
-
v: Y.value.absoluteValue,
|
|
1469
|
-
s: N.value.style.dataLabel.suffix,
|
|
1470
|
-
r: N.value.style.dataLabel.roundingValue
|
|
1471
|
-
}), { datapoint: Y.value }) : E(ae)(N.value.style.dataLabel.formatter, pn.value, E(p)({
|
|
1472
|
-
p: N.value.style.dataLabel.prefix,
|
|
1473
|
-
v: pn.value,
|
|
1474
|
-
s: N.value.style.dataLabel.suffix,
|
|
1475
|
-
r: N.value.style.dataLabel.roundingValue
|
|
1476
|
-
}))), 9, Kt)) : _("", !0),
|
|
1477
|
-
(S(!0), v(h, null, w(J.value, (e, t) => (S(), v("rect", {
|
|
1478
|
-
x: e.x - (q.value.width / (sn.value + 1) > K.value.padding ? K.value.padding : q.value.width / (sn.value + 1)) / 2,
|
|
1479
|
-
y: q.value.top - 6,
|
|
1480
|
-
height: q.value.height + 6,
|
|
1481
|
-
width: q.value.width / (sn.value + 1) > K.value.padding ? K.value.padding : q.value.width / (sn.value + 1),
|
|
1482
|
-
fill: "transparent",
|
|
1483
|
-
onMouseenter: () => dn(e, t),
|
|
1484
|
-
onMouseleave: () => fn(e, t),
|
|
1485
|
-
onClick: () => mn(e, t)
|
|
1486
|
-
}, null, 40, qt))), 256)),
|
|
1487
|
-
T(t.$slots, "svg", { svg: {
|
|
1488
|
-
...K.value,
|
|
1489
|
-
drawingArea: q.value,
|
|
1490
|
-
timeLabels: cn.value,
|
|
1491
|
-
series: J.value,
|
|
1492
|
-
hoveredIndex: j.value
|
|
1493
|
-
} }, void 0, !0)
|
|
1494
|
-
], 44, bt)), t.$slots.hint ? (S(), v("div", Jt, [T(t.$slots, "hint", je(Ae({
|
|
1495
|
-
hint: N.value.a11y.translations.keyboardNavigation,
|
|
1496
|
-
isVisible: Fn.value
|
|
1497
|
-
})), void 0, !0)])) : _("", !0)]),
|
|
1498
|
-
Y.value && N.value.style.tooltip.show ? (S(), Ee(E(Be), {
|
|
1499
|
-
key: 2,
|
|
1500
|
-
x: Y.value.x,
|
|
1501
|
-
y: Y.value.y,
|
|
1502
|
-
prevX: X.value.x,
|
|
1503
|
-
prevY: X.value.y,
|
|
1504
|
-
offsetY: N.value.style.plot.radius * 3 + N.value.style.tooltip.offsetY,
|
|
1505
|
-
svgRef: E(I),
|
|
1506
|
-
background: N.value.style.tooltip.backgroundColor,
|
|
1507
|
-
color: N.value.style.tooltip.color,
|
|
1508
|
-
fontSize: N.value.style.tooltip.fontSize,
|
|
1509
|
-
borderWidth: N.value.style.tooltip.borderWidth,
|
|
1510
|
-
borderColor: N.value.style.tooltip.borderColor,
|
|
1511
|
-
borderRadius: N.value.style.tooltip.borderRadius,
|
|
1512
|
-
backgroundOpacity: N.value.style.tooltip.backgroundOpacity
|
|
1513
|
-
}, {
|
|
1514
|
-
default: Re(() => [T(t.$slots, "tooltip", je(Ae({ ...Y.value })), () => [De(Fe(Y.value.period) + ": " + Fe(E(ae)(N.value.style.dataLabel.formatter, Y.value.absoluteValue, E(p)({
|
|
1515
|
-
p: N.value.style.dataLabel.prefix,
|
|
1516
|
-
v: Y.value.absoluteValue,
|
|
1517
|
-
s: N.value.style.dataLabel.suffix,
|
|
1518
|
-
r: N.value.style.dataLabel.roundingValue
|
|
1519
|
-
}), { datapoint: Y.value })), 1)], !0)]),
|
|
1520
|
-
_: 3
|
|
1521
|
-
}, 8, [
|
|
1522
|
-
"x",
|
|
1523
|
-
"y",
|
|
1524
|
-
"prevX",
|
|
1525
|
-
"prevY",
|
|
1526
|
-
"offsetY",
|
|
1527
|
-
"svgRef",
|
|
1528
|
-
"background",
|
|
1529
|
-
"color",
|
|
1530
|
-
"fontSize",
|
|
1531
|
-
"borderWidth",
|
|
1532
|
-
"borderColor",
|
|
1533
|
-
"borderRadius",
|
|
1534
|
-
"backgroundOpacity"
|
|
1535
|
-
])) : _("", !0),
|
|
1536
|
-
t.$slots.source ? (S(), v("div", {
|
|
1537
|
-
key: 3,
|
|
1538
|
-
ref_key: "source",
|
|
1539
|
-
ref: Je,
|
|
1540
|
-
dir: "auto"
|
|
1541
|
-
}, [T(t.$slots, "source", {}, void 0, !0)], 512)) : _("", !0),
|
|
1542
|
-
T(t.$slots, "skeleton", {}, () => [E(P) ? (S(), Ee(ge, { key: 0 })) : _("", !0)], !0)
|
|
1543
|
-
], 12, _t));
|
|
1544
|
-
}
|
|
1545
|
-
}, [["__scopeId", "data-v-9fa1c607"]]);
|
|
1546
|
-
//#endregion
|
|
1547
|
-
export { gt as n, G as t };
|