tsviewer 1.0.32 → 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/dist/{BFLibraryButton-BNlclUro.mjs → BFLibraryButton-CUTVuQul.mjs} +1 -1
- package/dist/{IconSelection-CzE3ngGY.mjs → IconSelection-DLam7boT.mjs} +1 -1
- package/dist/{TSAnnotationCanvas-CoRxWjXn.mjs → TSAnnotationCanvas-DF-8it3n.mjs} +3 -3
- package/dist/{TSAnnotationModal-B-OHQVza.mjs → TSAnnotationModal-BdY0Hlvv.mjs} +3 -3
- package/dist/{TSFilterModal-ZewnIuXD.mjs → TSFilterModal-D-iGQpuh.mjs} +3 -3
- package/dist/{TSScrubber-CfI0H_CE.mjs → TSScrubber-Dby56vNH.mjs} +1 -1
- package/dist/{TSViewerCanvas-BZitVLGc.mjs → TSViewerCanvas-DdXL6ec8.mjs} +4 -4
- package/dist/{TSViewerLayerWindow-U3NyH3nc.mjs → TSViewerLayerWindow-DiM4ubPl.mjs} +2 -2
- package/dist/{TSViewerToolbar-BwtRehDx.mjs → TSViewerToolbar-bujnuU5I.mjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-Ce9pB5DQ.mjs → TsAnnotationDeleteDialog-C6cO4tc8.mjs} +3 -3
- package/dist/{index-BPrTaCv-.mjs → index-BZlDr3yB.mjs} +440 -456
- package/dist/{pathOr-B0o1s29P.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
|
-
function
|
|
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 Xt(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 Ht(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 Jt = {
|
|
|
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 Yt = /* @__PURE__ */ D(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,45 +449,24 @@ var mn = /* @__PURE__ */ D(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
|
-
pennsieveApiUrl: Qe,
|
|
469
|
-
pennsieveApiUrlDev: et,
|
|
470
|
-
pennsieveApi2Url: tt,
|
|
471
|
-
pennsieveApi2UrlDev: nt,
|
|
472
|
-
timeSeriesPublicUrl: rt,
|
|
473
|
-
timeSeriesPublicUrlDev: ot,
|
|
474
|
-
timeSeriesApi: at,
|
|
475
|
-
timeSeriesApiDev: st
|
|
476
|
-
}, _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
477
|
-
__proto__: null,
|
|
478
|
-
default: In,
|
|
479
|
-
pennsieveApi2Url: tt,
|
|
480
|
-
pennsieveApi2UrlDev: nt,
|
|
481
|
-
pennsieveApiUrl: Qe,
|
|
482
|
-
pennsieveApiUrlDev: et,
|
|
483
|
-
timeSeriesApi: at,
|
|
484
|
-
timeSeriesApiDev: st,
|
|
485
|
-
timeSeriesPublicUrl: rt,
|
|
486
|
-
timeSeriesPublicUrlDev: ot
|
|
487
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
488
|
-
async function fe() {
|
|
467
|
+
async function ve() {
|
|
489
468
|
try {
|
|
490
|
-
return
|
|
469
|
+
return Mt().then(
|
|
491
470
|
(t) => {
|
|
492
471
|
var e;
|
|
493
472
|
return (e = t == null ? void 0 : t.tokens) == null ? void 0 : e.accessToken.toString();
|
|
@@ -497,7 +476,7 @@ async function fe() {
|
|
|
497
476
|
console.error(t);
|
|
498
477
|
}
|
|
499
478
|
}
|
|
500
|
-
const
|
|
479
|
+
const gn = () => ({
|
|
501
480
|
openConnection: async (e, n, o) => await new Promise((g, A) => {
|
|
502
481
|
const l = e + "?session=" + o + "&package=" + n;
|
|
503
482
|
console.log("Opening WebSocket connection to:", l);
|
|
@@ -515,11 +494,11 @@ const bn = () => ({
|
|
|
515
494
|
console.error("WebSocket error:", h), A(h);
|
|
516
495
|
};
|
|
517
496
|
})
|
|
518
|
-
}),
|
|
519
|
-
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(() => () => {
|
|
520
499
|
const a = l.value.find((c) => c.selected);
|
|
521
500
|
return a || (console.warn("No active layer found, available layers:", l.value), l.value.length > 0 ? l.value[0] : null);
|
|
522
|
-
}),
|
|
501
|
+
}), M = () => {
|
|
523
502
|
let a = !1;
|
|
524
503
|
return l.value.forEach((c, p) => {
|
|
525
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 = []);
|
|
@@ -530,25 +509,27 @@ const bn = () => ({
|
|
|
530
509
|
e.value = a;
|
|
531
510
|
}, v = (a) => {
|
|
532
511
|
n.value = a;
|
|
533
|
-
},
|
|
512
|
+
}, S = (a) => {
|
|
534
513
|
o.value = a;
|
|
535
514
|
}, W = (a) => {
|
|
536
515
|
i.value = a;
|
|
537
516
|
}, O = (a) => {
|
|
538
517
|
u.value = a;
|
|
539
|
-
},
|
|
518
|
+
}, b = (a) => {
|
|
540
519
|
g.value = a;
|
|
520
|
+
}, X = (a) => {
|
|
521
|
+
Object.assign(t, a);
|
|
541
522
|
}, G = async (a) => {
|
|
542
|
-
const c = a.packageId, p = await
|
|
543
|
-
let L = t.
|
|
544
|
-
|
|
545
|
-
},
|
|
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) => {
|
|
546
527
|
var p;
|
|
547
528
|
return ((p = a == null ? void 0 : a.content) == null ? void 0 : p.state) === "READY";
|
|
548
|
-
},
|
|
529
|
+
}, U = (a) => {
|
|
549
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));
|
|
550
531
|
l.value = c, console.log("Set annotations with validated structure:", c);
|
|
551
|
-
},
|
|
532
|
+
}, H = (a) => {
|
|
552
533
|
if (!a && a !== 0) {
|
|
553
534
|
console.error("setActiveAnnotationLayer called with invalid layerId:", a);
|
|
554
535
|
return;
|
|
@@ -556,7 +537,7 @@ const bn = () => ({
|
|
|
556
537
|
s.value = a, l.value.forEach((p) => p.selected = !1);
|
|
557
538
|
const c = $(F("id", a), l.value);
|
|
558
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);
|
|
559
|
-
},
|
|
540
|
+
}, Z = (a) => {
|
|
560
541
|
if (l.value.forEach(
|
|
561
542
|
(c) => {
|
|
562
543
|
var p;
|
|
@@ -570,9 +551,9 @@ const bn = () => ({
|
|
|
570
551
|
}
|
|
571
552
|
}
|
|
572
553
|
m.value = a;
|
|
573
|
-
},
|
|
554
|
+
}, ae = (a) => {
|
|
574
555
|
h.value = a;
|
|
575
|
-
},
|
|
556
|
+
}, x = (a) => {
|
|
576
557
|
if (!a.id && a.id !== 0) {
|
|
577
558
|
console.error("Cannot create layer without ID:", a);
|
|
578
559
|
return;
|
|
@@ -593,32 +574,32 @@ const bn = () => ({
|
|
|
593
574
|
// Spread any additional properties
|
|
594
575
|
};
|
|
595
576
|
l.value.push(c), console.log("Created layer with validated structure:", c);
|
|
596
|
-
},
|
|
577
|
+
}, Q = (a) => {
|
|
597
578
|
const c = $(F("id", a.id), l.value);
|
|
598
579
|
if (c >= 0) {
|
|
599
580
|
const p = Object.assign(l.value[c], a);
|
|
600
581
|
l.value[c] = p;
|
|
601
582
|
}
|
|
602
|
-
},
|
|
583
|
+
}, q = (a) => {
|
|
603
584
|
const c = $(F("id", a.id), l.value);
|
|
604
585
|
c >= 0 && l.value.splice(c, 1);
|
|
605
|
-
},
|
|
586
|
+
}, se = (a) => {
|
|
606
587
|
const c = $(F("id", a.layer_id), l.value);
|
|
607
|
-
c >= 0 && (l.value[c].annotations || (l.value[c].annotations = []), l.value[c].annotations.push(a),
|
|
608
|
-
},
|
|
588
|
+
c >= 0 && (l.value[c].annotations || (l.value[c].annotations = []), l.value[c].annotations.push(a), Z(a));
|
|
589
|
+
}, de = (a) => {
|
|
609
590
|
const c = $(F("id", a.layer_id), l.value);
|
|
610
591
|
if (c >= 0) {
|
|
611
592
|
const p = l.value[c].annotations, L = $(F("id", a.id), p);
|
|
612
593
|
L >= 0 && (p[L] = a);
|
|
613
594
|
}
|
|
614
|
-
},
|
|
595
|
+
}, ee = (a) => {
|
|
615
596
|
const c = $(F("id", a.layer_id), l.value);
|
|
616
597
|
if (c >= 0) {
|
|
617
598
|
const p = l.value[c].annotations, L = $(F("id", a.id), p);
|
|
618
599
|
L >= 0 && p.splice(L, 1);
|
|
619
600
|
}
|
|
620
601
|
}, B = (a, c, p) => {
|
|
621
|
-
const L = e.value.find((
|
|
602
|
+
const L = e.value.find((te) => te.id === a);
|
|
622
603
|
L && (L[c] = p);
|
|
623
604
|
};
|
|
624
605
|
return {
|
|
@@ -636,26 +617,26 @@ const bn = () => ({
|
|
|
636
617
|
viewerActiveTool: h,
|
|
637
618
|
config: t,
|
|
638
619
|
// Getters
|
|
639
|
-
getMontageMessageByName:
|
|
640
|
-
viewerSelectedChannels:
|
|
641
|
-
getViewerActiveLayer:
|
|
620
|
+
getMontageMessageByName: V,
|
|
621
|
+
viewerSelectedChannels: j,
|
|
622
|
+
getViewerActiveLayer: C,
|
|
642
623
|
getAnnotationById: P,
|
|
643
624
|
// Actions
|
|
644
625
|
setChannels: I,
|
|
645
626
|
setViewerMontageScheme: v,
|
|
646
|
-
setCustomMontageMap:
|
|
627
|
+
setCustomMontageMap: S,
|
|
647
628
|
setWorkspaceMontages: W,
|
|
648
629
|
setViewerErrors: O,
|
|
649
|
-
setAnnotations:
|
|
650
|
-
setActiveAnnotationLayer:
|
|
651
|
-
setActiveAnnotation:
|
|
652
|
-
setActiveTool:
|
|
653
|
-
createLayer:
|
|
654
|
-
updateLayer:
|
|
655
|
-
deleteLayer:
|
|
656
|
-
createAnnotation:
|
|
657
|
-
updateAnnotation:
|
|
658
|
-
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,
|
|
659
640
|
updateChannelProperty: B,
|
|
660
641
|
updateChannelVisibility: (a, c) => {
|
|
661
642
|
B(a, "visible", c);
|
|
@@ -666,12 +647,14 @@ const bn = () => ({
|
|
|
666
647
|
updateChannelFilter: (a, c) => {
|
|
667
648
|
B(a, "filter", c);
|
|
668
649
|
},
|
|
669
|
-
validateAnnotationLayers:
|
|
650
|
+
validateAnnotationLayers: M,
|
|
670
651
|
resetViewer: () => {
|
|
671
|
-
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
|
+
});
|
|
672
655
|
},
|
|
673
656
|
triggerRerender: (a) => {
|
|
674
|
-
|
|
657
|
+
b({
|
|
675
658
|
timestamp: Date.now(),
|
|
676
659
|
cause: a
|
|
677
660
|
});
|
|
@@ -679,37 +662,38 @@ const bn = () => ({
|
|
|
679
662
|
resetRerenderTrigger: () => {
|
|
680
663
|
g.value = null;
|
|
681
664
|
},
|
|
682
|
-
isTSFileProcessed:
|
|
665
|
+
isTSFileProcessed: D,
|
|
683
666
|
fetchAndSetActiveViewer: G,
|
|
684
|
-
setActiveViewer: E
|
|
667
|
+
setActiveViewer: E,
|
|
668
|
+
setViewerConfig: X
|
|
685
669
|
};
|
|
686
670
|
});
|
|
687
|
-
function
|
|
671
|
+
function yn(t) {
|
|
688
672
|
if (useRoute().name === "docs-login")
|
|
689
673
|
return;
|
|
690
|
-
|
|
691
|
-
const n =
|
|
674
|
+
he(!1, K("shouldShowToast", t));
|
|
675
|
+
const n = he(!1, K("shouldRedirect", t));
|
|
692
676
|
this.clearState(), n && this.$route.fullPath;
|
|
693
677
|
}
|
|
694
|
-
const
|
|
678
|
+
const mn = (t) => Object.prototype.toString.call(t) === "[object String]", wn = (t) => {
|
|
695
679
|
Object.keys(t).forEach((e) => {
|
|
696
|
-
|
|
680
|
+
mn(t[e]) && (t[e] = t[e].trim());
|
|
697
681
|
});
|
|
698
682
|
};
|
|
699
|
-
function
|
|
683
|
+
function Dn(t, e) {
|
|
700
684
|
if (!t)
|
|
701
685
|
return Promise.reject({ status: 400, message: "Url is missing!" });
|
|
702
|
-
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);
|
|
703
687
|
let g = { headers: i, method: n };
|
|
704
688
|
if (u) {
|
|
705
|
-
typeof u == "object" &&
|
|
689
|
+
typeof u == "object" && wn(u);
|
|
706
690
|
const A = JSON.stringify(u);
|
|
707
691
|
g = Object.assign({}, g, { body: A });
|
|
708
692
|
}
|
|
709
693
|
return fetch(t, g).then((A) => A.status >= 400 ? Promise.reject(A) : A.json().catch(() => A));
|
|
710
694
|
}
|
|
711
|
-
function
|
|
712
|
-
const e =
|
|
695
|
+
function Ee(t) {
|
|
696
|
+
const e = K("status", t);
|
|
713
697
|
let n;
|
|
714
698
|
if (e === void 0) {
|
|
715
699
|
console.log(t);
|
|
@@ -719,13 +703,13 @@ function Ce(t) {
|
|
|
719
703
|
if (n === 400 && t.body)
|
|
720
704
|
t.body.getReader().read().then(({ done: o, value: i }) => {
|
|
721
705
|
const u = i instanceof Uint8Array ? String.fromCharCode.apply(null, i) : i;
|
|
722
|
-
|
|
706
|
+
Xe(he(u), hn(Xe(K("message"), JSON.parse), (g, A) => A))(u);
|
|
723
707
|
});
|
|
724
708
|
else if (n === 401)
|
|
725
|
-
return
|
|
709
|
+
return yn();
|
|
726
710
|
}
|
|
727
|
-
function
|
|
728
|
-
const t =
|
|
711
|
+
function An() {
|
|
712
|
+
const t = et(), { viewerChannels: e, viewerAnnotations: n } = Je(t), o = (l) => l.id || "", i = (l) => {
|
|
729
713
|
l.sort(function(m, h) {
|
|
730
714
|
return m.start < h.start ? -1 : m.start > h.start ? 1 : 0;
|
|
731
715
|
});
|
|
@@ -744,13 +728,13 @@ function Pn() {
|
|
|
744
728
|
if (s.id)
|
|
745
729
|
throw new TypeError("Trying to create an annotation that already exists", s.id);
|
|
746
730
|
let m = s.start, h = s.duration || s.end - s.start;
|
|
747
|
-
const
|
|
748
|
-
if (!
|
|
731
|
+
const _ = s.label, V = s.description, j = s.layer_id;
|
|
732
|
+
if (!_)
|
|
749
733
|
throw new Error("Annotation label is required");
|
|
750
734
|
if (m == null)
|
|
751
735
|
throw new Error("Annotation start time is required");
|
|
752
736
|
h < 0 && (h = -h, m = m - h);
|
|
753
|
-
let
|
|
737
|
+
let C = [];
|
|
754
738
|
if (console.log("🔧 useTsAnnotation: Processing channelIds...", {
|
|
755
739
|
hasChannelIds: s.channelIds && Array.isArray(s.channelIds),
|
|
756
740
|
allChannels: s.allChannels,
|
|
@@ -762,74 +746,74 @@ function Pn() {
|
|
|
762
746
|
const I = t.activeViewer.value.channels;
|
|
763
747
|
for (let v = 0; v < I.length; v++) {
|
|
764
748
|
const W = I[v].content.id;
|
|
765
|
-
|
|
749
|
+
C.push(W), console.log("🔧 useTsAnnotation: Added channel ID:", W);
|
|
766
750
|
}
|
|
767
751
|
} else if (s.channelIds && Array.isArray(s.channelIds) && s.channelIds.length > 0)
|
|
768
|
-
|
|
752
|
+
C = s.channelIds, console.log("🔧 useTsAnnotation: Using provided channelIds:", C);
|
|
769
753
|
else {
|
|
770
754
|
console.log("🔧 useTsAnnotation: Computing from selected channels");
|
|
771
755
|
for (let I = 0; I < e.value.length; I++) {
|
|
772
756
|
const v = e.value[I];
|
|
773
757
|
if (v.selected && v.visible) {
|
|
774
|
-
const
|
|
775
|
-
|
|
758
|
+
const S = o(v);
|
|
759
|
+
C.push(S), console.log("🔧 useTsAnnotation: Added selected channel ID:", S);
|
|
776
760
|
}
|
|
777
761
|
}
|
|
778
762
|
}
|
|
779
|
-
console.log("🔧 useTsAnnotation: Final channelIds:",
|
|
780
|
-
const
|
|
781
|
-
label:
|
|
782
|
-
name:
|
|
783
|
-
description:
|
|
763
|
+
console.log("🔧 useTsAnnotation: Final channelIds:", C);
|
|
764
|
+
const M = {
|
|
765
|
+
label: _,
|
|
766
|
+
name: _,
|
|
767
|
+
description: V || "",
|
|
784
768
|
start: Math.floor(m),
|
|
785
769
|
end: Math.floor(m + h),
|
|
786
|
-
channelIds:
|
|
770
|
+
channelIds: C
|
|
787
771
|
};
|
|
788
|
-
console.log("🔧 useTsAnnotation: API payload:",
|
|
789
|
-
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`;
|
|
790
774
|
console.log("🔧 useTsAnnotation: API URL:", E);
|
|
791
775
|
try {
|
|
792
|
-
const I = await
|
|
776
|
+
const I = await ve(), v = await fetch(`${E}?api_key=${I}`, {
|
|
793
777
|
method: "POST",
|
|
794
778
|
headers: {
|
|
795
779
|
"Content-Type": "application/json",
|
|
796
780
|
Accept: "application/json"
|
|
797
781
|
},
|
|
798
|
-
body: JSON.stringify(
|
|
782
|
+
body: JSON.stringify(M)
|
|
799
783
|
});
|
|
800
784
|
if (!v.ok) {
|
|
801
|
-
const
|
|
802
|
-
throw new Error(`HTTP ${v.status}: ${
|
|
785
|
+
const b = await v.text();
|
|
786
|
+
throw new Error(`HTTP ${v.status}: ${b}`);
|
|
803
787
|
}
|
|
804
|
-
const
|
|
805
|
-
console.log("🔧 useTsAnnotation: API success:",
|
|
788
|
+
const S = await v.json();
|
|
789
|
+
console.log("🔧 useTsAnnotation: API success:", S);
|
|
806
790
|
const W = {
|
|
807
791
|
name: "",
|
|
808
|
-
id:
|
|
809
|
-
label:
|
|
810
|
-
description:
|
|
811
|
-
start:
|
|
812
|
-
duration:
|
|
813
|
-
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,
|
|
814
798
|
cStart: null,
|
|
815
799
|
cEnd: null,
|
|
816
800
|
selected: !0,
|
|
817
|
-
channelIds:
|
|
818
|
-
allChannels:
|
|
801
|
+
channelIds: S.channelIds || C,
|
|
802
|
+
allChannels: C.length === 0 || C.length >= e.value.length,
|
|
819
803
|
// Use Pinia
|
|
820
|
-
layer_id:
|
|
821
|
-
userId:
|
|
804
|
+
layer_id: j,
|
|
805
|
+
userId: S.userId
|
|
822
806
|
};
|
|
823
|
-
|
|
807
|
+
S.linkedPackage && (W.linkedPackage = S.linkedPackage);
|
|
824
808
|
let O = 0;
|
|
825
|
-
for (let
|
|
826
|
-
if (n.value[
|
|
827
|
-
O =
|
|
809
|
+
for (let b = 0; b < n.value.length; b++)
|
|
810
|
+
if (n.value[b].id === j) {
|
|
811
|
+
O = b;
|
|
828
812
|
break;
|
|
829
813
|
}
|
|
830
814
|
return t.createAnnotation(W), n.value[O] && n.value[O].annotations && i(n.value[O].annotations), W;
|
|
831
815
|
} catch (I) {
|
|
832
|
-
throw console.error("🔧 useTsAnnotation: Error creating annotation:", I),
|
|
816
|
+
throw console.error("🔧 useTsAnnotation: Error creating annotation:", I), Ee(I), I;
|
|
833
817
|
}
|
|
834
818
|
},
|
|
835
819
|
updateAnnotation: async (l = null) => {
|
|
@@ -840,30 +824,30 @@ function Pn() {
|
|
|
840
824
|
throw new TypeError("Missing layer_id for annotation update", s);
|
|
841
825
|
let m = s.start, h = s.duration || s.end - s.start;
|
|
842
826
|
h < 0 && (h = -h, m = m - h);
|
|
843
|
-
const
|
|
827
|
+
const _ = {
|
|
844
828
|
label: s.label,
|
|
845
829
|
description: s.description || "",
|
|
846
830
|
start: Math.floor(m),
|
|
847
831
|
end: Math.floor(m + h),
|
|
848
832
|
channelIds: s.channelIds || []
|
|
849
833
|
};
|
|
850
|
-
console.log("🔧 useTsAnnotation: Update API payload:",
|
|
851
|
-
const
|
|
852
|
-
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);
|
|
853
837
|
try {
|
|
854
|
-
const
|
|
838
|
+
const C = await ve(), M = await fetch(`${j}?api_key=${C}`, {
|
|
855
839
|
method: "PUT",
|
|
856
840
|
headers: {
|
|
857
841
|
"Content-Type": "application/json",
|
|
858
842
|
Accept: "application/json"
|
|
859
843
|
},
|
|
860
|
-
body: JSON.stringify(
|
|
844
|
+
body: JSON.stringify(_)
|
|
861
845
|
});
|
|
862
|
-
if (!
|
|
863
|
-
const I = await
|
|
864
|
-
throw new Error(`HTTP ${
|
|
846
|
+
if (!M.ok) {
|
|
847
|
+
const I = await M.text();
|
|
848
|
+
throw new Error(`HTTP ${M.status}: ${I}`);
|
|
865
849
|
}
|
|
866
|
-
const P = await
|
|
850
|
+
const P = await M.json();
|
|
867
851
|
console.log("🔧 useTsAnnotation: Update API success:", P);
|
|
868
852
|
const E = {
|
|
869
853
|
...s,
|
|
@@ -871,8 +855,8 @@ function Pn() {
|
|
|
871
855
|
duration: P.end - P.start
|
|
872
856
|
};
|
|
873
857
|
return t.updateAnnotation(E), P;
|
|
874
|
-
} catch (
|
|
875
|
-
throw console.error("🔧 useTsAnnotation: Error updating annotation:",
|
|
858
|
+
} catch (C) {
|
|
859
|
+
throw console.error("🔧 useTsAnnotation: Error updating annotation:", C), Ee(C), C;
|
|
876
860
|
}
|
|
877
861
|
},
|
|
878
862
|
removeAnnotation: async (l) => {
|
|
@@ -884,31 +868,31 @@ function Pn() {
|
|
|
884
868
|
const m = t.activeViewer.value.content.id, h = `${t.config.apiUrl}/timeseries/${m}/layers/${s}/annotations/${l.id}`;
|
|
885
869
|
console.log("🔧 useTsAnnotation: Delete API URL:", h);
|
|
886
870
|
try {
|
|
887
|
-
const
|
|
871
|
+
const _ = await ve(), V = await fetch(`${h}?api_key=${_}`, {
|
|
888
872
|
method: "DELETE",
|
|
889
873
|
headers: {
|
|
890
874
|
Accept: "application/json"
|
|
891
875
|
}
|
|
892
876
|
});
|
|
893
|
-
if (!
|
|
894
|
-
const
|
|
895
|
-
throw new Error(`HTTP ${
|
|
877
|
+
if (!V.ok) {
|
|
878
|
+
const j = await V.text();
|
|
879
|
+
throw new Error(`HTTP ${V.status}: ${j}`);
|
|
896
880
|
}
|
|
897
881
|
return console.log("🔧 useTsAnnotation: Delete API success"), t.deleteAnnotation(l), !0;
|
|
898
|
-
} catch (
|
|
899
|
-
throw console.error("🔧 useTsAnnotation: Error deleting annotation:",
|
|
882
|
+
} catch (_) {
|
|
883
|
+
throw console.error("🔧 useTsAnnotation: Error deleting annotation:", _), Ee(_), _;
|
|
900
884
|
}
|
|
901
885
|
},
|
|
902
886
|
sortAnns: i,
|
|
903
887
|
getChannelId: o
|
|
904
888
|
};
|
|
905
889
|
}
|
|
906
|
-
const
|
|
890
|
+
const Tn = (t, e) => {
|
|
907
891
|
const n = t.__vccOpts || t;
|
|
908
892
|
for (const [o, i] of e)
|
|
909
893
|
n[o] = i;
|
|
910
894
|
return n;
|
|
911
|
-
},
|
|
895
|
+
}, Sn = { id: "channelCanvas" }, In = ["data-id"], Cn = ["hidden"], _n = ["hidden"], bn = {
|
|
912
896
|
__name: "TSViewer",
|
|
913
897
|
props: {
|
|
914
898
|
pkg: {
|
|
@@ -926,7 +910,7 @@ const Dn = (t, e) => {
|
|
|
926
910
|
}
|
|
927
911
|
},
|
|
928
912
|
setup(t, { expose: e }) {
|
|
929
|
-
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 = {
|
|
930
914
|
TIMEUNIT: "microSeconds",
|
|
931
915
|
// Basis for time
|
|
932
916
|
XOFFSET: 0,
|
|
@@ -963,53 +947,53 @@ const Dn = (t, e) => {
|
|
|
963
947
|
// Maximum duration window (5min)
|
|
964
948
|
INITDURATION: 15e6
|
|
965
949
|
// Initial duration window (15sec)
|
|
966
|
-
}, m = t, h =
|
|
967
|
-
addAnnotation:
|
|
968
|
-
updateAnnotation:
|
|
969
|
-
removeAnnotation:
|
|
970
|
-
} =
|
|
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) => ({
|
|
971
955
|
...r,
|
|
972
956
|
selected: !!r.selected
|
|
973
|
-
}))),
|
|
957
|
+
}))), Ae = z(() => ke.value.filter((r) => r.visible)), Te = z(() => {
|
|
974
958
|
let r = !1;
|
|
975
|
-
return
|
|
976
|
-
}), Se = z(() =>
|
|
959
|
+
return Z.value / Se.value < 30 && (r = !0), r;
|
|
960
|
+
}), Se = z(() => Ae.value.length), le = async () => {
|
|
977
961
|
if (console.log("onresize..."), !P.value)
|
|
978
962
|
return;
|
|
979
963
|
const r = document.getElementById("ts_viewer");
|
|
980
964
|
if (!r)
|
|
981
965
|
return;
|
|
982
966
|
const f = window.getComputedStyle(r, null), d = parseInt(f.getPropertyValue("height")), w = m.isPreview ? 0 : 100;
|
|
983
|
-
|
|
984
|
-
const
|
|
985
|
-
|
|
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);
|
|
986
970
|
};
|
|
987
|
-
|
|
988
|
-
var d, w,
|
|
989
|
-
(d = E.value) != null && d.resetComponentState && E.value.resetComponentState(), r && r.channels && r.channels.length > 0 &&
|
|
990
|
-
}, { 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) => {
|
|
991
975
|
f !== void 0 && r !== f && (console.log(`Number of visible channels changed from ${f} to ${r}`), setTimeout(() => {
|
|
992
976
|
var d;
|
|
993
|
-
|
|
977
|
+
le(), (d = v.value) != null && d.renderAll && v.value.renderAll();
|
|
994
978
|
}, 20));
|
|
995
979
|
});
|
|
996
|
-
const
|
|
980
|
+
const a = (r) => {
|
|
997
981
|
store.dispatch("viewerModule/setActiveAnnotation", r).then(() => {
|
|
998
982
|
v.value.renderAnnotationCanvas(), q.value = !0;
|
|
999
983
|
});
|
|
1000
984
|
};
|
|
1001
|
-
|
|
1002
|
-
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(() => {
|
|
1003
987
|
var f;
|
|
1004
988
|
r.cause === "channel-visibility" ? setTimeout(() => {
|
|
1005
989
|
var d;
|
|
1006
|
-
|
|
990
|
+
le(), (d = v.value) != null && d.renderAll && v.value.renderAll();
|
|
1007
991
|
}, 10) : (f = v.value) != null && f.renderAll && v.value.renderAll();
|
|
1008
992
|
}), h.resetRerenderTrigger(null));
|
|
1009
993
|
}, { deep: !0 });
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1012
|
-
},
|
|
994
|
+
const c = (r) => {
|
|
995
|
+
a(r);
|
|
996
|
+
}, p = async (r) => {
|
|
1013
997
|
if (console.log("📍 TSViewer: onCreateUpdateAnnotation received:", r), !r || Object.keys(r).length === 0) {
|
|
1014
998
|
console.error("🚨 TSViewer: Received empty annotation!");
|
|
1015
999
|
return;
|
|
@@ -1020,153 +1004,153 @@ const Dn = (t, e) => {
|
|
|
1020
1004
|
}
|
|
1021
1005
|
q.value = !1;
|
|
1022
1006
|
try {
|
|
1023
|
-
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");
|
|
1024
1008
|
} catch (f) {
|
|
1025
1009
|
console.error("📍 TSViewer: Error creating/updating annotation:", f), q.value = !0;
|
|
1026
1010
|
}
|
|
1027
|
-
},
|
|
1011
|
+
}, L = () => {
|
|
1028
1012
|
v.value.renderAnnotationCanvas();
|
|
1029
|
-
},
|
|
1030
|
-
|
|
1031
|
-
},
|
|
1032
|
-
|
|
1013
|
+
}, te = (r) => {
|
|
1014
|
+
de.value = r, ee.value = !0;
|
|
1015
|
+
}, tt = async (r) => {
|
|
1016
|
+
ee.value = !1;
|
|
1033
1017
|
try {
|
|
1034
|
-
await
|
|
1018
|
+
await M(r), nt(), console.log("📍 TSViewer: Annotation deleted successfully");
|
|
1035
1019
|
} catch (f) {
|
|
1036
1020
|
console.error("📍 TSViewer: Error deleting annotation:", f);
|
|
1037
1021
|
}
|
|
1038
|
-
},
|
|
1022
|
+
}, nt = () => {
|
|
1039
1023
|
v.value.renderAnnotationCanvas();
|
|
1040
|
-
},
|
|
1024
|
+
}, rt = (r, f, d, w, R, ue) => {
|
|
1041
1025
|
if (console.log("📍 TSViewer: onAddAnnotation called with:", {
|
|
1042
1026
|
startTime: r,
|
|
1043
1027
|
duration: f,
|
|
1044
1028
|
allChannels: d,
|
|
1045
1029
|
label: w,
|
|
1046
|
-
description:
|
|
1047
|
-
layer:
|
|
1048
|
-
}), !
|
|
1049
|
-
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);
|
|
1050
1034
|
return;
|
|
1051
1035
|
}
|
|
1052
|
-
const
|
|
1036
|
+
const Et = h.viewerSelectedChannels || [], Ot = d ? [] : Et.map((Pt) => Pt.id), Ue = {
|
|
1053
1037
|
id: null,
|
|
1054
1038
|
label: w || "Event",
|
|
1055
|
-
description:
|
|
1039
|
+
description: R || "",
|
|
1056
1040
|
start: Math.floor(r),
|
|
1057
1041
|
end: Math.floor(r + f),
|
|
1058
1042
|
duration: Math.floor(f),
|
|
1059
|
-
channelIds:
|
|
1043
|
+
channelIds: Ot,
|
|
1060
1044
|
allChannels: d,
|
|
1061
|
-
layer_id:
|
|
1045
|
+
layer_id: ue.id,
|
|
1062
1046
|
selected: !0,
|
|
1063
1047
|
userId: null
|
|
1064
1048
|
};
|
|
1065
|
-
console.log("📍 TSViewer: Created annotation object:",
|
|
1066
|
-
},
|
|
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 = () => {
|
|
1067
1051
|
v.value.renderAnnotationCanvas();
|
|
1068
|
-
},
|
|
1052
|
+
}, at = (r) => {
|
|
1069
1053
|
v.value.createAnnotationLayer(r);
|
|
1070
1054
|
}, De = () => {
|
|
1071
|
-
ae.value = !1;
|
|
1072
|
-
}, pt = () => {
|
|
1073
|
-
v.value.resetFocusedAnnotation(), v.value.renderAnnotationCanvas(), q.value = !1;
|
|
1074
|
-
}, ht = () => {
|
|
1075
1055
|
se.value = !1;
|
|
1076
|
-
},
|
|
1056
|
+
}, st = () => {
|
|
1057
|
+
v.value.resetFocusedAnnotation(), v.value.renderAnnotationCanvas(), q.value = !1;
|
|
1058
|
+
}, it = () => {
|
|
1059
|
+
B.value = !1;
|
|
1060
|
+
}, lt = (r) => {
|
|
1077
1061
|
r.stopPropagation(), r.preventDefault();
|
|
1078
1062
|
const f = r.detail.sourceEvent.metaKey;
|
|
1079
|
-
|
|
1080
|
-
},
|
|
1081
|
-
|
|
1082
|
-
},
|
|
1083
|
-
|
|
1084
|
-
},
|
|
1085
|
-
|
|
1086
|
-
},
|
|
1063
|
+
Le({ channelId: r.currentTarget.dataset.id, append: f }), v.value.renderAll();
|
|
1064
|
+
}, ut = () => {
|
|
1065
|
+
D.value = v.value.getNextAnnotation();
|
|
1066
|
+
}, ct = () => {
|
|
1067
|
+
D.value = v.value.getPreviousAnnotation();
|
|
1068
|
+
}, dt = (r) => {
|
|
1069
|
+
Ne(r * 1e6);
|
|
1070
|
+
}, ft = () => {
|
|
1087
1071
|
x.value = x.value * 1.25;
|
|
1088
|
-
},
|
|
1072
|
+
}, vt = () => {
|
|
1089
1073
|
x.value = x.value * 0.8;
|
|
1090
|
-
},
|
|
1074
|
+
}, pt = () => {
|
|
1091
1075
|
E.value.getAnnotations();
|
|
1092
|
-
},
|
|
1093
|
-
},
|
|
1076
|
+
}, ht = () => {
|
|
1077
|
+
}, gt = () => {
|
|
1094
1078
|
console.log("Page forward triggered from toolbar");
|
|
1095
1079
|
const r = Math.max(
|
|
1096
|
-
|
|
1080
|
+
D.value - 3 / 4 * U.value,
|
|
1097
1081
|
O.value
|
|
1098
1082
|
);
|
|
1099
|
-
|
|
1083
|
+
ne(r), re(() => {
|
|
1100
1084
|
var f;
|
|
1101
1085
|
(f = v.value) == null || f.renderAll();
|
|
1102
1086
|
});
|
|
1103
|
-
},
|
|
1087
|
+
}, yt = () => {
|
|
1104
1088
|
console.log("Page forward triggered from toolbar");
|
|
1105
1089
|
const r = Math.min(
|
|
1106
|
-
|
|
1107
|
-
|
|
1090
|
+
D.value + 3 / 4 * U.value,
|
|
1091
|
+
b.value - U.value
|
|
1108
1092
|
);
|
|
1109
|
-
console.log(`Moving from ${
|
|
1093
|
+
console.log(`Moving from ${D.value} to ${r}`), ne(r), re(() => {
|
|
1110
1094
|
var f, d;
|
|
1111
1095
|
(f = v.value) != null && f.invalidate && v.value.invalidate(), (d = v.value) != null && d.renderAll && v.value.renderAll();
|
|
1112
1096
|
});
|
|
1113
|
-
},
|
|
1097
|
+
}, mt = (r) => {
|
|
1114
1098
|
let f = v.value.rsPeriod;
|
|
1115
|
-
|
|
1099
|
+
ne(r.annotation.start - (Q.value * H.value - s.CURSOROFFSET) * f), re(() => {
|
|
1116
1100
|
var d;
|
|
1117
1101
|
(d = v.value) == null || d.renderAll();
|
|
1118
1102
|
});
|
|
1119
|
-
},
|
|
1120
|
-
const f =
|
|
1103
|
+
}, Le = (r) => {
|
|
1104
|
+
const f = _.value.map((d) => {
|
|
1121
1105
|
const w = d.selected;
|
|
1122
1106
|
return r.append === !1 && (d.selected = !1), r.channelId === d.id && (d.selected = !w), d;
|
|
1123
1107
|
});
|
|
1124
1108
|
h.setChannels(f);
|
|
1125
|
-
},
|
|
1126
|
-
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));
|
|
1127
1111
|
h.setChannels(d);
|
|
1128
|
-
},
|
|
1129
|
-
|
|
1130
|
-
},
|
|
1112
|
+
}, ne = (r) => {
|
|
1113
|
+
D.value = r;
|
|
1114
|
+
}, At = (r) => {
|
|
1131
1115
|
Q.value = r;
|
|
1132
|
-
},
|
|
1116
|
+
}, Tt = (r) => {
|
|
1133
1117
|
x.value = r;
|
|
1134
|
-
},
|
|
1135
|
-
r > s.MAXDURATION ?
|
|
1136
|
-
},
|
|
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 = () => {
|
|
1137
1121
|
var f;
|
|
1138
1122
|
const r = (f = ie.value) == null ? void 0 : f.channels;
|
|
1139
1123
|
if (console.log("🔄 initTimeRange called with channels:", (r == null ? void 0 : r.length) || 0), r && r.length > 0) {
|
|
1140
|
-
O.value = r[0].start,
|
|
1124
|
+
O.value = r[0].start, b.value = r[0].end;
|
|
1141
1125
|
for (let w = 1; w < r.length; w++)
|
|
1142
|
-
r[w].start < O.value && (O.value = r[w].start), r[w].end >
|
|
1143
|
-
const d =
|
|
1144
|
-
|
|
1126
|
+
r[w].start < O.value && (O.value = r[w].start), r[w].end > b.value && (b.value = r[w].end);
|
|
1127
|
+
const d = D.value;
|
|
1128
|
+
D.value = O.value, console.log("📅 Time range initialized:", {
|
|
1145
1129
|
ts_start: O.value,
|
|
1146
|
-
ts_end:
|
|
1130
|
+
ts_end: b.value,
|
|
1147
1131
|
oldStart: d,
|
|
1148
|
-
newStart:
|
|
1149
|
-
duration:
|
|
1132
|
+
newStart: D.value,
|
|
1133
|
+
duration: U.value,
|
|
1150
1134
|
startDate: new Date(O.value / 1e3).toISOString(),
|
|
1151
|
-
endDate: new Date(
|
|
1135
|
+
endDate: new Date(b.value / 1e3).toISOString()
|
|
1152
1136
|
});
|
|
1153
1137
|
} else
|
|
1154
1138
|
console.warn("⚠️ initTimeRange: No channels found in activeViewer");
|
|
1155
|
-
},
|
|
1156
|
-
|
|
1157
|
-
},
|
|
1158
|
-
|
|
1159
|
-
},
|
|
1160
|
-
const f =
|
|
1161
|
-
w.onChannels = f,
|
|
1162
|
-
},
|
|
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) => {
|
|
1163
1147
|
v.value.setFilters(r);
|
|
1164
|
-
},
|
|
1148
|
+
}, je = () => {
|
|
1165
1149
|
var r, f;
|
|
1166
1150
|
(r = v.value) == null || r.initViewerCanvas(), (f = v.value) == null || f.renderAll();
|
|
1167
1151
|
};
|
|
1168
|
-
return
|
|
1169
|
-
|
|
1152
|
+
return Dt(() => {
|
|
1153
|
+
It();
|
|
1170
1154
|
const r = document.getElementById("ts_viewer");
|
|
1171
1155
|
if (!r) {
|
|
1172
1156
|
console.warn("ts_viewer element not found");
|
|
@@ -1174,160 +1158,160 @@ const Dn = (t, e) => {
|
|
|
1174
1158
|
}
|
|
1175
1159
|
var f = window.getComputedStyle(r, null);
|
|
1176
1160
|
const d = parseInt(f.getPropertyValue("height")), w = m.isPreview ? 0 : 100;
|
|
1177
|
-
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1180
|
-
}),
|
|
1181
|
-
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);
|
|
1182
1166
|
}), e({
|
|
1183
|
-
openEditAnnotationDialog:
|
|
1184
|
-
confirmDeleteAnnotation:
|
|
1185
|
-
selectAnnotation:
|
|
1186
|
-
selectChannel:
|
|
1187
|
-
selectChannels:
|
|
1188
|
-
openLayerWindow:
|
|
1189
|
-
openFilterWindow:
|
|
1190
|
-
setTimeseriesFilters:
|
|
1191
|
-
}), (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", {
|
|
1192
1176
|
id: "ts_viewer",
|
|
1193
1177
|
ref_key: "ts_viewer",
|
|
1194
1178
|
ref: P,
|
|
1195
1179
|
class: _e([t.isPreview ? "timeseries-viewer preview" : "timeseries-viewer"])
|
|
1196
1180
|
}, [
|
|
1197
|
-
|
|
1181
|
+
oe(Y(n), {
|
|
1198
1182
|
ref_key: "scrubber",
|
|
1199
1183
|
ref: E,
|
|
1200
1184
|
ts_start: O.value,
|
|
1201
|
-
ts_end:
|
|
1202
|
-
"c-width":
|
|
1203
|
-
"label-width":
|
|
1185
|
+
ts_end: b.value,
|
|
1186
|
+
"c-width": H.value,
|
|
1187
|
+
"label-width": ae.value,
|
|
1204
1188
|
"cursor-loc": Q.value,
|
|
1205
|
-
start:
|
|
1206
|
-
duration:
|
|
1189
|
+
start: D.value,
|
|
1190
|
+
duration: U.value,
|
|
1207
1191
|
constants: s,
|
|
1208
1192
|
"active-viewer": ie.value,
|
|
1209
|
-
onSetStart:
|
|
1193
|
+
onSetStart: ne
|
|
1210
1194
|
}, null, 8, ["ts_start", "ts_end", "c-width", "label-width", "cursor-loc", "start", "duration", "active-viewer"]),
|
|
1211
|
-
|
|
1212
|
-
|
|
1195
|
+
ce("div", Sn, [
|
|
1196
|
+
ce("div", {
|
|
1213
1197
|
id: "channelLabels",
|
|
1214
1198
|
ref_key: "channelLabels",
|
|
1215
1199
|
ref: I
|
|
1216
1200
|
}, [
|
|
1217
|
-
(
|
|
1201
|
+
(fe(!0), Ce(jt, null, Ut(Ae.value, (d) => (fe(), Ce("div", {
|
|
1218
1202
|
key: d.displayName,
|
|
1219
1203
|
class: "chLabelWrap",
|
|
1220
1204
|
"data-id": d.id,
|
|
1221
|
-
onTap:
|
|
1205
|
+
onTap: lt
|
|
1222
1206
|
}, [
|
|
1223
|
-
|
|
1207
|
+
ce("div", {
|
|
1224
1208
|
class: _e([d.selected ? "labelDiv selected" : "labelDiv"])
|
|
1225
|
-
},
|
|
1226
|
-
|
|
1209
|
+
}, Ve(d.displayName), 3),
|
|
1210
|
+
ce("div", {
|
|
1227
1211
|
class: _e(["chLabelIndWrap", [d.selected ? "selected" : ""]]),
|
|
1228
|
-
hidden:
|
|
1212
|
+
hidden: Te.value
|
|
1229
1213
|
}, [
|
|
1230
|
-
|
|
1214
|
+
ce("div", {
|
|
1231
1215
|
class: "chLabelInd",
|
|
1232
|
-
hidden:
|
|
1233
|
-
},
|
|
1234
|
-
], 10,
|
|
1235
|
-
], 40,
|
|
1216
|
+
hidden: Te.value
|
|
1217
|
+
}, Ve(St(d, x.value, d.rowScale)), 9, _n)
|
|
1218
|
+
], 10, Cn)
|
|
1219
|
+
], 40, In))), 128))
|
|
1236
1220
|
], 512),
|
|
1237
|
-
|
|
1221
|
+
oe(Y(o), {
|
|
1238
1222
|
ref_key: "viewerCanvas",
|
|
1239
1223
|
ref: v,
|
|
1240
|
-
window_height:
|
|
1241
|
-
window_width:
|
|
1242
|
-
duration:
|
|
1243
|
-
start:
|
|
1244
|
-
"c-width":
|
|
1245
|
-
"c-height":
|
|
1224
|
+
window_height: X.value,
|
|
1225
|
+
window_width: G.value,
|
|
1226
|
+
duration: U.value,
|
|
1227
|
+
start: D.value,
|
|
1228
|
+
"c-width": H.value,
|
|
1229
|
+
"c-height": Z.value,
|
|
1246
1230
|
constants: s,
|
|
1247
1231
|
"ts-start": O.value,
|
|
1248
|
-
"ts-end":
|
|
1232
|
+
"ts-end": b.value,
|
|
1249
1233
|
"cursor-loc": Q.value,
|
|
1250
1234
|
"global-zoom-mult": x.value,
|
|
1251
1235
|
"active-viewer": ie.value,
|
|
1252
|
-
onSetStart:
|
|
1253
|
-
onSetCursor:
|
|
1254
|
-
onSetGlobalZoom:
|
|
1255
|
-
onSetDuration:
|
|
1256
|
-
onChannelsInitialized:
|
|
1257
|
-
onAnnLayersInitialized:
|
|
1236
|
+
onSetStart: ne,
|
|
1237
|
+
onSetCursor: At,
|
|
1238
|
+
onSetGlobalZoom: Tt,
|
|
1239
|
+
onSetDuration: Ne,
|
|
1240
|
+
onChannelsInitialized: ht,
|
|
1241
|
+
onAnnLayersInitialized: pt,
|
|
1258
1242
|
onCloseAnnotationLayerWindow: De,
|
|
1259
|
-
onAddAnnotation:
|
|
1260
|
-
onUpdateAnnotation:
|
|
1243
|
+
onAddAnnotation: rt,
|
|
1244
|
+
onUpdateAnnotation: c
|
|
1261
1245
|
}, null, 8, ["window_height", "window_width", "duration", "start", "c-width", "c-height", "ts-start", "ts-end", "cursor-loc", "global-zoom-mult", "active-viewer"])
|
|
1262
1246
|
]),
|
|
1263
|
-
t.isPreview ?
|
|
1247
|
+
t.isPreview ? Rt("", !0) : (fe(), Nt(Y(i), {
|
|
1264
1248
|
key: 0,
|
|
1265
1249
|
constants: s,
|
|
1266
|
-
duration:
|
|
1267
|
-
start:
|
|
1268
|
-
onPageBack:
|
|
1269
|
-
onPageForward:
|
|
1270
|
-
onIncrementZoom:
|
|
1271
|
-
onDecrementZoom:
|
|
1272
|
-
onUpdateDuration:
|
|
1273
|
-
onNextAnnotation:
|
|
1274
|
-
onPreviousAnnotation:
|
|
1275
|
-
onSetStart:
|
|
1250
|
+
duration: U.value,
|
|
1251
|
+
start: D.value,
|
|
1252
|
+
onPageBack: gt,
|
|
1253
|
+
onPageForward: yt,
|
|
1254
|
+
onIncrementZoom: ft,
|
|
1255
|
+
onDecrementZoom: vt,
|
|
1256
|
+
onUpdateDuration: dt,
|
|
1257
|
+
onNextAnnotation: ut,
|
|
1258
|
+
onPreviousAnnotation: ct,
|
|
1259
|
+
onSetStart: ne
|
|
1276
1260
|
}, null, 8, ["duration", "start"])),
|
|
1277
|
-
|
|
1261
|
+
oe(Y(u), {
|
|
1278
1262
|
ref_key: "filterWindow",
|
|
1279
|
-
ref:
|
|
1280
|
-
visible:
|
|
1281
|
-
"onUpdate:visible": f[0] || (f[0] = (d) =>
|
|
1282
|
-
onCloseWindow:
|
|
1263
|
+
ref: S,
|
|
1264
|
+
visible: B.value,
|
|
1265
|
+
"onUpdate:visible": f[0] || (f[0] = (d) => B.value = d),
|
|
1266
|
+
onCloseWindow: it
|
|
1283
1267
|
}, null, 8, ["visible"]),
|
|
1284
|
-
|
|
1268
|
+
oe(Y(g), {
|
|
1285
1269
|
ref_key: "annotationModal",
|
|
1286
1270
|
ref: W,
|
|
1287
1271
|
visible: q.value,
|
|
1288
1272
|
"onUpdate:visible": f[1] || (f[1] = (d) => q.value = d),
|
|
1289
|
-
onCloseWindow:
|
|
1290
|
-
onCreateUpdateAnnotation:
|
|
1273
|
+
onCloseWindow: st,
|
|
1274
|
+
onCreateUpdateAnnotation: p
|
|
1291
1275
|
}, null, 8, ["visible"]),
|
|
1292
|
-
|
|
1293
|
-
visible:
|
|
1294
|
-
"delete-annotation":
|
|
1295
|
-
"onUpdate:visible": f[2] || (f[2] = (d) =>
|
|
1296
|
-
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
|
|
1297
1281
|
}, null, 8, ["visible", "delete-annotation"]),
|
|
1298
|
-
|
|
1299
|
-
visible:
|
|
1282
|
+
oe(Y(l), {
|
|
1283
|
+
visible: se.value,
|
|
1300
1284
|
onCloseWindow: De,
|
|
1301
|
-
onCreateLayer:
|
|
1285
|
+
onCreateLayer: at
|
|
1302
1286
|
}, null, 8, ["visible"])
|
|
1303
1287
|
], 2));
|
|
1304
1288
|
}
|
|
1305
|
-
},
|
|
1289
|
+
}, En = /* @__PURE__ */ Tn(bn, [["__scopeId", "data-v-d5eda6cd"]]), Ln = {
|
|
1306
1290
|
install(t) {
|
|
1307
|
-
t.component("TSViewer",
|
|
1291
|
+
t.component("TSViewer", En);
|
|
1308
1292
|
}
|
|
1309
1293
|
};
|
|
1310
1294
|
export {
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1295
|
+
En as T,
|
|
1296
|
+
T as _,
|
|
1297
|
+
Oe as a,
|
|
1314
1298
|
N as b,
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1299
|
+
k as c,
|
|
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,
|
|
1325
1309
|
F as m,
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
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
|
|
1333
1317
|
};
|