tsviewer 1.0.31 → 1.0.33
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 +3 -11
- package/dist/{BFLibraryButton-Cogtl8Vh.mjs → BFLibraryButton-CUTVuQul.mjs} +1 -1
- package/dist/{IconSelection-Bs00CxIF.mjs → IconSelection-DLam7boT.mjs} +1 -1
- package/dist/{TSAnnotationCanvas-HQV-UW-j.mjs → TSAnnotationCanvas-DF-8it3n.mjs} +3 -3
- package/dist/{TSAnnotationModal-CboTV3Bd.mjs → TSAnnotationModal-BdY0Hlvv.mjs} +3 -3
- package/dist/{TSFilterModal-BiX6ocf2.mjs → TSFilterModal-D-iGQpuh.mjs} +3 -3
- package/dist/{TSScrubber-D04stxRB.mjs → TSScrubber-Dby56vNH.mjs} +1 -1
- package/dist/{TSViewerCanvas-7tyEpUbF.mjs → TSViewerCanvas-DdXL6ec8.mjs} +4 -4
- package/dist/{TSViewerLayerWindow-ChwzPfuz.mjs → TSViewerLayerWindow-DiM4ubPl.mjs} +2 -2
- package/dist/{TSViewerToolbar-BHvdhd1h.mjs → TSViewerToolbar-bujnuU5I.mjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-D4aggIW6.mjs → TsAnnotationDeleteDialog-C6cO4tc8.mjs} +3 -3
- package/dist/{index-BXlfFRwy.mjs → index-BZlDr3yB.mjs} +432 -442
- package/dist/{pathOr-1B5szOyh.mjs → pathOr-B7jLfMU4.mjs} +1 -1
- package/dist/tsviewer.css +1 -1
- package/dist/tsviewer.es.js +1 -1
- package/dist/tsviewer.umd.js +6 -6
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as y, computed as z, defineAsyncComponent as
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import { fetchAuthSession as
|
|
4
|
-
function
|
|
1
|
+
import { reactive as kt, ref as y, computed as z, defineAsyncComponent as J, watch as Ie, nextTick as re, onMounted as Dt, onBeforeUnmount as Lt, createElementBlock as Ce, openBlock as fe, normalizeClass as _e, createVNode as oe, createElementVNode as ce, createBlock as Nt, createCommentVNode as Rt, unref as Y, Fragment as jt, renderList as Ut, toDisplayString as Ve } from "vue";
|
|
2
|
+
import { defineStore as Vt, storeToRefs as Je } from "pinia";
|
|
3
|
+
import { fetchAuthSession as Mt } from "aws-amplify/auth";
|
|
4
|
+
function T(t) {
|
|
5
5
|
return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
|
|
6
6
|
}
|
|
7
7
|
function k(t) {
|
|
8
8
|
return function e(n) {
|
|
9
|
-
return arguments.length === 0 ||
|
|
9
|
+
return arguments.length === 0 || T(n) ? e : t.apply(this, arguments);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
function N(t) {
|
|
@@ -15,19 +15,19 @@ function N(t) {
|
|
|
15
15
|
case 0:
|
|
16
16
|
return e;
|
|
17
17
|
case 1:
|
|
18
|
-
return
|
|
18
|
+
return T(n) ? e : k(function(i) {
|
|
19
19
|
return t(n, i);
|
|
20
20
|
});
|
|
21
21
|
default:
|
|
22
|
-
return
|
|
22
|
+
return T(n) && T(o) ? e : T(n) ? k(function(i) {
|
|
23
23
|
return t(i, o);
|
|
24
|
-
}) :
|
|
24
|
+
}) : T(o) ? k(function(i) {
|
|
25
25
|
return t(n, i);
|
|
26
26
|
}) : t(n, o);
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Wt(t, e) {
|
|
31
31
|
t = t || [], e = e || [];
|
|
32
32
|
var n, o = t.length, i = e.length, u = [];
|
|
33
33
|
for (n = 0; n < o; )
|
|
@@ -36,7 +36,7 @@ function qt(t, e) {
|
|
|
36
36
|
u[u.length] = e[n], n += 1;
|
|
37
37
|
return u;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Oe(t, e) {
|
|
40
40
|
switch (t) {
|
|
41
41
|
case 0:
|
|
42
42
|
return function() {
|
|
@@ -86,58 +86,58 @@ function Ee(t, e) {
|
|
|
86
86
|
throw new Error("First argument to _arity must be a non-negative integer no greater than ten");
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function ye(t) {
|
|
90
90
|
return function e(n, o, i) {
|
|
91
91
|
switch (arguments.length) {
|
|
92
92
|
case 0:
|
|
93
93
|
return e;
|
|
94
94
|
case 1:
|
|
95
|
-
return
|
|
95
|
+
return T(n) ? e : N(function(u, g) {
|
|
96
96
|
return t(n, u, g);
|
|
97
97
|
});
|
|
98
98
|
case 2:
|
|
99
|
-
return
|
|
99
|
+
return T(n) && T(o) ? e : T(n) ? N(function(u, g) {
|
|
100
100
|
return t(u, o, g);
|
|
101
|
-
}) :
|
|
101
|
+
}) : T(o) ? N(function(u, g) {
|
|
102
102
|
return t(n, u, g);
|
|
103
103
|
}) : k(function(u) {
|
|
104
104
|
return t(n, o, u);
|
|
105
105
|
});
|
|
106
106
|
default:
|
|
107
|
-
return
|
|
107
|
+
return T(n) && T(o) && T(i) ? e : T(n) && T(o) ? N(function(u, g) {
|
|
108
108
|
return t(u, g, i);
|
|
109
|
-
}) :
|
|
109
|
+
}) : T(n) && T(i) ? N(function(u, g) {
|
|
110
110
|
return t(u, o, g);
|
|
111
|
-
}) :
|
|
111
|
+
}) : T(o) && T(i) ? N(function(u, g) {
|
|
112
112
|
return t(n, u, g);
|
|
113
|
-
}) :
|
|
113
|
+
}) : T(n) ? k(function(u) {
|
|
114
114
|
return t(u, o, i);
|
|
115
|
-
}) :
|
|
115
|
+
}) : T(o) ? k(function(u) {
|
|
116
116
|
return t(n, u, i);
|
|
117
|
-
}) :
|
|
117
|
+
}) : T(i) ? k(function(u) {
|
|
118
118
|
return t(n, o, u);
|
|
119
119
|
}) : t(n, o, i);
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
const
|
|
123
|
+
const me = Array.isArray || function(e) {
|
|
124
124
|
return e != null && e.length >= 0 && Object.prototype.toString.call(e) === "[object Array]";
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function $t(t) {
|
|
127
127
|
return t != null && typeof t["@@transducer/step"] == "function";
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Ft(t, e, n) {
|
|
130
130
|
return function() {
|
|
131
131
|
if (arguments.length === 0)
|
|
132
132
|
return n();
|
|
133
133
|
var o = arguments[arguments.length - 1];
|
|
134
|
-
if (!
|
|
134
|
+
if (!me(o)) {
|
|
135
135
|
for (var i = 0; i < t.length; ) {
|
|
136
136
|
if (typeof o[t[i]] == "function")
|
|
137
137
|
return o[t[i]].apply(o, Array.prototype.slice.call(arguments, 0, -1));
|
|
138
138
|
i += 1;
|
|
139
139
|
}
|
|
140
|
-
if (
|
|
140
|
+
if ($t(o)) {
|
|
141
141
|
var u = e.apply(null, Array.prototype.slice.call(arguments, 0, -1));
|
|
142
142
|
return u(o);
|
|
143
143
|
}
|
|
@@ -145,13 +145,13 @@ function zt(t, e, n) {
|
|
|
145
145
|
return n.apply(this, arguments);
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function xt(t) {
|
|
149
149
|
return t && t["@@transducer/reduced"] ? t : {
|
|
150
150
|
"@@transducer/value": t,
|
|
151
151
|
"@@transducer/reduced": !0
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
const
|
|
154
|
+
const qt = {
|
|
155
155
|
init: function() {
|
|
156
156
|
return this.xf["@@transducer/init"]();
|
|
157
157
|
},
|
|
@@ -159,12 +159,12 @@ const Gt = {
|
|
|
159
159
|
return this.xf["@@transducer/result"](t);
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
|
-
function
|
|
162
|
+
function we(t) {
|
|
163
163
|
return Object.prototype.toString.call(t) === "[object String]";
|
|
164
164
|
}
|
|
165
|
-
var
|
|
166
|
-
return
|
|
167
|
-
}),
|
|
165
|
+
var Bt = /* @__PURE__ */ k(function(e) {
|
|
166
|
+
return me(e) ? !0 : !e || typeof e != "object" || we(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
|
|
167
|
+
}), zt = /* @__PURE__ */ function() {
|
|
168
168
|
function t(e) {
|
|
169
169
|
this.f = e;
|
|
170
170
|
}
|
|
@@ -176,15 +176,15 @@ var Ht = /* @__PURE__ */ k(function(e) {
|
|
|
176
176
|
return this.f(e, n);
|
|
177
177
|
}, t;
|
|
178
178
|
}();
|
|
179
|
-
function
|
|
180
|
-
return new
|
|
179
|
+
function Xt(t) {
|
|
180
|
+
return new zt(t);
|
|
181
181
|
}
|
|
182
|
-
var
|
|
183
|
-
return
|
|
182
|
+
var Gt = /* @__PURE__ */ N(function(e, n) {
|
|
183
|
+
return Oe(e.length, function() {
|
|
184
184
|
return e.apply(n, arguments);
|
|
185
185
|
});
|
|
186
186
|
});
|
|
187
|
-
function
|
|
187
|
+
function Ht(t, e, n) {
|
|
188
188
|
for (var o = 0, i = n.length; o < i; ) {
|
|
189
189
|
if (e = t["@@transducer/step"](e, n[o]), e && e["@@transducer/reduced"]) {
|
|
190
190
|
e = e["@@transducer/value"];
|
|
@@ -204,111 +204,111 @@ function Me(t, e, n) {
|
|
|
204
204
|
}
|
|
205
205
|
return t["@@transducer/result"](e);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
return t["@@transducer/result"](n[o](
|
|
207
|
+
function We(t, e, n, o) {
|
|
208
|
+
return t["@@transducer/result"](n[o](Gt(t["@@transducer/step"], t), e));
|
|
209
209
|
}
|
|
210
|
-
var
|
|
211
|
-
function
|
|
212
|
-
if (typeof t == "function" && (t =
|
|
213
|
-
return
|
|
210
|
+
var $e = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
|
|
211
|
+
function Zt(t, e, n) {
|
|
212
|
+
if (typeof t == "function" && (t = Xt(t)), Bt(n))
|
|
213
|
+
return Ht(t, e, n);
|
|
214
214
|
if (typeof n["fantasy-land/reduce"] == "function")
|
|
215
|
-
return
|
|
216
|
-
if (n[
|
|
217
|
-
return Me(t, e, n[
|
|
215
|
+
return We(t, e, n, "fantasy-land/reduce");
|
|
216
|
+
if (n[$e] != null)
|
|
217
|
+
return Me(t, e, n[$e]());
|
|
218
218
|
if (typeof n.next == "function")
|
|
219
219
|
return Me(t, e, n);
|
|
220
220
|
if (typeof n.reduce == "function")
|
|
221
|
-
return
|
|
221
|
+
return We(t, e, n, "reduce");
|
|
222
222
|
throw new TypeError("reduce: list must be array or iterable");
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function pe(t, e) {
|
|
225
225
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
226
226
|
}
|
|
227
|
-
var
|
|
228
|
-
return
|
|
229
|
-
return
|
|
227
|
+
var Fe = Object.prototype.toString, Ye = /* @__PURE__ */ function() {
|
|
228
|
+
return Fe.call(arguments) === "[object Arguments]" ? function(e) {
|
|
229
|
+
return Fe.call(e) === "[object Arguments]";
|
|
230
230
|
} : function(e) {
|
|
231
|
-
return
|
|
231
|
+
return pe("callee", e);
|
|
232
232
|
};
|
|
233
|
-
}(),
|
|
233
|
+
}(), Jt = !/* @__PURE__ */ {
|
|
234
234
|
toString: null
|
|
235
|
-
}.propertyIsEnumerable("toString"),
|
|
235
|
+
}.propertyIsEnumerable("toString"), xe = ["constructor", "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"], qe = /* @__PURE__ */ function() {
|
|
236
236
|
return arguments.propertyIsEnumerable("length");
|
|
237
|
-
}(),
|
|
237
|
+
}(), Yt = function(e, n) {
|
|
238
238
|
for (var o = 0; o < e.length; ) {
|
|
239
239
|
if (e[o] === n)
|
|
240
240
|
return !0;
|
|
241
241
|
o += 1;
|
|
242
242
|
}
|
|
243
243
|
return !1;
|
|
244
|
-
},
|
|
244
|
+
}, Be = /* @__PURE__ */ k(typeof Object.keys == "function" && !qe ? function(e) {
|
|
245
245
|
return Object(e) !== e ? [] : Object.keys(e);
|
|
246
246
|
} : function(e) {
|
|
247
247
|
if (Object(e) !== e)
|
|
248
248
|
return [];
|
|
249
|
-
var n, o, i = [], u =
|
|
249
|
+
var n, o, i = [], u = qe && Ye(e);
|
|
250
250
|
for (n in e)
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
for (o =
|
|
254
|
-
n =
|
|
251
|
+
pe(n, e) && (!u || n !== "length") && (i[i.length] = n);
|
|
252
|
+
if (Jt)
|
|
253
|
+
for (o = xe.length - 1; o >= 0; )
|
|
254
|
+
n = xe[o], pe(n, e) && !Yt(i, n) && (i[i.length] = n), o -= 1;
|
|
255
255
|
return i;
|
|
256
256
|
});
|
|
257
|
-
const
|
|
257
|
+
const Kt = Number.isInteger || function(e) {
|
|
258
258
|
return e << 0 === e;
|
|
259
259
|
};
|
|
260
|
-
var
|
|
260
|
+
var Qt = /* @__PURE__ */ N(function(e, n) {
|
|
261
261
|
var o = e < 0 ? n.length + e : e;
|
|
262
|
-
return
|
|
263
|
-
}),
|
|
262
|
+
return we(n) ? n.charAt(o) : n[o];
|
|
263
|
+
}), K = /* @__PURE__ */ N(function(e, n) {
|
|
264
264
|
if (n != null)
|
|
265
|
-
return
|
|
266
|
-
}),
|
|
265
|
+
return Kt(e) ? Qt(e, n) : n[e];
|
|
266
|
+
}), en = /* @__PURE__ */ ye(Zt), ze = /* @__PURE__ */ k(function(e) {
|
|
267
267
|
return e === null ? "Null" : e === void 0 ? "Undefined" : Object.prototype.toString.call(e).slice(8, -1);
|
|
268
268
|
});
|
|
269
|
-
function
|
|
269
|
+
function tn(t, e) {
|
|
270
270
|
return function() {
|
|
271
271
|
return e.call(this, t.apply(this, arguments));
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function Ke(t, e) {
|
|
275
275
|
return function() {
|
|
276
276
|
var n = arguments.length;
|
|
277
277
|
if (n === 0)
|
|
278
278
|
return e();
|
|
279
279
|
var o = arguments[n - 1];
|
|
280
|
-
return
|
|
280
|
+
return me(o) || typeof o[t] != "function" ? e.apply(this, arguments) : o[t].apply(o, Array.prototype.slice.call(arguments, 0, n - 1));
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
/* @__PURE__ */
|
|
283
|
+
var nn = /* @__PURE__ */ ye(
|
|
284
|
+
/* @__PURE__ */ Ke("slice", function(e, n, o) {
|
|
285
285
|
return Array.prototype.slice.call(o, e, n);
|
|
286
286
|
})
|
|
287
|
-
),
|
|
288
|
-
/* @__PURE__ */
|
|
287
|
+
), rn = /* @__PURE__ */ k(
|
|
288
|
+
/* @__PURE__ */ Ke(
|
|
289
289
|
"tail",
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ nn(1, 1 / 0)
|
|
291
291
|
)
|
|
292
292
|
);
|
|
293
|
-
function
|
|
293
|
+
function on() {
|
|
294
294
|
if (arguments.length === 0)
|
|
295
295
|
throw new Error("pipe requires at least one argument");
|
|
296
|
-
return
|
|
296
|
+
return Oe(arguments[0].length, en(tn, arguments[0], rn(arguments)));
|
|
297
297
|
}
|
|
298
|
-
var
|
|
299
|
-
return
|
|
298
|
+
var an = /* @__PURE__ */ k(function(e) {
|
|
299
|
+
return we(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
|
|
300
300
|
});
|
|
301
|
-
function
|
|
301
|
+
function Xe() {
|
|
302
302
|
if (arguments.length === 0)
|
|
303
303
|
throw new Error("compose requires at least one argument");
|
|
304
|
-
return
|
|
304
|
+
return on.apply(this, an(arguments));
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Ge(t) {
|
|
307
307
|
for (var e = [], n; !(n = t.next()).done; )
|
|
308
308
|
e.push(n.value);
|
|
309
309
|
return e;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function He(t, e, n) {
|
|
312
312
|
for (var o = 0, i = n.length; o < i; ) {
|
|
313
313
|
if (t(e, n[o]))
|
|
314
314
|
return !0;
|
|
@@ -316,28 +316,28 @@ function Ge(t, e, n) {
|
|
|
316
316
|
}
|
|
317
317
|
return !1;
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function sn(t) {
|
|
320
320
|
var e = String(t).match(/^function (\w*)/);
|
|
321
321
|
return e == null ? "" : e[1];
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function ln(t, e) {
|
|
324
324
|
return t === e ? t !== 0 || 1 / t === 1 / e : t !== t && e !== e;
|
|
325
325
|
}
|
|
326
|
-
const be = typeof Object.is == "function" ? Object.is :
|
|
327
|
-
function
|
|
328
|
-
var i =
|
|
326
|
+
const be = typeof Object.is == "function" ? Object.is : ln;
|
|
327
|
+
function Ze(t, e, n, o) {
|
|
328
|
+
var i = Ge(t), u = Ge(e);
|
|
329
329
|
function g(A, l) {
|
|
330
|
-
return
|
|
330
|
+
return Pe(A, l, n.slice(), o.slice());
|
|
331
331
|
}
|
|
332
|
-
return !
|
|
333
|
-
return !
|
|
332
|
+
return !He(function(A, l) {
|
|
333
|
+
return !He(g, l, A);
|
|
334
334
|
}, u, i);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Pe(t, e, n, o) {
|
|
337
337
|
if (be(t, e))
|
|
338
338
|
return !0;
|
|
339
|
-
var i =
|
|
340
|
-
if (i !==
|
|
339
|
+
var i = ze(t);
|
|
340
|
+
if (i !== ze(e))
|
|
341
341
|
return !1;
|
|
342
342
|
if (typeof t["fantasy-land/equals"] == "function" || typeof e["fantasy-land/equals"] == "function")
|
|
343
343
|
return typeof t["fantasy-land/equals"] == "function" && t["fantasy-land/equals"](e) && typeof e["fantasy-land/equals"] == "function" && e["fantasy-land/equals"](t);
|
|
@@ -347,7 +347,7 @@ function Oe(t, e, n, o) {
|
|
|
347
347
|
case "Arguments":
|
|
348
348
|
case "Array":
|
|
349
349
|
case "Object":
|
|
350
|
-
if (typeof t.constructor == "function" &&
|
|
350
|
+
if (typeof t.constructor == "function" && sn(t.constructor) === "Promise")
|
|
351
351
|
return t === e;
|
|
352
352
|
break;
|
|
353
353
|
case "Boolean":
|
|
@@ -374,9 +374,9 @@ function Oe(t, e, n, o) {
|
|
|
374
374
|
}
|
|
375
375
|
switch (i) {
|
|
376
376
|
case "Map":
|
|
377
|
-
return t.size !== e.size ? !1 :
|
|
377
|
+
return t.size !== e.size ? !1 : Ze(t.entries(), e.entries(), n.concat([t]), o.concat([e]));
|
|
378
378
|
case "Set":
|
|
379
|
-
return t.size !== e.size ? !1 :
|
|
379
|
+
return t.size !== e.size ? !1 : Ze(t.values(), e.values(), n.concat([t]), o.concat([e]));
|
|
380
380
|
case "Arguments":
|
|
381
381
|
case "Array":
|
|
382
382
|
case "Object":
|
|
@@ -400,48 +400,48 @@ function Oe(t, e, n, o) {
|
|
|
400
400
|
default:
|
|
401
401
|
return !1;
|
|
402
402
|
}
|
|
403
|
-
var g =
|
|
404
|
-
if (g.length !==
|
|
403
|
+
var g = Be(t);
|
|
404
|
+
if (g.length !== Be(e).length)
|
|
405
405
|
return !1;
|
|
406
406
|
var A = n.concat([t]), l = o.concat([e]);
|
|
407
407
|
for (u = g.length - 1; u >= 0; ) {
|
|
408
408
|
var s = g[u];
|
|
409
|
-
if (!(
|
|
409
|
+
if (!(pe(s, e) && Pe(e[s], t[s], A, l)))
|
|
410
410
|
return !1;
|
|
411
411
|
u -= 1;
|
|
412
412
|
}
|
|
413
413
|
return !0;
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
return
|
|
415
|
+
var Qe = /* @__PURE__ */ N(function(e, n) {
|
|
416
|
+
return Pe(e, n, [], []);
|
|
417
417
|
});
|
|
418
|
-
function
|
|
418
|
+
function un(t) {
|
|
419
419
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
420
420
|
}
|
|
421
|
-
var
|
|
421
|
+
var he = /* @__PURE__ */ N(function(e, n) {
|
|
422
422
|
return n == null || n !== n ? e : n;
|
|
423
423
|
});
|
|
424
|
-
function
|
|
424
|
+
function cn(t) {
|
|
425
425
|
var e = Object.prototype.toString.call(t);
|
|
426
426
|
return e === "[object Uint8ClampedArray]" || e === "[object Int8Array]" || e === "[object Uint8Array]" || e === "[object Int16Array]" || e === "[object Uint16Array]" || e === "[object Int32Array]" || e === "[object Uint32Array]" || e === "[object Float32Array]" || e === "[object Float64Array]" || e === "[object BigInt64Array]" || e === "[object BigUint64Array]";
|
|
427
427
|
}
|
|
428
|
-
var
|
|
429
|
-
return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() :
|
|
428
|
+
var dn = /* @__PURE__ */ k(function(e) {
|
|
429
|
+
return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() : me(e) ? [] : we(e) ? "" : un(e) ? {} : Ye(e) ? /* @__PURE__ */ function() {
|
|
430
430
|
return arguments;
|
|
431
|
-
}() :
|
|
432
|
-
}),
|
|
431
|
+
}() : cn(e) ? e.constructor.from("") : void 0;
|
|
432
|
+
}), fn = /* @__PURE__ */ function() {
|
|
433
433
|
function t(e, n) {
|
|
434
434
|
this.xf = n, this.f = e, this.idx = -1, this.found = !1;
|
|
435
435
|
}
|
|
436
|
-
return t.prototype["@@transducer/init"] =
|
|
436
|
+
return t.prototype["@@transducer/init"] = qt.init, t.prototype["@@transducer/result"] = function(e) {
|
|
437
437
|
return this.found || (e = this.xf["@@transducer/step"](e, -1)), this.xf["@@transducer/result"](e);
|
|
438
438
|
}, t.prototype["@@transducer/step"] = function(e, n) {
|
|
439
|
-
return this.idx += 1, this.f(n) && (this.found = !0, e =
|
|
439
|
+
return this.idx += 1, this.f(n) && (this.found = !0, e = xt(this.xf["@@transducer/step"](e, this.idx))), e;
|
|
440
440
|
}, t;
|
|
441
|
-
}(),
|
|
442
|
-
return new
|
|
441
|
+
}(), vn = /* @__PURE__ */ N(function(e, n) {
|
|
442
|
+
return new fn(e, n);
|
|
443
443
|
}), $ = /* @__PURE__ */ N(
|
|
444
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ Ft([], vn, function(e, n) {
|
|
445
445
|
for (var o = 0, i = n.length; o < i; ) {
|
|
446
446
|
if (e(n[o]))
|
|
447
447
|
return o;
|
|
@@ -449,39 +449,24 @@ var hn = /* @__PURE__ */ k(function(e) {
|
|
|
449
449
|
}
|
|
450
450
|
return -1;
|
|
451
451
|
})
|
|
452
|
-
),
|
|
453
|
-
return e != null &&
|
|
454
|
-
}), F = /* @__PURE__ */
|
|
455
|
-
return
|
|
456
|
-
}),
|
|
457
|
-
return
|
|
458
|
-
}),
|
|
459
|
-
return
|
|
452
|
+
), pn = /* @__PURE__ */ k(function(e) {
|
|
453
|
+
return e != null && Qe(e, dn(e));
|
|
454
|
+
}), F = /* @__PURE__ */ ye(function(e, n, o) {
|
|
455
|
+
return Qe(n, K(e, o));
|
|
456
|
+
}), ge = /* @__PURE__ */ ye(function(e, n, o) {
|
|
457
|
+
return he(e, K(n, o));
|
|
458
|
+
}), hn = /* @__PURE__ */ N(function(e, n) {
|
|
459
|
+
return Oe(e.length, function() {
|
|
460
460
|
try {
|
|
461
461
|
return e.apply(this, arguments);
|
|
462
462
|
} catch (o) {
|
|
463
|
-
return n.apply(this,
|
|
463
|
+
return n.apply(this, Wt([o], arguments));
|
|
464
464
|
}
|
|
465
465
|
});
|
|
466
466
|
});
|
|
467
|
-
|
|
468
|
-
apiUrl: Qe,
|
|
469
|
-
api2Url: et,
|
|
470
|
-
timeSeriesUrl: tt,
|
|
471
|
-
timeSeriesPublicUrl: nt,
|
|
472
|
-
timeSeriesApi: rt
|
|
473
|
-
}, Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
474
|
-
__proto__: null,
|
|
475
|
-
api2Url: et,
|
|
476
|
-
apiUrl: Qe,
|
|
477
|
-
default: An,
|
|
478
|
-
timeSeriesApi: rt,
|
|
479
|
-
timeSeriesPublicUrl: nt,
|
|
480
|
-
timeSeriesUrl: tt
|
|
481
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
482
|
-
async function fe() {
|
|
467
|
+
async function ve() {
|
|
483
468
|
try {
|
|
484
|
-
return
|
|
469
|
+
return Mt().then(
|
|
485
470
|
(t) => {
|
|
486
471
|
var e;
|
|
487
472
|
return (e = t == null ? void 0 : t.tokens) == null ? void 0 : e.accessToken.toString();
|
|
@@ -491,7 +476,7 @@ async function fe() {
|
|
|
491
476
|
console.error(t);
|
|
492
477
|
}
|
|
493
478
|
}
|
|
494
|
-
const
|
|
479
|
+
const gn = () => ({
|
|
495
480
|
openConnection: async (e, n, o) => await new Promise((g, A) => {
|
|
496
481
|
const l = e + "?session=" + o + "&package=" + n;
|
|
497
482
|
console.log("Opening WebSocket connection to:", l);
|
|
@@ -502,18 +487,18 @@ const Tn = () => ({
|
|
|
502
487
|
const h = { montage: "NOT_MONTAGED", packageId: n };
|
|
503
488
|
console.log("🎛️ Sending message payload"), m.send(JSON.stringify(h));
|
|
504
489
|
}, m.onclose = () => {
|
|
505
|
-
console.log("🔌 WebSocket closed for package:", n), s && s.channelDetails ?
|
|
490
|
+
console.log("🔌 WebSocket closed for package:", n), s && s.channelDetails ? g({ res: s.channelDetails, status: "websocket closed" }) : (console.warn("No channel details received"), g({ res: null, status: "websocket closed without data" }));
|
|
506
491
|
}, m.onmessage = (h) => {
|
|
507
492
|
console.log("WebSocket message received:", h.data), s = JSON.parse(h.data), m.close();
|
|
508
493
|
}, m.onerror = (h) => {
|
|
509
494
|
console.error("WebSocket error:", h), A(h);
|
|
510
495
|
};
|
|
511
496
|
})
|
|
512
|
-
}),
|
|
513
|
-
const t =
|
|
497
|
+
}), et = Vt("tsviewer", () => {
|
|
498
|
+
const t = kt({}), e = y([]), n = y("NOT_MONTAGED"), o = y({}), i = y([]), u = y(null), g = y(null), A = y({}), l = y([]), s = y({}), m = y({}), h = y("POINTER"), { openConnection: _ } = gn(), V = z(() => (a) => i.value.find((c) => c.name === a)), j = z(() => e.value.filter((a) => a.selected)), C = z(() => () => {
|
|
514
499
|
const a = l.value.find((c) => c.selected);
|
|
515
500
|
return a || (console.warn("No active layer found, available layers:", l.value), l.value.length > 0 ? l.value[0] : null);
|
|
516
|
-
}),
|
|
501
|
+
}), M = () => {
|
|
517
502
|
let a = !1;
|
|
518
503
|
return l.value.forEach((c, p) => {
|
|
519
504
|
!c.id && c.id !== 0 && (console.error(`Layer at index ${p} missing ID:`, c), a = !0), c.annotations || (console.warn(`Layer at index ${p} missing annotations array:`, c), c.annotations = []);
|
|
@@ -524,25 +509,27 @@ const Tn = () => ({
|
|
|
524
509
|
e.value = a;
|
|
525
510
|
}, v = (a) => {
|
|
526
511
|
n.value = a;
|
|
527
|
-
},
|
|
512
|
+
}, S = (a) => {
|
|
528
513
|
o.value = a;
|
|
529
514
|
}, W = (a) => {
|
|
530
515
|
i.value = a;
|
|
531
516
|
}, O = (a) => {
|
|
532
517
|
u.value = a;
|
|
533
|
-
},
|
|
518
|
+
}, b = (a) => {
|
|
534
519
|
g.value = a;
|
|
520
|
+
}, X = (a) => {
|
|
521
|
+
Object.assign(t, a);
|
|
535
522
|
}, G = async (a) => {
|
|
536
|
-
const c = a.packageId, p = await
|
|
537
|
-
let L = t.
|
|
538
|
-
|
|
539
|
-
},
|
|
523
|
+
const c = a.packageId, p = await ve();
|
|
524
|
+
let L = t.timeseriesDiscoverApi, te = null;
|
|
525
|
+
te = await _(L, c, p), E({ channels: te.res, content: { id: c } });
|
|
526
|
+
}, D = () => (a) => {
|
|
540
527
|
var p;
|
|
541
528
|
return ((p = a == null ? void 0 : a.content) == null ? void 0 : p.state) === "READY";
|
|
542
|
-
},
|
|
529
|
+
}, U = (a) => {
|
|
543
530
|
const c = a.map((p) => (!p.id && p.id !== 0 && (console.warn("Annotation layer missing ID:", p), p.id = Math.random().toString(36).substr(2, 9)), p.annotations || (p.annotations = []), p.name || (p.name = `Layer ${p.id}`), p));
|
|
544
531
|
l.value = c, console.log("Set annotations with validated structure:", c);
|
|
545
|
-
},
|
|
532
|
+
}, H = (a) => {
|
|
546
533
|
if (!a && a !== 0) {
|
|
547
534
|
console.error("setActiveAnnotationLayer called with invalid layerId:", a);
|
|
548
535
|
return;
|
|
@@ -550,7 +537,7 @@ const Tn = () => ({
|
|
|
550
537
|
s.value = a, l.value.forEach((p) => p.selected = !1);
|
|
551
538
|
const c = $(F("id", a), l.value);
|
|
552
539
|
c >= 0 ? (l.value[c].selected = !0, console.log("Successfully set active layer:", l.value[c])) : console.error("Layer with ID not found:", a, "Available layers:", l.value);
|
|
553
|
-
},
|
|
540
|
+
}, Z = (a) => {
|
|
554
541
|
if (l.value.forEach(
|
|
555
542
|
(c) => {
|
|
556
543
|
var p;
|
|
@@ -564,9 +551,9 @@ const Tn = () => ({
|
|
|
564
551
|
}
|
|
565
552
|
}
|
|
566
553
|
m.value = a;
|
|
567
|
-
},
|
|
554
|
+
}, ae = (a) => {
|
|
568
555
|
h.value = a;
|
|
569
|
-
},
|
|
556
|
+
}, x = (a) => {
|
|
570
557
|
if (!a.id && a.id !== 0) {
|
|
571
558
|
console.error("Cannot create layer without ID:", a);
|
|
572
559
|
return;
|
|
@@ -587,32 +574,32 @@ const Tn = () => ({
|
|
|
587
574
|
// Spread any additional properties
|
|
588
575
|
};
|
|
589
576
|
l.value.push(c), console.log("Created layer with validated structure:", c);
|
|
590
|
-
},
|
|
577
|
+
}, Q = (a) => {
|
|
591
578
|
const c = $(F("id", a.id), l.value);
|
|
592
579
|
if (c >= 0) {
|
|
593
580
|
const p = Object.assign(l.value[c], a);
|
|
594
581
|
l.value[c] = p;
|
|
595
582
|
}
|
|
596
|
-
},
|
|
583
|
+
}, q = (a) => {
|
|
597
584
|
const c = $(F("id", a.id), l.value);
|
|
598
585
|
c >= 0 && l.value.splice(c, 1);
|
|
599
|
-
},
|
|
586
|
+
}, se = (a) => {
|
|
600
587
|
const c = $(F("id", a.layer_id), l.value);
|
|
601
|
-
c >= 0 && (l.value[c].annotations || (l.value[c].annotations = []), l.value[c].annotations.push(a),
|
|
602
|
-
},
|
|
588
|
+
c >= 0 && (l.value[c].annotations || (l.value[c].annotations = []), l.value[c].annotations.push(a), Z(a));
|
|
589
|
+
}, de = (a) => {
|
|
603
590
|
const c = $(F("id", a.layer_id), l.value);
|
|
604
591
|
if (c >= 0) {
|
|
605
592
|
const p = l.value[c].annotations, L = $(F("id", a.id), p);
|
|
606
593
|
L >= 0 && (p[L] = a);
|
|
607
594
|
}
|
|
608
|
-
},
|
|
595
|
+
}, ee = (a) => {
|
|
609
596
|
const c = $(F("id", a.layer_id), l.value);
|
|
610
597
|
if (c >= 0) {
|
|
611
598
|
const p = l.value[c].annotations, L = $(F("id", a.id), p);
|
|
612
599
|
L >= 0 && p.splice(L, 1);
|
|
613
600
|
}
|
|
614
601
|
}, B = (a, c, p) => {
|
|
615
|
-
const L = e.value.find((
|
|
602
|
+
const L = e.value.find((te) => te.id === a);
|
|
616
603
|
L && (L[c] = p);
|
|
617
604
|
};
|
|
618
605
|
return {
|
|
@@ -630,26 +617,26 @@ const Tn = () => ({
|
|
|
630
617
|
viewerActiveTool: h,
|
|
631
618
|
config: t,
|
|
632
619
|
// Getters
|
|
633
|
-
getMontageMessageByName:
|
|
634
|
-
viewerSelectedChannels:
|
|
635
|
-
getViewerActiveLayer:
|
|
620
|
+
getMontageMessageByName: V,
|
|
621
|
+
viewerSelectedChannels: j,
|
|
622
|
+
getViewerActiveLayer: C,
|
|
636
623
|
getAnnotationById: P,
|
|
637
624
|
// Actions
|
|
638
625
|
setChannels: I,
|
|
639
626
|
setViewerMontageScheme: v,
|
|
640
|
-
setCustomMontageMap:
|
|
627
|
+
setCustomMontageMap: S,
|
|
641
628
|
setWorkspaceMontages: W,
|
|
642
629
|
setViewerErrors: O,
|
|
643
|
-
setAnnotations:
|
|
644
|
-
setActiveAnnotationLayer:
|
|
645
|
-
setActiveAnnotation:
|
|
646
|
-
setActiveTool:
|
|
647
|
-
createLayer:
|
|
648
|
-
updateLayer:
|
|
649
|
-
deleteLayer:
|
|
650
|
-
createAnnotation:
|
|
651
|
-
updateAnnotation:
|
|
652
|
-
deleteAnnotation:
|
|
630
|
+
setAnnotations: U,
|
|
631
|
+
setActiveAnnotationLayer: H,
|
|
632
|
+
setActiveAnnotation: Z,
|
|
633
|
+
setActiveTool: ae,
|
|
634
|
+
createLayer: x,
|
|
635
|
+
updateLayer: Q,
|
|
636
|
+
deleteLayer: q,
|
|
637
|
+
createAnnotation: se,
|
|
638
|
+
updateAnnotation: de,
|
|
639
|
+
deleteAnnotation: ee,
|
|
653
640
|
updateChannelProperty: B,
|
|
654
641
|
updateChannelVisibility: (a, c) => {
|
|
655
642
|
B(a, "visible", c);
|
|
@@ -660,12 +647,14 @@ const Tn = () => ({
|
|
|
660
647
|
updateChannelFilter: (a, c) => {
|
|
661
648
|
B(a, "filter", c);
|
|
662
649
|
},
|
|
663
|
-
validateAnnotationLayers:
|
|
650
|
+
validateAnnotationLayers: M,
|
|
664
651
|
resetViewer: () => {
|
|
665
|
-
e.value = [], n.value = "NOT_MONTAGED", o.value = {}, i.value = [], u.value = null, l.value = [], s.value = {}, m.value = {}, h.value = "POINTER", A.value = {}
|
|
652
|
+
e.value = [], n.value = "NOT_MONTAGED", o.value = {}, i.value = [], u.value = null, l.value = [], s.value = {}, m.value = {}, h.value = "POINTER", A.value = {}, Object.keys(t).forEach((a) => {
|
|
653
|
+
delete t[a];
|
|
654
|
+
});
|
|
666
655
|
},
|
|
667
656
|
triggerRerender: (a) => {
|
|
668
|
-
|
|
657
|
+
b({
|
|
669
658
|
timestamp: Date.now(),
|
|
670
659
|
cause: a
|
|
671
660
|
});
|
|
@@ -673,37 +662,38 @@ const Tn = () => ({
|
|
|
673
662
|
resetRerenderTrigger: () => {
|
|
674
663
|
g.value = null;
|
|
675
664
|
},
|
|
676
|
-
isTSFileProcessed:
|
|
665
|
+
isTSFileProcessed: D,
|
|
677
666
|
fetchAndSetActiveViewer: G,
|
|
678
|
-
setActiveViewer: E
|
|
667
|
+
setActiveViewer: E,
|
|
668
|
+
setViewerConfig: X
|
|
679
669
|
};
|
|
680
670
|
});
|
|
681
|
-
function
|
|
671
|
+
function yn(t) {
|
|
682
672
|
if (useRoute().name === "docs-login")
|
|
683
673
|
return;
|
|
684
|
-
|
|
685
|
-
const n =
|
|
674
|
+
he(!1, K("shouldShowToast", t));
|
|
675
|
+
const n = he(!1, K("shouldRedirect", t));
|
|
686
676
|
this.clearState(), n && this.$route.fullPath;
|
|
687
677
|
}
|
|
688
|
-
const
|
|
678
|
+
const mn = (t) => Object.prototype.toString.call(t) === "[object String]", wn = (t) => {
|
|
689
679
|
Object.keys(t).forEach((e) => {
|
|
690
|
-
|
|
680
|
+
mn(t[e]) && (t[e] = t[e].trim());
|
|
691
681
|
});
|
|
692
682
|
};
|
|
693
|
-
function
|
|
683
|
+
function Dn(t, e) {
|
|
694
684
|
if (!t)
|
|
695
685
|
return Promise.reject({ status: 400, message: "Url is missing!" });
|
|
696
|
-
const n =
|
|
686
|
+
const n = ge("GET", "method", e), o = ge({}, "header", e), i = Object.assign({}, { "Content-type": "application/json" }, o), u = K("body", e);
|
|
697
687
|
let g = { headers: i, method: n };
|
|
698
688
|
if (u) {
|
|
699
|
-
typeof u == "object" &&
|
|
689
|
+
typeof u == "object" && wn(u);
|
|
700
690
|
const A = JSON.stringify(u);
|
|
701
691
|
g = Object.assign({}, g, { body: A });
|
|
702
692
|
}
|
|
703
693
|
return fetch(t, g).then((A) => A.status >= 400 ? Promise.reject(A) : A.json().catch(() => A));
|
|
704
694
|
}
|
|
705
|
-
function
|
|
706
|
-
const e =
|
|
695
|
+
function Ee(t) {
|
|
696
|
+
const e = K("status", t);
|
|
707
697
|
let n;
|
|
708
698
|
if (e === void 0) {
|
|
709
699
|
console.log(t);
|
|
@@ -713,13 +703,13 @@ function Ce(t) {
|
|
|
713
703
|
if (n === 400 && t.body)
|
|
714
704
|
t.body.getReader().read().then(({ done: o, value: i }) => {
|
|
715
705
|
const u = i instanceof Uint8Array ? String.fromCharCode.apply(null, i) : i;
|
|
716
|
-
|
|
706
|
+
Xe(he(u), hn(Xe(K("message"), JSON.parse), (g, A) => A))(u);
|
|
717
707
|
});
|
|
718
708
|
else if (n === 401)
|
|
719
|
-
return
|
|
709
|
+
return yn();
|
|
720
710
|
}
|
|
721
|
-
function
|
|
722
|
-
const t =
|
|
711
|
+
function An() {
|
|
712
|
+
const t = et(), { viewerChannels: e, viewerAnnotations: n } = Je(t), o = (l) => l.id || "", i = (l) => {
|
|
723
713
|
l.sort(function(m, h) {
|
|
724
714
|
return m.start < h.start ? -1 : m.start > h.start ? 1 : 0;
|
|
725
715
|
});
|
|
@@ -738,13 +728,13 @@ function Cn() {
|
|
|
738
728
|
if (s.id)
|
|
739
729
|
throw new TypeError("Trying to create an annotation that already exists", s.id);
|
|
740
730
|
let m = s.start, h = s.duration || s.end - s.start;
|
|
741
|
-
const
|
|
742
|
-
if (!
|
|
731
|
+
const _ = s.label, V = s.description, j = s.layer_id;
|
|
732
|
+
if (!_)
|
|
743
733
|
throw new Error("Annotation label is required");
|
|
744
734
|
if (m == null)
|
|
745
735
|
throw new Error("Annotation start time is required");
|
|
746
736
|
h < 0 && (h = -h, m = m - h);
|
|
747
|
-
let
|
|
737
|
+
let C = [];
|
|
748
738
|
if (console.log("🔧 useTsAnnotation: Processing channelIds...", {
|
|
749
739
|
hasChannelIds: s.channelIds && Array.isArray(s.channelIds),
|
|
750
740
|
allChannels: s.allChannels,
|
|
@@ -756,74 +746,74 @@ function Cn() {
|
|
|
756
746
|
const I = t.activeViewer.value.channels;
|
|
757
747
|
for (let v = 0; v < I.length; v++) {
|
|
758
748
|
const W = I[v].content.id;
|
|
759
|
-
|
|
749
|
+
C.push(W), console.log("🔧 useTsAnnotation: Added channel ID:", W);
|
|
760
750
|
}
|
|
761
751
|
} else if (s.channelIds && Array.isArray(s.channelIds) && s.channelIds.length > 0)
|
|
762
|
-
|
|
752
|
+
C = s.channelIds, console.log("🔧 useTsAnnotation: Using provided channelIds:", C);
|
|
763
753
|
else {
|
|
764
754
|
console.log("🔧 useTsAnnotation: Computing from selected channels");
|
|
765
755
|
for (let I = 0; I < e.value.length; I++) {
|
|
766
756
|
const v = e.value[I];
|
|
767
757
|
if (v.selected && v.visible) {
|
|
768
|
-
const
|
|
769
|
-
|
|
758
|
+
const S = o(v);
|
|
759
|
+
C.push(S), console.log("🔧 useTsAnnotation: Added selected channel ID:", S);
|
|
770
760
|
}
|
|
771
761
|
}
|
|
772
762
|
}
|
|
773
|
-
console.log("🔧 useTsAnnotation: Final channelIds:",
|
|
774
|
-
const
|
|
775
|
-
label:
|
|
776
|
-
name:
|
|
777
|
-
description:
|
|
763
|
+
console.log("🔧 useTsAnnotation: Final channelIds:", C);
|
|
764
|
+
const M = {
|
|
765
|
+
label: _,
|
|
766
|
+
name: _,
|
|
767
|
+
description: V || "",
|
|
778
768
|
start: Math.floor(m),
|
|
779
769
|
end: Math.floor(m + h),
|
|
780
|
-
channelIds:
|
|
770
|
+
channelIds: C
|
|
781
771
|
};
|
|
782
|
-
console.log("🔧 useTsAnnotation: API payload:",
|
|
783
|
-
const P = t.activeViewer.value.content.id, E = `${t.config.apiUrl}/timeseries/${P}/layers/${
|
|
772
|
+
console.log("🔧 useTsAnnotation: API payload:", M);
|
|
773
|
+
const P = t.activeViewer.value.content.id, E = `${t.config.apiUrl}/timeseries/${P}/layers/${j}/annotations`;
|
|
784
774
|
console.log("🔧 useTsAnnotation: API URL:", E);
|
|
785
775
|
try {
|
|
786
|
-
const I = await
|
|
776
|
+
const I = await ve(), v = await fetch(`${E}?api_key=${I}`, {
|
|
787
777
|
method: "POST",
|
|
788
778
|
headers: {
|
|
789
779
|
"Content-Type": "application/json",
|
|
790
780
|
Accept: "application/json"
|
|
791
781
|
},
|
|
792
|
-
body: JSON.stringify(
|
|
782
|
+
body: JSON.stringify(M)
|
|
793
783
|
});
|
|
794
784
|
if (!v.ok) {
|
|
795
|
-
const
|
|
796
|
-
throw new Error(`HTTP ${v.status}: ${
|
|
785
|
+
const b = await v.text();
|
|
786
|
+
throw new Error(`HTTP ${v.status}: ${b}`);
|
|
797
787
|
}
|
|
798
|
-
const
|
|
799
|
-
console.log("🔧 useTsAnnotation: API success:",
|
|
788
|
+
const S = await v.json();
|
|
789
|
+
console.log("🔧 useTsAnnotation: API success:", S);
|
|
800
790
|
const W = {
|
|
801
791
|
name: "",
|
|
802
|
-
id:
|
|
803
|
-
label:
|
|
804
|
-
description:
|
|
805
|
-
start:
|
|
806
|
-
duration:
|
|
807
|
-
end:
|
|
792
|
+
id: S.id,
|
|
793
|
+
label: S.label,
|
|
794
|
+
description: S.description,
|
|
795
|
+
start: S.start,
|
|
796
|
+
duration: S.end - S.start,
|
|
797
|
+
end: S.end,
|
|
808
798
|
cStart: null,
|
|
809
799
|
cEnd: null,
|
|
810
800
|
selected: !0,
|
|
811
|
-
channelIds:
|
|
812
|
-
allChannels:
|
|
801
|
+
channelIds: S.channelIds || C,
|
|
802
|
+
allChannels: C.length === 0 || C.length >= e.value.length,
|
|
813
803
|
// Use Pinia
|
|
814
|
-
layer_id:
|
|
815
|
-
userId:
|
|
804
|
+
layer_id: j,
|
|
805
|
+
userId: S.userId
|
|
816
806
|
};
|
|
817
|
-
|
|
807
|
+
S.linkedPackage && (W.linkedPackage = S.linkedPackage);
|
|
818
808
|
let O = 0;
|
|
819
|
-
for (let
|
|
820
|
-
if (n.value[
|
|
821
|
-
O =
|
|
809
|
+
for (let b = 0; b < n.value.length; b++)
|
|
810
|
+
if (n.value[b].id === j) {
|
|
811
|
+
O = b;
|
|
822
812
|
break;
|
|
823
813
|
}
|
|
824
814
|
return t.createAnnotation(W), n.value[O] && n.value[O].annotations && i(n.value[O].annotations), W;
|
|
825
815
|
} catch (I) {
|
|
826
|
-
throw console.error("🔧 useTsAnnotation: Error creating annotation:", I),
|
|
816
|
+
throw console.error("🔧 useTsAnnotation: Error creating annotation:", I), Ee(I), I;
|
|
827
817
|
}
|
|
828
818
|
},
|
|
829
819
|
updateAnnotation: async (l = null) => {
|
|
@@ -834,30 +824,30 @@ function Cn() {
|
|
|
834
824
|
throw new TypeError("Missing layer_id for annotation update", s);
|
|
835
825
|
let m = s.start, h = s.duration || s.end - s.start;
|
|
836
826
|
h < 0 && (h = -h, m = m - h);
|
|
837
|
-
const
|
|
827
|
+
const _ = {
|
|
838
828
|
label: s.label,
|
|
839
829
|
description: s.description || "",
|
|
840
830
|
start: Math.floor(m),
|
|
841
831
|
end: Math.floor(m + h),
|
|
842
832
|
channelIds: s.channelIds || []
|
|
843
833
|
};
|
|
844
|
-
console.log("🔧 useTsAnnotation: Update API payload:",
|
|
845
|
-
const
|
|
846
|
-
console.log("🔧 useTsAnnotation: Update API URL:",
|
|
834
|
+
console.log("🔧 useTsAnnotation: Update API payload:", _);
|
|
835
|
+
const V = t.activeViewer.value.content.id, j = `${t.config.apiUrl}/timeseries/${V}/layers/${s.layer_id}/annotations/${s.id}`;
|
|
836
|
+
console.log("🔧 useTsAnnotation: Update API URL:", j);
|
|
847
837
|
try {
|
|
848
|
-
const
|
|
838
|
+
const C = await ve(), M = await fetch(`${j}?api_key=${C}`, {
|
|
849
839
|
method: "PUT",
|
|
850
840
|
headers: {
|
|
851
841
|
"Content-Type": "application/json",
|
|
852
842
|
Accept: "application/json"
|
|
853
843
|
},
|
|
854
|
-
body: JSON.stringify(
|
|
844
|
+
body: JSON.stringify(_)
|
|
855
845
|
});
|
|
856
|
-
if (!
|
|
857
|
-
const I = await
|
|
858
|
-
throw new Error(`HTTP ${
|
|
846
|
+
if (!M.ok) {
|
|
847
|
+
const I = await M.text();
|
|
848
|
+
throw new Error(`HTTP ${M.status}: ${I}`);
|
|
859
849
|
}
|
|
860
|
-
const P = await
|
|
850
|
+
const P = await M.json();
|
|
861
851
|
console.log("🔧 useTsAnnotation: Update API success:", P);
|
|
862
852
|
const E = {
|
|
863
853
|
...s,
|
|
@@ -865,8 +855,8 @@ function Cn() {
|
|
|
865
855
|
duration: P.end - P.start
|
|
866
856
|
};
|
|
867
857
|
return t.updateAnnotation(E), P;
|
|
868
|
-
} catch (
|
|
869
|
-
throw console.error("🔧 useTsAnnotation: Error updating annotation:",
|
|
858
|
+
} catch (C) {
|
|
859
|
+
throw console.error("🔧 useTsAnnotation: Error updating annotation:", C), Ee(C), C;
|
|
870
860
|
}
|
|
871
861
|
},
|
|
872
862
|
removeAnnotation: async (l) => {
|
|
@@ -878,31 +868,31 @@ function Cn() {
|
|
|
878
868
|
const m = t.activeViewer.value.content.id, h = `${t.config.apiUrl}/timeseries/${m}/layers/${s}/annotations/${l.id}`;
|
|
879
869
|
console.log("🔧 useTsAnnotation: Delete API URL:", h);
|
|
880
870
|
try {
|
|
881
|
-
const
|
|
871
|
+
const _ = await ve(), V = await fetch(`${h}?api_key=${_}`, {
|
|
882
872
|
method: "DELETE",
|
|
883
873
|
headers: {
|
|
884
874
|
Accept: "application/json"
|
|
885
875
|
}
|
|
886
876
|
});
|
|
887
|
-
if (!
|
|
888
|
-
const
|
|
889
|
-
throw new Error(`HTTP ${
|
|
877
|
+
if (!V.ok) {
|
|
878
|
+
const j = await V.text();
|
|
879
|
+
throw new Error(`HTTP ${V.status}: ${j}`);
|
|
890
880
|
}
|
|
891
881
|
return console.log("🔧 useTsAnnotation: Delete API success"), t.deleteAnnotation(l), !0;
|
|
892
|
-
} catch (
|
|
893
|
-
throw console.error("🔧 useTsAnnotation: Error deleting annotation:",
|
|
882
|
+
} catch (_) {
|
|
883
|
+
throw console.error("🔧 useTsAnnotation: Error deleting annotation:", _), Ee(_), _;
|
|
894
884
|
}
|
|
895
885
|
},
|
|
896
886
|
sortAnns: i,
|
|
897
887
|
getChannelId: o
|
|
898
888
|
};
|
|
899
889
|
}
|
|
900
|
-
const
|
|
890
|
+
const Tn = (t, e) => {
|
|
901
891
|
const n = t.__vccOpts || t;
|
|
902
892
|
for (const [o, i] of e)
|
|
903
893
|
n[o] = i;
|
|
904
894
|
return n;
|
|
905
|
-
},
|
|
895
|
+
}, Sn = { id: "channelCanvas" }, In = ["data-id"], Cn = ["hidden"], _n = ["hidden"], bn = {
|
|
906
896
|
__name: "TSViewer",
|
|
907
897
|
props: {
|
|
908
898
|
pkg: {
|
|
@@ -920,7 +910,7 @@ const En = (t, e) => {
|
|
|
920
910
|
}
|
|
921
911
|
},
|
|
922
912
|
setup(t, { expose: e }) {
|
|
923
|
-
const n =
|
|
913
|
+
const n = J(() => import("./TSScrubber-Dby56vNH.mjs")), o = J(() => import("./TSViewerCanvas-DdXL6ec8.mjs").then((r) => r.T)), i = J(() => import("./TSViewerToolbar-bujnuU5I.mjs")), u = J(() => import("./TSFilterModal-D-iGQpuh.mjs")), g = J(() => import("./TSAnnotationModal-BdY0Hlvv.mjs")), A = J(() => import("./TsAnnotationDeleteDialog-C6cO4tc8.mjs")), l = J(() => import("./TSViewerLayerWindow-DiM4ubPl.mjs")), s = {
|
|
924
914
|
TIMEUNIT: "microSeconds",
|
|
925
915
|
// Basis for time
|
|
926
916
|
XOFFSET: 0,
|
|
@@ -957,53 +947,53 @@ const En = (t, e) => {
|
|
|
957
947
|
// Maximum duration window (5min)
|
|
958
948
|
INITDURATION: 15e6
|
|
959
949
|
// Initial duration window (15sec)
|
|
960
|
-
}, m = t, h =
|
|
961
|
-
addAnnotation:
|
|
962
|
-
updateAnnotation:
|
|
963
|
-
removeAnnotation:
|
|
964
|
-
} =
|
|
950
|
+
}, m = t, h = et(), { viewerChannels: _, needsRerender: V } = Je(h), {
|
|
951
|
+
addAnnotation: j,
|
|
952
|
+
updateAnnotation: C,
|
|
953
|
+
removeAnnotation: M
|
|
954
|
+
} = An(), P = y(null), E = y(null), I = y(null), v = y(null), S = y(null), W = y(null), O = y(null), b = y(null), X = y(0), G = y(0), D = y(0), U = y(0), H = y(0), Z = y(0), ae = y(0), x = y(1), Q = y(1 / 10), q = y(!1), se = y(!1), de = y(null), ee = y(!1), B = y(!1), ie = z(() => h.activeViewer), ke = z(() => _.value.map((r) => ({
|
|
965
955
|
...r,
|
|
966
956
|
selected: !!r.selected
|
|
967
|
-
}))),
|
|
957
|
+
}))), Ae = z(() => ke.value.filter((r) => r.visible)), Te = z(() => {
|
|
968
958
|
let r = !1;
|
|
969
|
-
return
|
|
970
|
-
}), Se = z(() =>
|
|
959
|
+
return Z.value / Se.value < 30 && (r = !0), r;
|
|
960
|
+
}), Se = z(() => Ae.value.length), le = async () => {
|
|
971
961
|
if (console.log("onresize..."), !P.value)
|
|
972
962
|
return;
|
|
973
963
|
const r = document.getElementById("ts_viewer");
|
|
974
964
|
if (!r)
|
|
975
965
|
return;
|
|
976
966
|
const f = window.getComputedStyle(r, null), d = parseInt(f.getPropertyValue("height")), w = m.isPreview ? 0 : 100;
|
|
977
|
-
|
|
978
|
-
const
|
|
979
|
-
|
|
967
|
+
X.value = d - w, await re(), G.value = P.value.offsetWidth;
|
|
968
|
+
const R = I.value;
|
|
969
|
+
R && (ae.value = R.clientWidth, H.value = G.value - R.clientWidth - 16, Z.value = X.value - 40);
|
|
980
970
|
};
|
|
981
|
-
|
|
982
|
-
var d, w,
|
|
983
|
-
(d = E.value) != null && d.resetComponentState && E.value.resetComponentState(), r && r.channels && r.channels.length > 0 &&
|
|
984
|
-
}, { immediate: !1, deep: !0 }),
|
|
971
|
+
Ie(() => ie.value, async (r, f) => {
|
|
972
|
+
var d, w, R;
|
|
973
|
+
(d = E.value) != null && d.resetComponentState && E.value.resetComponentState(), r && r.channels && r.channels.length > 0 && Re(), je(), await re(), (w = E.value) != null && w.initSegmentSpans && E.value.initSegmentSpans(), (R = E.value) != null && R.getAnnotations && E.value.getAnnotations();
|
|
974
|
+
}, { immediate: !1, deep: !0 }), Ie(Se, (r, f) => {
|
|
985
975
|
f !== void 0 && r !== f && (console.log(`Number of visible channels changed from ${f} to ${r}`), setTimeout(() => {
|
|
986
976
|
var d;
|
|
987
|
-
|
|
977
|
+
le(), (d = v.value) != null && d.renderAll && v.value.renderAll();
|
|
988
978
|
}, 20));
|
|
989
979
|
});
|
|
990
|
-
const
|
|
980
|
+
const a = (r) => {
|
|
991
981
|
store.dispatch("viewerModule/setActiveAnnotation", r).then(() => {
|
|
992
982
|
v.value.renderAnnotationCanvas(), q.value = !0;
|
|
993
983
|
});
|
|
994
984
|
};
|
|
995
|
-
|
|
996
|
-
r && (console.log(`TSViewer: Re-rendering due to: ${r.cause} (${r.timestamp})`),
|
|
985
|
+
Ie(V, (r) => {
|
|
986
|
+
r && (console.log(`TSViewer: Re-rendering due to: ${r.cause} (${r.timestamp})`), re(() => {
|
|
997
987
|
var f;
|
|
998
988
|
r.cause === "channel-visibility" ? setTimeout(() => {
|
|
999
989
|
var d;
|
|
1000
|
-
|
|
990
|
+
le(), (d = v.value) != null && d.renderAll && v.value.renderAll();
|
|
1001
991
|
}, 10) : (f = v.value) != null && f.renderAll && v.value.renderAll();
|
|
1002
992
|
}), h.resetRerenderTrigger(null));
|
|
1003
993
|
}, { deep: !0 });
|
|
1004
|
-
const
|
|
1005
|
-
|
|
1006
|
-
},
|
|
994
|
+
const c = (r) => {
|
|
995
|
+
a(r);
|
|
996
|
+
}, p = async (r) => {
|
|
1007
997
|
if (console.log("📍 TSViewer: onCreateUpdateAnnotation received:", r), !r || Object.keys(r).length === 0) {
|
|
1008
998
|
console.error("🚨 TSViewer: Received empty annotation!");
|
|
1009
999
|
return;
|
|
@@ -1014,153 +1004,153 @@ const En = (t, e) => {
|
|
|
1014
1004
|
}
|
|
1015
1005
|
q.value = !1;
|
|
1016
1006
|
try {
|
|
1017
|
-
r.id ? (console.log("📍 TSViewer: Updating annotation via composable"), await
|
|
1007
|
+
r.id ? (console.log("📍 TSViewer: Updating annotation via composable"), await C(r), L()) : (console.log("📍 TSViewer: Creating annotation via composable"), await j(r), ot()), console.log("📍 TSViewer: Annotation operation completed successfully");
|
|
1018
1008
|
} catch (f) {
|
|
1019
1009
|
console.error("📍 TSViewer: Error creating/updating annotation:", f), q.value = !0;
|
|
1020
1010
|
}
|
|
1021
|
-
},
|
|
1011
|
+
}, L = () => {
|
|
1022
1012
|
v.value.renderAnnotationCanvas();
|
|
1023
|
-
},
|
|
1024
|
-
|
|
1025
|
-
},
|
|
1026
|
-
|
|
1013
|
+
}, te = (r) => {
|
|
1014
|
+
de.value = r, ee.value = !0;
|
|
1015
|
+
}, tt = async (r) => {
|
|
1016
|
+
ee.value = !1;
|
|
1027
1017
|
try {
|
|
1028
|
-
await
|
|
1018
|
+
await M(r), nt(), console.log("📍 TSViewer: Annotation deleted successfully");
|
|
1029
1019
|
} catch (f) {
|
|
1030
1020
|
console.error("📍 TSViewer: Error deleting annotation:", f);
|
|
1031
1021
|
}
|
|
1032
|
-
},
|
|
1022
|
+
}, nt = () => {
|
|
1033
1023
|
v.value.renderAnnotationCanvas();
|
|
1034
|
-
},
|
|
1024
|
+
}, rt = (r, f, d, w, R, ue) => {
|
|
1035
1025
|
if (console.log("📍 TSViewer: onAddAnnotation called with:", {
|
|
1036
1026
|
startTime: r,
|
|
1037
1027
|
duration: f,
|
|
1038
1028
|
allChannels: d,
|
|
1039
1029
|
label: w,
|
|
1040
|
-
description:
|
|
1041
|
-
layer:
|
|
1042
|
-
}), !
|
|
1043
|
-
console.error("Invalid layer provided to onAddAnnotation:",
|
|
1030
|
+
description: R,
|
|
1031
|
+
layer: ue
|
|
1032
|
+
}), !ue || !ue.id) {
|
|
1033
|
+
console.error("Invalid layer provided to onAddAnnotation:", ue);
|
|
1044
1034
|
return;
|
|
1045
1035
|
}
|
|
1046
|
-
const
|
|
1036
|
+
const Et = h.viewerSelectedChannels || [], Ot = d ? [] : Et.map((Pt) => Pt.id), Ue = {
|
|
1047
1037
|
id: null,
|
|
1048
1038
|
label: w || "Event",
|
|
1049
|
-
description:
|
|
1039
|
+
description: R || "",
|
|
1050
1040
|
start: Math.floor(r),
|
|
1051
1041
|
end: Math.floor(r + f),
|
|
1052
1042
|
duration: Math.floor(f),
|
|
1053
|
-
channelIds:
|
|
1043
|
+
channelIds: Ot,
|
|
1054
1044
|
allChannels: d,
|
|
1055
|
-
layer_id:
|
|
1045
|
+
layer_id: ue.id,
|
|
1056
1046
|
selected: !0,
|
|
1057
1047
|
userId: null
|
|
1058
1048
|
};
|
|
1059
|
-
console.log("📍 TSViewer: Created annotation object:",
|
|
1060
|
-
},
|
|
1049
|
+
console.log("📍 TSViewer: Created annotation object:", Ue), h.setActiveAnnotation(Ue), console.log("📍 TSViewer: Store now contains:", h.activeAnnotation), q.value = !0, console.log("📍 TSViewer: Modal opened with annotation data");
|
|
1050
|
+
}, ot = () => {
|
|
1061
1051
|
v.value.renderAnnotationCanvas();
|
|
1062
|
-
},
|
|
1052
|
+
}, at = (r) => {
|
|
1063
1053
|
v.value.createAnnotationLayer(r);
|
|
1064
|
-
},
|
|
1065
|
-
ae.value = !1;
|
|
1066
|
-
}, dt = () => {
|
|
1067
|
-
v.value.resetFocusedAnnotation(), v.value.renderAnnotationCanvas(), q.value = !1;
|
|
1068
|
-
}, ft = () => {
|
|
1054
|
+
}, De = () => {
|
|
1069
1055
|
se.value = !1;
|
|
1070
|
-
},
|
|
1056
|
+
}, st = () => {
|
|
1057
|
+
v.value.resetFocusedAnnotation(), v.value.renderAnnotationCanvas(), q.value = !1;
|
|
1058
|
+
}, it = () => {
|
|
1059
|
+
B.value = !1;
|
|
1060
|
+
}, lt = (r) => {
|
|
1071
1061
|
r.stopPropagation(), r.preventDefault();
|
|
1072
1062
|
const f = r.detail.sourceEvent.metaKey;
|
|
1073
|
-
|
|
1074
|
-
},
|
|
1063
|
+
Le({ channelId: r.currentTarget.dataset.id, append: f }), v.value.renderAll();
|
|
1064
|
+
}, ut = () => {
|
|
1075
1065
|
D.value = v.value.getNextAnnotation();
|
|
1076
|
-
},
|
|
1066
|
+
}, ct = () => {
|
|
1077
1067
|
D.value = v.value.getPreviousAnnotation();
|
|
1078
|
-
},
|
|
1079
|
-
|
|
1080
|
-
},
|
|
1068
|
+
}, dt = (r) => {
|
|
1069
|
+
Ne(r * 1e6);
|
|
1070
|
+
}, ft = () => {
|
|
1081
1071
|
x.value = x.value * 1.25;
|
|
1082
|
-
},
|
|
1072
|
+
}, vt = () => {
|
|
1083
1073
|
x.value = x.value * 0.8;
|
|
1084
|
-
},
|
|
1074
|
+
}, pt = () => {
|
|
1085
1075
|
E.value.getAnnotations();
|
|
1086
|
-
},
|
|
1087
|
-
},
|
|
1076
|
+
}, ht = () => {
|
|
1077
|
+
}, gt = () => {
|
|
1088
1078
|
console.log("Page forward triggered from toolbar");
|
|
1089
1079
|
const r = Math.max(
|
|
1090
|
-
D.value - 3 / 4 *
|
|
1080
|
+
D.value - 3 / 4 * U.value,
|
|
1091
1081
|
O.value
|
|
1092
1082
|
);
|
|
1093
|
-
|
|
1083
|
+
ne(r), re(() => {
|
|
1094
1084
|
var f;
|
|
1095
1085
|
(f = v.value) == null || f.renderAll();
|
|
1096
1086
|
});
|
|
1097
|
-
},
|
|
1087
|
+
}, yt = () => {
|
|
1098
1088
|
console.log("Page forward triggered from toolbar");
|
|
1099
1089
|
const r = Math.min(
|
|
1100
|
-
D.value + 3 / 4 *
|
|
1101
|
-
|
|
1090
|
+
D.value + 3 / 4 * U.value,
|
|
1091
|
+
b.value - U.value
|
|
1102
1092
|
);
|
|
1103
|
-
console.log(`Moving from ${D.value} to ${r}`),
|
|
1093
|
+
console.log(`Moving from ${D.value} to ${r}`), ne(r), re(() => {
|
|
1104
1094
|
var f, d;
|
|
1105
1095
|
(f = v.value) != null && f.invalidate && v.value.invalidate(), (d = v.value) != null && d.renderAll && v.value.renderAll();
|
|
1106
1096
|
});
|
|
1107
|
-
},
|
|
1097
|
+
}, mt = (r) => {
|
|
1108
1098
|
let f = v.value.rsPeriod;
|
|
1109
|
-
|
|
1099
|
+
ne(r.annotation.start - (Q.value * H.value - s.CURSOROFFSET) * f), re(() => {
|
|
1110
1100
|
var d;
|
|
1111
1101
|
(d = v.value) == null || d.renderAll();
|
|
1112
1102
|
});
|
|
1113
|
-
},
|
|
1114
|
-
const f =
|
|
1103
|
+
}, Le = (r) => {
|
|
1104
|
+
const f = _.value.map((d) => {
|
|
1115
1105
|
const w = d.selected;
|
|
1116
1106
|
return r.append === !1 && (d.selected = !1), r.channelId === d.id && (d.selected = !w), d;
|
|
1117
1107
|
});
|
|
1118
1108
|
h.setChannels(f);
|
|
1119
|
-
},
|
|
1120
|
-
const d =
|
|
1109
|
+
}, wt = (r, f) => {
|
|
1110
|
+
const d = _.value.map((w) => (f === !1 && (w.selected = !1), w.id in r && (w.selected = !0), w));
|
|
1121
1111
|
h.setChannels(d);
|
|
1122
|
-
},
|
|
1112
|
+
}, ne = (r) => {
|
|
1123
1113
|
D.value = r;
|
|
1124
|
-
},
|
|
1114
|
+
}, At = (r) => {
|
|
1125
1115
|
Q.value = r;
|
|
1126
|
-
},
|
|
1116
|
+
}, Tt = (r) => {
|
|
1127
1117
|
x.value = r;
|
|
1128
|
-
},
|
|
1129
|
-
r > s.MAXDURATION ?
|
|
1130
|
-
},
|
|
1118
|
+
}, Ne = (r) => {
|
|
1119
|
+
r > s.MAXDURATION ? U.value = s.MAXDURATION : U.value = r;
|
|
1120
|
+
}, St = (r, f, d) => (s.DEFAULTDPI * window.devicePixelRatio / (f * d) / 25.4).toFixed(1) + " " + r.unit + "/mm", Re = () => {
|
|
1131
1121
|
var f;
|
|
1132
1122
|
const r = (f = ie.value) == null ? void 0 : f.channels;
|
|
1133
1123
|
if (console.log("🔄 initTimeRange called with channels:", (r == null ? void 0 : r.length) || 0), r && r.length > 0) {
|
|
1134
|
-
O.value = r[0].start,
|
|
1124
|
+
O.value = r[0].start, b.value = r[0].end;
|
|
1135
1125
|
for (let w = 1; w < r.length; w++)
|
|
1136
|
-
r[w].start < O.value && (O.value = r[w].start), r[w].end >
|
|
1126
|
+
r[w].start < O.value && (O.value = r[w].start), r[w].end > b.value && (b.value = r[w].end);
|
|
1137
1127
|
const d = D.value;
|
|
1138
1128
|
D.value = O.value, console.log("📅 Time range initialized:", {
|
|
1139
1129
|
ts_start: O.value,
|
|
1140
|
-
ts_end:
|
|
1130
|
+
ts_end: b.value,
|
|
1141
1131
|
oldStart: d,
|
|
1142
1132
|
newStart: D.value,
|
|
1143
|
-
duration:
|
|
1133
|
+
duration: U.value,
|
|
1144
1134
|
startDate: new Date(O.value / 1e3).toISOString(),
|
|
1145
|
-
endDate: new Date(
|
|
1135
|
+
endDate: new Date(b.value / 1e3).toISOString()
|
|
1146
1136
|
});
|
|
1147
1137
|
} else
|
|
1148
1138
|
console.warn("⚠️ initTimeRange: No channels found in activeViewer");
|
|
1149
|
-
},
|
|
1150
|
-
|
|
1151
|
-
},
|
|
1152
|
-
|
|
1153
|
-
},
|
|
1154
|
-
const f =
|
|
1155
|
-
w.onChannels = f,
|
|
1156
|
-
},
|
|
1139
|
+
}, It = () => {
|
|
1140
|
+
Re();
|
|
1141
|
+
}, Ct = (r) => {
|
|
1142
|
+
se.value = !0;
|
|
1143
|
+
}, _t = (r) => {
|
|
1144
|
+
const f = ge([], "channels", r), d = ge("", "filter", r), w = S.value;
|
|
1145
|
+
w.onChannels = f, pn(d) ? (w.input0 = NaN, w.input1 = NaN, w.selectedFilter = null, w.selectedNotch = null) : (w.input0 = d.input0, w.input1 = d.input1), B.value = !0;
|
|
1146
|
+
}, bt = (r) => {
|
|
1157
1147
|
v.value.setFilters(r);
|
|
1158
|
-
},
|
|
1148
|
+
}, je = () => {
|
|
1159
1149
|
var r, f;
|
|
1160
1150
|
(r = v.value) == null || r.initViewerCanvas(), (f = v.value) == null || f.renderAll();
|
|
1161
1151
|
};
|
|
1162
|
-
return
|
|
1163
|
-
|
|
1152
|
+
return Dt(() => {
|
|
1153
|
+
It();
|
|
1164
1154
|
const r = document.getElementById("ts_viewer");
|
|
1165
1155
|
if (!r) {
|
|
1166
1156
|
console.warn("ts_viewer element not found");
|
|
@@ -1168,160 +1158,160 @@ const En = (t, e) => {
|
|
|
1168
1158
|
}
|
|
1169
1159
|
var f = window.getComputedStyle(r, null);
|
|
1170
1160
|
const d = parseInt(f.getPropertyValue("height")), w = m.isPreview ? 0 : 100;
|
|
1171
|
-
|
|
1172
|
-
const
|
|
1173
|
-
|
|
1174
|
-
}),
|
|
1175
|
-
window.removeEventListener("resize",
|
|
1161
|
+
X.value = d - w, P.value && (G.value = P.value.offsetWidth), window.addEventListener("resize", le);
|
|
1162
|
+
const R = I.value;
|
|
1163
|
+
R && (ae.value = R.clientWidth, H.value = G.value - R.clientWidth - 5 - 10, Z.value = X.value - 88), U.value = s.INITDURATION, je();
|
|
1164
|
+
}), Lt(() => {
|
|
1165
|
+
window.removeEventListener("resize", le);
|
|
1176
1166
|
}), e({
|
|
1177
|
-
openEditAnnotationDialog:
|
|
1178
|
-
confirmDeleteAnnotation:
|
|
1179
|
-
selectAnnotation:
|
|
1180
|
-
selectChannel:
|
|
1181
|
-
selectChannels:
|
|
1182
|
-
openLayerWindow:
|
|
1183
|
-
openFilterWindow:
|
|
1184
|
-
setTimeseriesFilters:
|
|
1185
|
-
}), (r, f) => (
|
|
1167
|
+
openEditAnnotationDialog: a,
|
|
1168
|
+
confirmDeleteAnnotation: te,
|
|
1169
|
+
selectAnnotation: mt,
|
|
1170
|
+
selectChannel: Le,
|
|
1171
|
+
selectChannels: wt,
|
|
1172
|
+
openLayerWindow: Ct,
|
|
1173
|
+
openFilterWindow: _t,
|
|
1174
|
+
setTimeseriesFilters: bt
|
|
1175
|
+
}), (r, f) => (fe(), Ce("div", {
|
|
1186
1176
|
id: "ts_viewer",
|
|
1187
1177
|
ref_key: "ts_viewer",
|
|
1188
1178
|
ref: P,
|
|
1189
1179
|
class: _e([t.isPreview ? "timeseries-viewer preview" : "timeseries-viewer"])
|
|
1190
1180
|
}, [
|
|
1191
|
-
|
|
1181
|
+
oe(Y(n), {
|
|
1192
1182
|
ref_key: "scrubber",
|
|
1193
1183
|
ref: E,
|
|
1194
1184
|
ts_start: O.value,
|
|
1195
|
-
ts_end:
|
|
1196
|
-
"c-width":
|
|
1197
|
-
"label-width":
|
|
1185
|
+
ts_end: b.value,
|
|
1186
|
+
"c-width": H.value,
|
|
1187
|
+
"label-width": ae.value,
|
|
1198
1188
|
"cursor-loc": Q.value,
|
|
1199
1189
|
start: D.value,
|
|
1200
|
-
duration:
|
|
1190
|
+
duration: U.value,
|
|
1201
1191
|
constants: s,
|
|
1202
1192
|
"active-viewer": ie.value,
|
|
1203
|
-
onSetStart:
|
|
1193
|
+
onSetStart: ne
|
|
1204
1194
|
}, null, 8, ["ts_start", "ts_end", "c-width", "label-width", "cursor-loc", "start", "duration", "active-viewer"]),
|
|
1205
|
-
|
|
1206
|
-
|
|
1195
|
+
ce("div", Sn, [
|
|
1196
|
+
ce("div", {
|
|
1207
1197
|
id: "channelLabels",
|
|
1208
1198
|
ref_key: "channelLabels",
|
|
1209
1199
|
ref: I
|
|
1210
1200
|
}, [
|
|
1211
|
-
(
|
|
1201
|
+
(fe(!0), Ce(jt, null, Ut(Ae.value, (d) => (fe(), Ce("div", {
|
|
1212
1202
|
key: d.displayName,
|
|
1213
1203
|
class: "chLabelWrap",
|
|
1214
1204
|
"data-id": d.id,
|
|
1215
|
-
onTap:
|
|
1205
|
+
onTap: lt
|
|
1216
1206
|
}, [
|
|
1217
|
-
|
|
1207
|
+
ce("div", {
|
|
1218
1208
|
class: _e([d.selected ? "labelDiv selected" : "labelDiv"])
|
|
1219
|
-
},
|
|
1220
|
-
|
|
1209
|
+
}, Ve(d.displayName), 3),
|
|
1210
|
+
ce("div", {
|
|
1221
1211
|
class: _e(["chLabelIndWrap", [d.selected ? "selected" : ""]]),
|
|
1222
|
-
hidden:
|
|
1212
|
+
hidden: Te.value
|
|
1223
1213
|
}, [
|
|
1224
|
-
|
|
1214
|
+
ce("div", {
|
|
1225
1215
|
class: "chLabelInd",
|
|
1226
|
-
hidden:
|
|
1227
|
-
},
|
|
1228
|
-
], 10,
|
|
1229
|
-
], 40,
|
|
1216
|
+
hidden: Te.value
|
|
1217
|
+
}, Ve(St(d, x.value, d.rowScale)), 9, _n)
|
|
1218
|
+
], 10, Cn)
|
|
1219
|
+
], 40, In))), 128))
|
|
1230
1220
|
], 512),
|
|
1231
|
-
|
|
1221
|
+
oe(Y(o), {
|
|
1232
1222
|
ref_key: "viewerCanvas",
|
|
1233
1223
|
ref: v,
|
|
1234
|
-
window_height:
|
|
1235
|
-
window_width:
|
|
1236
|
-
duration:
|
|
1224
|
+
window_height: X.value,
|
|
1225
|
+
window_width: G.value,
|
|
1226
|
+
duration: U.value,
|
|
1237
1227
|
start: D.value,
|
|
1238
|
-
"c-width":
|
|
1239
|
-
"c-height":
|
|
1228
|
+
"c-width": H.value,
|
|
1229
|
+
"c-height": Z.value,
|
|
1240
1230
|
constants: s,
|
|
1241
1231
|
"ts-start": O.value,
|
|
1242
|
-
"ts-end":
|
|
1232
|
+
"ts-end": b.value,
|
|
1243
1233
|
"cursor-loc": Q.value,
|
|
1244
1234
|
"global-zoom-mult": x.value,
|
|
1245
1235
|
"active-viewer": ie.value,
|
|
1246
|
-
onSetStart:
|
|
1247
|
-
onSetCursor:
|
|
1248
|
-
onSetGlobalZoom:
|
|
1249
|
-
onSetDuration:
|
|
1250
|
-
onChannelsInitialized:
|
|
1251
|
-
onAnnLayersInitialized:
|
|
1252
|
-
onCloseAnnotationLayerWindow:
|
|
1253
|
-
onAddAnnotation:
|
|
1254
|
-
onUpdateAnnotation:
|
|
1236
|
+
onSetStart: ne,
|
|
1237
|
+
onSetCursor: At,
|
|
1238
|
+
onSetGlobalZoom: Tt,
|
|
1239
|
+
onSetDuration: Ne,
|
|
1240
|
+
onChannelsInitialized: ht,
|
|
1241
|
+
onAnnLayersInitialized: pt,
|
|
1242
|
+
onCloseAnnotationLayerWindow: De,
|
|
1243
|
+
onAddAnnotation: rt,
|
|
1244
|
+
onUpdateAnnotation: c
|
|
1255
1245
|
}, null, 8, ["window_height", "window_width", "duration", "start", "c-width", "c-height", "ts-start", "ts-end", "cursor-loc", "global-zoom-mult", "active-viewer"])
|
|
1256
1246
|
]),
|
|
1257
|
-
t.isPreview ?
|
|
1247
|
+
t.isPreview ? Rt("", !0) : (fe(), Nt(Y(i), {
|
|
1258
1248
|
key: 0,
|
|
1259
1249
|
constants: s,
|
|
1260
|
-
duration:
|
|
1250
|
+
duration: U.value,
|
|
1261
1251
|
start: D.value,
|
|
1262
|
-
onPageBack:
|
|
1263
|
-
onPageForward:
|
|
1264
|
-
onIncrementZoom:
|
|
1265
|
-
onDecrementZoom:
|
|
1266
|
-
onUpdateDuration:
|
|
1267
|
-
onNextAnnotation:
|
|
1268
|
-
onPreviousAnnotation:
|
|
1269
|
-
onSetStart:
|
|
1252
|
+
onPageBack: gt,
|
|
1253
|
+
onPageForward: yt,
|
|
1254
|
+
onIncrementZoom: ft,
|
|
1255
|
+
onDecrementZoom: vt,
|
|
1256
|
+
onUpdateDuration: dt,
|
|
1257
|
+
onNextAnnotation: ut,
|
|
1258
|
+
onPreviousAnnotation: ct,
|
|
1259
|
+
onSetStart: ne
|
|
1270
1260
|
}, null, 8, ["duration", "start"])),
|
|
1271
|
-
|
|
1261
|
+
oe(Y(u), {
|
|
1272
1262
|
ref_key: "filterWindow",
|
|
1273
|
-
ref:
|
|
1274
|
-
visible:
|
|
1275
|
-
"onUpdate:visible": f[0] || (f[0] = (d) =>
|
|
1276
|
-
onCloseWindow:
|
|
1263
|
+
ref: S,
|
|
1264
|
+
visible: B.value,
|
|
1265
|
+
"onUpdate:visible": f[0] || (f[0] = (d) => B.value = d),
|
|
1266
|
+
onCloseWindow: it
|
|
1277
1267
|
}, null, 8, ["visible"]),
|
|
1278
|
-
|
|
1268
|
+
oe(Y(g), {
|
|
1279
1269
|
ref_key: "annotationModal",
|
|
1280
1270
|
ref: W,
|
|
1281
1271
|
visible: q.value,
|
|
1282
1272
|
"onUpdate:visible": f[1] || (f[1] = (d) => q.value = d),
|
|
1283
|
-
onCloseWindow:
|
|
1284
|
-
onCreateUpdateAnnotation:
|
|
1273
|
+
onCloseWindow: st,
|
|
1274
|
+
onCreateUpdateAnnotation: p
|
|
1285
1275
|
}, null, 8, ["visible"]),
|
|
1286
|
-
|
|
1287
|
-
visible:
|
|
1288
|
-
"delete-annotation":
|
|
1289
|
-
"onUpdate:visible": f[2] || (f[2] = (d) =>
|
|
1290
|
-
onDelete:
|
|
1276
|
+
oe(Y(A), {
|
|
1277
|
+
visible: ee.value,
|
|
1278
|
+
"delete-annotation": de.value,
|
|
1279
|
+
"onUpdate:visible": f[2] || (f[2] = (d) => ee.value = d),
|
|
1280
|
+
onDelete: tt
|
|
1291
1281
|
}, null, 8, ["visible", "delete-annotation"]),
|
|
1292
|
-
|
|
1293
|
-
visible:
|
|
1294
|
-
onCloseWindow:
|
|
1295
|
-
onCreateLayer:
|
|
1282
|
+
oe(Y(l), {
|
|
1283
|
+
visible: se.value,
|
|
1284
|
+
onCloseWindow: De,
|
|
1285
|
+
onCreateLayer: at
|
|
1296
1286
|
}, null, 8, ["visible"])
|
|
1297
1287
|
], 2));
|
|
1298
1288
|
}
|
|
1299
|
-
},
|
|
1289
|
+
}, En = /* @__PURE__ */ Tn(bn, [["__scopeId", "data-v-d5eda6cd"]]), Ln = {
|
|
1300
1290
|
install(t) {
|
|
1301
|
-
t.component("TSViewer",
|
|
1291
|
+
t.component("TSViewer", En);
|
|
1302
1292
|
}
|
|
1303
1293
|
};
|
|
1304
1294
|
export {
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1295
|
+
En as T,
|
|
1296
|
+
T as _,
|
|
1297
|
+
Oe as a,
|
|
1308
1298
|
N as b,
|
|
1309
1299
|
k as c,
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1300
|
+
qt as d,
|
|
1301
|
+
Ft as e,
|
|
1302
|
+
Zt as f,
|
|
1303
|
+
Tn as g,
|
|
1304
|
+
ve as h,
|
|
1305
|
+
Dn as i,
|
|
1306
|
+
Ee as j,
|
|
1307
|
+
Be as k,
|
|
1308
|
+
xt as l,
|
|
1319
1309
|
F as m,
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1310
|
+
Qt as n,
|
|
1311
|
+
he as o,
|
|
1312
|
+
ge as p,
|
|
1313
|
+
Kt as q,
|
|
1314
|
+
ye as r,
|
|
1315
|
+
Ln as s,
|
|
1316
|
+
et as u
|
|
1327
1317
|
};
|