vue-data-ui 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-CKLBHe3L.js → Arrow-DLi6NnGD.js} +1 -1
- package/dist/{BaseDraggableDialog-q3pgSDTz.js → BaseDraggableDialog-CVGErydD.js} +2 -2
- package/dist/{BaseIcon-CtqN7W_g.js → BaseIcon-eZbszQrv.js} +1 -1
- package/dist/{ColorPicker-Cr6rUDTP.js → ColorPicker-BoPM4Ejg.js} +2 -2
- package/dist/{DataTable-BeI6gYJX.js → DataTable-yAMEyP6y.js} +2 -2
- package/dist/{Legend-DsogCeTb.js → Legend-By4rru90.js} +2 -2
- package/dist/{NonSvgPenAndPaper-BDK_ucTG.js → NonSvgPenAndPaper-C7QqIewT.js} +3 -3
- package/dist/{PackageVersion-C9oklnuy.js → PackageVersion-BfykJm_B.js} +1 -1
- package/dist/{PenAndPaper-BxbYiPy4.js → PenAndPaper-Bo-lMUik.js} +3 -3
- package/dist/{Shape-DJG2zW7b.js → Shape-BceHSLHf.js} +1 -1
- package/dist/{Slicer-D6T4aUhr.js → Slicer-Znzt0gSE.js} +2 -2
- package/dist/{SparkTooltip-Cp0G9giW.js → SparkTooltip--YwqrrgZ.js} +1 -1
- package/dist/{Title-D17CJXko.js → Title-Camz1Lce.js} +1 -1
- package/dist/{Tooltip-CtVdvbZi.js → Tooltip-VOcQEHa4.js} +1 -1
- package/dist/{UserOptions-B3vCIe-u.js → UserOptions-CSja1SGU.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-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-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-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-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-BiyqJA3t.js → dom-to-png-DxyZSvDx.js} +1 -1
- package/dist/{img-6wPuVVtk.js → img-J2dLIr8Y.js} +1 -1
- package/dist/{lib-GIYcnm0E.js → lib-CEjkWSLj.js} +376 -374
- package/dist/{pdf-DjbHsnrb.js → pdf-anN8VbM7.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useAutoSizeLabelsInsideViewbox-Csv3pVmh.js → useAutoSizeLabelsInsideViewbox-CovTrBjm.js} +1 -1
- package/dist/{useNestedProp-mxyyqd0B.js → useNestedProp-Ce3PwN8T.js} +1 -1
- package/dist/{usePrinter-DYRFiw7X.js → usePrinter-DJ1iH-F_.js} +2 -2
- package/dist/useSvgExport-DrjCWun4.js +750 -0
- package/dist/{vue-data-ui-DLU1snC3.js → vue-data-ui-j8Dnx_Ui.js} +64 -64
- package/dist/vue-data-ui.js +68 -68
- package/dist/{vue-ui-3d-bar-D6xoBrN6.js → vue-ui-3d-bar-Cml_eeEU.js} +7 -7
- package/dist/{vue-ui-accordion-Dch9YrCi.js → vue-ui-accordion-VTP418mC.js} +3 -3
- package/dist/{vue-ui-age-pyramid-D74mAaLA.js → vue-ui-age-pyramid-MULKSv5c.js} +7 -7
- package/dist/{vue-ui-annotator-DwRwhrgB.js → vue-ui-annotator-CmwDyy9m.js} +7 -7
- package/dist/{vue-ui-bullet-D2qVUqWs.js → vue-ui-bullet-BHO5zu9m.js} +8 -8
- package/dist/{vue-ui-candlestick-C81k1_f9.js → vue-ui-candlestick-B7EjAlSi.js} +8 -8
- package/dist/{vue-ui-carousel-table-DBIhnEj-.js → vue-ui-carousel-table-DXnYj0Gc.js} +4 -4
- package/dist/{vue-ui-chestnut-CSM-_IWw.js → vue-ui-chestnut-B1Usqda-.js} +6 -6
- package/dist/{vue-ui-chord-BFW9nnNh.js → vue-ui-chord-DgXH82Hg.js} +9 -9
- package/dist/{vue-ui-circle-pack-D6mTG5i0.js → vue-ui-circle-pack-BQfaZFFz.js} +7 -7
- package/dist/{vue-ui-cursor-BJmTAMpP.js → vue-ui-cursor-Dt8Zzw22.js} +2 -2
- package/dist/{vue-ui-dashboard-BdFLsK4u.js → vue-ui-dashboard-C6xHAPp8.js} +67 -67
- package/dist/{vue-ui-digits-DXum1rs6.js → vue-ui-digits-nKPRJ9Vz.js} +2 -2
- package/dist/{vue-ui-donut-evolution-DFIbK50s.js → vue-ui-donut-evolution-D_CKlaay.js} +9 -9
- package/dist/{vue-ui-donut-CqefukGp.js → vue-ui-donut-swJu7UL2.js} +9 -9
- package/dist/{vue-ui-dumbbell-DIo2ecGY.js → vue-ui-dumbbell-siD31WFG.js} +8 -8
- package/dist/{vue-ui-flow--kiGWaq4.js → vue-ui-flow-BZCnqIs-.js} +8 -8
- package/dist/{vue-ui-funnel-B8UHwj15.js → vue-ui-funnel-DmgcIRzW.js} +7 -7
- package/dist/{vue-ui-galaxy-eQZh_y3l.js → vue-ui-galaxy-C-zegxf9.js} +8 -8
- package/dist/{vue-ui-gauge-DJ-E6L2T.js → vue-ui-gauge-D6C8eUvP.js} +8 -8
- package/dist/{vue-ui-gizmo-DFxlqPz7.js → vue-ui-gizmo-iSYUVKlt.js} +3 -3
- package/dist/{vue-ui-heatmap-CcAe5dDN.js → vue-ui-heatmap-RHDxexNf.js} +84 -84
- package/dist/{vue-ui-history-plot-CgKvd7Jx.js → vue-ui-history-plot-4nwAd1qA.js} +8 -8
- package/dist/{vue-ui-kpi-Ct2iyD49.js → vue-ui-kpi-Dphnwumo.js} +3 -3
- package/dist/{vue-ui-mini-loader-ByjcvXBB.js → vue-ui-mini-loader-DFk9GZ5V.js} +2 -2
- package/dist/{vue-ui-molecule-CGDBEAkX.js → vue-ui-molecule-BhisFSGQ.js} +6 -6
- package/dist/{vue-ui-mood-radar-D9GuK4cI.js → vue-ui-mood-radar-B8yHPdrV.js} +8 -8
- package/dist/{vue-ui-nested-donuts-CGKgOTX2.js → vue-ui-nested-donuts-Bfp0oVSK.js} +8 -8
- package/dist/{vue-ui-onion-C5tE1Woz.js → vue-ui-onion-f1B0W_oT.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-CVhD6IoH.js → vue-ui-parallel-coordinate-plot-DcY-0R-7.js} +9 -9
- package/dist/{vue-ui-quadrant-BGDCaOXv.js → vue-ui-quadrant-DuzopA33.js} +9 -9
- package/dist/{vue-ui-quick-chart-CjXSB-2S.js → vue-ui-quick-chart-45Tm1UnC.js} +7 -7
- package/dist/{vue-ui-radar-rhxkROX7.js → vue-ui-radar-DDS405TF.js} +9 -9
- package/dist/{vue-ui-rating-Bo9gSy-z.js → vue-ui-rating-eKlTJch9.js} +2 -2
- package/dist/{vue-ui-relation-circle-Qo8FKbL2.js → vue-ui-relation-circle-BqXHJEvi.js} +8 -8
- package/dist/{vue-ui-ridgeline-ahOApbEC.js → vue-ui-ridgeline-Lx7YOCRg.js} +9 -9
- package/dist/{vue-ui-rings-DFAVaEBs.js → vue-ui-rings-crjrV65X.js} +9 -9
- package/dist/{vue-ui-scatter-zjlWyvVd.js → vue-ui-scatter-Bk4liS2c.js} +9 -9
- package/dist/{vue-ui-skeleton-CKfOnyd_.js → vue-ui-skeleton-Pu9gPf97.js} +3 -3
- package/dist/{vue-ui-smiley-CY7UiJ9C.js → vue-ui-smiley-C4mhT7ZV.js} +2 -2
- package/dist/{vue-ui-spark-trend-DwNYP97M.js → vue-ui-spark-trend-BmaybxJn.js} +3 -3
- package/dist/{vue-ui-sparkbar-BkdcYrmg.js → vue-ui-sparkbar-DvhcXniz.js} +3 -3
- package/dist/{vue-ui-sparkgauge-C6Kq_OGV.js → vue-ui-sparkgauge-D4Brfset.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CjB33yXB.js → vue-ui-sparkhistogram-D5_lR__d.js} +4 -4
- package/dist/{vue-ui-sparkline-DcH4yIEd.js → vue-ui-sparkline-DxNG5QQg.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-MKr2u_pO.js → vue-ui-sparkstackbar-BTFzo3fq.js} +3 -3
- package/dist/{vue-ui-stackbar-DKV-exfd.js → vue-ui-stackbar-B8glHsE6.js} +10 -10
- package/dist/{vue-ui-strip-plot-ncTrDlNC.js → vue-ui-strip-plot-C5Bro8-W.js} +8 -8
- package/dist/{vue-ui-table-BdT3lGuv.js → vue-ui-table-Ddu9yx2S.js} +5 -5
- package/dist/{vue-ui-table-heatmap-D929cWB0.js → vue-ui-table-heatmap-J29d8nds.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CkZ_ygR1.js → vue-ui-table-sparkline-D3tgrV_k.js} +4 -4
- package/dist/{vue-ui-thermometer-CjBLR6H9.js → vue-ui-thermometer-BxQIZoXd.js} +8 -8
- package/dist/{vue-ui-timer-Bs7eMmiC.js → vue-ui-timer-BwFlr_19.js} +5 -5
- package/dist/{vue-ui-tiremarks-nGOZKRcz.js → vue-ui-tiremarks-KwISwJS6.js} +7 -7
- package/dist/{vue-ui-treemap-SQ2f5wbN.js → vue-ui-treemap-C6PLDL2Y.js} +10 -10
- package/dist/{vue-ui-vertical-bar-Hh9gAN5j.js → vue-ui-vertical-bar-CTmRo06n.js} +10 -10
- package/dist/{vue-ui-waffle-C7moVBln.js → vue-ui-waffle-BwOLL9aa.js} +9 -9
- package/dist/{vue-ui-wheel-KrGLMCqW.js → vue-ui-wheel-KI9mkz8y.js} +7 -7
- package/dist/{vue-ui-word-cloud-BQSu6kiR.js → vue-ui-word-cloud-DTyjx6X4.js} +7 -7
- package/dist/{vue-ui-world-DdoMFJcV.js → vue-ui-world-C3QXAlC7.js} +7 -7
- package/dist/{vue-ui-xy-B2fjTYMJ.js → vue-ui-xy-b-CN-G4J.js} +10 -10
- package/dist/{vue-ui-xy-canvas-oUXISeU8.js → vue-ui-xy-canvas-CdkE1NHd.js} +10 -10
- package/package.json +1 -1
- package/dist/useSvgExport-B7-Vrjtu.js +0 -732
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { unref as J, isRef as tt, toRaw as ut } from "vue";
|
|
2
|
-
const lt = "#COMP# dataset prop is either missing, undefined or empty.", ft = "#COMP# dataset is missing the '#ATTR#' attribute.", ht = "#COMP# dataset '#ATTR#' attribute cannot be empty.", Ft = "#COMP# dataset #KEY# item at index #INDX# is missing the '#ATTR#' attribute.",
|
|
2
|
+
const lt = "#COMP# dataset prop is either missing, undefined or empty.", ft = "#COMP# dataset is missing the '#ATTR#' attribute.", ht = "#COMP# dataset '#ATTR#' attribute cannot be empty.", Ft = "#COMP# dataset #KEY# item at index #INDX# is missing the '#ATTR#' attribute.", gt = "#COMP# : Chart could not be built. Dataset is not formatted correctly", Et = "#COMP# : A wrong value was provided to the #ATTR# attribute (#KEY# is not a valid value).", dt = {
|
|
3
3
|
dataset: lt,
|
|
4
4
|
datasetAttribute: ft,
|
|
5
5
|
datasetAttributeEmpty: ht,
|
|
6
6
|
datasetSerieAttribute: Ft,
|
|
7
|
-
notBuildable:
|
|
8
|
-
attributeWrongValue:
|
|
7
|
+
notBuildable: gt,
|
|
8
|
+
attributeWrongValue: Et
|
|
9
9
|
};
|
|
10
|
-
function Pt(t, n, e,
|
|
10
|
+
function Pt(t, n, e, o, r, s = 1.99999, c = 2, i = 1.45, u = 360, l = 105.25, a = 0) {
|
|
11
11
|
const { series: f } = t;
|
|
12
12
|
if (!f || f.length === 0)
|
|
13
13
|
return [];
|
|
14
14
|
const h = f.reduce((d, A) => d + A.value, 0), F = [];
|
|
15
|
-
let
|
|
15
|
+
let g = 0;
|
|
16
16
|
for (let d = 0; d < f.length; d++) {
|
|
17
|
-
const A = f[d].value, D = f.length === 1, M = D ? 1 : h > 0 ? A / h : 0, $ = M * (Math.PI *
|
|
17
|
+
const A = f[d].value, D = f.length === 1, M = D ? 1 : h > 0 ? A / h : 0, $ = M * (Math.PI * s), O = (D ? 0.5 : h > 0 ? A / 2 / h : 0.5) * (Math.PI * c), { startX: N, startY: y, endX: b, endY: m, path: C } = Z(
|
|
18
18
|
[n, e],
|
|
19
|
-
[
|
|
20
|
-
[
|
|
19
|
+
[o, r],
|
|
20
|
+
[g, $],
|
|
21
21
|
l,
|
|
22
22
|
u,
|
|
23
23
|
c
|
|
24
|
-
),
|
|
24
|
+
), E = Z(
|
|
25
25
|
[n, e],
|
|
26
|
-
[
|
|
27
|
-
[
|
|
26
|
+
[o - a, r - a],
|
|
27
|
+
[g, $],
|
|
28
28
|
l,
|
|
29
29
|
u,
|
|
30
30
|
c,
|
|
31
31
|
!0
|
|
32
32
|
), B = Z(
|
|
33
33
|
[n, e],
|
|
34
|
-
[
|
|
35
|
-
[
|
|
34
|
+
[o * i, r * i],
|
|
35
|
+
[g, O],
|
|
36
36
|
l,
|
|
37
37
|
u,
|
|
38
38
|
c
|
|
39
39
|
);
|
|
40
40
|
F.push({
|
|
41
|
-
arcSlice: `${C} L ${
|
|
41
|
+
arcSlice: `${C} L ${E.startX} ${E.startY} ${E.path} L ${N} ${y}`,
|
|
42
42
|
cx: p(n),
|
|
43
43
|
cy: p(e),
|
|
44
44
|
...f[d],
|
|
@@ -50,23 +50,23 @@ function Pt(t, n, e, s, r, o = 1.99999, c = 2, i = 1.45, u = 360, l = 105.25, a
|
|
|
50
50
|
endX: p(b),
|
|
51
51
|
endY: p(m),
|
|
52
52
|
separator: {
|
|
53
|
-
x:
|
|
54
|
-
y:
|
|
53
|
+
x: E.startX,
|
|
54
|
+
y: E.startY
|
|
55
55
|
},
|
|
56
56
|
firstSeparator: {
|
|
57
|
-
x: Number(
|
|
58
|
-
y: Number(
|
|
57
|
+
x: Number(E.path.split(" ").at(-2)),
|
|
58
|
+
y: Number(E.path.split(" ").at(-1))
|
|
59
59
|
},
|
|
60
60
|
center: B
|
|
61
|
-
}),
|
|
61
|
+
}), g += $;
|
|
62
62
|
}
|
|
63
63
|
return F;
|
|
64
64
|
}
|
|
65
|
-
function nt([t, n], [e,
|
|
66
|
-
return [t + e, n +
|
|
65
|
+
function nt([t, n], [e, o]) {
|
|
66
|
+
return [t + e, n + o];
|
|
67
67
|
}
|
|
68
|
-
function et([[t, n], [e,
|
|
69
|
-
return [t * r + n *
|
|
68
|
+
function et([[t, n], [e, o]], [r, s]) {
|
|
69
|
+
return [t * r + n * s, e * r + o * s];
|
|
70
70
|
}
|
|
71
71
|
function pt(t) {
|
|
72
72
|
return [
|
|
@@ -74,51 +74,51 @@ function pt(t) {
|
|
|
74
74
|
[Math.sin(t), Math.cos(t)]
|
|
75
75
|
];
|
|
76
76
|
}
|
|
77
|
-
function Z([t, n], [e,
|
|
78
|
-
|
|
77
|
+
function Z([t, n], [e, o], [r, s], c, i = 360, u = 2, l = !1) {
|
|
78
|
+
s = s % (u * Math.PI);
|
|
79
79
|
const a = pt(c), [f, h] = nt(
|
|
80
80
|
et(a, [
|
|
81
81
|
e * Math.cos(r),
|
|
82
|
-
|
|
82
|
+
o * Math.sin(r)
|
|
83
83
|
]),
|
|
84
84
|
[t, n]
|
|
85
|
-
), [F,
|
|
85
|
+
), [F, g] = nt(
|
|
86
86
|
et(a, [
|
|
87
|
-
e * Math.cos(r +
|
|
88
|
-
|
|
87
|
+
e * Math.cos(r + s),
|
|
88
|
+
o * Math.sin(r + s)
|
|
89
89
|
]),
|
|
90
90
|
[t, n]
|
|
91
|
-
), d =
|
|
91
|
+
), d = s > Math.PI ? 1 : 0, A = s > 0 ? l ? 0 : 1 : l ? 1 : 0;
|
|
92
92
|
return {
|
|
93
93
|
startX: p(l ? F : f),
|
|
94
|
-
startY: p(l ?
|
|
94
|
+
startY: p(l ? g : h),
|
|
95
95
|
endX: p(l ? f : F),
|
|
96
|
-
endY: p(l ? h :
|
|
97
|
-
path: `M${p(l ? F : f)} ${p(l ?
|
|
96
|
+
endY: p(l ? h : g),
|
|
97
|
+
path: `M${p(l ? F : f)} ${p(l ? g : h)} A ${[
|
|
98
98
|
p(e),
|
|
99
|
-
p(
|
|
99
|
+
p(o),
|
|
100
100
|
p(c / (u * Math.PI) * i),
|
|
101
101
|
p(d),
|
|
102
102
|
p(A),
|
|
103
103
|
p(l ? f : F),
|
|
104
|
-
p(l ? h :
|
|
104
|
+
p(l ? h : g)
|
|
105
105
|
].join(" ")}`
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
function At({ defaultConfig: t, userConfig: n }) {
|
|
109
109
|
const e = { ...t };
|
|
110
|
-
return Object.keys(e).forEach((
|
|
111
|
-
if (Object.hasOwn(n,
|
|
112
|
-
const r = n[
|
|
113
|
-
r === null ? e[
|
|
114
|
-
defaultConfig: e[
|
|
110
|
+
return Object.keys(e).forEach((o) => {
|
|
111
|
+
if (Object.hasOwn(n, o)) {
|
|
112
|
+
const r = n[o];
|
|
113
|
+
r === null ? e[o] = null : ["boolean", "function"].includes(typeof r) ? e[o] = r : ["string", "number"].includes(typeof r) ? ct(r) && (e[o] = r) : Array.isArray(e[o]) ? yt({ userConfig: n, key: o }) && (e[o] = r) : xt({ userConfig: n, key: o }) && (e[o] = At({
|
|
114
|
+
defaultConfig: e[o],
|
|
115
115
|
userConfig: r
|
|
116
116
|
}));
|
|
117
117
|
}
|
|
118
|
-
}), Object.keys(n).forEach((
|
|
119
|
-
if (!Object.hasOwn(e,
|
|
120
|
-
const r = n[
|
|
121
|
-
e[
|
|
118
|
+
}), Object.keys(n).forEach((o) => {
|
|
119
|
+
if (!Object.hasOwn(e, o)) {
|
|
120
|
+
const r = n[o];
|
|
121
|
+
e[o] = r && typeof r == "object" && !Array.isArray(r) ? { ...r } : r;
|
|
122
122
|
}
|
|
123
123
|
}), e;
|
|
124
124
|
}
|
|
@@ -364,7 +364,7 @@ const v = {
|
|
|
364
364
|
]
|
|
365
365
|
}, rt = ["00", "03", "05", "08", "0A", "0D", "0F", "12", "14", "17", "1A", "1C", "1F", "21", "24", "26", "29", "2B", "2E", "30", "33", "36", "38", "3B", "3D", "40", "42", "45", "47", "4A", "4D", "4F", "52", "54", "57", "59", "5C", "5E", "61", "63", "66", "69", "6B", "6E", "70", "73", "75", "78", "7A", "7D", "80", "82", "85", "87", "8A", "8C", "8F", "91", "94", "96", "99", "9C", "9E", "A1", "A3", "A6", "A8", "AB", "AD", "B0", "B3", "B5", "B8", "BA", "BD", "BF", "C2", "C4", "C7", "C9", "CC", "CF", "D1", "D4", "D6", "D9", "DB", "DE", "E0", "E3", "E6", "E8", "EB", "ED", "F0", "F2", "F5", "F7", "FA", "FC", "FF"];
|
|
366
366
|
function at(t) {
|
|
367
|
-
const n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i, e = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,
|
|
367
|
+
const n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i, e = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i, o = /^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)$/i, r = /^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*([\d.]+))?\)$/i;
|
|
368
368
|
if (t == null || typeof t == "number" && isNaN(t))
|
|
369
369
|
return null;
|
|
370
370
|
if (t = tt?.(t) ? J(t) : t, t = Bt(t), Array.isArray(t)) {
|
|
@@ -384,15 +384,15 @@ function at(t) {
|
|
|
384
384
|
if (t = t.trim(), t.toLowerCase() === "transparent")
|
|
385
385
|
return "#FFFFFF00";
|
|
386
386
|
t = t.replace(e, (i, u, l, a, f) => `#${u}${u}${l}${l}${a}${a}${f ? f + f : ""}`);
|
|
387
|
-
let
|
|
388
|
-
if (
|
|
389
|
-
const [, i, u, l, a] =
|
|
387
|
+
let s, c = 1;
|
|
388
|
+
if (s = t.match(n)) {
|
|
389
|
+
const [, i, u, l, a] = s;
|
|
390
390
|
return c = a ? parseInt(a, 16) / 255 : 1, `#${i}${u}${l}${G(Math.round(c * 255))}`;
|
|
391
|
-
} else if (
|
|
392
|
-
const [, i, u, l, a] =
|
|
391
|
+
} else if (s = t.match(o)) {
|
|
392
|
+
const [, i, u, l, a] = s;
|
|
393
393
|
return c = a ? parseFloat(a) : 1, `#${G(i)}${G(u)}${G(l)}${G(Math.round(c * 255))}`;
|
|
394
|
-
} else if (
|
|
395
|
-
const [, i, u, l, a] =
|
|
394
|
+
} else if (s = t.match(r)) {
|
|
395
|
+
const [, i, u, l, a] = s;
|
|
396
396
|
c = a ? parseFloat(a) : 1;
|
|
397
397
|
const [f, h, F] = bt(Number(i), Number(u), Number(l));
|
|
398
398
|
return `#${G(f)}${G(h)}${G(F)}${G(Math.round(c * 255))}`;
|
|
@@ -403,36 +403,36 @@ function G(t) {
|
|
|
403
403
|
const n = Number(t).toString(16);
|
|
404
404
|
return n.length === 1 ? "0" + n : n;
|
|
405
405
|
}
|
|
406
|
-
function bt(t, n, e,
|
|
406
|
+
function bt(t, n, e, o = 1) {
|
|
407
407
|
t /= 360, n /= 100, e /= 100;
|
|
408
|
-
let r,
|
|
408
|
+
let r, s, c;
|
|
409
409
|
if (n === 0)
|
|
410
|
-
r =
|
|
410
|
+
r = s = c = e;
|
|
411
411
|
else {
|
|
412
412
|
const i = (a, f, h) => (h < 0 && (h += 1), h > 1 && (h -= 1), h < 0.16666666666666666 ? a + (f - a) * 6 * h : h < 0.5 ? f : h < 0.6666666666666666 ? a + (f - a) * (0.6666666666666666 - h) * 6 : a), u = e < 0.5 ? e * (1 + n) : e + n - e * n, l = 2 * e - u;
|
|
413
|
-
r = i(l, u, t + 1 / 3),
|
|
413
|
+
r = i(l, u, t + 1 / 3), s = i(l, u, t), c = i(l, u, t - 1 / 3);
|
|
414
414
|
}
|
|
415
415
|
return [
|
|
416
416
|
Math.round(r * 255),
|
|
417
|
-
Math.round(
|
|
417
|
+
Math.round(s * 255),
|
|
418
418
|
Math.round(c * 255),
|
|
419
|
-
|
|
419
|
+
o
|
|
420
420
|
];
|
|
421
421
|
}
|
|
422
422
|
function Ut(t, n) {
|
|
423
|
-
const e = t.length === 9 ? t.substring(0, 7) : t,
|
|
423
|
+
const e = t.length === 9 ? t.substring(0, 7) : t, o = t.length === 9 ? t.substring(7, 9) : null, r = (f) => ({
|
|
424
424
|
r: parseInt(f.substring(1, 3), 16),
|
|
425
425
|
g: parseInt(f.substring(3, 5), 16),
|
|
426
426
|
b: parseInt(f.substring(5, 7), 16)
|
|
427
|
-
}),
|
|
427
|
+
}), s = ({ r: f, g: h, b: F }) => {
|
|
428
428
|
f /= 255, h /= 255, F /= 255;
|
|
429
|
-
const
|
|
430
|
-
let A, D, M = (
|
|
431
|
-
if (
|
|
429
|
+
const g = Math.max(f, h, F), d = Math.min(f, h, F);
|
|
430
|
+
let A, D, M = (g + d) / 2;
|
|
431
|
+
if (g === d)
|
|
432
432
|
A = D = 0;
|
|
433
433
|
else {
|
|
434
|
-
const $ =
|
|
435
|
-
switch (D = M > 0.5 ? $ / (2 -
|
|
434
|
+
const $ = g - d;
|
|
435
|
+
switch (D = M > 0.5 ? $ / (2 - g - d) : $ / (g + d), g) {
|
|
436
436
|
case f:
|
|
437
437
|
A = (h - F) / $ + (h < F ? 6 : 0);
|
|
438
438
|
break;
|
|
@@ -447,35 +447,35 @@ function Ut(t, n) {
|
|
|
447
447
|
}
|
|
448
448
|
return { h: A, s: D, l: M };
|
|
449
449
|
}, c = ({ h: f, s: h, l: F }) => {
|
|
450
|
-
let
|
|
450
|
+
let g, d, A;
|
|
451
451
|
if (h === 0)
|
|
452
|
-
|
|
452
|
+
g = d = A = F;
|
|
453
453
|
else {
|
|
454
454
|
const D = (I, O, N) => (N < 0 && (N += 1), N > 1 && (N -= 1), N < 0.16666666666666666 ? I + (O - I) * 6 * N : N < 0.5 ? O : N < 0.6666666666666666 ? I + (O - I) * (0.6666666666666666 - N) * 6 : I), M = F < 0.5 ? F * (1 + h) : F + h - F * h, $ = 2 * F - M;
|
|
455
|
-
|
|
455
|
+
g = D($, M, f + 1 / 3), d = D($, M, f), A = D($, M, f - 1 / 3);
|
|
456
456
|
}
|
|
457
457
|
return {
|
|
458
|
-
r: Math.round(
|
|
458
|
+
r: Math.round(g * 255),
|
|
459
459
|
g: Math.round(d * 255),
|
|
460
460
|
b: Math.round(A * 255)
|
|
461
461
|
};
|
|
462
|
-
}, i = r(e || "#000000"), u =
|
|
462
|
+
}, i = r(e || "#000000"), u = s(i);
|
|
463
463
|
u.h += n, u.h = (u.h + 1) % 1;
|
|
464
464
|
const l = c(u);
|
|
465
|
-
return `#${(l.r << 16 | l.g << 8 | l.b).toString(16).padStart(6, "0")}` + (
|
|
465
|
+
return `#${(l.r << 16 | l.g << 8 | l.b).toString(16).padStart(6, "0")}` + (o || "");
|
|
466
466
|
}
|
|
467
467
|
function Ct({
|
|
468
468
|
centerX: t,
|
|
469
469
|
centerY: n,
|
|
470
470
|
outerPoints: e,
|
|
471
|
-
radius:
|
|
471
|
+
radius: o,
|
|
472
472
|
rotation: r
|
|
473
473
|
}) {
|
|
474
|
-
const
|
|
474
|
+
const s = Math.PI / e, c = r;
|
|
475
475
|
let i = "";
|
|
476
476
|
const u = [];
|
|
477
477
|
for (let l = 0; l < e * 2; l += 1) {
|
|
478
|
-
let a = t + Math.cos(l *
|
|
478
|
+
let a = t + Math.cos(l * s + c) * o, f = n + Math.sin(l * s + c) * o;
|
|
479
479
|
i += `${a},${f} `, u.push({ x: a, y: f });
|
|
480
480
|
}
|
|
481
481
|
return {
|
|
@@ -487,28 +487,28 @@ function Gt({
|
|
|
487
487
|
plot: t,
|
|
488
488
|
radius: n,
|
|
489
489
|
sides: e,
|
|
490
|
-
rotation:
|
|
490
|
+
rotation: o = 0
|
|
491
491
|
}) {
|
|
492
|
-
const r = t.x,
|
|
492
|
+
const r = t.x, s = t.y, c = e / 2;
|
|
493
493
|
return Ct({
|
|
494
494
|
centerX: r,
|
|
495
|
-
centerY:
|
|
495
|
+
centerY: s,
|
|
496
496
|
outerPoints: c,
|
|
497
497
|
radius: n + 1,
|
|
498
|
-
rotation:
|
|
498
|
+
rotation: o
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
501
|
function Mt({
|
|
502
502
|
centerX: t,
|
|
503
503
|
centerY: n,
|
|
504
504
|
innerCirclePoints: e,
|
|
505
|
-
innerRadius:
|
|
505
|
+
innerRadius: o,
|
|
506
506
|
outerRadius: r
|
|
507
507
|
}) {
|
|
508
|
-
const
|
|
508
|
+
const s = Math.PI / e, c = 60, i = e * 2;
|
|
509
509
|
let u = "";
|
|
510
510
|
for (let l = 0; l < i; l += 1) {
|
|
511
|
-
let f = l % 2 == 0 ? r :
|
|
511
|
+
let f = l % 2 == 0 ? r : o, h = t + Math.cos(l * s + c) * f, F = n + Math.sin(l * s + c) * f;
|
|
512
512
|
u += `${h},${F} `;
|
|
513
513
|
}
|
|
514
514
|
return u;
|
|
@@ -518,11 +518,11 @@ function vt({
|
|
|
518
518
|
radius: n,
|
|
519
519
|
apexes: e = 5
|
|
520
520
|
}) {
|
|
521
|
-
const
|
|
521
|
+
const o = t.x, r = t.y, s = e, c = n * 3.5 / s, u = c * 2;
|
|
522
522
|
return Mt({
|
|
523
|
-
centerX:
|
|
523
|
+
centerX: o,
|
|
524
524
|
centerY: r,
|
|
525
|
-
innerCirclePoints:
|
|
525
|
+
innerCirclePoints: s,
|
|
526
526
|
innerRadius: c,
|
|
527
527
|
outerRadius: u
|
|
528
528
|
});
|
|
@@ -539,11 +539,11 @@ function Xt({ series: t }) {
|
|
|
539
539
|
const e = (a, f) => {
|
|
540
540
|
const h = a.x - f.x, F = a.y - f.y;
|
|
541
541
|
return h * h + F * F;
|
|
542
|
-
},
|
|
542
|
+
}, o = (a, f, h) => (f.x - a.x) * (h.y - a.y) - (f.y - a.y) * (h.x - a.x);
|
|
543
543
|
let r = n[0];
|
|
544
544
|
for (const a of n)
|
|
545
545
|
(a.x < r.x || a.x === r.x && a.y < r.y) && (r = a);
|
|
546
|
-
const
|
|
546
|
+
const s = [r];
|
|
547
547
|
let c = r;
|
|
548
548
|
const i = n.length + 2;
|
|
549
549
|
let u = 0;
|
|
@@ -551,14 +551,14 @@ function Xt({ series: t }) {
|
|
|
551
551
|
let a = n[0] === c ? n[1] : n[0];
|
|
552
552
|
for (const f of n) {
|
|
553
553
|
if (f === c || f === a) continue;
|
|
554
|
-
const h =
|
|
554
|
+
const h = o(c, a, f);
|
|
555
555
|
h < 0 || (h > 0 || e(c, f) > e(c, a)) && (a = f);
|
|
556
556
|
}
|
|
557
557
|
if (a === r) break;
|
|
558
|
-
|
|
558
|
+
s.push(a), c = a;
|
|
559
559
|
}
|
|
560
560
|
let l = "";
|
|
561
|
-
for (const a of
|
|
561
|
+
for (const a of s)
|
|
562
562
|
l += `${Math.round(a.x)},${Math.round(a.y)} `;
|
|
563
563
|
return l;
|
|
564
564
|
}
|
|
@@ -576,7 +576,7 @@ function jt(t) {
|
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
n.charAt(0) !== "#" && (n = this.rgbToHex(t)), n = n.substring(1, 7);
|
|
579
|
-
let
|
|
579
|
+
let o = parseInt(n.substring(0, 2), 16), r = parseInt(n.substring(2, 4), 16), s = parseInt(n.substring(4, 6), 16), i = [o / 255, r / 255, s / 255].map((l) => l <= 0.03928 ? l / 12.92 : Math.pow((l + 0.055) / 1.055, 2.4)), u = 0.2126 * i[0] + 0.7152 * i[1] + 0.0722 * i[2];
|
|
580
580
|
return e < 1 ? e * u + (1 - e) * 1 > 0.3 ? "#000000" : "#FFFFFF" : u > 0.3 ? "#000000" : "#FFFFFF";
|
|
581
581
|
}
|
|
582
582
|
return "#000000";
|
|
@@ -594,19 +594,19 @@ function q(t, n = /* @__PURE__ */ new WeakSet()) {
|
|
|
594
594
|
const e = ut(t);
|
|
595
595
|
if (!W(e) || n.has(e)) return e;
|
|
596
596
|
n.add(e);
|
|
597
|
-
for (const
|
|
598
|
-
const r = tt(e[
|
|
599
|
-
if (
|
|
600
|
-
typeof r == "string" && (e[
|
|
597
|
+
for (const o in e) {
|
|
598
|
+
const r = tt(e[o]) ? J(e[o]) : e[o];
|
|
599
|
+
if (o === "color" || o === "backgroundColor") {
|
|
600
|
+
typeof r == "string" && (e[o] = st(r));
|
|
601
601
|
continue;
|
|
602
602
|
}
|
|
603
|
-
if (
|
|
604
|
-
typeof r == "string" ? e[
|
|
603
|
+
if (o === "stroke") {
|
|
604
|
+
typeof r == "string" ? e[o] = st(r) : W(r) && !Q(r) && q(r, n);
|
|
605
605
|
continue;
|
|
606
606
|
}
|
|
607
607
|
if (Array.isArray(r)) {
|
|
608
|
-
for (const
|
|
609
|
-
W(
|
|
608
|
+
for (const s of r)
|
|
609
|
+
W(s) && !Q(s) && q(s, n);
|
|
610
610
|
continue;
|
|
611
611
|
}
|
|
612
612
|
W(r) && !Q(r) && q(r, n);
|
|
@@ -616,18 +616,18 @@ function q(t, n = /* @__PURE__ */ new WeakSet()) {
|
|
|
616
616
|
function Wt(t) {
|
|
617
617
|
const n = t?.length ?? 0;
|
|
618
618
|
if (n < 2) return { x1: 0, y1: 0, x2: 0, y2: 0, slope: 0, trend: 0 };
|
|
619
|
-
let e = 0,
|
|
619
|
+
let e = 0, o = 0, r = 0, s = 0;
|
|
620
620
|
for (const { x: m, y: C } of t)
|
|
621
|
-
e += m,
|
|
622
|
-
const c = n *
|
|
623
|
-
let F = 0,
|
|
621
|
+
e += m, o += C, r += m * C, s += m * m;
|
|
622
|
+
const c = n * s - e * e || 1, i = (n * r - e * o) / c, u = (o - i * e) / n, l = t[0].x, a = t[n - 1].x, f = i * l + u, h = i * a + u;
|
|
623
|
+
let F = 0, g = 0, d = 0, A = 0;
|
|
624
624
|
for (let m = 0; m < n; m += 1)
|
|
625
|
-
F += m,
|
|
626
|
-
const D = n * A - F * F || 1, M = (n * d - F *
|
|
625
|
+
F += m, g += t[m].value, d += m * t[m].value, A += m * m;
|
|
626
|
+
const D = n * A - F * F || 1, M = (n * d - F * g) / D, $ = (g - M * F) / n, I = $, O = M * (n - 1) + $, y = Math.max(Math.abs(I), Math.abs(g / n), Math.abs(O), 1e-9), b = (O - I) / y;
|
|
627
627
|
return { x1: l, y1: f, x2: a, y2: h, slope: i, trend: b };
|
|
628
628
|
}
|
|
629
629
|
function Kt(t) {
|
|
630
|
-
const n = Math.floor(t.length / 2), e = [...t].sort((
|
|
630
|
+
const n = Math.floor(t.length / 2), e = [...t].sort((o, r) => o - r);
|
|
631
631
|
return t.length % 2 !== 0 ? e[n] : (e[n - 1] + e[n]) / 2;
|
|
632
632
|
}
|
|
633
633
|
function Vt(t) {
|
|
@@ -638,20 +638,20 @@ function Vt(t) {
|
|
|
638
638
|
}
|
|
639
639
|
function zt(t) {
|
|
640
640
|
if (t.length < 2) return "0,0";
|
|
641
|
-
const n = t.length - 1, e = [`${p(t[0].x)},${p(t[0].y)}`],
|
|
641
|
+
const n = t.length - 1, e = [`${p(t[0].x)},${p(t[0].y)}`], o = [], r = [], s = [], c = [];
|
|
642
642
|
for (let i = 0; i < n; i += 1)
|
|
643
|
-
|
|
644
|
-
c[0] =
|
|
643
|
+
o[i] = t[i + 1].x - t[i].x, r[i] = t[i + 1].y - t[i].y, s[i] = r[i] / o[i];
|
|
644
|
+
c[0] = s[0], c[n] = s[n - 1];
|
|
645
645
|
for (let i = 1; i < n; i += 1)
|
|
646
|
-
if (
|
|
646
|
+
if (s[i - 1] * s[i] <= 0)
|
|
647
647
|
c[i] = 0;
|
|
648
648
|
else {
|
|
649
|
-
const u = 2 *
|
|
649
|
+
const u = 2 * s[i - 1] * s[i] / (s[i - 1] + s[i]);
|
|
650
650
|
c[i] = u;
|
|
651
651
|
}
|
|
652
652
|
for (let i = 0; i < n; i += 1) {
|
|
653
|
-
const u = t[i].x, l = t[i].y, a = t[i + 1].x, f = t[i + 1].y, h = c[i], F = c[i + 1],
|
|
654
|
-
e.push(`C ${p(
|
|
653
|
+
const u = t[i].x, l = t[i].y, a = t[i + 1].x, f = t[i + 1].y, h = c[i], F = c[i + 1], g = u + (a - u) / 3, d = l + h * (a - u) / 3, A = a - (a - u) / 3, D = f - F * (a - u) / 3;
|
|
654
|
+
e.push(`C ${p(g)},${p(d)} ${p(A)},${p(D)} ${p(a)},${p(f)}`);
|
|
655
655
|
}
|
|
656
656
|
return e.join(" ");
|
|
657
657
|
}
|
|
@@ -663,12 +663,12 @@ function _t(t, n = 0.2) {
|
|
|
663
663
|
angle: Math.atan2(l, u)
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
const h = e(i || c, u || c), F = h.angle + (l ? Math.PI : 0),
|
|
666
|
+
function o(c, i, u, l) {
|
|
667
|
+
const h = e(i || c, u || c), F = h.angle + (l ? Math.PI : 0), g = h.length * n, d = c.x + Math.cos(F) * g, A = c.y + Math.sin(F) * g;
|
|
668
668
|
return { x: d, y: A };
|
|
669
669
|
}
|
|
670
670
|
function r(c, i, u) {
|
|
671
|
-
const l =
|
|
671
|
+
const l = o(u[i - 1], u[i - 2], c), a = o(c, u[i - 1], u[i + 1], !0);
|
|
672
672
|
return `C ${p(l.x)},${p(l.y)} ${p(a.x)},${p(a.y)} ${p(c.x)},${p(c.y)}`;
|
|
673
673
|
}
|
|
674
674
|
return t.filter((c) => !!c).reduce(
|
|
@@ -682,9 +682,9 @@ function Zt() {
|
|
|
682
682
|
return (t == "x" ? n : n & 3 | 8).toString(16);
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
function K(t, n = !1, e = 16,
|
|
686
|
-
let r = 0,
|
|
687
|
-
return t.center.endX > t.cx ? (r = t.center.endX + e +
|
|
685
|
+
function K(t, n = !1, e = 16, o = !1) {
|
|
686
|
+
let r = 0, s = n ? e : 0, c = o ? "center" : "middle";
|
|
687
|
+
return t.center.endX > t.cx ? (r = t.center.endX + e + s, c = o ? "left" : "start") : t.center.endX < t.cx ? (r = t.center.endX - e - s, c = o ? "right" : "end") : (r = t.centerX + s, c = o ? "center" : "middle"), { x: r, anchor: c };
|
|
688
688
|
}
|
|
689
689
|
function V(t, n = 16, e = 16) {
|
|
690
690
|
return t.center.endY > t.cy ? t.center.endY + e : t.center.endY < t.cy ? t.center.endY - n : t.center.endY;
|
|
@@ -693,55 +693,55 @@ function Qt({
|
|
|
693
693
|
initX: t,
|
|
694
694
|
initY: n,
|
|
695
695
|
offset: e,
|
|
696
|
-
centerX:
|
|
696
|
+
centerX: o,
|
|
697
697
|
centerY: r
|
|
698
698
|
}) {
|
|
699
|
-
const
|
|
699
|
+
const s = Math.atan2(n - r, t - o);
|
|
700
700
|
return {
|
|
701
|
-
x: t + e * Math.cos(
|
|
702
|
-
y: n + e * Math.sin(
|
|
701
|
+
x: t + e * Math.cos(s),
|
|
702
|
+
y: n + e * Math.sin(s)
|
|
703
703
|
};
|
|
704
704
|
}
|
|
705
705
|
function $t(t) {
|
|
706
706
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
707
707
|
n.setAttribute("d", t);
|
|
708
708
|
const e = n.getTotalLength();
|
|
709
|
-
let
|
|
709
|
+
let o = 0, r = e, s = e / 2;
|
|
710
710
|
const c = 0.01;
|
|
711
|
-
for (; r -
|
|
712
|
-
const l = (
|
|
713
|
-
if (Math.abs(f -
|
|
714
|
-
|
|
711
|
+
for (; r - o > c; ) {
|
|
712
|
+
const l = (o + r) / 2, f = n.getPointAtLength(l).x;
|
|
713
|
+
if (Math.abs(f - s) < c) {
|
|
714
|
+
s = l;
|
|
715
715
|
break;
|
|
716
|
-
} else f <
|
|
716
|
+
} else f < s ? o = l : r = l;
|
|
717
717
|
}
|
|
718
|
-
const { x: i, y: u } = n.getPointAtLength(
|
|
718
|
+
const { x: i, y: u } = n.getPointAtLength(s);
|
|
719
719
|
return { x: i, y: u };
|
|
720
720
|
}
|
|
721
|
-
function qt(t, n = !1, e = 16,
|
|
722
|
-
const { x: l } = $t(t.path), a = `${K(t).x},${V(t, e,
|
|
721
|
+
function qt(t, n = !1, e = 16, o = 16, r = !1, s = !1, c = 0, i = 12, u = !1) {
|
|
722
|
+
const { x: l } = $t(t.path), a = `${K(t).x},${V(t, e, o) - 4} `;
|
|
723
723
|
let f = "", h, F;
|
|
724
|
-
l > t.cx ? (h = K(t).x - i, F = V(t, e,
|
|
725
|
-
const
|
|
726
|
-
return u ?
|
|
724
|
+
l > t.cx ? (h = K(t).x - i, F = V(t, e, o) - 4, f = `${h},${F}`) : l < t.cx ? (h = K(t).x + i, F = V(t, e, o) - 4, f = `${h},${F}`) : (h = K(t).x + i, F = V(t, e, o) - 4, f = `${h},${F}`);
|
|
725
|
+
const g = ` ${t.center.endX},${t.center.endY}`;
|
|
726
|
+
return u ? s ? `M${f} Q${f} ${g}` : `M${a} Q${f} ${g}` : `M${s ? "" : a}${f}${g}`;
|
|
727
727
|
}
|
|
728
728
|
function Jt(t) {
|
|
729
729
|
return ![null, void 0, NaN].includes(t);
|
|
730
730
|
}
|
|
731
731
|
function tn(t, n) {
|
|
732
|
-
return [...t].map((e) => e[n]).reduce((e,
|
|
732
|
+
return [...t].map((e) => e[n]).reduce((e, o) => e + o, 0);
|
|
733
733
|
}
|
|
734
734
|
function nn(t, n = !0, e = !1) {
|
|
735
735
|
if (!t.length) return "M0,0";
|
|
736
|
-
let
|
|
736
|
+
let o = "";
|
|
737
737
|
return t.forEach((r) => {
|
|
738
738
|
if (!r) return "";
|
|
739
|
-
|
|
740
|
-
}), e ?
|
|
739
|
+
o += `${r.x},${r.y} `;
|
|
740
|
+
}), e ? o.trim() : `M${o}${n ? "Z" : ""}`;
|
|
741
741
|
}
|
|
742
742
|
function en({ csvContent: t, title: n = "vue-data-ui" }) {
|
|
743
|
-
const e = encodeURI(t),
|
|
744
|
-
|
|
743
|
+
const e = encodeURI(t), o = document.createElement("a");
|
|
744
|
+
o.setAttribute("href", e), o.setAttribute("download", `${n}.csv`), document.body.appendChild(o), o.click(), o.remove(), window.URL.revokeObjectURL(e);
|
|
745
745
|
}
|
|
746
746
|
function rn(t) {
|
|
747
747
|
return `data:text/csv;charset=utf-8,${t.map((n) => n.join(",")).join(`
|
|
@@ -752,7 +752,7 @@ function sn(t, n) {
|
|
|
752
752
|
return console.warn("lightenHexColor : Invalid hex color format"), "#000000";
|
|
753
753
|
let e = t.replace("#", "");
|
|
754
754
|
e.length === 3 && (e = e.split("").map((a) => a + a).join(""));
|
|
755
|
-
const
|
|
755
|
+
const o = parseInt(e.substring(0, 2), 16), r = parseInt(e.substring(2, 4), 16), s = parseInt(e.substring(4, 6), 16), c = Math.min(255, o + (255 - o) * n), i = Math.min(255, r + (255 - r) * n), u = Math.min(255, s + (255 - s) * n), l = `#${Math.round(c).toString(16).padStart(2, "0")}${Math.round(i).toString(16).padStart(2, "0")}${Math.round(u).toString(16).padStart(2, "0")}`;
|
|
756
756
|
if (e.length === 8) {
|
|
757
757
|
const a = e.substring(6, 8);
|
|
758
758
|
return l + a;
|
|
@@ -764,7 +764,7 @@ function on(t, n) {
|
|
|
764
764
|
return console.warn("darkenHexColor: Invalid hex color format"), "#000000";
|
|
765
765
|
let e = t.replace("#", "");
|
|
766
766
|
e.length === 3 && (e = e.split("").map((a) => a + a).join(""));
|
|
767
|
-
const
|
|
767
|
+
const o = parseInt(e.substring(0, 2), 16), r = parseInt(e.substring(2, 4), 16), s = parseInt(e.substring(4, 6), 16), c = Math.max(0, o - o * n), i = Math.max(0, r - r * n), u = Math.max(0, s - s * n), l = `#${Math.round(c).toString(16).padStart(2, "0")}${Math.round(i).toString(16).padStart(2, "0")}${Math.round(u).toString(16).padStart(2, "0")}`;
|
|
768
768
|
if (e.length === 8) {
|
|
769
769
|
const a = e.substring(6, 8);
|
|
770
770
|
return l + a;
|
|
@@ -772,56 +772,56 @@ function on(t, n) {
|
|
|
772
772
|
return l;
|
|
773
773
|
}
|
|
774
774
|
function _(t, n) {
|
|
775
|
-
const e = Math.floor(Math.log10(t)),
|
|
775
|
+
const e = Math.floor(Math.log10(t)), o = t / Math.pow(10, e);
|
|
776
776
|
let r;
|
|
777
|
-
return n ?
|
|
777
|
+
return n ? o < 1.5 ? r = 1 : o < 3 ? r = 2 : o < 7 ? r = 5 : r = 10 : o <= 1 ? r = 1 : o <= 2 ? r = 2 : o <= 5 ? r = 5 : r = 10, r * Math.pow(10, e);
|
|
778
778
|
}
|
|
779
|
-
function cn(t, n, e,
|
|
780
|
-
const r =
|
|
781
|
-
for (let l = c; l <= i; l +=
|
|
779
|
+
function cn(t, n, e, o = !1) {
|
|
780
|
+
const r = o ? n - t : _(n - t, !1), s = o ? r / (e - 1) : _(r / (e - 1), !0), c = Math.floor(t / s) * s, i = Math.ceil(n / s) * s, u = [];
|
|
781
|
+
for (let l = c; l <= i; l += s)
|
|
782
782
|
u.push(l);
|
|
783
783
|
return {
|
|
784
784
|
min: c,
|
|
785
785
|
max: i,
|
|
786
|
-
tickSize:
|
|
786
|
+
tickSize: s,
|
|
787
787
|
ticks: u
|
|
788
788
|
};
|
|
789
789
|
}
|
|
790
|
-
function an(t, n, e,
|
|
791
|
-
const r =
|
|
790
|
+
function an(t, n, e, o = !1) {
|
|
791
|
+
const r = o ? n - t : _(n - t, !1), s = o ? r / (e - 1) : _(r / (e - 1), !0), c = Math.floor(t / s) * s, i = Math.ceil(n / s) * s;
|
|
792
792
|
let u = [], l = c;
|
|
793
793
|
for (; l <= i; )
|
|
794
|
-
l >= t && l <= n && u.push(l), l +=
|
|
794
|
+
l >= t && l <= n && u.push(l), l += s;
|
|
795
795
|
return u[0] !== t && (u[0] = t), u[u.length - 1] !== n && (u[u.length - 1] = n), {
|
|
796
796
|
min: t,
|
|
797
797
|
max: n,
|
|
798
|
-
tickSize:
|
|
798
|
+
tickSize: s,
|
|
799
799
|
ticks: u
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
|
-
function un(t, n, e,
|
|
803
|
-
const
|
|
804
|
-
let F = parseInt(h.substring(1, 3), 16),
|
|
805
|
-
return h.length === 9 && (A = parseInt(h.substring(7, 9), 16) / 255), { r: F, g
|
|
806
|
-
}, c = ({ r: h, g: F, b:
|
|
807
|
-
const A = (M) => M.toString(16).padStart(2, "0"), D = `#${A(h)}${A(F)}${A(
|
|
802
|
+
function un(t, n, e, o, r) {
|
|
803
|
+
const s = (h) => {
|
|
804
|
+
let F = parseInt(h.substring(1, 3), 16), g = parseInt(h.substring(3, 5), 16), d = parseInt(h.substring(5, 7), 16), A = 1;
|
|
805
|
+
return h.length === 9 && (A = parseInt(h.substring(7, 9), 16) / 255), { r: F, g, b: d, a: A };
|
|
806
|
+
}, c = ({ r: h, g: F, b: g, a: d }) => {
|
|
807
|
+
const A = (M) => M.toString(16).padStart(2, "0"), D = `#${A(h)}${A(F)}${A(g)}`;
|
|
808
808
|
if (d !== 1) {
|
|
809
809
|
const M = Math.round(d * 255).toString(16).padStart(2, "0");
|
|
810
810
|
return D + M;
|
|
811
811
|
}
|
|
812
812
|
return D;
|
|
813
|
-
}, i =
|
|
814
|
-
r = Math.min(Math.max(r, e),
|
|
815
|
-
const l = (r - e) / (
|
|
813
|
+
}, i = s(t), u = s(n);
|
|
814
|
+
r = Math.min(Math.max(r, e), o);
|
|
815
|
+
const l = (r - e) / (o - e), a = {
|
|
816
816
|
r: Math.round(i.r + (u.r - i.r) * l),
|
|
817
817
|
g: Math.round(i.g + (u.g - i.g) * l),
|
|
818
818
|
b: Math.round(i.b + (u.b - i.b) * l)
|
|
819
819
|
}, f = i.a + (u.a - i.a) * l;
|
|
820
820
|
return c({ ...a, a: f });
|
|
821
821
|
}
|
|
822
|
-
function ln({ p: t = "", v: n, s: e = "", r:
|
|
823
|
-
const l = u ? Number(Number(n).toFixed(
|
|
824
|
-
return
|
|
822
|
+
function ln({ p: t = "", v: n, s: e = "", r: o = 0, space: r = !1, isAnimating: s = !1, regex: c = /[^%]/g, replacement: i = "-", locale: u = null }) {
|
|
823
|
+
const l = u ? Number(Number(n).toFixed(o)).toLocaleString(u) : Number(Number(n).toFixed(o)).toLocaleString(), a = l === 1 / 0 ? "∞" : l === -1 / 0 ? "-∞" : l, f = `${t ?? ""}${r ? " " : ""}${[void 0, null].includes(n) ? "-" : a}${r ? " " : ""}${e ?? ""}`;
|
|
824
|
+
return s ? f.replace(c, i) : f;
|
|
825
825
|
}
|
|
826
826
|
function fn({ source: t, length: n = 3 }) {
|
|
827
827
|
if (!t && t !== 0)
|
|
@@ -833,10 +833,10 @@ function fn({ source: t, length: n = 3 }) {
|
|
|
833
833
|
if (e.length === 1)
|
|
834
834
|
return t.slice(0, n).toUpperCase();
|
|
835
835
|
{
|
|
836
|
-
const
|
|
837
|
-
return e.forEach((r,
|
|
838
|
-
|
|
839
|
-
}),
|
|
836
|
+
const o = [];
|
|
837
|
+
return e.forEach((r, s) => {
|
|
838
|
+
s < n && o.push(r.slice(0, 1));
|
|
839
|
+
}), o.join().replaceAll(",", "").toUpperCase();
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
842
|
function hn(t) {
|
|
@@ -845,38 +845,38 @@ function hn(t) {
|
|
|
845
845
|
function Fn(t) {
|
|
846
846
|
return typeof t.apply(null, arguments) == "string";
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function gn(t) {
|
|
849
849
|
return Array.isArray(t) ? t.length === 0 : t ? Object.keys(t).length === 0 : !0;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function En({ componentName: t, type: n, property: e = "", index: o = "", key: r = "", warn: s = !0, debug: c = !0 }) {
|
|
852
852
|
if (!c) return;
|
|
853
853
|
const i = `
|
|
854
|
-
> ${dt[n].replace("#COMP#", t).replace("#ATTR#", e).replace("#INDX#",
|
|
854
|
+
> ${dt[n].replace("#COMP#", t).replace("#ATTR#", e).replace("#INDX#", o).replace("#KEY#", r)}
|
|
855
855
|
`;
|
|
856
|
-
if (
|
|
856
|
+
if (s)
|
|
857
857
|
console.warn(i);
|
|
858
858
|
else
|
|
859
859
|
throw new Error(i);
|
|
860
860
|
}
|
|
861
|
-
function Dt({ points: t, a: n, b: e, angleStep:
|
|
861
|
+
function Dt({ points: t, a: n, b: e, angleStep: o, startX: r, startY: s }) {
|
|
862
862
|
const c = [];
|
|
863
863
|
for (let i = 0; i < t; i++) {
|
|
864
|
-
const u =
|
|
864
|
+
const u = o * i, l = n + e * u, a = l * Math.cos(u) + r, f = l * Math.sin(u) + s;
|
|
865
865
|
c.push({ x: a, y: f });
|
|
866
866
|
}
|
|
867
867
|
return c;
|
|
868
868
|
}
|
|
869
869
|
function Rt(t) {
|
|
870
|
-
let n = 1 / 0, e = 1 / 0,
|
|
871
|
-
for (const
|
|
872
|
-
|
|
873
|
-
return { minX: n, minY: e, maxX:
|
|
870
|
+
let n = 1 / 0, e = 1 / 0, o = -1 / 0, r = -1 / 0;
|
|
871
|
+
for (const s of t)
|
|
872
|
+
s.x < n && (n = s.x), s.y < e && (e = s.y), s.x > o && (o = s.x), s.y > r && (r = s.y);
|
|
873
|
+
return { minX: n, minY: e, maxX: o, maxY: r, width: o - n || 1, height: r - e || 1 };
|
|
874
874
|
}
|
|
875
875
|
function St(t) {
|
|
876
876
|
if (!t.length) return "";
|
|
877
877
|
let n = `M${t[0].x} ${t[0].y}`;
|
|
878
878
|
for (let e = 1; e < t.length - 2; e += 2) {
|
|
879
|
-
const
|
|
879
|
+
const o = t[e - 1], r = t[e], s = t[e + 1], c = t[e + 2], i = (o.x + r.x) / 2, u = (o.y + r.y) / 2, l = (r.x + s.x) / 2, a = (r.y + s.y) / 2, f = (s.x + c.x) / 2, h = (s.y + c.y) / 2;
|
|
880
880
|
n += ` C${i} ${u}, ${l} ${a}, ${f} ${h}`;
|
|
881
881
|
}
|
|
882
882
|
return n;
|
|
@@ -885,23 +885,23 @@ function dn({
|
|
|
885
885
|
maxPoints: t,
|
|
886
886
|
a: n = 6,
|
|
887
887
|
b: e = 6,
|
|
888
|
-
angleStep:
|
|
888
|
+
angleStep: o = 0.07,
|
|
889
889
|
startX: r,
|
|
890
|
-
startY:
|
|
890
|
+
startY: s,
|
|
891
891
|
boxWidth: c,
|
|
892
892
|
boxHeight: i,
|
|
893
893
|
padding: u = 12
|
|
894
894
|
}) {
|
|
895
|
-
const l = Dt({ points: t, a: n, b: e, angleStep:
|
|
895
|
+
const l = Dt({ points: t, a: n, b: e, angleStep: o, startX: 0, startY: 0 }), { minX: a, minY: f, maxX: h, maxY: F, width: g, height: d } = Rt(l), A = (a + h) / 2, D = (f + F) / 2, M = Math.max(1, c - 2 * u), $ = Math.max(1, i - 2 * u), I = Math.min(M / g, $ / d), O = r - A * I, N = s - D * I;
|
|
896
896
|
return function(b) {
|
|
897
|
-
const m = Math.max(2, Math.min(Math.round(b), l.length)), C = l.slice(0, m).map((
|
|
897
|
+
const m = Math.max(2, Math.min(Math.round(b), l.length)), C = l.slice(0, m).map((E) => ({ x: E.x * I + O, y: E.y * I + N }));
|
|
898
898
|
return St(C);
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
901
|
function pn({ datasetObject: t, requiredAttributes: n }) {
|
|
902
902
|
let e = [];
|
|
903
|
-
return n.forEach((
|
|
904
|
-
Object.hasOwn(t,
|
|
903
|
+
return n.forEach((o) => {
|
|
904
|
+
Object.hasOwn(t, o) || e.push(o);
|
|
905
905
|
}), e;
|
|
906
906
|
}
|
|
907
907
|
const ot = {
|
|
@@ -1053,8 +1053,8 @@ function Bt(t) {
|
|
|
1053
1053
|
const e = n.trim();
|
|
1054
1054
|
if (e === "" || e[0] === "#") return e;
|
|
1055
1055
|
if (e.toLowerCase() === "transparent") return "#FFFFFF00";
|
|
1056
|
-
const
|
|
1057
|
-
return ot[
|
|
1056
|
+
const o = e.toUpperCase(), r = o.replace(/GRAY/g, "GREY");
|
|
1057
|
+
return ot[o] || ot[r] || e;
|
|
1058
1058
|
}
|
|
1059
1059
|
const An = "http://www.w3.org/2000/svg";
|
|
1060
1060
|
function yn(t) {
|
|
@@ -1062,31 +1062,31 @@ function yn(t) {
|
|
|
1062
1062
|
return 0;
|
|
1063
1063
|
let n = 0, e = 0;
|
|
1064
1064
|
for (let r = 1; r < t.length; r++) {
|
|
1065
|
-
const
|
|
1066
|
-
if ([null, void 0, 0, 1 / 0, -1 / 0].includes(
|
|
1065
|
+
const s = t[r - 1], c = t[r];
|
|
1066
|
+
if ([null, void 0, 0, 1 / 0, -1 / 0].includes(s))
|
|
1067
1067
|
continue;
|
|
1068
|
-
const i = (c -
|
|
1068
|
+
const i = (c - s) / Math.abs(s) * 100;
|
|
1069
1069
|
n += i, e++;
|
|
1070
1070
|
}
|
|
1071
1071
|
return e === 0 ? 0 : n / e;
|
|
1072
1072
|
}
|
|
1073
|
-
function xn({ content: t, fontSize: n, fill: e, x:
|
|
1073
|
+
function xn({ content: t, fontSize: n, fill: e, x: o, y: r }) {
|
|
1074
1074
|
return t.split(`
|
|
1075
1075
|
`).map(
|
|
1076
|
-
(c, i) => `<tspan x="${
|
|
1076
|
+
(c, i) => `<tspan x="${o}" y="${r + i * n}" fill="${e}">${c}</tspan>`
|
|
1077
1077
|
).join("");
|
|
1078
1078
|
}
|
|
1079
|
-
function mn({ content: t, fontSize: n, fill: e, x:
|
|
1079
|
+
function mn({ content: t, fontSize: n, fill: e, x: o }) {
|
|
1080
1080
|
return t.split(`
|
|
1081
|
-
`).map((
|
|
1081
|
+
`).map((s, c) => `<tspan x="${o}" dy="${c === 0 ? 0 : n}" fill="${e}">${s}</tspan>`).join("");
|
|
1082
1082
|
}
|
|
1083
1083
|
function bn({
|
|
1084
1084
|
content: t,
|
|
1085
1085
|
fontSize: n,
|
|
1086
1086
|
fill: e,
|
|
1087
|
-
maxWords:
|
|
1087
|
+
maxWords: o,
|
|
1088
1088
|
x: r,
|
|
1089
|
-
y:
|
|
1089
|
+
y: s
|
|
1090
1090
|
}) {
|
|
1091
1091
|
function c(l, a) {
|
|
1092
1092
|
const f = l.split(" "), h = [];
|
|
@@ -1095,8 +1095,8 @@ function bn({
|
|
|
1095
1095
|
return h;
|
|
1096
1096
|
}
|
|
1097
1097
|
let i = "";
|
|
1098
|
-
return c(t,
|
|
1099
|
-
const f = `<tspan x="${r}" y="${
|
|
1098
|
+
return c(t, o).forEach((l, a) => {
|
|
1099
|
+
const f = `<tspan x="${r}" y="${s + a * n}" fill="${e}">${l}</tspan>`;
|
|
1100
1100
|
i += f;
|
|
1101
1101
|
}), i;
|
|
1102
1102
|
}
|
|
@@ -1114,62 +1114,62 @@ function Mn(t, n = null) {
|
|
|
1114
1114
|
});
|
|
1115
1115
|
}
|
|
1116
1116
|
function $n(t) {
|
|
1117
|
-
let n = t.reduce((i, u) => i + (u.stackRatio || 0), 0), e = t.filter((i) => i.stackRatio === void 0).length,
|
|
1117
|
+
let n = t.reduce((i, u) => i + (u.stackRatio || 0), 0), e = t.filter((i) => i.stackRatio === void 0).length, o = 1 - n, r = e > 0 ? o / e : 0, s = t.map((i) => ({
|
|
1118
1118
|
...i,
|
|
1119
1119
|
stackRatio: i.stackRatio !== void 0 ? i.stackRatio : r
|
|
1120
1120
|
})), c = 0;
|
|
1121
|
-
return
|
|
1121
|
+
return s = s.map((i, u) => (c += i.stackRatio, {
|
|
1122
1122
|
...i,
|
|
1123
1123
|
stackIndex: u,
|
|
1124
1124
|
cumulatedStackRatio: c
|
|
1125
|
-
})),
|
|
1125
|
+
})), s;
|
|
1126
1126
|
}
|
|
1127
1127
|
function Dn(t) {
|
|
1128
1128
|
function n(l, a, f, h) {
|
|
1129
|
-
const F = f - l,
|
|
1130
|
-
return Math.sqrt(F * F +
|
|
1129
|
+
const F = f - l, g = h - a;
|
|
1130
|
+
return Math.sqrt(F * F + g * g);
|
|
1131
1131
|
}
|
|
1132
1132
|
function e(l, a, f, h) {
|
|
1133
|
-
let
|
|
1133
|
+
let g = 0, d = l.x, A = l.y;
|
|
1134
1134
|
for (let D = 1; D <= 100; D += 1) {
|
|
1135
1135
|
const M = D / 100, $ = 1 - M, I = $ * $, O = M * M, N = I * $ * l.x + 3 * I * M * a.x + 3 * $ * O * f.x + O * M * h.x, y = I * $ * l.y + 3 * I * M * a.y + 3 * $ * O * f.y + O * M * h.y;
|
|
1136
|
-
|
|
1136
|
+
g += n(d, A, N, y), d = N, A = y;
|
|
1137
1137
|
}
|
|
1138
|
-
return
|
|
1138
|
+
return g;
|
|
1139
1139
|
}
|
|
1140
|
-
const
|
|
1141
|
-
let r = 0,
|
|
1142
|
-
return
|
|
1140
|
+
const o = t.match(/[a-zA-Z][^a-zA-Z]*/g);
|
|
1141
|
+
let r = 0, s = 0, c = 0, i = 0, u = 0;
|
|
1142
|
+
return o.forEach((l) => {
|
|
1143
1143
|
const a = l[0], f = l.slice(1).trim().split(/[\s,]+/).map(Number);
|
|
1144
1144
|
let h = 0;
|
|
1145
1145
|
switch (a) {
|
|
1146
1146
|
case "M":
|
|
1147
|
-
for (r = f[h++],
|
|
1148
|
-
u += n(r,
|
|
1147
|
+
for (r = f[h++], s = f[h++], c = r, i = s; h < f.length; )
|
|
1148
|
+
u += n(r, s, f[h], f[h + 1]), r = f[h++], s = f[h++];
|
|
1149
1149
|
break;
|
|
1150
1150
|
case "L":
|
|
1151
1151
|
for (; h < f.length; )
|
|
1152
|
-
u += n(r,
|
|
1152
|
+
u += n(r, s, f[h], f[h + 1]), r = f[h++], s = f[h++];
|
|
1153
1153
|
break;
|
|
1154
1154
|
case "H":
|
|
1155
1155
|
for (; h < f.length; )
|
|
1156
|
-
u += n(r,
|
|
1156
|
+
u += n(r, s, f[h], s), r = f[h++];
|
|
1157
1157
|
break;
|
|
1158
1158
|
case "V":
|
|
1159
1159
|
for (; h < f.length; )
|
|
1160
|
-
u += n(r,
|
|
1160
|
+
u += n(r, s, r, f[h]), s = f[h++];
|
|
1161
1161
|
break;
|
|
1162
1162
|
case "C":
|
|
1163
1163
|
for (; h < f.length; )
|
|
1164
1164
|
u += e(
|
|
1165
|
-
{ x: r, y:
|
|
1165
|
+
{ x: r, y: s },
|
|
1166
1166
|
{ x: f[h], y: f[h + 1] },
|
|
1167
1167
|
{ x: f[h + 2], y: f[h + 3] },
|
|
1168
1168
|
{ x: f[h + 4], y: f[h + 5] }
|
|
1169
|
-
), r = f[h + 4],
|
|
1169
|
+
), r = f[h + 4], s = f[h + 5], h += 6;
|
|
1170
1170
|
break;
|
|
1171
1171
|
case "Z":
|
|
1172
|
-
u += n(r,
|
|
1172
|
+
u += n(r, s, c, i), r = c, s = i;
|
|
1173
1173
|
break;
|
|
1174
1174
|
}
|
|
1175
1175
|
}), u;
|
|
@@ -1178,34 +1178,34 @@ function Rn({
|
|
|
1178
1178
|
relator: t,
|
|
1179
1179
|
adjuster: n,
|
|
1180
1180
|
source: e,
|
|
1181
|
-
threshold:
|
|
1181
|
+
threshold: o = 0,
|
|
1182
1182
|
fallback: r,
|
|
1183
|
-
max:
|
|
1183
|
+
max: s = 24
|
|
1184
1184
|
}) {
|
|
1185
1185
|
const c = t / (n / e);
|
|
1186
|
-
return c >
|
|
1186
|
+
return c > s ? s : c < o ? r : c;
|
|
1187
1187
|
}
|
|
1188
1188
|
function Sn(t) {
|
|
1189
|
-
return t.reduce((n, e) => (e.series.forEach((
|
|
1190
|
-
![void 0, null, 1 / 0, -1 / 0].includes(
|
|
1189
|
+
return t.reduce((n, e) => (e.series.forEach((o, r) => {
|
|
1190
|
+
![void 0, null, 1 / 0, -1 / 0].includes(o) && !isNaN(o) && (n[r] = (n[r] || 0) + o);
|
|
1191
1191
|
}), n), []);
|
|
1192
1192
|
}
|
|
1193
1193
|
function It(t, { value: n, config: e }) {
|
|
1194
|
-
let
|
|
1194
|
+
let o = !1, r = n;
|
|
1195
1195
|
if (typeof t == "function")
|
|
1196
1196
|
try {
|
|
1197
|
-
r = t({ value: n, config: e }), ["number", "string"].includes(typeof r) ?
|
|
1198
|
-
} catch (
|
|
1199
|
-
console.warn("Formatter could not be applied:",
|
|
1197
|
+
r = t({ value: n, config: e }), ["number", "string"].includes(typeof r) ? o = !0 : r = n;
|
|
1198
|
+
} catch (s) {
|
|
1199
|
+
console.warn("Formatter could not be applied:", s), o = !1;
|
|
1200
1200
|
}
|
|
1201
1201
|
return {
|
|
1202
|
-
isValid:
|
|
1202
|
+
isValid: o,
|
|
1203
1203
|
value: r
|
|
1204
1204
|
};
|
|
1205
1205
|
}
|
|
1206
|
-
function Bn(t, n, e,
|
|
1207
|
-
const { isValid: r, value:
|
|
1208
|
-
return r ?
|
|
1206
|
+
function Bn(t, n, e, o) {
|
|
1207
|
+
const { isValid: r, value: s } = It(t, { value: n, config: o });
|
|
1208
|
+
return r ? s : e;
|
|
1209
1209
|
}
|
|
1210
1210
|
function In(t, n) {
|
|
1211
1211
|
return n.split(".").every((e) => t !== null && typeof t == "object" && e in t ? (t = t[e], !0) : !1);
|
|
@@ -1214,13 +1214,13 @@ function Nn(t, n = []) {
|
|
|
1214
1214
|
function e(r) {
|
|
1215
1215
|
return typeof r == "string" && isNaN(Number(r)) || typeof r == "number" && isFinite(r) ? r : 0;
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function o(r) {
|
|
1218
1218
|
if (Array.isArray(r))
|
|
1219
|
-
return r.map((
|
|
1219
|
+
return r.map((s) => o(s));
|
|
1220
1220
|
if (typeof r == "object" && r !== null) {
|
|
1221
|
-
let
|
|
1221
|
+
let s = { ...r };
|
|
1222
1222
|
return n.forEach((c) => {
|
|
1223
|
-
|
|
1223
|
+
s.hasOwnProperty(c) && ![
|
|
1224
1224
|
"NAME",
|
|
1225
1225
|
"name",
|
|
1226
1226
|
"TITLE",
|
|
@@ -1249,22 +1249,22 @@ function Nn(t, n = []) {
|
|
|
1249
1249
|
"hour",
|
|
1250
1250
|
"HOURS",
|
|
1251
1251
|
"hours"
|
|
1252
|
-
].includes(c) && Array.isArray(
|
|
1252
|
+
].includes(c) && Array.isArray(s[c]) && (s[c] = o(s[c]));
|
|
1253
1253
|
}), Object.fromEntries(
|
|
1254
|
-
Object.entries(
|
|
1254
|
+
Object.entries(s).map(([c, i]) => [c, o(i)])
|
|
1255
1255
|
);
|
|
1256
1256
|
} else
|
|
1257
1257
|
return e(r);
|
|
1258
1258
|
}
|
|
1259
|
-
return
|
|
1259
|
+
return o(t);
|
|
1260
1260
|
}
|
|
1261
1261
|
function Ln(t, n = 100) {
|
|
1262
1262
|
return t.length === 9 ? t.substring(0, 7) + rt[n] : t + rt[n];
|
|
1263
1263
|
}
|
|
1264
|
-
function On({ series: t, center: n, maxRadius: e, hasGhost:
|
|
1265
|
-
const
|
|
1264
|
+
function On({ series: t, center: n, maxRadius: e, hasGhost: o = !1 }) {
|
|
1265
|
+
const s = 360 / (t.length - (o ? 1 : 0));
|
|
1266
1266
|
return t.map((i, u) => {
|
|
1267
|
-
const a = i * e, f = u *
|
|
1267
|
+
const a = i * e, f = u * s, h = f + s, F = f + s / 2, g = X(f) - X(90), d = X(h) - X(90), A = X(F) - X(90), D = n.x + a * Math.cos(g), M = n.y + a * Math.sin(g), $ = n.x + a * Math.cos(d), I = n.y + a * Math.sin(d), O = n.x + a * Math.cos(A), N = n.y + a * Math.sin(A);
|
|
1268
1268
|
return {
|
|
1269
1269
|
path: `
|
|
1270
1270
|
M ${n.x} ${n.y}
|
|
@@ -1280,21 +1280,21 @@ function On({ series: t, center: n, maxRadius: e, hasGhost: s = !1 }) {
|
|
|
1280
1280
|
function Tn({ data: t, threshold: n }) {
|
|
1281
1281
|
if (n >= t.length || n < 3)
|
|
1282
1282
|
return t;
|
|
1283
|
-
const e = [],
|
|
1283
|
+
const e = [], o = (t.length - 2) / (n - 2);
|
|
1284
1284
|
let r = 0;
|
|
1285
1285
|
e.push(t[r]);
|
|
1286
|
-
for (let
|
|
1287
|
-
const c = Math.floor((
|
|
1286
|
+
for (let s = 0; s < n - 2; s += 1) {
|
|
1287
|
+
const c = Math.floor((s + 1) * o) + 1, i = Math.min(Math.floor((s + 2) * o) + 1, t.length), u = t.slice(c, i);
|
|
1288
1288
|
let l = 0, a = 0;
|
|
1289
1289
|
for (const F of u)
|
|
1290
1290
|
l += F.x, a += F.y;
|
|
1291
1291
|
l /= u.length, a /= u.length;
|
|
1292
1292
|
let f = -1, h = r;
|
|
1293
1293
|
for (let F = c; F < i; F += 1) {
|
|
1294
|
-
const
|
|
1294
|
+
const g = Math.abs(
|
|
1295
1295
|
(t[r].x - l) * (t[F].y - t[r].y) - (t[r].x - t[F].x) * (a - t[r].y)
|
|
1296
1296
|
);
|
|
1297
|
-
|
|
1297
|
+
g > f && (f = g, h = F);
|
|
1298
1298
|
}
|
|
1299
1299
|
e.push(t[h]), r = h;
|
|
1300
1300
|
}
|
|
@@ -1303,11 +1303,11 @@ function Tn({ data: t, threshold: n }) {
|
|
|
1303
1303
|
function wn({ data: t, threshold: n }) {
|
|
1304
1304
|
if (n >= t.length || n < 3)
|
|
1305
1305
|
return t;
|
|
1306
|
-
const e = [],
|
|
1306
|
+
const e = [], o = (t.length - 2) / (n - 2);
|
|
1307
1307
|
let r = 0;
|
|
1308
1308
|
e.push(t[r]);
|
|
1309
|
-
for (let
|
|
1310
|
-
const c = Math.floor((
|
|
1309
|
+
for (let s = 0; s < n - 2; s += 1) {
|
|
1310
|
+
const c = Math.floor((s + 1) * o) + 1, i = Math.min(Math.floor((s + 2) * o) + 1, t.length), u = t.slice(c, i), l = u.reduce((h, F) => h + F, 0) / u.length;
|
|
1311
1311
|
let a = -1, f = r;
|
|
1312
1312
|
for (let h = c; h < i; h += 1) {
|
|
1313
1313
|
const F = Math.abs((t[r] - l) * (h - r));
|
|
@@ -1320,41 +1320,41 @@ function wn({ data: t, threshold: n }) {
|
|
|
1320
1320
|
function Pn({ data: t, threshold: n, key: e = "value" }) {
|
|
1321
1321
|
if (n >= t.length || n < 3)
|
|
1322
1322
|
return t;
|
|
1323
|
-
const
|
|
1324
|
-
let
|
|
1325
|
-
|
|
1323
|
+
const o = [], r = (t.length - 2) / (n - 2);
|
|
1324
|
+
let s = 0;
|
|
1325
|
+
o.push(t[s]);
|
|
1326
1326
|
for (let c = 0; c < n - 2; c += 1) {
|
|
1327
|
-
const i = Math.floor((c + 1) * r) + 1, u = Math.min(Math.floor((c + 2) * r) + 1, t.length), l = t.slice(i, u), a = l.reduce((F,
|
|
1328
|
-
let f = -1, h =
|
|
1327
|
+
const i = Math.floor((c + 1) * r) + 1, u = Math.min(Math.floor((c + 2) * r) + 1, t.length), l = t.slice(i, u), a = l.reduce((F, g) => F + g[e], 0) / l.length;
|
|
1328
|
+
let f = -1, h = s;
|
|
1329
1329
|
for (let F = i; F < u; F += 1) {
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1330
|
+
const g = Math.abs((t[s][e] - a) * (F - s));
|
|
1331
|
+
g > f && (f = g, h = F);
|
|
1332
1332
|
}
|
|
1333
|
-
|
|
1333
|
+
o.push(t[h]), s = h;
|
|
1334
1334
|
}
|
|
1335
|
-
return
|
|
1335
|
+
return o.push(t[t.length - 1]), o;
|
|
1336
1336
|
}
|
|
1337
|
-
function Yn({ radius: t, centerX: n, centerY: e, percentage:
|
|
1338
|
-
|
|
1339
|
-
const r =
|
|
1340
|
-
return `M ${n},${e} L ${
|
|
1337
|
+
function Yn({ radius: t, centerX: n, centerY: e, percentage: o }) {
|
|
1338
|
+
o = Math.max(0, Math.min(1, o));
|
|
1339
|
+
const r = o * Math.PI, s = n - t, c = e, i = n - t * Math.cos(r), u = e - t * Math.sin(r);
|
|
1340
|
+
return `M ${n},${e} L ${s},${c} A ${t},${t} 0 0 1 ${i},${u} Z`.trim();
|
|
1341
1341
|
}
|
|
1342
|
-
function kn({ svgElement: t, x: n, y: e, offsetY:
|
|
1342
|
+
function kn({ svgElement: t, x: n, y: e, offsetY: o = 0, element: r }) {
|
|
1343
1343
|
if (!t || !r) return { top: 0, left: 0 };
|
|
1344
|
-
const
|
|
1345
|
-
|
|
1346
|
-
const c =
|
|
1344
|
+
const s = t.createSVGPoint();
|
|
1345
|
+
s.x = n, s.y = e;
|
|
1346
|
+
const c = s.matrixTransform(t.getScreenCTM()), i = t.getBoundingClientRect(), u = r.getBoundingClientRect();
|
|
1347
1347
|
let l = 0, a = 0;
|
|
1348
|
-
return c.x - u.width / 2 < i.left ? l = 0 : c.x + u.width > i.right ? l = -u.width : l = -u.width / 2, c.y -
|
|
1348
|
+
return c.x - u.width / 2 < i.left ? l = 0 : c.x + u.width > i.right ? l = -u.width : l = -u.width / 2, c.y - o - u.height < i.top ? a = o : a = -u.height - o, {
|
|
1349
1349
|
top: c.y + a,
|
|
1350
1350
|
left: c.x + l
|
|
1351
1351
|
};
|
|
1352
1352
|
}
|
|
1353
|
-
function Hn({ svgElement: t, x: n, y: e, element:
|
|
1354
|
-
if (!t || !
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1357
|
-
const c =
|
|
1353
|
+
function Hn({ svgElement: t, x: n, y: e, element: o, position: r }) {
|
|
1354
|
+
if (!t || !o) return { top: 0, left: 0 };
|
|
1355
|
+
const s = t.createSVGPoint();
|
|
1356
|
+
s.x = n, s.y = e;
|
|
1357
|
+
const c = s.matrixTransform(t.getScreenCTM()), { height: i, width: u } = o.getBoundingClientRect();
|
|
1358
1358
|
let l = r === "right" ? 0 : -u, a = -(i / 2);
|
|
1359
1359
|
return {
|
|
1360
1360
|
top: c.y + a,
|
|
@@ -1370,14 +1370,14 @@ function z(t) {
|
|
|
1370
1370
|
return new RegExp(t.source, t.flags);
|
|
1371
1371
|
if (t instanceof Map) {
|
|
1372
1372
|
const e = /* @__PURE__ */ new Map();
|
|
1373
|
-
for (const [
|
|
1374
|
-
e.set(
|
|
1373
|
+
for (const [o, r] of t.entries())
|
|
1374
|
+
e.set(o, z(r));
|
|
1375
1375
|
return e;
|
|
1376
1376
|
}
|
|
1377
1377
|
if (t instanceof Set) {
|
|
1378
1378
|
const e = /* @__PURE__ */ new Set();
|
|
1379
|
-
for (const
|
|
1380
|
-
e.add(z(
|
|
1379
|
+
for (const o of t.values())
|
|
1380
|
+
e.add(z(o));
|
|
1381
1381
|
return e;
|
|
1382
1382
|
}
|
|
1383
1383
|
if (Array.isArray(t))
|
|
@@ -1390,47 +1390,47 @@ function z(t) {
|
|
|
1390
1390
|
function Nt(t) {
|
|
1391
1391
|
const n = [];
|
|
1392
1392
|
let e = [];
|
|
1393
|
-
for (const
|
|
1394
|
-
!
|
|
1393
|
+
for (const o of t)
|
|
1394
|
+
!o || o.value == null || Number.isNaN(o.x) || Number.isNaN(o.y) ? (e.length && n.push(e), e = []) : e.push(o);
|
|
1395
1395
|
return e.length && n.push(e), n;
|
|
1396
1396
|
}
|
|
1397
1397
|
function Un(t, n) {
|
|
1398
1398
|
const e = t.filter((c) => !!c);
|
|
1399
1399
|
if (!e[0]) return [-10, -10, "", -10, -10].toString();
|
|
1400
|
-
const
|
|
1400
|
+
const o = { x: e[0].x, y: n }, r = { x: e.at(-1).x, y: n }, s = [];
|
|
1401
1401
|
return e.forEach((c) => {
|
|
1402
|
-
|
|
1403
|
-
}), [
|
|
1402
|
+
s.push(`${c.x},${c.y} `);
|
|
1403
|
+
}), [o.x, o.y, ...s, r.x, r.y].toString();
|
|
1404
1404
|
}
|
|
1405
1405
|
function Gn(t, n) {
|
|
1406
1406
|
if (!t[0]) return [-10, -10, "", -10, -10].toString();
|
|
1407
1407
|
const e = Nt(t);
|
|
1408
|
-
return e.length ? e.map((
|
|
1409
|
-
const r = { x:
|
|
1410
|
-
return
|
|
1408
|
+
return e.length ? e.map((o) => {
|
|
1409
|
+
const r = { x: o[0].x, y: n }, s = { x: o.at(-1).x, y: n }, c = [];
|
|
1410
|
+
return o.forEach((i) => {
|
|
1411
1411
|
c.push(`${i.x},${i.y} `);
|
|
1412
|
-
}), [r.x, r.y, ...c,
|
|
1412
|
+
}), [r.x, r.y, ...c, s.x, s.y].toString();
|
|
1413
1413
|
}).join(";") : "";
|
|
1414
1414
|
}
|
|
1415
1415
|
function Lt(t) {
|
|
1416
1416
|
const n = [];
|
|
1417
1417
|
let e = [];
|
|
1418
|
-
for (const
|
|
1419
|
-
|
|
1418
|
+
for (const o of t)
|
|
1419
|
+
o.value == null || Number.isNaN(o.x) || Number.isNaN(o.y) ? (e.length > 1 && n.push(e), e = []) : e.push(o);
|
|
1420
1420
|
return e.length > 1 && n.push(e), n;
|
|
1421
1421
|
}
|
|
1422
1422
|
function vn(t) {
|
|
1423
1423
|
let n = "", e = !1;
|
|
1424
|
-
const
|
|
1424
|
+
const o = (r) => r.value != null && Number.isFinite(r.x) && Number.isFinite(r.y);
|
|
1425
1425
|
for (let r = 0; r < t.length; r++) {
|
|
1426
|
-
const
|
|
1427
|
-
if (!s
|
|
1426
|
+
const s = t[r];
|
|
1427
|
+
if (!o(s))
|
|
1428
1428
|
continue;
|
|
1429
|
-
const c = `${p(
|
|
1429
|
+
const c = `${p(s.x)},${p(s.y)}`;
|
|
1430
1430
|
if (!e)
|
|
1431
1431
|
n += c, e = !0;
|
|
1432
1432
|
else {
|
|
1433
|
-
const i = t[r - 1], u =
|
|
1433
|
+
const i = t[r - 1], u = o(i) ? "L" : "M";
|
|
1434
1434
|
n += `${u}${c}`;
|
|
1435
1435
|
}
|
|
1436
1436
|
n += " ";
|
|
@@ -1441,28 +1441,28 @@ function Xn(t) {
|
|
|
1441
1441
|
const n = Lt(t);
|
|
1442
1442
|
if (!n.length) return "";
|
|
1443
1443
|
let e = "";
|
|
1444
|
-
for (const [
|
|
1444
|
+
for (const [o, r] of n.entries()) {
|
|
1445
1445
|
if (r.length < 2) continue;
|
|
1446
|
-
const
|
|
1447
|
-
for (let a = 0; a <
|
|
1446
|
+
const s = r.length - 1, c = [], i = [], u = [], l = [];
|
|
1447
|
+
for (let a = 0; a < s; a += 1)
|
|
1448
1448
|
c[a] = r[a + 1].x - r[a].x, i[a] = r[a + 1].y - r[a].y, u[a] = i[a] / c[a];
|
|
1449
|
-
l[0] = u[0], l[
|
|
1450
|
-
for (let a = 1; a <
|
|
1449
|
+
l[0] = u[0], l[s] = u[s - 1];
|
|
1450
|
+
for (let a = 1; a < s; a += 1)
|
|
1451
1451
|
if (u[a - 1] * u[a] <= 0)
|
|
1452
1452
|
l[a] = 0;
|
|
1453
1453
|
else {
|
|
1454
1454
|
const f = 2 * u[a - 1] * u[a] / (u[a - 1] + u[a]);
|
|
1455
1455
|
l[a] = f;
|
|
1456
1456
|
}
|
|
1457
|
-
e += `${
|
|
1458
|
-
for (let a = 0; a <
|
|
1459
|
-
const f = r[a].x, h = r[a].y, F = r[a + 1].x,
|
|
1460
|
-
e += `C${p(D)},${p(M)} ${p($)},${p(I)} ${p(F)},${p(
|
|
1457
|
+
e += `${o === 0 ? "" : "M"}${p(r[0].x)},${p(r[0].y)} `;
|
|
1458
|
+
for (let a = 0; a < s; a += 1) {
|
|
1459
|
+
const f = r[a].x, h = r[a].y, F = r[a + 1].x, g = r[a + 1].y, d = l[a], A = l[a + 1], D = f + (F - f) / 3, M = h + d * (F - f) / 3, $ = F - (F - f) / 3, I = g - A * (F - f) / 3;
|
|
1460
|
+
e += `C${p(D)},${p(M)} ${p($)},${p(I)} ${p(F)},${p(g)} `;
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
1463
|
return e.trim();
|
|
1464
1464
|
}
|
|
1465
|
-
function jn(t, n, e = !1,
|
|
1465
|
+
function jn(t, n, e = !1, o = !0) {
|
|
1466
1466
|
function r(c) {
|
|
1467
1467
|
const i = [];
|
|
1468
1468
|
let u = [];
|
|
@@ -1480,16 +1480,16 @@ function jn(t, n, e = !1, s = !0) {
|
|
|
1480
1480
|
if (a[F - 1] * a[F] <= 0)
|
|
1481
1481
|
f[F] = 0;
|
|
1482
1482
|
else {
|
|
1483
|
-
const
|
|
1484
|
-
f[F] =
|
|
1483
|
+
const g = 2 * a[F - 1] * a[F] / (a[F - 1] + a[F]);
|
|
1484
|
+
f[F] = g;
|
|
1485
1485
|
}
|
|
1486
1486
|
let h = `M${c[0].x},${n}`;
|
|
1487
1487
|
h += ` L${c[0].x},${c[0].y}`;
|
|
1488
1488
|
for (let F = 0; F < i; F += 1) {
|
|
1489
|
-
const
|
|
1489
|
+
const g = c[F].x, d = c[F].y, A = c[F + 1].x, D = c[F + 1].y, M = f[F], $ = f[F + 1], I = g + (A - g) / 3, O = d + M * (A - g) / 3, N = A - (A - g) / 3, y = D - $ * (A - g) / 3;
|
|
1490
1490
|
h += ` C${I},${O} ${N},${y} ${A},${D}`;
|
|
1491
1491
|
}
|
|
1492
|
-
return h += ` L${c[i].x},${n} ${
|
|
1492
|
+
return h += ` L${c[i].x},${n} ${o ? "Z" : ""}`, h;
|
|
1493
1493
|
}).filter(Boolean);
|
|
1494
1494
|
}
|
|
1495
1495
|
function Wn(t) {
|
|
@@ -1515,61 +1515,61 @@ function Kn(t) {
|
|
|
1515
1515
|
function Vn({ values: t, config: n = {} }) {
|
|
1516
1516
|
const {
|
|
1517
1517
|
keepInvalid: e = !0,
|
|
1518
|
-
convertInvalidToZero:
|
|
1518
|
+
convertInvalidToZero: o = !1
|
|
1519
1519
|
} = n, r = [];
|
|
1520
|
-
let
|
|
1520
|
+
let s = 0, c = 0;
|
|
1521
1521
|
function i(l) {
|
|
1522
1522
|
return typeof l != "number" || !Number.isFinite(l);
|
|
1523
1523
|
}
|
|
1524
1524
|
function u(l) {
|
|
1525
|
-
|
|
1525
|
+
s += l, c += 1, r.push(s / c);
|
|
1526
1526
|
}
|
|
1527
1527
|
for (const l of t)
|
|
1528
|
-
i(l) ?
|
|
1528
|
+
i(l) ? o && e ? u(0) : !o && e && r.push(l) : u(l);
|
|
1529
1529
|
return r;
|
|
1530
1530
|
}
|
|
1531
1531
|
function zn({ values: t, config: n = {} }) {
|
|
1532
1532
|
const {
|
|
1533
1533
|
keepInvalid: e = !0,
|
|
1534
|
-
convertInvalidToZero:
|
|
1535
|
-
} = n, r = [],
|
|
1534
|
+
convertInvalidToZero: o = !1
|
|
1535
|
+
} = n, r = [], s = [];
|
|
1536
1536
|
function c(u) {
|
|
1537
1537
|
return typeof u != "number" || !Number.isFinite(u);
|
|
1538
1538
|
}
|
|
1539
1539
|
function i(u) {
|
|
1540
|
-
|
|
1541
|
-
const l =
|
|
1542
|
-
l % 2 === 1 ? r.push(
|
|
1540
|
+
s.push(u), s.sort((f, h) => f - h);
|
|
1541
|
+
const l = s.length, a = l >> 1;
|
|
1542
|
+
l % 2 === 1 ? r.push(s[a]) : r.push((s[a - 1] + s[a]) / 2);
|
|
1543
1543
|
}
|
|
1544
1544
|
for (const u of t)
|
|
1545
|
-
c(u) ?
|
|
1545
|
+
c(u) ? o && e ? i(0) : !o && e && r.push(u) : i(u);
|
|
1546
1546
|
return r;
|
|
1547
1547
|
}
|
|
1548
1548
|
function _n({
|
|
1549
1549
|
el: t,
|
|
1550
1550
|
bounds: n,
|
|
1551
1551
|
currentFontSize: e,
|
|
1552
|
-
minFontSize:
|
|
1552
|
+
minFontSize: o = 6,
|
|
1553
1553
|
attempts: r = 200,
|
|
1554
|
-
padding:
|
|
1554
|
+
padding: s = 1
|
|
1555
1555
|
}) {
|
|
1556
1556
|
if (!t || !e) return 0;
|
|
1557
1557
|
let c = e;
|
|
1558
1558
|
t.setAttribute("font-size", c);
|
|
1559
|
-
const { x: i, y: u, width: l, height: a } = n, f = i +
|
|
1559
|
+
const { x: i, y: u, width: l, height: a } = n, f = i + s, h = u + s, F = i + l - s, g = u + a - s;
|
|
1560
1560
|
let d = t.getBBox();
|
|
1561
|
-
if (d.x >= f +
|
|
1561
|
+
if (d.x >= f + s && d.y >= h + s && d.x + d.width <= F - s && d.y + d.height <= g - s)
|
|
1562
1562
|
return c;
|
|
1563
1563
|
let A = r;
|
|
1564
|
-
for (; A-- > 0 && c >
|
|
1564
|
+
for (; A-- > 0 && c > o && (c--, t.setAttribute("font-size", c), d = t.getBBox(), !(d.x >= f + s && d.y >= h + s && d.x + d.width <= F - s && d.y + d.height <= g - s)); )
|
|
1565
1565
|
;
|
|
1566
|
-
return c <
|
|
1566
|
+
return c < o && (c = 0, t.setAttribute("font-size", c)), c;
|
|
1567
1567
|
}
|
|
1568
1568
|
function Zn({
|
|
1569
1569
|
value: t,
|
|
1570
1570
|
maxDecimals: n = 4,
|
|
1571
1571
|
fallbackFormatter: e,
|
|
1572
|
-
removeTrailingZero:
|
|
1572
|
+
removeTrailingZero: o = !0
|
|
1573
1573
|
}) {
|
|
1574
1574
|
if (t === 0)
|
|
1575
1575
|
return "0";
|
|
@@ -1578,14 +1578,14 @@ function Zn({
|
|
|
1578
1578
|
const i = e(t);
|
|
1579
1579
|
return String(i);
|
|
1580
1580
|
}
|
|
1581
|
-
let
|
|
1581
|
+
let s;
|
|
1582
1582
|
if (r < 1) {
|
|
1583
1583
|
const i = Math.floor(Math.log10(r));
|
|
1584
|
-
|
|
1584
|
+
s = Math.min(Math.max(1 - i, 1), n);
|
|
1585
1585
|
} else
|
|
1586
|
-
|
|
1587
|
-
let c = t.toFixed(
|
|
1588
|
-
return
|
|
1586
|
+
s = n;
|
|
1587
|
+
let c = t.toFixed(s);
|
|
1588
|
+
return o && (c = c.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, "")), c;
|
|
1589
1589
|
}
|
|
1590
1590
|
function Qn(t) {
|
|
1591
1591
|
const n = [];
|
|
@@ -1596,22 +1596,22 @@ function Qn(t) {
|
|
|
1596
1596
|
function qn(t, n = 20) {
|
|
1597
1597
|
t = t.replace(/[\r\n]+/g, " ");
|
|
1598
1598
|
const e = t.split(" ");
|
|
1599
|
-
let
|
|
1600
|
-
for (let
|
|
1601
|
-
(
|
|
1602
|
-
` : "") +
|
|
1603
|
-
return
|
|
1604
|
-
` : "") +
|
|
1599
|
+
let o = "", r = "";
|
|
1600
|
+
for (let s of e)
|
|
1601
|
+
(o + (o ? " " : "") + s).length <= n ? o += (o ? " " : "") + s : (o && (r += (r ? `
|
|
1602
|
+
` : "") + o), o = s);
|
|
1603
|
+
return o && (r += (r ? `
|
|
1604
|
+
` : "") + o), r;
|
|
1605
1605
|
}
|
|
1606
1606
|
function Jn(t) {
|
|
1607
1607
|
const {
|
|
1608
1608
|
lineA: n,
|
|
1609
1609
|
lineB: e,
|
|
1610
|
-
colorLineA:
|
|
1610
|
+
colorLineA: o,
|
|
1611
1611
|
// fill when A is above
|
|
1612
1612
|
colorLineB: r,
|
|
1613
1613
|
// fill when B is above
|
|
1614
|
-
smoothA:
|
|
1614
|
+
smoothA: s = !1,
|
|
1615
1615
|
smoothB: c = !1,
|
|
1616
1616
|
sampleStepPx: i = 2,
|
|
1617
1617
|
cutNullValues: u = !0,
|
|
@@ -1631,30 +1631,30 @@ function Jn(t) {
|
|
|
1631
1631
|
return m.length > 1 && b.push(m), b;
|
|
1632
1632
|
}
|
|
1633
1633
|
function h(y) {
|
|
1634
|
-
const b = y.length - 1, m = new Array(b), C = new Array(b),
|
|
1634
|
+
const b = y.length - 1, m = new Array(b), C = new Array(b), E = new Array(b), B = new Array(y.length);
|
|
1635
1635
|
for (let x = 0; x < b; x += 1)
|
|
1636
|
-
m[x] = y[x + 1].x - y[x].x, C[x] = y[x + 1].y - y[x].y,
|
|
1637
|
-
B[0] =
|
|
1636
|
+
m[x] = y[x + 1].x - y[x].x, C[x] = y[x + 1].y - y[x].y, E[x] = C[x] / m[x];
|
|
1637
|
+
B[0] = E[0], B[b] = E[b - 1];
|
|
1638
1638
|
for (let x = 1; x < b; x += 1)
|
|
1639
|
-
|
|
1639
|
+
E[x - 1] * E[x] <= 0 ? B[x] = 0 : B[x] = 2 * E[x - 1] * E[x] / (E[x - 1] + E[x]);
|
|
1640
1640
|
return B;
|
|
1641
1641
|
}
|
|
1642
|
-
function F(y, b, m, C,
|
|
1642
|
+
function F(y, b, m, C, E) {
|
|
1643
1643
|
const B = y.x, x = b.x, T = y.y, R = b.y, w = x - B;
|
|
1644
1644
|
if (w === 0) return T;
|
|
1645
|
-
const P = (
|
|
1645
|
+
const P = (E - B) / w, L = P * P, k = L * P, H = 2 * k - 3 * L + 1, S = k - 2 * L + P, Y = -2 * k + 3 * L, U = k - L;
|
|
1646
1646
|
return H * T + S * (m * w) + Y * R + U * (C * w);
|
|
1647
1647
|
}
|
|
1648
|
-
function
|
|
1648
|
+
function g(y, b) {
|
|
1649
1649
|
const m = f(y);
|
|
1650
1650
|
if (!m.length) return [];
|
|
1651
|
-
let C = 1 / 0,
|
|
1651
|
+
let C = 1 / 0, E = -1 / 0;
|
|
1652
1652
|
for (const R of m)
|
|
1653
|
-
C = Math.min(C, R[0].x),
|
|
1654
|
-
if (!a(C) || !a(
|
|
1653
|
+
C = Math.min(C, R[0].x), E = Math.max(E, R[R.length - 1].x);
|
|
1654
|
+
if (!a(C) || !a(E) || E <= C) return [];
|
|
1655
1655
|
const B = Math.max(1, i), x = [];
|
|
1656
|
-
for (let R = C; R <=
|
|
1657
|
-
x[x.length - 1] <
|
|
1656
|
+
for (let R = C; R <= E; R += B) x.push(R);
|
|
1657
|
+
x[x.length - 1] < E && x.push(E);
|
|
1658
1658
|
const T = [];
|
|
1659
1659
|
for (const R of x) {
|
|
1660
1660
|
let w = null, P = !1;
|
|
@@ -1686,8 +1686,8 @@ function Jn(t) {
|
|
|
1686
1686
|
return y + m * (b - y);
|
|
1687
1687
|
}
|
|
1688
1688
|
function A(y, b) {
|
|
1689
|
-
const m = [], C = [],
|
|
1690
|
-
for (let B = 0; B <
|
|
1689
|
+
const m = [], C = [], E = Math.min(y.length, b.length);
|
|
1690
|
+
for (let B = 0; B < E - 1; B += 1) {
|
|
1691
1691
|
const x = y[B], T = y[B + 1], R = b[B], w = b[B + 1];
|
|
1692
1692
|
if (m.push(x), C.push(R), x.hole || T.hole || R.hole || w.hole || x.y == null || T.y == null || R.y == null || w.y == null)
|
|
1693
1693
|
continue;
|
|
@@ -1697,14 +1697,14 @@ function Jn(t) {
|
|
|
1697
1697
|
m.push(Y), C.push(U);
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
|
-
return
|
|
1700
|
+
return E > 0 && (m.push(y[E - 1]), C.push(b[E - 1])), { A: m, B: C };
|
|
1701
1701
|
}
|
|
1702
1702
|
function D(y, b) {
|
|
1703
1703
|
const m = [], C = Math.min(y.length, b.length);
|
|
1704
|
-
for (let
|
|
1705
|
-
const B = y[
|
|
1704
|
+
for (let E = 0; E < C - 1; E += 1) {
|
|
1705
|
+
const B = y[E], x = y[E + 1], T = b[E], R = b[E + 1];
|
|
1706
1706
|
if (B.hole || x.hole || T.hole || R.hole || B.y == null || x.y == null || T.y == null || R.y == null) continue;
|
|
1707
|
-
const w = B.y - T.y, P = x.y - R.y, L = w <= 0 ? B : T, k = P <= 0 ? x : R, H = P <= 0 ? R : x, S = w <= 0 ? T : B, Y = w <= 0 ?
|
|
1707
|
+
const w = B.y - T.y, P = x.y - R.y, L = w <= 0 ? B : T, k = P <= 0 ? x : R, H = P <= 0 ? R : x, S = w <= 0 ? T : B, Y = w <= 0 ? o : r, U = [
|
|
1708
1708
|
`M${L.x},${L.y}`,
|
|
1709
1709
|
`L${k.x},${k.y}`,
|
|
1710
1710
|
`L${H.x},${H.y}`,
|
|
@@ -1718,21 +1718,21 @@ function Jn(t) {
|
|
|
1718
1718
|
function M(y, b) {
|
|
1719
1719
|
const m = [], C = Math.min(y.length, b.length);
|
|
1720
1720
|
if (C < 2) return m;
|
|
1721
|
-
let
|
|
1722
|
-
for (;
|
|
1723
|
-
for (;
|
|
1724
|
-
const S = y[
|
|
1721
|
+
let E = 0;
|
|
1722
|
+
for (; E < C - 1; ) {
|
|
1723
|
+
for (; E < C - 1; ) {
|
|
1724
|
+
const S = y[E], Y = b[E], U = y[E + 1], j = b[E + 1];
|
|
1725
1725
|
if (!S.hole && !Y.hole && !U.hole && !j.hole && S.y != null && Y.y != null && U.y != null && j.y != null) break;
|
|
1726
|
-
|
|
1726
|
+
E += 1;
|
|
1727
1727
|
}
|
|
1728
|
-
if (
|
|
1729
|
-
const B =
|
|
1730
|
-
for (
|
|
1731
|
-
const S = y[
|
|
1728
|
+
if (E >= C - 1) break;
|
|
1729
|
+
const B = E, x = Math.sign(b[E].y - y[E].y || 0) || 1;
|
|
1730
|
+
for (E += 1; E < C - 1; ) {
|
|
1731
|
+
const S = y[E], Y = b[E], U = y[E + 1], j = b[E + 1];
|
|
1732
1732
|
if (S.hole || Y.hole || U.hole || j.hole || S.y == null || Y.y == null || U.y == null || j.y == null || (Math.sign(Y.y - S.y || 0) || 1) !== x) break;
|
|
1733
|
-
|
|
1733
|
+
E += 1;
|
|
1734
1734
|
}
|
|
1735
|
-
const T =
|
|
1735
|
+
const T = E + 0, R = x >= 0 ? y : b, w = x >= 0 ? b : y, P = x >= 0 ? o : r, L = [];
|
|
1736
1736
|
for (let S = B; S <= T; S += 1)
|
|
1737
1737
|
L.push(`${R[S].x},${R[S].y}`);
|
|
1738
1738
|
const k = [];
|
|
@@ -1743,11 +1743,11 @@ function Jn(t) {
|
|
|
1743
1743
|
}
|
|
1744
1744
|
return m;
|
|
1745
1745
|
}
|
|
1746
|
-
const $ =
|
|
1746
|
+
const $ = g(n, s), I = g(e, c), { A: O, B: N } = A($, I);
|
|
1747
1747
|
return l ? M(O, N) : D(O, N);
|
|
1748
1748
|
}
|
|
1749
1749
|
function te(t, n, e = {}) {
|
|
1750
|
-
const r = { ...{ bubbles: !0, cancelable: !0, composed: !0 }, ...e },
|
|
1750
|
+
const r = { ...{ bubbles: !0, cancelable: !0, composed: !0 }, ...e }, s = /* @__PURE__ */ new Set([
|
|
1751
1751
|
"click",
|
|
1752
1752
|
"mousedown",
|
|
1753
1753
|
"mouseup",
|
|
@@ -1764,7 +1764,7 @@ function te(t, n, e = {}) {
|
|
|
1764
1764
|
"keypress"
|
|
1765
1765
|
]);
|
|
1766
1766
|
let i;
|
|
1767
|
-
if (
|
|
1767
|
+
if (s.has(n))
|
|
1768
1768
|
i = new MouseEvent(n, r);
|
|
1769
1769
|
else if (c.has(n))
|
|
1770
1770
|
i = new KeyboardEvent(n, r);
|
|
@@ -1777,16 +1777,18 @@ function te(t, n, e = {}) {
|
|
|
1777
1777
|
else n.startsWith("custom:") ? i = new CustomEvent(n, { ...r, detail: r.detail }) : i = new Event(n, r);
|
|
1778
1778
|
return t.dispatchEvent(i), i;
|
|
1779
1779
|
}
|
|
1780
|
-
function ne(t, { delta: n = 1, delay: e = 20, disableTransitions:
|
|
1780
|
+
function ne(t, { delta: n = 1, delay: e = 20, disableTransitions: o = !0 } = {}) {
|
|
1781
1781
|
if (!t || !(t instanceof HTMLElement)) return;
|
|
1782
|
-
const r = t.style,
|
|
1782
|
+
const r = t.style, s = {
|
|
1783
1783
|
width: r.width,
|
|
1784
1784
|
height: r.height,
|
|
1785
1785
|
transition: r.transition
|
|
1786
1786
|
}, c = t.getBoundingClientRect(), i = c.width, u = c.height;
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1787
|
+
o && (r.transition = "none");
|
|
1788
|
+
const l = (a) => /%|em|rem/.test(a);
|
|
1789
|
+
r.width = s.width && l(s.width) ? `calc(${s.width} + ${n}px)` : `${Math.max(0, i + n)}px`, r.height = s.height && l(s.height) ? `calc(${s.height} + ${n}px)` : `${Math.max(0, u + n)}px`, t.offsetWidth, setTimeout(() => {
|
|
1790
|
+
r.width = s.width, r.height = s.height, t.offsetWidth, requestAnimationFrame(() => {
|
|
1791
|
+
o && (r.transition = s.transition);
|
|
1790
1792
|
});
|
|
1791
1793
|
}, e);
|
|
1792
1794
|
}
|
|
@@ -1855,7 +1857,7 @@ export {
|
|
|
1855
1857
|
Zt as c,
|
|
1856
1858
|
ln as d,
|
|
1857
1859
|
Cn as e,
|
|
1858
|
-
|
|
1860
|
+
En as f,
|
|
1859
1861
|
pn as g,
|
|
1860
1862
|
at as h,
|
|
1861
1863
|
Ut as i,
|
|
@@ -1864,7 +1866,7 @@ export {
|
|
|
1864
1866
|
_n as l,
|
|
1865
1867
|
sn as m,
|
|
1866
1868
|
Pt as n,
|
|
1867
|
-
|
|
1869
|
+
gn as o,
|
|
1868
1870
|
mt as p,
|
|
1869
1871
|
p as q,
|
|
1870
1872
|
on as r,
|