waveform-analysis 0.1.67 → 0.1.69
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 +5 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +333 -322
- package/dist/style.css +1 -1
- package/dist/types/components/core/layout.d.ts +2 -2
- package/dist/types/components/core/yAxisLayoutMetrics.d.ts +1 -1
- package/dist/types/components/core/yAxisTextWidth.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/WaveformChart.css +1 -1
- package/src/components/core/layout.ts +10 -4
- package/src/components/core/useWaveformYAxisLayout.ts +4 -1
- package/src/components/core/yAxisLayoutMetrics.ts +2 -0
- package/src/components/core/yAxisTextWidth.ts +22 -0
package/dist/index.js
CHANGED
|
@@ -1761,43 +1761,46 @@ function Tr(e, t, n, r, i, a = 0) {
|
|
|
1761
1761
|
domain: [e.domain[0], e.domain[1] + (e.domain[1] - e.domain[0]) * a]
|
|
1762
1762
|
} : e);
|
|
1763
1763
|
}
|
|
1764
|
-
function Er(e, t = !0, n, r, i = 5, a = !1) {
|
|
1765
|
-
let
|
|
1764
|
+
function Er(e, t = !0, n, r, i = 5, a = !1, o) {
|
|
1765
|
+
let s = n ? {
|
|
1766
1766
|
domain: e,
|
|
1767
1767
|
values: n
|
|
1768
|
-
} : yr(e, i, t),
|
|
1769
|
-
return a &&
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1768
|
+
} : yr(e, i, t), c = [s.values];
|
|
1769
|
+
return a && s.values.length > 1 && c.push(s.values.slice(0, -1)), { tickTextWidth: Math.max(pr, ...c.flatMap((e) => e.map((t) => {
|
|
1770
|
+
let n = br(t, s.domain, e, r);
|
|
1771
|
+
return o ? o(n) : n.length * pr;
|
|
1772
|
+
}))) };
|
|
1773
|
+
}
|
|
1774
|
+
function Dr(e, t, n, r, i, a = !0, o = !1, s, c = 0, l = !0, u) {
|
|
1775
|
+
let d = /* @__PURE__ */ new Map();
|
|
1773
1776
|
e.forEach((e) => {
|
|
1774
|
-
let
|
|
1777
|
+
let f = {
|
|
1775
1778
|
left: 0,
|
|
1776
1779
|
right: 0
|
|
1777
1780
|
};
|
|
1778
1781
|
Tr(e, t, n, r, s, c).forEach((e) => {
|
|
1779
|
-
let t =
|
|
1780
|
-
|
|
1782
|
+
let t = f[e.side]++, n = `${e.side}:${t}`, r = Er(e.domain, a, void 0, l ? e.seriesList[0]?.unit : void 0, i, o, u).tickTextWidth;
|
|
1783
|
+
d.set(n, Math.max(d.get(n) ?? pr, r));
|
|
1781
1784
|
});
|
|
1782
1785
|
});
|
|
1783
|
-
let
|
|
1786
|
+
let f = [], p = {
|
|
1784
1787
|
left: 0,
|
|
1785
1788
|
right: 0
|
|
1786
1789
|
};
|
|
1787
1790
|
return ["left", "right"].forEach((e) => {
|
|
1788
|
-
Array.from(
|
|
1789
|
-
let n =
|
|
1790
|
-
|
|
1791
|
+
Array.from(d.keys()).filter((t) => t.startsWith(`${e}:`)).map((t) => Number(t.slice(e.length + 1))).sort((e, t) => e - t).forEach((t) => {
|
|
1792
|
+
let n = d.get(`${e}:${t}`) ?? pr, r = e === "left" && p.left > 0 ? -p.left : p[e], i = r + (n + mr + gr + _r / 2) * (e === "left" ? -1 : 1), a = n + mr + gr + _r + hr;
|
|
1793
|
+
f.push({
|
|
1791
1794
|
side: e,
|
|
1792
1795
|
sideIndex: t,
|
|
1793
1796
|
axisOffset: r,
|
|
1794
1797
|
labelOffset: i,
|
|
1795
1798
|
clearance: a
|
|
1796
|
-
}),
|
|
1799
|
+
}), p[e] += a;
|
|
1797
1800
|
});
|
|
1798
1801
|
}), {
|
|
1799
|
-
slots:
|
|
1800
|
-
clearance:
|
|
1802
|
+
slots: f,
|
|
1803
|
+
clearance: p
|
|
1801
1804
|
};
|
|
1802
1805
|
}
|
|
1803
1806
|
function Or(e, t, n) {
|
|
@@ -3049,18 +3052,26 @@ function qi(e, t, n, r) {
|
|
|
3049
3052
|
return n ? [[e.id, n]] : [];
|
|
3050
3053
|
})) : n;
|
|
3051
3054
|
}
|
|
3052
|
-
function Ji(e, t, n, r, i, a, o, s, c = 0, l = !0) {
|
|
3053
|
-
let
|
|
3055
|
+
function Ji(e, t, n, r, i, a, o, s, c = 0, l = !0, u) {
|
|
3056
|
+
let d = e.filter((e) => e.visibleSeries.length > 0).flatMap((e) => Tr(e, t, n, r, i, c)).map((e) => Er(e.domain, a, void 0, l ? e.seriesList[0]?.unit : void 0, o, s, u).tickTextWidth), f = Math.max(7, ...d), p = f + 7 + 4, m = -(7 + f + 0 + 20 / 2);
|
|
3054
3057
|
return {
|
|
3055
|
-
tickClearance:
|
|
3056
|
-
fullClearance:
|
|
3057
|
-
labelCenterX:
|
|
3058
|
+
tickClearance: p,
|
|
3059
|
+
fullClearance: f + 7 + 0 + 20 + 4,
|
|
3060
|
+
labelCenterX: m
|
|
3058
3061
|
};
|
|
3059
3062
|
}
|
|
3060
3063
|
//#endregion
|
|
3064
|
+
//#region src/components/core/yAxisTextWidth.ts
|
|
3065
|
+
var Yi = "700 11px sans-serif", Xi;
|
|
3066
|
+
function Zi(e) {
|
|
3067
|
+
Xi === void 0 && (Xi = typeof document < "u" && typeof CanvasRenderingContext2D < "u" ? document.createElement("canvas").getContext("2d") : null, Xi && (Xi.font = Yi));
|
|
3068
|
+
let t = Xi ? Xi.measureText(e).width : [...e].reduce((e, t) => e + (/[0-9]/.test(t) ? 6.2 : t === "." ? 3.1 : 7), 0);
|
|
3069
|
+
return Math.ceil(t);
|
|
3070
|
+
}
|
|
3071
|
+
//#endregion
|
|
3061
3072
|
//#region src/components/core/useWaveformYAxisLayout.ts
|
|
3062
|
-
function
|
|
3063
|
-
let { props: n, chartTracks: r, layoutTracks: i, chartWidth: a, gridOptions: o, viewportYDomains: s, yAxisTickCount: c } = e, l = t(() => n.layoutPreset === "edge-compact"), u = t(() => !l.value || n.unitDisplayMode === "axis"), d = t(() => Ji(r.value, n.overlayMode, n.yDomain, n.yDomains, s.value, n.axes?.y?.nice !== !1, c.value, n.displayMode === "compact", n.axes?.y?.upperPaddingRatio, u.value)), f = t(() => r.value.some((e) => e.visibleSeries.length === 1 && !!(e.visibleSeries[0]?.name.trim() || n.yLabel))), p = t(() => r.value.some((e) => e.visibleSeries.length > 0)), m = t(() => Math.max(zt.left, f.value ? d.value.fullClearance : p.value ? d.value.tickClearance : 0)), h = t(() => Dr(i.value.filter((e) => e.visibleSeries.length > 0), n.overlayMode, n.yDomain, n.yDomains, c.value, n.axes?.y?.nice !== !1, n.displayMode === "compact", s.value, n.axes?.y?.upperPaddingRatio, u.value)), g = t(() => l.value ? zt.right + Math.max(0, _.value - 4) : n.overlayMode === "multi-axis" ? Math.max(m.value, h.value.clearance.left) : m.value), _ = t(() => p.value ? n.overlayMode === "multi-axis" || f.value ? h.value.clearance.left : d.value.tickClearance : 0), v = t(() => n.overlayMode === "multi-axis" ? Math.max(zt.right, h.value.clearance.right) : zt.right), y = t(() => Math.max(0, a.value - g.value - v.value));
|
|
3073
|
+
function Qi(e) {
|
|
3074
|
+
let { props: n, chartTracks: r, layoutTracks: i, chartWidth: a, gridOptions: o, viewportYDomains: s, yAxisTickCount: c } = e, l = t(() => n.layoutPreset === "edge-compact"), u = t(() => !l.value || n.unitDisplayMode === "axis"), d = t(() => Ji(r.value, n.overlayMode, n.yDomain, n.yDomains, s.value, n.axes?.y?.nice !== !1, c.value, n.displayMode === "compact", n.axes?.y?.upperPaddingRatio, u.value, l.value ? Zi : void 0)), f = t(() => r.value.some((e) => e.visibleSeries.length === 1 && !!(e.visibleSeries[0]?.name.trim() || n.yLabel))), p = t(() => r.value.some((e) => e.visibleSeries.length > 0)), m = t(() => Math.max(zt.left, f.value ? d.value.fullClearance : p.value ? d.value.tickClearance : 0)), h = t(() => Dr(i.value.filter((e) => e.visibleSeries.length > 0), n.overlayMode, n.yDomain, n.yDomains, c.value, n.axes?.y?.nice !== !1, n.displayMode === "compact", s.value, n.axes?.y?.upperPaddingRatio, u.value, l.value ? Zi : void 0)), g = t(() => l.value ? zt.right / 4 + Math.max(0, _.value - 4) : n.overlayMode === "multi-axis" ? Math.max(m.value, h.value.clearance.left) : m.value), _ = t(() => p.value ? n.overlayMode === "multi-axis" || f.value ? h.value.clearance.left : d.value.tickClearance : 0), v = t(() => n.overlayMode === "multi-axis" ? Math.max(zt.right, h.value.clearance.right) : zt.right), y = t(() => Math.max(0, a.value - g.value - v.value));
|
|
3064
3075
|
return {
|
|
3065
3076
|
yAxisMetrics: d,
|
|
3066
3077
|
yAxisSlots: h,
|
|
@@ -3078,7 +3089,7 @@ function Yi(e) {
|
|
|
3078
3089
|
}
|
|
3079
3090
|
//#endregion
|
|
3080
3091
|
//#region src/components/core/useWaveformLayout.ts
|
|
3081
|
-
function
|
|
3092
|
+
function $i(e) {
|
|
3082
3093
|
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, linePointOverrides: m } = e, h = t(() => r.value.map((e, t) => ({
|
|
3083
3094
|
...e,
|
|
3084
3095
|
color: e.color ?? (t === 0 ? n.lineColor : Ut[t % Ut.length])
|
|
@@ -3104,7 +3115,7 @@ function Xi(e) {
|
|
|
3104
3115
|
}), v = t(() => n.unitDisplayMode === "legend-single-series" && !_.value.some((e) => e.series.length > 1)), y = t(() => Dn(n.rendering)), b = t(() => Wi(_.value, g.value.hideEmptyTracks)), x = t(() => Un(b.value.length, g.value)), S = t(() => Wn(b.value, i.value, g.value)), C = t(() => {
|
|
3105
3116
|
let e = S.value.filter((e) => e.series.length > 0);
|
|
3106
3117
|
return g.value.fillIncompleteLastRow && e.length > 0 ? e : S.value;
|
|
3107
|
-
}), w = t(() => vr(s.value, n.axes?.y?.splitNumber)), T = t(() => qi(n.displayMode, _.value, d.value, f.value)), { yAxisMetrics: E, yAxisSlots: D, resolvedChartLeftMargin: O, innerWidth: k, yAxisLayout: A, hasVisibleWaveformData: j } =
|
|
3118
|
+
}), w = t(() => vr(s.value, n.axes?.y?.splitNumber)), T = t(() => qi(n.displayMode, _.value, d.value, f.value)), { yAxisMetrics: E, yAxisSlots: D, resolvedChartLeftMargin: O, innerWidth: k, yAxisLayout: A, hasVisibleWaveformData: j } = Qi({
|
|
3108
3119
|
props: n,
|
|
3109
3120
|
chartTracks: _,
|
|
3110
3121
|
layoutTracks: C,
|
|
@@ -3198,13 +3209,13 @@ function Xi(e) {
|
|
|
3198
3209
|
resolveFrameNumber: Ki(() => n.frameNumber, () => n.frameNumbers, () => _.value)
|
|
3199
3210
|
};
|
|
3200
3211
|
}
|
|
3201
|
-
var
|
|
3202
|
-
function
|
|
3212
|
+
var ea = 1e-6;
|
|
3213
|
+
function ta(e) {
|
|
3203
3214
|
return Number.isFinite(e) ? Math.max(1, e) : 1;
|
|
3204
3215
|
}
|
|
3205
|
-
function
|
|
3206
|
-
let a = i ? 8 : 18, o = i ? 0 : 44, s =
|
|
3207
|
-
if (!(m >
|
|
3216
|
+
function na({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r, edgeCompact: i = !1 }) {
|
|
3217
|
+
let a = i ? 8 : 18, o = i ? 0 : 44, s = ta(e), c = ta(t), l = ta(n), u = Number.isFinite(r) ? r : 0, d = u * Math.PI / 180, f = Math.abs(Math.cos(d)), p = Math.abs(Math.sin(d)), m = (u % 360 + 360) % 360;
|
|
3218
|
+
if (!(m > ea && Math.abs(m - 360) > ea)) {
|
|
3208
3219
|
let e = Math.max(1, Math.ceil(s / l)), t = l, n = c * e;
|
|
3209
3220
|
return {
|
|
3210
3221
|
textWidth: t,
|
|
@@ -3229,7 +3240,7 @@ function $i({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r,
|
|
|
3229
3240
|
}
|
|
3230
3241
|
//#endregion
|
|
3231
3242
|
//#region src/components/core/useWaveformPresentation.ts
|
|
3232
|
-
function
|
|
3243
|
+
function ra(e) {
|
|
3233
3244
|
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(() => ({
|
|
3234
3245
|
width: l.value === void 0 ? "100%" : `${l.value}px`,
|
|
3235
3246
|
height: u.value === void 0 ? "100%" : `${u.value}px`
|
|
@@ -3276,7 +3287,7 @@ function ea(e) {
|
|
|
3276
3287
|
maxWidth: k.value ? "none" : `${M.value}px`,
|
|
3277
3288
|
whiteSpace: k.value ? "nowrap" : "normal",
|
|
3278
3289
|
overflowWrap: k.value ? "normal" : "anywhere"
|
|
3279
|
-
})), P = t(() =>
|
|
3290
|
+
})), P = t(() => na({
|
|
3280
3291
|
naturalWidth: C.value && !k.value && o.value > 0 ? Math.min(a.value || M.value, M.value) : a.value || j.value,
|
|
3281
3292
|
naturalHeight: o.value || D.value * 1.2,
|
|
3282
3293
|
availableWidth: M.value,
|
|
@@ -3334,66 +3345,66 @@ function ea(e) {
|
|
|
3334
3345
|
}
|
|
3335
3346
|
//#endregion
|
|
3336
3347
|
//#region src/core/samplingReferenceValues.ts
|
|
3337
|
-
function
|
|
3348
|
+
function ia(e, t) {
|
|
3338
3349
|
return t === 0 ? 0 : Number.isFinite(e) ? Math.min(t, Math.max(1, Math.floor(e))) : t;
|
|
3339
3350
|
}
|
|
3340
|
-
function
|
|
3351
|
+
function aa(e, t, n, r) {
|
|
3341
3352
|
let i = r - n;
|
|
3342
3353
|
return {
|
|
3343
3354
|
start: n + Math.floor(e * i / t),
|
|
3344
3355
|
end: n + Math.floor((e + 1) * i / t)
|
|
3345
3356
|
};
|
|
3346
3357
|
}
|
|
3347
|
-
function
|
|
3358
|
+
function oa(e, t) {
|
|
3348
3359
|
e[e.length - 1] !== t && e.push(t);
|
|
3349
3360
|
}
|
|
3350
|
-
function
|
|
3361
|
+
function sa(e, t, n) {
|
|
3351
3362
|
if (e <= t) return Array.from({ length: e }, (e, t) => t);
|
|
3352
3363
|
if (t === 1) return [0];
|
|
3353
3364
|
if (t === 2) return [0, e - 1];
|
|
3354
3365
|
let r = [0];
|
|
3355
|
-
return n().forEach((e) =>
|
|
3366
|
+
return n().forEach((e) => oa(r, e)), oa(r, e - 1), r;
|
|
3356
3367
|
}
|
|
3357
|
-
function
|
|
3368
|
+
function ca(e, t, n) {
|
|
3358
3369
|
let r = n === "minmax" ? Math.floor((t - 2) / 2) : Math.max(0, t - 2);
|
|
3359
|
-
return
|
|
3370
|
+
return sa(e.length, t, () => {
|
|
3360
3371
|
if (!r) return [];
|
|
3361
3372
|
let t = [];
|
|
3362
3373
|
for (let i = 0; i < r; i += 1) {
|
|
3363
|
-
let a =
|
|
3374
|
+
let a = aa(i, r, 1, e.length - 1), o = a.start, s = a.start;
|
|
3364
3375
|
for (let t = a.start + 1; t < a.end; t += 1) e[t] < e[o] && (o = t), e[t] > e[s] && (s = t);
|
|
3365
|
-
n === "min" ?
|
|
3376
|
+
n === "min" ? oa(t, o) : n === "max" ? oa(t, s) : o <= s ? (oa(t, o), oa(t, s)) : (oa(t, s), oa(t, o));
|
|
3366
3377
|
}
|
|
3367
3378
|
return t;
|
|
3368
3379
|
});
|
|
3369
3380
|
}
|
|
3370
|
-
function
|
|
3381
|
+
function la(e, t) {
|
|
3371
3382
|
let n = Math.floor((t - 2) / 4);
|
|
3372
|
-
return
|
|
3383
|
+
return sa(e.length, t, () => {
|
|
3373
3384
|
if (!n) return [];
|
|
3374
3385
|
let t = [];
|
|
3375
3386
|
for (let r = 0; r < n; r += 1) {
|
|
3376
|
-
let i =
|
|
3387
|
+
let i = aa(r, n, 1, e.length - 1), a = i.start, o = i.start;
|
|
3377
3388
|
for (let t = i.start + 1; t < i.end; t += 1) e[t] < e[a] && (a = t), e[t] > e[o] && (o = t);
|
|
3378
3389
|
[
|
|
3379
3390
|
i.start,
|
|
3380
3391
|
a,
|
|
3381
3392
|
o,
|
|
3382
3393
|
i.end - 1
|
|
3383
|
-
].sort((e, t) => e - t).forEach((e) =>
|
|
3394
|
+
].sort((e, t) => e - t).forEach((e) => oa(t, e));
|
|
3384
3395
|
}
|
|
3385
3396
|
return t;
|
|
3386
3397
|
});
|
|
3387
3398
|
}
|
|
3388
|
-
function
|
|
3389
|
-
return
|
|
3399
|
+
function ua(e, t, n) {
|
|
3400
|
+
return sa(e.length, n, () => {
|
|
3390
3401
|
let r = (e.length - 2) / (n - 2), i = [], a = 0;
|
|
3391
3402
|
for (let o = 0; o < n - 2; o += 1) {
|
|
3392
3403
|
let s = Math.min(e.length, Math.floor((o + 1) * r) + 1), c = Math.min(e.length, Math.floor((o + 2) * r) + 1), l = 0, u = 0;
|
|
3393
3404
|
for (let n = s; n < c; n += 1) l += e[n], u += t[n];
|
|
3394
3405
|
let d = c - s;
|
|
3395
3406
|
d ? (l /= d, u /= d) : (l = e[e.length - 1], u = t[t.length - 1]);
|
|
3396
|
-
let f =
|
|
3407
|
+
let f = aa(o, n - 2, 1, e.length - 1), p = f.start, m = -1;
|
|
3397
3408
|
for (let n = f.start; n < f.end; n += 1) {
|
|
3398
3409
|
let r = Math.abs((e[a] - l) * (t[n] - t[a]) - (e[a] - e[n]) * (u - t[a]));
|
|
3399
3410
|
r > m && (m = r, p = n);
|
|
@@ -3403,10 +3414,10 @@ function sa(e, t, n) {
|
|
|
3403
3414
|
return i;
|
|
3404
3415
|
});
|
|
3405
3416
|
}
|
|
3406
|
-
function
|
|
3407
|
-
let i =
|
|
3417
|
+
function da(e, t, n, r) {
|
|
3418
|
+
let i = ia(n, e.length), a = new Float64Array(i), o = new Float64Array(i);
|
|
3408
3419
|
for (let n = 0; n < i; n += 1) {
|
|
3409
|
-
let s =
|
|
3420
|
+
let s = aa(n, i, 0, e.length);
|
|
3410
3421
|
for (let r = s.start; r < s.end; r += 1) a[n] += e[r], o[n] += t[r];
|
|
3411
3422
|
let c = s.end - s.start;
|
|
3412
3423
|
a[n] /= c, r === "average" && (o[n] /= c);
|
|
@@ -3417,10 +3428,10 @@ function ca(e, t, n, r) {
|
|
|
3417
3428
|
y: o
|
|
3418
3429
|
};
|
|
3419
3430
|
}
|
|
3420
|
-
function
|
|
3431
|
+
function fa(e, t, n, r) {
|
|
3421
3432
|
if (e.length !== t.length) throw Error("x and y must have the same length");
|
|
3422
|
-
if (n === "average" || n === "sum") return
|
|
3423
|
-
let i =
|
|
3433
|
+
if (n === "average" || n === "sum") return da(e, t, r, n);
|
|
3434
|
+
let i = ia(r, e.length), a = n === "none" || e.length <= i ? Array.from({ length: e.length }, (e, t) => t) : n === "peak" ? la(t, i) : n === "lttb" ? ua(e, t, i) : ca(t, i, n);
|
|
3424
3435
|
return {
|
|
3425
3436
|
kind: "source-indexes",
|
|
3426
3437
|
sourceIndexes: Uint32Array.from(a)
|
|
@@ -3428,41 +3439,41 @@ function la(e, t, n, r) {
|
|
|
3428
3439
|
}
|
|
3429
3440
|
//#endregion
|
|
3430
3441
|
//#region src/core/workerSampling/javascriptBackend.ts
|
|
3431
|
-
var
|
|
3442
|
+
var pa = {
|
|
3432
3443
|
kind: "javascript",
|
|
3433
3444
|
sample(e) {
|
|
3434
|
-
return
|
|
3445
|
+
return fa(e.x, e.y, e.strategy, e.targetPointCount);
|
|
3435
3446
|
}
|
|
3436
|
-
},
|
|
3437
|
-
function
|
|
3447
|
+
}, ma = 8 * 1024 * 1024;
|
|
3448
|
+
function ha(e, t) {
|
|
3438
3449
|
return t === 0 ? 0 : Number.isFinite(e) ? Math.min(t, Math.max(1, Math.floor(e))) : t;
|
|
3439
3450
|
}
|
|
3440
|
-
function
|
|
3451
|
+
function ga(e, t, n, r) {
|
|
3441
3452
|
let i = r - n;
|
|
3442
3453
|
return {
|
|
3443
3454
|
start: n + Math.floor(e * i / t),
|
|
3444
3455
|
end: n + Math.floor((e + 1) * i / t)
|
|
3445
3456
|
};
|
|
3446
3457
|
}
|
|
3447
|
-
function
|
|
3458
|
+
function _a(e, t) {
|
|
3448
3459
|
e[e.length - 1] !== t && e.push(t);
|
|
3449
3460
|
}
|
|
3450
|
-
function
|
|
3461
|
+
function va(e) {
|
|
3451
3462
|
return "minimumIndexes" in e ? e.minimumIndexes.byteLength + e.maximumIndexes.byteLength : e.x.byteLength + e.y.byteLength + e.count.byteLength;
|
|
3452
3463
|
}
|
|
3453
|
-
function
|
|
3464
|
+
function ya(e, t) {
|
|
3454
3465
|
let n = 1;
|
|
3455
3466
|
for (; n * 2 <= t && e % (n * 2) == 0;) n *= 2;
|
|
3456
3467
|
return n;
|
|
3457
3468
|
}
|
|
3458
|
-
var
|
|
3469
|
+
var ba = class {
|
|
3459
3470
|
points;
|
|
3460
3471
|
extremaLayers = [];
|
|
3461
3472
|
sumLayers = [];
|
|
3462
3473
|
indexBytes = 0;
|
|
3463
3474
|
maxBytes;
|
|
3464
3475
|
constructor(e, t = {}) {
|
|
3465
|
-
this.points = e, this.maxBytes = Number.isFinite(t.maxBytes) ? Math.max(0, Math.floor(t.maxBytes ?? 0)) :
|
|
3476
|
+
this.points = e, this.maxBytes = Number.isFinite(t.maxBytes) ? Math.max(0, Math.floor(t.maxBytes ?? 0)) : ma;
|
|
3466
3477
|
}
|
|
3467
3478
|
get byteLength() {
|
|
3468
3479
|
return this.indexBytes;
|
|
@@ -3471,7 +3482,7 @@ var _a = class {
|
|
|
3471
3482
|
this.extremaLayers.length = 0, this.sumLayers.length = 0, this.indexBytes = 0;
|
|
3472
3483
|
}
|
|
3473
3484
|
sample(e, t, n, r) {
|
|
3474
|
-
let i = Math.max(0, Math.min(this.points.length, Math.floor(e))), a = Math.max(i, Math.min(this.points.length, Math.floor(t))), o = a - i, s =
|
|
3485
|
+
let i = Math.max(0, Math.min(this.points.length, Math.floor(e))), a = Math.max(i, Math.min(this.points.length, Math.floor(t))), o = a - i, s = ha(r, o);
|
|
3475
3486
|
if (n !== "lttb") return n === "average" || n === "sum" ? this.aggregate(i, a, s, n) : n === "none" || o <= s ? this.allIndexes(i, a) : s === 1 ? this.indexes([i]) : s === 2 ? this.indexes([i, a - 1]) : this.extrema(i, a, s, n);
|
|
3476
3487
|
}
|
|
3477
3488
|
allIndexes(e, t) {
|
|
@@ -3491,24 +3502,24 @@ var _a = class {
|
|
|
3491
3502
|
if (i === 0) return this.indexes([e, t - 1]);
|
|
3492
3503
|
let a = [e];
|
|
3493
3504
|
for (let n = 0; n < i; n += 1) {
|
|
3494
|
-
let o =
|
|
3505
|
+
let o = ga(n, i, e + 1, t - 1), s = this.queryExtrema(o.start, o.end);
|
|
3495
3506
|
if (!s) return;
|
|
3496
|
-
if (r === "min")
|
|
3497
|
-
else if (r === "max")
|
|
3498
|
-
else if (r === "minmax") s.minimum <= s.maximum ? (
|
|
3507
|
+
if (r === "min") _a(a, s.minimum);
|
|
3508
|
+
else if (r === "max") _a(a, s.maximum);
|
|
3509
|
+
else if (r === "minmax") s.minimum <= s.maximum ? (_a(a, s.minimum), _a(a, s.maximum)) : (_a(a, s.maximum), _a(a, s.minimum));
|
|
3499
3510
|
else for (let e of [
|
|
3500
3511
|
o.start,
|
|
3501
3512
|
s.minimum,
|
|
3502
3513
|
s.maximum,
|
|
3503
3514
|
o.end - 1
|
|
3504
|
-
].sort((e, t) => e - t))
|
|
3515
|
+
].sort((e, t) => e - t)) _a(a, e);
|
|
3505
3516
|
}
|
|
3506
|
-
return
|
|
3517
|
+
return _a(a, t - 1), this.indexes(a);
|
|
3507
3518
|
}
|
|
3508
3519
|
aggregate(e, t, n, r) {
|
|
3509
3520
|
let i = new Float64Array(n), a = new Float64Array(n);
|
|
3510
3521
|
for (let o = 0; o < n; o += 1) {
|
|
3511
|
-
let s =
|
|
3522
|
+
let s = ga(o, n, e, t), c = this.querySum(s.start, s.end);
|
|
3512
3523
|
if (!c || c.count === 0) return;
|
|
3513
3524
|
i[o] = c.x / c.count, a[o] = r === "average" ? c.y / c.count : c.y;
|
|
3514
3525
|
}
|
|
@@ -3523,7 +3534,7 @@ var _a = class {
|
|
|
3523
3534
|
if (!this.ensureExtrema(n)) return;
|
|
3524
3535
|
let r = e, i = e;
|
|
3525
3536
|
for (let n = e; n < t;) {
|
|
3526
|
-
let e =
|
|
3537
|
+
let e = ya(n, t - n), a = Math.floor(Math.log2(e)), o = n / e, s = this.extremaLayers[a], c = s ? s.minimumIndexes[o] : n, l = s ? s.maximumIndexes[o] : n;
|
|
3527
3538
|
this.isMinimum(c, r) && (r = c), this.isMaximum(l, i) && (i = l), n += e;
|
|
3528
3539
|
}
|
|
3529
3540
|
return {
|
|
@@ -3536,7 +3547,7 @@ var _a = class {
|
|
|
3536
3547
|
if (!this.ensureSum(n)) return;
|
|
3537
3548
|
let r = 0, i = 0, a = 0;
|
|
3538
3549
|
for (let n = e; n < t;) {
|
|
3539
|
-
let e =
|
|
3550
|
+
let e = ya(n, t - n), o = Math.floor(Math.log2(e)), s = n / e, c = this.sumLayers[o];
|
|
3540
3551
|
if (c) r += c.x[s], i += c.y[s], a += c.count[s];
|
|
3541
3552
|
else {
|
|
3542
3553
|
let e = this.points[n];
|
|
@@ -3557,7 +3568,7 @@ var _a = class {
|
|
|
3557
3568
|
minimumIndexes: new Uint32Array(e),
|
|
3558
3569
|
maximumIndexes: new Uint32Array(e)
|
|
3559
3570
|
};
|
|
3560
|
-
if (!this.reserve(
|
|
3571
|
+
if (!this.reserve(va(n))) return !1;
|
|
3561
3572
|
let r = this.extremaLayers[t - 1];
|
|
3562
3573
|
for (let t = 0; t < e; t += 1) {
|
|
3563
3574
|
let e = t * 2, i = e + 1, a = r ? r.minimumIndexes[e] : e, o = r ? r.maximumIndexes[e] : e, s = r ? i < r.minimumIndexes.length : i < this.points.length, c = r && s ? r.minimumIndexes[i] : i, l = r && s ? r.maximumIndexes[i] : i;
|
|
@@ -3575,7 +3586,7 @@ var _a = class {
|
|
|
3575
3586
|
y: new Float64Array(e),
|
|
3576
3587
|
count: new Uint32Array(e)
|
|
3577
3588
|
};
|
|
3578
|
-
if (!this.reserve(
|
|
3589
|
+
if (!this.reserve(va(n))) return !1;
|
|
3579
3590
|
let r = this.sumLayers[t - 1];
|
|
3580
3591
|
for (let t = 0; t < e; t += 1) {
|
|
3581
3592
|
let e = t * 2, i = e + 1;
|
|
@@ -3600,8 +3611,8 @@ var _a = class {
|
|
|
3600
3611
|
let n = this.points[e], r = this.points[t];
|
|
3601
3612
|
return n.y > r.y || n.y === r.y && e < t;
|
|
3602
3613
|
}
|
|
3603
|
-
},
|
|
3604
|
-
function
|
|
3614
|
+
}, xa = 1e3, Sa = L((e) => e.x);
|
|
3615
|
+
function Ca(e) {
|
|
3605
3616
|
let t = [], n = !0, r = -Infinity;
|
|
3606
3617
|
for (let i of e) !Number.isFinite(i.x) || !Number.isFinite(i.y) || (i.x < r && (n = !1), r = i.x, t.push({
|
|
3607
3618
|
x: i.x,
|
|
@@ -3612,7 +3623,7 @@ function ba(e) {
|
|
|
3612
3623
|
}));
|
|
3613
3624
|
return n || t.sort((e, t) => e.x - t.x), t;
|
|
3614
3625
|
}
|
|
3615
|
-
function
|
|
3626
|
+
function wa(e, t) {
|
|
3616
3627
|
let n = Infinity, r = -Infinity, i = Infinity, a = -Infinity;
|
|
3617
3628
|
for (let t of e) n = Math.min(n, t.x), r = Math.max(r, t.x), i = Math.min(i, t.y), a = Math.max(a, t.y);
|
|
3618
3629
|
return {
|
|
@@ -3622,7 +3633,7 @@ function xa(e, t) {
|
|
|
3622
3633
|
yDomain: e.length ? [i, a] : null
|
|
3623
3634
|
};
|
|
3624
3635
|
}
|
|
3625
|
-
function
|
|
3636
|
+
function Ta(e, t, n = e.length) {
|
|
3626
3637
|
let r = Infinity, i = -Infinity, a = Infinity, o = -Infinity;
|
|
3627
3638
|
for (let n = 0; n < e.length; n += 1) r = Math.min(r, e[n]), i = Math.max(i, e[n]), a = Math.min(a, t[n]), o = Math.max(o, t[n]);
|
|
3628
3639
|
return {
|
|
@@ -3632,39 +3643,39 @@ function Sa(e, t, n = e.length) {
|
|
|
3632
3643
|
yDomain: e.length ? [a, o] : null
|
|
3633
3644
|
};
|
|
3634
3645
|
}
|
|
3635
|
-
function
|
|
3646
|
+
function Ea(e, t) {
|
|
3636
3647
|
return e ? e.revision === t ? "ok" : "stale-revision" : "not-found";
|
|
3637
3648
|
}
|
|
3638
|
-
function
|
|
3649
|
+
function Da(e) {
|
|
3639
3650
|
return e === "auto" ? "peak" : e;
|
|
3640
3651
|
}
|
|
3641
|
-
function
|
|
3652
|
+
function Oa(e) {
|
|
3642
3653
|
if (Number.isFinite(e.maxPointCount) && (e.maxPointCount ?? 0) >= 1) return Math.floor(e.maxPointCount);
|
|
3643
3654
|
let t = Number.isFinite(e.plotWidth) ? Math.max(0, e.plotWidth) : 0, n = Number.isFinite(e.maxPointsPerPixel) ? Math.max(0, e.maxPointsPerPixel ?? 0) : 4;
|
|
3644
3655
|
return Math.max(1, Math.floor(t * n));
|
|
3645
3656
|
}
|
|
3646
|
-
function
|
|
3657
|
+
function ka(e, t) {
|
|
3647
3658
|
if (e.mode === "raw") return !0;
|
|
3648
3659
|
if (e.mode !== "auto") return !1;
|
|
3649
|
-
let n = Number.isFinite(e.autoThreshold) ? Math.max(1, Math.floor(e.autoThreshold ?? 0)) :
|
|
3660
|
+
let n = Number.isFinite(e.autoThreshold) ? Math.max(1, Math.floor(e.autoThreshold ?? 0)) : xa;
|
|
3650
3661
|
if (!e.previousSelectedMode) return t <= n;
|
|
3651
3662
|
let r = Number.isFinite(e.autoHysteresis) ? Math.max(0, Math.floor(e.autoHysteresis ?? 0)) : 0;
|
|
3652
3663
|
return e.previousSelectedMode === "raw" ? t <= n + r : t <= Math.max(0, n - r);
|
|
3653
3664
|
}
|
|
3654
|
-
function
|
|
3665
|
+
function Aa(e, t) {
|
|
3655
3666
|
let n = e[0], r = e.at(-1);
|
|
3656
|
-
return Number.isFinite(t) && n && r && t >= n.x && t <= r.x ? e[
|
|
3667
|
+
return Number.isFinite(t) && n && r && t >= n.x && t <= r.x ? e[Sa.center(e, t)] : void 0;
|
|
3657
3668
|
}
|
|
3658
|
-
function
|
|
3669
|
+
function ja(e) {
|
|
3659
3670
|
return e ? e.kind === "source-indexes" ? e.sourceIndexes.length : e.x.length : 0;
|
|
3660
3671
|
}
|
|
3661
|
-
function
|
|
3672
|
+
function Ma(e, t) {
|
|
3662
3673
|
return e.kind === "aggregates" ? e : {
|
|
3663
3674
|
kind: "source-indexes",
|
|
3664
3675
|
sourceIndexes: Uint32Array.from(e.sourceIndexes, (e) => e + t)
|
|
3665
3676
|
};
|
|
3666
3677
|
}
|
|
3667
|
-
function
|
|
3678
|
+
function Na(e, t, n, r, i) {
|
|
3668
3679
|
return [
|
|
3669
3680
|
e.datasetId,
|
|
3670
3681
|
e.revision,
|
|
@@ -3684,14 +3695,14 @@ function Aa(e, t, n, r, i) {
|
|
|
3684
3695
|
e.errorBarMinSpacing ?? 0
|
|
3685
3696
|
].join("\0");
|
|
3686
3697
|
}
|
|
3687
|
-
function
|
|
3698
|
+
function Pa(e, t, n, r, i, a, o, s) {
|
|
3688
3699
|
return {
|
|
3689
3700
|
seriesId: e.seriesId,
|
|
3690
3701
|
datasetId: e.datasetId,
|
|
3691
3702
|
mode: e.mode,
|
|
3692
3703
|
selectedMode: i,
|
|
3693
3704
|
backend: r,
|
|
3694
|
-
strategy:
|
|
3705
|
+
strategy: Da(e.strategy),
|
|
3695
3706
|
sourcePointCount: t,
|
|
3696
3707
|
visiblePointCount: n,
|
|
3697
3708
|
renderedPointCount: o,
|
|
@@ -3707,18 +3718,18 @@ function ja(e, t, n, r, i, a, o, s) {
|
|
|
3707
3718
|
}
|
|
3708
3719
|
//#endregion
|
|
3709
3720
|
//#region src/core/workerSampling/repositoryDataset.ts
|
|
3710
|
-
function
|
|
3721
|
+
function Fa(e) {
|
|
3711
3722
|
return e?.y.length ?? 0;
|
|
3712
3723
|
}
|
|
3713
|
-
function
|
|
3724
|
+
function Ia(e, t) {
|
|
3714
3725
|
return e.x ? e.x[t] : e.sampleStartTime + (e.sampleSourceIndexes?.[t] ?? t) / e.sampleRate;
|
|
3715
3726
|
}
|
|
3716
|
-
function
|
|
3727
|
+
function La(e, t) {
|
|
3717
3728
|
let n = (t, n) => {
|
|
3718
|
-
let r = 0, i =
|
|
3729
|
+
let r = 0, i = Fa(e);
|
|
3719
3730
|
for (; r < i;) {
|
|
3720
3731
|
let a = r + Math.floor((i - r) / 2);
|
|
3721
|
-
(n ?
|
|
3732
|
+
(n ? Ia(e, a) <= t : Ia(e, a) < t) ? r = a + 1 : i = a;
|
|
3722
3733
|
}
|
|
3723
3734
|
return r;
|
|
3724
3735
|
}, r = Math.min(t[0], t[1]), i = Math.max(t[0], t[1]);
|
|
@@ -3727,13 +3738,13 @@ function Pa(e, t) {
|
|
|
3727
3738
|
end: n(i, !0)
|
|
3728
3739
|
};
|
|
3729
3740
|
}
|
|
3730
|
-
function
|
|
3731
|
-
return e.x ? e.x.subarray(t, n) : Float64Array.from({ length: n - t }, (n, r) =>
|
|
3741
|
+
function Ra(e, t, n) {
|
|
3742
|
+
return e.x ? e.x.subarray(t, n) : Float64Array.from({ length: n - t }, (n, r) => Ia(e, t + r));
|
|
3732
3743
|
}
|
|
3733
|
-
function
|
|
3744
|
+
function za(e) {
|
|
3734
3745
|
return e?.kind === "wasm" && "registerDataset" in e && "disposeDataset" in e && "disposeAllDatasets" in e && "datasetIndexBytes" in e && "registerSamples" in e && "sampleDataset" in e;
|
|
3735
3746
|
}
|
|
3736
|
-
function
|
|
3747
|
+
function Ba(e, t) {
|
|
3737
3748
|
let n = [], r = Math.min(e.length, t.length);
|
|
3738
3749
|
for (let i = 0; i < r; i += 1) Number.isFinite(e[i]) && Number.isFinite(t[i]) && n.push(i);
|
|
3739
3750
|
return n.sort((t, n) => e[t] - e[n] || t - n), {
|
|
@@ -3741,14 +3752,14 @@ function La(e, t) {
|
|
|
3741
3752
|
y: Float64Array.from(n, (e) => t[e])
|
|
3742
3753
|
};
|
|
3743
3754
|
}
|
|
3744
|
-
function
|
|
3755
|
+
function Va(e, t, n, r) {
|
|
3745
3756
|
if (t?.kind === "typed") {
|
|
3746
|
-
let e =
|
|
3757
|
+
let e = Ba(t.x, t.y);
|
|
3747
3758
|
return {
|
|
3748
3759
|
x: e.x,
|
|
3749
3760
|
y: e.y,
|
|
3750
3761
|
revision: n,
|
|
3751
|
-
metrics:
|
|
3762
|
+
metrics: Ta(e.x, e.y, Math.max(t.x.length, t.y.length))
|
|
3752
3763
|
};
|
|
3753
3764
|
}
|
|
3754
3765
|
if (t?.kind === "samples") {
|
|
@@ -3782,35 +3793,35 @@ function Ra(e, t, n, r) {
|
|
|
3782
3793
|
}
|
|
3783
3794
|
};
|
|
3784
3795
|
}
|
|
3785
|
-
let i =
|
|
3796
|
+
let i = Ca(e ?? t?.points ?? []);
|
|
3786
3797
|
return {
|
|
3787
3798
|
x: Float64Array.from(i, (e) => e.x),
|
|
3788
3799
|
y: Float64Array.from(i, (e) => e.y),
|
|
3789
3800
|
points: i,
|
|
3790
3801
|
revision: n,
|
|
3791
|
-
metrics:
|
|
3792
|
-
index: new
|
|
3802
|
+
metrics: wa(i, e?.length ?? t?.points.length ?? 0),
|
|
3803
|
+
index: new ba(i, { maxBytes: r })
|
|
3793
3804
|
};
|
|
3794
3805
|
}
|
|
3795
|
-
function
|
|
3796
|
-
!
|
|
3806
|
+
function Ha(e, t, n) {
|
|
3807
|
+
!za(e) || t.wasmDatasetHandle !== void 0 || (t.wasmDatasetHandle = t.x ? e.registerDataset(t.x, t.y, n) : e.registerSamples(t.y, t.sampleSourceIndexes, t.sampleStartTime, t.sampleRate, n), t.wasmIndexBytes = e.datasetIndexBytes(t.wasmDatasetHandle));
|
|
3797
3808
|
}
|
|
3798
|
-
function
|
|
3799
|
-
t.index?.dispose(), t.wasmDatasetHandle !== void 0 &&
|
|
3809
|
+
function Ua(e, t) {
|
|
3810
|
+
t.index?.dispose(), t.wasmDatasetHandle !== void 0 && za(e) && e.disposeDataset(t.wasmDatasetHandle);
|
|
3800
3811
|
}
|
|
3801
3812
|
//#endregion
|
|
3802
3813
|
//#region src/core/workerSampling/samplingCache.ts
|
|
3803
|
-
var
|
|
3804
|
-
function
|
|
3814
|
+
var Wa = 96, Ga = 16 * 1024 * 1024;
|
|
3815
|
+
function Ka(e) {
|
|
3805
3816
|
return e.kind === "source-indexes" ? e.sourceIndexes.byteLength : e.x.byteLength + e.y.byteLength;
|
|
3806
3817
|
}
|
|
3807
|
-
var
|
|
3818
|
+
var qa = class {
|
|
3808
3819
|
entries = /* @__PURE__ */ new Map();
|
|
3809
3820
|
bytes = 0;
|
|
3810
3821
|
maxEntries;
|
|
3811
3822
|
maxBytes;
|
|
3812
3823
|
constructor(e = {}) {
|
|
3813
|
-
this.maxEntries = Number.isFinite(e.maxEntries) ? Math.max(0, Math.floor(e.maxEntries ?? 0)) :
|
|
3824
|
+
this.maxEntries = Number.isFinite(e.maxEntries) ? Math.max(0, Math.floor(e.maxEntries ?? 0)) : Wa, this.maxBytes = Number.isFinite(e.maxBytes) ? Math.max(0, Math.floor(e.maxBytes ?? 0)) : Ga;
|
|
3814
3825
|
}
|
|
3815
3826
|
get metrics() {
|
|
3816
3827
|
return {
|
|
@@ -3825,7 +3836,7 @@ var Wa = class {
|
|
|
3825
3836
|
if (t) return this.entries.delete(e), this.entries.set(e, t), t.output;
|
|
3826
3837
|
}
|
|
3827
3838
|
set(e, t) {
|
|
3828
|
-
let n =
|
|
3839
|
+
let n = Ka(t);
|
|
3829
3840
|
if (n > this.maxBytes || this.maxEntries === 0) return;
|
|
3830
3841
|
let r = this.entries.get(e);
|
|
3831
3842
|
for (r && (this.bytes -= r.bytes, this.entries.delete(e)), this.entries.set(e, {
|
|
@@ -3845,14 +3856,14 @@ var Wa = class {
|
|
|
3845
3856
|
clear() {
|
|
3846
3857
|
this.entries.clear(), this.bytes = 0;
|
|
3847
3858
|
}
|
|
3848
|
-
},
|
|
3859
|
+
}, Ja = class {
|
|
3849
3860
|
datasets = /* @__PURE__ */ new Map();
|
|
3850
3861
|
javascriptBackend;
|
|
3851
3862
|
cache;
|
|
3852
3863
|
indexMaxBytes;
|
|
3853
3864
|
wasmBackend;
|
|
3854
3865
|
constructor(e = {}) {
|
|
3855
|
-
this.javascriptBackend = e.javascriptBackend ??
|
|
3866
|
+
this.javascriptBackend = e.javascriptBackend ?? pa, this.wasmBackend = e.wasmBackend, this.indexMaxBytes = e.indexMaxBytes, this.cache = new qa({
|
|
3856
3867
|
maxEntries: e.cacheMaxEntries,
|
|
3857
3868
|
maxBytes: e.cacheMaxBytes
|
|
3858
3869
|
});
|
|
@@ -3865,9 +3876,9 @@ var Wa = class {
|
|
|
3865
3876
|
};
|
|
3866
3877
|
}
|
|
3867
3878
|
setWasmBackend(e) {
|
|
3868
|
-
this.wasmBackend && this.wasmBackend !== e &&
|
|
3879
|
+
this.wasmBackend && this.wasmBackend !== e && za(this.wasmBackend) && (this.wasmBackend.disposeAllDatasets(), this.datasets.forEach((e) => {
|
|
3869
3880
|
e.wasmDatasetHandle = void 0, e.wasmIndexBytes = void 0;
|
|
3870
|
-
})), this.wasmBackend = e,
|
|
3881
|
+
})), this.wasmBackend = e, za(e) && this.datasets.forEach((t) => Ha(e, t, this.indexMaxBytes));
|
|
3871
3882
|
}
|
|
3872
3883
|
handle(e) {
|
|
3873
3884
|
switch (e.type) {
|
|
@@ -3883,15 +3894,15 @@ var Wa = class {
|
|
|
3883
3894
|
register(e, t, n, r) {
|
|
3884
3895
|
let i = this.datasets.get(e);
|
|
3885
3896
|
if (i) return this.datasetResponse(t, e, i, "stale-revision");
|
|
3886
|
-
let a =
|
|
3887
|
-
return
|
|
3897
|
+
let a = Va(n, r, 1, this.indexMaxBytes);
|
|
3898
|
+
return Ha(this.wasmBackend, a, this.indexMaxBytes), this.datasets.set(e, a), this.datasetResponse(t, e, a, "ok");
|
|
3888
3899
|
}
|
|
3889
3900
|
replace(e, t, n, r, i) {
|
|
3890
|
-
let a = this.datasets.get(e), o =
|
|
3901
|
+
let a = this.datasets.get(e), o = Ea(a, n);
|
|
3891
3902
|
if (o !== "ok" || !a) return this.datasetResponse(t, e, a, o);
|
|
3892
|
-
|
|
3893
|
-
let s =
|
|
3894
|
-
return
|
|
3903
|
+
Ua(this.wasmBackend, a), this.cache.deleteDataset(e);
|
|
3904
|
+
let s = Va(r, i, a.revision + 1, this.indexMaxBytes);
|
|
3905
|
+
return Ha(this.wasmBackend, s, this.indexMaxBytes), this.datasets.set(e, s), this.datasetResponse(t, e, s, "ok");
|
|
3895
3906
|
}
|
|
3896
3907
|
sample(e) {
|
|
3897
3908
|
return {
|
|
@@ -3901,28 +3912,28 @@ var Wa = class {
|
|
|
3901
3912
|
};
|
|
3902
3913
|
}
|
|
3903
3914
|
sampleSeries(e, t) {
|
|
3904
|
-
let n = performance.now(), r = this.datasets.get(t.datasetId), i =
|
|
3915
|
+
let n = performance.now(), r = this.datasets.get(t.datasetId), i = Ea(r, t.revision);
|
|
3905
3916
|
if (i !== "ok" || !r) return this.sampleResponse(e, t, i, void 0, "unavailable", "sampled", 0, n, !1);
|
|
3906
|
-
let a =
|
|
3907
|
-
if (
|
|
3917
|
+
let a = La(r, t.xDomain), o = a.end - a.start;
|
|
3918
|
+
if (ka(t, o)) return this.sampleResponse(e, t, "ok", {
|
|
3908
3919
|
kind: "source-indexes",
|
|
3909
3920
|
sourceIndexes: Uint32Array.from({ length: o }, (e, t) => a.start + t)
|
|
3910
3921
|
}, "raw", "raw", o, n, !1);
|
|
3911
3922
|
let s = t.mode === "wasm" || t.mode === "auto" && this.wasmBackend ? this.wasmBackend : this.javascriptBackend, c = !s && t.wasmFailureFallback === "javascript", l = s ?? (c ? this.javascriptBackend : void 0);
|
|
3912
3923
|
if (!l) return this.sampleResponse(e, t, "wasm-unavailable", void 0, "unavailable", "sampled", o, n, !1);
|
|
3913
|
-
let u =
|
|
3924
|
+
let u = Da(t.strategy), d = Oa(t), f = Na(t, a, u, d, l.kind), p = this.cache.get(f);
|
|
3914
3925
|
if (p) return this.sampleResponse(e, t, c ? "wasm-unavailable" : "ok", p, l.kind, "sampled", o, n, !0);
|
|
3915
|
-
let m = (l.kind === "wasm" ? r.wasmDatasetHandle !== void 0 &&
|
|
3916
|
-
x:
|
|
3926
|
+
let m = (l.kind === "wasm" ? r.wasmDatasetHandle !== void 0 && za(l) ? l.sampleDataset(r.wasmDatasetHandle, a.start, a.end, u, d) : void 0 : r.index?.sample(a.start, a.end, u, d)) ?? Ma(l.sample({
|
|
3927
|
+
x: Ra(r, a.start, a.end),
|
|
3917
3928
|
y: r.y.subarray(a.start, a.end),
|
|
3918
3929
|
points: r.points?.slice(a.start, a.end) ?? [],
|
|
3919
3930
|
strategy: u,
|
|
3920
3931
|
targetPointCount: d
|
|
3921
3932
|
}), a.start);
|
|
3922
|
-
return this.cache.set(f, m), r.wasmDatasetHandle !== void 0 &&
|
|
3933
|
+
return this.cache.set(f, m), r.wasmDatasetHandle !== void 0 && za(l) && (r.wasmIndexBytes = l.datasetIndexBytes(r.wasmDatasetHandle)), this.sampleResponse(e, t, c ? "wasm-unavailable" : "ok", m, l.kind, "sampled", o, n, !1);
|
|
3923
3934
|
}
|
|
3924
3935
|
sampleResponse(e, t, n, r, i, a, o, s, c) {
|
|
3925
|
-
let l =
|
|
3936
|
+
let l = Pa(t, Fa(this.datasets.get(t.datasetId)), o, i, a, performance.now() - s, ja(r), c);
|
|
3926
3937
|
return l.requestId = e, {
|
|
3927
3938
|
seriesId: t.seriesId,
|
|
3928
3939
|
datasetId: t.datasetId,
|
|
@@ -3933,7 +3944,7 @@ var Wa = class {
|
|
|
3933
3944
|
};
|
|
3934
3945
|
}
|
|
3935
3946
|
findNearest(e, t, n, r) {
|
|
3936
|
-
let i = this.datasets.get(e), a =
|
|
3947
|
+
let i = this.datasets.get(e), a = Ea(i, n);
|
|
3937
3948
|
return a !== "ok" || !i ? {
|
|
3938
3949
|
type: "find-nearest-point-response",
|
|
3939
3950
|
requestId: t,
|
|
@@ -3946,12 +3957,12 @@ var Wa = class {
|
|
|
3946
3957
|
datasetId: e,
|
|
3947
3958
|
revision: n,
|
|
3948
3959
|
status: a,
|
|
3949
|
-
point: i.points ?
|
|
3950
|
-
let e =
|
|
3951
|
-
if (!
|
|
3952
|
-
let t = Math.min(
|
|
3953
|
-
return Number.isFinite(r) &&
|
|
3954
|
-
x:
|
|
3960
|
+
point: i.points ? Aa(i.points, r) : (() => {
|
|
3961
|
+
let e = La(i, [r, r]);
|
|
3962
|
+
if (!Fa(i) || r < Ia(i, 0) || r > Ia(i, Fa(i) - 1)) return;
|
|
3963
|
+
let t = Math.min(Fa(i) - 1, e.start), n = Math.max(0, t - 1), a = Math.abs(r - Ia(i, n)) < Math.abs(Ia(i, t) - r) ? n : t;
|
|
3964
|
+
return Number.isFinite(r) && Fa(i) ? {
|
|
3965
|
+
x: Ia(i, a),
|
|
3955
3966
|
y: i.y[a]
|
|
3956
3967
|
} : void 0;
|
|
3957
3968
|
})()
|
|
@@ -3959,15 +3970,15 @@ var Wa = class {
|
|
|
3959
3970
|
}
|
|
3960
3971
|
metrics(e, t, n) {
|
|
3961
3972
|
let r = this.datasets.get(e);
|
|
3962
|
-
return this.datasetResponse(t, e, r,
|
|
3973
|
+
return this.datasetResponse(t, e, r, Ea(r, n));
|
|
3963
3974
|
}
|
|
3964
3975
|
dispose(e, t, n) {
|
|
3965
|
-
let r = this.datasets.get(e), i =
|
|
3966
|
-
return i === "ok" && r && (
|
|
3976
|
+
let r = this.datasets.get(e), i = Ea(r, n);
|
|
3977
|
+
return i === "ok" && r && (Ua(this.wasmBackend, r), this.cache.deleteDataset(e), this.datasets.delete(e)), this.datasetResponse(t, e, r, i);
|
|
3967
3978
|
}
|
|
3968
3979
|
disposeAll(e) {
|
|
3969
3980
|
let t = [...this.datasets.keys()];
|
|
3970
|
-
return this.datasets.forEach((e) =>
|
|
3981
|
+
return this.datasets.forEach((e) => Ua(this.wasmBackend, e)), za(this.wasmBackend) && this.wasmBackend.disposeAllDatasets(), this.datasets.clear(), this.cache.clear(), {
|
|
3971
3982
|
type: "dispose-all-response",
|
|
3972
3983
|
requestId: e,
|
|
3973
3984
|
disposedDatasetIds: t
|
|
@@ -3989,10 +4000,10 @@ var Wa = class {
|
|
|
3989
4000
|
};
|
|
3990
4001
|
//#endregion
|
|
3991
4002
|
//#region src/components/core/latestTaskScheduler.ts
|
|
3992
|
-
function
|
|
4003
|
+
function Ya(e, t, n, r) {
|
|
3993
4004
|
return r ? r === "raw" ? e <= t + n ? "raw" : "sampled" : e <= Math.max(0, t - n) ? "raw" : "sampled" : e <= t ? "raw" : "sampled";
|
|
3994
4005
|
}
|
|
3995
|
-
function
|
|
4006
|
+
function Xa() {
|
|
3996
4007
|
let e = 0, t = !1, n, r = !1, i = {
|
|
3997
4008
|
scheduled: 0,
|
|
3998
4009
|
coalesced: 0,
|
|
@@ -4031,12 +4042,12 @@ function qa() {
|
|
|
4031
4042
|
}
|
|
4032
4043
|
//#endregion
|
|
4033
4044
|
//#region src/components/core/workerSamplingClient.ts
|
|
4034
|
-
function
|
|
4045
|
+
function Za(e) {
|
|
4035
4046
|
return e?.message || "Web Worker is unavailable; JavaScript sampling is being used.";
|
|
4036
4047
|
}
|
|
4037
|
-
function
|
|
4048
|
+
function Qa() {
|
|
4038
4049
|
let e, t, n, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = () => {
|
|
4039
|
-
t ??= new
|
|
4050
|
+
t ??= new Ja();
|
|
4040
4051
|
for (let [e, n] of i) {
|
|
4041
4052
|
t.handle({
|
|
4042
4053
|
type: "register-dataset",
|
|
@@ -4072,7 +4083,7 @@ function Ya() {
|
|
|
4072
4083
|
let t = a();
|
|
4073
4084
|
e.forEach(({ request: e, resolve: n }) => n(t.handle(e)));
|
|
4074
4085
|
}, c = (r) => {
|
|
4075
|
-
t || (n =
|
|
4086
|
+
t || (n = Za(r), e?.terminate(), e = void 0, s());
|
|
4076
4087
|
};
|
|
4077
4088
|
try {
|
|
4078
4089
|
typeof Worker > "u" ? c() : (e = new Worker(new URL(
|
|
@@ -4109,20 +4120,20 @@ function Ya() {
|
|
|
4109
4120
|
}
|
|
4110
4121
|
};
|
|
4111
4122
|
}
|
|
4112
|
-
function
|
|
4123
|
+
function $a(e) {
|
|
4113
4124
|
return e.type === "dataset-response";
|
|
4114
4125
|
}
|
|
4115
4126
|
//#endregion
|
|
4116
4127
|
//#region src/components/core/useWaveformRenderSampling.ts
|
|
4117
|
-
var
|
|
4118
|
-
function
|
|
4128
|
+
var eo = 120;
|
|
4129
|
+
function to(e, t) {
|
|
4119
4130
|
let n = e.output;
|
|
4120
4131
|
if (n) return n.kind === "aggregates" ? Array.from(n.x, (e, t) => ({
|
|
4121
4132
|
x: e,
|
|
4122
4133
|
y: n.y[t]
|
|
4123
4134
|
})) : Array.from(n.sourceIndexes, (e) => t.pointAt(e)).filter((e) => e !== void 0);
|
|
4124
4135
|
}
|
|
4125
|
-
function
|
|
4136
|
+
function no(e, t) {
|
|
4126
4137
|
let n = e.request, r = e.visibleRange.end - e.visibleRange.start;
|
|
4127
4138
|
return {
|
|
4128
4139
|
seriesId: n.seriesId,
|
|
@@ -4144,7 +4155,7 @@ function $a(e, t) {
|
|
|
4144
4155
|
maxPendingRequestCount: 0
|
|
4145
4156
|
};
|
|
4146
4157
|
}
|
|
4147
|
-
function
|
|
4158
|
+
function ro(e) {
|
|
4148
4159
|
let { source: t } = e, { start: n, end: r } = e.visibleRange, i = r - n, a = Number.isFinite(e.request.maxPointCount) && (e.request.maxPointCount ?? 0) >= 1 ? Math.floor(e.request.maxPointCount) : Math.max(1, Math.floor(e.request.plotWidth * e.request.maxPointsPerPixel));
|
|
4149
4160
|
if (i <= a) return t.pointsInRange(n, r);
|
|
4150
4161
|
if (a === 1) return t.pointAt(n) ? [t.pointAt(n)] : [];
|
|
@@ -4155,7 +4166,7 @@ function eo(e) {
|
|
|
4155
4166
|
}
|
|
4156
4167
|
return o;
|
|
4157
4168
|
}
|
|
4158
|
-
function
|
|
4169
|
+
function io(e, t, n, r) {
|
|
4159
4170
|
return {
|
|
4160
4171
|
message: e,
|
|
4161
4172
|
mode: t,
|
|
@@ -4163,8 +4174,8 @@ function to(e, t, n, r) {
|
|
|
4163
4174
|
seriesIds: r
|
|
4164
4175
|
};
|
|
4165
4176
|
}
|
|
4166
|
-
function
|
|
4167
|
-
let n = w(0), r, i = 0, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), u =
|
|
4177
|
+
function ao(e) {
|
|
4178
|
+
let n = w(0), r, i = 0, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), u = Xa(), d, f, p = !1, m = t(() => {
|
|
4168
4179
|
let t = e.renderingOptions.value.sampling;
|
|
4169
4180
|
return e.sourceTrackLayouts.value.flatMap((n) => {
|
|
4170
4181
|
let r = n.xScale.domain();
|
|
@@ -4229,13 +4240,13 @@ function no(e) {
|
|
|
4229
4240
|
revision: 0,
|
|
4230
4241
|
dataset: t.source.toWorkerDataset()
|
|
4231
4242
|
});
|
|
4232
|
-
!u.isCurrent(n) ||
|
|
4243
|
+
!u.isCurrent(n) || !$a(r) || r.status !== "ok" && r.status !== "stale-revision" || a.set(t.request.datasetId, r.revision);
|
|
4233
4244
|
}));
|
|
4234
4245
|
}, x = async (t, n = !1) => {
|
|
4235
4246
|
let o = m.value, c = { ...e.linePointOverrides.value }, l = [], d = [];
|
|
4236
4247
|
if (o.forEach((e) => {
|
|
4237
|
-
let r = e.visibleRange.end - e.visibleRange.start, i = n ? s.get(e.series.id) : void 0, a = e.request.mode === "auto" &&
|
|
4238
|
-
e.request.mode === "raw" || a ? (c[e.series.id] = e.source.pointsInRange(e.visibleRange.start, e.visibleRange.end), s.set(e.series.id, "raw"), d.push(
|
|
4248
|
+
let r = e.visibleRange.end - e.visibleRange.start, i = n ? s.get(e.series.id) : void 0, a = e.request.mode === "auto" && Ya(r, e.request.autoThreshold, e.request.autoHysteresis ?? 0, i) === "raw";
|
|
4249
|
+
e.request.mode === "raw" || a ? (c[e.series.id] = e.source.pointsInRange(e.visibleRange.start, e.visibleRange.end), s.set(e.series.id, "raw"), d.push(no(e, t))) : (c[e.series.id]?.length || (c[e.series.id] = ro(e)), l.push({
|
|
4239
4250
|
...e,
|
|
4240
4251
|
request: {
|
|
4241
4252
|
...e.request,
|
|
@@ -4247,7 +4258,7 @@ function no(e) {
|
|
|
4247
4258
|
e.linePointOverrides.value = c, v(d);
|
|
4248
4259
|
return;
|
|
4249
4260
|
}
|
|
4250
|
-
if (e.linePointOverrides.value = c, r ??=
|
|
4261
|
+
if (e.linePointOverrides.value = c, r ??= Qa(), await b(r, l, t), !u.isCurrent(t)) return;
|
|
4251
4262
|
let f = l.map((e) => ({
|
|
4252
4263
|
...e.request,
|
|
4253
4264
|
revision: a.get(e.request.datasetId) ?? 1
|
|
@@ -4262,22 +4273,22 @@ function no(e) {
|
|
|
4262
4273
|
p = e;
|
|
4263
4274
|
} catch (n) {
|
|
4264
4275
|
if (!u.isCurrent(t)) return;
|
|
4265
|
-
y(
|
|
4276
|
+
y(io(n instanceof Error ? n.message : String(n), e.renderingOptions.value.sampling.mode, "javascript", l.map((e) => e.series.id)));
|
|
4266
4277
|
return;
|
|
4267
4278
|
}
|
|
4268
4279
|
if (!u.isCurrent(t)) return;
|
|
4269
4280
|
let h = new Map(l.map((e) => [e.series.id, e.source]));
|
|
4270
4281
|
p.results.forEach((e) => {
|
|
4271
|
-
let t = h.get(e.seriesId), n = t ?
|
|
4272
|
-
n && (e.status === "ok" || e.status === "wasm-unavailable") && (c[e.seriesId] = n), d.push(e.diagnostics), s.set(e.seriesId, e.diagnostics.selectedMode), e.status === "wasm-unavailable" && y(
|
|
4273
|
-
}), p.workerError && y(
|
|
4282
|
+
let t = h.get(e.seriesId), n = t ? to(e, t) : void 0;
|
|
4283
|
+
n && (e.status === "ok" || e.status === "wasm-unavailable") && (c[e.seriesId] = n), d.push(e.diagnostics), s.set(e.seriesId, e.diagnostics.selectedMode), e.status === "wasm-unavailable" && y(io(p.workerError ?? "WASM sampling is unavailable.", e.diagnostics.mode, e.diagnostics.backend === "javascript" ? "javascript" : "none", [e.seriesId]));
|
|
4284
|
+
}), p.workerError && y(io(p.workerError, e.renderingOptions.value.sampling.mode, "javascript", l.map((e) => e.series.id))), r.workerFailureReason && p.results.every((e) => e.status !== "wasm-unavailable") && y(io(r.workerFailureReason, e.renderingOptions.value.sampling.mode, "javascript", l.map((e) => e.series.id))), e.linePointOverrides.value = { ...c }, v(d);
|
|
4274
4285
|
};
|
|
4275
4286
|
return k(h, () => {
|
|
4276
4287
|
f && clearTimeout(f);
|
|
4277
4288
|
let t = p;
|
|
4278
4289
|
p = !0, u.schedule((e) => x(e, t)), t && e.renderingOptions.value.sampling.mode === "auto" && e.renderingOptions.value.sampling.autoHysteresis > 0 && (f = setTimeout(() => {
|
|
4279
4290
|
f = void 0, u.schedule((e) => x(e, !1));
|
|
4280
|
-
},
|
|
4291
|
+
}, eo));
|
|
4281
4292
|
}, { immediate: !0 }), k(e.preparedSeries, () => {
|
|
4282
4293
|
u.cancelPending(), n.value += 1, e.linePointOverrides.value = {}, a.clear(), o.clear(), s.clear(), c.clear(), r?.dispose(), r = void 0;
|
|
4283
4294
|
}, { flush: "sync" }), _(() => {
|
|
@@ -4286,10 +4297,10 @@ function no(e) {
|
|
|
4286
4297
|
}
|
|
4287
4298
|
//#endregion
|
|
4288
4299
|
//#region src/components/core/useWaveformChartController.ts
|
|
4289
|
-
function
|
|
4300
|
+
function oo(e, t) {
|
|
4290
4301
|
e.value = t instanceof Element ? t : void 0;
|
|
4291
4302
|
}
|
|
4292
|
-
function
|
|
4303
|
+
function so(e, n) {
|
|
4293
4304
|
let r = x(), i = x(), a = x(), o = x(), s = x(0), c = x(0), l = x(0), u = x(0), f = x(0), p = w(q), m = w([]), h = x({}), g = x({}), _ = C({
|
|
4294
4305
|
points: [],
|
|
4295
4306
|
trackIndex: null,
|
|
@@ -4305,7 +4316,7 @@ function io(e, n) {
|
|
|
4305
4316
|
}, { deep: !0 });
|
|
4306
4317
|
let P = w(null), F = x(!1), I = x(!1), L = () => void 0, R = () => void 0, z = () => void 0, B = di(() => e.data, () => {
|
|
4307
4318
|
z(), L();
|
|
4308
|
-
}, () => R()), V =
|
|
4319
|
+
}, () => R()), V = ra({
|
|
4309
4320
|
props: e,
|
|
4310
4321
|
observedWidth: s,
|
|
4311
4322
|
observedHeight: c,
|
|
@@ -4313,7 +4324,7 @@ function io(e, n) {
|
|
|
4313
4324
|
measuredTitleHeight: u,
|
|
4314
4325
|
internalHiddenSeriesIds: D,
|
|
4315
4326
|
paginationBandHeight: f
|
|
4316
|
-
}), { chartWidth: H, chartHeight: U, isCleanView: W, isPresentationMode: G, hiddenSeriesIdSet: K, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight: ae } = V, oe =
|
|
4327
|
+
}), { chartWidth: H, chartHeight: U, isCleanView: W, isPresentationMode: G, hiddenSeriesIdSet: K, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight: ae } = V, oe = $i({
|
|
4317
4328
|
props: e,
|
|
4318
4329
|
preparedSeries: B,
|
|
4319
4330
|
currentPage: y,
|
|
@@ -4328,7 +4339,7 @@ function io(e, n) {
|
|
|
4328
4339
|
annotationInteraction: d(O),
|
|
4329
4340
|
linePointOverrides: j
|
|
4330
4341
|
}), { chartSeries: se, chartTracks: ce, renderingOptions: le, trackLayouts: ue, gridOptions: fe, pageCount: pe, pagedTracks: J, resolvedChartLeftMargin: me, innerWidth: Y, hasChartArea: he, activeInteractionMode: ge, isZoomMode: _e, initialXDomain: ve, sharedZoomDomain: ye, resolveInitialTrackDomain: be, annotationLayoutsForTrack: xe, resolveSeriesYScale: Se } = oe;
|
|
4331
|
-
|
|
4342
|
+
ao({
|
|
4332
4343
|
props: e,
|
|
4333
4344
|
emit: n,
|
|
4334
4345
|
instanceId: T,
|
|
@@ -4484,34 +4495,34 @@ function io(e, n) {
|
|
|
4484
4495
|
editorSeriesOptions: M,
|
|
4485
4496
|
clipPathId: T,
|
|
4486
4497
|
goToPage: De.goToPage,
|
|
4487
|
-
setContainer: (e) =>
|
|
4488
|
-
setSvgElement: (e) =>
|
|
4489
|
-
setTitleMeasureElement: (e) =>
|
|
4490
|
-
setSharedOverlayElement: (e) =>
|
|
4498
|
+
setContainer: (e) => oo(r, e),
|
|
4499
|
+
setSvgElement: (e) => oo(i, e),
|
|
4500
|
+
setTitleMeasureElement: (e) => oo(a, e),
|
|
4501
|
+
setSharedOverlayElement: (e) => oo(o, e)
|
|
4491
4502
|
});
|
|
4492
4503
|
}
|
|
4493
4504
|
//#endregion
|
|
4494
4505
|
//#region src/components/annotation/WaveformAnnotationEditor.vue?vue&type=script&setup=true&lang.ts
|
|
4495
|
-
var
|
|
4506
|
+
var co = ["id"], lo = { class: "waveform-annotation-editor__content" }, uo = {
|
|
4496
4507
|
class: "waveform-annotation-editor__coordinates",
|
|
4497
4508
|
"aria-label": "标注坐标"
|
|
4498
|
-
},
|
|
4509
|
+
}, fo = ["aria-invalid"], po = {
|
|
4499
4510
|
class: "waveform-annotation-editor__coordinate-value",
|
|
4500
4511
|
"aria-hidden": "true"
|
|
4501
|
-
},
|
|
4512
|
+
}, mo = ["id"], ho = {
|
|
4502
4513
|
key: 0,
|
|
4503
4514
|
class: "waveform-annotation-editor__series",
|
|
4504
4515
|
"aria-label": "标注所属波形"
|
|
4505
|
-
},
|
|
4516
|
+
}, go = { class: "waveform-annotation-editor__series-label" }, _o = ["value"], vo = ["value"], yo = { key: 1 }, bo = { class: "waveform-annotation-editor__field" }, xo = { class: "waveform-annotation-editor__label-row" }, So = ["maxlength"], Co = { class: "waveform-annotation-editor__colors" }, wo = {
|
|
4506
4517
|
class: "waveform-annotation-editor__color-field",
|
|
4507
4518
|
title: "调整标注边框色和透明度"
|
|
4508
|
-
},
|
|
4519
|
+
}, To = {
|
|
4509
4520
|
class: "waveform-annotation-editor__color-field",
|
|
4510
4521
|
title: "调整标注文字色和透明度"
|
|
4511
|
-
},
|
|
4522
|
+
}, Eo = {
|
|
4512
4523
|
class: "waveform-annotation-editor__color-field",
|
|
4513
4524
|
title: "调整标注背景色和透明度"
|
|
4514
|
-
},
|
|
4525
|
+
}, Do = /*#__PURE__*/ nt(/* @__PURE__ */ l({
|
|
4515
4526
|
__name: "WaveformAnnotationEditor",
|
|
4516
4527
|
props: {
|
|
4517
4528
|
annotation: {},
|
|
@@ -4582,9 +4593,9 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4582
4593
|
onCancel: o[4] ||= (e) => p("cancel"),
|
|
4583
4594
|
onOk: B
|
|
4584
4595
|
}, {
|
|
4585
|
-
title: j(() => [a("span", { id: D(g) }, T(d.mode === "add" ? "添加标注" : "编辑标注"), 9,
|
|
4586
|
-
default: j(() => [a("div",
|
|
4587
|
-
a("div",
|
|
4596
|
+
title: j(() => [a("span", { id: D(g) }, T(d.mode === "add" ? "添加标注" : "编辑标注"), 9, co)]),
|
|
4597
|
+
default: j(() => [a("div", lo, [
|
|
4598
|
+
a("div", uo, [
|
|
4588
4599
|
a("label", {
|
|
4589
4600
|
class: "waveform-annotation-editor__coordinate-input",
|
|
4590
4601
|
"aria-invalid": !!N.value
|
|
@@ -4607,26 +4618,26 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4607
4618
|
"aria-invalid",
|
|
4608
4619
|
"aria-describedby"
|
|
4609
4620
|
]),
|
|
4610
|
-
a("code",
|
|
4611
|
-
], 8,
|
|
4621
|
+
a("code", po, T(v.value), 1)
|
|
4622
|
+
], 8, fo),
|
|
4612
4623
|
N.value ? (y(), i("p", {
|
|
4613
4624
|
key: 0,
|
|
4614
4625
|
id: `${D(g)}-time-error`,
|
|
4615
4626
|
class: "waveform-annotation-editor__coordinate-error",
|
|
4616
4627
|
role: "alert"
|
|
4617
|
-
}, T(N.value), 9,
|
|
4628
|
+
}, T(N.value), 9, mo)) : r("", !0),
|
|
4618
4629
|
a("span", null, [o[6] ||= a("b", null, "Y", -1), a("code", null, T(D(At)(d.annotation.y)), 1)])
|
|
4619
4630
|
]),
|
|
4620
4631
|
o[13] ||= a("p", {
|
|
4621
4632
|
class: "waveform-annotation-editor__coordinate-hint",
|
|
4622
4633
|
role: "note"
|
|
4623
4634
|
}, " 修改 X 轴后失焦时会自动吸附最近的采样点 ", -1),
|
|
4624
|
-
I.value ? (y(), i("label",
|
|
4635
|
+
I.value ? (y(), i("label", ho, [
|
|
4625
4636
|
a("i", {
|
|
4626
4637
|
style: m({ backgroundColor: I.value.color }),
|
|
4627
4638
|
"aria-hidden": "true"
|
|
4628
4639
|
}, null, 4),
|
|
4629
|
-
a("span",
|
|
4640
|
+
a("span", go, [o[7] ||= a("small", null, "标注波形", -1), a("b", null, T(I.value.name), 1)]),
|
|
4630
4641
|
d.seriesOptions?.length ? (y(), i("select", {
|
|
4631
4642
|
key: 0,
|
|
4632
4643
|
value: d.annotation.seriesId,
|
|
@@ -4635,9 +4646,9 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4635
4646
|
}, [(y(!0), i(e, null, S(d.seriesOptions, (e) => (y(), i("option", {
|
|
4636
4647
|
key: e.seriesId,
|
|
4637
4648
|
value: e.seriesId
|
|
4638
|
-
}, T(e.name) + T(e.unit ? ` (${e.unit})` : ""), 9,
|
|
4649
|
+
}, T(e.name) + T(e.unit ? ` (${e.unit})` : ""), 9, vo))), 128))], 40, _o)) : I.value.unit ? (y(), i("code", yo, T(I.value.unit), 1)) : r("", !0)
|
|
4639
4650
|
])) : r("", !0),
|
|
4640
|
-
a("label",
|
|
4651
|
+
a("label", bo, [a("span", xo, [o[8] ||= a("b", null, "标注文本", -1), a("small", null, T(F.value) + "/" + T(D(40)), 1)]), M(a("textarea", {
|
|
4641
4652
|
ref_key: "textarea",
|
|
4642
4653
|
ref: h,
|
|
4643
4654
|
"onUpdate:modelValue": o[0] ||= (e) => _.value = e,
|
|
@@ -4646,10 +4657,10 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4646
4657
|
"aria-label": "标注文本",
|
|
4647
4658
|
placeholder: "输入这处波形的说明",
|
|
4648
4659
|
onKeydown: V
|
|
4649
|
-
}, null, 40,
|
|
4650
|
-
a("fieldset",
|
|
4660
|
+
}, null, 40, So), [[O, _.value]])]),
|
|
4661
|
+
a("fieldset", Co, [
|
|
4651
4662
|
o[12] ||= a("legend", null, "颜色与透明度", -1),
|
|
4652
|
-
a("label",
|
|
4663
|
+
a("label", wo, [o[9] ||= a("span", null, "边框色", -1), s(D(u), {
|
|
4653
4664
|
"pure-color": C.value,
|
|
4654
4665
|
"onUpdate:pureColor": o[1] ||= (e) => C.value = e,
|
|
4655
4666
|
"aria-label": "标注边框色",
|
|
@@ -4659,7 +4670,7 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4659
4670
|
"disable-alpha": !1,
|
|
4660
4671
|
"blur-close": !0
|
|
4661
4672
|
}, null, 8, ["pure-color"])]),
|
|
4662
|
-
a("label",
|
|
4673
|
+
a("label", To, [o[10] ||= a("span", null, "文字色", -1), s(D(u), {
|
|
4663
4674
|
"pure-color": w.value,
|
|
4664
4675
|
"onUpdate:pureColor": o[2] ||= (e) => w.value = e,
|
|
4665
4676
|
"aria-label": "标注文字色",
|
|
@@ -4669,7 +4680,7 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4669
4680
|
"disable-alpha": !1,
|
|
4670
4681
|
"blur-close": !0
|
|
4671
4682
|
}, null, 8, ["pure-color"])]),
|
|
4672
|
-
a("label",
|
|
4683
|
+
a("label", Eo, [o[11] ||= a("span", null, "背景色", -1), s(D(u), {
|
|
4673
4684
|
"pure-color": E.value,
|
|
4674
4685
|
"onUpdate:pureColor": o[3] ||= (e) => E.value = e,
|
|
4675
4686
|
"aria-label": "标注背景色",
|
|
@@ -4684,13 +4695,13 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4684
4695
|
_: 1
|
|
4685
4696
|
}, 8, ["ok-button-props"]));
|
|
4686
4697
|
}
|
|
4687
|
-
}), [["__scopeId", "data-v-01ecd3a4"]]),
|
|
4698
|
+
}), [["__scopeId", "data-v-01ecd3a4"]]), Oo = { class: "waveform-tooltip__series-content" }, ko = { class: "waveform-tooltip__series-label" }, Ao = {
|
|
4688
4699
|
key: 0,
|
|
4689
4700
|
class: "waveform-tooltip__value"
|
|
4690
|
-
},
|
|
4701
|
+
}, jo = {
|
|
4691
4702
|
key: 1,
|
|
4692
4703
|
class: "waveform-tooltip__value waveform-tooltip__value--missing"
|
|
4693
|
-
},
|
|
4704
|
+
}, Mo = 12, No = 8, Po = 560, Fo = /*#__PURE__*/ nt(/* @__PURE__ */ l({
|
|
4694
4705
|
__name: "WaveformTooltip",
|
|
4695
4706
|
props: {
|
|
4696
4707
|
visible: { type: Boolean },
|
|
@@ -4720,12 +4731,12 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4720
4731
|
}, { flush: "post" }), v(u);
|
|
4721
4732
|
let d = t(() => {
|
|
4722
4733
|
if (!s.visible || !s.hoveredPoint) return { display: "none" };
|
|
4723
|
-
let e = s.position.x +
|
|
4734
|
+
let e = s.position.x + Mo, t = s.position.x - Mo - l.value.width, n = Math.max(1, Math.min(Po, s.containerWidth - No * 2));
|
|
4724
4735
|
return {
|
|
4725
|
-
...e + l.value.width <= s.containerWidth -
|
|
4736
|
+
...e + l.value.width <= s.containerWidth - No ? { left: `${e}px` } : t >= No ? { right: `${s.containerWidth - s.position.x + Mo}px` } : { left: `${No}px` },
|
|
4726
4737
|
maxWidth: `${n}px`,
|
|
4727
4738
|
visibility: l.value.width > 0 ? "visible" : "hidden",
|
|
4728
|
-
top: `${Math.max(
|
|
4739
|
+
top: `${Math.max(No, Math.min(s.position.y - 18, s.containerHeight - l.value.height - No))}px`
|
|
4729
4740
|
};
|
|
4730
4741
|
});
|
|
4731
4742
|
return (t, s) => n.visible && n.hoveredPoint ? (y(), i("div", {
|
|
@@ -4737,9 +4748,9 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4737
4748
|
}, [(y(!0), i(e, null, S(n.seriesPoints, (t) => (y(), i("span", {
|
|
4738
4749
|
key: `${t.trackIndex}-${t.name}`,
|
|
4739
4750
|
class: "waveform-tooltip__series waveform-chart__tooltip-series"
|
|
4740
|
-
}, [a("i", { style: m({ backgroundColor: t.color }) }, null, 4), a("span",
|
|
4751
|
+
}, [a("i", { style: m({ backgroundColor: t.color }) }, null, 4), a("span", Oo, [a("span", ko, [o(T(t.shotNo?.trim() || "未配置炮号") + ": " + T(t.name), 1), t.unit ? (y(), i(e, { key: 0 }, [o("(" + T(t.unit) + ")", 1)], 64)) : r("", !0)]), t.point ? (y(), i("span", Ao, "(x:" + T(D(Ft)(t.point.x, n.timeUnit)) + " y:" + T(D(kt)(t.point.y)) + ")", 1)) : (y(), i("span", jo, "无数据"))])]))), 128))], 4)) : r("", !0);
|
|
4741
4752
|
}
|
|
4742
|
-
}), [["__scopeId", "data-v-0d0d1d3c"]]),
|
|
4753
|
+
}), [["__scopeId", "data-v-0d0d1d3c"]]), Io = /* @__PURE__ */ l({
|
|
4743
4754
|
__name: "WaveformHoverHost",
|
|
4744
4755
|
props: {
|
|
4745
4756
|
state: {},
|
|
@@ -4750,7 +4761,7 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4750
4761
|
},
|
|
4751
4762
|
setup(e) {
|
|
4752
4763
|
let r = e, i = t(() => r.state.points.find((e) => e.point)?.point ?? null);
|
|
4753
|
-
return (t, r) => (y(), n(
|
|
4764
|
+
return (t, r) => (y(), n(Fo, {
|
|
4754
4765
|
visible: e.visible && i.value !== null,
|
|
4755
4766
|
position: e.state.position,
|
|
4756
4767
|
"time-unit": e.timeUnit,
|
|
@@ -4768,16 +4779,16 @@ var ao = ["id"], oo = { class: "waveform-annotation-editor__content" }, so = {
|
|
|
4768
4779
|
"container-height"
|
|
4769
4780
|
]));
|
|
4770
4781
|
}
|
|
4771
|
-
}),
|
|
4782
|
+
}), Lo = 13, Ro = 2, zo = 14, Bo = 8, Vo = 24, Ho = {
|
|
4772
4783
|
circle: ee,
|
|
4773
4784
|
square: ne,
|
|
4774
4785
|
triangle: re,
|
|
4775
4786
|
diamond: te
|
|
4776
4787
|
};
|
|
4777
|
-
function
|
|
4778
|
-
return e === "none" ? null : K().type(
|
|
4788
|
+
function Uo(e, t = 48) {
|
|
4789
|
+
return e === "none" ? null : K().type(Ho[e]).size(t)() ?? null;
|
|
4779
4790
|
}
|
|
4780
|
-
function
|
|
4791
|
+
function Wo(e, t, n = 48) {
|
|
4781
4792
|
if (e === "none" || t.length === 0) return null;
|
|
4782
4793
|
if (e === "circle") {
|
|
4783
4794
|
let e = Math.sqrt(n / Math.PI);
|
|
@@ -4794,24 +4805,24 @@ function Vo(e, t, n = 48) {
|
|
|
4794
4805
|
let r = Math.sqrt(n / (2 * Math.tan(Math.PI / 6))), i = r * Math.tan(Math.PI / 6);
|
|
4795
4806
|
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("");
|
|
4796
4807
|
}
|
|
4797
|
-
function
|
|
4808
|
+
function Go(e) {
|
|
4798
4809
|
return e === "none" ? null : "M1 8H25";
|
|
4799
4810
|
}
|
|
4800
|
-
function
|
|
4811
|
+
function Ko(e) {
|
|
4801
4812
|
if (e === "dashed") return "8 5";
|
|
4802
4813
|
if (e === "dash-dot") return "8 5 1.5 5";
|
|
4803
4814
|
}
|
|
4804
|
-
function
|
|
4805
|
-
let t = (Number.isFinite(e) && e > 0 ? Math.min(e,
|
|
4815
|
+
function qo(e) {
|
|
4816
|
+
let t = (Number.isFinite(e) && e > 0 ? Math.min(e, Vo) : Bo) / 2, n = Lo - t, r = Lo + t;
|
|
4806
4817
|
return [
|
|
4807
|
-
`M${n} ${
|
|
4808
|
-
`M${
|
|
4809
|
-
`M${n} ${
|
|
4818
|
+
`M${n} ${Ro}H${r}`,
|
|
4819
|
+
`M${Lo} ${Ro}V${zo}`,
|
|
4820
|
+
`M${n} ${zo}H${r}`
|
|
4810
4821
|
].join("");
|
|
4811
4822
|
}
|
|
4812
4823
|
//#endregion
|
|
4813
4824
|
//#region src/components/rendering/WaveformSeriesLayer.vue?vue&type=script&setup=true&lang.ts
|
|
4814
|
-
var
|
|
4825
|
+
var Jo = ["clip-path"], Yo = ["data-series-id", "data-series-name"], Xo = [
|
|
4815
4826
|
"data-series-id",
|
|
4816
4827
|
"data-series-name",
|
|
4817
4828
|
"data-y-axis-index",
|
|
@@ -4820,11 +4831,11 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
4820
4831
|
"d",
|
|
4821
4832
|
"stroke",
|
|
4822
4833
|
"stroke-dasharray"
|
|
4823
|
-
],
|
|
4834
|
+
], Zo = ["data-series-id"], Qo = [
|
|
4824
4835
|
"d",
|
|
4825
4836
|
"stroke",
|
|
4826
4837
|
"stroke-width"
|
|
4827
|
-
],
|
|
4838
|
+
], $o = ["data-series-id", "data-point-type"], es = ["d", "fill"], ts = /*#__PURE__*/ nt(/* @__PURE__ */ l({
|
|
4828
4839
|
__name: "WaveformSeriesLayer",
|
|
4829
4840
|
props: {
|
|
4830
4841
|
track: {},
|
|
@@ -4832,7 +4843,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
4832
4843
|
},
|
|
4833
4844
|
setup(n) {
|
|
4834
4845
|
let a = n, o = t(() => a.track.seriesPaths.map((e) => {
|
|
4835
|
-
let t =
|
|
4846
|
+
let t = Wo(e.series.pointType, e.pointRenderPoints.map((t) => ({
|
|
4836
4847
|
x: a.track.xScale(t.x),
|
|
4837
4848
|
y: e.yScale(t.y)
|
|
4838
4849
|
}))), n = e.series.errorBar.capWidth / 2, r = e.errorBarRenderPoints.map((t) => {
|
|
@@ -4869,8 +4880,8 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
4869
4880
|
"data-line-style": e.series.lineStyle,
|
|
4870
4881
|
d: e.path,
|
|
4871
4882
|
stroke: e.series.color,
|
|
4872
|
-
"stroke-dasharray": D(
|
|
4873
|
-
}, null, 8,
|
|
4883
|
+
"stroke-dasharray": D(Ko)(e.series.lineStyle)
|
|
4884
|
+
}, null, 8, Xo)) : r("", !0),
|
|
4874
4885
|
e.series.errorBar.visible ? (y(), i("g", {
|
|
4875
4886
|
key: 1,
|
|
4876
4887
|
class: "waveform-track__error-bars waveform-chart__error-bars",
|
|
@@ -4881,7 +4892,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
4881
4892
|
d: e.errorBarPath,
|
|
4882
4893
|
stroke: e.series.errorBar.color || e.series.color,
|
|
4883
4894
|
"stroke-width": e.series.errorBar.width
|
|
4884
|
-
}, null, 8,
|
|
4895
|
+
}, null, 8, Qo)) : r("", !0)], 8, Zo)) : r("", !0),
|
|
4885
4896
|
e.series.pointType === "none" ? r("", !0) : (y(), i("g", {
|
|
4886
4897
|
key: 2,
|
|
4887
4898
|
class: "waveform-track__points waveform-chart__points",
|
|
@@ -4892,10 +4903,10 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
4892
4903
|
class: "waveform-track__point waveform-chart__point",
|
|
4893
4904
|
d: e.pointPath,
|
|
4894
4905
|
fill: e.series.color
|
|
4895
|
-
}, null, 8,
|
|
4896
|
-
], 8,
|
|
4906
|
+
}, null, 8, es)) : r("", !0)], 8, $o))
|
|
4907
|
+
], 8, Yo))), 128))], 8, Jo)) : r("", !0);
|
|
4897
4908
|
}
|
|
4898
|
-
}), [["__scopeId", "data-v-628502df"]]),
|
|
4909
|
+
}), [["__scopeId", "data-v-628502df"]]), ns = ["clip-path"], rs = [
|
|
4899
4910
|
"data-y-axis-index",
|
|
4900
4911
|
"x2",
|
|
4901
4912
|
"y1",
|
|
@@ -4904,7 +4915,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
4904
4915
|
"stroke-opacity",
|
|
4905
4916
|
"stroke-width",
|
|
4906
4917
|
"stroke-dasharray"
|
|
4907
|
-
],
|
|
4918
|
+
], is = /* @__PURE__ */ l({
|
|
4908
4919
|
__name: "WaveformZeroLines",
|
|
4909
4920
|
props: {
|
|
4910
4921
|
track: {},
|
|
@@ -4937,27 +4948,27 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
4937
4948
|
"stroke-opacity": t.zeroLine.opacity,
|
|
4938
4949
|
"stroke-width": t.zeroLine.width,
|
|
4939
4950
|
"stroke-dasharray": t.zeroLine.dash || void 0
|
|
4940
|
-
}, null, 8,
|
|
4951
|
+
}, null, 8, rs))], 64))), 128))], 8, ns)) : r("", !0);
|
|
4941
4952
|
}
|
|
4942
|
-
}),
|
|
4953
|
+
}), as = ["transform"], os = ["transform"], ss = {
|
|
4943
4954
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--start waveform-chart__axis-endpoint waveform-chart__axis-endpoint--start",
|
|
4944
4955
|
x: "0",
|
|
4945
4956
|
y: "7",
|
|
4946
4957
|
dy: "0.71em",
|
|
4947
4958
|
"text-anchor": "start"
|
|
4948
|
-
},
|
|
4959
|
+
}, cs = ["x"], ls = [
|
|
4949
4960
|
"data-y-axis-index",
|
|
4950
4961
|
"data-y-axis-side",
|
|
4951
4962
|
"transform"
|
|
4952
|
-
],
|
|
4963
|
+
], us = { key: 2 }, ds = [
|
|
4953
4964
|
"x",
|
|
4954
4965
|
"y",
|
|
4955
4966
|
"width"
|
|
4956
|
-
],
|
|
4967
|
+
], fs = ["fill", "transform"], ps = ["data-y-axis-title-index"], ms = [
|
|
4957
4968
|
"x",
|
|
4958
4969
|
"y",
|
|
4959
4970
|
"width"
|
|
4960
|
-
],
|
|
4971
|
+
], hs = ["fill", "transform"], gs = /* @__PURE__ */ l({
|
|
4961
4972
|
__name: "WaveformTrackAxes",
|
|
4962
4973
|
props: {
|
|
4963
4974
|
track: {},
|
|
@@ -5021,7 +5032,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5021
5032
|
ref: o,
|
|
5022
5033
|
class: p(["waveform-track__axis waveform-track__axis--x waveform-chart__axis waveform-chart__axis--x", { "waveform-track__axis--line-hidden": t.axes?.x?.lineVisible === !1 }]),
|
|
5023
5034
|
transform: `translate(0, ${t.track.height})`
|
|
5024
|
-
}, null, 10,
|
|
5035
|
+
}, null, 10, as)) : r("", !0),
|
|
5025
5036
|
t.track.showXAxis ? (y(), i("g", {
|
|
5026
5037
|
key: 1,
|
|
5027
5038
|
class: "waveform-track__axis-endpoints waveform-chart__axis-endpoints",
|
|
@@ -5029,13 +5040,13 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5029
5040
|
"font-family": "sans-serif",
|
|
5030
5041
|
"font-size": "10",
|
|
5031
5042
|
"aria-hidden": "true"
|
|
5032
|
-
}, [a("text",
|
|
5043
|
+
}, [a("text", ss, T(t.track.endpointLabels.start), 1), a("text", {
|
|
5033
5044
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--end waveform-chart__axis-endpoint waveform-chart__axis-endpoint--end",
|
|
5034
5045
|
x: t.track.width ?? t.innerWidth,
|
|
5035
5046
|
y: "7",
|
|
5036
5047
|
dy: "0.71em",
|
|
5037
5048
|
"text-anchor": "end"
|
|
5038
|
-
}, T(t.track.endpointLabels.end), 9,
|
|
5049
|
+
}, T(t.track.endpointLabels.end), 9, cs)], 8, os)) : r("", !0),
|
|
5039
5050
|
(y(!0), i(e, null, S(t.track.isEmpty ? [] : t.track.yAxes, (e) => (y(), i("g", {
|
|
5040
5051
|
key: `y-axis-${t.track.index}-${e.index}`,
|
|
5041
5052
|
ref_for: !0,
|
|
@@ -5044,21 +5055,21 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5044
5055
|
"data-y-axis-index": e.index,
|
|
5045
5056
|
"data-y-axis-side": e.side,
|
|
5046
5057
|
transform: `translate(${e.x}, 0)`
|
|
5047
|
-
}, null, 10,
|
|
5048
|
-
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && t.track.series && c(t.track.series) && d(t.track.height, t.track.index) ? (y(), i("g",
|
|
5058
|
+
}, null, 10, ls))), 128)),
|
|
5059
|
+
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && t.track.series && c(t.track.series) && d(t.track.height, t.track.index) ? (y(), i("g", us, [a("rect", {
|
|
5049
5060
|
class: "waveform-track__y-axis-label-bg waveform-chart__y-axis-label-bg",
|
|
5050
5061
|
x: t.track.yAxes[0].labelX - D(20) / 2,
|
|
5051
5062
|
y: t.track.height / 2 - 40,
|
|
5052
5063
|
width: D(20),
|
|
5053
5064
|
height: "80",
|
|
5054
5065
|
rx: "2"
|
|
5055
|
-
}, null, 8,
|
|
5066
|
+
}, null, 8, ds), a("text", {
|
|
5056
5067
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
5057
5068
|
fill: t.track.series?.color,
|
|
5058
5069
|
transform: `translate(${t.track.yAxes[0].labelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
5059
5070
|
"text-anchor": "middle",
|
|
5060
5071
|
"dominant-baseline": "central"
|
|
5061
|
-
}, T(t.track.series ? c(t.track.series) : ""), 9,
|
|
5072
|
+
}, T(t.track.series ? c(t.track.series) : ""), 9, fs)])) : r("", !0),
|
|
5062
5073
|
(y(!0), i(e, null, S(!t.cleanView && t.track.yAxes.length > 1 ? t.track.yAxes.filter(l) : [], (e) => (y(), i("g", {
|
|
5063
5074
|
key: `y-axis-title-${t.track.index}-${e.index}`,
|
|
5064
5075
|
class: "waveform-track__multi-axis-title",
|
|
@@ -5070,40 +5081,40 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5070
5081
|
width: D(20),
|
|
5071
5082
|
height: "80",
|
|
5072
5083
|
rx: "2"
|
|
5073
|
-
}, null, 8,
|
|
5084
|
+
}, null, 8, ms), a("text", {
|
|
5074
5085
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
5075
5086
|
fill: e.seriesList[0].color,
|
|
5076
5087
|
transform: `translate(${e.labelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
5077
5088
|
"text-anchor": "middle",
|
|
5078
5089
|
"dominant-baseline": "central"
|
|
5079
|
-
}, T(c(e.seriesList[0])), 9,
|
|
5090
|
+
}, T(c(e.seriesList[0])), 9, hs)], 8, ps))), 128))
|
|
5080
5091
|
], 64));
|
|
5081
5092
|
}
|
|
5082
|
-
}),
|
|
5093
|
+
}), _s = [
|
|
5083
5094
|
"width",
|
|
5084
5095
|
"height",
|
|
5085
5096
|
"fill"
|
|
5086
|
-
],
|
|
5097
|
+
], vs = ["clip-path"], ys = { class: "waveform-track__grid waveform-track__grid--minor waveform-chart__grid waveform-chart__grid--minor" }, bs = [
|
|
5087
5098
|
"stroke",
|
|
5088
5099
|
"x1",
|
|
5089
5100
|
"x2",
|
|
5090
5101
|
"y2"
|
|
5091
|
-
],
|
|
5102
|
+
], xs = [
|
|
5092
5103
|
"stroke",
|
|
5093
5104
|
"x2",
|
|
5094
5105
|
"y1",
|
|
5095
5106
|
"y2"
|
|
5096
|
-
],
|
|
5107
|
+
], Ss = { class: "waveform-track__grid waveform-track__grid--major waveform-chart__grid waveform-chart__grid--major" }, Cs = [
|
|
5097
5108
|
"stroke",
|
|
5098
5109
|
"x1",
|
|
5099
5110
|
"x2",
|
|
5100
5111
|
"y2"
|
|
5101
|
-
],
|
|
5112
|
+
], ws = [
|
|
5102
5113
|
"stroke",
|
|
5103
5114
|
"x2",
|
|
5104
5115
|
"y1",
|
|
5105
5116
|
"y2"
|
|
5106
|
-
],
|
|
5117
|
+
], Ts = ["x", "y"], Es = /* @__PURE__ */ l({
|
|
5107
5118
|
__name: "WaveformTrackBackdrop",
|
|
5108
5119
|
props: {
|
|
5109
5120
|
track: {},
|
|
@@ -5122,12 +5133,12 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5122
5133
|
height: t.track.height,
|
|
5123
5134
|
fill: t.frameStyle.backgroundColor,
|
|
5124
5135
|
"aria-hidden": "true"
|
|
5125
|
-
}, null, 8,
|
|
5136
|
+
}, null, 8, _s)) : r("", !0),
|
|
5126
5137
|
!t.track.isEmpty && t.track.hasVisibleSeries && !t.cleanView ? (y(), i("g", {
|
|
5127
5138
|
key: 1,
|
|
5128
5139
|
"clip-path": `url(#${t.clipPathId}-${t.track.index})`,
|
|
5129
5140
|
"aria-hidden": "true"
|
|
5130
|
-
}, [a("g",
|
|
5141
|
+
}, [a("g", ys, [t.track.gridLines.vertical ? (y(!0), i(e, { key: 0 }, S(t.track.xMinorTicks, (e) => (y(), i("line", {
|
|
5131
5142
|
key: `x-minor-${t.track.index}-${e}`,
|
|
5132
5143
|
"data-grid-direction": "vertical",
|
|
5133
5144
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -5135,7 +5146,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5135
5146
|
x2: t.track.xScale(e),
|
|
5136
5147
|
y1: "0",
|
|
5137
5148
|
y2: t.track.height
|
|
5138
|
-
}, null, 8,
|
|
5149
|
+
}, null, 8, bs))), 128)) : r("", !0), t.track.gridLines.horizontal ? (y(!0), i(e, { key: 1 }, S(t.track.yMinorTicks, (e) => (y(), i("line", {
|
|
5139
5150
|
key: `y-minor-${t.track.index}-${e}`,
|
|
5140
5151
|
"data-grid-direction": "horizontal",
|
|
5141
5152
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -5143,7 +5154,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5143
5154
|
x2: t.track.width ?? t.innerWidth,
|
|
5144
5155
|
y1: t.track.yScale(e),
|
|
5145
5156
|
y2: t.track.yScale(e)
|
|
5146
|
-
}, null, 8,
|
|
5157
|
+
}, null, 8, xs))), 128)) : r("", !0)]), a("g", Ss, [t.track.gridLines.vertical ? (y(!0), i(e, { key: 0 }, S(t.track.xMajorTicks, (e) => (y(), i("line", {
|
|
5147
5158
|
key: `x-major-${t.track.index}-${e}`,
|
|
5148
5159
|
"data-grid-direction": "vertical",
|
|
5149
5160
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -5151,7 +5162,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5151
5162
|
x2: t.track.xScale(e),
|
|
5152
5163
|
y1: "0",
|
|
5153
5164
|
y2: t.track.height
|
|
5154
|
-
}, null, 8,
|
|
5165
|
+
}, null, 8, Cs))), 128)) : r("", !0), t.track.gridLines.horizontal ? (y(!0), i(e, { key: 1 }, S(t.track.yMajorTicks, (e) => (y(), i("line", {
|
|
5155
5166
|
key: `y-major-${t.track.index}-${e}`,
|
|
5156
5167
|
"data-grid-direction": "horizontal",
|
|
5157
5168
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -5159,7 +5170,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5159
5170
|
x2: t.track.width ?? t.innerWidth,
|
|
5160
5171
|
y1: t.track.yScale(e),
|
|
5161
5172
|
y2: t.track.yScale(e)
|
|
5162
|
-
}, null, 8,
|
|
5173
|
+
}, null, 8, ws))), 128)) : r("", !0)])], 8, vs)) : r("", !0),
|
|
5163
5174
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.frameNumber !== void 0 && !t.cleanView ? (y(), i("text", {
|
|
5164
5175
|
key: 2,
|
|
5165
5176
|
class: "waveform-track__watermark waveform-chart__watermark",
|
|
@@ -5169,10 +5180,10 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5169
5180
|
"text-anchor": "middle",
|
|
5170
5181
|
"dominant-baseline": "central",
|
|
5171
5182
|
"aria-hidden": "true"
|
|
5172
|
-
}, T(t.frameNumber), 13,
|
|
5183
|
+
}, T(t.frameNumber), 13, Ts)) : r("", !0)
|
|
5173
5184
|
], 64));
|
|
5174
5185
|
}
|
|
5175
|
-
}),
|
|
5186
|
+
}), Ds = [
|
|
5176
5187
|
"data-track-index",
|
|
5177
5188
|
"data-track-id",
|
|
5178
5189
|
"data-track-empty",
|
|
@@ -5182,7 +5193,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5182
5193
|
"data-track-top",
|
|
5183
5194
|
"data-track-height",
|
|
5184
5195
|
"transform"
|
|
5185
|
-
],
|
|
5196
|
+
], Os = [
|
|
5186
5197
|
"x",
|
|
5187
5198
|
"y",
|
|
5188
5199
|
"width",
|
|
@@ -5191,12 +5202,12 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5191
5202
|
"stroke-width",
|
|
5192
5203
|
"stroke-dasharray",
|
|
5193
5204
|
"stroke-linecap"
|
|
5194
|
-
],
|
|
5205
|
+
], ks = [
|
|
5195
5206
|
"data-interactive",
|
|
5196
5207
|
"data-independent-overlay-index",
|
|
5197
5208
|
"width",
|
|
5198
5209
|
"height"
|
|
5199
|
-
],
|
|
5210
|
+
], As = ["x", "y"], js = /* @__PURE__ */ l({
|
|
5200
5211
|
__name: "WaveformTrack",
|
|
5201
5212
|
props: {
|
|
5202
5213
|
track: {},
|
|
@@ -5264,7 +5275,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5264
5275
|
"data-track-height": e.track.height,
|
|
5265
5276
|
transform: `translate(${e.track.left ?? 0}, ${e.track.top})`
|
|
5266
5277
|
}, [
|
|
5267
|
-
s(
|
|
5278
|
+
s(Es, {
|
|
5268
5279
|
track: e.track,
|
|
5269
5280
|
"clip-path-id": e.clipPathId,
|
|
5270
5281
|
"inner-width": e.innerWidth,
|
|
@@ -5279,7 +5290,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5279
5290
|
"frame-number",
|
|
5280
5291
|
"frame-style"
|
|
5281
5292
|
]),
|
|
5282
|
-
s(
|
|
5293
|
+
s(gs, {
|
|
5283
5294
|
track: e.track,
|
|
5284
5295
|
"inner-width": e.innerWidth,
|
|
5285
5296
|
"clean-view": e.cleanView,
|
|
@@ -5311,12 +5322,12 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5311
5322
|
"stroke-dasharray": c.value.borderStyle === "dashed" ? "6 4" : c.value.borderStyle === "dotted" ? "1 3" : void 0,
|
|
5312
5323
|
"stroke-linecap": c.value.borderStyle === "dotted" ? "round" : void 0,
|
|
5313
5324
|
"aria-hidden": "true"
|
|
5314
|
-
}, null, 8,
|
|
5315
|
-
s(
|
|
5325
|
+
}, null, 8, Os)),
|
|
5326
|
+
s(ts, {
|
|
5316
5327
|
track: e.track,
|
|
5317
5328
|
"clip-path-id": e.clipPathId
|
|
5318
5329
|
}, null, 8, ["track", "clip-path-id"]),
|
|
5319
|
-
s(
|
|
5330
|
+
s(is, {
|
|
5320
5331
|
track: e.track,
|
|
5321
5332
|
"clip-path-id": e.clipPathId,
|
|
5322
5333
|
"inner-width": e.innerWidth,
|
|
@@ -5347,7 +5358,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5347
5358
|
onPointerleave: n[4] ||= (e) => o("pointer-leave"),
|
|
5348
5359
|
onClick: n[5] ||= (e) => o("click", e),
|
|
5349
5360
|
onContextmenu: n[6] ||= (e) => o("contextmenu", e)
|
|
5350
|
-
}, null, 42,
|
|
5361
|
+
}, null, 42, ks)) : r("", !0),
|
|
5351
5362
|
!e.track.isEmpty && !e.track.hasVisibleSeries && !e.cleanView ? (y(), i("text", {
|
|
5352
5363
|
key: 2,
|
|
5353
5364
|
class: "waveform-track__no-visible-series",
|
|
@@ -5355,33 +5366,33 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5355
5366
|
y: e.track.height / 2,
|
|
5356
5367
|
"text-anchor": "middle",
|
|
5357
5368
|
"dominant-baseline": "central"
|
|
5358
|
-
}, " 暂无可见曲线 ", 8,
|
|
5359
|
-
], 10,
|
|
5369
|
+
}, " 暂无可见曲线 ", 8, As)) : r("", !0)
|
|
5370
|
+
], 10, Ds));
|
|
5360
5371
|
}
|
|
5361
|
-
}),
|
|
5372
|
+
}), Ms = [
|
|
5362
5373
|
"width",
|
|
5363
5374
|
"height",
|
|
5364
5375
|
"data-position",
|
|
5365
5376
|
"data-orientation"
|
|
5366
|
-
],
|
|
5377
|
+
], Ns = [
|
|
5367
5378
|
"disabled",
|
|
5368
5379
|
"aria-pressed",
|
|
5369
5380
|
"aria-label",
|
|
5370
5381
|
"onClick"
|
|
5371
|
-
],
|
|
5382
|
+
], Ps = [
|
|
5372
5383
|
"data-line-type",
|
|
5373
5384
|
"data-line-style",
|
|
5374
5385
|
"data-point-type",
|
|
5375
5386
|
"data-error-bar-visible"
|
|
5376
|
-
],
|
|
5387
|
+
], Fs = [
|
|
5377
5388
|
"d",
|
|
5378
5389
|
"stroke",
|
|
5379
5390
|
"stroke-dasharray"
|
|
5380
|
-
],
|
|
5391
|
+
], Is = [
|
|
5381
5392
|
"d",
|
|
5382
5393
|
"stroke",
|
|
5383
5394
|
"stroke-width"
|
|
5384
|
-
],
|
|
5395
|
+
], Ls = ["d", "fill"], Rs = ["title"], zs = /*#__PURE__*/ nt(/* @__PURE__ */ l({
|
|
5385
5396
|
__name: "WaveformLegend",
|
|
5386
5397
|
props: {
|
|
5387
5398
|
series: {},
|
|
@@ -5447,45 +5458,45 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5447
5458
|
"data-point-type": e.pointType,
|
|
5448
5459
|
"data-error-bar-visible": e.errorBar.visible || void 0
|
|
5449
5460
|
}, [
|
|
5450
|
-
D(
|
|
5461
|
+
D(Go)(e.lineType) ? (y(), i("path", {
|
|
5451
5462
|
key: 0,
|
|
5452
5463
|
class: "waveform-legend__line",
|
|
5453
|
-
d: D(
|
|
5464
|
+
d: D(Go)(e.lineType) ?? void 0,
|
|
5454
5465
|
stroke: e.color,
|
|
5455
|
-
"stroke-dasharray": D(
|
|
5466
|
+
"stroke-dasharray": D(Ko)(e.lineStyle),
|
|
5456
5467
|
"stroke-width": "1",
|
|
5457
5468
|
fill: "none"
|
|
5458
|
-
}, null, 8,
|
|
5469
|
+
}, null, 8, Fs)) : r("", !0),
|
|
5459
5470
|
e.errorBar.visible ? (y(), i("path", {
|
|
5460
5471
|
key: 1,
|
|
5461
5472
|
class: "waveform-legend__error-bar",
|
|
5462
|
-
d: D(
|
|
5473
|
+
d: D(qo)(e.errorBar.capWidth),
|
|
5463
5474
|
stroke: e.errorBar.color || e.color,
|
|
5464
5475
|
"stroke-width": e.errorBar.width,
|
|
5465
5476
|
"stroke-linecap": "butt",
|
|
5466
5477
|
fill: "none"
|
|
5467
|
-
}, null, 8,
|
|
5478
|
+
}, null, 8, Is)) : r("", !0),
|
|
5468
5479
|
e.pointType === "none" ? r("", !0) : (y(), i("path", {
|
|
5469
5480
|
key: 2,
|
|
5470
5481
|
class: "waveform-legend__point",
|
|
5471
|
-
d: D(
|
|
5482
|
+
d: D(Uo)(e.pointType, 30) ?? void 0,
|
|
5472
5483
|
fill: e.color,
|
|
5473
5484
|
transform: "translate(13 8)"
|
|
5474
|
-
}, null, 8,
|
|
5475
|
-
], 8,
|
|
5485
|
+
}, null, 8, Ls))
|
|
5486
|
+
], 8, Ps)), a("span", {
|
|
5476
5487
|
class: "waveform-legend__label",
|
|
5477
5488
|
title: u(e)
|
|
5478
|
-
}, T(u(e)), 9,
|
|
5489
|
+
}, T(u(e)), 9, Rs)], 10, Ns))), 128))], 6)], 2)], 8, Ms));
|
|
5479
5490
|
}
|
|
5480
|
-
}), [["__scopeId", "data-v-d5958f86"]]),
|
|
5491
|
+
}), [["__scopeId", "data-v-d5958f86"]]), Bs = {
|
|
5481
5492
|
class: "waveform-chart__hover-layer",
|
|
5482
5493
|
"pointer-events": "none",
|
|
5483
5494
|
"aria-hidden": "true"
|
|
5484
|
-
},
|
|
5495
|
+
}, Vs = ["clip-path", "transform"], Hs = [
|
|
5485
5496
|
"x1",
|
|
5486
5497
|
"x2",
|
|
5487
5498
|
"y2"
|
|
5488
|
-
],
|
|
5499
|
+
], Us = /*#__PURE__*/ nt(/* @__PURE__ */ l({
|
|
5489
5500
|
__name: "WaveformHoverLayer",
|
|
5490
5501
|
props: {
|
|
5491
5502
|
state: {},
|
|
@@ -5501,7 +5512,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5501
5512
|
x: e.xScale(n)
|
|
5502
5513
|
}] : [];
|
|
5503
5514
|
}));
|
|
5504
|
-
return (t, r) => (y(), i("g",
|
|
5515
|
+
return (t, r) => (y(), i("g", Bs, [(y(!0), i(e, null, S(o.value, (e) => (y(), i("g", {
|
|
5505
5516
|
key: e.track.index,
|
|
5506
5517
|
class: "waveform-track__crosshair waveform-chart__crosshair",
|
|
5507
5518
|
"clip-path": `url(#${n.clipPathId}-${e.track.index})`,
|
|
@@ -5511,9 +5522,9 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5511
5522
|
x2: e.x,
|
|
5512
5523
|
y1: "0",
|
|
5513
5524
|
y2: e.track.height
|
|
5514
|
-
}, null, 8,
|
|
5525
|
+
}, null, 8, Hs)], 8, Vs))), 128))]));
|
|
5515
5526
|
}
|
|
5516
|
-
}), [["__scopeId", "data-v-54a5a37d"]]),
|
|
5527
|
+
}), [["__scopeId", "data-v-54a5a37d"]]), Ws = [
|
|
5517
5528
|
"data-display-mode",
|
|
5518
5529
|
"data-interaction-mode",
|
|
5519
5530
|
"data-presentation-mode",
|
|
@@ -5522,31 +5533,31 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5522
5533
|
"data-plot-margin-top",
|
|
5523
5534
|
"data-plot-margin-bottom",
|
|
5524
5535
|
"data-title-area-height"
|
|
5525
|
-
],
|
|
5536
|
+
], Gs = [
|
|
5526
5537
|
"role",
|
|
5527
5538
|
"aria-level",
|
|
5528
5539
|
"aria-hidden"
|
|
5529
|
-
],
|
|
5540
|
+
], Ks = ["data-title-scale", "data-title-wrapped"], qs = [
|
|
5530
5541
|
"width",
|
|
5531
5542
|
"height",
|
|
5532
5543
|
"aria-label"
|
|
5533
|
-
],
|
|
5544
|
+
], Js = ["id"], Ys = ["width", "height"], Xs = ["transform"], Zs = {
|
|
5534
5545
|
key: 0,
|
|
5535
5546
|
class: "waveform-chart__grid-slots",
|
|
5536
5547
|
"aria-hidden": "true"
|
|
5537
|
-
},
|
|
5548
|
+
}, Qs = ["transform"], $s = ["width", "height"], ec = ["width", "height"], tc = [
|
|
5538
5549
|
"x",
|
|
5539
5550
|
"y",
|
|
5540
5551
|
"width",
|
|
5541
5552
|
"height"
|
|
5542
|
-
],
|
|
5553
|
+
], nc = {
|
|
5543
5554
|
key: 4,
|
|
5544
5555
|
class: "waveform-chart__legend-layer"
|
|
5545
|
-
},
|
|
5556
|
+
}, rc = [
|
|
5546
5557
|
"data-legend-track-index",
|
|
5547
5558
|
"data-legend-track-id",
|
|
5548
5559
|
"transform"
|
|
5549
|
-
],
|
|
5560
|
+
], ic = ["x", "y"], ac = ["x", "y"], oc = /* @__PURE__ */ l({
|
|
5550
5561
|
__name: "WaveformChartView",
|
|
5551
5562
|
props: { controller: {} },
|
|
5552
5563
|
setup(t) {
|
|
@@ -5600,7 +5611,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5600
5611
|
style: m(D(I)),
|
|
5601
5612
|
"data-title-scale": D(L).scale,
|
|
5602
5613
|
"data-title-wrapped": D(L).wrapped || void 0
|
|
5603
|
-
}, T(D(P)), 13,
|
|
5614
|
+
}, T(D(P)), 13, Ks)], 4)) : r("", !0)], 12, Gs)) : r("", !0),
|
|
5604
5615
|
(y(), i("svg", {
|
|
5605
5616
|
ref: D($e),
|
|
5606
5617
|
class: "waveform-chart__svg",
|
|
@@ -5617,9 +5628,9 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5617
5628
|
}, [a("rect", {
|
|
5618
5629
|
width: e.width,
|
|
5619
5630
|
height: e.height
|
|
5620
|
-
}, null, 8,
|
|
5631
|
+
}, null, 8, Ys)], 8, Js))), 128))]),
|
|
5621
5632
|
a("g", { transform: `translate(${D(x)}, ${D(W)})` }, [
|
|
5622
|
-
D(o) !== "compact" && !D(l) ? (y(), i("g",
|
|
5633
|
+
D(o) !== "compact" && !D(l) ? (y(), i("g", Zs, [(y(!0), i(e, null, S(D(G), (e) => (y(), i("g", {
|
|
5623
5634
|
key: `grid-slot-${e.slotIndex}`,
|
|
5624
5635
|
transform: `translate(${e.left}, ${e.top})`
|
|
5625
5636
|
}, [e.series ? r("", !0) : (y(), i("rect", {
|
|
@@ -5627,7 +5638,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5627
5638
|
class: "waveform-chart__grid-slot-placeholder",
|
|
5628
5639
|
width: e.width,
|
|
5629
5640
|
height: e.cellHeight
|
|
5630
|
-
}, null, 8,
|
|
5641
|
+
}, null, 8, $s))], 8, Qs))), 128))])) : r("", !0),
|
|
5631
5642
|
D(o) !== "independent" && D(H).length && D(K) ? (y(), i("rect", {
|
|
5632
5643
|
key: 1,
|
|
5633
5644
|
ref: D(tt),
|
|
@@ -5644,8 +5655,8 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5644
5655
|
onPointerleave: E[4] ||= (...e) => D(se) && D(se)(...e),
|
|
5645
5656
|
onClick: E[5] ||= (...e) => D(ce) && D(ce)(...e),
|
|
5646
5657
|
onContextmenu: E[6] ||= (...e) => D(ue) && D(ue)(...e)
|
|
5647
|
-
}, null, 42,
|
|
5648
|
-
(y(!0), i(e, null, S(D(H), (e) => (y(), n(D(
|
|
5658
|
+
}, null, 42, ec)) : r("", !0),
|
|
5659
|
+
(y(!0), i(e, null, S(D(H), (e) => (y(), n(D(js), {
|
|
5649
5660
|
key: `${e.index}-${e.id}`,
|
|
5650
5661
|
track: e,
|
|
5651
5662
|
"clip-path-id": D(U),
|
|
@@ -5697,7 +5708,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5697
5708
|
"onClick",
|
|
5698
5709
|
"onContextmenu"
|
|
5699
5710
|
]))), 128)),
|
|
5700
|
-
s(D(
|
|
5711
|
+
s(D(Us), {
|
|
5701
5712
|
state: D(_e),
|
|
5702
5713
|
tracks: D(H),
|
|
5703
5714
|
"clip-path-id": D(U),
|
|
@@ -5716,7 +5727,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5716
5727
|
width: D(ye).width,
|
|
5717
5728
|
height: D(ye).height,
|
|
5718
5729
|
"aria-hidden": "true"
|
|
5719
|
-
}, null, 8,
|
|
5730
|
+
}, null, 8, tc)) : r("", !0),
|
|
5720
5731
|
D(l) ? r("", !0) : (y(), n(D(rt), {
|
|
5721
5732
|
key: 3,
|
|
5722
5733
|
annotations: D(be),
|
|
@@ -5735,13 +5746,13 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5735
5746
|
"onMove",
|
|
5736
5747
|
"onDragEnd"
|
|
5737
5748
|
])),
|
|
5738
|
-
D(l) ? r("", !0) : (y(), i("g",
|
|
5749
|
+
D(l) ? r("", !0) : (y(), i("g", nc, [(y(!0), i(e, null, S(D(H), (e) => (y(), i("g", {
|
|
5739
5750
|
key: `legend-${e.index}-${e.id}`,
|
|
5740
5751
|
class: "waveform-chart__legend-track",
|
|
5741
5752
|
"data-legend-track-index": e.index,
|
|
5742
5753
|
"data-legend-track-id": e.id,
|
|
5743
5754
|
transform: `translate(${e.left}, ${e.top})`
|
|
5744
|
-
}, [!e.isEmpty && (e.legendSeries.length > 1 || D(v) === "legend-single-series") ? (y(), n(D(
|
|
5755
|
+
}, [!e.isEmpty && (e.legendSeries.length > 1 || D(v) === "legend-single-series") ? (y(), n(D(zs), {
|
|
5745
5756
|
key: 0,
|
|
5746
5757
|
series: e.legendSeries,
|
|
5747
5758
|
"show-units": D(b),
|
|
@@ -5764,23 +5775,23 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5764
5775
|
"width",
|
|
5765
5776
|
"height",
|
|
5766
5777
|
"onToggle"
|
|
5767
|
-
])) : r("", !0)], 8,
|
|
5768
|
-
], 8,
|
|
5778
|
+
])) : r("", !0)], 8, rc))), 128))]))
|
|
5779
|
+
], 8, Xs),
|
|
5769
5780
|
D(je) && !D(l) ? (y(), i("text", {
|
|
5770
5781
|
key: 0,
|
|
5771
5782
|
class: "waveform-chart__label waveform-chart__x-label",
|
|
5772
5783
|
x: D(x) + D(ne) / 2,
|
|
5773
5784
|
y: D(Me),
|
|
5774
5785
|
"text-anchor": "middle"
|
|
5775
|
-
}, T(D(je)), 9,
|
|
5786
|
+
}, T(D(je)), 9, ic)) : r("", !0),
|
|
5776
5787
|
D(Ne) && !D(B) ? (y(), i("text", {
|
|
5777
5788
|
key: 1,
|
|
5778
5789
|
class: "waveform-chart__empty",
|
|
5779
5790
|
x: D(R) / 2,
|
|
5780
5791
|
y: D(z) / 2,
|
|
5781
5792
|
"text-anchor": "middle"
|
|
5782
|
-
}, " 暂无有效波形数据 ", 8,
|
|
5783
|
-
], 40,
|
|
5793
|
+
}, " 暂无有效波形数据 ", 8, ac)) : r("", !0)
|
|
5794
|
+
], 40, qs)),
|
|
5784
5795
|
D(d) ? (y(), n(D(le), {
|
|
5785
5796
|
key: 1,
|
|
5786
5797
|
class: "waveform-chart__pagination",
|
|
@@ -5797,7 +5808,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5797
5808
|
"total",
|
|
5798
5809
|
"onChange"
|
|
5799
5810
|
])) : r("", !0),
|
|
5800
|
-
D(Be) && !D(l) && !D(f) ? (y(), n(
|
|
5811
|
+
D(Be) && !D(l) && !D(f) ? (y(), n(Do, {
|
|
5801
5812
|
key: 2,
|
|
5802
5813
|
annotation: D(Be).annotation,
|
|
5803
5814
|
mode: D(Be).mode,
|
|
@@ -5839,7 +5850,7 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5839
5850
|
"onDelete",
|
|
5840
5851
|
"onClose"
|
|
5841
5852
|
])) : r("", !0),
|
|
5842
|
-
s(D(
|
|
5853
|
+
s(D(Io), {
|
|
5843
5854
|
state: D(_e),
|
|
5844
5855
|
visible: D(ve) && !D(f),
|
|
5845
5856
|
"time-unit": D(me),
|
|
@@ -5852,9 +5863,9 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5852
5863
|
"container-width",
|
|
5853
5864
|
"container-height"
|
|
5854
5865
|
])
|
|
5855
|
-
], 46,
|
|
5866
|
+
], 46, Ws));
|
|
5856
5867
|
}
|
|
5857
|
-
}),
|
|
5868
|
+
}), sc = /* @__PURE__ */ l({
|
|
5858
5869
|
__name: "WaveformChart",
|
|
5859
5870
|
props: {
|
|
5860
5871
|
data: {},
|
|
@@ -5946,12 +5957,12 @@ var Go = ["clip-path"], Ko = ["data-series-id", "data-series-name"], qo = [
|
|
|
5946
5957
|
"sampling-error"
|
|
5947
5958
|
],
|
|
5948
5959
|
setup(e, { expose: t, emit: r }) {
|
|
5949
|
-
let i =
|
|
5960
|
+
let i = so(e, r);
|
|
5950
5961
|
return t({
|
|
5951
5962
|
resetViewport: i.resetViewport,
|
|
5952
5963
|
setViewportDomain: i.setViewportDomain
|
|
5953
|
-
}), (e, t) => (y(), n(
|
|
5964
|
+
}), (e, t) => (y(), n(oc, { controller: D(i) }, null, 8, ["controller"]));
|
|
5954
5965
|
}
|
|
5955
5966
|
});
|
|
5956
5967
|
//#endregion
|
|
5957
|
-
export { Q as DEFAULT_WAVEFORM_RENDERING_OPTIONS,
|
|
5968
|
+
export { Q as DEFAULT_WAVEFORM_RENDERING_OPTIONS, sc as WaveformChart, vt as buildMinorTicks, Hi as calculateWasmRange, Rt as clamp, jt as displayTime, Ui as findWasmVisibleRange, Pt as formatAxisTime, Nt as formatEndpointTime, Ft as formatTooltipTime, Bi as initializeWasmSampling, ln as normalizeWaveformData, fn as normalizeWaveformSeries, _t as paddedDomain, ht as parseWaveformAnnotations, Lt as resolveTrackGeometry, Dn as resolveWaveformRenderingOptions, Vi as sampleWaveformWasm, Fn as selectRenderablePoints, mt as serializeWaveformAnnotations };
|