@pennsieve-viz/tsviewer 1.1.0 → 1.1.1
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-CjW78KwZ.js → BFLibraryButton-DEY9t1Is.js} +1 -1
- package/dist/{BFLibraryButton-DGI5G53e.cjs → BFLibraryButton-zWDUe3E8.cjs} +1 -1
- package/dist/{IconSelection-BJc1giuT.cjs → IconSelection-DsOecTVD.cjs} +1 -1
- package/dist/{IconSelection-ChXlHpsu.js → IconSelection-IJR6hdts.js} +1 -1
- package/dist/{TSAnnotationCanvas-CfyqYTnB.js → TSAnnotationCanvas-B0b_EheO.js} +3 -3
- package/dist/{TSAnnotationCanvas-DhskkXWf.cjs → TSAnnotationCanvas-Bfxc75PD.cjs} +1 -1
- package/dist/{TSAnnotationModal-Bde2b3U0.cjs → TSAnnotationModal-DkLaOB7u.cjs} +1 -1
- package/dist/{TSAnnotationModal-KX-_Afb3.js → TSAnnotationModal-DpLHrHfV.js} +3 -3
- package/dist/{TSFilterModal-BMSEMK8Y.js → TSFilterModal-C1-o1zyF.js} +3 -3
- package/dist/{TSFilterModal-RgvcihE6.cjs → TSFilterModal-DsVcUoIk.cjs} +1 -1
- package/dist/{TSScrubber-DqCc3Zp7.js → TSScrubber-9ABMW6b2.js} +1 -1
- package/dist/{TSScrubber-C90JS4pD.cjs → TSScrubber-BlHHGh3F.cjs} +1 -1
- package/dist/{TSViewerCanvas-3TTYdC6T.js → TSViewerCanvas-A6HgBZ4E.js} +313 -313
- package/dist/{TSViewerCanvas-BUlYMq9z.cjs → TSViewerCanvas-DBpG0Erk.cjs} +9 -9
- package/dist/{TSViewerLayerWindow-C5Va7dH9.cjs → TSViewerLayerWindow-Cu8yQKRU.cjs} +1 -1
- package/dist/{TSViewerLayerWindow-B94J9tDk.js → TSViewerLayerWindow-Dnij6c3F.js} +2 -2
- package/dist/{TSViewerToolbar-ECRy1rzk.js → TSViewerToolbar-CO68rvXF.js} +1 -1
- package/dist/{TSViewerToolbar-B1q33g4K.cjs → TSViewerToolbar-_NqUlS08.cjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-3aMg8Pa_.js → TsAnnotationDeleteDialog-D9eQGzqE.js} +3 -3
- package/dist/{TsAnnotationDeleteDialog-O-NFN0pa.cjs → TsAnnotationDeleteDialog-fM5Y7SRB.cjs} +1 -1
- package/dist/{index-B-qad683.cjs → index-CMJlEiLT.cjs} +1 -1
- package/dist/{index-ZGQLYYRT.js → index-CgKUmS0K.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{pathOr-BHBhJmTE.cjs → pathOr-DKv8SMY9.cjs} +1 -1
- package/dist/{pathOr-Byg6zMXz.js → pathOr-kR7j_Y-C.js} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onUnmounted, readonly, reactive, computed, watch, inject, onMounted, createElementBlock, openBlock, createElementVNode, renderSlot, normalizeStyle, defineAsyncComponent, nextTick, createVNode, withCtx, unref } from "vue";
|
|
2
2
|
import { storeToRefs } from "pinia";
|
|
3
|
-
import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, u as useToken, p as propOr, g as _export_sfc, h as createViewerStore, m as propEq } from "./index-
|
|
3
|
+
import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, u as useToken, p as propOr, g as _export_sfc, h as createViewerStore, m as propEq } from "./index-CgKUmS0K.js";
|
|
4
4
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
5
5
|
var head = /* @__PURE__ */ nth(0), XFind = /* @__PURE__ */ (function() {
|
|
6
6
|
function f(c, v) {
|
|
@@ -1954,67 +1954,67 @@ function requireRoot() {
|
|
|
1954
1954
|
if (!m)
|
|
1955
1955
|
return o.asPromise(l, R, a, h);
|
|
1956
1956
|
var g = m === n;
|
|
1957
|
-
function y(
|
|
1957
|
+
function y(W, N) {
|
|
1958
1958
|
if (m) {
|
|
1959
1959
|
if (g)
|
|
1960
|
-
throw
|
|
1960
|
+
throw W;
|
|
1961
1961
|
N && N.resolveAll();
|
|
1962
1962
|
var w = m;
|
|
1963
|
-
m = null, w(
|
|
1963
|
+
m = null, w(W, N);
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
|
-
function O(
|
|
1967
|
-
var N =
|
|
1966
|
+
function O(W) {
|
|
1967
|
+
var N = W.lastIndexOf("google/protobuf/");
|
|
1968
1968
|
if (N > -1) {
|
|
1969
|
-
var w =
|
|
1969
|
+
var w = W.substring(N);
|
|
1970
1970
|
if (w in r) return w;
|
|
1971
1971
|
}
|
|
1972
1972
|
return null;
|
|
1973
1973
|
}
|
|
1974
|
-
function b(
|
|
1974
|
+
function b(W, N) {
|
|
1975
1975
|
try {
|
|
1976
1976
|
if (o.isString(N) && N.charAt(0) === "{" && (N = JSON.parse(N)), !o.isString(N))
|
|
1977
1977
|
R.setOptions(N.options).addJSON(N.nested);
|
|
1978
1978
|
else {
|
|
1979
|
-
e.filename =
|
|
1979
|
+
e.filename = W;
|
|
1980
1980
|
var w = e(N, R, h), T, C = 0;
|
|
1981
1981
|
if (w.imports)
|
|
1982
1982
|
for (; C < w.imports.length; ++C)
|
|
1983
|
-
(T = O(w.imports[C]) || R.resolvePath(
|
|
1983
|
+
(T = O(w.imports[C]) || R.resolvePath(W, w.imports[C])) && E(T);
|
|
1984
1984
|
if (w.weakImports)
|
|
1985
1985
|
for (C = 0; C < w.weakImports.length; ++C)
|
|
1986
|
-
(T = O(w.weakImports[C]) || R.resolvePath(
|
|
1986
|
+
(T = O(w.weakImports[C]) || R.resolvePath(W, w.weakImports[C])) && E(T, !0);
|
|
1987
1987
|
}
|
|
1988
1988
|
} catch (k) {
|
|
1989
1989
|
y(k);
|
|
1990
1990
|
}
|
|
1991
1991
|
!g && !I && y(null, R);
|
|
1992
1992
|
}
|
|
1993
|
-
function E(
|
|
1994
|
-
if (
|
|
1995
|
-
if (R.files.push(
|
|
1996
|
-
g ? b(
|
|
1997
|
-
--I, b(
|
|
1993
|
+
function E(W, N) {
|
|
1994
|
+
if (W = O(W) || W, !(R.files.indexOf(W) > -1)) {
|
|
1995
|
+
if (R.files.push(W), W in r) {
|
|
1996
|
+
g ? b(W, r[W]) : (++I, setTimeout(function() {
|
|
1997
|
+
--I, b(W, r[W]);
|
|
1998
1998
|
}));
|
|
1999
1999
|
return;
|
|
2000
2000
|
}
|
|
2001
2001
|
if (g) {
|
|
2002
2002
|
var w;
|
|
2003
2003
|
try {
|
|
2004
|
-
w = o.fs.readFileSync(
|
|
2004
|
+
w = o.fs.readFileSync(W).toString("utf8");
|
|
2005
2005
|
} catch (T) {
|
|
2006
2006
|
N || y(T);
|
|
2007
2007
|
return;
|
|
2008
2008
|
}
|
|
2009
|
-
b(
|
|
2009
|
+
b(W, w);
|
|
2010
2010
|
} else
|
|
2011
|
-
++I, R.fetch(
|
|
2011
|
+
++I, R.fetch(W, function(T, C) {
|
|
2012
2012
|
if (--I, !!m) {
|
|
2013
2013
|
if (T) {
|
|
2014
2014
|
N ? I || y(null, R) : y(T);
|
|
2015
2015
|
return;
|
|
2016
2016
|
}
|
|
2017
|
-
b(
|
|
2017
|
+
b(W, C);
|
|
2018
2018
|
}
|
|
2019
2019
|
});
|
|
2020
2020
|
}
|
|
@@ -2762,55 +2762,55 @@ function requireTokenize() {
|
|
|
2762
2762
|
function E() {
|
|
2763
2763
|
var _ = O === "'" ? v : c;
|
|
2764
2764
|
_.lastIndex = a - 1;
|
|
2765
|
-
var
|
|
2766
|
-
if (!
|
|
2765
|
+
var D = _.exec(s);
|
|
2766
|
+
if (!D)
|
|
2767
2767
|
throw b("string");
|
|
2768
|
-
return a = _.lastIndex, w(O), O = null, n(
|
|
2768
|
+
return a = _.lastIndex, w(O), O = null, n(D[1]);
|
|
2769
2769
|
}
|
|
2770
2770
|
function I(_) {
|
|
2771
2771
|
return s.charAt(_);
|
|
2772
2772
|
}
|
|
2773
|
-
function M(_,
|
|
2774
|
-
var
|
|
2773
|
+
function M(_, D, F) {
|
|
2774
|
+
var B = {
|
|
2775
2775
|
type: s.charAt(_++),
|
|
2776
2776
|
lineEmpty: !1,
|
|
2777
|
-
leading:
|
|
2778
|
-
},
|
|
2779
|
-
l ?
|
|
2780
|
-
var H = _ -
|
|
2777
|
+
leading: F
|
|
2778
|
+
}, V;
|
|
2779
|
+
l ? V = 2 : V = 3;
|
|
2780
|
+
var H = _ - V, z;
|
|
2781
2781
|
do
|
|
2782
2782
|
if (--H < 0 || (z = s.charAt(H)) === `
|
|
2783
2783
|
`) {
|
|
2784
|
-
|
|
2784
|
+
B.lineEmpty = !0;
|
|
2785
2785
|
break;
|
|
2786
2786
|
}
|
|
2787
2787
|
while (z === " " || z === " ");
|
|
2788
|
-
for (var
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
`).trim(), g[m] =
|
|
2788
|
+
for (var L = s.substring(_, D).split(i), K = 0; K < L.length; ++K)
|
|
2789
|
+
L[K] = L[K].replace(l ? o : u, "").trim();
|
|
2790
|
+
B.text = L.join(`
|
|
2791
|
+
`).trim(), g[m] = B, R = m;
|
|
2792
2792
|
}
|
|
2793
2793
|
function j(_) {
|
|
2794
|
-
var
|
|
2795
|
-
return
|
|
2794
|
+
var D = W(_), F = s.substring(_, D), B = /^\s*\/\//.test(F);
|
|
2795
|
+
return B;
|
|
2796
2796
|
}
|
|
2797
|
-
function
|
|
2798
|
-
for (var
|
|
2797
|
+
function W(_) {
|
|
2798
|
+
for (var D = _; D < h && I(D) !== `
|
|
2799
2799
|
`; )
|
|
2800
|
-
|
|
2801
|
-
return
|
|
2800
|
+
D++;
|
|
2801
|
+
return D;
|
|
2802
2802
|
}
|
|
2803
2803
|
function N() {
|
|
2804
2804
|
if (y.length > 0)
|
|
2805
2805
|
return y.shift();
|
|
2806
2806
|
if (O)
|
|
2807
2807
|
return E();
|
|
2808
|
-
var _,
|
|
2808
|
+
var _, D, F, B, V, H = a === 0;
|
|
2809
2809
|
do {
|
|
2810
2810
|
if (a === h)
|
|
2811
2811
|
return null;
|
|
2812
|
-
for (_ = !1; e.test(
|
|
2813
|
-
if (
|
|
2812
|
+
for (_ = !1; e.test(F = I(a)); )
|
|
2813
|
+
if (F === `
|
|
2814
2814
|
` && (H = !0, ++m), ++a === h)
|
|
2815
2815
|
return null;
|
|
2816
2816
|
if (I(a) === "/") {
|
|
@@ -2818,39 +2818,39 @@ function requireTokenize() {
|
|
|
2818
2818
|
throw b("comment");
|
|
2819
2819
|
if (I(a) === "/")
|
|
2820
2820
|
if (l) {
|
|
2821
|
-
if (
|
|
2822
|
-
|
|
2821
|
+
if (B = a, V = !1, j(a - 1)) {
|
|
2822
|
+
V = !0;
|
|
2823
2823
|
do
|
|
2824
|
-
if (a =
|
|
2824
|
+
if (a = W(a), a === h || (a++, !H))
|
|
2825
2825
|
break;
|
|
2826
2826
|
while (j(a));
|
|
2827
2827
|
} else
|
|
2828
|
-
a = Math.min(h,
|
|
2829
|
-
|
|
2828
|
+
a = Math.min(h, W(a) + 1);
|
|
2829
|
+
V && (M(B, a, H), H = !0), m++, _ = !0;
|
|
2830
2830
|
} else {
|
|
2831
|
-
for (
|
|
2831
|
+
for (V = I(B = a + 1) === "/"; I(++a) !== `
|
|
2832
2832
|
`; )
|
|
2833
2833
|
if (a === h)
|
|
2834
2834
|
return null;
|
|
2835
|
-
++a,
|
|
2835
|
+
++a, V && (M(B, a - 1, H), H = !0), ++m, _ = !0;
|
|
2836
2836
|
}
|
|
2837
|
-
else if ((
|
|
2838
|
-
|
|
2837
|
+
else if ((F = I(a)) === "*") {
|
|
2838
|
+
B = a + 1, V = l || I(B) === "*";
|
|
2839
2839
|
do {
|
|
2840
|
-
if (
|
|
2840
|
+
if (F === `
|
|
2841
2841
|
` && ++m, ++a === h)
|
|
2842
2842
|
throw b("comment");
|
|
2843
|
-
|
|
2844
|
-
} while (
|
|
2845
|
-
++a,
|
|
2843
|
+
D = F, F = I(a);
|
|
2844
|
+
} while (D !== "*" || F !== "/");
|
|
2845
|
+
++a, V && (M(B, a - 2, H), H = !0), _ = !0;
|
|
2846
2846
|
} else
|
|
2847
2847
|
return "/";
|
|
2848
2848
|
}
|
|
2849
2849
|
} while (_);
|
|
2850
2850
|
var z = a;
|
|
2851
2851
|
f.lastIndex = 0;
|
|
2852
|
-
var
|
|
2853
|
-
if (!
|
|
2852
|
+
var L = f.test(I(z++));
|
|
2853
|
+
if (!L)
|
|
2854
2854
|
for (; z < h && !f.test(I(z)); )
|
|
2855
2855
|
++z;
|
|
2856
2856
|
var K = s.substring(a, a = z);
|
|
@@ -2868,17 +2868,17 @@ function requireTokenize() {
|
|
|
2868
2868
|
}
|
|
2869
2869
|
return y[0];
|
|
2870
2870
|
}
|
|
2871
|
-
function C(_,
|
|
2872
|
-
var
|
|
2873
|
-
if (
|
|
2871
|
+
function C(_, D) {
|
|
2872
|
+
var F = T(), B = F === _;
|
|
2873
|
+
if (B)
|
|
2874
2874
|
return N(), !0;
|
|
2875
|
-
if (!
|
|
2876
|
-
throw b("token '" +
|
|
2875
|
+
if (!D)
|
|
2876
|
+
throw b("token '" + F + "', '" + _ + "' expected");
|
|
2877
2877
|
return !1;
|
|
2878
2878
|
}
|
|
2879
2879
|
function k(_) {
|
|
2880
|
-
var
|
|
2881
|
-
return _ === void 0 ? (
|
|
2880
|
+
var D = null, F;
|
|
2881
|
+
return _ === void 0 ? (F = g[m - 1], delete g[m - 1], F && (l || F.type === "*" || F.lineEmpty) && (D = F.leading ? F.text : null)) : (R < _ && T(), F = g[_], delete g[_], F && !F.lineEmpty && (l || F.type === "/") && (D = F.leading ? null : F.text)), D;
|
|
2882
2882
|
}
|
|
2883
2883
|
return Object.defineProperty({
|
|
2884
2884
|
next: N,
|
|
@@ -2901,11 +2901,11 @@ function requireParse() {
|
|
|
2901
2901
|
var f = requireTokenize(), c = requireRoot(), v = requireType(), u = requireField(), o = requireMapfield(), i = requireOneof(), e = require_enum(), r = requireService(), t = requireMethod(), n = requireObject(), d = requireTypes(), s = requireUtil(), l = /^[1-9][0-9]*$/, a = /^-?[1-9][0-9]*$/, h = /^0[x][0-9a-fA-F]+$/, m = /^-?0[x][0-9a-fA-F]+$/, R = /^0[0-7]+$/, g = /^-?0[0-7]+$/, y = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, O = /^[a-zA-Z_][a-zA-Z_0-9]*$/, b = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
|
|
2902
2902
|
function E(I, M, j) {
|
|
2903
2903
|
M instanceof c || (j = M, M = new c()), j || (j = E.defaults);
|
|
2904
|
-
var
|
|
2904
|
+
var W = j.preferTrailingComment || !1, N = f(I, j.alternateCommentMode || !1), w = N.next, T = N.push, C = N.peek, k = N.skip, _ = N.cmnt, D = !0, F, B, V, H = "proto2", z = M, L = [], K = {}, Z = j.keepCase ? function(P) {
|
|
2905
2905
|
return P;
|
|
2906
2906
|
} : s.camelCase;
|
|
2907
2907
|
function fe() {
|
|
2908
|
-
|
|
2908
|
+
L.forEach((P) => {
|
|
2909
2909
|
P._edition = H, Object.keys(K).forEach((x) => {
|
|
2910
2910
|
P.getOption(x) === void 0 && P.setOption(x, K[x], !0);
|
|
2911
2911
|
});
|
|
@@ -3027,23 +3027,23 @@ function requireParse() {
|
|
|
3027
3027
|
throw U(P, "id");
|
|
3028
3028
|
}
|
|
3029
3029
|
function oe() {
|
|
3030
|
-
if (
|
|
3030
|
+
if (F !== void 0)
|
|
3031
3031
|
throw U("package");
|
|
3032
|
-
if (
|
|
3033
|
-
throw U(
|
|
3034
|
-
z = z.define(
|
|
3032
|
+
if (F = w(), !b.test(F))
|
|
3033
|
+
throw U(F, "name");
|
|
3034
|
+
z = z.define(F), k(";");
|
|
3035
3035
|
}
|
|
3036
3036
|
function pe() {
|
|
3037
3037
|
var P = C(), x;
|
|
3038
3038
|
switch (P) {
|
|
3039
3039
|
case "weak":
|
|
3040
|
-
x =
|
|
3040
|
+
x = V || (V = []), w();
|
|
3041
3041
|
break;
|
|
3042
3042
|
case "public":
|
|
3043
3043
|
w();
|
|
3044
3044
|
// eslint-disable-next-line no-fallthrough
|
|
3045
3045
|
default:
|
|
3046
|
-
x =
|
|
3046
|
+
x = B || (B = []);
|
|
3047
3047
|
break;
|
|
3048
3048
|
}
|
|
3049
3049
|
P = ne(), k(";"), x.push(P);
|
|
@@ -3080,7 +3080,7 @@ function requireParse() {
|
|
|
3080
3080
|
x(q);
|
|
3081
3081
|
k(";", !0);
|
|
3082
3082
|
} else
|
|
3083
|
-
p && p(), k(";"), P && (typeof P.comment != "string" ||
|
|
3083
|
+
p && p(), k(";"), P && (typeof P.comment != "string" || W) && (P.comment = _(S) || P.comment);
|
|
3084
3084
|
}
|
|
3085
3085
|
function Oe(P, x) {
|
|
3086
3086
|
if (!O.test(x = w()))
|
|
@@ -3123,7 +3123,7 @@ function requireParse() {
|
|
|
3123
3123
|
T(q), ae(p, "optional");
|
|
3124
3124
|
break;
|
|
3125
3125
|
}
|
|
3126
|
-
}), P.add(p), P === z &&
|
|
3126
|
+
}), P.add(p), P === z && L.push(p);
|
|
3127
3127
|
}
|
|
3128
3128
|
function ae(P, x, p) {
|
|
3129
3129
|
var S = w();
|
|
@@ -3152,7 +3152,7 @@ function requireParse() {
|
|
|
3152
3152
|
A.setOption("proto3_optional", !0), J.add(A), P.add(J);
|
|
3153
3153
|
} else
|
|
3154
3154
|
P.add(A);
|
|
3155
|
-
P === z &&
|
|
3155
|
+
P === z && L.push(A);
|
|
3156
3156
|
}
|
|
3157
3157
|
function qe(P, x) {
|
|
3158
3158
|
if (H >= 2023)
|
|
@@ -3239,7 +3239,7 @@ function requireParse() {
|
|
|
3239
3239
|
default:
|
|
3240
3240
|
be(p, q);
|
|
3241
3241
|
}
|
|
3242
|
-
}), P.add(p), P === z &&
|
|
3242
|
+
}), P.add(p), P === z && L.push(p);
|
|
3243
3243
|
}
|
|
3244
3244
|
function be(P, x) {
|
|
3245
3245
|
if (!O.test(x))
|
|
@@ -3341,7 +3341,7 @@ function requireParse() {
|
|
|
3341
3341
|
xe(p, q);
|
|
3342
3342
|
else
|
|
3343
3343
|
throw U(q);
|
|
3344
|
-
}), P.add(p), P === z &&
|
|
3344
|
+
}), P.add(p), P === z && L.push(p);
|
|
3345
3345
|
}
|
|
3346
3346
|
function xe(P, x) {
|
|
3347
3347
|
var p = _(), S = x;
|
|
@@ -3383,22 +3383,22 @@ function requireParse() {
|
|
|
3383
3383
|
for (var ie; (ie = w()) !== null; )
|
|
3384
3384
|
switch (ie) {
|
|
3385
3385
|
case "package":
|
|
3386
|
-
if (!
|
|
3386
|
+
if (!D)
|
|
3387
3387
|
throw U(ie);
|
|
3388
3388
|
oe();
|
|
3389
3389
|
break;
|
|
3390
3390
|
case "import":
|
|
3391
|
-
if (!
|
|
3391
|
+
if (!D)
|
|
3392
3392
|
throw U(ie);
|
|
3393
3393
|
pe();
|
|
3394
3394
|
break;
|
|
3395
3395
|
case "syntax":
|
|
3396
|
-
if (!
|
|
3396
|
+
if (!D)
|
|
3397
3397
|
throw U(ie);
|
|
3398
3398
|
we();
|
|
3399
3399
|
break;
|
|
3400
3400
|
case "edition":
|
|
3401
|
-
if (!
|
|
3401
|
+
if (!D)
|
|
3402
3402
|
throw U(ie);
|
|
3403
3403
|
Se();
|
|
3404
3404
|
break;
|
|
@@ -3407,15 +3407,15 @@ function requireParse() {
|
|
|
3407
3407
|
break;
|
|
3408
3408
|
default:
|
|
3409
3409
|
if (Re(z, ie)) {
|
|
3410
|
-
|
|
3410
|
+
D = !1;
|
|
3411
3411
|
continue;
|
|
3412
3412
|
}
|
|
3413
3413
|
throw U(ie);
|
|
3414
3414
|
}
|
|
3415
3415
|
return fe(), E.filename = null, {
|
|
3416
|
-
package:
|
|
3417
|
-
imports:
|
|
3418
|
-
weakImports:
|
|
3416
|
+
package: F,
|
|
3417
|
+
imports: B,
|
|
3418
|
+
weakImports: V,
|
|
3419
3419
|
root: M
|
|
3420
3420
|
};
|
|
3421
3421
|
}
|
|
@@ -3813,46 +3813,46 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3813
3813
|
}
|
|
3814
3814
|
}, i = protobuf.Root.fromJSON(u).TimeSeriesMessage;
|
|
3815
3815
|
let e = null, r = null, t = null, n = null, d = null, s = null, l = !1, a = null;
|
|
3816
|
-
const h = (_,
|
|
3816
|
+
const h = (_, D = 2e3) => new Promise((F) => {
|
|
3817
3817
|
if (!_ || _.readyState === WebSocket.CLOSED) {
|
|
3818
|
-
|
|
3818
|
+
F();
|
|
3819
3819
|
return;
|
|
3820
3820
|
}
|
|
3821
|
-
const
|
|
3822
|
-
_.readyState === WebSocket.CLOSED || Date.now() -
|
|
3821
|
+
const B = Date.now(), V = () => {
|
|
3822
|
+
_.readyState === WebSocket.CLOSED || Date.now() - B > D ? F() : setTimeout(V, 50);
|
|
3823
3823
|
};
|
|
3824
|
-
|
|
3824
|
+
V();
|
|
3825
3825
|
}), m = async () => {
|
|
3826
3826
|
if (f.value) {
|
|
3827
3827
|
const _ = f.value;
|
|
3828
3828
|
console.log("🔌 Disconnecting WebSocket (state:", _.readyState, ")"), f.value = null, c.value = "disconnected", (_.readyState === WebSocket.OPEN || _.readyState === WebSocket.CONNECTING) && (_.close(), await h(_));
|
|
3829
3829
|
}
|
|
3830
3830
|
a = null;
|
|
3831
|
-
}, R = async (_,
|
|
3831
|
+
}, R = async (_, D, F) => {
|
|
3832
3832
|
if (a && (console.log("🔄 Waiting for previous connection to finish..."), await a), f.value) {
|
|
3833
|
-
const
|
|
3834
|
-
(
|
|
3833
|
+
const B = f.value.readyState;
|
|
3834
|
+
(B === WebSocket.CONNECTING || B === WebSocket.OPEN || B === WebSocket.CLOSING) && (console.log(`🔄 Disconnecting existing WebSocket (state: ${B})`), await m(), await new Promise((V) => setTimeout(V, 100)));
|
|
3835
3835
|
}
|
|
3836
|
-
console.log("setting packageId to: " +
|
|
3836
|
+
console.log("setting packageId to: " + D), s = D, v.value = !0, a = new Promise(async (B, V) => {
|
|
3837
3837
|
try {
|
|
3838
|
-
const H =
|
|
3839
|
-
f.value =
|
|
3840
|
-
console.log("🔗 WebSocket opened for package:", s), g(),
|
|
3841
|
-
},
|
|
3842
|
-
console.log("🔌 WebSocket closed for package:", s), y(),
|
|
3843
|
-
},
|
|
3844
|
-
console.error("WebSocket error:", K), c.value = "disconnected",
|
|
3838
|
+
const H = F || await useToken(), z = _ + "?session=" + H + "&package=" + s, L = new WebSocket(z);
|
|
3839
|
+
f.value = L, L.onopen = () => {
|
|
3840
|
+
console.log("🔗 WebSocket opened for package:", s), g(), B(L);
|
|
3841
|
+
}, L.onclose = () => {
|
|
3842
|
+
console.log("🔌 WebSocket closed for package:", s), y(), B(null);
|
|
3843
|
+
}, L.onmessage = O, L.onerror = (K) => {
|
|
3844
|
+
console.error("WebSocket error:", K), c.value = "disconnected", V(K);
|
|
3845
3845
|
}, setTimeout(() => {
|
|
3846
|
-
|
|
3846
|
+
L.readyState === WebSocket.CONNECTING && (L.close(), V(new Error("WebSocket connection timeout")));
|
|
3847
3847
|
}, 1e4);
|
|
3848
3848
|
} catch (H) {
|
|
3849
|
-
console.error("Failed to create WebSocket:", H),
|
|
3849
|
+
console.error("Failed to create WebSocket:", H), V(H);
|
|
3850
3850
|
}
|
|
3851
3851
|
});
|
|
3852
3852
|
try {
|
|
3853
3853
|
await a;
|
|
3854
|
-
} catch (
|
|
3855
|
-
console.error("WebSocket connection failed:",
|
|
3854
|
+
} catch (B) {
|
|
3855
|
+
console.error("WebSocket connection failed:", B), a = null;
|
|
3856
3856
|
}
|
|
3857
3857
|
}, g = () => {
|
|
3858
3858
|
if (c.value = "connected", v.value) {
|
|
@@ -3866,36 +3866,36 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3866
3866
|
console.log("📡 WebSocket connection closed"), c.value = "disconnected";
|
|
3867
3867
|
}, O = (_) => {
|
|
3868
3868
|
if (typeof _.data == "string") {
|
|
3869
|
-
let
|
|
3869
|
+
let F = {};
|
|
3870
3870
|
try {
|
|
3871
|
-
|
|
3871
|
+
F = JSON.parse(_.data);
|
|
3872
3872
|
} catch {
|
|
3873
3873
|
n == null || n({ error: "JSON Parse Error" });
|
|
3874
3874
|
return;
|
|
3875
3875
|
}
|
|
3876
|
-
|
|
3876
|
+
F.channelDetails ? t == null || t(F.channelDetails) : F.error && (n == null || n(F));
|
|
3877
3877
|
return;
|
|
3878
3878
|
}
|
|
3879
|
-
const
|
|
3880
|
-
|
|
3881
|
-
const
|
|
3879
|
+
const D = new FileReader();
|
|
3880
|
+
D.addEventListener("loadend", function(F) {
|
|
3881
|
+
const B = F.target.result, V = new Uint8Array(B), H = i.decode(V), z = H.segment;
|
|
3882
3882
|
if (H.event && H.event.length > 0 && H.event[0].pageStart) {
|
|
3883
|
-
const
|
|
3883
|
+
const L = H.event[0], K = [[], []], Z = L.times.length / 2;
|
|
3884
3884
|
let fe = 0;
|
|
3885
3885
|
for (let se = 0; se < Z; se++)
|
|
3886
|
-
K[0].push(
|
|
3886
|
+
K[0].push(L.times[fe]), K[1].push(L.times[fe + 1]), fe += 2;
|
|
3887
3887
|
let U = new Array(3), ne = 0;
|
|
3888
3888
|
for (; ne < 3; )
|
|
3889
3889
|
U[ne] = new Float32Array(K[0].length), ne++;
|
|
3890
3890
|
const le = {
|
|
3891
|
-
chId:
|
|
3891
|
+
chId: L.source,
|
|
3892
3892
|
lastUsed: 0,
|
|
3893
3893
|
unit: "uV",
|
|
3894
|
-
samplePeriod:
|
|
3895
|
-
pageStart:
|
|
3896
|
-
pageEnd:
|
|
3897
|
-
startTs:
|
|
3898
|
-
isMinMax:
|
|
3894
|
+
samplePeriod: L.samplePeriod,
|
|
3895
|
+
pageStart: L.pageStart,
|
|
3896
|
+
pageEnd: L.pageEnd,
|
|
3897
|
+
startTs: L.pageStart,
|
|
3898
|
+
isMinMax: L.isResampled,
|
|
3899
3899
|
unitM: 1,
|
|
3900
3900
|
type: "Neural",
|
|
3901
3901
|
nrPoints: Z,
|
|
@@ -3903,27 +3903,27 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3903
3903
|
cData: U
|
|
3904
3904
|
};
|
|
3905
3905
|
r == null || r({
|
|
3906
|
-
pageStart:
|
|
3906
|
+
pageStart: L.pageStart,
|
|
3907
3907
|
data: le,
|
|
3908
3908
|
type: "Neural",
|
|
3909
3909
|
nrResponses: H.totalResponses
|
|
3910
3910
|
});
|
|
3911
3911
|
}
|
|
3912
3912
|
if (z !== null) {
|
|
3913
|
-
let
|
|
3914
|
-
z.isMinMax ?
|
|
3913
|
+
let L = null;
|
|
3914
|
+
z.isMinMax ? L = z.data.length / 2 : L = z.data.length;
|
|
3915
3915
|
const K = new Array(3), Z = z.startTs;
|
|
3916
3916
|
let fe = 0, U = 0, ne = 0;
|
|
3917
3917
|
for (; ne < 3; )
|
|
3918
|
-
K[ne] = new Float64Array(
|
|
3918
|
+
K[ne] = new Float64Array(L), ne++;
|
|
3919
3919
|
if (z.isMinMax) {
|
|
3920
3920
|
let oe = 0;
|
|
3921
|
-
for (let pe = 0; pe <
|
|
3921
|
+
for (let pe = 0; pe < L; pe++) {
|
|
3922
3922
|
let we = -z.data[oe], Se = -z.data[oe + 1];
|
|
3923
3923
|
K[0][pe] = Z + pe * z.samplePeriod, K[1][pe] = we, K[2][pe] = Se, isNaN(we) || (U++, fe += we + (Se - we) / 2), oe += 2;
|
|
3924
3924
|
}
|
|
3925
3925
|
} else
|
|
3926
|
-
for (let oe = 0; oe <
|
|
3926
|
+
for (let oe = 0; oe < L; oe++) {
|
|
3927
3927
|
let pe = -z.data[oe];
|
|
3928
3928
|
K[0][oe] = Z + oe * z.samplePeriod, K[1][oe] = pe, isNaN(pe) || (U++, fe += pe);
|
|
3929
3929
|
}
|
|
@@ -3946,7 +3946,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3946
3946
|
isMinMax: z.isMinMax,
|
|
3947
3947
|
unitM: z.unitM,
|
|
3948
3948
|
type: z.segmentType,
|
|
3949
|
-
nrPoints:
|
|
3949
|
+
nrPoints: L,
|
|
3950
3950
|
cData: se,
|
|
3951
3951
|
parsedData: K,
|
|
3952
3952
|
median: le,
|
|
@@ -3967,17 +3967,17 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3967
3967
|
type: "gap"
|
|
3968
3968
|
});
|
|
3969
3969
|
}
|
|
3970
|
-
}),
|
|
3970
|
+
}), D.readAsArrayBuffer(_.data);
|
|
3971
3971
|
}, b = (_) => f.value && f.value.readyState === 1 ? (f.value.send(JSON.stringify(_)), !0) : !1, E = (_) => {
|
|
3972
|
-
let
|
|
3972
|
+
let D;
|
|
3973
3973
|
switch (_) {
|
|
3974
3974
|
case "NOT_MONTAGED":
|
|
3975
|
-
|
|
3975
|
+
D = { montage: "NOT_MONTAGED", packageId: s };
|
|
3976
3976
|
break;
|
|
3977
3977
|
default:
|
|
3978
|
-
|
|
3978
|
+
D = { montage: "CUSTOM_MONTAGE", packageId: s, montageMap: _ };
|
|
3979
3979
|
}
|
|
3980
|
-
b(
|
|
3980
|
+
b(D);
|
|
3981
3981
|
}, I = (_) => {
|
|
3982
3982
|
f.value && f.value.readyState === 1 ? f.value.send(JSON.stringify(_)) : setTimeout(() => I(_), 200);
|
|
3983
3983
|
}, M = () => {
|
|
@@ -3990,7 +3990,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3990
3990
|
return console.warn("⚠️ Cannot send dump buffer request - WebSocket not connected"), !1;
|
|
3991
3991
|
}, j = (_) => {
|
|
3992
3992
|
e = _;
|
|
3993
|
-
},
|
|
3993
|
+
}, W = (_) => {
|
|
3994
3994
|
r = _;
|
|
3995
3995
|
}, N = (_) => {
|
|
3996
3996
|
t = _;
|
|
@@ -4020,7 +4020,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4020
4020
|
setPackageId: C,
|
|
4021
4021
|
setUseMedian: k,
|
|
4022
4022
|
onSegment: j,
|
|
4023
|
-
onEvent:
|
|
4023
|
+
onEvent: W,
|
|
4024
4024
|
onChannelDetails: N,
|
|
4025
4025
|
onError: w
|
|
4026
4026
|
};
|
|
@@ -4056,7 +4056,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4056
4056
|
let E = null;
|
|
4057
4057
|
if (E = t.find((_) => _.id === b.id), !E || !E.visible)
|
|
4058
4058
|
continue;
|
|
4059
|
-
const I = d.start, M = d.rsPeriod, j = n.XOFFSET,
|
|
4059
|
+
const I = d.start, M = d.rsPeriod, j = n.XOFFSET, W = Math.min(Math.round(d.cHeight / r.channels.length - 2), 10);
|
|
4060
4060
|
for (let _ = 0; _ < E.dataSegments.length; _ += 2) {
|
|
4061
4061
|
if (E.dataSegments[_ + 1] < I) {
|
|
4062
4062
|
console.log("skipping something");
|
|
@@ -4066,8 +4066,8 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4066
4066
|
console.log("breaking something");
|
|
4067
4067
|
break;
|
|
4068
4068
|
}
|
|
4069
|
-
let
|
|
4070
|
-
m.fillRect(
|
|
4069
|
+
let D = Math.floor(j + (E.dataSegments[_] - I) / M), F = Math.floor(j + (E.dataSegments[_ + 1] - I) / M), B = Math.floor(E.rowBaseline - W / 2);
|
|
4070
|
+
m.fillRect(D, B, F - D, W);
|
|
4071
4071
|
}
|
|
4072
4072
|
e(E, b, d, n, s, a);
|
|
4073
4073
|
const N = b.blocks.length;
|
|
@@ -4075,52 +4075,52 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4075
4075
|
N && (w = b.blocks[0].type), E.hover ? E.selected ? (g.strokeStyle = "rgba(39,96,255,0.70)", g.fillStyle = "rgba(39,96,255,0.70)") : (g.strokeStyle = "rgba(39,96,255,0.60)", g.fillStyle = "rgba(39,96,255,0.60)") : E.selected ? (g.strokeStyle = "rgb(249,162,58)", g.fillStyle = "rgb(3249,162,58)") : w === "Neural" ? g.strokeStyle = "rgb(249,162,58)" : (g.strokeStyle = "black", g.fillStyle = "black");
|
|
4076
4076
|
let T = null, C = !0, k = 1e6 * (1 / E.sf);
|
|
4077
4077
|
for (let _ = 0; _ < N; _++) {
|
|
4078
|
-
const
|
|
4079
|
-
if (
|
|
4078
|
+
const D = b.blocks[_];
|
|
4079
|
+
if (D.nrPoints === 0) {
|
|
4080
4080
|
console.log("zero points");
|
|
4081
4081
|
continue;
|
|
4082
4082
|
}
|
|
4083
|
-
const
|
|
4084
|
-
let
|
|
4085
|
-
switch (m.clearRect(Math.floor(L
|
|
4083
|
+
const F = D.cData, B = D.nrPoints, V = F[0], H = F[1], z = F[2];
|
|
4084
|
+
let L = D.renderStartIndex, K = D.renderEndIndex;
|
|
4085
|
+
switch (m.clearRect(Math.floor(V[L]), Math.floor(E.rowBaseline - W / 2), Math.ceil(V[K] - V[L] + 2), W + 1), D.type) {
|
|
4086
4086
|
case "Continuous":
|
|
4087
4087
|
case "realtime":
|
|
4088
|
-
if (
|
|
4089
|
-
if (
|
|
4090
|
-
g.beginPath(), _ > 0 && L
|
|
4091
|
-
for (let Z =
|
|
4092
|
-
g.lineTo(
|
|
4093
|
-
for (let Z = K - 1; Z >=
|
|
4094
|
-
g.lineTo(
|
|
4095
|
-
_ > 0 && L
|
|
4088
|
+
if (D.isMinMax) {
|
|
4089
|
+
if (D.samplePeriod / k < 3 && (C = !1), C) {
|
|
4090
|
+
g.beginPath(), _ > 0 && V[L] < T.x + 3 ? g.moveTo(T.x, T.y) : g.moveTo(V[L], H[L]);
|
|
4091
|
+
for (let Z = L; Z < K + 1; Z++)
|
|
4092
|
+
g.lineTo(V[Z], H[Z]);
|
|
4093
|
+
for (let Z = K - 1; Z >= L; Z--)
|
|
4094
|
+
g.lineTo(V[Z], z[Z]);
|
|
4095
|
+
_ > 0 && V[L] < T.x + 3 && g.lineTo(T.x, T.y2), g.closePath(), g.fill();
|
|
4096
4096
|
} else {
|
|
4097
4097
|
g.beginPath();
|
|
4098
|
-
for (let Z =
|
|
4099
|
-
g.lineTo(
|
|
4098
|
+
for (let Z = L; Z < K + 1; Z++)
|
|
4099
|
+
g.lineTo(V[Z], H[Z]), g.lineTo(V[Z], z[Z]), g.moveTo(V[Z], H[Z]);
|
|
4100
4100
|
g.stroke();
|
|
4101
4101
|
}
|
|
4102
|
-
g.beginPath(), g.moveTo(L
|
|
4103
|
-
for (let Z =
|
|
4104
|
-
g.lineTo(
|
|
4102
|
+
g.beginPath(), g.moveTo(V[L], H[L]);
|
|
4103
|
+
for (let Z = L; Z < K + 1; Z++)
|
|
4104
|
+
g.lineTo(V[Z], H[Z]);
|
|
4105
4105
|
g.stroke();
|
|
4106
4106
|
} else {
|
|
4107
|
-
_ === 0 ? (g.beginPath(), g.moveTo(L
|
|
4108
|
-
for (let Z =
|
|
4109
|
-
g.lineTo(
|
|
4107
|
+
_ === 0 ? (g.beginPath(), g.moveTo(V[L], H[L])) : V[L] > T.x + 2 && g.moveTo(V[L], H[L]);
|
|
4108
|
+
for (let Z = L; Z < K + 1; Z++)
|
|
4109
|
+
g.lineTo(V[Z], H[Z]);
|
|
4110
4110
|
_ === N - 1 && g.stroke();
|
|
4111
4111
|
}
|
|
4112
4112
|
break;
|
|
4113
4113
|
case "Neural":
|
|
4114
4114
|
g.beginPath();
|
|
4115
|
-
for (let Z = 0; Z <
|
|
4116
|
-
g.moveTo(
|
|
4115
|
+
for (let Z = 0; Z < B; Z++)
|
|
4116
|
+
g.moveTo(V[Z], H[Z]), g.lineTo(V[Z], z[Z]);
|
|
4117
4117
|
g.stroke();
|
|
4118
4118
|
break;
|
|
4119
4119
|
}
|
|
4120
4120
|
T = {
|
|
4121
|
-
x:
|
|
4122
|
-
y: H[
|
|
4123
|
-
y2: z[
|
|
4121
|
+
x: V[B - 1],
|
|
4122
|
+
y: H[B - 1],
|
|
4123
|
+
y2: z[B - 1]
|
|
4124
4124
|
};
|
|
4125
4125
|
}
|
|
4126
4126
|
}
|
|
@@ -4146,9 +4146,9 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4146
4146
|
case "UNIT":
|
|
4147
4147
|
if (!l)
|
|
4148
4148
|
for (let m = 0; m < a; m++) {
|
|
4149
|
-
const R = t.blocks[m], g = R.cData, y = R.parsedData, O = d.XOFFSET, b = R.parsedData[0].length, E = g[0], I = g[1], M = g[2], j = y[0],
|
|
4149
|
+
const R = t.blocks[m], g = R.cData, y = R.parsedData, O = d.XOFFSET, b = R.parsedData[0].length, E = g[0], I = g[1], M = g[2], j = y[0], W = r.rowBaseline | 0, N = n.start, w = n.rsPeriod, T = n.cHeight / (2 * (n.nrVisibleChannels + 1)) | 0;
|
|
4150
4150
|
for (let C = 0; C < b; C++)
|
|
4151
|
-
E[C] = O + (j[C] - N) / w, I[C] =
|
|
4151
|
+
E[C] = O + (j[C] - N) / w, I[C] = W - T, M[C] = W + T;
|
|
4152
4152
|
}
|
|
4153
4153
|
break;
|
|
4154
4154
|
case "CONTINUOUS":
|
|
@@ -4166,12 +4166,12 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4166
4166
|
R.renderStartIndex = g > 0 ? g : 0;
|
|
4167
4167
|
let y = Math.floor((n.start + n.duration - (R.startTs + R.nrPoints * R.samplePeriod)) / R.samplePeriod);
|
|
4168
4168
|
R.renderEndIndex = y >= 0 ? R.nrPoints - 1 : R.nrPoints + y;
|
|
4169
|
-
const O = R.cData, b = R.parsedData, E = s * r.rowScale, I = d.XOFFSET, M = R.parsedData[0].length, j = O[0],
|
|
4169
|
+
const O = R.cData, b = R.parsedData, E = s * r.rowScale, I = d.XOFFSET, M = R.parsedData[0].length, j = O[0], W = O[1], N = O[2], w = b[0], T = b[1], C = b[2], k = r.rowBaseline;
|
|
4170
4170
|
let _ = 0;
|
|
4171
4171
|
d.USEMEDIAN ? _ = t.median : _ = t.mean;
|
|
4172
|
-
const
|
|
4173
|
-
for (let
|
|
4174
|
-
j[
|
|
4172
|
+
const D = n.rsPeriod, F = n.start;
|
|
4173
|
+
for (let B = 0; B < M; B++)
|
|
4174
|
+
j[B] = I + (w[B] - F) / D, W[B] = k - (T[B] - _) * E, R.isMinMax && (T[B] === C[B] ? N[B] = W[B] + 1 : N[B] = k - (C[B] - _) * E);
|
|
4175
4175
|
}
|
|
4176
4176
|
break;
|
|
4177
4177
|
}
|
|
@@ -4204,13 +4204,13 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4204
4204
|
N--;
|
|
4205
4205
|
return N++, -N - 2;
|
|
4206
4206
|
}
|
|
4207
|
-
const
|
|
4208
|
-
if (b[
|
|
4209
|
-
return d(b, E, I,
|
|
4210
|
-
if (b[
|
|
4211
|
-
return d(b, E,
|
|
4207
|
+
const W = parseInt((I + M) / 2);
|
|
4208
|
+
if (b[W].pageStart > E)
|
|
4209
|
+
return d(b, E, I, W - 1, j);
|
|
4210
|
+
if (b[W].pageStart < E)
|
|
4211
|
+
return d(b, E, W + 1, M, j);
|
|
4212
4212
|
{
|
|
4213
|
-
let N =
|
|
4213
|
+
let N = W;
|
|
4214
4214
|
if (j) {
|
|
4215
4215
|
for (; N >= 0 && b[N].pageStart === E; )
|
|
4216
4216
|
N--;
|
|
@@ -4228,8 +4228,8 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4228
4228
|
const M = [];
|
|
4229
4229
|
if (b.length > 0) {
|
|
4230
4230
|
const j = [];
|
|
4231
|
-
for (let
|
|
4232
|
-
const N = b[
|
|
4231
|
+
for (let W = 0; W < b.length; W++) {
|
|
4232
|
+
const N = b[W].content, T = {
|
|
4233
4233
|
id: I ? I(N) : N.id,
|
|
4234
4234
|
serverId: N.serverId,
|
|
4235
4235
|
label: N.name,
|
|
@@ -4254,7 +4254,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4254
4254
|
label_prefix: k,
|
|
4255
4255
|
label_value: _,
|
|
4256
4256
|
dataSegments: [],
|
|
4257
|
-
rank:
|
|
4257
|
+
rank: W,
|
|
4258
4258
|
visible: !0,
|
|
4259
4259
|
plotAgainst: null,
|
|
4260
4260
|
rowBaseline: null,
|
|
@@ -4304,11 +4304,11 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4304
4304
|
case "gap":
|
|
4305
4305
|
case "Neural":
|
|
4306
4306
|
case "Continuous":
|
|
4307
|
-
let j = !1,
|
|
4308
|
-
if (
|
|
4309
|
-
let w = n(
|
|
4310
|
-
for (;
|
|
4311
|
-
if (
|
|
4307
|
+
let j = !1, W = E && E.segments;
|
|
4308
|
+
if (W && b.type !== "gap" && (j = !0, W.length > 0)) {
|
|
4309
|
+
let w = n(W, b.data.startTs, !0, 0);
|
|
4310
|
+
for (; W[w] && W[w].pageStart === b.data.pageStart; ) {
|
|
4311
|
+
if (W[w].startTs === b.data.startTs) {
|
|
4312
4312
|
j = !1;
|
|
4313
4313
|
break;
|
|
4314
4314
|
}
|
|
@@ -4328,7 +4328,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4328
4328
|
T && c.value.delete(b.data.pageStart);
|
|
4329
4329
|
}
|
|
4330
4330
|
}
|
|
4331
|
-
j && (
|
|
4331
|
+
j && (W.push(b.data), W.sort((w, T) => w.startTs < T.startTs ? -1 : w.startTs > T.startTs ? 1 : 0));
|
|
4332
4332
|
break;
|
|
4333
4333
|
}
|
|
4334
4334
|
}, h = () => {
|
|
@@ -4339,16 +4339,16 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4339
4339
|
v.channels[b].blocks = [];
|
|
4340
4340
|
}, m = (b) => {
|
|
4341
4341
|
let E = 0, I = 0, M = v.channels;
|
|
4342
|
-
for (let
|
|
4343
|
-
let N = M[
|
|
4342
|
+
for (let W = 0; W < M.length; W++) {
|
|
4343
|
+
let N = M[W].blocks;
|
|
4344
4344
|
for (let w = 0; w < N.length; w++)
|
|
4345
4345
|
N[w].type === "Continuous" && (E += R(N[w].parsedData[1]), I++);
|
|
4346
4346
|
}
|
|
4347
4347
|
const j = E / I;
|
|
4348
4348
|
return !isNaN(j) && b ? b / M.length / (2 * j) : 1;
|
|
4349
4349
|
}, R = (b) => {
|
|
4350
|
-
const E = g(b), I = b.map(function(
|
|
4351
|
-
const N =
|
|
4350
|
+
const E = g(b), I = b.map(function(W) {
|
|
4351
|
+
const N = W - E;
|
|
4352
4352
|
return N * N;
|
|
4353
4353
|
}), M = g(I);
|
|
4354
4354
|
return Math.sqrt(M);
|
|
@@ -4398,7 +4398,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4398
4398
|
} else
|
|
4399
4399
|
console.log("✅ No more prefetch requests, stopping prefetch timer"), clearInterval(v.value), u.value = !1;
|
|
4400
4400
|
};
|
|
4401
|
-
}, n = (y, O, b, E, I, M, j,
|
|
4401
|
+
}, n = (y, O, b, E, I, M, j, W, N, w) => {
|
|
4402
4402
|
E.start = O, E.duration = b;
|
|
4403
4403
|
const T = [];
|
|
4404
4404
|
for (let C = 0; C < E.channels.length; C++) {
|
|
@@ -4415,8 +4415,8 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4415
4415
|
blocks: []
|
|
4416
4416
|
});
|
|
4417
4417
|
}
|
|
4418
|
-
return d(y, O, b, E, I, M, j,
|
|
4419
|
-
}, d = (y, O, b, E, I, M, j,
|
|
4418
|
+
return d(y, O, b, E, I, M, j, W, N, w);
|
|
4419
|
+
}, d = (y, O, b, E, I, M, j, W, N, w) => {
|
|
4420
4420
|
f.value = [];
|
|
4421
4421
|
let C = !1;
|
|
4422
4422
|
(i.value !== O || e.value !== b) && (c.value = [], C = !0), i.value = O, e.value = b;
|
|
@@ -4424,69 +4424,69 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4424
4424
|
for (let _ = 0; _ < E.channels.length; _++)
|
|
4425
4425
|
k.push(E.channels[_]);
|
|
4426
4426
|
for (let _ = 0; _ < y.length; _++) {
|
|
4427
|
-
let
|
|
4428
|
-
const
|
|
4427
|
+
let D = !1;
|
|
4428
|
+
const F = y[_], B = F.segments, V = w ? w(F) : F.id, H = k.findIndex((ne) => (w ? w(ne) : ne.id) === V);
|
|
4429
4429
|
if (H === -1)
|
|
4430
4430
|
continue;
|
|
4431
4431
|
const z = E.channels[H];
|
|
4432
4432
|
if (!z)
|
|
4433
4433
|
continue;
|
|
4434
4434
|
z.blocks = [];
|
|
4435
|
-
let
|
|
4436
|
-
|
|
4435
|
+
let L = Math.floor(O / 15e6) * 15e6;
|
|
4436
|
+
L < 0 && (L = 0);
|
|
4437
4437
|
let K = 0, Z = 0;
|
|
4438
|
-
|
|
4438
|
+
B.length > 0 && (K = N(B, L, !0, 0));
|
|
4439
4439
|
let fe = O + b + M.PREFETCHPAGES * 15e6;
|
|
4440
|
-
fe >
|
|
4440
|
+
fe > W && (fe = W);
|
|
4441
4441
|
let U;
|
|
4442
|
-
for (
|
|
4443
|
-
|
|
4442
|
+
for (B.length > 0 && (U = B[K]); L < fe || D; ) {
|
|
4443
|
+
D = !1;
|
|
4444
4444
|
let ne = !1;
|
|
4445
|
-
if (U && (ne =
|
|
4445
|
+
if (U && (ne = L >= U.pageStart && L <= U.pageEnd), ne) {
|
|
4446
4446
|
const le = U.pageStart;
|
|
4447
4447
|
for (; U && U.pageStart === le; )
|
|
4448
|
-
U.startTs < O + b && z.blocks.push(U), Z += 1, U =
|
|
4449
|
-
|
|
4448
|
+
U.startTs < O + b && z.blocks.push(U), Z += 1, U = B[K + Z];
|
|
4449
|
+
L += 15e6, U && U.pageStart === le && (D = !0);
|
|
4450
4450
|
} else {
|
|
4451
|
-
if (I.get(
|
|
4452
|
-
if (
|
|
4453
|
-
for (; U && U.pageEnd <
|
|
4451
|
+
if (I.get(L)) {
|
|
4452
|
+
if (L += 15e6, U && L >= U.pageEnd)
|
|
4453
|
+
for (; U && U.pageEnd < L && (Z += 1, U = B[K + Z], !!U); )
|
|
4454
4454
|
;
|
|
4455
4455
|
continue;
|
|
4456
4456
|
}
|
|
4457
|
-
if (
|
|
4458
|
-
|
|
4457
|
+
if (L >= W) {
|
|
4458
|
+
L += 15e6;
|
|
4459
4459
|
continue;
|
|
4460
4460
|
}
|
|
4461
|
-
let le =
|
|
4461
|
+
let le = L < O + b, se = !1;
|
|
4462
4462
|
if (le) {
|
|
4463
4463
|
for (let ue in c.value)
|
|
4464
|
-
if (c.value[ue].start ===
|
|
4464
|
+
if (c.value[ue].start === L) {
|
|
4465
4465
|
c.value.splice(ue, 1);
|
|
4466
4466
|
break;
|
|
4467
4467
|
}
|
|
4468
4468
|
for (let ue in f.value)
|
|
4469
|
-
f.value[ue].start ===
|
|
4469
|
+
f.value[ue].start === L && (f.value[ue].channels.push(F), se = !0);
|
|
4470
4470
|
se || f.value.push({
|
|
4471
|
-
channels: [
|
|
4472
|
-
start:
|
|
4471
|
+
channels: [F],
|
|
4472
|
+
start: L,
|
|
4473
4473
|
duration: 15e6,
|
|
4474
4474
|
isInViewport: !0,
|
|
4475
4475
|
pixelWidth: Math.ceil(j)
|
|
4476
4476
|
});
|
|
4477
4477
|
} else if (C) {
|
|
4478
4478
|
for (let ue in c.value)
|
|
4479
|
-
c.value[ue].start ===
|
|
4479
|
+
c.value[ue].start === L && (c.value[ue].channels.push(F), se = !0);
|
|
4480
4480
|
se || c.value.push({
|
|
4481
|
-
channels: [
|
|
4482
|
-
start:
|
|
4481
|
+
channels: [F],
|
|
4482
|
+
start: L,
|
|
4483
4483
|
duration: 15e6,
|
|
4484
4484
|
isInViewport: !1,
|
|
4485
4485
|
pixelWidth: Math.ceil(j)
|
|
4486
4486
|
});
|
|
4487
4487
|
}
|
|
4488
|
-
if (
|
|
4489
|
-
for (; U && U.pageEnd <
|
|
4488
|
+
if (L += 15e6, U && L >= U.pageEnd)
|
|
4489
|
+
for (; U && U.pageEnd < L && (Z += 1, U = B[K + Z], !!U); )
|
|
4490
4490
|
;
|
|
4491
4491
|
}
|
|
4492
4492
|
}
|
|
@@ -4496,10 +4496,10 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4496
4496
|
asyncRequests: f.value,
|
|
4497
4497
|
asyncPreRequests: c.value
|
|
4498
4498
|
};
|
|
4499
|
-
}, s = (y, O) => y.startTs < O.startTs ? -1 : y.startTs > O.startTs ? 1 : 0, l = (y, O = 0, b, E, I, M, j,
|
|
4499
|
+
}, s = (y, O) => y.startTs < O.startTs ? -1 : y.startTs > O.startTs ? 1 : 0, l = (y, O = 0, b, E, I, M, j, W) => {
|
|
4500
4500
|
if (y.length === 0)
|
|
4501
4501
|
return console.log("⚠️ No requests to send"), !1;
|
|
4502
|
-
const N =
|
|
4502
|
+
const N = W;
|
|
4503
4503
|
for (let w = 0; w < y.length; w++) {
|
|
4504
4504
|
let T;
|
|
4505
4505
|
w === 0 ? T = y[O] : w === O ? T = y[0] : T = y[w];
|
|
@@ -4528,13 +4528,13 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4528
4528
|
const k = b;
|
|
4529
4529
|
if (k && k.readyState === 1) {
|
|
4530
4530
|
const _ = T.channels.map((z) => {
|
|
4531
|
-
const
|
|
4531
|
+
const L = z.serverId || z.id, K = z.label || z.name;
|
|
4532
4532
|
return {
|
|
4533
|
-
id:
|
|
4533
|
+
id: L,
|
|
4534
4534
|
// Server expects serverId
|
|
4535
4535
|
name: K
|
|
4536
4536
|
};
|
|
4537
|
-
}),
|
|
4537
|
+
}), D = {
|
|
4538
4538
|
session: E,
|
|
4539
4539
|
minMax: !0,
|
|
4540
4540
|
startTime: T.start,
|
|
@@ -4542,16 +4542,16 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4542
4542
|
packageId: I.content.id,
|
|
4543
4543
|
pixelWidth: T.pixelWidth,
|
|
4544
4544
|
virtualChannels: _
|
|
4545
|
-
},
|
|
4546
|
-
k.send(
|
|
4547
|
-
const
|
|
4548
|
-
for (let z = 0; z <
|
|
4549
|
-
const
|
|
4550
|
-
|
|
4545
|
+
}, F = JSON.stringify(D);
|
|
4546
|
+
k.send(F);
|
|
4547
|
+
const B = T.channels.length, V = /* @__PURE__ */ new Map();
|
|
4548
|
+
for (let z = 0; z < B; z++) {
|
|
4549
|
+
const L = T.channels[z].id;
|
|
4550
|
+
V.set(L, NaN);
|
|
4551
4551
|
}
|
|
4552
4552
|
const H = {
|
|
4553
|
-
count:
|
|
4554
|
-
counter:
|
|
4553
|
+
count: B,
|
|
4554
|
+
counter: V,
|
|
4555
4555
|
subPageCount: NaN,
|
|
4556
4556
|
ts: Date.now(),
|
|
4557
4557
|
inViewport: T.isInViewport,
|
|
@@ -4588,8 +4588,8 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4588
4588
|
return y.forEach(function(I, M) {
|
|
4589
4589
|
if (!isNaN(I.subPageCount)) {
|
|
4590
4590
|
const j = [];
|
|
4591
|
-
I.counter.forEach(function(
|
|
4592
|
-
!isNaN(
|
|
4591
|
+
I.counter.forEach(function(W, N) {
|
|
4592
|
+
!isNaN(W) && W > 0 && j.push(N);
|
|
4593
4593
|
}), j.length > 0 && E.push({
|
|
4594
4594
|
channels: j,
|
|
4595
4595
|
start: M,
|
|
@@ -4644,41 +4644,41 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4644
4644
|
}
|
|
4645
4645
|
return T;
|
|
4646
4646
|
}, h = (w, T, C = null) => {
|
|
4647
|
-
var
|
|
4647
|
+
var F, B;
|
|
4648
4648
|
const k = C || c.value, _ = `${w}_${T}_${k}`;
|
|
4649
4649
|
if (e.value.has(_))
|
|
4650
4650
|
return e.value.get(_);
|
|
4651
|
-
let
|
|
4651
|
+
let D = `${w}-${T}`;
|
|
4652
4652
|
if (k !== "NOT_MONTAGED") {
|
|
4653
|
-
const
|
|
4654
|
-
if (
|
|
4655
|
-
for (const H of Object.keys(
|
|
4656
|
-
const z =
|
|
4657
|
-
if (((
|
|
4658
|
-
|
|
4653
|
+
const V = (F = v.value) == null ? void 0 : F.find((H) => H.name === k);
|
|
4654
|
+
if (V != null && V.channelPairs)
|
|
4655
|
+
for (const H of Object.keys(V.channelPairs)) {
|
|
4656
|
+
const z = V.channelPairs[H];
|
|
4657
|
+
if (((B = z.channels) == null ? void 0 : B.length) === 2 && z.channels[0] === w && z.channels[1] === T) {
|
|
4658
|
+
D = z.name || D;
|
|
4659
4659
|
break;
|
|
4660
4660
|
}
|
|
4661
4661
|
}
|
|
4662
4662
|
}
|
|
4663
|
-
return e.value.set(_,
|
|
4663
|
+
return e.value.set(_, D), D;
|
|
4664
4664
|
}, m = (w) => {
|
|
4665
4665
|
if (!Array.isArray(w))
|
|
4666
4666
|
return console.warn("Invalid channel details provided:", w), [];
|
|
4667
4667
|
const T = performance.now();
|
|
4668
4668
|
o.totalChannels = w.length, o.processedChannels = 0, o.errors = 0;
|
|
4669
4669
|
const C = w.map(({ id: k, name: _ }) => {
|
|
4670
|
-
var
|
|
4670
|
+
var D;
|
|
4671
4671
|
try {
|
|
4672
|
-
const
|
|
4673
|
-
if (!
|
|
4672
|
+
const F = R(k);
|
|
4673
|
+
if (!F)
|
|
4674
4674
|
return console.warn(
|
|
4675
4675
|
`❌ Base channel not found for ID: ${k}, available base channels:`,
|
|
4676
|
-
((
|
|
4676
|
+
((D = f.value) == null ? void 0 : D.map((V) => ({ id: V == null ? void 0 : V.id, name: V == null ? void 0 : V.name }))) || []
|
|
4677
4677
|
), o.errors++, null;
|
|
4678
|
-
const
|
|
4679
|
-
return o.processedChannels++, r.value && o.montageChannels++,
|
|
4680
|
-
} catch (
|
|
4681
|
-
return console.error(`❌ Error processing channel ${k}:`,
|
|
4678
|
+
const B = g(k, _, F);
|
|
4679
|
+
return o.processedChannels++, r.value && o.montageChannels++, B;
|
|
4680
|
+
} catch (F) {
|
|
4681
|
+
return console.error(`❌ Error processing channel ${k}:`, F), o.errors++, null;
|
|
4682
4682
|
}
|
|
4683
4683
|
}).filter(Boolean);
|
|
4684
4684
|
return o.lastProcessingTime = performance.now() - T, C;
|
|
@@ -4691,19 +4691,19 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4691
4691
|
}, g = (w, T, C) => {
|
|
4692
4692
|
let k = T;
|
|
4693
4693
|
const _ = w;
|
|
4694
|
-
let
|
|
4694
|
+
let D = w;
|
|
4695
4695
|
if (r.value) {
|
|
4696
|
-
|
|
4697
|
-
const
|
|
4698
|
-
|
|
4696
|
+
D = `${w}_${T}`;
|
|
4697
|
+
const B = T.split("<->", 2);
|
|
4698
|
+
B.length === 2 && (k = h(B[0], B[1]), console.log("🎭 Montage display name created:", {
|
|
4699
4699
|
originalName: T,
|
|
4700
|
-
channelParts:
|
|
4700
|
+
channelParts: B,
|
|
4701
4701
|
displayName: k
|
|
4702
4702
|
}));
|
|
4703
4703
|
}
|
|
4704
4704
|
return {
|
|
4705
4705
|
content: {
|
|
4706
|
-
id:
|
|
4706
|
+
id: D,
|
|
4707
4707
|
// ✅ Unique for client-side operations
|
|
4708
4708
|
serverId: _,
|
|
4709
4709
|
// ✅ What server provided/expects
|
|
@@ -4724,11 +4724,11 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4724
4724
|
properties: C.properties || []
|
|
4725
4725
|
};
|
|
4726
4726
|
}, y = (w) => {
|
|
4727
|
-
var k, _;
|
|
4727
|
+
var k, _, D;
|
|
4728
4728
|
if (w === "NOT_MONTAGED")
|
|
4729
4729
|
return {
|
|
4730
4730
|
montage: "NOT_MONTAGED",
|
|
4731
|
-
packageId: (k = u.value) == null ? void 0 : k.id,
|
|
4731
|
+
packageId: (_ = (k = u.value) == null ? void 0 : k.content) == null ? void 0 : _.id,
|
|
4732
4732
|
montageMap: []
|
|
4733
4733
|
};
|
|
4734
4734
|
const T = v.value.find((F) => F.name === w);
|
|
@@ -4737,7 +4737,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4737
4737
|
const C = T.channelPairs.map((F) => F.channels);
|
|
4738
4738
|
return {
|
|
4739
4739
|
montage: "CUSTOM_MONTAGE",
|
|
4740
|
-
packageId: (
|
|
4740
|
+
packageId: (D = u.value) == null ? void 0 : D.content.id,
|
|
4741
4741
|
montageMap: C
|
|
4742
4742
|
};
|
|
4743
4743
|
}, O = (w) => {
|
|
@@ -4754,17 +4754,17 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4754
4754
|
errors: T
|
|
4755
4755
|
};
|
|
4756
4756
|
}, b = (w) => w.sort((T, C) => {
|
|
4757
|
-
const k = T.label || "", _ = C.label || "",
|
|
4758
|
-
if (
|
|
4757
|
+
const k = T.label || "", _ = C.label || "", D = k.split("<->", 3), F = _.split("<->", 3);
|
|
4758
|
+
if (D.length > 2 || F.length > 2)
|
|
4759
4759
|
return k.localeCompare(_);
|
|
4760
|
-
const
|
|
4761
|
-
if (
|
|
4762
|
-
const H = parseFloat(
|
|
4763
|
-
return !isNaN(H) && !isNaN(z) ? H - z :
|
|
4760
|
+
const B = D[0] || "", V = F[0] || "";
|
|
4761
|
+
if (B === V && D.length > 1 && F.length > 1) {
|
|
4762
|
+
const H = parseFloat(D[1]), z = parseFloat(F[1]);
|
|
4763
|
+
return !isNaN(H) && !isNaN(z) ? H - z : D[1].localeCompare(F[1]);
|
|
4764
4764
|
}
|
|
4765
|
-
return
|
|
4765
|
+
return B.localeCompare(V);
|
|
4766
4766
|
}), E = (w, T = 0) => {
|
|
4767
|
-
const C = w.content, k = C.label.split("<->", 3), _ = k[0] || "",
|
|
4767
|
+
const C = w.content, k = C.label.split("<->", 3), _ = k[0] || "", D = k.length > 1 ? isNaN(parseFloat(k[1])) ? k[1] : parseFloat(k[1]) : 0;
|
|
4768
4768
|
return {
|
|
4769
4769
|
id: C.id,
|
|
4770
4770
|
serverId: C.serverId,
|
|
@@ -4773,7 +4773,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4773
4773
|
displayName: C.displayName,
|
|
4774
4774
|
labelParts: k,
|
|
4775
4775
|
labelPrefix: _,
|
|
4776
|
-
labelValue:
|
|
4776
|
+
labelValue: D,
|
|
4777
4777
|
dataSegments: [],
|
|
4778
4778
|
rank: T,
|
|
4779
4779
|
visible: !0,
|
|
@@ -4798,10 +4798,10 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4798
4798
|
channelType: C = null,
|
|
4799
4799
|
visible: k = null,
|
|
4800
4800
|
montageScheme: _ = null,
|
|
4801
|
-
labelPattern:
|
|
4802
|
-
sampleRate:
|
|
4801
|
+
labelPattern: D = null,
|
|
4802
|
+
sampleRate: F = null
|
|
4803
4803
|
} = T;
|
|
4804
|
-
return w.filter((
|
|
4804
|
+
return w.filter((B) => !(C && B.type !== C || k !== null && B.visible !== k || _ && B.montageScheme !== _ || D && !new RegExp(D, "i").test(B.label) || F && B.sf !== F));
|
|
4805
4805
|
}, M = (w, T = "type") => {
|
|
4806
4806
|
const C = {};
|
|
4807
4807
|
return w.forEach((k) => {
|
|
@@ -4837,7 +4837,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4837
4837
|
currentMontageScheme: c.value,
|
|
4838
4838
|
availableMontages: ((w = v.value) == null ? void 0 : w.map((T) => T.name)) || []
|
|
4839
4839
|
};
|
|
4840
|
-
},
|
|
4840
|
+
}, W = () => {
|
|
4841
4841
|
i.value.clear(), e.value.clear(), Object.assign(o, {
|
|
4842
4842
|
totalChannels: 0,
|
|
4843
4843
|
processedChannels: 0,
|
|
@@ -4881,7 +4881,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4881
4881
|
createVirtualChannel: g,
|
|
4882
4882
|
// Management
|
|
4883
4883
|
getProcessingStats: j,
|
|
4884
|
-
clearCaches:
|
|
4884
|
+
clearCaches: W,
|
|
4885
4885
|
batchProcessChannels: N
|
|
4886
4886
|
};
|
|
4887
4887
|
};
|
|
@@ -4938,19 +4938,19 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4938
4938
|
} = useWebSocket(), {
|
|
4939
4939
|
plotCanvasRef: M,
|
|
4940
4940
|
blurCanvasRef: j,
|
|
4941
|
-
initializeCanvases:
|
|
4941
|
+
initializeCanvases: W,
|
|
4942
4942
|
renderData: N,
|
|
4943
4943
|
cpCanvasScaler: w
|
|
4944
4944
|
} = useCanvasRenderer(), T = ref(1), C = ref(!1), {
|
|
4945
4945
|
chData: k,
|
|
4946
4946
|
requestedPages: _,
|
|
4947
|
-
viewData:
|
|
4948
|
-
channelsReady:
|
|
4949
|
-
autoScale:
|
|
4950
|
-
initChannels:
|
|
4947
|
+
viewData: D,
|
|
4948
|
+
channelsReady: F,
|
|
4949
|
+
autoScale: B,
|
|
4950
|
+
initChannels: V,
|
|
4951
4951
|
dataCallback: H,
|
|
4952
4952
|
invalidate: z,
|
|
4953
|
-
autoScaleViewData:
|
|
4953
|
+
autoScaleViewData: L,
|
|
4954
4954
|
segmIndexOf: K,
|
|
4955
4955
|
updateCurrentRequestedSamplePeriod: Z,
|
|
4956
4956
|
currentRequestedSamplePeriod: fe,
|
|
@@ -4994,19 +4994,19 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4994
4994
|
const _e = () => {
|
|
4995
4995
|
var A;
|
|
4996
4996
|
try {
|
|
4997
|
-
if (!
|
|
4997
|
+
if (!F.value) {
|
|
4998
4998
|
console.log("⏳ Render skipped - channels not ready");
|
|
4999
4999
|
return;
|
|
5000
5000
|
}
|
|
5001
5001
|
ce.nrVisibleChannels = ((A = t.value) == null ? void 0 : A.reduce((Y, X) => X.visible ? Y + 1 : Y, 0)) || 0;
|
|
5002
5002
|
let J = 0, G = 0;
|
|
5003
|
-
if (
|
|
5003
|
+
if (D.channels.forEach((Y, X) => {
|
|
5004
5004
|
const $ = Y.blocks || [], Q = $.reduce((ee, te) => ee + (te.nrPoints || 0), 0);
|
|
5005
5005
|
$.length > 0 && (G++, J += $.length);
|
|
5006
5006
|
}), G === 0)
|
|
5007
5007
|
return;
|
|
5008
5008
|
N(
|
|
5009
|
-
|
|
5009
|
+
D,
|
|
5010
5010
|
t.value || [],
|
|
5011
5011
|
u.constants,
|
|
5012
5012
|
ce,
|
|
@@ -5019,7 +5019,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5019
5019
|
}, Ee = ref(), xe = () => {
|
|
5020
5020
|
Ee.value = setInterval(() => {
|
|
5021
5021
|
var Y, X;
|
|
5022
|
-
if (!
|
|
5022
|
+
if (!F.value) return;
|
|
5023
5023
|
const A = {
|
|
5024
5024
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5025
5025
|
requestedPagesSize: _.value.size,
|
|
@@ -5065,7 +5065,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5065
5065
|
A,
|
|
5066
5066
|
u.start,
|
|
5067
5067
|
u.duration,
|
|
5068
|
-
|
|
5068
|
+
D,
|
|
5069
5069
|
_.value,
|
|
5070
5070
|
u.constants,
|
|
5071
5071
|
J,
|
|
@@ -5105,9 +5105,9 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5105
5105
|
}, ie = () => {
|
|
5106
5106
|
Ce(), _e();
|
|
5107
5107
|
}, P = () => {
|
|
5108
|
-
Ce(),
|
|
5108
|
+
Ce(), B.value === 0 ? (B.value--, x()) : _e();
|
|
5109
5109
|
}, x = () => {
|
|
5110
|
-
const A =
|
|
5110
|
+
const A = L(u.cHeight);
|
|
5111
5111
|
A && !isNaN(A) && o("setGlobalZoom", A), _e();
|
|
5112
5112
|
}, p = createThrottle(P, 250, { leading: !1 }), S = createThrottle(() => ie(), 50);
|
|
5113
5113
|
watch(() => u.rsPeriod, (A, J) => {
|
|
@@ -5116,7 +5116,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5116
5116
|
z();
|
|
5117
5117
|
}), watch(() => n.value, (A) => {
|
|
5118
5118
|
if (s.value && s.value.readyState === 1) {
|
|
5119
|
-
console.log("🔄 Montage changing to:", A), _.value.clear(), we(), z(), ge.value = 0, ae.value = null, qe.value = null, Te.value = null,
|
|
5119
|
+
console.log("🔄 Montage changing to:", A), _.value.clear(), we(), z(), ge.value = 0, ae.value = null, qe.value = null, Te.value = null, F.value = !1;
|
|
5120
5120
|
const J = ve(A);
|
|
5121
5121
|
console.log("📡 Sending montage payload:", J), J && h(J);
|
|
5122
5122
|
}
|
|
@@ -5140,7 +5140,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5140
5140
|
}))
|
|
5141
5141
|
});
|
|
5142
5142
|
const J = Re(A);
|
|
5143
|
-
|
|
5143
|
+
V(J, r, Se).then(() => {
|
|
5144
5144
|
z(), ie(), o("channelsInitialized");
|
|
5145
5145
|
});
|
|
5146
5146
|
}), I((A) => {
|
|
@@ -5197,7 +5197,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5197
5197
|
});
|
|
5198
5198
|
};
|
|
5199
5199
|
return onMounted(async () => {
|
|
5200
|
-
T.value = 1,
|
|
5200
|
+
T.value = 1, W(T.value), q();
|
|
5201
5201
|
}), onUnmounted(() => {
|
|
5202
5202
|
clearInterval(Ee.value), _.value.size > 0 && R(), r.resetViewer(), we(), g(), p.cancel && p.cancel(), S.cancel && S.cancel();
|
|
5203
5203
|
}), c({
|
|
@@ -5205,7 +5205,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5205
5205
|
invalidate: z,
|
|
5206
5206
|
throttledDataRender: S,
|
|
5207
5207
|
sendFilterMessage: m,
|
|
5208
|
-
viewData:
|
|
5208
|
+
viewData: D,
|
|
5209
5209
|
requestedPages: _,
|
|
5210
5210
|
chData: k,
|
|
5211
5211
|
viewerChannels: t,
|
|
@@ -5260,12 +5260,12 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5260
5260
|
],
|
|
5261
5261
|
setup(f, { expose: c, emit: v }) {
|
|
5262
5262
|
const u = defineAsyncComponent(
|
|
5263
|
-
() => import("./TSAnnotationCanvas-
|
|
5263
|
+
() => import("./TSAnnotationCanvas-B0b_EheO.js")
|
|
5264
5264
|
), o = f, i = v, e = inject("viewerStore", () => createViewerStore("default"), !0), { viewerChannels: r, viewerAnnotations: t, viewerActiveTool: n, viewerSelectedChannels: d } = storeToRefs(e), s = ref(null), l = ref(null), a = ref(null), h = ref(null), m = ref(null), R = ref(null);
|
|
5265
5265
|
reactive({});
|
|
5266
5266
|
const g = ref(0), y = ref(0), O = ref(0), b = ref(1), E = ref(!1), I = ref(!1), M = ref("pointer");
|
|
5267
5267
|
ref(!1);
|
|
5268
|
-
const j = reactive({ x: 0, y: 0 }),
|
|
5268
|
+
const j = reactive({ x: 0, y: 0 }), W = ref(0), N = ref(["Event", "Artifact", "Seizure", "Mark", "Stim On", "Stim Off", "Start", "Stop"]), w = ref(0), T = ref(null), C = ref(0), k = ref(!0), _ = () => {
|
|
5269
5269
|
if (t.value.length > 0) {
|
|
5270
5270
|
if (!t.value.some((S) => S.selected)) {
|
|
5271
5271
|
console.log("No layer selected, selecting first layer:", t.value[0]);
|
|
@@ -5276,12 +5276,12 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5276
5276
|
console.warn("No annotation layers available - waiting for layers to load"), setTimeout(() => {
|
|
5277
5277
|
t.value.length > 0 && _();
|
|
5278
5278
|
}, 500);
|
|
5279
|
-
},
|
|
5279
|
+
}, D = (p) => {
|
|
5280
5280
|
if (console.log("TSViewerCanvas: setActiveTool called with:", p), p) {
|
|
5281
|
-
const S = "set" + p.charAt(0).toUpperCase() + p.slice(1), q =
|
|
5281
|
+
const S = "set" + p.charAt(0).toUpperCase() + p.slice(1), q = F[S];
|
|
5282
5282
|
typeof q == "function" && q();
|
|
5283
5283
|
}
|
|
5284
|
-
},
|
|
5284
|
+
}, F = {
|
|
5285
5285
|
setPan: () => {
|
|
5286
5286
|
console.log("Pan tool activated");
|
|
5287
5287
|
},
|
|
@@ -5291,14 +5291,14 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5291
5291
|
setAnnotate: () => {
|
|
5292
5292
|
console.log("Annotate tool activated"), _();
|
|
5293
5293
|
}
|
|
5294
|
-
},
|
|
5294
|
+
}, B = computed(() => r.value.filter((p) => p.visible).length), V = computed(() => o.cHeight - 20), H = computed(() => o.cWidth + o.constants.CURSOROFFSET);
|
|
5295
5295
|
computed(() => l.value);
|
|
5296
5296
|
const z = computed(() => ({
|
|
5297
5297
|
width: o.cWidth + "px",
|
|
5298
5298
|
height: o.cHeight + "px"
|
|
5299
|
-
})),
|
|
5299
|
+
})), L = computed(() => ({
|
|
5300
5300
|
width: o.cWidth + "px",
|
|
5301
|
-
height:
|
|
5301
|
+
height: V.value + "px"
|
|
5302
5302
|
})), K = computed(() => ({
|
|
5303
5303
|
width: H.value + "px",
|
|
5304
5304
|
height: o.cHeight + "px"
|
|
@@ -5318,7 +5318,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5318
5318
|
(p = s.value) == null || p.throttledDataRender();
|
|
5319
5319
|
});
|
|
5320
5320
|
}), watch(n, (p) => {
|
|
5321
|
-
p && (
|
|
5321
|
+
p && (D(p), !E.value && !["annResize-left", "annResize-right", "annSelect"].includes(M.value) && (M.value = p));
|
|
5322
5322
|
}, { immediate: !0 }), watch(t, (p) => {
|
|
5323
5323
|
p.length > 0 && n.value === "annotate" && _();
|
|
5324
5324
|
}, { immediate: !0 }), watch(M, () => {
|
|
@@ -5410,7 +5410,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5410
5410
|
console.error("No layers available with valid IDs");
|
|
5411
5411
|
return;
|
|
5412
5412
|
}
|
|
5413
|
-
const Q = d, ee = Q.length === r.value.length || Q.length === 0, te = (p.clientX - j.x) * g.value, he =
|
|
5413
|
+
const Q = d, ee = Q.length === r.value.length || Q.length === 0, te = (p.clientX - j.x) * g.value, he = W.value + (j.x - R.value.getBoundingClientRect().left) * g.value;
|
|
5414
5414
|
if (console.log("Creating annotation with:", {
|
|
5415
5415
|
startTime: he,
|
|
5416
5416
|
duration: te,
|
|
@@ -5452,7 +5452,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5452
5452
|
R.value.getContext("2d").clearRect(0, 0, o.cWidth, o.cHeight);
|
|
5453
5453
|
}, ve = (p) => {
|
|
5454
5454
|
var q;
|
|
5455
|
-
console.log("TSViewerCanvas: _onMouseDown called with pointerMode:", M.value, "viewerActiveTool:", n.value), E.value = !0,
|
|
5455
|
+
console.log("TSViewerCanvas: _onMouseDown called with pointerMode:", M.value, "viewerActiveTool:", n.value), E.value = !0, W.value = o.start;
|
|
5456
5456
|
const S = R.value.getBoundingClientRect();
|
|
5457
5457
|
switch (j.x = p.clientX, j.y = p.clientY, n.value === "annotate" && !["annResize-left", "annResize-right", "annSelect"].includes(M.value) && (console.log("Setting pointerMode to annotate for annotation creation"), M.value = "annotate"), M.value) {
|
|
5458
5458
|
case "annResize-left":
|
|
@@ -5471,7 +5471,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5471
5471
|
switch (n.value) {
|
|
5472
5472
|
case "pan":
|
|
5473
5473
|
if (E.value) {
|
|
5474
|
-
const $ =
|
|
5474
|
+
const $ = W.value - (p.clientX - j.x) * g.value;
|
|
5475
5475
|
i("setStart", $);
|
|
5476
5476
|
} else {
|
|
5477
5477
|
const $ = (J = m.value) == null ? void 0 : J.onMouseMove(A, q, M.value, E.value);
|
|
@@ -5526,19 +5526,19 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5526
5526
|
});
|
|
5527
5527
|
}, ke = () => {
|
|
5528
5528
|
const S = l.value.getContext("2d");
|
|
5529
|
-
S.setTransform(b.value, 0, 0, b.value, 0, 0), S.clearRect(0, 0, o.cWidth, o.cHeight), S.stroke(), S.beginPath(), S.lineWidth = 1, S.moveTo(o.constants.XOFFSET + 0.5, 0.5), S.lineTo(o.constants.XOFFSET + 0.5,
|
|
5530
|
-
let q =
|
|
5529
|
+
S.setTransform(b.value, 0, 0, b.value, 0, 0), S.clearRect(0, 0, o.cWidth, o.cHeight), S.stroke(), S.beginPath(), S.lineWidth = 1, S.moveTo(o.constants.XOFFSET + 0.5, 0.5), S.lineTo(o.constants.XOFFSET + 0.5, V.value + 0.5), S.lineTo(o.cWidth + 0.5, V.value + 0.5), S.stroke();
|
|
5530
|
+
let q = V.value / (2 * B.value) + 0.5 << 1 >> 1;
|
|
5531
5531
|
S.lineWidth = 0.5;
|
|
5532
|
-
for (let X = 0; X <
|
|
5533
|
-
S.beginPath(), S.moveTo(o.constants.XOFFSET - 2, q), S.lineTo(o.constants.XOFFSET + 2, q), S.stroke(), q +=
|
|
5532
|
+
for (let X = 0; X < B.value; X++)
|
|
5533
|
+
S.beginPath(), S.moveTo(o.constants.XOFFSET - 2, q), S.lineTo(o.constants.XOFFSET + 2, q), S.stroke(), q += V.value / B.value;
|
|
5534
5534
|
const A = o.constants.XGRIDSPACING * Math.ceil(o.duration / 1e8), J = Math.ceil(o.duration / A) + 1, G = Math.ceil(o.constants.NRPXPERLABEL / (A / g.value)), Y = (A - o.start % A) % A;
|
|
5535
5535
|
for (let X = 0; X < J; X++) {
|
|
5536
5536
|
let $ = o.start + Y + X * A;
|
|
5537
5537
|
if ($ > o.tsEnd)
|
|
5538
5538
|
break;
|
|
5539
5539
|
const Q = $ - o.start, ee = o.constants.XOFFSET + Q / g.value, te = Math.round(ee);
|
|
5540
|
-
if (te > 1 && (S.save(), S.beginPath(), S.lineWidth = 0.5, S.strokeStyle = "rgb(235,235,235)", S.moveTo(te + 0.5, 0.5), S.lineTo(te + 0.5,
|
|
5541
|
-
S.beginPath(), S.lineWidth = 1, S.moveTo(te + 0.5,
|
|
5540
|
+
if (te > 1 && (S.save(), S.beginPath(), S.lineWidth = 0.5, S.strokeStyle = "rgb(235,235,235)", S.moveTo(te + 0.5, 0.5), S.lineTo(te + 0.5, V.value - 0.5), S.stroke(), S.restore(), (($ / A + A / 10) % G | 0) === 1 || G === 1)) {
|
|
5541
|
+
S.beginPath(), S.lineWidth = 1, S.moveTo(te + 0.5, V.value - 3), S.lineTo(te + 0.5, V.value + 3), S.stroke();
|
|
5542
5542
|
const re = new Date($ / 1e3);
|
|
5543
5543
|
S.font = "12px sans-serif", S.fillStyle = "rgb(150,150,150)", S.fillText(P(re), te - 20.5, o.cHeight - 0.2);
|
|
5544
5544
|
}
|
|
@@ -5552,7 +5552,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5552
5552
|
const S = h.value.getContext("2d");
|
|
5553
5553
|
S.setTransform(b.value, 0, 0, b.value, 0, 0), S.clearRect(0, 0, o.cWidth + o.constants.CURSOROFFSET, o.cHeight), S.save(), S.beginPath(), S.fillStyle = "red";
|
|
5554
5554
|
const q = o.cursorLoc * o.cWidth;
|
|
5555
|
-
q > o.constants.CURSOROFFSET ? (S.strokeStyle = "red", S.moveTo(q, 0), S.lineTo(q,
|
|
5555
|
+
q > o.constants.CURSOROFFSET ? (S.strokeStyle = "red", S.moveTo(q, 0), S.lineTo(q, V.value), S.stroke()) : S.moveTo(q, V.value), S.beginPath(), S.lineTo(q - 5, V.value + 8), S.lineTo(q + 5, V.value + 8), S.lineTo(q, V.value), S.fill(), S.restore();
|
|
5556
5556
|
}, xe = (p) => {
|
|
5557
5557
|
const S = R.value, q = S.getContext("2d");
|
|
5558
5558
|
q.setTransform(b.value, 0, 0, b.value, 0, 0);
|
|
@@ -5568,9 +5568,9 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5568
5568
|
q.save(), q.clearRect(0, 0, o.cWidth, o.cHeight), q.lineWidth = 1;
|
|
5569
5569
|
const Y = selectedChannels.length === r.value.length || selectedChannels.length === 0, X = p - S.getBoundingClientRect().left, $ = -p + j.x;
|
|
5570
5570
|
if (Y) {
|
|
5571
|
-
q.fillStyle = "rgba(0,0,0,0.1)", q.fillRect(X, 0, $,
|
|
5571
|
+
q.fillStyle = "rgba(0,0,0,0.1)", q.fillRect(X, 0, $, V.value), q.fillStyle = t.value[G].color, q.strokeStyle = q.fillStyle;
|
|
5572
5572
|
let Q = X - 1, ee = $ + 2;
|
|
5573
|
-
$ < 0 && (Q = X + 1, ee = $ - 2), q.fillRect(Q, 0, ee, A), q.setLineDash([5, 5, 5, 5]), q.beginPath(), q.moveTo(X, A), q.lineTo(X,
|
|
5573
|
+
$ < 0 && (Q = X + 1, ee = $ - 2), q.fillRect(Q, 0, ee, A), q.setLineDash([5, 5, 5, 5]), q.beginPath(), q.moveTo(X, A), q.lineTo(X, V.value), q.stroke(), q.beginPath(), q.moveTo(X + $, A), q.lineTo(X + $, V.value), q.stroke();
|
|
5574
5574
|
} else {
|
|
5575
5575
|
let Q = o.cHeight | 0, ee = 0;
|
|
5576
5576
|
const te = r.value;
|
|
@@ -5660,7 +5660,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5660
5660
|
getNextAnnotation: U,
|
|
5661
5661
|
getPreviousAnnotation: ne,
|
|
5662
5662
|
setFilters: x,
|
|
5663
|
-
setActiveTool:
|
|
5663
|
+
setActiveTool: D,
|
|
5664
5664
|
renderAll: be,
|
|
5665
5665
|
renderAnnotationCanvas: Ae,
|
|
5666
5666
|
initViewerCanvas: Ce
|
|
@@ -5700,8 +5700,8 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5700
5700
|
ref: a,
|
|
5701
5701
|
class: "canvas",
|
|
5702
5702
|
width: ye(f.cWidth, b.value, 0),
|
|
5703
|
-
height: ye(
|
|
5704
|
-
style: normalizeStyle(
|
|
5703
|
+
height: ye(V.value, b.value, 0),
|
|
5704
|
+
style: normalizeStyle(L.value)
|
|
5705
5705
|
}, null, 12, _hoisted_4)
|
|
5706
5706
|
]),
|
|
5707
5707
|
_: 1
|