@pennsieve-viz/tsviewer 1.0.31 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BFLibraryButton-Dec5fit3.js → BFLibraryButton-CjW78KwZ.js} +1 -1
- package/dist/{BFLibraryButton-CnSdxNr1.cjs → BFLibraryButton-DGI5G53e.cjs} +1 -1
- package/dist/{IconSelection-CxtyAEya.cjs → IconSelection-BJc1giuT.cjs} +1 -1
- package/dist/{IconSelection-C_zQHxVs.js → IconSelection-ChXlHpsu.js} +1 -1
- package/dist/TSAnnotationCanvas-CfyqYTnB.js +730 -0
- package/dist/TSAnnotationCanvas-DhskkXWf.cjs +1 -0
- package/dist/{TSAnnotationModal-Bvz6Hr6c.cjs → TSAnnotationModal-Bde2b3U0.cjs} +1 -1
- package/dist/{TSAnnotationModal-Crb5zX1P.js → TSAnnotationModal-KX-_Afb3.js} +42 -42
- package/dist/{TSFilterModal-DdNCo0nH.js → TSFilterModal-BMSEMK8Y.js} +3 -3
- package/dist/{TSFilterModal-BA7WXDk1.cjs → TSFilterModal-RgvcihE6.cjs} +1 -1
- package/dist/TSScrubber-C90JS4pD.cjs +1 -0
- package/dist/{TSScrubber-BsoGLy_L.js → TSScrubber-DqCc3Zp7.js} +39 -39
- package/dist/{TSViewerCanvas-ByhDLibl.js → TSViewerCanvas-3TTYdC6T.js} +13 -13
- package/dist/{TSViewerCanvas-D_i1FrqG.cjs → TSViewerCanvas-BUlYMq9z.cjs} +2 -2
- package/dist/{TSViewerLayerWindow-Cf4J_lK_.js → TSViewerLayerWindow-B94J9tDk.js} +2 -2
- package/dist/{TSViewerLayerWindow-4ckQFmUZ.cjs → TSViewerLayerWindow-C5Va7dH9.cjs} +1 -1
- package/dist/{TSViewerToolbar-BLOSD8fd.cjs → TSViewerToolbar-B1q33g4K.cjs} +1 -1
- package/dist/{TSViewerToolbar-BxAiyYi7.js → TSViewerToolbar-ECRy1rzk.js} +6 -6
- package/dist/{TsAnnotationDeleteDialog-Dm0rbNQr.js → TsAnnotationDeleteDialog-3aMg8Pa_.js} +3 -3
- package/dist/{TsAnnotationDeleteDialog-B_ZIUOh2.cjs → TsAnnotationDeleteDialog-O-NFN0pa.cjs} +1 -1
- package/dist/index-B-qad683.cjs +1 -0
- package/dist/index-ZGQLYYRT.js +1459 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -3
- package/dist/{pathOr-D8CyYHmd.cjs → pathOr-BHBhJmTE.cjs} +1 -1
- package/dist/{pathOr-CC_5pAvC.js → pathOr-Byg6zMXz.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/TSAnnotationCanvas-BuYjJ340.cjs +0 -1
- package/dist/TSAnnotationCanvas-DV93mqhV.js +0 -778
- package/dist/TSScrubber-KnkoGu88.cjs +0 -1
- package/dist/index-C3ilckwx.js +0 -1318
- package/dist/index-D8lvFC22.cjs +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { b as Ce, j as he, l as fn, k as Ct, c as Pe, _ as Be, E as ve, w as xa, n as Rn, o as vn, q as ke, r as Ha, s as In, U as bt, C as gt, u as We, e as na, v as On, x as Yn, N as Ua, y as $e, z as An, g as Nn, f as Fn, i as Wt, d as Bn, h as Kt, A as ra, B as yt, D as ka, F as zt, G as kt, H as wa, J as jt, I as Sa, K as En, L as Wa, t as Ln } from "./base-VCnLhxie.js";
|
|
2
2
|
import { u as Hn, a as Un, E as Wn } from "./el-overlay-BMUWCEw_.js";
|
|
3
3
|
import { d as Ra, e as Ia, f as Oa, c as hn, u as pn, h as Kn, i as zn, j as jn, k as mn, l as qn, m as Gn, o as Zn, E as Jn, g as ut, n as Qn, p as Xn, q as er, r as tr, T as ar, C as Ma, s as nr, t as rr, a as sr, b as or } from "./el-input-DQtvBLS6.js";
|
|
4
|
-
import { computed as B, inject as
|
|
5
|
-
import { g as cr,
|
|
4
|
+
import { computed as B, inject as Ve, ref as X, useSlots as ua, Text as lr, defineComponent as we, createBlock as ue, openBlock as T, resolveDynamicComponent as ze, mergeProps as Rt, unref as e, withCtx as re, createElementBlock as Z, createCommentVNode as oe, Fragment as ye, renderSlot as fe, normalizeClass as $, provide as xt, reactive as bn, toRef as Ue, normalizeStyle as sa, createElementVNode as j, useAttrs as Ya, watch as De, nextTick as Ye, onBeforeUnmount as gn, withModifiers as Ze, toDisplayString as pe, onMounted as yn, renderList as _e, createTextVNode as et, withDirectives as Oe, createVNode as G, Transition as ir, withKeys as Je, vShow as Xe, getCurrentInstance as kn, defineAsyncComponent as ur } from "vue";
|
|
5
|
+
import { g as cr, h as dr, p as Ka } from "./index-ZGQLYYRT.js";
|
|
6
6
|
import { storeToRefs as fr } from "pinia";
|
|
7
|
-
import { I as vr } from "./IconSelection-
|
|
7
|
+
import { I as vr } from "./IconSelection-ChXlHpsu.js";
|
|
8
8
|
import { g as nt } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
9
9
|
import { v as za } from "./index-BAtTJnp_.js";
|
|
10
10
|
const wn = Symbol("buttonGroupContextKey"), hr = (a, n) => {
|
|
@@ -15,7 +15,7 @@ const wn = Symbol("buttonGroupContextKey"), hr = (a, n) => {
|
|
|
15
15
|
scope: "props",
|
|
16
16
|
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
17
17
|
}, B(() => a.type === "text"));
|
|
18
|
-
const t =
|
|
18
|
+
const t = Ve(wn, void 0), r = Un("button"), { form: s } = Ra(), l = Ia(B(() => t == null ? void 0 : t.size)), o = Oa(), u = X(), D = ua(), w = B(() => {
|
|
19
19
|
var d;
|
|
20
20
|
return a.type || (t == null ? void 0 : t.type) || ((d = r.value) == null ? void 0 : d.type) || "";
|
|
21
21
|
}), C = B(() => {
|
|
@@ -117,7 +117,7 @@ const wn = Symbol("buttonGroupContextKey"), hr = (a, n) => {
|
|
|
117
117
|
}), br = {
|
|
118
118
|
click: (a) => a instanceof MouseEvent
|
|
119
119
|
};
|
|
120
|
-
function
|
|
120
|
+
function Te(a, n) {
|
|
121
121
|
gr(a) && (a = "100%");
|
|
122
122
|
var t = yr(a);
|
|
123
123
|
return a = n === 360 ? a : Math.min(n, Math.max(0, parseFloat(a))), t && (a = parseInt(String(a * n), 10) / 100), Math.abs(a - n) < 1e-6 ? 1 : (n === 360 ? a = (a < 0 ? a % n + n : a % n) / parseFloat(String(n)) : a = a % n / parseFloat(String(n)), a);
|
|
@@ -142,13 +142,13 @@ function mt(a) {
|
|
|
142
142
|
}
|
|
143
143
|
function kr(a, n, t) {
|
|
144
144
|
return {
|
|
145
|
-
r:
|
|
146
|
-
g:
|
|
147
|
-
b:
|
|
145
|
+
r: Te(a, 255) * 255,
|
|
146
|
+
g: Te(n, 255) * 255,
|
|
147
|
+
b: Te(t, 255) * 255
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
function ja(a, n, t) {
|
|
151
|
-
a =
|
|
151
|
+
a = Te(a, 255), n = Te(n, 255), t = Te(t, 255);
|
|
152
152
|
var r = Math.max(a, n, t), s = Math.min(a, n, t), l = 0, o = 0, u = (r + s) / 2;
|
|
153
153
|
if (r === s)
|
|
154
154
|
o = 0, l = 0;
|
|
@@ -174,7 +174,7 @@ function ha(a, n, t) {
|
|
|
174
174
|
}
|
|
175
175
|
function wr(a, n, t) {
|
|
176
176
|
var r, s, l;
|
|
177
|
-
if (a =
|
|
177
|
+
if (a = Te(a, 360), n = Te(n, 100), t = Te(t, 100), n === 0)
|
|
178
178
|
s = t, l = t, r = t;
|
|
179
179
|
else {
|
|
180
180
|
var o = t < 0.5 ? t * (1 + n) : t + n - t * n, u = 2 * t - o;
|
|
@@ -183,7 +183,7 @@ function wr(a, n, t) {
|
|
|
183
183
|
return { r: r * 255, g: s * 255, b: l * 255 };
|
|
184
184
|
}
|
|
185
185
|
function qa(a, n, t) {
|
|
186
|
-
a =
|
|
186
|
+
a = Te(a, 255), n = Te(n, 255), t = Te(t, 255);
|
|
187
187
|
var r = Math.max(a, n, t), s = Math.min(a, n, t), l = 0, o = r, u = r - s, D = r === 0 ? 0 : u / r;
|
|
188
188
|
if (r === s)
|
|
189
189
|
l = 0;
|
|
@@ -204,7 +204,7 @@ function qa(a, n, t) {
|
|
|
204
204
|
return { h: l, s: D, v: o };
|
|
205
205
|
}
|
|
206
206
|
function Sr(a, n, t) {
|
|
207
|
-
a =
|
|
207
|
+
a = Te(a, 360) * 6, n = Te(n, 100), t = Te(t, 100);
|
|
208
208
|
var r = Math.floor(a), s = a - r, l = t * (1 - n), o = t * (1 - s * n), u = t * (1 - (1 - s) * n), D = r % 6, w = [t, o, l, l, u, t][D], C = [u, t, t, o, l, l][D], p = [l, l, u, t, t, o][D];
|
|
209
209
|
return { r: w * 255, g: C * 255, b: p * 255 };
|
|
210
210
|
}
|
|
@@ -514,7 +514,7 @@ var Tr = (
|
|
|
514
514
|
return this.a === 1 ? "rgb(".concat(n, ", ").concat(t, ", ").concat(r, ")") : "rgba(".concat(n, ", ").concat(t, ", ").concat(r, ", ").concat(this.roundA, ")");
|
|
515
515
|
}, a.prototype.toPercentageRgb = function() {
|
|
516
516
|
var n = function(t) {
|
|
517
|
-
return "".concat(Math.round(
|
|
517
|
+
return "".concat(Math.round(Te(t, 255) * 100), "%");
|
|
518
518
|
};
|
|
519
519
|
return {
|
|
520
520
|
r: n(this.r),
|
|
@@ -524,7 +524,7 @@ var Tr = (
|
|
|
524
524
|
};
|
|
525
525
|
}, a.prototype.toPercentageRgbString = function() {
|
|
526
526
|
var n = function(t) {
|
|
527
|
-
return Math.round(
|
|
527
|
+
return Math.round(Te(t, 255) * 100);
|
|
528
528
|
};
|
|
529
529
|
return this.a === 1 ? "rgb(".concat(n(this.r), "%, ").concat(n(this.g), "%, ").concat(n(this.b), "%)") : "rgba(".concat(n(this.r), "%, ").concat(n(this.g), "%, ").concat(n(this.b), "%, ").concat(this.roundA, ")");
|
|
530
530
|
}, a.prototype.toName = function() {
|
|
@@ -918,17 +918,17 @@ function Br() {
|
|
|
918
918
|
}, I.format = function(L) {
|
|
919
919
|
var q = this, m = this.$locale();
|
|
920
920
|
if (!this.isValid()) return m.invalidDate || h;
|
|
921
|
-
var c = L || "YYYY-MM-DDTHH:mm:ssZ", A = K.z(this), k = this.$H, y = this.$m, F = this.$M, E = m.weekdays, U = m.months, te = m.meridiem, se = function(me, Me,
|
|
922
|
-
return me && (me[Me] || me(q, c)) ||
|
|
921
|
+
var c = L || "YYYY-MM-DDTHH:mm:ssZ", A = K.z(this), k = this.$H, y = this.$m, F = this.$M, E = m.weekdays, U = m.months, te = m.meridiem, se = function(me, Me, xe, Re) {
|
|
922
|
+
return me && (me[Me] || me(q, c)) || xe[Me].slice(0, Re);
|
|
923
923
|
}, ce = function(me) {
|
|
924
924
|
return K.s(k % 12 || 12, me, "0");
|
|
925
|
-
}, be = te || function(me, Me,
|
|
925
|
+
}, be = te || function(me, Me, xe) {
|
|
926
926
|
var Re = me < 12 ? "AM" : "PM";
|
|
927
|
-
return
|
|
927
|
+
return xe ? Re.toLowerCase() : Re;
|
|
928
928
|
};
|
|
929
929
|
return c.replace(R, (function(me, Me) {
|
|
930
|
-
return Me || (function(
|
|
931
|
-
switch (
|
|
930
|
+
return Me || (function(xe) {
|
|
931
|
+
switch (xe) {
|
|
932
932
|
case "YY":
|
|
933
933
|
return String(q.$y).slice(-2);
|
|
934
934
|
case "YYYY":
|
|
@@ -1264,10 +1264,10 @@ function jr() {
|
|
|
1264
1264
|
K && (Q = V[2]), D = this.$locale(), !Y && Q && (D = N.Ls[Q]), this.$d = (function(q, m, c, A) {
|
|
1265
1265
|
try {
|
|
1266
1266
|
if (["x", "X"].indexOf(m) > -1) return new Date((m === "X" ? 1e3 : 1) * q);
|
|
1267
|
-
var k = h(m)(q), y = k.year, F = k.month, E = k.day, U = k.hours, te = k.minutes, se = k.seconds, ce = k.milliseconds, be = k.zone, me = k.week, Me = /* @__PURE__ */ new Date(),
|
|
1267
|
+
var k = h(m)(q), y = k.year, F = k.month, E = k.day, U = k.hours, te = k.minutes, se = k.seconds, ce = k.milliseconds, be = k.zone, me = k.week, Me = /* @__PURE__ */ new Date(), xe = E || (y || F ? 1 : Me.getDate()), Re = y || Me.getFullYear(), Ae = 0;
|
|
1268
1268
|
y && !F || (Ae = F > 0 ? F - 1 : Me.getMonth());
|
|
1269
1269
|
var Ie, Ne = U || 0, tt = te || 0, Fe = se || 0, de = ce || 0;
|
|
1270
|
-
return be ? new Date(Date.UTC(Re, Ae,
|
|
1270
|
+
return be ? new Date(Date.UTC(Re, Ae, xe, Ne, tt, Fe, de + 60 * be.offset * 1e3)) : c ? new Date(Date.UTC(Re, Ae, xe, Ne, tt, Fe, de)) : (Ie = new Date(Re, Ae, xe, Ne, tt, Fe, de), me && (Ie = A(Ie).week(me).toDate()), Ie);
|
|
1271
1271
|
} catch {
|
|
1272
1272
|
return /* @__PURE__ */ new Date("");
|
|
1273
1273
|
}
|
|
@@ -1681,7 +1681,7 @@ const $s = we({
|
|
|
1681
1681
|
"keydown"
|
|
1682
1682
|
],
|
|
1683
1683
|
setup(a, { expose: n, emit: t }) {
|
|
1684
|
-
const r = a, s = Ya(), { lang: l } = We(), o = Pe("date"), u = Pe("input"), D = Pe("range"), { form: w, formItem: C } = Ra(), p =
|
|
1684
|
+
const r = a, s = Ya(), { lang: l } = We(), o = Pe("date"), u = Pe("input"), D = Pe("range"), { form: w, formItem: C } = Ra(), p = Ve(Pn, {}), { valueOnClear: M } = qn(r, null), _ = X(), S = X(), h = X(!1), d = X(!1), R = X(null);
|
|
1685
1685
|
let N = !1;
|
|
1686
1686
|
const { isFocused: v, handleFocus: b, handleBlur: f } = mn(S, {
|
|
1687
1687
|
beforeFocus() {
|
|
@@ -1767,7 +1767,7 @@ const $s = we({
|
|
|
1767
1767
|
}), Me = async (i) => {
|
|
1768
1768
|
var J;
|
|
1769
1769
|
r.readonly || c.value || (((J = i.target) == null ? void 0 : J.tagName) !== "INPUT" || v.value) && (h.value = !0);
|
|
1770
|
-
},
|
|
1770
|
+
}, xe = () => {
|
|
1771
1771
|
r.readonly || c.value || !me.value && r.clearable && (ce.value = !0);
|
|
1772
1772
|
}, Re = () => {
|
|
1773
1773
|
ce.value = !1;
|
|
@@ -1915,7 +1915,7 @@ const $s = we({
|
|
|
1915
1915
|
onEndInput: lt,
|
|
1916
1916
|
onEndChange: Ke,
|
|
1917
1917
|
onMousedown: Me,
|
|
1918
|
-
onMouseenter:
|
|
1918
|
+
onMouseenter: xe,
|
|
1919
1919
|
onMouseleave: Re,
|
|
1920
1920
|
onTouchstartPassive: Ae,
|
|
1921
1921
|
onKeydown: wt
|
|
@@ -1975,7 +1975,7 @@ const $s = we({
|
|
|
1975
1975
|
onKeydown: wt,
|
|
1976
1976
|
onChange: rt,
|
|
1977
1977
|
onMousedown: Me,
|
|
1978
|
-
onMouseenter:
|
|
1978
|
+
onMouseenter: xe,
|
|
1979
1979
|
onMouseleave: Re,
|
|
1980
1980
|
onTouchstartPassive: Ae,
|
|
1981
1981
|
onClick: Ze(() => {
|
|
@@ -2129,7 +2129,7 @@ const Vs = Ce({
|
|
|
2129
2129
|
props: Is,
|
|
2130
2130
|
emits: [gt, "select-range", "set-option"],
|
|
2131
2131
|
setup(a, { emit: n }) {
|
|
2132
|
-
const t = a, r =
|
|
2132
|
+
const t = a, r = Ve(dt), { isRange: s, format: l } = r.props, o = Pe("time"), { getHoursList: u, getMinutesList: D, getSecondsList: w } = Tn(t.disabledHours, t.disabledMinutes, t.disabledSeconds);
|
|
2133
2133
|
let C = !1;
|
|
2134
2134
|
const p = X(), M = X(), _ = X(), S = X(), h = {
|
|
2135
2135
|
hours: M,
|
|
@@ -2336,7 +2336,7 @@ const As = /* @__PURE__ */ we({
|
|
|
2336
2336
|
props: Vs,
|
|
2337
2337
|
emits: ["pick", "select-range", "set-picker-option"],
|
|
2338
2338
|
setup(a, { emit: n }) {
|
|
2339
|
-
const t = a, r =
|
|
2339
|
+
const t = a, r = Ve(dt), {
|
|
2340
2340
|
arrowControl: s,
|
|
2341
2341
|
disabledHours: l,
|
|
2342
2342
|
disabledMinutes: o,
|
|
@@ -2743,7 +2743,7 @@ var Ea = we({
|
|
|
2743
2743
|
setup(a) {
|
|
2744
2744
|
const n = Pe("date-table-cell"), {
|
|
2745
2745
|
slots: t
|
|
2746
|
-
} =
|
|
2746
|
+
} = Ve(Aa);
|
|
2747
2747
|
return () => {
|
|
2748
2748
|
const {
|
|
2749
2749
|
cell: r
|
|
@@ -3067,7 +3067,7 @@ const Js = /* @__PURE__ */ we({
|
|
|
3067
3067
|
props: Bs,
|
|
3068
3068
|
emits: ["pick", "set-picker-option", "panel-change"],
|
|
3069
3069
|
setup(a, { emit: n }) {
|
|
3070
|
-
const t = a, r = (P, ae, i) => !0, s = Pe("picker-panel"), l = Pe("date-picker"), o = Ya(), u = ua(), { t: D, lang: w } = We(), C =
|
|
3070
|
+
const t = a, r = (P, ae, i) => !0, s = Pe("picker-panel"), l = Pe("date-picker"), o = Ya(), u = ua(), { t: D, lang: w } = We(), C = Ve(dt), p = Ve(At), M = Ve(ar), { shortcuts: _, disabledDate: S, cellClassName: h, defaultTime: d } = C.props, R = Ue(C.props, "defaultValue"), N = X(), v = X(ee().locale(w.value)), b = X(!1);
|
|
3071
3071
|
let f = !1;
|
|
3072
3072
|
const g = B(() => ee(d).locale(w.value)), x = B(() => v.value.month()), V = B(() => v.value.year()), O = X([]), Y = X(null), K = X(null), z = (P) => O.value.length > 0 ? r(P, O.value, t.format || "HH:mm:ss") : !0, Q = (P) => d && !Ne.value && !b.value && !f ? g.value.year(P.year()).month(P.month()).date(P.date()) : ce.value ? P.millisecond(0) : P.startOf("day"), H = (P, ...ae) => {
|
|
3073
3073
|
if (!P)
|
|
@@ -3140,7 +3140,7 @@ const Js = /* @__PURE__ */ we({
|
|
|
3140
3140
|
}
|
|
3141
3141
|
v.value = P, H(P);
|
|
3142
3142
|
}
|
|
3143
|
-
},
|
|
3143
|
+
}, xe = B(() => S ? S(ee().locale(w.value).toDate()) : !1), Re = () => {
|
|
3144
3144
|
const ae = ee().locale(w.value).toDate();
|
|
3145
3145
|
b.value = !0, (!S || !S(ae)) && z(ae) && (v.value = ee().locale(w.value), H(v.value));
|
|
3146
3146
|
}, Ae = B(() => t.timeFormat || $n(t.format)), Ie = B(() => t.dateFormat || Cn(t.format)), Ne = B(() => {
|
|
@@ -3492,7 +3492,7 @@ const Js = /* @__PURE__ */ we({
|
|
|
3492
3492
|
text: "",
|
|
3493
3493
|
size: "small",
|
|
3494
3494
|
class: $(e(s).e("link-btn")),
|
|
3495
|
-
disabled: e(
|
|
3495
|
+
disabled: e(xe),
|
|
3496
3496
|
onClick: Re
|
|
3497
3497
|
}, {
|
|
3498
3498
|
default: re(() => [
|
|
@@ -3550,7 +3550,7 @@ const Xs = Ce({
|
|
|
3550
3550
|
unit: o,
|
|
3551
3551
|
onParsedValueChanged: u
|
|
3552
3552
|
}) => {
|
|
3553
|
-
const { emit: D } = kn(), { pickerNs: w } =
|
|
3553
|
+
const { emit: D } = kn(), { pickerNs: w } = Ve(Aa), C = Pe("date-range-picker"), { t: p, lang: M } = We(), _ = eo(M), S = X(), h = X(), d = X({
|
|
3554
3554
|
endDate: null,
|
|
3555
3555
|
selecting: !1
|
|
3556
3556
|
}), R = (g) => {
|
|
@@ -3604,7 +3604,7 @@ const Xs = Ce({
|
|
|
3604
3604
|
t: p
|
|
3605
3605
|
};
|
|
3606
3606
|
}, to = (a, n, t, r) => {
|
|
3607
|
-
const s = X("date"), l = X(), o = X("date"), u = X(), D =
|
|
3607
|
+
const s = X("date"), l = X(), o = X("date"), u = X(), D = Ve(dt), { disabledDate: w } = D.props, { t: C, lang: p } = We(), M = B(() => t.value.year()), _ = B(() => t.value.month()), S = B(() => r.value.year()), h = B(() => r.value.month());
|
|
3608
3608
|
function d(g, x) {
|
|
3609
3609
|
const V = C("el.datepicker.year");
|
|
3610
3610
|
if (g.value === "year") {
|
|
@@ -3665,7 +3665,7 @@ const Xs = Ce({
|
|
|
3665
3665
|
"panel-change"
|
|
3666
3666
|
],
|
|
3667
3667
|
setup(a, { emit: n }) {
|
|
3668
|
-
const t = a, r =
|
|
3668
|
+
const t = a, r = Ve(dt), s = Ve(At), { disabledDate: l, cellClassName: o, defaultTime: u, clearable: D } = r.props, w = Ue(r.props, "format"), C = Ue(r.props, "shortcuts"), p = Ue(r.props, "defaultValue"), { lang: M } = We(), _ = X(ee().locale(M.value)), S = X(ee().locale(M.value).add(1, Ht)), {
|
|
3669
3669
|
minDate: h,
|
|
3670
3670
|
maxDate: d,
|
|
3671
3671
|
rangeState: R,
|
|
@@ -3713,7 +3713,7 @@ const Xs = Ce({
|
|
|
3713
3713
|
handleRightMonthPick: se,
|
|
3714
3714
|
handlePanelChange: ce,
|
|
3715
3715
|
adjustDateByView: be
|
|
3716
|
-
} = to(t, n, _, S), me = B(() => !!C.value.length), Me = B(() => Y.value.min !== null ? Y.value.min : h.value ? h.value.format(Ne.value) : ""),
|
|
3716
|
+
} = to(t, n, _, S), me = B(() => !!C.value.length), Me = B(() => Y.value.min !== null ? Y.value.min : h.value ? h.value.format(Ne.value) : ""), xe = B(() => Y.value.max !== null ? Y.value.max : d.value || h.value ? (d.value || h.value).format(Ne.value) : ""), Re = B(() => K.value.min !== null ? K.value.min : h.value ? h.value.format(Ie.value) : ""), Ae = B(() => K.value.max !== null ? K.value.max : d.value || h.value ? (d.value || h.value).format(Ie.value) : ""), Ie = B(() => t.timeFormat || $n(w.value)), Ne = B(() => t.dateFormat || Cn(w.value)), tt = (W) => It(W) && (l ? !l(W[0].toDate()) && !l(W[1].toDate()) : !0), Fe = () => {
|
|
3717
3717
|
_.value = be(z.value, _.value, !1), t.unlinkPanels || (S.value = _.value.add(1, "month")), ce("year");
|
|
3718
3718
|
}, de = () => {
|
|
3719
3719
|
_.value = _.value.subtract(1, "month"), t.unlinkPanels || (S.value = _.value.add(1, "month")), ce("month");
|
|
@@ -3871,7 +3871,7 @@ const Xs = Ce({
|
|
|
3871
3871
|
class: $(e(v).e("editor")),
|
|
3872
3872
|
disabled: e(R).selecting,
|
|
3873
3873
|
placeholder: e(O)("el.datepicker.endDate"),
|
|
3874
|
-
"model-value": e(
|
|
3874
|
+
"model-value": e(xe),
|
|
3875
3875
|
readonly: !e(h),
|
|
3876
3876
|
"validate-event": !1,
|
|
3877
3877
|
onInput: (ne) => i(ne, "max"),
|
|
@@ -4247,7 +4247,7 @@ const ro = Ce({
|
|
|
4247
4247
|
props: ro,
|
|
4248
4248
|
emits: so,
|
|
4249
4249
|
setup(a, { emit: n }) {
|
|
4250
|
-
const t = a, { lang: r } = We(), s =
|
|
4250
|
+
const t = a, { lang: r } = We(), s = Ve(dt), l = Ve(At), { shortcuts: o, disabledDate: u } = s.props, D = Ue(s.props, "format"), w = Ue(s.props, "defaultValue"), C = X(ee().locale(r.value)), p = X(ee().locale(r.value).add(1, Ut)), {
|
|
4251
4251
|
minDate: M,
|
|
4252
4252
|
maxDate: _,
|
|
4253
4253
|
rangeState: S,
|
|
@@ -4477,7 +4477,7 @@ const co = Ce({
|
|
|
4477
4477
|
props: co,
|
|
4478
4478
|
emits: fo,
|
|
4479
4479
|
setup(a, { emit: n }) {
|
|
4480
|
-
const t = a, { lang: r } = We(), s = X(ee().locale(r.value)), l = X(ee().locale(r.value).add(Mt, Tt)), o =
|
|
4480
|
+
const t = a, { lang: r } = We(), s = X(ee().locale(r.value)), l = X(ee().locale(r.value).add(Mt, Tt)), o = Ve(At), u = Ve(dt), { shortcuts: D, disabledDate: w } = u.props, C = Ue(u.props, "format"), p = Ue(u.props, "defaultValue"), {
|
|
4481
4481
|
minDate: M,
|
|
4482
4482
|
maxDate: _,
|
|
4483
4483
|
rangeState: S,
|
|
@@ -5004,7 +5004,7 @@ const $o = xa(Co), Po = { slot: "body" }, _o = { class: "select-wrapper" }, Vo =
|
|
|
5004
5004
|
},
|
|
5005
5005
|
emits: ["closeWindow", "createUpdateAnnotation"],
|
|
5006
5006
|
setup(a, { emit: n }) {
|
|
5007
|
-
const t = ur(() => import("./BFLibraryButton-
|
|
5007
|
+
const t = ur(() => import("./BFLibraryButton-CjW78KwZ.js")), r = a, s = X(!1);
|
|
5008
5008
|
De(() => r.visible, (x) => {
|
|
5009
5009
|
if (s.value = x, !x) return;
|
|
5010
5010
|
const V = u.value.start / 1e3, O = u.value.end / 1e3;
|
|
@@ -5013,7 +5013,7 @@ const $o = xa(Co), Po = { slot: "body" }, _o = { class: "select-wrapper" }, Vo =
|
|
|
5013
5013
|
end: u.value.end
|
|
5014
5014
|
}, u.value.duration == 0 ? (S.value = !1, M.value = V) : (S.value = !0, M.value = [V, O]);
|
|
5015
5015
|
}, { immediate: !0 });
|
|
5016
|
-
const l = n, o = dr(), {
|
|
5016
|
+
const l = n, o = Ve("viewerStore", () => dr("default"), !0), {
|
|
5017
5017
|
activeAnnotation: u,
|
|
5018
5018
|
viewerChannels: D,
|
|
5019
5019
|
viewerAnnotations: w
|
|
@@ -5185,7 +5185,7 @@ const $o = xa(Co), Po = { slot: "body" }, _o = { class: "select-wrapper" }, Vo =
|
|
|
5185
5185
|
}, 8, ["title", "modelValue"]);
|
|
5186
5186
|
};
|
|
5187
5187
|
}
|
|
5188
|
-
}, zo = /* @__PURE__ */ cr(Ao, [["__scopeId", "data-v-
|
|
5188
|
+
}, zo = /* @__PURE__ */ cr(Ao, [["__scopeId", "data-v-23ccf03c"]]);
|
|
5189
5189
|
export {
|
|
5190
5190
|
zo as default
|
|
5191
5191
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "./base-VCnLhxie.js";
|
|
2
2
|
import { E as F } from "./el-overlay-BMUWCEw_.js";
|
|
3
|
-
import { I as g } from "./IconSelection-
|
|
3
|
+
import { I as g } from "./IconSelection-ChXlHpsu.js";
|
|
4
4
|
import { a as y, b as k } from "./el-input-DQtvBLS6.js";
|
|
5
5
|
import { E as S } from "./el-input-number-DXCID3jJ.js";
|
|
6
6
|
import { resolveComponent as P, createBlock as u, openBlock as o, withCtx as i, createElementVNode as s, createVNode as r, createElementBlock as a, toDisplayString as c, createTextVNode as d, createCommentVNode as p, Fragment as _, renderList as v } from "vue";
|
|
7
|
-
import { g as N } from "./index-
|
|
7
|
+
import { g as N } from "./index-ZGQLYYRT.js";
|
|
8
8
|
const H = {
|
|
9
9
|
name: "TimeseriesFilterModal",
|
|
10
10
|
components: {
|
|
11
|
-
"bf-library-button": () => import("./BFLibraryButton-
|
|
11
|
+
"bf-library-button": () => import("./BFLibraryButton-CjW78KwZ.js"),
|
|
12
12
|
IconSelection: g
|
|
13
13
|
},
|
|
14
14
|
mixins: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const m=require("./el-overlay-D192MFpl.cjs"),u=require("./IconSelection-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const m=require("./el-overlay-D192MFpl.cjs"),u=require("./IconSelection-BJc1giuT.cjs"),c=require("./el-input-CwVmeiqs.cjs"),f=require("./el-input-number-Cxwc3-EL.cjs"),e=require("vue"),b=require("./index-B-qad683.cjs"),V={name:"TimeseriesFilterModal",components:{"bf-library-button":()=>Promise.resolve().then(()=>require("./BFLibraryButton-DGI5G53e.cjs")),IconSelection:u.IconSelection},mixins:[],watch:{},computed:{computeVisible0:function(){switch(this.selectedFilter){case"lowpass":return!0;case"highpass":return!0;case"bandpass":return!0;default:return!1}},onSingleChannel:function(){return this.onChannels.length==1},selectedChannels:function(){return this.onChannels.length},computeVisible1:function(){switch(this.selectedFilter){case"lowpass":return!1;case"highpass":return!1;case"bandpass":return!0;default:return!1}},computeVisible2:function(){switch(this.selectedFilter){case"bandstop":return!0;default:return!1}},computePlaceholder1:function(l){switch(this.selectedFilter){case"lowpass":return"Low Pass Cutoff Frequency (Hz)";case"highpass":return"High Pass Cutoff Frequency (Hz)";case"bandpass":return"Low Pass Cutoff Frequency (Hz)";default:return""}},computePlaceholder2:function(l){switch(this.selectedFilter){case"bandpass":return"High Pass Cutoff Frequency (Hz)";default:return""}}},props:{visible:{type:Boolean,default:!1}},data:function(){return{selectedFilter:null,filterOptions:[{label:"No Filter",value:"clear"},{label:"Low Pass",value:"lowpass"},{label:"High Pass",value:"highpass"},{label:"Band Pass",value:"bandpass"},{label:"Notch",value:"bandstop"}],selectedNotch:null,notchOptions:[{label:"50Hz",value:50},{label:"60Hz",value:60}],input0:null,input1:null,onChannels:[]}},methods:{close:function(){this.$emit("closeWindow")},handleChange:function(){},onButtonClick:function(){},submitForm:function(l){this.$emit("closeWindow")}}},v={slot:"body"},g={class:"select-wrapper"},C={key:0,class:"filter-input-wrapper"},_={key:1,class:"filter-input-wrapper"},k={slot:"footer"},w={class:"button-wrapper"},N={class:"channels-selected"},B={key:0},y={key:1},F={class:"buttons"};function S(l,n,s,P,q,o){const a=c.ElOption,r=c.ElSelect,i=f.ElInputNumber,d=u.IconSelection,p=e.resolveComponent("bf-library-button"),h=m.ElDialog;return e.openBlock(),e.createBlock(h,{class:"timeseries-filter-modal",ref:"filter-modal",title:"Set Filter",modelValue:s.visible,"onUpdate:modelValue":n[4]||(n[4]=t=>s.visible=t),onClose:o.close},{default:e.withCtx(()=>[e.createElementVNode("div",v,[e.createElementVNode("div",g,[e.createVNode(r,{modelValue:l.selectedFilter,"onUpdate:modelValue":n[0]||(n[0]=t=>l.selectedFilter=t),placeholder:"Select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.filterOptions,t=>(e.openBlock(),e.createBlock(a,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o.computeVisible0?(e.openBlock(),e.createElementBlock("div",C,[e.createTextVNode(e.toDisplayString(o.computePlaceholder1)+" ",1),e.createVNode(i,{class:"filterInput",modelValue:l.input0,"onUpdate:modelValue":n[1]||(n[1]=t=>l.input0=t),"controls-position":"right",precision:2,onChange:o.handleChange},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0),o.computeVisible1?(e.openBlock(),e.createElementBlock("div",_,[e.createTextVNode(e.toDisplayString(o.computePlaceholder2)+" ",1),e.createVNode(i,{class:"filterInput",modelValue:l.input1,"onUpdate:modelValue":n[2]||(n[2]=t=>l.input1=t),"controls-position":"right",precision:2,onChange:o.handleChange},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0),o.computeVisible2?(e.openBlock(),e.createBlock(r,{key:2,modelValue:l.selectedNotch,"onUpdate:modelValue":n[3]||(n[3]=t=>l.selectedNotch=t),placeholder:"Select",class:"filter-input-wrapper"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.notchOptions,t=>(e.openBlock(),e.createBlock(a,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])])]),footer:e.withCtx(()=>[e.createElementVNode("div",k,[e.createElementVNode("div",w,[e.createElementVNode("div",N,[e.createVNode(d,{height:24,width:24}),o.onSingleChannel?(e.openBlock(),e.createElementBlock("div",B," Adding to single channel ")):(e.openBlock(),e.createElementBlock("div",y," Adding to "+e.toDisplayString(o.selectedChannels)+" Selected Channels ",1))]),e.createElementVNode("div",F,[e.createVNode(p,{onClick:o.submitForm},{default:e.withCtx(()=>[...n[5]||(n[5]=[e.createTextVNode("Set Filter ",-1)])]),_:1},8,["onClick"])])])])]),_:1},8,["modelValue","onClose"])}const E=b._export_sfc(V,[["render",S],["__scopeId","data-v-7546755f"]]);exports.default=E;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),d=require("./index-B-qad683.cjs");function se(g,u,c){return function(){for(var t=[],b=0,v=g,k=0;k<u.length||b<arguments.length;){var W;k<u.length&&(!d._isPlaceholder(u[k])||b>=arguments.length)?W=u[k]:(W=arguments[b],b+=1),t[k]=W,d._isPlaceholder(W)||(v-=1),k+=1}return v<=0?c.apply(this,t):d._arity(v,se(g,t,c))}}var Te=d._curry2(function(u,c){return u===1?d._curry1(c):d._arity(u,se(u,[],c))});function ye(g,u){for(var c=0,t=u.length,b=Array(t);c<t;)b[c]=g(u[c]),c+=1;return b}var Ce=(function(){function g(u,c){this.xf=c,this.f=u}return g.prototype["@@transducer/init"]=d._xfBase.init,g.prototype["@@transducer/result"]=d._xfBase.result,g.prototype["@@transducer/step"]=function(u,c){return this.xf["@@transducer/step"](u,this.f(c))},g})(),xe=d._curry2(function(u,c){return new Ce(u,c)}),ke=d._curry2(d._dispatchable(["fantasy-land/map","map"],xe,function(u,c){switch(Object.prototype.toString.call(c)){case"[object Function]":return Te(c.length,function(){return u.call(this,c.apply(this,arguments))});case"[object Object]":return d._reduce(function(t,b){return t[b]=u(c[b]),t},{},d.keys(c));default:return ye(u,c)}}));const We={class:"timeseries-scrubber"},Ee={class:"dateWrap"},Ne={class:"noselect"},Pe={id:"scrubber",noselect:""},Re=["width","height"],Ae=["width","height"],Me=["width","height"],Ve={__name:"TSScrubber",props:{ts_start:Number,ts_end:Number,cWidth:Number,constants:Object,start:Number,duration:Number,cursorLoc:Number,labelWidth:Number,activeViewer:Object},emits:["setStart"],setup(g,{expose:u,emit:c}){const t=g,b=c,v=a.inject("viewerStore",()=>d.createViewerStore("default"),!0),k=a.ref(null),W=a.ref(null),j=a.ref(null),T=a.ref(null),f=a.ref(1),F=a.ref(28),y=a.ref(30),D=a.ref(!1),M=a.ref(""),I=a.ref("point"),G=a.ref(null),A=a.ref([]),w=a.ref([]),C=a.ref([]),$=a.ref(!1),J=a.ref(0),K=a.ref(0),E=a.ref(0),U=a.ref(0),oe=a.computed(()=>ee(t.ts_start)),ie=a.computed(()=>ee(t.ts_end)),le=a.computed(()=>{if(M.value!=="")return M.value;if(t.start>0){const n=new Date(t.start/1e3).toUTCString();return n.substring(0,n.length-3)}return""}),Q=a.computed(()=>({width:t.labelWidth+t.cWidth-8+5+"px",height:"28px"})),ce=a.computed(()=>({width:t.labelWidth+t.cWidth-8+5+"px",height:"30px"})),ue=a.computed(()=>t.cWidth+t.labelWidth-8+5),ve=a.computed(()=>Math.floor((t.ts_end-t.ts_start)/t.cWidth));a.watch(()=>t.start,()=>{N()}),a.watch(()=>t.duration,()=>{N()}),a.watch(()=>t.cWidth,()=>{N()}),a.watch(()=>t.activeViewer,(n,e)=>{var r;n&&n!==e&&(console.log("TSScrubber: ActiveViewer changed, resetting component state"),$.value=!0,Y(),(r=n.content)!=null&&r.id?a.nextTick(()=>{z(),$.value=!1}):$.value=!1)},{deep:!0}),a.watch(()=>v.viewerChannels,(n,e)=>{var r,o;n&&n.length>0&&!$.value&&(!e||n.length!==e.length||((r=n[0])==null?void 0:r.id)!==((o=e[0])==null?void 0:o.id))&&(console.log("TSScrubber: Viewer channels changed, re-initializing segments"),X(),a.nextTick(()=>{te()}))},{deep:!0}),a.watch(()=>v.viewerAnnotations,(n,e)=>{var r;n&&n!==e&&!$.value?(console.log("TSScrubber: Viewer annotations changed independently, re-fetching annotations"),a.nextTick(()=>{z()})):n&&n.length>0&&!e&&((r=t.activeViewer)!=null&&r.content.id)&&(console.log("TSScrubber: Annotation layers now available, fetching annotations"),a.nextTick(()=>{z()}))},{deep:!0});const Y=()=>{console.log("TSScrubber: Resetting component state"),A.value=[],X(),D.value=!1,M.value="",I.value="point",Z()},X=()=>{console.log("TSScrubber: Resetting segment state"),C.value=new Array(5e3),C.value=C.value.fill(0,0,4999),w.value=[]},Z=()=>{a.nextTick(()=>{[W.value,j.value,T.value].forEach(e=>{if(e){const r=e.getContext("2d");r&&r.clearRect(0,0,e.width,e.height)}})})},V=(n,e,r)=>e*(n+r),de=()=>{const n=T.value.getContext("2d"),e=window.devicePixelRatio||1,r=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;return e/r},ee=n=>{if(n>0)return n=n/1e3,n=new Date(n),("0"+n.getUTCHours()).slice(-2)+":"+("0"+n.getUTCMinutes()).slice(-2)+":"+("0"+n.getUTCSeconds()).slice(-2)},ge=n=>{if(D.value){const r=(n.clientX-J.value)/t.cWidth*(t.ts_end-t.ts_start),o=K.value+r;b("setStart",o);const s=new Date((r+t.ts_start)/1e3);M.value=s.toUTCString()}else{const e=T.value.getBoundingClientRect(),r=n.clientX-e.left,o=E.value+U.value,s=I.value;r>E.value-10&&r<o+10?(I.value="drag",T.value.setAttribute("dragme",!0),T.value.removeAttribute("resizeme")):(I.value="point",T.value.removeAttribute("dragme"),T.value.removeAttribute("resizeme"));const i=r/t.cWidth*(t.ts_end-t.ts_start)+t.ts_start,_=new Date(i/1e3).toUTCString();M.value=_.substring(0,_.length-3),s!==I.value&&N()}},fe=()=>{D.value=!1},he=n=>{D.value=!0;const e=T.value.getBoundingClientRect(),r=n.clientX-e.left;J.value=n.clientX;const o=r/ue.value*(t.ts_end-t.ts_start);b("setStart",o+t.ts_start),K.value=o+t.ts_start},me=()=>{D.value=!1},Se=()=>{M.value=""},te=()=>{var r;if(!v.viewerChannels||v.viewerChannels.length===0){console.warn("TSScrubber: Cannot init segment spans - no viewer channels available");return}if(!t.ts_start||!t.ts_end){console.warn("TSScrubber: Cannot init segment spans - invalid time range");return}if(!((r=v.config)!=null&&r.timeSeriesApi)){console.warn("TSScrubber: Cannot init segment spans - no timeSeriesApi configured");return}console.log(`TSScrubber: Initializing segment spans for ${v.viewerChannels.length} channels`),X();const n=Math.min(t.constants.SEGMENTSPAN,t.ts_end-t.ts_start),e=v.viewerChannels;for(let o=0;o<e.length;o++)ne(e[o].id,o,t.ts_start,t.ts_start+n,0)},ne=async(n,e,r,o,s)=>{var i;const l=t.constants.MAXRECURSION;if(!((i=v.config)!=null&&i.timeSeriesApi)){console.warn("TSScrubber: Cannot request segment span - no timeSeriesApi configured");return}if(!n){console.warn("TSScrubber: Cannot request segment span - no channel ID provided");return}try{const _=await d.useToken(),h=`${v.config.timeSeriesApi}/ts/retrieve/segments?session=${_}&channel=${n}&start=${r}&end=${o}`;console.log(`TSScrubber: Fetching segments for channel ${n} (${e})`);const S=await d.useSendXhr(h);if(!v.viewerChannels[e]||v.viewerChannels[e].id!==n){console.warn("TSScrubber: Channel mismatch detected, ignoring segment response (likely package switched)");return}let m=new Array(S.length*2),p=0;for(let R=0;R<S.length;R++){m[p]=S[R][0],m[p+1]=S[R][1],p=p+2;const q=Math.floor((S[R][0]-t.ts_start)/(t.ts_end-t.ts_start)*5e3),we=Math.ceil((S[R][1]-t.ts_start)/(t.ts_end-t.ts_start)*5e3);C.value.fill(1,q,we)}let x=0,O=!1,L=0;for(w.value=[];x<C.value.length-1;){if(!C.value[x]&&!O){x++;continue}else C.value[x]?O||(L=x,O=!0):(w.value=w.value.concat([L,x]),O=!1);x++}O&&(w.value=w.value.concat([L,x])),w.value=w.value.concat([5e3]);let _e=m[0],P=v.viewerChannels[e];if(!P||P.id!==n){console.warn("TSScrubber: Channel configuration mismatch, skipping update");return}_e<P.dataSegments[P.dataSegments.length-1]&&(m.shift(),m.shift()),P.dataSegments=P.dataSegments.concat(m.sort((R,q)=>R-q)),v.updateChannelProperty(P.id,"dataSegments",P.dataSegments);let re=o-r;r+re<t.ts_end&&s<l?ne(n,e,o,o+re,s+1):H()}catch(_){console.error(`TSScrubber: Error fetching segments for channel ${n}:`,_),d.useHandleXhrError(_)}},z=async()=>{var e,r,o;const n=(e=t.activeViewer)==null?void 0:e.content.id;if(!n){console.warn("TSScrubber: Cannot get annotations - no active viewer ID"),A.value=[];return}if(!((r=v.config)!=null&&r.apiUrl)){console.warn("TSScrubber: Cannot get annotations - no API URL configured"),A.value=[];return}if(!v.viewerAnnotations||v.viewerAnnotations.length===0){console.log("TSScrubber: No annotation layers available, skipping annotation fetch"),A.value=[],N();return}try{const s=await d.useToken(),l=ke(m=>m.id,v.viewerAnnotations),i=t.ts_end;let h=`${v.config.apiUrl}/timeseries/${n}/annotations/window`+`?api_key=${s}&aggregation=count&start=${t.ts_start}&end=${t.ts_end}&period=${ve.value}&mergePeriods=true`;for(let m in l)h=h+`&layerIds=${l[m]}`;console.log(`TSScrubber: Fetching annotations for viewer ${n}`);const S=await d.useSendXhr(h);((o=t.activeViewer)==null?void 0:o.content.id)===n?(A.value=S,N()):console.log("TSScrubber: Ignoring annotation response - viewer changed during fetch")}catch(s){console.error("TSScrubber: Error fetching annotations:",s),A.value=[],d.useHandleXhrError(s),N()}},N=()=>{B(),ae(),H()},B=()=>{a.nextTick(()=>{const n=T.value;if(!n){console.warn("iCanvas ref is missing, skipping render");return}const e=n.getContext("2d");if(!e){console.warn("2D context is not available");return}e.setTransform(f.value,0,0,f.value,0,0),e.clearRect(0,0,t.cWidth,y.value),E.value=(t.start-t.ts_start)/(t.ts_end-t.ts_start)*t.cWidth+.5|0,U.value=t.duration/(t.ts_end-t.ts_start)*t.cWidth+.5|0,e.fillStyle="rgb(80,80,80)",e.strokeStyle="rgb(80,80,80)",e.strokeRect(E.value+.5,.5,U.value,y.value-1),e.fillRect(E.value-2,y.value/2-5|0,2,10),e.fillRect(E.value+U.value+1,y.value/2-5|0,2,10);const r=E.value+t.cursorLoc*U.value;r>E.value+.5&&(e.strokeStyle="red",e.beginPath(),e.moveTo(r,0),e.lineTo(r,y.value-1),e.stroke())})},H=()=>{a.nextTick(()=>{const n=W.value;if(!n){console.warn("segmentsCanvas ref is missing, skipping renderSegments");return}const e=n.getContext("2d");if(!e){console.warn("Unable to get 2D context for segmentsCanvas, skipping renderSegments");return}e.setTransform(f.value,0,0,f.value,0,0),e.fillStyle=e.createPattern(G.value,"repeat"),e.clearRect(0,0,t.cWidth,y.value);for(let r=1;r<w.value.length;r+=2){const o=t.cWidth*w.value[r]/5e3,s=t.cWidth*w.value[r+1]/5e3;e.fillRect(o,2,s-o,y.value-6)}})},ae=()=>{const n=j.value;if(!n){console.warn("annotationCanvas ref is missing, skipping renderTimelimeLine");return}const e=n.getContext("2d");if(!e){console.warn("Unable to get 2D context for annotationCanvas, skipping renderTimelimeLine");return}e.setTransform(f.value,0,0,f.value,0,0),e.clearRect(0,0,t.cWidth,F.value);const r=t.ts_start,o=t.ts_end,s=A.value;let l=0;const i=0,_=Math.floor((F.value-2)/Object.keys(s).length-i),h=v.viewerAnnotations;let S="rgb(0,0,0)";for(const m in s)if(s.hasOwnProperty(m)){for(let p=0;p<h.length;p++)if(h[p].id===parseInt(m)){l=p,S=h[p].color;break}pe(e,r,o,i,_,s[m],l,S)}},pe=(n,e,r,o,s,l,i,_)=>{a.nextTick(()=>{n.setTransform(f.value,0,0,f.value,0,0),n.fillStyle=_;for(let h=0;h<l.length;h++)if(l[h].value>0){const S=(l[h].start-e)/(r-e)*t.cWidth;let p=(l[h].end-e)/(r-e)*t.cWidth-S;p<1&&(p=1);const x=1+i*(s-1+o)+i;n.fillRect(S,x,p,s)}})},be=()=>{const n=document.createElement("canvas"),e=n.getContext("2d",{antialias:!0}),r="rgb(220,220,220)",o=5,s=o,l=o,i=10;return n.width=s,n.height=l,e.fillStyle=r,e.beginPath(),e.moveTo(0,l*(1/i)),e.lineTo(s*(1/i),0),e.lineTo(0,0),e.lineTo(0,l*(1/i)),e.fill(),e.beginPath(),e.moveTo(s,l*(1/i)),e.lineTo(s*(1/i),l),e.lineTo(0,l),e.lineTo(0,l*((i-1)/i)),e.lineTo(s*((i-1)/i),0),e.lineTo(s,0),e.lineTo(s,l*(1/i)),e.fill(),e.beginPath(),e.moveTo(s,l*((i-1)/i)),e.lineTo(s*((i-1)/i),l),e.lineTo(s,l),e.lineTo(s,l*((i-1)/i)),e.fill(),n};return a.onMounted(()=>{C.value=new Array(5e3),C.value=C.value.fill(0,0,4999),f.value=de(),G.value=be(),B()}),u({getAnnotations:z,initSegmentSpans:te,render:N,renderViewPort:B,renderSegments:H,renderTimelimeLine:ae,resetComponentState:Y,resetSegmentState:X,clearCanvases:Z}),(n,e)=>(a.openBlock(),a.createElementBlock("div",We,[a.createElementVNode("div",Ee,[a.createElementVNode("div",null,a.toDisplayString(oe.value),1),a.createElementVNode("div",null,a.toDisplayString(le.value),1),a.createElementVNode("div",null,a.toDisplayString(ie.value),1)]),a.createElementVNode("div",Ne,[a.createElementVNode("div",Pe,[a.createElementVNode("div",{id:"canvasWrap",ref_key:"canvasWrap",ref:k},[a.createElementVNode("canvas",{id:"segmentsCanvas",class:"canvas",ref_key:"segmentsCanvas",ref:W,width:V(g.cWidth,f.value,0),height:V(y.value-2,f.value,0),style:a.normalizeStyle(Q.value)},null,12,Re),a.createElementVNode("canvas",{id:"annotationCanvas",class:"canvas",ref_key:"annotationCanvas",ref:j,width:V(g.cWidth,f.value,0),height:V(y.value-2,f.value,0),style:a.normalizeStyle(Q.value)},null,12,Ae),a.createElementVNode("canvas",{id:"iCanvas",class:"canvas",ref_key:"iCanvas",ref:T,width:V(g.cWidth,f.value,0),height:V(y.value,f.value,0),onClick:e[0]||(e[0]=(...r)=>n._onTap&&n._onTap(...r)),onMousemove:ge,onMousedown:he,onMouseup:fe,onMouseenter:me,onMouseout:Se,style:a.normalizeStyle(ce.value)},null,44,Me)],512)])])]))}},De=d._export_sfc(Ve,[["__scopeId","data-v-e01e61cc"]]);exports.default=De;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as v, computed as N, watch as U, nextTick as E, onMounted as
|
|
2
|
-
import { _ as ve, a as Se, b as Y, c as
|
|
1
|
+
import { inject as Ne, ref as v, computed as N, watch as U, nextTick as E, onMounted as Ie, createElementBlock as $e, openBlock as Ue, createElementVNode as x, toDisplayString as K, normalizeStyle as Q } from "vue";
|
|
2
|
+
import { _ as ve, a as Se, b as Y, c as Ve, d as ge, e as Oe, f as je, k as Le, g as Xe, h as ze, u as de, i as fe, j as he } from "./index-ZGQLYYRT.js";
|
|
3
3
|
function me(g, c, l) {
|
|
4
4
|
return function() {
|
|
5
5
|
for (var t = [], p = 0, u = g, k = 0; k < c.length || p < arguments.length; ) {
|
|
@@ -9,43 +9,43 @@ function me(g, c, l) {
|
|
|
9
9
|
return u <= 0 ? l.apply(this, t) : Se(u, me(g, t, l));
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
13
|
-
return c === 1 ?
|
|
12
|
+
var Be = /* @__PURE__ */ Y(function(c, l) {
|
|
13
|
+
return c === 1 ? Ve(l) : Se(c, me(c, [], l));
|
|
14
14
|
});
|
|
15
|
-
function
|
|
15
|
+
function He(g, c) {
|
|
16
16
|
for (var l = 0, t = c.length, p = Array(t); l < t; )
|
|
17
17
|
p[l] = g(c[l]), l += 1;
|
|
18
18
|
return p;
|
|
19
19
|
}
|
|
20
|
-
var
|
|
20
|
+
var qe = /* @__PURE__ */ (function() {
|
|
21
21
|
function g(c, l) {
|
|
22
22
|
this.xf = l, this.f = c;
|
|
23
23
|
}
|
|
24
24
|
return g.prototype["@@transducer/init"] = ge.init, g.prototype["@@transducer/result"] = ge.result, g.prototype["@@transducer/step"] = function(c, l) {
|
|
25
25
|
return this.xf["@@transducer/step"](c, this.f(l));
|
|
26
26
|
}, g;
|
|
27
|
-
})(),
|
|
28
|
-
return new
|
|
29
|
-
}),
|
|
30
|
-
/* @__PURE__ */
|
|
27
|
+
})(), Fe = /* @__PURE__ */ Y(function(c, l) {
|
|
28
|
+
return new qe(c, l);
|
|
29
|
+
}), Ge = /* @__PURE__ */ Y(
|
|
30
|
+
/* @__PURE__ */ Oe(["fantasy-land/map", "map"], Fe, function(c, l) {
|
|
31
31
|
switch (Object.prototype.toString.call(l)) {
|
|
32
32
|
case "[object Function]":
|
|
33
|
-
return
|
|
33
|
+
return Be(l.length, function() {
|
|
34
34
|
return c.call(this, l.apply(this, arguments));
|
|
35
35
|
});
|
|
36
36
|
case "[object Object]":
|
|
37
|
-
return
|
|
37
|
+
return je(function(t, p) {
|
|
38
38
|
return t[p] = c(l[p]), t;
|
|
39
39
|
}, {}, Le(l));
|
|
40
40
|
default:
|
|
41
|
-
return
|
|
41
|
+
return He(c, l);
|
|
42
42
|
}
|
|
43
43
|
})
|
|
44
44
|
);
|
|
45
|
-
const
|
|
45
|
+
const Je = { class: "timeseries-scrubber" }, Ke = { class: "dateWrap" }, Qe = { class: "noselect" }, Ye = {
|
|
46
46
|
id: "scrubber",
|
|
47
47
|
noselect: ""
|
|
48
|
-
},
|
|
48
|
+
}, Ze = ["width", "height"], et = ["width", "height"], tt = ["width", "height"], nt = {
|
|
49
49
|
__name: "TSScrubber",
|
|
50
50
|
props: {
|
|
51
51
|
ts_start: Number,
|
|
@@ -60,7 +60,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
60
60
|
},
|
|
61
61
|
emits: ["setStart"],
|
|
62
62
|
setup(g, { expose: c, emit: l }) {
|
|
63
|
-
const t = g, p = l, u =
|
|
63
|
+
const t = g, p = l, u = Ne("viewerStore", () => ze("default"), !0), k = v(null), W = v(null), H = v(null), w = v(null), d = v(1), Z = v(28), T = v(30), V = v(!1), I = v(""), O = v("point"), ee = v(null), D = v([]), _ = v([]), C = v([]), j = v(!1), te = v(0), ne = v(0), R = v(0), L = v(0), pe = N(() => oe(t.ts_start)), be = N(() => oe(t.ts_end)), _e = N(() => {
|
|
64
64
|
if (I.value !== "")
|
|
65
65
|
return I.value;
|
|
66
66
|
if (t.start > 0) {
|
|
@@ -83,17 +83,17 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
83
83
|
A();
|
|
84
84
|
}), U(() => t.activeViewer, (n, e) => {
|
|
85
85
|
var a;
|
|
86
|
-
n && n !== e && (console.log("TSScrubber: ActiveViewer changed, resetting component state"),
|
|
87
|
-
B(),
|
|
88
|
-
}) :
|
|
86
|
+
n && n !== e && (console.log("TSScrubber: ActiveViewer changed, resetting component state"), j.value = !0, se(), (a = n.content) != null && a.id ? E(() => {
|
|
87
|
+
B(), j.value = !1;
|
|
88
|
+
}) : j.value = !1);
|
|
89
89
|
}, { deep: !0 }), U(() => u.viewerChannels, (n, e) => {
|
|
90
90
|
var a, r;
|
|
91
|
-
n && n.length > 0 && !
|
|
91
|
+
n && n.length > 0 && !j.value && (!e || n.length !== e.length || ((a = n[0]) == null ? void 0 : a.id) !== ((r = e[0]) == null ? void 0 : r.id)) && (console.log("TSScrubber: Viewer channels changed, re-initializing segments"), z(), E(() => {
|
|
92
92
|
ie();
|
|
93
93
|
}));
|
|
94
94
|
}, { deep: !0 }), U(() => u.viewerAnnotations, (n, e) => {
|
|
95
95
|
var a;
|
|
96
|
-
n && n !== e && !
|
|
96
|
+
n && n !== e && !j.value ? (console.log("TSScrubber: Viewer annotations changed independently, re-fetching annotations"), E(() => {
|
|
97
97
|
B();
|
|
98
98
|
})) : n && n.length > 0 && !e && ((a = t.activeViewer) != null && a.content.id) && (console.log("TSScrubber: Annotation layers now available, fetching annotations"), E(() => {
|
|
99
99
|
B();
|
|
@@ -125,7 +125,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
125
125
|
const s = new Date((a + t.ts_start) / 1e3);
|
|
126
126
|
I.value = s.toUTCString();
|
|
127
127
|
} else {
|
|
128
|
-
const e = w.value.getBoundingClientRect(), a = n.clientX - e.left, r = R.value +
|
|
128
|
+
const e = w.value.getBoundingClientRect(), a = n.clientX - e.left, r = R.value + L.value, s = O.value;
|
|
129
129
|
a > R.value - 10 && a < r + 10 ? (O.value = "drag", w.value.setAttribute("dragme", !0), w.value.removeAttribute("resizeme")) : (O.value = "point", w.value.removeAttribute("dragme"), w.value.removeAttribute("resizeme"));
|
|
130
130
|
const o = a / t.cWidth * (t.ts_end - t.ts_start) + t.ts_start, b = new Date(o / 1e3).toUTCString();
|
|
131
131
|
I.value = b.substring(0, b.length - 3), s !== O.value && A();
|
|
@@ -185,15 +185,15 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
185
185
|
const J = Math.floor((S[M][0] - t.ts_start) / (t.ts_end - t.ts_start) * 5e3), De = Math.ceil((S[M][1] - t.ts_start) / (t.ts_end - t.ts_start) * 5e3);
|
|
186
186
|
C.value.fill(1, J, De);
|
|
187
187
|
}
|
|
188
|
-
let y = 0,
|
|
188
|
+
let y = 0, X = !1, G = 0;
|
|
189
189
|
for (_.value = []; y < C.value.length - 1; ) {
|
|
190
|
-
if (!C.value[y] && !
|
|
190
|
+
if (!C.value[y] && !X) {
|
|
191
191
|
y++;
|
|
192
192
|
continue;
|
|
193
|
-
} else C.value[y] ?
|
|
193
|
+
} else C.value[y] ? X || (G = y, X = !0) : (_.value = _.value.concat([G, y]), X = !1);
|
|
194
194
|
y++;
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
X && (_.value = _.value.concat([G, y])), _.value = _.value.concat([5e3]);
|
|
197
197
|
let Ee = h[0], P = u.viewerChannels[e];
|
|
198
198
|
if (!P || P.id !== n) {
|
|
199
199
|
console.warn("TSScrubber: Channel configuration mismatch, skipping update");
|
|
@@ -221,7 +221,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
221
221
|
return;
|
|
222
222
|
}
|
|
223
223
|
try {
|
|
224
|
-
const s = await de(), i =
|
|
224
|
+
const s = await de(), i = Ge((h) => h.id, u.viewerAnnotations), o = t.ts_end;
|
|
225
225
|
let f = `${u.config.apiUrl}/timeseries/${n}/annotations/window` + `?api_key=${s}&aggregation=count&start=${t.ts_start}&end=${t.ts_end}&period=${Ce.value}&mergePeriods=true`;
|
|
226
226
|
for (let h in i)
|
|
227
227
|
f = f + `&layerIds=${i[h]}`;
|
|
@@ -245,8 +245,8 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
245
245
|
console.warn("2D context is not available");
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
-
e.setTransform(d.value, 0, 0, d.value, 0, 0), e.clearRect(0, 0, t.cWidth, T.value), R.value = (t.start - t.ts_start) / (t.ts_end - t.ts_start) * t.cWidth + 0.5 | 0,
|
|
249
|
-
const a = R.value + t.cursorLoc *
|
|
248
|
+
e.setTransform(d.value, 0, 0, d.value, 0, 0), e.clearRect(0, 0, t.cWidth, T.value), R.value = (t.start - t.ts_start) / (t.ts_end - t.ts_start) * t.cWidth + 0.5 | 0, L.value = t.duration / (t.ts_end - t.ts_start) * t.cWidth + 0.5 | 0, e.fillStyle = "rgb(80,80,80)", e.strokeStyle = "rgb(80,80,80)", e.strokeRect(R.value + 0.5, 0.5, L.value, T.value - 1), e.fillRect(R.value - 2, T.value / 2 - 5 | 0, 2, 10), e.fillRect(R.value + L.value + 1, T.value / 2 - 5 | 0, 2, 10);
|
|
249
|
+
const a = R.value + t.cursorLoc * L.value;
|
|
250
250
|
a > R.value + 0.5 && (e.strokeStyle = "red", e.beginPath(), e.moveTo(a, 0), e.lineTo(a, T.value - 1), e.stroke());
|
|
251
251
|
});
|
|
252
252
|
}, F = () => {
|
|
@@ -308,7 +308,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
308
308
|
const n = document.createElement("canvas"), e = n.getContext("2d", { antialias: !0 }), a = "rgb(220,220,220)", r = 5, s = r, i = r, o = 10;
|
|
309
309
|
return n.width = s, n.height = i, e.fillStyle = a, e.beginPath(), e.moveTo(0, i * (1 / o)), e.lineTo(s * (1 / o), 0), e.lineTo(0, 0), e.lineTo(0, i * (1 / o)), e.fill(), e.beginPath(), e.moveTo(s, i * (1 / o)), e.lineTo(s * (1 / o), i), e.lineTo(0, i), e.lineTo(0, i * ((o - 1) / o)), e.lineTo(s * ((o - 1) / o), 0), e.lineTo(s, 0), e.lineTo(s, i * (1 / o)), e.fill(), e.beginPath(), e.moveTo(s, i * ((o - 1) / o)), e.lineTo(s * ((o - 1) / o), i), e.lineTo(s, i), e.lineTo(s, i * ((o - 1) / o)), e.fill(), n;
|
|
310
310
|
};
|
|
311
|
-
return
|
|
311
|
+
return Ie(() => {
|
|
312
312
|
C.value = new Array(5e3), C.value = C.value.fill(0, 0, 4999), d.value = ye(), ee.value = Me(), q();
|
|
313
313
|
}), c({
|
|
314
314
|
getAnnotations: B,
|
|
@@ -320,14 +320,14 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
320
320
|
resetComponentState: se,
|
|
321
321
|
resetSegmentState: z,
|
|
322
322
|
clearCanvases: re
|
|
323
|
-
}), (n, e) => (
|
|
324
|
-
x("div",
|
|
323
|
+
}), (n, e) => (Ue(), $e("div", Je, [
|
|
324
|
+
x("div", Ke, [
|
|
325
325
|
x("div", null, K(pe.value), 1),
|
|
326
326
|
x("div", null, K(_e.value), 1),
|
|
327
327
|
x("div", null, K(be.value), 1)
|
|
328
328
|
]),
|
|
329
|
-
x("div",
|
|
330
|
-
x("div",
|
|
329
|
+
x("div", Qe, [
|
|
330
|
+
x("div", Ye, [
|
|
331
331
|
x("div", {
|
|
332
332
|
id: "canvasWrap",
|
|
333
333
|
ref_key: "canvasWrap",
|
|
@@ -341,7 +341,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
341
341
|
width: $(g.cWidth, d.value, 0),
|
|
342
342
|
height: $(T.value - 2, d.value, 0),
|
|
343
343
|
style: Q(ae.value)
|
|
344
|
-
}, null, 12,
|
|
344
|
+
}, null, 12, Ze),
|
|
345
345
|
x("canvas", {
|
|
346
346
|
id: "annotationCanvas",
|
|
347
347
|
class: "canvas",
|
|
@@ -350,7 +350,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
350
350
|
width: $(g.cWidth, d.value, 0),
|
|
351
351
|
height: $(T.value - 2, d.value, 0),
|
|
352
352
|
style: Q(ae.value)
|
|
353
|
-
}, null, 12,
|
|
353
|
+
}, null, 12, et),
|
|
354
354
|
x("canvas", {
|
|
355
355
|
id: "iCanvas",
|
|
356
356
|
class: "canvas",
|
|
@@ -365,13 +365,13 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
365
365
|
onMouseenter: Re,
|
|
366
366
|
onMouseout: Ae,
|
|
367
367
|
style: Q(we.value)
|
|
368
|
-
}, null, 44,
|
|
368
|
+
}, null, 44, tt)
|
|
369
369
|
], 512)
|
|
370
370
|
])
|
|
371
371
|
])
|
|
372
372
|
]));
|
|
373
373
|
}
|
|
374
|
-
},
|
|
374
|
+
}, rt = /* @__PURE__ */ Xe(nt, [["__scopeId", "data-v-e01e61cc"]]);
|
|
375
375
|
export {
|
|
376
|
-
|
|
376
|
+
rt as default
|
|
377
377
|
};
|