waveform-analysis 0.1.32 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +418 -400
- package/dist/types/components/WaveformChart.vue.d.ts +1 -0
- package/dist/types/components/core/trackLayoutBuilder.d.ts +2 -1
- package/dist/types/components/core/useWaveformChartController.d.ts +1 -0
- package/dist/types/components/core/waveformChartTypes.d.ts +3 -2
- package/dist/types/components/core/xDomain.d.ts +3 -0
- package/dist/types/components/data/types.d.ts +1 -1
- package/dist/types/components/waveform.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/chart.d.ts +10 -0
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/WaveformChart.vue +1 -0
- package/src/components/core/trackLayoutBuilder.ts +19 -7
- package/src/components/core/useWaveformChartLifecycle.ts +1 -0
- package/src/components/core/useWaveformLayout.ts +19 -6
- package/src/components/core/waveformChartTypes.ts +3 -0
- package/src/components/core/xDomain.test.ts +28 -0
- package/src/components/core/xDomain.ts +25 -0
- package/src/components/data/types.ts +1 -0
- package/src/components/waveform.ts +1 -0
- package/src/components/waveformChartCases/viewportReset.test.ts +35 -0
- package/src/components/waveformChartCases/xDomainStrategy.test.ts +96 -0
- package/src/index.ts +1 -0
- package/src/types/chart.ts +11 -0
- package/src/types/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, getCurrentInstance as l, markRaw as u, nextTick as d, normalizeClass as f, normalizeStyle as p, onBeforeUnmount as m, onMounted as h, openBlock as g, reactive as _, ref as v, renderList as y, shallowReactive as b, shallowRef as x, toDisplayString as S, toRefs as C, unref as w, vModelText as T, watch as E, watchEffect as D, withDirectives as O, withModifiers as k } from "vue";
|
|
2
|
-
import { axisBottom as A, axisLeft as j, axisRight as M, bisector as N, curveStep as P, curveStepAfter as F, curveStepBefore as I, extent as L, line as R, pointer as z, scaleLinear as B, select as V, symbol as H, symbolCircle as U, symbolDiamond as ee, symbolSquare as
|
|
3
|
-
import { Pagination as
|
|
4
|
-
import { ColorPicker as
|
|
2
|
+
import { axisBottom as A, axisLeft as j, axisRight as M, bisector as N, curveStep as P, curveStepAfter as F, curveStepBefore as I, extent as L, line as R, pointer as z, scaleLinear as B, select as V, symbol as H, symbolCircle as U, symbolDiamond as ee, symbolSquare as te, symbolTriangle as ne, zoom as W, zoomIdentity as G, zoomTransform as re } from "d3";
|
|
3
|
+
import { Pagination as ie } from "ant-design-vue";
|
|
4
|
+
import { ColorPicker as K } from "vue3-colorpicker";
|
|
5
5
|
import "vue3-colorpicker/style.css";
|
|
6
6
|
//#region src/utils/waveformId.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
7
|
+
var ae = 0;
|
|
8
|
+
function oe(e = "waveform") {
|
|
9
9
|
let t = l();
|
|
10
|
-
return `${e}-${t ? `v${t.uid}` : `f${++
|
|
10
|
+
return `${e}-${t ? `v${t.uid}` : `f${++ae}`}`;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/components/annotation/annotationLayout.ts
|
|
14
|
-
function
|
|
14
|
+
function se(e, t) {
|
|
15
15
|
return e >= Math.min(t[0], t[1]) && e <= Math.max(t[0], t[1]);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function ce(e, t, n) {
|
|
18
18
|
let r = Math.max(0, Math.min(e.x, Math.max(0, t - e.width))), i = Math.max(0, Math.min(e.y, Math.max(0, n - e.height)));
|
|
19
19
|
return {
|
|
20
20
|
...e,
|
|
@@ -24,11 +24,11 @@ function se(e, t, n) {
|
|
|
24
24
|
lineEndY: Math.max(i, Math.min(e.lineEndY, i + e.height))
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
let s =
|
|
27
|
+
function le(e, t, n, r, i, a, o) {
|
|
28
|
+
let s = fe(e, t, n, r, i);
|
|
29
29
|
return s.x >= 0 && s.y >= 0 && s.x + n <= a && s.y + r <= o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ue(e, t, n, r, i, a) {
|
|
32
32
|
for (let o of [
|
|
33
33
|
"top",
|
|
34
34
|
"bottom",
|
|
@@ -38,10 +38,10 @@ function le(e, t, n, r, i, a) {
|
|
|
38
38
|
"top-left",
|
|
39
39
|
"bottom-right",
|
|
40
40
|
"bottom-left"
|
|
41
|
-
]) if (
|
|
41
|
+
]) if (le(e, t, n, r, o, i, a)) return o;
|
|
42
42
|
return "top";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function de(e, t, n) {
|
|
45
45
|
let r = e.x + e.width / 2, i = e.y + e.height / 2, a = t - r, o = n - i;
|
|
46
46
|
if (Math.abs(a) * e.height > Math.abs(o) * e.width) {
|
|
47
47
|
let t = a >= 0 ? e.x + e.width : e.x, n = a === 0 ? 0 : (t - r) / a;
|
|
@@ -56,7 +56,7 @@ function ue(e, t, n) {
|
|
|
56
56
|
y: s
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function fe(e, t, n, r, i) {
|
|
60
60
|
let a = e - n / 2, o = t - r / 2, s = e + 32, c = e - n - 32, l = t - r - 32, u = t + 32;
|
|
61
61
|
switch (i) {
|
|
62
62
|
case "top": return {
|
|
@@ -93,36 +93,36 @@ function de(e, t, n, r, i) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function q(e, t, n) {
|
|
97
97
|
return {
|
|
98
98
|
width: Math.min(t, Math.max(16, Math.min(240, Math.ceil(Math.max(...e.map(be), 0)) + 16))),
|
|
99
99
|
height: Math.min(n, Math.max(26, (e.length - 1) * 16 + 14 + 16))
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
let { width: c, height: l } =
|
|
102
|
+
function pe(e, t, n, r, i, a, o = 0, s = 0) {
|
|
103
|
+
let { width: c, height: l } = q(n, r, i), u = fe(e, t, c, l, a), d = ce({
|
|
104
104
|
x: u.x + o,
|
|
105
105
|
y: u.y + s,
|
|
106
106
|
width: c,
|
|
107
107
|
height: l,
|
|
108
108
|
lineEndX: e,
|
|
109
109
|
lineEndY: t
|
|
110
|
-
}, r, i), f =
|
|
110
|
+
}, r, i), f = de(d, e, t);
|
|
111
111
|
return {
|
|
112
112
|
...d,
|
|
113
113
|
lineEndX: f.x,
|
|
114
114
|
lineEndY: f.y
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function me(e, t, n, r) {
|
|
118
118
|
let i = [];
|
|
119
119
|
return e.forEach((e) => {
|
|
120
120
|
if (!xe(e)) return;
|
|
121
121
|
let a = t.find((t) => t.series.id === e.seriesId);
|
|
122
122
|
if (!a) return;
|
|
123
123
|
let o = a.xScale.domain(), s = a.yScale.domain();
|
|
124
|
-
if (!
|
|
125
|
-
let c = Se(e.text), l = a.left ?? 0, u = a.width ?? n, d = a.xScale(e.x), f = l + d, p = a.yScale(e.y) + a.top, m = Math.min(a.height, Math.max(0, r - a.top)), h = p - a.top, g = Number.isFinite(e.labelOffsetX) && e.labelOffsetX !== 0 || Number.isFinite(e.labelOffsetY) && e.labelOffsetY !== 0, { width: _, height: v } =
|
|
124
|
+
if (!se(e.x, o) || !se(e.y, s)) return;
|
|
125
|
+
let c = Se(e.text), l = a.left ?? 0, u = a.width ?? n, d = a.xScale(e.x), f = l + d, p = a.yScale(e.y) + a.top, m = Math.min(a.height, Math.max(0, r - a.top)), h = p - a.top, g = Number.isFinite(e.labelOffsetX) && e.labelOffsetX !== 0 || Number.isFinite(e.labelOffsetY) && e.labelOffsetY !== 0, { width: _, height: v } = q(c, u, m), y = g ? "top" : ue(d, h, _, v, u, m), b = pe(d, h, c, u, m, y, Number.isFinite(e.labelOffsetX) ? e.labelOffsetX : 0, Number.isFinite(e.labelOffsetY) ? e.labelOffsetY : 0), x = {
|
|
126
126
|
...b,
|
|
127
127
|
x: b.x + l,
|
|
128
128
|
y: b.y + a.top,
|
|
@@ -143,14 +143,14 @@ function pe(e, t, n, r) {
|
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/components/annotation/markup.ts
|
|
146
|
-
var
|
|
146
|
+
var J = {
|
|
147
147
|
borderColor: "#1677ff",
|
|
148
148
|
textColor: "#333333",
|
|
149
149
|
backgroundColor: "rgba(255, 255, 255, 0.92)"
|
|
150
|
-
},
|
|
150
|
+
}, he = "12px Arial, sans-serif", Y = N((e) => e.x);
|
|
151
151
|
function ge(e, t) {
|
|
152
152
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
153
|
-
let n =
|
|
153
|
+
let n = Y.center(e, t), r = e[Math.min(n, e.length - 1)], i = e[Math.max(0, n - 1)];
|
|
154
154
|
return Math.abs(t - i.x) < Math.abs(r.x - t) ? i : r;
|
|
155
155
|
}
|
|
156
156
|
function _e(e, t, n = "linear") {
|
|
@@ -158,7 +158,7 @@ function _e(e, t, n = "linear") {
|
|
|
158
158
|
let r = e[0], i = e[e.length - 1];
|
|
159
159
|
if (t < r.x || t > i.x) return null;
|
|
160
160
|
if (e.length === 1) return t === r.x ? { ...r } : null;
|
|
161
|
-
let a =
|
|
161
|
+
let a = Y.left(e, t), o = e[Math.min(a, e.length - 1)];
|
|
162
162
|
if (o.x === t || a === 0) return {
|
|
163
163
|
x: t,
|
|
164
164
|
y: o.y
|
|
@@ -199,7 +199,7 @@ function ve(e, t, n, r) {
|
|
|
199
199
|
trackIndex: e.index,
|
|
200
200
|
seriesId: e.series.id,
|
|
201
201
|
name: e.series.name?.trim() || e.series.id,
|
|
202
|
-
color: e.series.color ||
|
|
202
|
+
color: e.series.color || J.borderColor,
|
|
203
203
|
unit: e.series.unit,
|
|
204
204
|
point: a,
|
|
205
205
|
screenX: c,
|
|
@@ -213,13 +213,13 @@ function ye(e) {
|
|
|
213
213
|
return Array.from(e).reduce((e, t) => e + (t.codePointAt(0) > 255 ? 12 : 6.7), 0);
|
|
214
214
|
}
|
|
215
215
|
function be(e) {
|
|
216
|
-
return X === void 0 && (X = null, typeof document < "u" && typeof CanvasRenderingContext2D < "u" && (X = document.createElement("canvas").getContext("2d"), X && (X.font =
|
|
216
|
+
return X === void 0 && (X = null, typeof document < "u" && typeof CanvasRenderingContext2D < "u" && (X = document.createElement("canvas").getContext("2d"), X && (X.font = he))), X?.measureText(e).width ?? ye(e);
|
|
217
217
|
}
|
|
218
218
|
function Z(e) {
|
|
219
219
|
return {
|
|
220
|
-
borderColor: e?.borderColor ||
|
|
221
|
-
textColor: e?.textColor ||
|
|
222
|
-
backgroundColor: e?.backgroundColor ||
|
|
220
|
+
borderColor: e?.borderColor || J.borderColor,
|
|
221
|
+
textColor: e?.textColor || J.textColor,
|
|
222
|
+
backgroundColor: e?.backgroundColor || J.backgroundColor
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
function xe(e) {
|
|
@@ -425,7 +425,7 @@ var Ce = [
|
|
|
425
425
|
x: b(t).x + b(t).width / 2,
|
|
426
426
|
y: b(t).y + b(t).height / 2 - (t.lines.length - 1) * w(16) / 2,
|
|
427
427
|
fill: t.style.textColor,
|
|
428
|
-
style: p({ font: w(
|
|
428
|
+
style: p({ font: w(he) }),
|
|
429
429
|
"text-anchor": "middle",
|
|
430
430
|
"dominant-baseline": "central"
|
|
431
431
|
}, [(g(!0), i(e, null, y(t.lines, (e, n) => (g(), i("tspan", {
|
|
@@ -1073,8 +1073,23 @@ function nn(e, t) {
|
|
|
1073
1073
|
return n;
|
|
1074
1074
|
}
|
|
1075
1075
|
//#endregion
|
|
1076
|
+
//#region src/components/core/xDomain.ts
|
|
1077
|
+
var rn = 10;
|
|
1078
|
+
function an(e) {
|
|
1079
|
+
return !Number.isFinite(e) || (e ?? 0) < 1 ? rn : Math.max(1, Math.trunc(e));
|
|
1080
|
+
}
|
|
1081
|
+
function on(e, t, n = !1) {
|
|
1082
|
+
if (t.type !== "nice" || n && !t.includeExplicit) return [...e];
|
|
1083
|
+
let r = B().domain(e).nice(an(t.tickCount)).domain();
|
|
1084
|
+
return t.bounds === "end" ? [e[0], r[1]] : r;
|
|
1085
|
+
}
|
|
1086
|
+
//#endregion
|
|
1076
1087
|
//#region src/components/core/trackLayoutBuilder.ts
|
|
1077
|
-
function
|
|
1088
|
+
function sn(e, t, n) {
|
|
1089
|
+
let r = n.xDomainStrategy ?? { type: "data" }, i = n.initialXDomains?.[e.id] ?? n.initialXDomains?.[t] ?? n.initialXDomain;
|
|
1090
|
+
return i ? on(i, r, !0) : on(e.xDomain, r);
|
|
1091
|
+
}
|
|
1092
|
+
function cn(e) {
|
|
1078
1093
|
let t = e.cells.map((e) => ({
|
|
1079
1094
|
...e,
|
|
1080
1095
|
hasSeries: !!e.series
|
|
@@ -1104,7 +1119,7 @@ function rn(e) {
|
|
|
1104
1119
|
visibleSeries: [a],
|
|
1105
1120
|
xDomain: a.xDomain,
|
|
1106
1121
|
yDomain: a.yDomain
|
|
1107
|
-
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(
|
|
1122
|
+
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(sn(o, c.id, e), [0, t.width]) : B(e.sharedZoomDomain, [0, t.width]), u = (e.displayMode === "independent" ? e.independentTransforms[r] ?? G : G).rescaleX(l), d = e.yDomains?.[o.id], f = _n(o, e.overlayMode, e.fixedYDomain, e.fixedYDomains).map((e) => !e.fixed && d ? {
|
|
1108
1123
|
...e,
|
|
1109
1124
|
domain: d
|
|
1110
1125
|
} : e), p = {
|
|
@@ -1117,7 +1132,7 @@ function rn(e) {
|
|
|
1117
1132
|
a,
|
|
1118
1133
|
...c,
|
|
1119
1134
|
...s ? [o] : []
|
|
1120
|
-
])), { tickTextWidth: u } =
|
|
1135
|
+
])), { tickTextWidth: u } = vn(n.domain, !n.fixed, l), d = u + 7 + 6 + 24 + 4, f = n.side === "left" ? -p.left : t.width + p.right, m = u + 7 + 6 + 24 / 2, h = f + (n.side === "left" ? -m : m);
|
|
1121
1136
|
return p[n.side] += d, {
|
|
1122
1137
|
index: n.index,
|
|
1123
1138
|
side: n.side,
|
|
@@ -1188,8 +1203,8 @@ function rn(e) {
|
|
|
1188
1203
|
}
|
|
1189
1204
|
//#endregion
|
|
1190
1205
|
//#region src/components/core/layout.ts
|
|
1191
|
-
var
|
|
1192
|
-
function
|
|
1206
|
+
var ln = 7, un = 7, dn = 4, fn = 6, pn = 24;
|
|
1207
|
+
function mn(e) {
|
|
1193
1208
|
return e >= 4 ? [
|
|
1194
1209
|
"left",
|
|
1195
1210
|
"left",
|
|
@@ -1201,13 +1216,13 @@ function un(e) {
|
|
|
1201
1216
|
"right"
|
|
1202
1217
|
] : e === 2 ? ["left", "right"] : ["left"];
|
|
1203
1218
|
}
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1206
|
-
let n =
|
|
1207
|
-
n || (n = /* @__PURE__ */ new Map(),
|
|
1219
|
+
var hn = /* @__PURE__ */ new WeakMap();
|
|
1220
|
+
function gn(e, t) {
|
|
1221
|
+
let n = hn.get(e);
|
|
1222
|
+
n || (n = /* @__PURE__ */ new Map(), hn.set(e, n));
|
|
1208
1223
|
let r = n.get(t);
|
|
1209
1224
|
if (r) return r;
|
|
1210
|
-
let i = t === "multi-axis" ? Math.min(e.visibleSeries.length, 4) : Math.min(e.visibleSeries.length, 1), a =
|
|
1225
|
+
let i = t === "multi-axis" ? Math.min(e.visibleSeries.length, 4) : Math.min(e.visibleSeries.length, 1), a = mn(i), o = Array.from({ length: i }, (e, t) => ({
|
|
1211
1226
|
index: t,
|
|
1212
1227
|
side: a[t],
|
|
1213
1228
|
seriesList: [],
|
|
@@ -1224,9 +1239,9 @@ function fn(e, t) {
|
|
|
1224
1239
|
}
|
|
1225
1240
|
}), n.set(t, o), o;
|
|
1226
1241
|
}
|
|
1227
|
-
function
|
|
1242
|
+
function _n(e, t, n, r) {
|
|
1228
1243
|
let i = xt(e, r);
|
|
1229
|
-
return
|
|
1244
|
+
return gn(e, t).map((e) => {
|
|
1230
1245
|
if (i) return {
|
|
1231
1246
|
...e,
|
|
1232
1247
|
domain: i,
|
|
@@ -1240,7 +1255,7 @@ function pn(e, t, n, r) {
|
|
|
1240
1255
|
} : e;
|
|
1241
1256
|
});
|
|
1242
1257
|
}
|
|
1243
|
-
function
|
|
1258
|
+
function vn(e, t = !0, n) {
|
|
1244
1259
|
let r = B(e, [1, 0]);
|
|
1245
1260
|
t && r.nice();
|
|
1246
1261
|
let [i, a] = r.domain(), o = n ?? Array.from(/* @__PURE__ */ new Set([
|
|
@@ -1252,21 +1267,21 @@ function mn(e, t = !0, n) {
|
|
|
1252
1267
|
axisMin: i,
|
|
1253
1268
|
axisMax: a,
|
|
1254
1269
|
topTickValue: s
|
|
1255
|
-
}).length)) *
|
|
1270
|
+
}).length)) * ln };
|
|
1256
1271
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
1272
|
+
function yn(e) {
|
|
1273
|
+
return vn(e.domain, !e.fixed).tickTextWidth + un + fn + pn + dn;
|
|
1259
1274
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return
|
|
1275
|
+
function bn(e) {
|
|
1276
|
+
return vn(e.domain, !e.fixed).tickTextWidth + un + dn;
|
|
1262
1277
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return
|
|
1278
|
+
function xn(e, t, n, r) {
|
|
1279
|
+
return _n(e, t, n, r).reduce((n, r) => (n[r.side] += t === "multi-axis" || e.visibleSeries.length === 1 ? yn(r) : bn(r), n), {
|
|
1265
1280
|
left: 0,
|
|
1266
1281
|
right: 0
|
|
1267
1282
|
});
|
|
1268
1283
|
}
|
|
1269
|
-
function
|
|
1284
|
+
function Sn(e, t, n) {
|
|
1270
1285
|
let r = (e) => {
|
|
1271
1286
|
let r = t < e.left ? e.left - t : t > e.left + e.width ? t - e.left - e.width : 0;
|
|
1272
1287
|
return n < e.top ? e.top - n : n > e.top + e.height ? n - (e.top + e.height) : r;
|
|
@@ -1285,11 +1300,11 @@ function vn(e, t, n) {
|
|
|
1285
1300
|
}
|
|
1286
1301
|
//#endregion
|
|
1287
1302
|
//#region src/components/annotation/useWaveformChartAnnotations.ts
|
|
1288
|
-
var
|
|
1289
|
-
function
|
|
1290
|
-
return
|
|
1303
|
+
var Cn = 0;
|
|
1304
|
+
function wn() {
|
|
1305
|
+
return Cn += 1, typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `annotation-${Date.now()}-${Cn}`;
|
|
1291
1306
|
}
|
|
1292
|
-
function
|
|
1307
|
+
function Tn(e) {
|
|
1293
1308
|
let { props: t, emit: n, container: r, chartSeries: i, hiddenSeriesIdSet: a, internalHiddenSeriesIds: o, annotationInteraction: s, editorSeriesOptions: c, trackLayouts: l, annotationLayoutsForTrack: u, resolveSeriesYScale: d, chartWidth: f, chartHeight: p, innerWidth: m, resolvedChartLeftMargin: h, titleAreaHeight: g, chartTopMargin: _, activeInteractionMode: v, isPresentationMode: y } = e;
|
|
1294
1309
|
function b(e) {
|
|
1295
1310
|
if (!i.value.some((t) => t.id === e)) return;
|
|
@@ -1322,7 +1337,7 @@ function xn(e) {
|
|
|
1322
1337
|
};
|
|
1323
1338
|
}
|
|
1324
1339
|
function C(e, t, n) {
|
|
1325
|
-
s.openCreate(e,
|
|
1340
|
+
s.openCreate(e, wn, t), c.value = n;
|
|
1326
1341
|
let r = s.editorDraft.value, i = l.value.find((t) => t.index === e.trackIndex)?.seriesList.find((t) => t.id === e.seriesId);
|
|
1327
1342
|
r?.mode === "add" && (r.annotation.style = {
|
|
1328
1343
|
borderColor: i?.color || "#1677ff",
|
|
@@ -1351,7 +1366,7 @@ function xn(e) {
|
|
|
1351
1366
|
let e = l.value[n];
|
|
1352
1367
|
return e?.hasVisibleSeries ? e : void 0;
|
|
1353
1368
|
}
|
|
1354
|
-
return
|
|
1369
|
+
return Sn(l.value.filter((e) => e.hasVisibleSeries), e, t);
|
|
1355
1370
|
}
|
|
1356
1371
|
function D(e, t) {
|
|
1357
1372
|
let n = e.currentTarget;
|
|
@@ -1439,8 +1454,8 @@ function xn(e) {
|
|
|
1439
1454
|
}
|
|
1440
1455
|
//#endregion
|
|
1441
1456
|
//#region src/components/interaction/useWaveformHover.ts
|
|
1442
|
-
var
|
|
1443
|
-
function
|
|
1457
|
+
var En = N((e) => e.x);
|
|
1458
|
+
function Dn(e) {
|
|
1444
1459
|
let { emit: t, hoverState: n, suppressHoverUntilMove: r, hoverThrottle: i, selection: a, trackLayouts: o, innerWidth: s, resolvedChartLeftMargin: c, titleAreaHeight: l, chartTopMargin: u, sharedOverlayElement: d, isPresentationMode: f, updateViewportDrag: p, resolveTrackAtPointer: m } = e, h = () => i.cancel(), g = (e) => i.schedule(e), _ = (e) => n.points.length === e.length && e.every((e, t) => {
|
|
1445
1460
|
let r = n.points[t];
|
|
1446
1461
|
return r?.id === e.id && r.trackIndex === e.trackIndex && r.point === e.point;
|
|
@@ -1461,7 +1476,7 @@ function Cn(e) {
|
|
|
1461
1476
|
r.value = !0, y();
|
|
1462
1477
|
}, C = (e = !1) => {
|
|
1463
1478
|
r.value = !e, y();
|
|
1464
|
-
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[
|
|
1479
|
+
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[En.center(e.points, t)];
|
|
1465
1480
|
return {
|
|
1466
1481
|
cancelPendingHover: h,
|
|
1467
1482
|
clearHover: y,
|
|
@@ -1516,14 +1531,14 @@ function Cn(e) {
|
|
|
1516
1531
|
}
|
|
1517
1532
|
//#endregion
|
|
1518
1533
|
//#region src/components/interaction/pointerCapture.ts
|
|
1519
|
-
function
|
|
1534
|
+
function On(e, t) {
|
|
1520
1535
|
try {
|
|
1521
1536
|
e?.releasePointerCapture?.(t);
|
|
1522
1537
|
} catch {}
|
|
1523
1538
|
}
|
|
1524
1539
|
//#endregion
|
|
1525
1540
|
//#region src/components/interaction/viewportInteractionState.ts
|
|
1526
|
-
function
|
|
1541
|
+
function kn(e) {
|
|
1527
1542
|
return {
|
|
1528
1543
|
...e,
|
|
1529
1544
|
currentX: e.startX,
|
|
@@ -1532,37 +1547,37 @@ function Tn(e) {
|
|
|
1532
1547
|
yDomains: Object.fromEntries(Object.entries(e.yDomains).map(([e, t]) => [e, [...t]]))
|
|
1533
1548
|
};
|
|
1534
1549
|
}
|
|
1535
|
-
function
|
|
1550
|
+
function An(e, t) {
|
|
1536
1551
|
return {
|
|
1537
1552
|
...e,
|
|
1538
1553
|
...t
|
|
1539
1554
|
};
|
|
1540
1555
|
}
|
|
1541
|
-
function
|
|
1556
|
+
function jn(e) {
|
|
1542
1557
|
return {
|
|
1543
1558
|
state: e,
|
|
1544
1559
|
accepted: !1,
|
|
1545
1560
|
completed: null
|
|
1546
1561
|
};
|
|
1547
1562
|
}
|
|
1548
|
-
function
|
|
1563
|
+
function Mn(e, t) {
|
|
1549
1564
|
switch (t.type) {
|
|
1550
|
-
case "begin": return e ?
|
|
1551
|
-
state:
|
|
1565
|
+
case "begin": return e ? jn(e) : {
|
|
1566
|
+
state: kn(t.gesture),
|
|
1552
1567
|
accepted: !0,
|
|
1553
1568
|
completed: null
|
|
1554
1569
|
};
|
|
1555
|
-
case "move": return !e || e.pointerId !== t.pointerId ?
|
|
1556
|
-
state:
|
|
1570
|
+
case "move": return !e || e.pointerId !== t.pointerId ? jn(e) : {
|
|
1571
|
+
state: An(e, t.position),
|
|
1557
1572
|
accepted: !0,
|
|
1558
1573
|
completed: null
|
|
1559
1574
|
};
|
|
1560
|
-
case "finish": return !e || e.pointerId !== t.pointerId ?
|
|
1575
|
+
case "finish": return !e || e.pointerId !== t.pointerId ? jn(e) : {
|
|
1561
1576
|
state: null,
|
|
1562
1577
|
accepted: !0,
|
|
1563
|
-
completed:
|
|
1578
|
+
completed: An(e, t.position)
|
|
1564
1579
|
};
|
|
1565
|
-
case "cancel": return !e || t.pointerId !== void 0 && e.pointerId !== t.pointerId ?
|
|
1580
|
+
case "cancel": return !e || t.pointerId !== void 0 && e.pointerId !== t.pointerId ? jn(e) : {
|
|
1566
1581
|
state: null,
|
|
1567
1582
|
accepted: !0,
|
|
1568
1583
|
completed: null
|
|
@@ -1576,26 +1591,26 @@ function On(e, t) {
|
|
|
1576
1591
|
}
|
|
1577
1592
|
//#endregion
|
|
1578
1593
|
//#region src/components/interaction/zoomConstraints.ts
|
|
1579
|
-
var
|
|
1580
|
-
function
|
|
1594
|
+
var Nn = /* @__PURE__ */ new WeakMap();
|
|
1595
|
+
function Pn(e) {
|
|
1581
1596
|
return e[0] <= e[1] ? [...e] : [e[1], e[0]];
|
|
1582
1597
|
}
|
|
1583
|
-
function
|
|
1598
|
+
function Fn(e) {
|
|
1584
1599
|
return Number.isFinite(e) && (e ?? 0) > 0 ? Math.ceil(e) : 0;
|
|
1585
1600
|
}
|
|
1586
|
-
function
|
|
1587
|
-
let n = `${t[0]}\u0000${t[1]}`, r =
|
|
1601
|
+
function In(e, t) {
|
|
1602
|
+
let n = `${t[0]}\u0000${t[1]}`, r = Nn.get(e)?.get(n);
|
|
1588
1603
|
if (r) return r;
|
|
1589
1604
|
let i = /* @__PURE__ */ new Set();
|
|
1590
1605
|
for (let n of e) for (let e of n.points) e.x >= t[0] && e.x <= t[1] && i.add(e.x);
|
|
1591
|
-
let a = Array.from(i).sort((e, t) => e - t), o =
|
|
1592
|
-
return o.set(n, a),
|
|
1606
|
+
let a = Array.from(i).sort((e, t) => e - t), o = Nn.get(e) ?? /* @__PURE__ */ new Map();
|
|
1607
|
+
return o.set(n, a), Nn.set(e, o), a;
|
|
1593
1608
|
}
|
|
1594
|
-
function
|
|
1609
|
+
function Ln(e, t, n) {
|
|
1595
1610
|
if (n <= 1) return 0;
|
|
1596
1611
|
let r = 0;
|
|
1597
1612
|
for (let i of e) {
|
|
1598
|
-
let e =
|
|
1613
|
+
let e = In(i, t);
|
|
1599
1614
|
if (e.length < n) return t[1] - t[0];
|
|
1600
1615
|
let a = Infinity;
|
|
1601
1616
|
for (let t = 0; t + n <= e.length; t += 1) a = Math.min(a, e[t + n - 1] - e[t]);
|
|
@@ -1604,17 +1619,17 @@ function Nn(e, t, n) {
|
|
|
1604
1619
|
}
|
|
1605
1620
|
return r;
|
|
1606
1621
|
}
|
|
1607
|
-
function
|
|
1608
|
-
let r =
|
|
1622
|
+
function Rn(e, t, n) {
|
|
1623
|
+
let r = Pn(e), i = r[1] - r[0];
|
|
1609
1624
|
if (!Number.isFinite(i) || i <= 0) return 0;
|
|
1610
|
-
let a = Number.isFinite(n.minZoomSpan) && (n.minZoomSpan ?? 0) > 0 ? Math.min(i, n.minZoomSpan) : 0, o =
|
|
1625
|
+
let a = Number.isFinite(n.minZoomSpan) && (n.minZoomSpan ?? 0) > 0 ? Math.min(i, n.minZoomSpan) : 0, o = Fn(n.minVisiblePoints), s = Ln(t, r, o);
|
|
1611
1626
|
return a > 0 || o > 0 ? Math.max(a, s) : i / mt.DEFAULT_MAX_SCALE;
|
|
1612
1627
|
}
|
|
1613
|
-
function
|
|
1628
|
+
function zn(e, t, n, r) {
|
|
1614
1629
|
if (r <= 0) return e;
|
|
1615
1630
|
let i = 2 ** -52 * Math.max(1, Math.abs(t[0]), Math.abs(t[1])) * 16, a = e;
|
|
1616
1631
|
for (let e of n) {
|
|
1617
|
-
let n =
|
|
1632
|
+
let n = In(e, t);
|
|
1618
1633
|
if (n.length < r) return [...t];
|
|
1619
1634
|
if (n.filter((e) => e >= a[0] && e <= a[1]).length >= r) continue;
|
|
1620
1635
|
let o, s = Infinity, c = Infinity, l = (a[0] + a[1]) / 2;
|
|
@@ -1626,27 +1641,27 @@ function Fn(e, t, n, r) {
|
|
|
1626
1641
|
}
|
|
1627
1642
|
return a;
|
|
1628
1643
|
}
|
|
1629
|
-
function
|
|
1630
|
-
let i =
|
|
1644
|
+
function Bn(e, t, n, r) {
|
|
1645
|
+
let i = Pn(t), a = i[1] - i[0];
|
|
1631
1646
|
if (!Number.isFinite(a) || a <= 0 || Math.abs(e[1] - e[0]) >= a * .999999999999) return i;
|
|
1632
|
-
let o =
|
|
1647
|
+
let o = zn([Math.max(i[0], Math.min(e[0], e[1])), Math.min(i[1], Math.max(e[0], e[1]))], i, n, Fn(r.minVisiblePoints)), s = Rn(i, n, r), c = Math.max(s, Math.min(a, o[1] - o[0])), l = (o[0] + o[1]) / 2, u = Math.max(i[0], Math.min(l - c / 2, i[1] - c));
|
|
1633
1648
|
return [u, u + c];
|
|
1634
1649
|
}
|
|
1635
|
-
function
|
|
1650
|
+
function Vn(e, t, n) {
|
|
1636
1651
|
let r = t[1] - t[0], i = e[1] - e[0];
|
|
1637
|
-
if (!Number.isFinite(r) || !Number.isFinite(i) || r <= 0 || i <= 0) return
|
|
1652
|
+
if (!Number.isFinite(r) || !Number.isFinite(i) || r <= 0 || i <= 0) return G;
|
|
1638
1653
|
let a = r / i, o = B(t, [0, n]);
|
|
1639
|
-
return
|
|
1654
|
+
return G.translate(-a * o(e[0]), 0).scale(a);
|
|
1640
1655
|
}
|
|
1641
1656
|
//#endregion
|
|
1642
1657
|
//#region src/components/interaction/useWaveformViewport.ts
|
|
1643
|
-
function
|
|
1658
|
+
function Hn(e) {
|
|
1644
1659
|
let { props: n, emit: r, selection: i, spacePressed: a, trackLayouts: o, chartTracks: s, initialXDomain: c, innerWidth: l, innerHeight: u, sharedOverlayElement: f, sharedTransform: p, independentTransforms: m, sharedYDomains: h, independentYDomains: g, isZoomMode: _, isPresentationMode: v, editorSeriesOptions: y, resolveInitialTrackDomain: b, canZoomTrack: S, canZoomSharedTracks: C, configureZoom: w, cancelPendingZoom: T, clearHover: E, resolveTrackAtPointer: D } = e, O = x(), k = (e, t) => {
|
|
1645
1660
|
let n = O.value, r = t?.currentTarget;
|
|
1646
|
-
|
|
1661
|
+
On(n, e), r && r !== n && On(r, e);
|
|
1647
1662
|
}, A = (e, t) => {
|
|
1648
1663
|
let n = i.value;
|
|
1649
|
-
!n || n.pointerId !== e || (k(e, t), i.value =
|
|
1664
|
+
!n || n.pointerId !== e || (k(e, t), i.value = Mn(i.value, {
|
|
1650
1665
|
type: "cancel",
|
|
1651
1666
|
pointerId: e
|
|
1652
1667
|
}).state, O.value = void 0);
|
|
@@ -1669,7 +1684,7 @@ function Rn(e) {
|
|
|
1669
1684
|
if (!n.zoomable && !s || !_.value || e.button !== 0) return;
|
|
1670
1685
|
let c = e.currentTarget, d = o.value.find((e) => e.index === t);
|
|
1671
1686
|
if (!d) return;
|
|
1672
|
-
let [f, p] = z(e, c), m = Math.max(0, Math.min(r ? d.width : l.value, f)), h = Math.max(0, Math.min(r ? d.height : u.value, p)), g =
|
|
1687
|
+
let [f, p] = z(e, c), m = Math.max(0, Math.min(r ? d.width : l.value, f)), h = Math.max(0, Math.min(r ? d.height : u.value, p)), g = Mn(i.value, {
|
|
1673
1688
|
type: "begin",
|
|
1674
1689
|
gesture: {
|
|
1675
1690
|
trackIndex: t,
|
|
@@ -1691,8 +1706,8 @@ function Rn(e) {
|
|
|
1691
1706
|
let i = t.width || 1, a = t.height || 1, u = e.currentX - e.startX, d = e.currentY - e.startY, f = e.xDomain[1] - e.xDomain[0], _ = e.independent ? b(t) : c.value, v = M([e.xDomain[0] - u / i * f, e.xDomain[1] - u / i * f], _);
|
|
1692
1707
|
if (e.independent) {
|
|
1693
1708
|
let e = [...m.value];
|
|
1694
|
-
e[t.index] =
|
|
1695
|
-
} else p.value =
|
|
1709
|
+
e[t.index] = Vn(v, _, i), m.value = e;
|
|
1710
|
+
} else p.value = Vn(v, _, l.value);
|
|
1696
1711
|
let y = e.independent ? [t] : o.value, x = { ...g.value }, S = { ...h.value };
|
|
1697
1712
|
y.forEach((t) => {
|
|
1698
1713
|
let r = s.value.find((e) => e.id === t.id);
|
|
@@ -1706,7 +1721,7 @@ function Rn(e) {
|
|
|
1706
1721
|
if (!t || !n || e.pointerId !== t.pointerId) return;
|
|
1707
1722
|
let r = o.value.find((e) => e.index === t.trackIndex);
|
|
1708
1723
|
if (!r) return;
|
|
1709
|
-
let [a, s] = z(e, n), c = Math.max(0, Math.min(t.independent ? r.width : l.value, a)), d = Math.max(0, Math.min(t.independent ? r.height : u.value, s)), f =
|
|
1724
|
+
let [a, s] = z(e, n), c = Math.max(0, Math.min(t.independent ? r.width : l.value, a)), d = Math.max(0, Math.min(t.independent ? r.height : u.value, s)), f = Mn(i.value, {
|
|
1710
1725
|
type: "move",
|
|
1711
1726
|
pointerId: e.pointerId,
|
|
1712
1727
|
position: {
|
|
@@ -1725,11 +1740,11 @@ function Rn(e) {
|
|
|
1725
1740
|
if (!t || (e.independent ? !S(t) : !C())) return;
|
|
1726
1741
|
let i = e.independent ? 0 : t.left, a = Math.max(0, Math.min(t.width, Math.min(e.startX, e.currentX) - i)), s = Math.max(0, Math.min(t.width, Math.max(e.startX, e.currentX) - i));
|
|
1727
1742
|
if (s - a < 6) return;
|
|
1728
|
-
let u = e.independent ? b(t) : c.value, f = e.independent ? [t.seriesList] : o.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), h =
|
|
1743
|
+
let u = e.independent ? b(t) : c.value, f = e.independent ? [t.seriesList] : o.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), h = Bn([t.xScale.invert(a), t.xScale.invert(s)], u, f, n);
|
|
1729
1744
|
if (e.independent) {
|
|
1730
1745
|
let e = [...m.value];
|
|
1731
|
-
e[t.index] =
|
|
1732
|
-
} else p.value =
|
|
1746
|
+
e[t.index] = Vn(h, u, t.width), m.value = e;
|
|
1747
|
+
} else p.value = Vn(h, u, l.value);
|
|
1733
1748
|
let g = e.independent ? [t] : o.value, _ = Object.fromEntries(g.map((e) => [e.series.trackId ?? e.series.id, e.yScale.domain()]));
|
|
1734
1749
|
if (r("zoom-change", h), e.independent) {
|
|
1735
1750
|
let e = _[t.series.trackId ?? t.series.id];
|
|
@@ -1770,7 +1785,7 @@ function Rn(e) {
|
|
|
1770
1785
|
A(t.pointerId, e);
|
|
1771
1786
|
return;
|
|
1772
1787
|
}
|
|
1773
|
-
let [a, s] = z(e, r), c = Math.max(0, Math.min(t.independent ? n.width : l.value, a)), f = Math.max(0, Math.min(t.independent ? n.height : u.value, s)), p =
|
|
1788
|
+
let [a, s] = z(e, r), c = Math.max(0, Math.min(t.independent ? n.width : l.value, a)), f = Math.max(0, Math.min(t.independent ? n.height : u.value, s)), p = Mn(i.value, {
|
|
1774
1789
|
type: "finish",
|
|
1775
1790
|
pointerId: e.pointerId,
|
|
1776
1791
|
position: {
|
|
@@ -1788,10 +1803,10 @@ function Rn(e) {
|
|
|
1788
1803
|
}, H = (e) => {
|
|
1789
1804
|
if (T(), R(), n.displayMode === "independent" && e !== void 0) {
|
|
1790
1805
|
let t = [...m.value];
|
|
1791
|
-
t[e] =
|
|
1806
|
+
t[e] = G, m.value = t;
|
|
1792
1807
|
let n = { ...g.value };
|
|
1793
1808
|
delete n[e], g.value = n;
|
|
1794
|
-
} else p.value =
|
|
1809
|
+
} else p.value = G, m.value = s.value.map(() => G), h.value = {}, g.value = {};
|
|
1795
1810
|
E(), y.value = [], d(w);
|
|
1796
1811
|
};
|
|
1797
1812
|
return {
|
|
@@ -1820,7 +1835,7 @@ function Rn(e) {
|
|
|
1820
1835
|
}
|
|
1821
1836
|
//#endregion
|
|
1822
1837
|
//#region src/components/utils/useAnimationFrameThrottle.ts
|
|
1823
|
-
function
|
|
1838
|
+
function Un() {
|
|
1824
1839
|
let e = null, t = null;
|
|
1825
1840
|
function n(n) {
|
|
1826
1841
|
t = n, e === null && (e = requestAnimationFrame(() => {
|
|
@@ -1849,8 +1864,8 @@ function zn() {
|
|
|
1849
1864
|
}
|
|
1850
1865
|
//#endregion
|
|
1851
1866
|
//#region src/components/interaction/useWaveformZoom.ts
|
|
1852
|
-
function
|
|
1853
|
-
let { props: t, emit: n, svgElement: r, sharedOverlayElement: i, sharedTransform: a, independentTransforms: o, trackLayouts: s, initialXDomain: c, sharedZoomDomain: l, innerWidth: u, innerHeight: d, hasChartArea: f, isZoomMode: p, isPresentationMode: m, resolveInitialTrackDomain: h, cancelPendingHover: g } = e, _ = /* @__PURE__ */ new Map(), v =
|
|
1867
|
+
function Wn(e) {
|
|
1868
|
+
let { props: t, emit: n, svgElement: r, sharedOverlayElement: i, sharedTransform: a, independentTransforms: o, trackLayouts: s, initialXDomain: c, sharedZoomDomain: l, innerWidth: u, innerHeight: d, hasChartArea: f, isZoomMode: p, isPresentationMode: m, resolveInitialTrackDomain: h, cancelPendingHover: g } = e, _ = /* @__PURE__ */ new Map(), v = Un(), y = !1, b = null, x = null, S = null, C = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Set(), D, O = () => v.schedule(j), k = (e) => {
|
|
1854
1869
|
y || m.value || (g(), b = e.transform, x = "wheel", O(), P());
|
|
1855
1870
|
}, A = (e, t) => {
|
|
1856
1871
|
y || m.value || (g(), C.set(t, e.transform), w.set(t, "wheel"), O(), P());
|
|
@@ -1938,9 +1953,9 @@ function Bn(e) {
|
|
|
1938
1953
|
}, L = (e, n) => {
|
|
1939
1954
|
let r = Math.abs(e[1] - e[0]);
|
|
1940
1955
|
if (!Number.isFinite(r) || r <= 0) return mt.MIN_SCALE;
|
|
1941
|
-
let i =
|
|
1956
|
+
let i = Rn(e, n, t);
|
|
1942
1957
|
return Math.max(mt.MIN_SCALE, i > 0 ? r / i : mt.DEFAULT_MAX_SCALE);
|
|
1943
|
-
}, R = (e, n, r, i) =>
|
|
1958
|
+
}, R = (e, n, r, i) => Vn(Bn(e.rescaleX(B(n, [0, r])).domain(), n, i, t), n, r), z = (e) => {
|
|
1944
1959
|
let n = Number(t.minVisiblePoints);
|
|
1945
1960
|
return Ut(e.seriesList, e.xScale.domain(), Number.isFinite(n) && n > 0 ? Math.ceil(n) + 1 : n);
|
|
1946
1961
|
}, H = () => {
|
|
@@ -1949,7 +1964,7 @@ function Bn(e) {
|
|
|
1949
1964
|
}, U = (e, t) => {
|
|
1950
1965
|
if (e.type !== "wheel") return !1;
|
|
1951
1966
|
let n = e.deltaY;
|
|
1952
|
-
return n < 0 ? t : n > 0 &&
|
|
1967
|
+
return n < 0 ? t : n > 0 && re(e.currentTarget).k > mt.MIN_SCALE;
|
|
1953
1968
|
};
|
|
1954
1969
|
return {
|
|
1955
1970
|
cancelPendingZoom: F,
|
|
@@ -1962,13 +1977,13 @@ function Bn(e) {
|
|
|
1962
1977
|
s.value.forEach((e) => {
|
|
1963
1978
|
let t = r.value?.querySelector(`[data-independent-overlay-index="${e.index}"]`);
|
|
1964
1979
|
if (!t) return;
|
|
1965
|
-
let n = h(e), i = [e.seriesList], a =
|
|
1980
|
+
let n = h(e), i = [e.seriesList], a = W().filter((t) => {
|
|
1966
1981
|
let n = s.value.find((t) => t.index === e.index) ?? e;
|
|
1967
1982
|
return U(t, z(n));
|
|
1968
1983
|
}).scaleExtent([1, L(n, i)]).constrain((t) => R(t, n, e.width, i)).extent([[0, 0], [e.width, e.height]]).translateExtent([[0, 0], [e.width, e.height]]).on("zoom", (t) => A(t, e.index)).on("end", N);
|
|
1969
1984
|
_.set(e.index, a), y = !0;
|
|
1970
1985
|
try {
|
|
1971
|
-
V(t).call(a).on("dblclick.zoom", null).call(a.transform, o.value[e.index] ??
|
|
1986
|
+
V(t).call(a).on("dblclick.zoom", null).call(a.transform, o.value[e.index] ?? G);
|
|
1972
1987
|
} finally {
|
|
1973
1988
|
y = !1;
|
|
1974
1989
|
}
|
|
@@ -1977,7 +1992,7 @@ function Bn(e) {
|
|
|
1977
1992
|
}
|
|
1978
1993
|
let e = i.value;
|
|
1979
1994
|
if (!e) return;
|
|
1980
|
-
let n = s.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), l =
|
|
1995
|
+
let n = s.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), l = W().filter((e) => U(e, H())).scaleExtent([1, L(c.value, n)]).constrain((e) => R(e, c.value, u.value, n)).extent([[0, 0], [u.value, d.value]]).translateExtent([[0, 0], [u.value, d.value]]).on("zoom", k).on("end", N);
|
|
1981
1996
|
_.set("shared", l), y = !0;
|
|
1982
1997
|
try {
|
|
1983
1998
|
V(e).call(l).on("dblclick.zoom", null).call(l.transform, a.value);
|
|
@@ -1989,45 +2004,45 @@ function Bn(e) {
|
|
|
1989
2004
|
}
|
|
1990
2005
|
//#endregion
|
|
1991
2006
|
//#region src/components/core/useWaveformChartLifecycle.ts
|
|
1992
|
-
function
|
|
2007
|
+
function Gn(e) {
|
|
1993
2008
|
return e instanceof Element && !!e.closest("button, input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])");
|
|
1994
2009
|
}
|
|
1995
|
-
function
|
|
2010
|
+
function Kn(e) {
|
|
1996
2011
|
let { props: t, emit: n, container: r, titleMeasureElement: i, resizeObserver: a, observedWidth: o, observedHeight: s, measuredTitleWidth: c, measuredTitleHeight: l, resolvedTitleText: u, titleAreaReserved: f, titleMeasureStyle: p, spacePressed: g, pointerInsideChart: _, currentPage: v, pageCount: y, pagedTracks: b, gridOptions: x, chartSeries: S, chartTracks: C, trackLayouts: w, innerWidth: T, innerHeight: D, activeInteractionMode: O, hiddenSeriesIdSet: k, internalHiddenSeriesIds: A, independentTransforms: j, independentYDomains: M, resolveInitialTrackDomain: N, annotationInteraction: P, editorSeriesOptions: F, isPresentationMode: I, clearHover: L, cancelAnnotation: R, configureZoom: z, resetViewport: B, cancelViewportDrag: V, cancelPendingHover: H, clearZoomBindings: U } = e;
|
|
1997
2012
|
function ee(e) {
|
|
1998
|
-
I.value || e.code !== "Space" || !t.pannable || !_.value ||
|
|
2013
|
+
I.value || e.code !== "Space" || !t.pannable || !_.value || Gn(e.target) || (g.value = !0, e.preventDefault());
|
|
1999
2014
|
}
|
|
2000
|
-
function
|
|
2015
|
+
function te(e) {
|
|
2001
2016
|
e.code === "Space" && (g.value = !1);
|
|
2002
2017
|
}
|
|
2003
|
-
function
|
|
2018
|
+
function ne(e) {
|
|
2004
2019
|
let r = Math.min(y.value, Math.max(1, Math.floor(e)));
|
|
2005
|
-
r !== v.value && (v.value = r, L(), P.closeContextMenu(), R(), t.displayMode === "independent" && (j.value = b.value.map(() =>
|
|
2020
|
+
r !== v.value && (v.value = r, L(), P.closeContextMenu(), R(), t.displayMode === "independent" && (j.value = b.value.map(() => G), M.value = {}), d(z), n("page-change", r, y.value));
|
|
2006
2021
|
}
|
|
2007
|
-
let
|
|
2008
|
-
function
|
|
2009
|
-
t.displayMode === "independent" && (
|
|
2022
|
+
let W;
|
|
2023
|
+
function re() {
|
|
2024
|
+
t.displayMode === "independent" && (W = w.value.map((e) => {
|
|
2010
2025
|
let n = t.initialXDomains?.[e.series.trackId ?? e.series.id] ?? t.initialXDomains?.[e.series.id] ?? t.initialXDomain;
|
|
2011
2026
|
if (!(!n || !Number.isFinite(n[0]) || !Number.isFinite(n[1]) || n[0] === n[1])) return e.xScale.domain();
|
|
2012
2027
|
}));
|
|
2013
2028
|
}
|
|
2014
|
-
function
|
|
2029
|
+
function ie() {
|
|
2015
2030
|
if (t.displayMode === "independent") {
|
|
2016
2031
|
let e = j.value;
|
|
2017
|
-
j.value = C.value.map((t, n) => e[n] ??
|
|
2032
|
+
j.value = C.value.map((t, n) => e[n] ?? G);
|
|
2018
2033
|
}
|
|
2019
2034
|
L(), F.value = [], d(() => {
|
|
2020
|
-
if (t.displayMode === "independent" &&
|
|
2021
|
-
let e = C.value.map(() =>
|
|
2035
|
+
if (t.displayMode === "independent" && W) {
|
|
2036
|
+
let e = C.value.map(() => G);
|
|
2022
2037
|
w.value.forEach((n) => {
|
|
2023
|
-
let r =
|
|
2038
|
+
let r = W?.[n.index];
|
|
2024
2039
|
if (!r) return;
|
|
2025
|
-
let i = N(n), a =
|
|
2026
|
-
e[n.index] =
|
|
2027
|
-
}), j.value = e,
|
|
2040
|
+
let i = N(n), a = Bn(r, i, [n.seriesList], t);
|
|
2041
|
+
e[n.index] = Vn(a, i, n.width);
|
|
2042
|
+
}), j.value = e, W = void 0, d(z);
|
|
2028
2043
|
return;
|
|
2029
2044
|
}
|
|
2030
|
-
|
|
2045
|
+
W = void 0, z();
|
|
2031
2046
|
});
|
|
2032
2047
|
}
|
|
2033
2048
|
E([
|
|
@@ -2039,6 +2054,7 @@ function Hn(e) {
|
|
|
2039
2054
|
() => t.minVisiblePoints,
|
|
2040
2055
|
() => t.initialXDomain,
|
|
2041
2056
|
() => t.initialXDomains,
|
|
2057
|
+
() => t.xDomainStrategy,
|
|
2042
2058
|
() => t.displayMode,
|
|
2043
2059
|
() => C.value.length,
|
|
2044
2060
|
v,
|
|
@@ -2079,7 +2095,7 @@ function Hn(e) {
|
|
|
2079
2095
|
let n = P.editorDraft.value;
|
|
2080
2096
|
n?.mode === "edit" && !e.some((e) => e.id === n.annotation.id) && P.closeEditor();
|
|
2081
2097
|
}, { deep: !0 });
|
|
2082
|
-
function
|
|
2098
|
+
function K() {
|
|
2083
2099
|
if (!f.value || !i.value) {
|
|
2084
2100
|
c.value = 0, l.value = 0;
|
|
2085
2101
|
return;
|
|
@@ -2092,22 +2108,22 @@ function Hn(e) {
|
|
|
2092
2108
|
f,
|
|
2093
2109
|
p
|
|
2094
2110
|
], async () => {
|
|
2095
|
-
c.value = 0, l.value = 0, await d(),
|
|
2111
|
+
c.value = 0, l.value = 0, await d(), K();
|
|
2096
2112
|
}, { immediate: !0 }), h(() => {
|
|
2097
|
-
window.addEventListener("keydown", ee), window.addEventListener("keyup",
|
|
2098
|
-
o.value = Math.max(0, e?.contentRect.width ?? 0), s.value = Math.max(0, e?.contentRect.height ?? 0), d(
|
|
2113
|
+
window.addEventListener("keydown", ee), window.addEventListener("keyup", te), r.value && (a.value = new ResizeObserver(([e]) => {
|
|
2114
|
+
o.value = Math.max(0, e?.contentRect.width ?? 0), s.value = Math.max(0, e?.contentRect.height ?? 0), d(K);
|
|
2099
2115
|
}), a.value.observe(r.value));
|
|
2100
2116
|
}), m(() => {
|
|
2101
|
-
window.removeEventListener("keydown", ee), window.removeEventListener("keyup",
|
|
2117
|
+
window.removeEventListener("keydown", ee), window.removeEventListener("keyup", te), H(), a.value?.disconnect(), U(), F.value = [];
|
|
2102
2118
|
}), {
|
|
2103
|
-
goToPage:
|
|
2104
|
-
handleBeforeDataReferenceChange:
|
|
2105
|
-
handleDataReferenceChange:
|
|
2119
|
+
goToPage: ne,
|
|
2120
|
+
handleBeforeDataReferenceChange: re,
|
|
2121
|
+
handleDataReferenceChange: ie
|
|
2106
2122
|
};
|
|
2107
2123
|
}
|
|
2108
2124
|
//#endregion
|
|
2109
2125
|
//#region src/components/core/useWaveformData.ts
|
|
2110
|
-
function
|
|
2126
|
+
function qn(e, t = !1) {
|
|
2111
2127
|
let n = Infinity, r = -Infinity, i = Infinity, a = -Infinity, o = !1;
|
|
2112
2128
|
for (let s of e) if (s.x < n && (n = s.x), s.x > r && (r = s.x), s.y < i && (i = s.y), s.y > a && (a = s.y), t) {
|
|
2113
2129
|
let e = At(s);
|
|
@@ -2119,24 +2135,24 @@ function Un(e, t = !1) {
|
|
|
2119
2135
|
hasErrorPoints: o
|
|
2120
2136
|
};
|
|
2121
2137
|
}
|
|
2122
|
-
function
|
|
2138
|
+
function Jn(e) {
|
|
2123
2139
|
return Mt(e).map((e) => {
|
|
2124
|
-
let t =
|
|
2140
|
+
let t = qn(e.points, e.errorBar.visible);
|
|
2125
2141
|
return {
|
|
2126
2142
|
...e,
|
|
2127
2143
|
...t
|
|
2128
2144
|
};
|
|
2129
2145
|
});
|
|
2130
2146
|
}
|
|
2131
|
-
function
|
|
2132
|
-
let r = x(
|
|
2147
|
+
function Yn(e, t, n) {
|
|
2148
|
+
let r = x(Jn(e()));
|
|
2133
2149
|
return E(e, (e) => {
|
|
2134
|
-
t(), r.value =
|
|
2150
|
+
t(), r.value = Jn(e), n();
|
|
2135
2151
|
}), r;
|
|
2136
2152
|
}
|
|
2137
2153
|
//#endregion
|
|
2138
2154
|
//#region src/components/core/useWaveformLayout.ts
|
|
2139
|
-
function
|
|
2155
|
+
function Xn(e) {
|
|
2140
2156
|
let { props: n, preparedSeries: r, currentPage: i, hiddenSeriesIdSet: a, chartWidth: o, innerHeight: s, isCleanView: c, sharedTransform: l, independentTransforms: u, sharedYDomains: d, independentYDomains: f, annotationInteraction: p } = e, m = t(() => r.value.map((e, t) => ({
|
|
2141
2157
|
...e,
|
|
2142
2158
|
color: e.color ?? (t === 0 ? n.lineColor : _t[t % _t.length])
|
|
@@ -2158,14 +2174,14 @@ function Kn(e) {
|
|
|
2158
2174
|
};
|
|
2159
2175
|
});
|
|
2160
2176
|
}), g = t(() => Xt(n.grid)), _ = t(() => zt(n.rendering)), v = t(() => Qt(h.value.length, g.value)), y = t(() => $t(h.value, i.value, g.value)), b = t(() => {
|
|
2161
|
-
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) =>
|
|
2177
|
+
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) => _n(e, n.overlayMode, n.yDomain, n.yDomains)).map((e) => vn(e.domain, !e.fixed).tickTextWidth), t = Math.max(7, ...e), r = t + 7 + 4, i = -(7 + t + 6 + 24 / 2);
|
|
2162
2178
|
return {
|
|
2163
2179
|
tickClearance: r,
|
|
2164
2180
|
fullClearance: t + 7 + 6 + 24 + 4,
|
|
2165
2181
|
labelCenterX: i
|
|
2166
2182
|
};
|
|
2167
2183
|
}), x = t(() => h.value.some((e) => e.visibleSeries.length === 1 && !!(e.visibleSeries[0]?.name.trim() || n.yLabel))), S = t(() => h.value.some((e) => e.visibleSeries.length > 0)), C = t(() => Math.max(pt.left, x.value ? b.value.fullClearance : S.value ? b.value.tickClearance : 0)), w = t(() => h.value.reduce((e, t) => {
|
|
2168
|
-
let r =
|
|
2184
|
+
let r = xn(t, n.overlayMode, n.yDomain, n.yDomains);
|
|
2169
2185
|
return {
|
|
2170
2186
|
left: Math.max(e.left, r.left),
|
|
2171
2187
|
right: Math.max(e.right, r.right)
|
|
@@ -2186,14 +2202,14 @@ function Kn(e) {
|
|
|
2186
2202
|
}), $(e);
|
|
2187
2203
|
}), F = t(() => {
|
|
2188
2204
|
let e = n.initialXDomain;
|
|
2189
|
-
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && e[0] !== e[1] ? e[0] < e[1] ? e : [e[1], e[0]] : P.value;
|
|
2205
|
+
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && e[0] !== e[1] ? on(e[0] < e[1] ? e : [e[1], e[0]], n.xDomainStrategy, !0) : on(P.value, n.xDomainStrategy);
|
|
2190
2206
|
}), I = (e) => {
|
|
2191
2207
|
let t = n.initialXDomains?.[e.series.trackId ?? e.series.id] ?? n.initialXDomains?.[e.series.id] ?? n.initialXDomain;
|
|
2192
|
-
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? t[0] < t[1] ? t : [t[1], t[0]] : $(e.seriesList.flatMap((e) => e.xDomain));
|
|
2208
|
+
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? on(t[0] < t[1] ? t : [t[1], t[0]], n.xDomainStrategy, !0) : on($(e.seriesList.flatMap((e) => e.xDomain)), n.xDomainStrategy);
|
|
2193
2209
|
}, L = t(() => l.value.rescaleX(B(F.value, [0, D.value])).domain()), R = t(() => tn(D.value, s.value, g.value, n.displayMode, y.value.map(Boolean), O.value.horizontalGap).map((e, t) => ({
|
|
2194
2210
|
...e,
|
|
2195
2211
|
series: y.value[t]
|
|
2196
|
-
}))), z = t(() =>
|
|
2212
|
+
}))), z = t(() => cn({
|
|
2197
2213
|
cells: R.value,
|
|
2198
2214
|
grid: g.value,
|
|
2199
2215
|
displayMode: n.displayMode,
|
|
@@ -2202,6 +2218,7 @@ function Kn(e) {
|
|
|
2202
2218
|
sharedZoomDomain: L.value,
|
|
2203
2219
|
initialXDomain: n.initialXDomain ? F.value : void 0,
|
|
2204
2220
|
initialXDomains: n.initialXDomains,
|
|
2221
|
+
xDomainStrategy: n.xDomainStrategy,
|
|
2205
2222
|
fixedYDomain: n.yDomain,
|
|
2206
2223
|
fixedYDomains: n.yDomains,
|
|
2207
2224
|
yDomains: n.displayMode === "independent" ? Object.fromEntries(h.value.flatMap((e, t) => {
|
|
@@ -2241,7 +2258,7 @@ function Kn(e) {
|
|
|
2241
2258
|
annotationLayoutsForTrack: V,
|
|
2242
2259
|
resolveSeriesYScale: H,
|
|
2243
2260
|
annotationTrackLayouts: U,
|
|
2244
|
-
renderedAnnotations: t(() => n.annotationsVisible ?
|
|
2261
|
+
renderedAnnotations: t(() => n.annotationsVisible ? me(n.annotations, U.value, D.value, s.value) : []),
|
|
2245
2262
|
editorSeries: t(() => {
|
|
2246
2263
|
let e = p.editorDraft.value?.annotation.seriesId, t = m.value.find((t) => t.id === e);
|
|
2247
2264
|
return t ? {
|
|
@@ -2256,13 +2273,13 @@ function Kn(e) {
|
|
|
2256
2273
|
}
|
|
2257
2274
|
};
|
|
2258
2275
|
}
|
|
2259
|
-
var
|
|
2260
|
-
function
|
|
2276
|
+
var Zn = 1e-6;
|
|
2277
|
+
function Qn(e) {
|
|
2261
2278
|
return Number.isFinite(e) ? Math.max(1, e) : 1;
|
|
2262
2279
|
}
|
|
2263
|
-
function
|
|
2264
|
-
let i =
|
|
2265
|
-
if (!(d >
|
|
2280
|
+
function $n({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r }) {
|
|
2281
|
+
let i = Qn(e), a = Qn(t), o = Qn(n), s = Number.isFinite(r) ? r : 0, c = s * Math.PI / 180, l = Math.abs(Math.cos(c)), u = Math.abs(Math.sin(c)), d = (s % 360 + 360) % 360;
|
|
2282
|
+
if (!(d > Zn && Math.abs(d - 360) > Zn)) {
|
|
2266
2283
|
let e = Math.max(1, Math.ceil(i / o)), t = o, n = a * e;
|
|
2267
2284
|
return {
|
|
2268
2285
|
textWidth: t,
|
|
@@ -2287,7 +2304,7 @@ function Yn({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r
|
|
|
2287
2304
|
}
|
|
2288
2305
|
//#endregion
|
|
2289
2306
|
//#region src/components/core/useWaveformPresentation.ts
|
|
2290
|
-
function
|
|
2307
|
+
function er(e) {
|
|
2291
2308
|
let { props: n, observedWidth: r, observedHeight: i, measuredTitleWidth: a, measuredTitleHeight: o, internalHiddenSeriesIds: s, paginationBandHeight: c } = e, l = t(() => Number.isFinite(n.width) ? Math.max(0, n.width ?? 0) : void 0), u = t(() => Number.isFinite(n.height) ? Math.max(180, n.height ?? 0) : void 0), d = t(() => r.value > 0 ? r.value : l.value ?? 0), f = t(() => i.value > 0 ? i.value : u.value ?? 180), p = t(() => ({
|
|
2292
2309
|
width: l.value === void 0 ? "100%" : `${l.value}px`,
|
|
2293
2310
|
height: u.value === void 0 ? "100%" : `${u.value}px`
|
|
@@ -2332,7 +2349,7 @@ function Xn(e) {
|
|
|
2332
2349
|
maxWidth: O.value ? "none" : `${j.value}px`,
|
|
2333
2350
|
whiteSpace: O.value ? "nowrap" : "normal",
|
|
2334
2351
|
overflowWrap: O.value ? "normal" : "anywhere"
|
|
2335
|
-
})), N = t(() =>
|
|
2352
|
+
})), N = t(() => $n({
|
|
2336
2353
|
naturalWidth: a.value || A.value,
|
|
2337
2354
|
naturalHeight: o.value || E.value * 1.2,
|
|
2338
2355
|
availableWidth: j.value,
|
|
@@ -2388,22 +2405,22 @@ function Xn(e) {
|
|
|
2388
2405
|
}
|
|
2389
2406
|
//#endregion
|
|
2390
2407
|
//#region src/components/core/useWaveformChartController.ts
|
|
2391
|
-
function
|
|
2408
|
+
function tr(e, t) {
|
|
2392
2409
|
e.value = t instanceof Element ? t : void 0;
|
|
2393
2410
|
}
|
|
2394
|
-
function
|
|
2395
|
-
let n = v(), r = v(), i = v(), a = v(), o = v(0), s = v(0), c = v(0), l = v(0), d = v(0), f = x(
|
|
2411
|
+
function nr(e, t) {
|
|
2412
|
+
let n = v(), r = v(), i = v(), a = v(), o = v(0), s = v(0), c = v(0), l = v(0), d = v(0), f = x(G), p = x([]), m = v({}), h = v({}), g = b({
|
|
2396
2413
|
points: [],
|
|
2397
2414
|
trackIndex: null,
|
|
2398
2415
|
position: {
|
|
2399
2416
|
x: 0,
|
|
2400
2417
|
y: 0
|
|
2401
2418
|
}
|
|
2402
|
-
}), y = v(!1), S = v(1), w = x(), T =
|
|
2419
|
+
}), y = v(!1), S = v(1), w = x(), T = oe("waveform-clip"), O = v(new Set(e.defaultHiddenSeriesIds)), k = Ge(), A = v([]), j = Un();
|
|
2403
2420
|
E([() => e.yDomain, () => e.yDomains], () => {
|
|
2404
2421
|
m.value = {}, h.value = {};
|
|
2405
2422
|
}, { deep: !0 });
|
|
2406
|
-
let M = x(null), N = v(!1), P = v(!1), F = () => void 0, I = () => void 0, L =
|
|
2423
|
+
let M = x(null), N = v(!1), P = v(!1), F = () => void 0, I = () => void 0, L = Yn(() => e.data, () => F(), () => I()), R = er({
|
|
2407
2424
|
props: e,
|
|
2408
2425
|
observedWidth: o,
|
|
2409
2426
|
observedHeight: s,
|
|
@@ -2411,76 +2428,76 @@ function Qn(e, t) {
|
|
|
2411
2428
|
measuredTitleHeight: l,
|
|
2412
2429
|
internalHiddenSeriesIds: O,
|
|
2413
2430
|
paginationBandHeight: d
|
|
2414
|
-
}), { chartWidth: z, chartHeight: B, isCleanView: V, isPresentationMode: H, hiddenSeriesIdSet: U, resolvedTitleText: ee, titleAreaReserved:
|
|
2431
|
+
}), { chartWidth: z, chartHeight: B, isCleanView: V, isPresentationMode: H, hiddenSeriesIdSet: U, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: W, chartTopMargin: re, innerHeight: ie } = R, K = Xn({
|
|
2415
2432
|
props: e,
|
|
2416
2433
|
preparedSeries: L,
|
|
2417
2434
|
currentPage: S,
|
|
2418
2435
|
hiddenSeriesIdSet: U,
|
|
2419
2436
|
chartWidth: z,
|
|
2420
|
-
innerHeight:
|
|
2437
|
+
innerHeight: ie,
|
|
2421
2438
|
isCleanView: V,
|
|
2422
2439
|
sharedTransform: f,
|
|
2423
2440
|
independentTransforms: p,
|
|
2424
2441
|
sharedYDomains: m,
|
|
2425
2442
|
independentYDomains: h,
|
|
2426
2443
|
annotationInteraction: u(k)
|
|
2427
|
-
}), { chartSeries:
|
|
2444
|
+
}), { chartSeries: ae, chartTracks: se, trackLayouts: ce, gridOptions: le, pageCount: ue, pagedTracks: de, resolvedChartLeftMargin: fe, innerWidth: q, hasChartArea: pe, activeInteractionMode: me, isZoomMode: J, initialXDomain: he, sharedZoomDomain: Y, resolveInitialTrackDomain: ge, annotationLayoutsForTrack: _e, resolveSeriesYScale: ve } = K;
|
|
2428
2445
|
D(() => {
|
|
2429
|
-
d.value =
|
|
2446
|
+
d.value = le.value.showPagination && ue.value > 1 && z.value <= 520 ? 40 : 0;
|
|
2430
2447
|
});
|
|
2431
|
-
let X =
|
|
2448
|
+
let X = Wn({
|
|
2432
2449
|
props: e,
|
|
2433
2450
|
emit: t,
|
|
2434
2451
|
svgElement: r,
|
|
2435
2452
|
sharedOverlayElement: a,
|
|
2436
2453
|
sharedTransform: f,
|
|
2437
2454
|
independentTransforms: p,
|
|
2438
|
-
trackLayouts:
|
|
2439
|
-
initialXDomain:
|
|
2440
|
-
sharedZoomDomain:
|
|
2441
|
-
innerWidth:
|
|
2442
|
-
innerHeight:
|
|
2443
|
-
hasChartArea:
|
|
2444
|
-
isZoomMode:
|
|
2455
|
+
trackLayouts: ce,
|
|
2456
|
+
initialXDomain: he,
|
|
2457
|
+
sharedZoomDomain: Y,
|
|
2458
|
+
innerWidth: q,
|
|
2459
|
+
innerHeight: ie,
|
|
2460
|
+
hasChartArea: pe,
|
|
2461
|
+
isZoomMode: J,
|
|
2445
2462
|
isPresentationMode: H,
|
|
2446
2463
|
resolveInitialTrackDomain: ge,
|
|
2447
2464
|
cancelPendingHover: () => Z.cancelPendingHover()
|
|
2448
|
-
}), ye =
|
|
2465
|
+
}), ye = Tn({
|
|
2449
2466
|
props: e,
|
|
2450
2467
|
emit: t,
|
|
2451
2468
|
container: n,
|
|
2452
|
-
chartSeries:
|
|
2469
|
+
chartSeries: ae,
|
|
2453
2470
|
hiddenSeriesIdSet: U,
|
|
2454
2471
|
internalHiddenSeriesIds: O,
|
|
2455
2472
|
annotationInteraction: k,
|
|
2456
2473
|
editorSeriesOptions: A,
|
|
2457
|
-
trackLayouts:
|
|
2474
|
+
trackLayouts: ce,
|
|
2458
2475
|
annotationLayoutsForTrack: _e,
|
|
2459
2476
|
resolveSeriesYScale: ve,
|
|
2460
2477
|
chartWidth: z,
|
|
2461
2478
|
chartHeight: B,
|
|
2462
|
-
innerWidth:
|
|
2463
|
-
resolvedChartLeftMargin:
|
|
2464
|
-
titleAreaHeight:
|
|
2465
|
-
chartTopMargin:
|
|
2466
|
-
activeInteractionMode:
|
|
2479
|
+
innerWidth: q,
|
|
2480
|
+
resolvedChartLeftMargin: fe,
|
|
2481
|
+
titleAreaHeight: W,
|
|
2482
|
+
chartTopMargin: re,
|
|
2483
|
+
activeInteractionMode: me,
|
|
2467
2484
|
isPresentationMode: H
|
|
2468
|
-
}), be =
|
|
2485
|
+
}), be = Hn({
|
|
2469
2486
|
props: e,
|
|
2470
2487
|
emit: t,
|
|
2471
2488
|
selection: M,
|
|
2472
2489
|
spacePressed: N,
|
|
2473
|
-
trackLayouts:
|
|
2474
|
-
chartTracks:
|
|
2475
|
-
initialXDomain:
|
|
2476
|
-
innerWidth:
|
|
2477
|
-
innerHeight:
|
|
2490
|
+
trackLayouts: ce,
|
|
2491
|
+
chartTracks: se,
|
|
2492
|
+
initialXDomain: he,
|
|
2493
|
+
innerWidth: q,
|
|
2494
|
+
innerHeight: ie,
|
|
2478
2495
|
sharedOverlayElement: a,
|
|
2479
2496
|
sharedTransform: f,
|
|
2480
2497
|
independentTransforms: p,
|
|
2481
2498
|
sharedYDomains: m,
|
|
2482
2499
|
independentYDomains: h,
|
|
2483
|
-
isZoomMode:
|
|
2500
|
+
isZoomMode: J,
|
|
2484
2501
|
isPresentationMode: H,
|
|
2485
2502
|
editorSeriesOptions: A,
|
|
2486
2503
|
resolveInitialTrackDomain: ge,
|
|
@@ -2490,22 +2507,22 @@ function Qn(e, t) {
|
|
|
2490
2507
|
cancelPendingZoom: X.cancelPendingZoom,
|
|
2491
2508
|
clearHover: () => Z.clearHover(),
|
|
2492
2509
|
resolveTrackAtPointer: ye.resolveTrackAtPointer
|
|
2493
|
-
}), Z =
|
|
2510
|
+
}), Z = Dn({
|
|
2494
2511
|
emit: t,
|
|
2495
2512
|
hoverState: g,
|
|
2496
2513
|
suppressHoverUntilMove: y,
|
|
2497
2514
|
hoverThrottle: j,
|
|
2498
2515
|
selection: M,
|
|
2499
|
-
trackLayouts:
|
|
2500
|
-
innerWidth:
|
|
2501
|
-
resolvedChartLeftMargin:
|
|
2502
|
-
titleAreaHeight:
|
|
2503
|
-
chartTopMargin:
|
|
2516
|
+
trackLayouts: ce,
|
|
2517
|
+
innerWidth: q,
|
|
2518
|
+
resolvedChartLeftMargin: fe,
|
|
2519
|
+
titleAreaHeight: W,
|
|
2520
|
+
chartTopMargin: re,
|
|
2504
2521
|
sharedOverlayElement: a,
|
|
2505
2522
|
isPresentationMode: H,
|
|
2506
2523
|
updateViewportDrag: be.updateViewportDrag,
|
|
2507
2524
|
resolveTrackAtPointer: ye.resolveTrackAtPointer
|
|
2508
|
-
}), xe =
|
|
2525
|
+
}), xe = Kn({
|
|
2509
2526
|
props: e,
|
|
2510
2527
|
emit: t,
|
|
2511
2528
|
container: n,
|
|
@@ -2516,20 +2533,20 @@ function Qn(e, t) {
|
|
|
2516
2533
|
measuredTitleWidth: c,
|
|
2517
2534
|
measuredTitleHeight: l,
|
|
2518
2535
|
resolvedTitleText: ee,
|
|
2519
|
-
titleAreaReserved:
|
|
2520
|
-
titleMeasureStyle:
|
|
2536
|
+
titleAreaReserved: te,
|
|
2537
|
+
titleMeasureStyle: ne,
|
|
2521
2538
|
spacePressed: N,
|
|
2522
2539
|
pointerInsideChart: P,
|
|
2523
2540
|
currentPage: S,
|
|
2524
|
-
pageCount:
|
|
2525
|
-
pagedTracks:
|
|
2526
|
-
gridOptions:
|
|
2527
|
-
chartSeries:
|
|
2528
|
-
chartTracks:
|
|
2529
|
-
trackLayouts:
|
|
2530
|
-
innerWidth:
|
|
2531
|
-
innerHeight:
|
|
2532
|
-
activeInteractionMode:
|
|
2541
|
+
pageCount: ue,
|
|
2542
|
+
pagedTracks: de,
|
|
2543
|
+
gridOptions: le,
|
|
2544
|
+
chartSeries: ae,
|
|
2545
|
+
chartTracks: se,
|
|
2546
|
+
trackLayouts: ce,
|
|
2547
|
+
innerWidth: q,
|
|
2548
|
+
innerHeight: ie,
|
|
2549
|
+
activeInteractionMode: me,
|
|
2533
2550
|
hiddenSeriesIdSet: U,
|
|
2534
2551
|
internalHiddenSeriesIds: O,
|
|
2535
2552
|
independentTransforms: p,
|
|
@@ -2549,7 +2566,7 @@ function Qn(e, t) {
|
|
|
2549
2566
|
return F = xe.handleBeforeDataReferenceChange, I = xe.handleDataReferenceChange, _({
|
|
2550
2567
|
...C(e),
|
|
2551
2568
|
...R,
|
|
2552
|
-
...
|
|
2569
|
+
...K,
|
|
2553
2570
|
...ye,
|
|
2554
2571
|
...be,
|
|
2555
2572
|
...Z,
|
|
@@ -2565,31 +2582,31 @@ function Qn(e, t) {
|
|
|
2565
2582
|
editorSeriesOptions: A,
|
|
2566
2583
|
clipPathId: T,
|
|
2567
2584
|
goToPage: xe.goToPage,
|
|
2568
|
-
setContainer: (e) =>
|
|
2569
|
-
setSvgElement: (e) =>
|
|
2570
|
-
setTitleMeasureElement: (e) =>
|
|
2571
|
-
setSharedOverlayElement: (e) =>
|
|
2585
|
+
setContainer: (e) => tr(n, e),
|
|
2586
|
+
setSvgElement: (e) => tr(r, e),
|
|
2587
|
+
setTitleMeasureElement: (e) => tr(i, e),
|
|
2588
|
+
setSharedOverlayElement: (e) => tr(a, e)
|
|
2572
2589
|
});
|
|
2573
2590
|
}
|
|
2574
2591
|
//#endregion
|
|
2575
2592
|
//#region src/components/annotation/WaveformAnnotationEditor.vue?vue&type=script&setup=true&lang.ts
|
|
2576
|
-
var
|
|
2593
|
+
var rr = ["aria-labelledby"], ir = { class: "waveform-annotation-editor__panel" }, ar = { class: "waveform-annotation-editor__header" }, or = ["id"], sr = {
|
|
2577
2594
|
class: "waveform-annotation-editor__coordinates",
|
|
2578
2595
|
"aria-label": "标注坐标"
|
|
2579
|
-
},
|
|
2596
|
+
}, cr = {
|
|
2580
2597
|
key: 0,
|
|
2581
2598
|
class: "waveform-annotation-editor__series",
|
|
2582
2599
|
"aria-label": "标注所属波形"
|
|
2583
|
-
},
|
|
2600
|
+
}, lr = { class: "waveform-annotation-editor__series-label" }, ur = ["value"], dr = ["value"], fr = { key: 1 }, pr = { class: "waveform-annotation-editor__field" }, mr = { class: "waveform-annotation-editor__label-row" }, hr = ["maxlength"], gr = { class: "waveform-annotation-editor__colors" }, _r = {
|
|
2584
2601
|
class: "waveform-annotation-editor__color-field",
|
|
2585
2602
|
title: "调整标注边框色和透明度"
|
|
2586
|
-
},
|
|
2603
|
+
}, vr = {
|
|
2587
2604
|
class: "waveform-annotation-editor__color-field",
|
|
2588
2605
|
title: "调整标注文字色和透明度"
|
|
2589
|
-
},
|
|
2606
|
+
}, yr = {
|
|
2590
2607
|
class: "waveform-annotation-editor__color-field",
|
|
2591
2608
|
title: "调整标注背景色和透明度"
|
|
2592
|
-
},
|
|
2609
|
+
}, br = { class: "waveform-annotation-editor__actions" }, xr = ["disabled"], Sr = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
2593
2610
|
__name: "WaveformAnnotationEditor",
|
|
2594
2611
|
props: {
|
|
2595
2612
|
annotation: {},
|
|
@@ -2604,7 +2621,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2604
2621
|
"series-change"
|
|
2605
2622
|
],
|
|
2606
2623
|
setup(n, { emit: o }) {
|
|
2607
|
-
let c = n, l = o, u = v(), f =
|
|
2624
|
+
let c = n, l = o, u = v(), f = oe("waveform-annotation-editor-title"), m = v(""), h = v(""), _ = v(""), b = v(""), x = t(() => m.value.trim().length > 0), C = t(() => m.value.length), D = t(() => {
|
|
2608
2625
|
let e = c.seriesOptions?.find((e) => e.seriesId === c.annotation.seriesId);
|
|
2609
2626
|
return e ? {
|
|
2610
2627
|
id: e.seriesId,
|
|
@@ -2642,21 +2659,21 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2642
2659
|
"aria-modal": "true",
|
|
2643
2660
|
"aria-labelledby": w(f),
|
|
2644
2661
|
onClick: n[6] ||= k((e) => l("cancel"), ["self"])
|
|
2645
|
-
}, [a("section",
|
|
2646
|
-
a("header",
|
|
2662
|
+
}, [a("section", ir, [
|
|
2663
|
+
a("header", ar, [a("div", null, [a("h2", { id: w(f) }, S(c.mode === "add" ? "添加标注" : "编辑标注"), 9, or)]), a("button", {
|
|
2647
2664
|
type: "button",
|
|
2648
2665
|
class: "waveform-annotation-editor__close",
|
|
2649
2666
|
"aria-label": "关闭标注编辑器",
|
|
2650
2667
|
title: "关闭",
|
|
2651
2668
|
onClick: n[0] ||= (e) => l("cancel")
|
|
2652
2669
|
}, " × ")]),
|
|
2653
|
-
a("div",
|
|
2654
|
-
D.value ? (g(), i("label",
|
|
2670
|
+
a("div", sr, [a("span", null, [a("b", null, "X (" + S(c.timeUnit) + ")", 1), a("code", null, S(w(ut)(c.annotation.x, c.timeUnit)), 1)]), a("span", null, [n[7] ||= a("b", null, "Y", -1), a("code", null, S(w(it)(c.annotation.y)), 1)])]),
|
|
2671
|
+
D.value ? (g(), i("label", cr, [
|
|
2655
2672
|
a("i", {
|
|
2656
2673
|
style: p({ backgroundColor: D.value.color }),
|
|
2657
2674
|
"aria-hidden": "true"
|
|
2658
2675
|
}, null, 4),
|
|
2659
|
-
a("span",
|
|
2676
|
+
a("span", lr, [n[8] ||= a("small", null, "标注波形", -1), a("b", null, S(D.value.name), 1)]),
|
|
2660
2677
|
c.seriesOptions?.length ? (g(), i("select", {
|
|
2661
2678
|
key: 0,
|
|
2662
2679
|
value: c.annotation.seriesId,
|
|
@@ -2665,9 +2682,9 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2665
2682
|
}, [(g(!0), i(e, null, y(c.seriesOptions, (e) => (g(), i("option", {
|
|
2666
2683
|
key: e.seriesId,
|
|
2667
2684
|
value: e.seriesId
|
|
2668
|
-
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9,
|
|
2685
|
+
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9, dr))), 128))], 40, ur)) : D.value.unit ? (g(), i("code", fr, S(D.value.unit), 1)) : r("", !0)
|
|
2669
2686
|
])) : r("", !0),
|
|
2670
|
-
a("label",
|
|
2687
|
+
a("label", pr, [a("span", mr, [n[9] ||= a("b", null, "标注文本", -1), a("small", null, S(C.value) + "/" + S(w(40)), 1)]), O(a("textarea", {
|
|
2671
2688
|
ref_key: "textarea",
|
|
2672
2689
|
ref: u,
|
|
2673
2690
|
"onUpdate:modelValue": n[1] ||= (e) => m.value = e,
|
|
@@ -2676,10 +2693,10 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2676
2693
|
"aria-label": "标注文本",
|
|
2677
2694
|
placeholder: "输入这处波形的说明",
|
|
2678
2695
|
onKeydown: M
|
|
2679
|
-
}, null, 40,
|
|
2680
|
-
a("fieldset",
|
|
2696
|
+
}, null, 40, hr), [[T, m.value]])]),
|
|
2697
|
+
a("fieldset", gr, [
|
|
2681
2698
|
n[13] ||= a("legend", null, "颜色与透明度", -1),
|
|
2682
|
-
a("label",
|
|
2699
|
+
a("label", _r, [n[10] ||= a("span", null, "边框色", -1), s(w(K), {
|
|
2683
2700
|
"pure-color": h.value,
|
|
2684
2701
|
"onUpdate:pureColor": n[2] ||= (e) => h.value = e,
|
|
2685
2702
|
"aria-label": "标注边框色",
|
|
@@ -2689,7 +2706,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2689
2706
|
"disable-alpha": !1,
|
|
2690
2707
|
"blur-close": !0
|
|
2691
2708
|
}, null, 8, ["pure-color"])]),
|
|
2692
|
-
a("label",
|
|
2709
|
+
a("label", vr, [n[11] ||= a("span", null, "文字色", -1), s(w(K), {
|
|
2693
2710
|
"pure-color": _.value,
|
|
2694
2711
|
"onUpdate:pureColor": n[3] ||= (e) => _.value = e,
|
|
2695
2712
|
"aria-label": "标注文字色",
|
|
@@ -2699,7 +2716,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2699
2716
|
"disable-alpha": !1,
|
|
2700
2717
|
"blur-close": !0
|
|
2701
2718
|
}, null, 8, ["pure-color"])]),
|
|
2702
|
-
a("label",
|
|
2719
|
+
a("label", yr, [n[12] ||= a("span", null, "背景色", -1), s(w(K), {
|
|
2703
2720
|
"pure-color": b.value,
|
|
2704
2721
|
"onUpdate:pureColor": n[4] ||= (e) => b.value = e,
|
|
2705
2722
|
"aria-label": "标注背景色",
|
|
@@ -2710,7 +2727,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2710
2727
|
"blur-close": !0
|
|
2711
2728
|
}, null, 8, ["pure-color"])])
|
|
2712
2729
|
]),
|
|
2713
|
-
a("footer",
|
|
2730
|
+
a("footer", br, [a("button", {
|
|
2714
2731
|
type: "button",
|
|
2715
2732
|
onClick: n[5] ||= (e) => l("cancel")
|
|
2716
2733
|
}, "取消"), a("button", {
|
|
@@ -2718,10 +2735,10 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2718
2735
|
class: "is-primary",
|
|
2719
2736
|
disabled: !x.value,
|
|
2720
2737
|
onClick: j
|
|
2721
|
-
}, " 保存标注 ", 8,
|
|
2722
|
-
])], 8,
|
|
2738
|
+
}, " 保存标注 ", 8, xr)])
|
|
2739
|
+
])], 8, rr));
|
|
2723
2740
|
}
|
|
2724
|
-
}), [["__scopeId", "data-v-52818b45"]]),
|
|
2741
|
+
}), [["__scopeId", "data-v-52818b45"]]), Cr = { class: "waveform-tooltip__time waveform-chart__tooltip-time" }, wr = { class: "waveform-tooltip__series-content" }, Tr = { key: 0 }, Er = { class: "waveform-tooltip__value" }, Dr = { key: 0 }, Or = 12, kr = 8, Ar = 238, jr = 320, Mr = 20, Nr = 20, Pr = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
2725
2742
|
__name: "WaveformTooltip",
|
|
2726
2743
|
props: {
|
|
2727
2744
|
visible: { type: Boolean },
|
|
@@ -2735,7 +2752,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2735
2752
|
setup(n) {
|
|
2736
2753
|
let s = n;
|
|
2737
2754
|
function c(e, t) {
|
|
2738
|
-
let n = Math.max(1, t -
|
|
2755
|
+
let n = Math.max(1, t - Mr - 14), r = Math.max(1, Math.floor(n / 7.2));
|
|
2739
2756
|
return Math.max(1, Math.ceil([...e].length / r));
|
|
2740
2757
|
}
|
|
2741
2758
|
function l(e) {
|
|
@@ -2744,18 +2761,18 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2744
2761
|
}
|
|
2745
2762
|
function u(e, t) {
|
|
2746
2763
|
let n = s.seriesPoints.reduce((t, n) => t + c(l(n), e), 0);
|
|
2747
|
-
return 16 +
|
|
2764
|
+
return 16 + Nr * (c(t, e) + n) + 5;
|
|
2748
2765
|
}
|
|
2749
2766
|
let d = t(() => {
|
|
2750
2767
|
if (!s.visible || !s.hoveredPoint) return { display: "none" };
|
|
2751
|
-
let e = s.position.x +
|
|
2768
|
+
let e = s.position.x + Or, t = s.position.x - Or - Ar, n = s.containerWidth - kr - e, r = s.position.x - Or - kr, i = Math.max(1, Math.min(jr, s.containerWidth - kr * 2)), a = e + Ar <= s.containerWidth - kr ? {
|
|
2752
2769
|
left: `${e}px`,
|
|
2753
|
-
maxWidth: `${Math.min(
|
|
2754
|
-
} : t >=
|
|
2755
|
-
right: `${s.containerWidth - s.position.x +
|
|
2756
|
-
maxWidth: `${Math.min(
|
|
2770
|
+
maxWidth: `${Math.min(jr, n)}px`
|
|
2771
|
+
} : t >= kr ? {
|
|
2772
|
+
right: `${s.containerWidth - s.position.x + Or}px`,
|
|
2773
|
+
maxWidth: `${Math.min(jr, r)}px`
|
|
2757
2774
|
} : {
|
|
2758
|
-
left: `${
|
|
2775
|
+
left: `${kr}px`,
|
|
2759
2776
|
maxWidth: `${i}px`
|
|
2760
2777
|
}, o = Number.parseFloat(a.maxWidth), c = `${s.timeUnit}: ${lt(s.hoveredPoint.x, s.timeUnit)}`;
|
|
2761
2778
|
return {
|
|
@@ -2771,12 +2788,12 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2771
2788
|
key: 0,
|
|
2772
2789
|
class: "waveform-tooltip waveform-chart__tooltip",
|
|
2773
2790
|
style: p(d.value)
|
|
2774
|
-
}, [a("span",
|
|
2791
|
+
}, [a("span", Cr, S(n.timeUnit) + ": " + S(w(lt)(n.hoveredPoint.x, n.timeUnit)), 1), (g(!0), i(e, null, y(n.seriesPoints, (e) => (g(), i("span", {
|
|
2775
2792
|
key: `${e.trackIndex}-${e.name}`,
|
|
2776
2793
|
class: "waveform-tooltip__series waveform-chart__tooltip-series"
|
|
2777
|
-
}, [a("i", { style: p({ backgroundColor: e.color }) }, null, 4), a("span",
|
|
2794
|
+
}, [a("i", { style: p({ backgroundColor: e.color }) }, null, 4), a("span", wr, [e.name ? (g(), i("strong", Tr, S(e.name) + ":", 1)) : r("", !0), a("span", Er, [o(S(w(rt)(e.point.y)) + S(e.unit ? ` ${e.unit}` : "") + " ", 1), f(e.point) ? (g(), i("small", Dr, S(f(e.point)), 1)) : r("", !0)])])]))), 128))], 4)) : r("", !0);
|
|
2778
2795
|
}
|
|
2779
|
-
}), [["__scopeId", "data-v-93daa641"]]),
|
|
2796
|
+
}), [["__scopeId", "data-v-93daa641"]]), Fr = /* @__PURE__ */ c({
|
|
2780
2797
|
__name: "WaveformHoverHost",
|
|
2781
2798
|
props: {
|
|
2782
2799
|
state: {},
|
|
@@ -2787,7 +2804,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2787
2804
|
},
|
|
2788
2805
|
setup(e) {
|
|
2789
2806
|
let r = e, i = t(() => r.state.points[0]?.point ?? null);
|
|
2790
|
-
return (t, r) => (g(), n(
|
|
2807
|
+
return (t, r) => (g(), n(Pr, {
|
|
2791
2808
|
visible: e.visible && i.value !== null,
|
|
2792
2809
|
position: e.state.position,
|
|
2793
2810
|
"time-unit": e.timeUnit,
|
|
@@ -2805,16 +2822,16 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2805
2822
|
"container-height"
|
|
2806
2823
|
]));
|
|
2807
2824
|
}
|
|
2808
|
-
}),
|
|
2825
|
+
}), Ir = 13, Lr = 2, Rr = 14, zr = 8, Br = 24, Vr = {
|
|
2809
2826
|
circle: U,
|
|
2810
|
-
square:
|
|
2811
|
-
triangle:
|
|
2827
|
+
square: te,
|
|
2828
|
+
triangle: ne,
|
|
2812
2829
|
diamond: ee
|
|
2813
2830
|
};
|
|
2814
|
-
function
|
|
2815
|
-
return e === "none" ? null : H().type(
|
|
2831
|
+
function Hr(e, t = 48) {
|
|
2832
|
+
return e === "none" ? null : H().type(Vr[e]).size(t)() ?? null;
|
|
2816
2833
|
}
|
|
2817
|
-
function
|
|
2834
|
+
function Ur(e, t, n = 48) {
|
|
2818
2835
|
if (e === "none" || t.length === 0) return null;
|
|
2819
2836
|
if (e === "circle") {
|
|
2820
2837
|
let e = Math.sqrt(n / Math.PI);
|
|
@@ -2831,24 +2848,24 @@ function zr(e, t, n = 48) {
|
|
|
2831
2848
|
let r = Math.sqrt(n / (2 * Math.tan(Math.PI / 6))), i = r * Math.tan(Math.PI / 6);
|
|
2832
2849
|
return t.map(({ x: e, y: t }) => `M${e},${t - r}L${e + i},${t}L${e},${t + r}L${e - i},${t}Z`).join("");
|
|
2833
2850
|
}
|
|
2834
|
-
function
|
|
2851
|
+
function Wr(e) {
|
|
2835
2852
|
return e === "none" ? null : "M1 8H25";
|
|
2836
2853
|
}
|
|
2837
|
-
function
|
|
2854
|
+
function Gr(e) {
|
|
2838
2855
|
if (e === "dashed") return "8 5";
|
|
2839
2856
|
if (e === "dash-dot") return "8 5 1.5 5";
|
|
2840
2857
|
}
|
|
2841
|
-
function
|
|
2842
|
-
let t = (Number.isFinite(e) && e > 0 ? Math.min(e,
|
|
2858
|
+
function Kr(e) {
|
|
2859
|
+
let t = (Number.isFinite(e) && e > 0 ? Math.min(e, Br) : zr) / 2, n = Ir - t, r = Ir + t;
|
|
2843
2860
|
return [
|
|
2844
|
-
`M${n} ${
|
|
2845
|
-
`M${
|
|
2846
|
-
`M${n} ${
|
|
2861
|
+
`M${n} ${Lr}H${r}`,
|
|
2862
|
+
`M${Ir} ${Lr}V${Rr}`,
|
|
2863
|
+
`M${n} ${Rr}H${r}`
|
|
2847
2864
|
].join("");
|
|
2848
2865
|
}
|
|
2849
2866
|
//#endregion
|
|
2850
2867
|
//#region src/components/rendering/WaveformSeriesLayer.vue?vue&type=script&setup=true&lang.ts
|
|
2851
|
-
var
|
|
2868
|
+
var qr = ["clip-path"], Jr = ["data-series-id", "data-series-name"], Yr = [
|
|
2852
2869
|
"data-series-id",
|
|
2853
2870
|
"data-series-name",
|
|
2854
2871
|
"data-y-axis-index",
|
|
@@ -2857,11 +2874,11 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2857
2874
|
"d",
|
|
2858
2875
|
"stroke",
|
|
2859
2876
|
"stroke-dasharray"
|
|
2860
|
-
],
|
|
2877
|
+
], Xr = ["data-series-id"], Zr = [
|
|
2861
2878
|
"d",
|
|
2862
2879
|
"stroke",
|
|
2863
2880
|
"stroke-width"
|
|
2864
|
-
],
|
|
2881
|
+
], Qr = ["data-series-id", "data-point-type"], $r = ["d", "fill"], ei = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
2865
2882
|
__name: "WaveformSeriesLayer",
|
|
2866
2883
|
props: {
|
|
2867
2884
|
track: {},
|
|
@@ -2869,7 +2886,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2869
2886
|
},
|
|
2870
2887
|
setup(n) {
|
|
2871
2888
|
let a = n, o = t(() => a.track.seriesPaths.map((e) => {
|
|
2872
|
-
let t =
|
|
2889
|
+
let t = Ur(e.series.pointType, e.pointRenderPoints.map((t) => ({
|
|
2873
2890
|
x: a.track.xScale(t.x),
|
|
2874
2891
|
y: e.yScale(t.y)
|
|
2875
2892
|
}))), n = e.series.errorBar.capWidth / 2, r = e.errorBarRenderPoints.map((t) => {
|
|
@@ -2906,8 +2923,8 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2906
2923
|
"data-line-style": e.series.lineStyle,
|
|
2907
2924
|
d: e.path,
|
|
2908
2925
|
stroke: e.series.color,
|
|
2909
|
-
"stroke-dasharray": w(
|
|
2910
|
-
}, null, 8,
|
|
2926
|
+
"stroke-dasharray": w(Gr)(e.series.lineStyle)
|
|
2927
|
+
}, null, 8, Yr)) : r("", !0),
|
|
2911
2928
|
e.series.errorBar.visible ? (g(), i("g", {
|
|
2912
2929
|
key: 1,
|
|
2913
2930
|
class: "waveform-track__error-bars waveform-chart__error-bars",
|
|
@@ -2918,7 +2935,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2918
2935
|
d: e.errorBarPath,
|
|
2919
2936
|
stroke: e.series.errorBar.color || e.series.color,
|
|
2920
2937
|
"stroke-width": e.series.errorBar.width
|
|
2921
|
-
}, null, 8,
|
|
2938
|
+
}, null, 8, Zr)) : r("", !0)], 8, Xr)) : r("", !0),
|
|
2922
2939
|
e.series.pointType === "none" ? r("", !0) : (g(), i("g", {
|
|
2923
2940
|
key: 2,
|
|
2924
2941
|
class: "waveform-track__points waveform-chart__points",
|
|
@@ -2929,20 +2946,20 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2929
2946
|
class: "waveform-track__point waveform-chart__point",
|
|
2930
2947
|
d: e.pointPath,
|
|
2931
2948
|
fill: e.series.color
|
|
2932
|
-
}, null, 8,
|
|
2933
|
-
], 8,
|
|
2949
|
+
}, null, 8, $r)) : r("", !0)], 8, Qr))
|
|
2950
|
+
], 8, Jr))), 128))], 8, qr)) : r("", !0);
|
|
2934
2951
|
}
|
|
2935
|
-
}), [["__scopeId", "data-v-42a3fd47"]]),
|
|
2952
|
+
}), [["__scopeId", "data-v-42a3fd47"]]), ti = ["transform"], ni = ["transform"], ri = {
|
|
2936
2953
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--start waveform-chart__axis-endpoint waveform-chart__axis-endpoint--start",
|
|
2937
2954
|
x: "0",
|
|
2938
2955
|
y: "7",
|
|
2939
2956
|
dy: "0.71em",
|
|
2940
2957
|
"text-anchor": "start"
|
|
2941
|
-
},
|
|
2958
|
+
}, ii = ["x"], ai = [
|
|
2942
2959
|
"data-y-axis-index",
|
|
2943
2960
|
"data-y-axis-side",
|
|
2944
2961
|
"transform"
|
|
2945
|
-
],
|
|
2962
|
+
], oi = { key: 2 }, si = ["x", "y"], ci = ["fill", "transform"], li = ["data-y-axis-title-index"], ui = ["x", "y"], di = ["fill", "transform"], fi = /* @__PURE__ */ c({
|
|
2946
2963
|
__name: "WaveformTrackAxes",
|
|
2947
2964
|
props: {
|
|
2948
2965
|
track: {},
|
|
@@ -3001,7 +3018,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3001
3018
|
ref: o,
|
|
3002
3019
|
class: f(["waveform-track__axis waveform-track__axis--x waveform-chart__axis waveform-chart__axis--x", { "waveform-track__axis--line-hidden": t.axes?.x?.lineVisible === !1 }]),
|
|
3003
3020
|
transform: `translate(0, ${t.track.height})`
|
|
3004
|
-
}, null, 10,
|
|
3021
|
+
}, null, 10, ti)) : r("", !0),
|
|
3005
3022
|
t.track.showXAxis ? (g(), i("g", {
|
|
3006
3023
|
key: 1,
|
|
3007
3024
|
class: "waveform-track__axis-endpoints waveform-chart__axis-endpoints",
|
|
@@ -3009,13 +3026,13 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3009
3026
|
"font-family": "sans-serif",
|
|
3010
3027
|
"font-size": "10",
|
|
3011
3028
|
"aria-hidden": "true"
|
|
3012
|
-
}, [a("text",
|
|
3029
|
+
}, [a("text", ri, S(t.track.endpointLabels.start), 1), a("text", {
|
|
3013
3030
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--end waveform-chart__axis-endpoint waveform-chart__axis-endpoint--end",
|
|
3014
3031
|
x: t.track.width ?? t.innerWidth,
|
|
3015
3032
|
y: "7",
|
|
3016
3033
|
dy: "0.71em",
|
|
3017
3034
|
"text-anchor": "end"
|
|
3018
|
-
}, S(t.track.endpointLabels.end), 9,
|
|
3035
|
+
}, S(t.track.endpointLabels.end), 9, ii)], 8, ni)) : r("", !0),
|
|
3019
3036
|
(g(!0), i(e, null, y(t.track.isEmpty ? [] : t.track.yAxes, (e) => (g(), i("g", {
|
|
3020
3037
|
key: `y-axis-${t.track.index}-${e.index}`,
|
|
3021
3038
|
ref_for: !0,
|
|
@@ -3024,21 +3041,21 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3024
3041
|
"data-y-axis-index": e.index,
|
|
3025
3042
|
"data-y-axis-side": e.side,
|
|
3026
3043
|
transform: `translate(${e.x}, 0)`
|
|
3027
|
-
}, null, 10,
|
|
3028
|
-
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && c(t.track.series) && p(t.track.height, t.track.index) ? (g(), i("g",
|
|
3044
|
+
}, null, 10, ai))), 128)),
|
|
3045
|
+
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && c(t.track.series) && p(t.track.height, t.track.index) ? (g(), i("g", oi, [a("rect", {
|
|
3029
3046
|
class: "waveform-track__y-axis-label-bg waveform-chart__y-axis-label-bg",
|
|
3030
3047
|
x: t.track.yAxisLabelX - 12,
|
|
3031
3048
|
y: t.track.height / 2 - 40,
|
|
3032
3049
|
width: "24",
|
|
3033
3050
|
height: "80",
|
|
3034
3051
|
rx: "2"
|
|
3035
|
-
}, null, 8,
|
|
3052
|
+
}, null, 8, si), a("text", {
|
|
3036
3053
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
3037
3054
|
fill: t.track.series.color,
|
|
3038
3055
|
transform: `translate(${t.track.yAxisLabelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
3039
3056
|
"text-anchor": "middle",
|
|
3040
3057
|
"dominant-baseline": "central"
|
|
3041
|
-
}, S(c(t.track.series)), 9,
|
|
3058
|
+
}, S(c(t.track.series)), 9, ci)])) : r("", !0),
|
|
3042
3059
|
(g(!0), i(e, null, y(!t.cleanView && t.track.yAxes.length > 1 ? t.track.yAxes.filter(l) : [], (e) => (g(), i("g", {
|
|
3043
3060
|
key: `y-axis-title-${t.track.index}-${e.index}`,
|
|
3044
3061
|
class: "waveform-track__multi-axis-title",
|
|
@@ -3050,40 +3067,40 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3050
3067
|
width: "24",
|
|
3051
3068
|
height: "80",
|
|
3052
3069
|
rx: "2"
|
|
3053
|
-
}, null, 8,
|
|
3070
|
+
}, null, 8, ui), a("text", {
|
|
3054
3071
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
3055
3072
|
fill: e.seriesList[0].color,
|
|
3056
3073
|
transform: `translate(${e.labelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
3057
3074
|
"text-anchor": "middle",
|
|
3058
3075
|
"dominant-baseline": "central"
|
|
3059
|
-
}, S(c(e.seriesList[0])), 9,
|
|
3076
|
+
}, S(c(e.seriesList[0])), 9, di)], 8, li))), 128))
|
|
3060
3077
|
], 64));
|
|
3061
3078
|
}
|
|
3062
|
-
}),
|
|
3079
|
+
}), pi = [
|
|
3063
3080
|
"width",
|
|
3064
3081
|
"height",
|
|
3065
3082
|
"fill"
|
|
3066
|
-
],
|
|
3083
|
+
], mi = ["clip-path"], hi = { class: "waveform-track__grid waveform-track__grid--minor waveform-chart__grid waveform-chart__grid--minor" }, gi = [
|
|
3067
3084
|
"stroke",
|
|
3068
3085
|
"x1",
|
|
3069
3086
|
"x2",
|
|
3070
3087
|
"y2"
|
|
3071
|
-
],
|
|
3088
|
+
], _i = [
|
|
3072
3089
|
"stroke",
|
|
3073
3090
|
"x2",
|
|
3074
3091
|
"y1",
|
|
3075
3092
|
"y2"
|
|
3076
|
-
],
|
|
3093
|
+
], vi = { class: "waveform-track__grid waveform-track__grid--major waveform-chart__grid waveform-chart__grid--major" }, yi = [
|
|
3077
3094
|
"stroke",
|
|
3078
3095
|
"x1",
|
|
3079
3096
|
"x2",
|
|
3080
3097
|
"y2"
|
|
3081
|
-
],
|
|
3098
|
+
], bi = [
|
|
3082
3099
|
"stroke",
|
|
3083
3100
|
"x2",
|
|
3084
3101
|
"y1",
|
|
3085
3102
|
"y2"
|
|
3086
|
-
],
|
|
3103
|
+
], xi = ["clip-path"], Si = [
|
|
3087
3104
|
"data-y-axis-index",
|
|
3088
3105
|
"x2",
|
|
3089
3106
|
"y1",
|
|
@@ -3091,7 +3108,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3091
3108
|
"stroke",
|
|
3092
3109
|
"stroke-width",
|
|
3093
3110
|
"stroke-dasharray"
|
|
3094
|
-
],
|
|
3111
|
+
], Ci = ["x", "y"], wi = /* @__PURE__ */ c({
|
|
3095
3112
|
__name: "WaveformTrackBackdrop",
|
|
3096
3113
|
props: {
|
|
3097
3114
|
track: {},
|
|
@@ -3116,12 +3133,12 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3116
3133
|
height: t.track.height,
|
|
3117
3134
|
fill: t.frameStyle.backgroundColor,
|
|
3118
3135
|
"aria-hidden": "true"
|
|
3119
|
-
}, null, 8,
|
|
3136
|
+
}, null, 8, pi)) : r("", !0),
|
|
3120
3137
|
!t.track.isEmpty && t.track.hasVisibleSeries && !t.cleanView ? (g(), i("g", {
|
|
3121
3138
|
key: 1,
|
|
3122
3139
|
"clip-path": `url(#${t.clipPathId}-${t.track.index})`,
|
|
3123
3140
|
"aria-hidden": "true"
|
|
3124
|
-
}, [a("g",
|
|
3141
|
+
}, [a("g", hi, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMinorTicks, (e) => (g(), i("line", {
|
|
3125
3142
|
key: `x-minor-${t.track.index}-${e}`,
|
|
3126
3143
|
"data-grid-direction": "vertical",
|
|
3127
3144
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -3129,7 +3146,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3129
3146
|
x2: t.track.xScale(e),
|
|
3130
3147
|
y1: "0",
|
|
3131
3148
|
y2: t.track.height
|
|
3132
|
-
}, null, 8,
|
|
3149
|
+
}, null, 8, gi))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMinorTicks, (e) => (g(), i("line", {
|
|
3133
3150
|
key: `y-minor-${t.track.index}-${e}`,
|
|
3134
3151
|
"data-grid-direction": "horizontal",
|
|
3135
3152
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -3137,7 +3154,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3137
3154
|
x2: t.track.width ?? t.innerWidth,
|
|
3138
3155
|
y1: t.track.yScale(e),
|
|
3139
3156
|
y2: t.track.yScale(e)
|
|
3140
|
-
}, null, 8,
|
|
3157
|
+
}, null, 8, _i))), 128)) : r("", !0)]), a("g", vi, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMajorTicks, (e) => (g(), i("line", {
|
|
3141
3158
|
key: `x-major-${t.track.index}-${e}`,
|
|
3142
3159
|
"data-grid-direction": "vertical",
|
|
3143
3160
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -3145,7 +3162,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3145
3162
|
x2: t.track.xScale(e),
|
|
3146
3163
|
y1: "0",
|
|
3147
3164
|
y2: t.track.height
|
|
3148
|
-
}, null, 8,
|
|
3165
|
+
}, null, 8, yi))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMajorTicks, (e) => (g(), i("line", {
|
|
3149
3166
|
key: `y-major-${t.track.index}-${e}`,
|
|
3150
3167
|
"data-grid-direction": "horizontal",
|
|
3151
3168
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -3153,7 +3170,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3153
3170
|
x2: t.track.width ?? t.innerWidth,
|
|
3154
3171
|
y1: t.track.yScale(e),
|
|
3155
3172
|
y2: t.track.yScale(e)
|
|
3156
|
-
}, null, 8,
|
|
3173
|
+
}, null, 8, bi))), 128)) : r("", !0)])], 8, mi)) : r("", !0),
|
|
3157
3174
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.zeroLine.visible && !t.cleanView ? (g(), i("g", {
|
|
3158
3175
|
key: 2,
|
|
3159
3176
|
class: "waveform-track__zero-lines waveform-chart__zero-lines",
|
|
@@ -3170,7 +3187,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3170
3187
|
stroke: t.zeroLine.color,
|
|
3171
3188
|
"stroke-width": t.zeroLine.width,
|
|
3172
3189
|
"stroke-dasharray": t.zeroLine.dash || void 0
|
|
3173
|
-
}, null, 8,
|
|
3190
|
+
}, null, 8, Si))], 64))), 128))], 8, xi)) : r("", !0),
|
|
3174
3191
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.frameNumber !== void 0 && !t.cleanView ? (g(), i("text", {
|
|
3175
3192
|
key: 3,
|
|
3176
3193
|
class: "waveform-track__watermark waveform-chart__watermark",
|
|
@@ -3180,10 +3197,10 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3180
3197
|
"text-anchor": "middle",
|
|
3181
3198
|
"dominant-baseline": "central",
|
|
3182
3199
|
"aria-hidden": "true"
|
|
3183
|
-
}, S(t.frameNumber), 13,
|
|
3200
|
+
}, S(t.frameNumber), 13, Ci)) : r("", !0)
|
|
3184
3201
|
], 64));
|
|
3185
3202
|
}
|
|
3186
|
-
}),
|
|
3203
|
+
}), Ti = [
|
|
3187
3204
|
"data-track-index",
|
|
3188
3205
|
"data-track-empty",
|
|
3189
3206
|
"data-track-left",
|
|
@@ -3192,19 +3209,19 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3192
3209
|
"data-track-top",
|
|
3193
3210
|
"data-track-height",
|
|
3194
3211
|
"transform"
|
|
3195
|
-
],
|
|
3212
|
+
], Ei = [
|
|
3196
3213
|
"width",
|
|
3197
3214
|
"height",
|
|
3198
3215
|
"stroke",
|
|
3199
3216
|
"stroke-width",
|
|
3200
3217
|
"stroke-dasharray",
|
|
3201
3218
|
"stroke-linecap"
|
|
3202
|
-
],
|
|
3219
|
+
], Di = [
|
|
3203
3220
|
"data-interactive",
|
|
3204
3221
|
"data-independent-overlay-index",
|
|
3205
3222
|
"width",
|
|
3206
3223
|
"height"
|
|
3207
|
-
],
|
|
3224
|
+
], Oi = ["x", "y"], ki = /* @__PURE__ */ c({
|
|
3208
3225
|
__name: "WaveformTrack",
|
|
3209
3226
|
props: {
|
|
3210
3227
|
track: {},
|
|
@@ -3263,7 +3280,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3263
3280
|
"data-track-height": e.track.height,
|
|
3264
3281
|
transform: `translate(${e.track.left ?? 0}, ${e.track.top})`
|
|
3265
3282
|
}, [
|
|
3266
|
-
s(
|
|
3283
|
+
s(wi, {
|
|
3267
3284
|
track: e.track,
|
|
3268
3285
|
"clip-path-id": e.clipPathId,
|
|
3269
3286
|
"inner-width": e.innerWidth,
|
|
@@ -3280,7 +3297,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3280
3297
|
"frame-style",
|
|
3281
3298
|
"zero-line"
|
|
3282
3299
|
]),
|
|
3283
|
-
s(
|
|
3300
|
+
s(fi, {
|
|
3284
3301
|
track: e.track,
|
|
3285
3302
|
"inner-width": e.innerWidth,
|
|
3286
3303
|
"clean-view": e.cleanView,
|
|
@@ -3306,8 +3323,8 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3306
3323
|
"stroke-dasharray": c.value.borderStyle === "dashed" ? "6 4" : c.value.borderStyle === "dotted" ? "1 3" : void 0,
|
|
3307
3324
|
"stroke-linecap": c.value.borderStyle === "dotted" ? "round" : void 0,
|
|
3308
3325
|
"aria-hidden": "true"
|
|
3309
|
-
}, null, 8,
|
|
3310
|
-
s(
|
|
3326
|
+
}, null, 8, Ei)),
|
|
3327
|
+
s(ei, {
|
|
3311
3328
|
track: e.track,
|
|
3312
3329
|
"clip-path-id": e.clipPathId
|
|
3313
3330
|
}, null, 8, ["track", "clip-path-id"]),
|
|
@@ -3329,7 +3346,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3329
3346
|
onPointerleave: n[4] ||= (e) => o("pointer-leave"),
|
|
3330
3347
|
onClick: n[5] ||= (e) => o("click", e),
|
|
3331
3348
|
onContextmenu: n[6] ||= (e) => o("contextmenu", e)
|
|
3332
|
-
}, null, 42,
|
|
3349
|
+
}, null, 42, Di)) : r("", !0),
|
|
3333
3350
|
!e.track.isEmpty && !e.track.hasVisibleSeries && !e.cleanView ? (g(), i("text", {
|
|
3334
3351
|
key: 2,
|
|
3335
3352
|
class: "waveform-track__no-visible-series",
|
|
@@ -3337,33 +3354,33 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3337
3354
|
y: e.track.height / 2,
|
|
3338
3355
|
"text-anchor": "middle",
|
|
3339
3356
|
"dominant-baseline": "central"
|
|
3340
|
-
}, " 暂无可见曲线 ", 8,
|
|
3341
|
-
], 10,
|
|
3357
|
+
}, " 暂无可见曲线 ", 8, Oi)) : r("", !0)
|
|
3358
|
+
], 10, Ti));
|
|
3342
3359
|
}
|
|
3343
|
-
}),
|
|
3360
|
+
}), Ai = [
|
|
3344
3361
|
"width",
|
|
3345
3362
|
"height",
|
|
3346
3363
|
"data-position",
|
|
3347
3364
|
"data-orientation"
|
|
3348
|
-
],
|
|
3365
|
+
], ji = [
|
|
3349
3366
|
"disabled",
|
|
3350
3367
|
"aria-pressed",
|
|
3351
3368
|
"aria-label",
|
|
3352
3369
|
"onClick"
|
|
3353
|
-
],
|
|
3370
|
+
], Mi = [
|
|
3354
3371
|
"data-line-type",
|
|
3355
3372
|
"data-line-style",
|
|
3356
3373
|
"data-point-type",
|
|
3357
3374
|
"data-error-bar-visible"
|
|
3358
|
-
],
|
|
3375
|
+
], Ni = [
|
|
3359
3376
|
"d",
|
|
3360
3377
|
"stroke",
|
|
3361
3378
|
"stroke-dasharray"
|
|
3362
|
-
],
|
|
3379
|
+
], Pi = [
|
|
3363
3380
|
"d",
|
|
3364
3381
|
"stroke",
|
|
3365
3382
|
"stroke-width"
|
|
3366
|
-
],
|
|
3383
|
+
], Fi = ["d", "fill"], Ii = ["title"], Li = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
3367
3384
|
__name: "WaveformLegend",
|
|
3368
3385
|
props: {
|
|
3369
3386
|
series: {},
|
|
@@ -3421,45 +3438,45 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3421
3438
|
"data-point-type": e.pointType,
|
|
3422
3439
|
"data-error-bar-visible": e.errorBar.visible || void 0
|
|
3423
3440
|
}, [
|
|
3424
|
-
w(
|
|
3441
|
+
w(Wr)(e.lineType) ? (g(), i("path", {
|
|
3425
3442
|
key: 0,
|
|
3426
3443
|
class: "waveform-legend__line",
|
|
3427
|
-
d: w(
|
|
3444
|
+
d: w(Wr)(e.lineType) ?? void 0,
|
|
3428
3445
|
stroke: e.color,
|
|
3429
|
-
"stroke-dasharray": w(
|
|
3446
|
+
"stroke-dasharray": w(Gr)(e.lineStyle),
|
|
3430
3447
|
"stroke-width": "1.5",
|
|
3431
3448
|
fill: "none"
|
|
3432
|
-
}, null, 8,
|
|
3449
|
+
}, null, 8, Ni)) : r("", !0),
|
|
3433
3450
|
e.errorBar.visible ? (g(), i("path", {
|
|
3434
3451
|
key: 1,
|
|
3435
3452
|
class: "waveform-legend__error-bar",
|
|
3436
|
-
d: w(
|
|
3453
|
+
d: w(Kr)(e.errorBar.capWidth),
|
|
3437
3454
|
stroke: e.errorBar.color || e.color,
|
|
3438
3455
|
"stroke-width": e.errorBar.width,
|
|
3439
3456
|
"stroke-linecap": "butt",
|
|
3440
3457
|
fill: "none"
|
|
3441
|
-
}, null, 8,
|
|
3458
|
+
}, null, 8, Pi)) : r("", !0),
|
|
3442
3459
|
e.pointType === "none" ? r("", !0) : (g(), i("path", {
|
|
3443
3460
|
key: 2,
|
|
3444
3461
|
class: "waveform-legend__point",
|
|
3445
|
-
d: w(
|
|
3462
|
+
d: w(Hr)(e.pointType, 30) ?? void 0,
|
|
3446
3463
|
fill: e.color,
|
|
3447
3464
|
transform: "translate(13 8)"
|
|
3448
|
-
}, null, 8,
|
|
3449
|
-
], 8,
|
|
3465
|
+
}, null, 8, Fi))
|
|
3466
|
+
], 8, Mi)), a("span", {
|
|
3450
3467
|
class: "waveform-legend__label",
|
|
3451
3468
|
title: e.name
|
|
3452
|
-
}, S(e.name), 9,
|
|
3469
|
+
}, S(e.name), 9, Ii)], 10, ji))), 128))], 6)], 2)], 8, Ai));
|
|
3453
3470
|
}
|
|
3454
|
-
}), [["__scopeId", "data-v-2ae12e71"]]),
|
|
3471
|
+
}), [["__scopeId", "data-v-2ae12e71"]]), Ri = {
|
|
3455
3472
|
class: "waveform-chart__hover-layer",
|
|
3456
3473
|
"pointer-events": "none",
|
|
3457
3474
|
"aria-hidden": "true"
|
|
3458
|
-
},
|
|
3475
|
+
}, zi = ["clip-path", "transform"], Bi = [
|
|
3459
3476
|
"x1",
|
|
3460
3477
|
"x2",
|
|
3461
3478
|
"y2"
|
|
3462
|
-
],
|
|
3479
|
+
], Vi = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
3463
3480
|
__name: "WaveformHoverLayer",
|
|
3464
3481
|
props: {
|
|
3465
3482
|
state: {},
|
|
@@ -3482,7 +3499,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3482
3499
|
}] : [];
|
|
3483
3500
|
});
|
|
3484
3501
|
});
|
|
3485
|
-
return (t, r) => (g(), i("g",
|
|
3502
|
+
return (t, r) => (g(), i("g", Ri, [(g(!0), i(e, null, y(o.value, (e) => (g(), i("g", {
|
|
3486
3503
|
key: e.track.index,
|
|
3487
3504
|
class: "waveform-track__crosshair waveform-chart__crosshair",
|
|
3488
3505
|
"clip-path": `url(#${n.clipPathId}-${e.track.index})`,
|
|
@@ -3492,9 +3509,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3492
3509
|
x2: e.x,
|
|
3493
3510
|
y1: "0",
|
|
3494
3511
|
y2: e.track.height
|
|
3495
|
-
}, null, 8,
|
|
3512
|
+
}, null, 8, Bi)], 8, zi))), 128))]));
|
|
3496
3513
|
}
|
|
3497
|
-
}), [["__scopeId", "data-v-a6f82099"]]),
|
|
3514
|
+
}), [["__scopeId", "data-v-a6f82099"]]), Hi = [
|
|
3498
3515
|
"data-display-mode",
|
|
3499
3516
|
"data-interaction-mode",
|
|
3500
3517
|
"data-presentation-mode",
|
|
@@ -3503,35 +3520,35 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3503
3520
|
"data-plot-margin-top",
|
|
3504
3521
|
"data-plot-margin-bottom",
|
|
3505
3522
|
"data-title-area-height"
|
|
3506
|
-
],
|
|
3523
|
+
], Ui = [
|
|
3507
3524
|
"role",
|
|
3508
3525
|
"aria-level",
|
|
3509
3526
|
"aria-hidden"
|
|
3510
|
-
],
|
|
3527
|
+
], Wi = ["data-title-scale", "data-title-wrapped"], Gi = [
|
|
3511
3528
|
"width",
|
|
3512
3529
|
"height",
|
|
3513
3530
|
"aria-label"
|
|
3514
|
-
],
|
|
3531
|
+
], Ki = ["id"], qi = ["width", "height"], Ji = ["transform"], Yi = {
|
|
3515
3532
|
key: 0,
|
|
3516
3533
|
class: "waveform-chart__grid-slots",
|
|
3517
3534
|
"aria-hidden": "true"
|
|
3518
|
-
},
|
|
3535
|
+
}, Xi = ["transform"], Zi = ["width", "height"], Qi = ["width", "height"], $i = [
|
|
3519
3536
|
"x",
|
|
3520
3537
|
"y",
|
|
3521
3538
|
"width",
|
|
3522
3539
|
"height"
|
|
3523
|
-
],
|
|
3540
|
+
], ea = {
|
|
3524
3541
|
key: 4,
|
|
3525
3542
|
class: "waveform-chart__legend-layer"
|
|
3526
|
-
},
|
|
3543
|
+
}, ta = [
|
|
3527
3544
|
"data-legend-track-index",
|
|
3528
3545
|
"data-legend-track-id",
|
|
3529
3546
|
"transform"
|
|
3530
|
-
],
|
|
3547
|
+
], na = ["x", "y"], ra = ["x", "y"], ia = /* @__PURE__ */ c({
|
|
3531
3548
|
__name: "WaveformChartView",
|
|
3532
3549
|
props: { controller: {} },
|
|
3533
3550
|
setup(t) {
|
|
3534
|
-
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, resolvedPlotMargin: b, pointerInsideChart: x, handleNativeContextMenu: T, titleAreaReserved: E, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: ee, innerWidth:
|
|
3551
|
+
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, resolvedPlotMargin: b, pointerInsideChart: x, handleNativeContextMenu: T, titleAreaReserved: E, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: W, beginSharedViewportDrag: G, finishViewportDrag: re, cancelViewportDrag: K, handlePointerLeave: ae, handleAnnotationClick: oe, handleAnnotationContextMenu: se, resolveFrameNumber: ce, frameStyle: le, axes: ue, resolvedZeroLine: de, timeUnit: fe, yLabel: q, handleIndependentPointerMove: pe, beginViewportDrag: me, hoverState: J, showTooltip: he, selectionBox: Y, renderedAnnotations: ge, annotationsVisible: _e, handleExistingAnnotationContextMenu: ve, beginAnnotationDrag: X, handleAnnotationMove: ye, endAnnotationDrag: be, resolveLegendPosition: Z, resolveLegendOrientation: xe, legendBackgroundColor: Se, legendInteractive: Ce, resolvedHiddenSeriesIds: we, toggleSeriesVisibility: Te, resolvedXLabel: Ee, xAxisTitleY: De, hasChartArea: Oe, gridOptions: ke, pageCount: Ae, currentPage: je, getPageSize: Pe, chartTracks: Q, goToPage: Fe, annotationInteraction: Ie, editorDraft: Le, contextMenu: Re, editorSeries: ze, editorSeriesOptions: Be, confirmAnnotation: Ve, cancelAnnotation: He, changeDraftSeries: Ue, editContextAnnotation: We, deleteContextAnnotation: Ge, chartHeight: $, setContainer: Ke, setSvgElement: qe, setTitleMeasureElement: Je, setSharedOverlayElement: Ye } = C(t.controller);
|
|
3535
3552
|
return (t, C) => (g(), i("div", {
|
|
3536
3553
|
ref: w(Ke),
|
|
3537
3554
|
class: f(["waveform-chart", [
|
|
@@ -3577,7 +3594,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3577
3594
|
style: p(w(M)),
|
|
3578
3595
|
"data-title-scale": w(N).scale,
|
|
3579
3596
|
"data-title-wrapped": w(N).wrapped || void 0
|
|
3580
|
-
}, S(w(A)), 13,
|
|
3597
|
+
}, S(w(A)), 13, Wi)], 4)) : r("", !0)], 12, Ui)) : r("", !0),
|
|
3581
3598
|
(g(), i("svg", {
|
|
3582
3599
|
ref: w(qe),
|
|
3583
3600
|
class: "waveform-chart__svg",
|
|
@@ -3594,9 +3611,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3594
3611
|
}, [a("rect", {
|
|
3595
3612
|
width: e.width,
|
|
3596
3613
|
height: e.height
|
|
3597
|
-
}, null, 8,
|
|
3614
|
+
}, null, 8, qi)], 8, Ki))), 128))]),
|
|
3598
3615
|
a("g", { transform: `translate(${w(_)}, ${w(B)})` }, [
|
|
3599
|
-
w(o) !== "compact" && !w(l) ? (g(), i("g",
|
|
3616
|
+
w(o) !== "compact" && !w(l) ? (g(), i("g", Yi, [(g(!0), i(e, null, y(w(V), (e) => (g(), i("g", {
|
|
3600
3617
|
key: `grid-slot-${e.slotIndex}`,
|
|
3601
3618
|
transform: `translate(${e.left}, ${e.top})`
|
|
3602
3619
|
}, [e.series ? r("", !0) : (g(), i("rect", {
|
|
@@ -3604,7 +3621,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3604
3621
|
class: "waveform-chart__grid-slot-placeholder",
|
|
3605
3622
|
width: e.width,
|
|
3606
3623
|
height: e.cellHeight
|
|
3607
|
-
}, null, 8,
|
|
3624
|
+
}, null, 8, Zi))], 8, Xi))), 128))])) : r("", !0),
|
|
3608
3625
|
w(o) !== "independent" && w(R).length && w(H) ? (g(), i("rect", {
|
|
3609
3626
|
key: 1,
|
|
3610
3627
|
ref: w(Ye),
|
|
@@ -3612,39 +3629,39 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3612
3629
|
"is-zoomable": !w(u) && w(U) && w(ee),
|
|
3613
3630
|
"is-annotating": !w(u) && w(c) === "annotation"
|
|
3614
3631
|
}]),
|
|
3615
|
-
width: w(
|
|
3616
|
-
height: w(
|
|
3617
|
-
onPointermove: C[0] ||= (...e) => w(
|
|
3618
|
-
onPointerdown: C[1] ||= (...e) => w(
|
|
3619
|
-
onPointerup: C[2] ||= (...e) => w(
|
|
3620
|
-
onPointercancel: C[3] ||= (...e) => w(
|
|
3621
|
-
onPointerleave: C[4] ||= (...e) => w(
|
|
3622
|
-
onClick: C[5] ||= (...e) => w(
|
|
3623
|
-
onContextmenu: C[6] ||= (...e) => w(
|
|
3624
|
-
}, null, 42,
|
|
3625
|
-
(g(!0), i(e, null, y(w(R), (e) => (g(), n(w(
|
|
3632
|
+
width: w(te),
|
|
3633
|
+
height: w(ne),
|
|
3634
|
+
onPointermove: C[0] ||= (...e) => w(W) && w(W)(...e),
|
|
3635
|
+
onPointerdown: C[1] ||= (...e) => w(G) && w(G)(...e),
|
|
3636
|
+
onPointerup: C[2] ||= (...e) => w(re) && w(re)(...e),
|
|
3637
|
+
onPointercancel: C[3] ||= (...e) => w(K) && w(K)(...e),
|
|
3638
|
+
onPointerleave: C[4] ||= (...e) => w(ae) && w(ae)(...e),
|
|
3639
|
+
onClick: C[5] ||= (...e) => w(oe) && w(oe)(...e),
|
|
3640
|
+
onContextmenu: C[6] ||= (...e) => w(se) && w(se)(...e)
|
|
3641
|
+
}, null, 42, Qi)) : r("", !0),
|
|
3642
|
+
(g(!0), i(e, null, y(w(R), (e) => (g(), n(w(ki), {
|
|
3626
3643
|
key: `${e.index}-${e.series.name}`,
|
|
3627
3644
|
track: e,
|
|
3628
3645
|
"clip-path-id": w(z),
|
|
3629
|
-
"inner-width": w(
|
|
3646
|
+
"inner-width": w(te),
|
|
3630
3647
|
zoomable: w(U),
|
|
3631
3648
|
interactive: !w(u),
|
|
3632
3649
|
"display-mode": w(o),
|
|
3633
3650
|
"interaction-mode": w(c),
|
|
3634
|
-
"frame-number": w(
|
|
3635
|
-
"frame-style": w(
|
|
3636
|
-
axes: w(
|
|
3651
|
+
"frame-number": w(ce)(e.index),
|
|
3652
|
+
"frame-style": w(le),
|
|
3653
|
+
axes: w(ue),
|
|
3637
3654
|
"clean-view": w(l),
|
|
3638
|
-
"zero-line": w(
|
|
3639
|
-
"time-unit": w(
|
|
3640
|
-
"y-label": w(
|
|
3641
|
-
onPointerMove: (t) => w(
|
|
3642
|
-
onPointerDown: (t) => w(
|
|
3643
|
-
onPointerUp: w(
|
|
3644
|
-
onPointerCancel: w(
|
|
3645
|
-
onPointerLeave: w(
|
|
3646
|
-
onClick: (t) => w(
|
|
3647
|
-
onContextmenu: (t) => w(
|
|
3655
|
+
"zero-line": w(de),
|
|
3656
|
+
"time-unit": w(fe),
|
|
3657
|
+
"y-label": w(q),
|
|
3658
|
+
onPointerMove: (t) => w(pe)(t, e.index),
|
|
3659
|
+
onPointerDown: (t) => w(me)(t, e.index, !0),
|
|
3660
|
+
onPointerUp: w(re),
|
|
3661
|
+
onPointerCancel: w(K),
|
|
3662
|
+
onPointerLeave: w(ae),
|
|
3663
|
+
onClick: (t) => w(oe)(t, e.index),
|
|
3664
|
+
onContextmenu: (t) => w(se)(t, e.index)
|
|
3648
3665
|
}, null, 8, [
|
|
3649
3666
|
"track",
|
|
3650
3667
|
"clip-path-id",
|
|
@@ -3668,26 +3685,26 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3668
3685
|
"onClick",
|
|
3669
3686
|
"onContextmenu"
|
|
3670
3687
|
]))), 128)),
|
|
3671
|
-
s(w(
|
|
3672
|
-
state: w(
|
|
3688
|
+
s(w(Vi), {
|
|
3689
|
+
state: w(J),
|
|
3673
3690
|
tracks: w(R),
|
|
3674
3691
|
"clip-path-id": w(z),
|
|
3675
|
-
visible: w(
|
|
3692
|
+
visible: w(he) && !w(u)
|
|
3676
3693
|
}, null, 8, [
|
|
3677
3694
|
"state",
|
|
3678
3695
|
"tracks",
|
|
3679
3696
|
"clip-path-id",
|
|
3680
3697
|
"visible"
|
|
3681
3698
|
]),
|
|
3682
|
-
w(
|
|
3699
|
+
w(Y) && w(d)?.kind === "box" ? (g(), i("rect", {
|
|
3683
3700
|
key: 2,
|
|
3684
3701
|
class: "waveform-chart__zoom-selection",
|
|
3685
|
-
x: w(
|
|
3686
|
-
y: w(
|
|
3687
|
-
width: w(
|
|
3688
|
-
height: w(
|
|
3702
|
+
x: w(Y).x,
|
|
3703
|
+
y: w(Y).y,
|
|
3704
|
+
width: w(Y).width,
|
|
3705
|
+
height: w(Y).height,
|
|
3689
3706
|
"aria-hidden": "true"
|
|
3690
|
-
}, null, 8,
|
|
3707
|
+
}, null, 8, $i)) : r("", !0),
|
|
3691
3708
|
w(l) ? r("", !0) : (g(), n(w(Me), {
|
|
3692
3709
|
key: 3,
|
|
3693
3710
|
annotations: w(ge),
|
|
@@ -3706,13 +3723,13 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3706
3723
|
"onMove",
|
|
3707
3724
|
"onDragEnd"
|
|
3708
3725
|
])),
|
|
3709
|
-
w(l) ? r("", !0) : (g(), i("g",
|
|
3726
|
+
w(l) ? r("", !0) : (g(), i("g", ea, [(g(!0), i(e, null, y(w(R), (e) => (g(), i("g", {
|
|
3710
3727
|
key: `legend-${e.index}-${e.series.name}`,
|
|
3711
3728
|
class: "waveform-chart__legend-track",
|
|
3712
3729
|
"data-legend-track-index": e.index,
|
|
3713
3730
|
"data-legend-track-id": e.id,
|
|
3714
3731
|
transform: `translate(${e.left}, ${e.top})`
|
|
3715
|
-
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(
|
|
3732
|
+
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(Li), {
|
|
3716
3733
|
key: 0,
|
|
3717
3734
|
series: e.legendSeries,
|
|
3718
3735
|
position: w(Z)(e.id),
|
|
@@ -3720,7 +3737,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3720
3737
|
"background-color": w(Se),
|
|
3721
3738
|
interactive: w(Ce),
|
|
3722
3739
|
"hidden-series-ids": w(we),
|
|
3723
|
-
width: e.width ?? w(
|
|
3740
|
+
width: e.width ?? w(te),
|
|
3724
3741
|
height: e.height,
|
|
3725
3742
|
onToggle: w(Te)
|
|
3726
3743
|
}, null, 8, [
|
|
@@ -3733,24 +3750,24 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3733
3750
|
"width",
|
|
3734
3751
|
"height",
|
|
3735
3752
|
"onToggle"
|
|
3736
|
-
])) : r("", !0)], 8,
|
|
3737
|
-
], 8,
|
|
3753
|
+
])) : r("", !0)], 8, ta))), 128))]))
|
|
3754
|
+
], 8, Ji),
|
|
3738
3755
|
w(Ee) && !w(l) ? (g(), i("text", {
|
|
3739
3756
|
key: 0,
|
|
3740
3757
|
class: "waveform-chart__label waveform-chart__x-label",
|
|
3741
|
-
x: w(_) + w(
|
|
3758
|
+
x: w(_) + w(te) / 2,
|
|
3742
3759
|
y: w(De),
|
|
3743
3760
|
"text-anchor": "middle"
|
|
3744
|
-
}, S(w(Ee)), 9,
|
|
3761
|
+
}, S(w(Ee)), 9, na)) : r("", !0),
|
|
3745
3762
|
w(Oe) && !w(I) ? (g(), i("text", {
|
|
3746
3763
|
key: 1,
|
|
3747
3764
|
class: "waveform-chart__empty",
|
|
3748
3765
|
x: w(P) / 2,
|
|
3749
3766
|
y: w(F) / 2,
|
|
3750
3767
|
"text-anchor": "middle"
|
|
3751
|
-
}, " 暂无有效波形数据 ", 8,
|
|
3752
|
-
], 40,
|
|
3753
|
-
w(ke).showPagination && w(Ae) > 1 && !w(l) ? (g(), n(w(
|
|
3768
|
+
}, " 暂无有效波形数据 ", 8, ra)) : r("", !0)
|
|
3769
|
+
], 40, Gi)),
|
|
3770
|
+
w(ke).showPagination && w(Ae) > 1 && !w(l) ? (g(), n(w(ie), {
|
|
3754
3771
|
key: 1,
|
|
3755
3772
|
class: "waveform-chart__pagination",
|
|
3756
3773
|
"aria-label": "波形分页",
|
|
@@ -3766,13 +3783,13 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3766
3783
|
"total",
|
|
3767
3784
|
"onChange"
|
|
3768
3785
|
])) : r("", !0),
|
|
3769
|
-
w(Le) && !w(l) && !w(u) ? (g(), n(
|
|
3786
|
+
w(Le) && !w(l) && !w(u) ? (g(), n(Sr, {
|
|
3770
3787
|
key: 2,
|
|
3771
3788
|
annotation: w(Le).annotation,
|
|
3772
3789
|
mode: w(Le).mode,
|
|
3773
3790
|
series: w(ze),
|
|
3774
3791
|
"series-options": w(Be),
|
|
3775
|
-
"time-unit": w(
|
|
3792
|
+
"time-unit": w(fe),
|
|
3776
3793
|
onConfirm: w(Ve),
|
|
3777
3794
|
onCancel: w(He),
|
|
3778
3795
|
onSeriesChange: w(Ue)
|
|
@@ -3804,10 +3821,10 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3804
3821
|
"onDelete",
|
|
3805
3822
|
"onClose"
|
|
3806
3823
|
])) : r("", !0),
|
|
3807
|
-
s(w(
|
|
3808
|
-
state: w(
|
|
3809
|
-
visible: w(
|
|
3810
|
-
"time-unit": w(
|
|
3824
|
+
s(w(Fr), {
|
|
3825
|
+
state: w(J),
|
|
3826
|
+
visible: w(he) && !w(u),
|
|
3827
|
+
"time-unit": w(fe),
|
|
3811
3828
|
"container-width": w(P),
|
|
3812
3829
|
"container-height": w($)
|
|
3813
3830
|
}, null, 8, [
|
|
@@ -3817,9 +3834,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3817
3834
|
"container-width",
|
|
3818
3835
|
"container-height"
|
|
3819
3836
|
])
|
|
3820
|
-
], 46,
|
|
3837
|
+
], 46, Hi));
|
|
3821
3838
|
}
|
|
3822
|
-
}),
|
|
3839
|
+
}), aa = /* @__PURE__ */ c({
|
|
3823
3840
|
__name: "WaveformChart",
|
|
3824
3841
|
props: {
|
|
3825
3842
|
data: {},
|
|
@@ -3846,6 +3863,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3846
3863
|
minVisiblePoints: { default: 0 },
|
|
3847
3864
|
initialXDomain: {},
|
|
3848
3865
|
initialXDomains: {},
|
|
3866
|
+
xDomainStrategy: { default: () => ({ type: "data" }) },
|
|
3849
3867
|
yDomain: {},
|
|
3850
3868
|
yDomains: {},
|
|
3851
3869
|
timeUnit: { default: "ms" },
|
|
@@ -3896,9 +3914,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3896
3914
|
"page-change"
|
|
3897
3915
|
],
|
|
3898
3916
|
setup(e, { expose: t, emit: r }) {
|
|
3899
|
-
let i =
|
|
3900
|
-
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(
|
|
3917
|
+
let i = nr(e, r);
|
|
3918
|
+
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(ia, { controller: w(i) }, null, 8, ["controller"]));
|
|
3901
3919
|
}
|
|
3902
3920
|
});
|
|
3903
3921
|
//#endregion
|
|
3904
|
-
export { Rt as DEFAULT_WAVEFORM_RENDERING_OPTIONS,
|
|
3922
|
+
export { Rt as DEFAULT_WAVEFORM_RENDERING_OPTIONS, aa as WaveformChart, Ke as buildMinorTicks, ft as clamp, at as displayTime, ct as formatAxisTime, st as formatEndpointTime, lt as formatTooltipTime, jt as normalizeWaveformData, Mt as normalizeWaveformSeries, $ as paddedDomain, We as parseWaveformAnnotations, dt as resolveTrackGeometry, zt as resolveWaveformRenderingOptions, Gt as selectRenderablePoints, Ue as serializeWaveformAnnotations };
|