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