@genome-spy/core 0.69.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/{AbortablePromiseCache-CcuMrnn7.js → AbortablePromiseCache-Dj0vzLnp.js} +4 -4
- package/dist/bundle/{browser-BRemItdO.js → browser-0iNU5Wit.js} +33 -33
- package/dist/bundle/index-BYsZN7b0.js +1597 -0
- package/dist/bundle/{index-Cq3QFUxX.js → index-C3kClAEN.js} +583 -593
- package/dist/bundle/{index-D-w7Mmt9.js → index-C7wOh6y1.js} +138 -140
- package/dist/bundle/index-CRaQAuki.js +326 -0
- package/dist/bundle/{index-D74H8TTz.js → index-D9v1PCj9.js} +1 -2
- package/dist/bundle/{index-BatuyGAI.js → index-GDOuv_D5.js} +75 -80
- package/dist/bundle/{index-DbJ0oeYM.js → index-Gt44EOIH.js} +160 -163
- package/dist/bundle/index.es.js +8802 -9058
- package/dist/bundle/index.js +123 -165
- package/dist/bundle/{unzip-NywezaRR.js → unzip-Bac01w6X.js} +1 -1
- package/dist/src/gl/colorUtils.d.ts +2 -1
- package/dist/src/gl/colorUtils.d.ts.map +1 -1
- package/dist/src/gl/colorUtils.js +15 -3
- package/dist/src/gl/colorUtils.test.d.ts +2 -0
- package/dist/src/gl/colorUtils.test.d.ts.map +1 -0
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -5
- package/dist/src/marks/mark.d.ts +0 -2
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +0 -8
- package/dist/src/marks/rect.d.ts.map +1 -1
- package/dist/src/marks/rect.js +0 -8
- package/dist/src/utils/deepEqual.d.ts +14 -0
- package/dist/src/utils/deepEqual.d.ts.map +1 -0
- package/dist/src/utils/deepEqual.js +63 -0
- package/dist/src/utils/deepEqual.test.d.ts +2 -0
- package/dist/src/utils/deepEqual.test.d.ts.map +1 -0
- package/dist/src/utils/fetchUtils.d.ts +27 -0
- package/dist/src/utils/fetchUtils.d.ts.map +1 -0
- package/dist/src/utils/fetchUtils.js +47 -0
- package/dist/src/utils/fetchUtils.test.d.ts +2 -0
- package/dist/src/utils/fetchUtils.test.d.ts.map +1 -0
- package/dist/src/utils/url.d.ts +12 -0
- package/dist/src/utils/url.d.ts.map +1 -1
- package/dist/src/utils/url.js +45 -0
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +24 -6
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +4 -5
- package/package.json +2 -2
- package/dist/bundle/index-ByuE8dvu.js +0 -332
- package/dist/bundle/index-D28m8tSW.js +0 -1607
|
@@ -1,68 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { i as $e } from "./inflate-GtwLkvSP.js";
|
|
7
|
-
const he = BigInt(32);
|
|
8
|
-
function je(t, r, e) {
|
|
1
|
+
import { RemoteFile as Re, LocalFile as De } from "./browser-0iNU5Wit.js";
|
|
2
|
+
import { A as ue } from "./AbortablePromiseCache-Dj0vzLnp.js";
|
|
3
|
+
import { i as Ne } from "./inflate-GtwLkvSP.js";
|
|
4
|
+
const fe = BigInt(32);
|
|
5
|
+
function Le(t, r, e) {
|
|
9
6
|
const n = +!!e, i = +!e;
|
|
10
|
-
return BigInt(t.getInt32(r, e) * i + t.getInt32(r + 4, e) * n) <<
|
|
7
|
+
return BigInt(t.getInt32(r, e) * i + t.getInt32(r + 4, e) * n) << fe | BigInt(t.getUint32(r, e) * n + t.getUint32(r + 4, e) * i);
|
|
11
8
|
}
|
|
12
|
-
function
|
|
9
|
+
function Me(t, r, e) {
|
|
13
10
|
const n = t.getUint32(r, e), i = t.getUint32(r + 4, e), o = +!!e, s = +!e;
|
|
14
|
-
return BigInt(n * s + i * o) <<
|
|
11
|
+
return BigInt(n * s + i * o) << fe | BigInt(n * o + i * s);
|
|
15
12
|
}
|
|
16
13
|
"getBigInt64" in DataView || (DataView.prototype.getBigInt64 = function(t, r) {
|
|
17
|
-
return
|
|
14
|
+
return Le(this, t, r);
|
|
18
15
|
});
|
|
19
16
|
"getBigUint64" in DataView || (DataView.prototype.getBigUint64 = function(t, r) {
|
|
20
|
-
return
|
|
17
|
+
return Me(this, t, r);
|
|
21
18
|
});
|
|
22
|
-
var
|
|
23
|
-
return
|
|
19
|
+
var J = function(t, r) {
|
|
20
|
+
return J = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
24
21
|
e.__proto__ = n;
|
|
25
22
|
} || function(e, n) {
|
|
26
23
|
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
27
|
-
},
|
|
24
|
+
}, J(t, r);
|
|
28
25
|
};
|
|
29
|
-
function
|
|
26
|
+
function X(t, r) {
|
|
30
27
|
if (typeof r != "function" && r !== null)
|
|
31
28
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
|
32
|
-
|
|
29
|
+
J(t, r);
|
|
33
30
|
function e() {
|
|
34
31
|
this.constructor = t;
|
|
35
32
|
}
|
|
36
33
|
t.prototype = r === null ? Object.create(r) : (e.prototype = r.prototype, new e());
|
|
37
34
|
}
|
|
38
|
-
function
|
|
35
|
+
function He(t, r, e, n) {
|
|
39
36
|
function i(o) {
|
|
40
37
|
return o instanceof e ? o : new e(function(s) {
|
|
41
38
|
s(o);
|
|
42
39
|
});
|
|
43
40
|
}
|
|
44
41
|
return new (e || (e = Promise))(function(o, s) {
|
|
45
|
-
function u(
|
|
42
|
+
function u(h) {
|
|
46
43
|
try {
|
|
47
|
-
c(n.next(
|
|
48
|
-
} catch (
|
|
49
|
-
s(
|
|
44
|
+
c(n.next(h));
|
|
45
|
+
} catch (d) {
|
|
46
|
+
s(d);
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
|
-
function a(
|
|
49
|
+
function a(h) {
|
|
53
50
|
try {
|
|
54
|
-
c(n.throw(
|
|
55
|
-
} catch (
|
|
56
|
-
s(
|
|
51
|
+
c(n.throw(h));
|
|
52
|
+
} catch (d) {
|
|
53
|
+
s(d);
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
|
-
function c(
|
|
60
|
-
|
|
56
|
+
function c(h) {
|
|
57
|
+
h.done ? o(h.value) : i(h.value).then(u, a);
|
|
61
58
|
}
|
|
62
59
|
c((n = n.apply(t, r || [])).next());
|
|
63
60
|
});
|
|
64
61
|
}
|
|
65
|
-
function
|
|
62
|
+
function le(t, r) {
|
|
66
63
|
var e = { label: 0, sent: function() {
|
|
67
64
|
if (o[0] & 1) throw o[1];
|
|
68
65
|
return o[1];
|
|
@@ -71,8 +68,8 @@ function de(t, r) {
|
|
|
71
68
|
return this;
|
|
72
69
|
}), s;
|
|
73
70
|
function u(c) {
|
|
74
|
-
return function(
|
|
75
|
-
return a([c,
|
|
71
|
+
return function(h) {
|
|
72
|
+
return a([c, h]);
|
|
76
73
|
};
|
|
77
74
|
}
|
|
78
75
|
function a(c) {
|
|
@@ -113,8 +110,8 @@ function de(t, r) {
|
|
|
113
110
|
continue;
|
|
114
111
|
}
|
|
115
112
|
c = r.call(t, e);
|
|
116
|
-
} catch (
|
|
117
|
-
c = [6,
|
|
113
|
+
} catch (h) {
|
|
114
|
+
c = [6, h], i = 0;
|
|
118
115
|
} finally {
|
|
119
116
|
n = o = 0;
|
|
120
117
|
}
|
|
@@ -122,7 +119,7 @@ function de(t, r) {
|
|
|
122
119
|
return { value: c[0] ? c[1] : void 0, done: !0 };
|
|
123
120
|
}
|
|
124
121
|
}
|
|
125
|
-
function
|
|
122
|
+
function N(t) {
|
|
126
123
|
var r = typeof Symbol == "function" && Symbol.iterator, e = r && t[r], n = 0;
|
|
127
124
|
if (e) return e.call(t);
|
|
128
125
|
if (t && typeof t.length == "number") return {
|
|
@@ -132,7 +129,7 @@ function M(t) {
|
|
|
132
129
|
};
|
|
133
130
|
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
134
131
|
}
|
|
135
|
-
function
|
|
132
|
+
function Z(t, r) {
|
|
136
133
|
var e = typeof Symbol == "function" && t[Symbol.iterator];
|
|
137
134
|
if (!e) return t;
|
|
138
135
|
var n = e.call(t), i, o = [], s;
|
|
@@ -149,15 +146,15 @@ function X(t, r) {
|
|
|
149
146
|
}
|
|
150
147
|
return o;
|
|
151
148
|
}
|
|
152
|
-
function
|
|
149
|
+
function K(t, r, e) {
|
|
153
150
|
if (e || arguments.length === 2) for (var n = 0, i = r.length, o; n < i; n++)
|
|
154
151
|
(o || !(n in r)) && (o || (o = Array.prototype.slice.call(r, 0, n)), o[n] = r[n]);
|
|
155
152
|
return t.concat(o || Array.prototype.slice.call(r));
|
|
156
153
|
}
|
|
157
|
-
function
|
|
158
|
-
return this instanceof
|
|
154
|
+
function z(t) {
|
|
155
|
+
return this instanceof z ? (this.v = t, this) : new z(t);
|
|
159
156
|
}
|
|
160
|
-
function
|
|
157
|
+
function $e(t, r, e) {
|
|
161
158
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
162
159
|
var n = e.apply(t, r || []), i, o = [];
|
|
163
160
|
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), u("next"), u("throw"), u("return", s), i[Symbol.asyncIterator] = function() {
|
|
@@ -165,13 +162,13 @@ function qe(t, r, e) {
|
|
|
165
162
|
}, i;
|
|
166
163
|
function s(f) {
|
|
167
164
|
return function(m) {
|
|
168
|
-
return Promise.resolve(m).then(f,
|
|
165
|
+
return Promise.resolve(m).then(f, d);
|
|
169
166
|
};
|
|
170
167
|
}
|
|
171
168
|
function u(f, m) {
|
|
172
169
|
n[f] && (i[f] = function(l) {
|
|
173
|
-
return new Promise(function(
|
|
174
|
-
o.push([f, l,
|
|
170
|
+
return new Promise(function(B, w) {
|
|
171
|
+
o.push([f, l, B, w]) > 1 || a(f, l);
|
|
175
172
|
});
|
|
176
173
|
}, m && (i[f] = m(i[f])));
|
|
177
174
|
}
|
|
@@ -179,26 +176,26 @@ function qe(t, r, e) {
|
|
|
179
176
|
try {
|
|
180
177
|
c(n[f](m));
|
|
181
178
|
} catch (l) {
|
|
182
|
-
|
|
179
|
+
b(o[0][3], l);
|
|
183
180
|
}
|
|
184
181
|
}
|
|
185
182
|
function c(f) {
|
|
186
|
-
f.value instanceof
|
|
183
|
+
f.value instanceof z ? Promise.resolve(f.value.v).then(h, d) : b(o[0][2], f);
|
|
187
184
|
}
|
|
188
|
-
function
|
|
185
|
+
function h(f) {
|
|
189
186
|
a("next", f);
|
|
190
187
|
}
|
|
191
|
-
function
|
|
188
|
+
function d(f) {
|
|
192
189
|
a("throw", f);
|
|
193
190
|
}
|
|
194
|
-
function
|
|
191
|
+
function b(f, m) {
|
|
195
192
|
f(m), o.shift(), o.length && a(o[0][0], o[0][1]);
|
|
196
193
|
}
|
|
197
194
|
}
|
|
198
|
-
function
|
|
195
|
+
function je(t) {
|
|
199
196
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
200
197
|
var r = t[Symbol.asyncIterator], e;
|
|
201
|
-
return r ? r.call(t) : (t = typeof
|
|
198
|
+
return r ? r.call(t) : (t = typeof N == "function" ? N(t) : t[Symbol.iterator](), e = {}, n("next"), n("throw"), n("return"), e[Symbol.asyncIterator] = function() {
|
|
202
199
|
return this;
|
|
203
200
|
}, e);
|
|
204
201
|
function n(o) {
|
|
@@ -217,13 +214,13 @@ function Ye(t) {
|
|
|
217
214
|
function O(t) {
|
|
218
215
|
return typeof t == "function";
|
|
219
216
|
}
|
|
220
|
-
function
|
|
217
|
+
function he(t) {
|
|
221
218
|
var r = function(n) {
|
|
222
219
|
Error.call(n), n.stack = new Error().stack;
|
|
223
220
|
}, e = t(r);
|
|
224
221
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
225
222
|
}
|
|
226
|
-
var
|
|
223
|
+
var q = he(function(t) {
|
|
227
224
|
return function(e) {
|
|
228
225
|
t(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
229
226
|
` + e.map(function(n, i) {
|
|
@@ -232,13 +229,13 @@ var Y = me(function(t) {
|
|
|
232
229
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
233
230
|
};
|
|
234
231
|
});
|
|
235
|
-
function
|
|
232
|
+
function ne(t, r) {
|
|
236
233
|
if (t) {
|
|
237
234
|
var e = t.indexOf(r);
|
|
238
235
|
0 <= e && t.splice(e, 1);
|
|
239
236
|
}
|
|
240
237
|
}
|
|
241
|
-
var
|
|
238
|
+
var ee = (function() {
|
|
242
239
|
function t(r) {
|
|
243
240
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
244
241
|
}
|
|
@@ -250,7 +247,7 @@ var re = (function() {
|
|
|
250
247
|
if (s)
|
|
251
248
|
if (this._parentage = null, Array.isArray(s))
|
|
252
249
|
try {
|
|
253
|
-
for (var u =
|
|
250
|
+
for (var u = N(s), a = u.next(); !a.done; a = u.next()) {
|
|
254
251
|
var c = a.value;
|
|
255
252
|
c.remove(this);
|
|
256
253
|
}
|
|
@@ -265,43 +262,43 @@ var re = (function() {
|
|
|
265
262
|
}
|
|
266
263
|
else
|
|
267
264
|
s.remove(this);
|
|
268
|
-
var
|
|
269
|
-
if (O(
|
|
265
|
+
var h = this.initialTeardown;
|
|
266
|
+
if (O(h))
|
|
270
267
|
try {
|
|
271
|
-
|
|
268
|
+
h();
|
|
272
269
|
} catch (l) {
|
|
273
|
-
o = l instanceof
|
|
270
|
+
o = l instanceof q ? l.errors : [l];
|
|
274
271
|
}
|
|
275
|
-
var
|
|
276
|
-
if (
|
|
272
|
+
var d = this._finalizers;
|
|
273
|
+
if (d) {
|
|
277
274
|
this._finalizers = null;
|
|
278
275
|
try {
|
|
279
|
-
for (var
|
|
276
|
+
for (var b = N(d), f = b.next(); !f.done; f = b.next()) {
|
|
280
277
|
var m = f.value;
|
|
281
278
|
try {
|
|
282
|
-
|
|
279
|
+
ie(m);
|
|
283
280
|
} catch (l) {
|
|
284
|
-
o = o ?? [], l instanceof
|
|
281
|
+
o = o ?? [], l instanceof q ? o = K(K([], Z(o)), Z(l.errors)) : o.push(l);
|
|
285
282
|
}
|
|
286
283
|
}
|
|
287
284
|
} catch (l) {
|
|
288
285
|
n = { error: l };
|
|
289
286
|
} finally {
|
|
290
287
|
try {
|
|
291
|
-
f && !f.done && (i =
|
|
288
|
+
f && !f.done && (i = b.return) && i.call(b);
|
|
292
289
|
} finally {
|
|
293
290
|
if (n) throw n.error;
|
|
294
291
|
}
|
|
295
292
|
}
|
|
296
293
|
}
|
|
297
294
|
if (o)
|
|
298
|
-
throw new
|
|
295
|
+
throw new q(o);
|
|
299
296
|
}
|
|
300
297
|
}, t.prototype.add = function(r) {
|
|
301
298
|
var e;
|
|
302
299
|
if (r && r !== this)
|
|
303
300
|
if (this.closed)
|
|
304
|
-
|
|
301
|
+
ie(r);
|
|
305
302
|
else {
|
|
306
303
|
if (r instanceof t) {
|
|
307
304
|
if (r.closed || r._hasParent(this))
|
|
@@ -318,53 +315,53 @@ var re = (function() {
|
|
|
318
315
|
this._parentage = Array.isArray(e) ? (e.push(r), e) : e ? [e, r] : r;
|
|
319
316
|
}, t.prototype._removeParent = function(r) {
|
|
320
317
|
var e = this._parentage;
|
|
321
|
-
e === r ? this._parentage = null : Array.isArray(e) &&
|
|
318
|
+
e === r ? this._parentage = null : Array.isArray(e) && ne(e, r);
|
|
322
319
|
}, t.prototype.remove = function(r) {
|
|
323
320
|
var e = this._finalizers;
|
|
324
|
-
e &&
|
|
321
|
+
e && ne(e, r), r instanceof t && r._removeParent(this);
|
|
325
322
|
}, t.EMPTY = (function() {
|
|
326
323
|
var r = new t();
|
|
327
324
|
return r.closed = !0, r;
|
|
328
325
|
})(), t;
|
|
329
326
|
})();
|
|
330
|
-
|
|
331
|
-
function
|
|
332
|
-
return t instanceof
|
|
327
|
+
ee.EMPTY;
|
|
328
|
+
function de(t) {
|
|
329
|
+
return t instanceof ee || t && "closed" in t && O(t.remove) && O(t.add) && O(t.unsubscribe);
|
|
333
330
|
}
|
|
334
|
-
function
|
|
331
|
+
function ie(t) {
|
|
335
332
|
O(t) ? t() : t.unsubscribe();
|
|
336
333
|
}
|
|
337
|
-
var
|
|
334
|
+
var Ge = {
|
|
338
335
|
Promise: void 0
|
|
339
|
-
},
|
|
336
|
+
}, We = {
|
|
340
337
|
setTimeout: function(t, r) {
|
|
341
338
|
for (var e = [], n = 2; n < arguments.length; n++)
|
|
342
339
|
e[n - 2] = arguments[n];
|
|
343
|
-
return setTimeout.apply(void 0,
|
|
340
|
+
return setTimeout.apply(void 0, K([t, r], Z(e)));
|
|
344
341
|
},
|
|
345
342
|
clearTimeout: function(t) {
|
|
346
343
|
return clearTimeout(t);
|
|
347
344
|
},
|
|
348
345
|
delegate: void 0
|
|
349
346
|
};
|
|
350
|
-
function
|
|
351
|
-
|
|
347
|
+
function me(t) {
|
|
348
|
+
We.setTimeout(function() {
|
|
352
349
|
throw t;
|
|
353
350
|
});
|
|
354
351
|
}
|
|
355
|
-
function
|
|
352
|
+
function oe() {
|
|
356
353
|
}
|
|
357
|
-
function
|
|
354
|
+
function qe(t) {
|
|
358
355
|
t();
|
|
359
356
|
}
|
|
360
|
-
var
|
|
361
|
-
|
|
357
|
+
var te = (function(t) {
|
|
358
|
+
X(r, t);
|
|
362
359
|
function r(e) {
|
|
363
360
|
var n = t.call(this) || this;
|
|
364
|
-
return n.isStopped = !1, e ? (n.destination = e,
|
|
361
|
+
return n.isStopped = !1, e ? (n.destination = e, de(e) && e.add(n)) : n.destination = Je, n;
|
|
365
362
|
}
|
|
366
363
|
return r.create = function(e, n, i) {
|
|
367
|
-
return new
|
|
364
|
+
return new $(e, n, i);
|
|
368
365
|
}, r.prototype.next = function(e) {
|
|
369
366
|
this.isStopped || this._next(e);
|
|
370
367
|
}, r.prototype.error = function(e) {
|
|
@@ -388,7 +385,7 @@ var ne = (function(t) {
|
|
|
388
385
|
this.unsubscribe();
|
|
389
386
|
}
|
|
390
387
|
}, r;
|
|
391
|
-
})(
|
|
388
|
+
})(ee), Ye = (function() {
|
|
392
389
|
function t(r) {
|
|
393
390
|
this.partialObserver = r;
|
|
394
391
|
}
|
|
@@ -398,7 +395,7 @@ var ne = (function(t) {
|
|
|
398
395
|
try {
|
|
399
396
|
e.next(r);
|
|
400
397
|
} catch (n) {
|
|
401
|
-
|
|
398
|
+
M(n);
|
|
402
399
|
}
|
|
403
400
|
}, t.prototype.error = function(r) {
|
|
404
401
|
var e = this.partialObserver;
|
|
@@ -406,56 +403,56 @@ var ne = (function(t) {
|
|
|
406
403
|
try {
|
|
407
404
|
e.error(r);
|
|
408
405
|
} catch (n) {
|
|
409
|
-
|
|
406
|
+
M(n);
|
|
410
407
|
}
|
|
411
408
|
else
|
|
412
|
-
|
|
409
|
+
M(r);
|
|
413
410
|
}, t.prototype.complete = function() {
|
|
414
411
|
var r = this.partialObserver;
|
|
415
412
|
if (r.complete)
|
|
416
413
|
try {
|
|
417
414
|
r.complete();
|
|
418
415
|
} catch (e) {
|
|
419
|
-
|
|
416
|
+
M(e);
|
|
420
417
|
}
|
|
421
418
|
}, t;
|
|
422
|
-
})(),
|
|
423
|
-
|
|
419
|
+
})(), $ = (function(t) {
|
|
420
|
+
X(r, t);
|
|
424
421
|
function r(e, n, i) {
|
|
425
422
|
var o = t.call(this) || this, s;
|
|
426
423
|
return O(e) || !e ? s = {
|
|
427
424
|
next: e ?? void 0,
|
|
428
425
|
error: n ?? void 0,
|
|
429
426
|
complete: i ?? void 0
|
|
430
|
-
} : s = e, o.destination = new
|
|
427
|
+
} : s = e, o.destination = new Ye(s), o;
|
|
431
428
|
}
|
|
432
429
|
return r;
|
|
433
|
-
})(
|
|
434
|
-
function
|
|
435
|
-
|
|
430
|
+
})(te);
|
|
431
|
+
function M(t) {
|
|
432
|
+
me(t);
|
|
436
433
|
}
|
|
437
|
-
function
|
|
434
|
+
function Qe(t) {
|
|
438
435
|
throw t;
|
|
439
436
|
}
|
|
440
|
-
var
|
|
437
|
+
var Je = {
|
|
441
438
|
closed: !0,
|
|
442
|
-
next:
|
|
443
|
-
error:
|
|
444
|
-
complete:
|
|
445
|
-
},
|
|
439
|
+
next: oe,
|
|
440
|
+
error: Qe,
|
|
441
|
+
complete: oe
|
|
442
|
+
}, re = (function() {
|
|
446
443
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
447
444
|
})();
|
|
448
|
-
function
|
|
445
|
+
function ge(t) {
|
|
449
446
|
return t;
|
|
450
447
|
}
|
|
451
|
-
function
|
|
452
|
-
return t.length === 0 ?
|
|
448
|
+
function Ze(t) {
|
|
449
|
+
return t.length === 0 ? ge : t.length === 1 ? t[0] : function(e) {
|
|
453
450
|
return t.reduce(function(n, i) {
|
|
454
451
|
return i(n);
|
|
455
452
|
}, e);
|
|
456
453
|
};
|
|
457
454
|
}
|
|
458
|
-
var
|
|
455
|
+
var _ = (function() {
|
|
459
456
|
function t(r) {
|
|
460
457
|
r && (this._subscribe = r);
|
|
461
458
|
}
|
|
@@ -463,8 +460,8 @@ var P = (function() {
|
|
|
463
460
|
var e = new t();
|
|
464
461
|
return e.source = this, e.operator = r, e;
|
|
465
462
|
}, t.prototype.subscribe = function(r, e, n) {
|
|
466
|
-
var i = this, o =
|
|
467
|
-
return
|
|
463
|
+
var i = this, o = Xe(r) ? r : new $(r, e, n);
|
|
464
|
+
return qe(function() {
|
|
468
465
|
var s = i, u = s.operator, a = s.source;
|
|
469
466
|
o.add(u ? u.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
|
|
470
467
|
}), o;
|
|
@@ -476,8 +473,8 @@ var P = (function() {
|
|
|
476
473
|
}
|
|
477
474
|
}, t.prototype.forEach = function(r, e) {
|
|
478
475
|
var n = this;
|
|
479
|
-
return e =
|
|
480
|
-
var s = new
|
|
476
|
+
return e = se(e), new e(function(i, o) {
|
|
477
|
+
var s = new $({
|
|
481
478
|
next: function(u) {
|
|
482
479
|
try {
|
|
483
480
|
r(u);
|
|
@@ -493,15 +490,15 @@ var P = (function() {
|
|
|
493
490
|
}, t.prototype._subscribe = function(r) {
|
|
494
491
|
var e;
|
|
495
492
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(r);
|
|
496
|
-
}, t.prototype[
|
|
493
|
+
}, t.prototype[re] = function() {
|
|
497
494
|
return this;
|
|
498
495
|
}, t.prototype.pipe = function() {
|
|
499
496
|
for (var r = [], e = 0; e < arguments.length; e++)
|
|
500
497
|
r[e] = arguments[e];
|
|
501
|
-
return
|
|
498
|
+
return Ze(r)(this);
|
|
502
499
|
}, t.prototype.toPromise = function(r) {
|
|
503
500
|
var e = this;
|
|
504
|
-
return r =
|
|
501
|
+
return r = se(r), new r(function(n, i) {
|
|
505
502
|
var o;
|
|
506
503
|
e.subscribe(function(s) {
|
|
507
504
|
return o = s;
|
|
@@ -515,22 +512,22 @@ var P = (function() {
|
|
|
515
512
|
return new t(r);
|
|
516
513
|
}, t;
|
|
517
514
|
})();
|
|
518
|
-
function
|
|
515
|
+
function se(t) {
|
|
519
516
|
var r;
|
|
520
|
-
return (r = t ??
|
|
517
|
+
return (r = t ?? Ge.Promise) !== null && r !== void 0 ? r : Promise;
|
|
521
518
|
}
|
|
522
|
-
function
|
|
519
|
+
function Ke(t) {
|
|
523
520
|
return t && O(t.next) && O(t.error) && O(t.complete);
|
|
524
521
|
}
|
|
525
|
-
function
|
|
526
|
-
return t && t instanceof
|
|
522
|
+
function Xe(t) {
|
|
523
|
+
return t && t instanceof te || Ke(t) && de(t);
|
|
527
524
|
}
|
|
528
|
-
function
|
|
529
|
-
return O(t
|
|
525
|
+
function et(t) {
|
|
526
|
+
return O(t?.lift);
|
|
530
527
|
}
|
|
531
|
-
function
|
|
528
|
+
function R(t) {
|
|
532
529
|
return function(r) {
|
|
533
|
-
if (
|
|
530
|
+
if (et(r))
|
|
534
531
|
return r.lift(function(e) {
|
|
535
532
|
try {
|
|
536
533
|
return t(e, this);
|
|
@@ -541,24 +538,24 @@ function N(t) {
|
|
|
541
538
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
542
539
|
};
|
|
543
540
|
}
|
|
544
|
-
function
|
|
545
|
-
return new
|
|
541
|
+
function L(t, r, e, n, i) {
|
|
542
|
+
return new tt(t, r, e, n, i);
|
|
546
543
|
}
|
|
547
|
-
var
|
|
548
|
-
|
|
544
|
+
var tt = (function(t) {
|
|
545
|
+
X(r, t);
|
|
549
546
|
function r(e, n, i, o, s, u) {
|
|
550
547
|
var a = t.call(this, e) || this;
|
|
551
548
|
return a.onFinalize = s, a.shouldUnsubscribe = u, a._next = n ? function(c) {
|
|
552
549
|
try {
|
|
553
550
|
n(c);
|
|
554
|
-
} catch (
|
|
555
|
-
e.error(
|
|
551
|
+
} catch (h) {
|
|
552
|
+
e.error(h);
|
|
556
553
|
}
|
|
557
554
|
} : t.prototype._next, a._error = o ? function(c) {
|
|
558
555
|
try {
|
|
559
556
|
o(c);
|
|
560
|
-
} catch (
|
|
561
|
-
e.error(
|
|
557
|
+
} catch (h) {
|
|
558
|
+
e.error(h);
|
|
562
559
|
} finally {
|
|
563
560
|
this.unsubscribe();
|
|
564
561
|
}
|
|
@@ -579,60 +576,60 @@ var ot = (function(t) {
|
|
|
579
576
|
t.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
580
577
|
}
|
|
581
578
|
}, r;
|
|
582
|
-
})(
|
|
579
|
+
})(te), rt = new _(function(t) {
|
|
583
580
|
return t.complete();
|
|
584
581
|
});
|
|
585
|
-
function
|
|
582
|
+
function nt(t) {
|
|
586
583
|
return t && O(t.schedule);
|
|
587
584
|
}
|
|
588
|
-
function
|
|
585
|
+
function ye(t) {
|
|
589
586
|
return t[t.length - 1];
|
|
590
587
|
}
|
|
591
|
-
function
|
|
592
|
-
return
|
|
588
|
+
function it(t) {
|
|
589
|
+
return nt(ye(t)) ? t.pop() : void 0;
|
|
593
590
|
}
|
|
594
|
-
function
|
|
595
|
-
return typeof
|
|
591
|
+
function ot(t, r) {
|
|
592
|
+
return typeof ye(t) == "number" ? t.pop() : r;
|
|
596
593
|
}
|
|
597
|
-
var
|
|
594
|
+
var be = (function(t) {
|
|
598
595
|
return t && typeof t.length == "number" && typeof t != "function";
|
|
599
596
|
});
|
|
600
|
-
function
|
|
601
|
-
return O(t
|
|
597
|
+
function pe(t) {
|
|
598
|
+
return O(t?.then);
|
|
602
599
|
}
|
|
603
|
-
function
|
|
604
|
-
return O(t[
|
|
600
|
+
function we(t) {
|
|
601
|
+
return O(t[re]);
|
|
605
602
|
}
|
|
606
|
-
function
|
|
607
|
-
return Symbol.asyncIterator && O(t
|
|
603
|
+
function ve(t) {
|
|
604
|
+
return Symbol.asyncIterator && O(t?.[Symbol.asyncIterator]);
|
|
608
605
|
}
|
|
609
|
-
function
|
|
606
|
+
function Se(t) {
|
|
610
607
|
return new TypeError("You provided " + (t !== null && typeof t == "object" ? "an invalid object" : "'" + t + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
611
608
|
}
|
|
612
|
-
function
|
|
609
|
+
function st() {
|
|
613
610
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
614
611
|
}
|
|
615
|
-
var
|
|
616
|
-
function
|
|
617
|
-
return O(t
|
|
612
|
+
var xe = st();
|
|
613
|
+
function Ie(t) {
|
|
614
|
+
return O(t?.[xe]);
|
|
618
615
|
}
|
|
619
|
-
function
|
|
620
|
-
return
|
|
616
|
+
function Be(t) {
|
|
617
|
+
return $e(this, arguments, function() {
|
|
621
618
|
var e, n, i, o;
|
|
622
|
-
return
|
|
619
|
+
return le(this, function(s) {
|
|
623
620
|
switch (s.label) {
|
|
624
621
|
case 0:
|
|
625
622
|
e = t.getReader(), s.label = 1;
|
|
626
623
|
case 1:
|
|
627
624
|
s.trys.push([1, , 9, 10]), s.label = 2;
|
|
628
625
|
case 2:
|
|
629
|
-
return [4,
|
|
626
|
+
return [4, z(e.read())];
|
|
630
627
|
case 3:
|
|
631
|
-
return n = s.sent(), i = n.value, o = n.done, o ? [4,
|
|
628
|
+
return n = s.sent(), i = n.value, o = n.done, o ? [4, z(void 0)] : [3, 5];
|
|
632
629
|
case 4:
|
|
633
630
|
return [2, s.sent()];
|
|
634
631
|
case 5:
|
|
635
|
-
return [4,
|
|
632
|
+
return [4, z(i)];
|
|
636
633
|
case 6:
|
|
637
634
|
return [4, s.sent()];
|
|
638
635
|
case 7:
|
|
@@ -647,57 +644,57 @@ function Oe(t) {
|
|
|
647
644
|
});
|
|
648
645
|
});
|
|
649
646
|
}
|
|
650
|
-
function
|
|
651
|
-
return O(t
|
|
647
|
+
function Ue(t) {
|
|
648
|
+
return O(t?.getReader);
|
|
652
649
|
}
|
|
653
|
-
function
|
|
654
|
-
if (t instanceof
|
|
650
|
+
function D(t) {
|
|
651
|
+
if (t instanceof _)
|
|
655
652
|
return t;
|
|
656
653
|
if (t != null) {
|
|
657
|
-
if (Se(t))
|
|
658
|
-
return lt(t);
|
|
659
654
|
if (we(t))
|
|
660
|
-
return
|
|
655
|
+
return ct(t);
|
|
656
|
+
if (be(t))
|
|
657
|
+
return at(t);
|
|
658
|
+
if (pe(t))
|
|
659
|
+
return ut(t);
|
|
661
660
|
if (ve(t))
|
|
662
|
-
return
|
|
663
|
-
if (
|
|
664
|
-
return
|
|
661
|
+
return Oe(t);
|
|
662
|
+
if (Ie(t))
|
|
663
|
+
return ft(t);
|
|
665
664
|
if (Ue(t))
|
|
666
|
-
return
|
|
667
|
-
if (ke(t))
|
|
668
|
-
return gt(t);
|
|
665
|
+
return lt(t);
|
|
669
666
|
}
|
|
670
|
-
throw
|
|
667
|
+
throw Se(t);
|
|
671
668
|
}
|
|
672
|
-
function
|
|
673
|
-
return new
|
|
674
|
-
var e = t[
|
|
669
|
+
function ct(t) {
|
|
670
|
+
return new _(function(r) {
|
|
671
|
+
var e = t[re]();
|
|
675
672
|
if (O(e.subscribe))
|
|
676
673
|
return e.subscribe(r);
|
|
677
674
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
678
675
|
});
|
|
679
676
|
}
|
|
680
|
-
function
|
|
681
|
-
return new
|
|
677
|
+
function at(t) {
|
|
678
|
+
return new _(function(r) {
|
|
682
679
|
for (var e = 0; e < t.length && !r.closed; e++)
|
|
683
680
|
r.next(t[e]);
|
|
684
681
|
r.complete();
|
|
685
682
|
});
|
|
686
683
|
}
|
|
687
|
-
function
|
|
688
|
-
return new
|
|
684
|
+
function ut(t) {
|
|
685
|
+
return new _(function(r) {
|
|
689
686
|
t.then(function(e) {
|
|
690
687
|
r.closed || (r.next(e), r.complete());
|
|
691
688
|
}, function(e) {
|
|
692
689
|
return r.error(e);
|
|
693
|
-
}).then(null,
|
|
690
|
+
}).then(null, me);
|
|
694
691
|
});
|
|
695
692
|
}
|
|
696
|
-
function
|
|
697
|
-
return new
|
|
693
|
+
function ft(t) {
|
|
694
|
+
return new _(function(r) {
|
|
698
695
|
var e, n;
|
|
699
696
|
try {
|
|
700
|
-
for (var i =
|
|
697
|
+
for (var i = N(t), o = i.next(); !o.done; o = i.next()) {
|
|
701
698
|
var s = o.value;
|
|
702
699
|
if (r.next(s), r.closed)
|
|
703
700
|
return;
|
|
@@ -714,24 +711,24 @@ function mt(t) {
|
|
|
714
711
|
r.complete();
|
|
715
712
|
});
|
|
716
713
|
}
|
|
717
|
-
function
|
|
718
|
-
return new
|
|
719
|
-
|
|
714
|
+
function Oe(t) {
|
|
715
|
+
return new _(function(r) {
|
|
716
|
+
ht(t, r).catch(function(e) {
|
|
720
717
|
return r.error(e);
|
|
721
718
|
});
|
|
722
719
|
});
|
|
723
720
|
}
|
|
724
|
-
function
|
|
725
|
-
return
|
|
721
|
+
function lt(t) {
|
|
722
|
+
return Oe(Be(t));
|
|
726
723
|
}
|
|
727
|
-
function
|
|
724
|
+
function ht(t, r) {
|
|
728
725
|
var e, n, i, o;
|
|
729
|
-
return
|
|
726
|
+
return He(this, void 0, void 0, function() {
|
|
730
727
|
var s, u;
|
|
731
|
-
return
|
|
728
|
+
return le(this, function(a) {
|
|
732
729
|
switch (a.label) {
|
|
733
730
|
case 0:
|
|
734
|
-
a.trys.push([0, 5, 6, 11]), e =
|
|
731
|
+
a.trys.push([0, 5, 6, 11]), e = je(t), a.label = 1;
|
|
735
732
|
case 1:
|
|
736
733
|
return [4, e.next()];
|
|
737
734
|
case 2:
|
|
@@ -762,7 +759,7 @@ function yt(t, r) {
|
|
|
762
759
|
});
|
|
763
760
|
});
|
|
764
761
|
}
|
|
765
|
-
function
|
|
762
|
+
function V(t, r, e, n, i) {
|
|
766
763
|
n === void 0 && (n = 0), i === void 0 && (i = !1);
|
|
767
764
|
var o = r.schedule(function() {
|
|
768
765
|
e(), i ? t.add(this.schedule(null, n)) : this.unsubscribe();
|
|
@@ -770,49 +767,49 @@ function z(t, r, e, n, i) {
|
|
|
770
767
|
if (t.add(o), !i)
|
|
771
768
|
return o;
|
|
772
769
|
}
|
|
773
|
-
function
|
|
774
|
-
return r === void 0 && (r = 0),
|
|
775
|
-
e.subscribe(
|
|
776
|
-
return
|
|
770
|
+
function ke(t, r) {
|
|
771
|
+
return r === void 0 && (r = 0), R(function(e, n) {
|
|
772
|
+
e.subscribe(L(n, function(i) {
|
|
773
|
+
return V(n, t, function() {
|
|
777
774
|
return n.next(i);
|
|
778
775
|
}, r);
|
|
779
776
|
}, function() {
|
|
780
|
-
return
|
|
777
|
+
return V(n, t, function() {
|
|
781
778
|
return n.complete();
|
|
782
779
|
}, r);
|
|
783
780
|
}, function(i) {
|
|
784
|
-
return
|
|
781
|
+
return V(n, t, function() {
|
|
785
782
|
return n.error(i);
|
|
786
783
|
}, r);
|
|
787
784
|
}));
|
|
788
785
|
});
|
|
789
786
|
}
|
|
790
|
-
function
|
|
791
|
-
return r === void 0 && (r = 0),
|
|
787
|
+
function Ee(t, r) {
|
|
788
|
+
return r === void 0 && (r = 0), R(function(e, n) {
|
|
792
789
|
n.add(t.schedule(function() {
|
|
793
790
|
return e.subscribe(n);
|
|
794
791
|
}, r));
|
|
795
792
|
});
|
|
796
793
|
}
|
|
797
|
-
function
|
|
798
|
-
return
|
|
794
|
+
function dt(t, r) {
|
|
795
|
+
return D(t).pipe(Ee(r), ke(r));
|
|
799
796
|
}
|
|
800
|
-
function
|
|
801
|
-
return
|
|
797
|
+
function mt(t, r) {
|
|
798
|
+
return D(t).pipe(Ee(r), ke(r));
|
|
802
799
|
}
|
|
803
|
-
function
|
|
804
|
-
return new
|
|
800
|
+
function gt(t, r) {
|
|
801
|
+
return new _(function(e) {
|
|
805
802
|
var n = 0;
|
|
806
803
|
return r.schedule(function() {
|
|
807
804
|
n === t.length ? e.complete() : (e.next(t[n++]), e.closed || this.schedule());
|
|
808
805
|
});
|
|
809
806
|
});
|
|
810
807
|
}
|
|
811
|
-
function
|
|
812
|
-
return new
|
|
808
|
+
function yt(t, r) {
|
|
809
|
+
return new _(function(e) {
|
|
813
810
|
var n;
|
|
814
|
-
return
|
|
815
|
-
n = t[
|
|
811
|
+
return V(e, r, function() {
|
|
812
|
+
n = t[xe](), V(e, r, function() {
|
|
816
813
|
var i, o, s;
|
|
817
814
|
try {
|
|
818
815
|
i = n.next(), o = i.value, s = i.done;
|
|
@@ -823,17 +820,17 @@ function vt(t, r) {
|
|
|
823
820
|
s ? e.complete() : e.next(o);
|
|
824
821
|
}, 0, !0);
|
|
825
822
|
}), function() {
|
|
826
|
-
return O(n
|
|
823
|
+
return O(n?.return) && n.return();
|
|
827
824
|
};
|
|
828
825
|
});
|
|
829
826
|
}
|
|
830
|
-
function
|
|
827
|
+
function Te(t, r) {
|
|
831
828
|
if (!t)
|
|
832
829
|
throw new Error("Iterable cannot be null");
|
|
833
|
-
return new
|
|
834
|
-
|
|
830
|
+
return new _(function(e) {
|
|
831
|
+
V(e, r, function() {
|
|
835
832
|
var n = t[Symbol.asyncIterator]();
|
|
836
|
-
|
|
833
|
+
V(e, r, function() {
|
|
837
834
|
n.next().then(function(i) {
|
|
838
835
|
i.done ? e.complete() : e.next(i.value);
|
|
839
836
|
});
|
|
@@ -841,135 +838,135 @@ function Ce(t, r) {
|
|
|
841
838
|
});
|
|
842
839
|
});
|
|
843
840
|
}
|
|
844
|
-
function
|
|
845
|
-
return
|
|
841
|
+
function bt(t, r) {
|
|
842
|
+
return Te(Be(t), r);
|
|
846
843
|
}
|
|
847
|
-
function
|
|
844
|
+
function pt(t, r) {
|
|
848
845
|
if (t != null) {
|
|
849
|
-
if (Se(t))
|
|
850
|
-
return bt(t, r);
|
|
851
846
|
if (we(t))
|
|
852
|
-
return
|
|
847
|
+
return dt(t, r);
|
|
848
|
+
if (be(t))
|
|
849
|
+
return gt(t, r);
|
|
850
|
+
if (pe(t))
|
|
851
|
+
return mt(t, r);
|
|
853
852
|
if (ve(t))
|
|
854
|
-
return
|
|
855
|
-
if (
|
|
856
|
-
return
|
|
853
|
+
return Te(t, r);
|
|
854
|
+
if (Ie(t))
|
|
855
|
+
return yt(t, r);
|
|
857
856
|
if (Ue(t))
|
|
858
|
-
return
|
|
859
|
-
if (ke(t))
|
|
860
|
-
return St(t, r);
|
|
857
|
+
return bt(t, r);
|
|
861
858
|
}
|
|
862
|
-
throw
|
|
859
|
+
throw Se(t);
|
|
863
860
|
}
|
|
864
|
-
function
|
|
865
|
-
return r ?
|
|
861
|
+
function wt(t, r) {
|
|
862
|
+
return r ? pt(t, r) : D(t);
|
|
866
863
|
}
|
|
867
|
-
var
|
|
864
|
+
var vt = he(function(t) {
|
|
868
865
|
return function() {
|
|
869
866
|
t(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
870
867
|
};
|
|
871
868
|
});
|
|
872
|
-
function
|
|
869
|
+
function _e(t, r) {
|
|
873
870
|
return new Promise(function(e, n) {
|
|
874
|
-
var i = new
|
|
871
|
+
var i = new $({
|
|
875
872
|
next: function(o) {
|
|
876
873
|
e(o), i.unsubscribe();
|
|
877
874
|
},
|
|
878
875
|
error: n,
|
|
879
876
|
complete: function() {
|
|
880
|
-
n(new
|
|
877
|
+
n(new vt());
|
|
881
878
|
}
|
|
882
879
|
});
|
|
883
880
|
t.subscribe(i);
|
|
884
881
|
});
|
|
885
882
|
}
|
|
886
|
-
function
|
|
887
|
-
return
|
|
883
|
+
function Ce(t, r) {
|
|
884
|
+
return R(function(e, n) {
|
|
888
885
|
var i = 0;
|
|
889
|
-
e.subscribe(
|
|
886
|
+
e.subscribe(L(n, function(o) {
|
|
890
887
|
n.next(t.call(r, o, i++));
|
|
891
888
|
}));
|
|
892
889
|
});
|
|
893
890
|
}
|
|
894
|
-
function
|
|
895
|
-
var a = [], c = 0,
|
|
896
|
-
|
|
891
|
+
function St(t, r, e, n, i, o, s, u) {
|
|
892
|
+
var a = [], c = 0, h = 0, d = !1, b = function() {
|
|
893
|
+
d && !a.length && !c && r.complete();
|
|
897
894
|
}, f = function(l) {
|
|
898
895
|
return c < n ? m(l) : a.push(l);
|
|
899
896
|
}, m = function(l) {
|
|
900
897
|
c++;
|
|
901
|
-
var
|
|
902
|
-
|
|
903
|
-
r.next(
|
|
898
|
+
var B = !1;
|
|
899
|
+
D(e(l, h++)).subscribe(L(r, function(w) {
|
|
900
|
+
r.next(w);
|
|
904
901
|
}, function() {
|
|
905
|
-
|
|
902
|
+
B = !0;
|
|
906
903
|
}, void 0, function() {
|
|
907
|
-
if (
|
|
904
|
+
if (B)
|
|
908
905
|
try {
|
|
909
906
|
c--;
|
|
910
|
-
for (var
|
|
907
|
+
for (var w = function() {
|
|
911
908
|
var S = a.shift();
|
|
912
909
|
s || m(S);
|
|
913
910
|
}; a.length && c < n; )
|
|
914
|
-
|
|
915
|
-
|
|
911
|
+
w();
|
|
912
|
+
b();
|
|
916
913
|
} catch (S) {
|
|
917
914
|
r.error(S);
|
|
918
915
|
}
|
|
919
916
|
}));
|
|
920
917
|
};
|
|
921
|
-
return t.subscribe(
|
|
922
|
-
|
|
918
|
+
return t.subscribe(L(r, f, function() {
|
|
919
|
+
d = !0, b();
|
|
923
920
|
})), function() {
|
|
924
921
|
};
|
|
925
922
|
}
|
|
926
|
-
function
|
|
927
|
-
return e === void 0 && (e = 1 / 0), O(r) ?
|
|
928
|
-
return
|
|
923
|
+
function Pe(t, r, e) {
|
|
924
|
+
return e === void 0 && (e = 1 / 0), O(r) ? Pe(function(n, i) {
|
|
925
|
+
return Ce(function(o, s) {
|
|
929
926
|
return r(n, o, i, s);
|
|
930
|
-
})(
|
|
931
|
-
}, e) : (typeof r == "number" && (e = r),
|
|
932
|
-
return
|
|
927
|
+
})(D(t(n, i)));
|
|
928
|
+
}, e) : (typeof r == "number" && (e = r), R(function(n, i) {
|
|
929
|
+
return St(n, i, t, e);
|
|
933
930
|
}));
|
|
934
931
|
}
|
|
935
|
-
function
|
|
936
|
-
return t === void 0 && (t = 1 / 0),
|
|
932
|
+
function xt(t) {
|
|
933
|
+
return t === void 0 && (t = 1 / 0), Pe(ge, t);
|
|
937
934
|
}
|
|
938
|
-
function
|
|
935
|
+
function It() {
|
|
939
936
|
for (var t = [], r = 0; r < arguments.length; r++)
|
|
940
937
|
t[r] = arguments[r];
|
|
941
|
-
var e =
|
|
942
|
-
return i.length ? i.length === 1 ?
|
|
938
|
+
var e = it(t), n = ot(t, 1 / 0), i = t;
|
|
939
|
+
return i.length ? i.length === 1 ? D(i[0]) : xt(n)(wt(i, e)) : rt;
|
|
943
940
|
}
|
|
944
|
-
function
|
|
941
|
+
function Bt(t, r, e, n, i) {
|
|
945
942
|
return function(o, s) {
|
|
946
943
|
var u = e, a = r, c = 0;
|
|
947
|
-
o.subscribe(
|
|
948
|
-
var
|
|
949
|
-
a = u ? t(a,
|
|
944
|
+
o.subscribe(L(s, function(h) {
|
|
945
|
+
var d = c++;
|
|
946
|
+
a = u ? t(a, h, d) : (u = !0, h);
|
|
950
947
|
}, (function() {
|
|
951
948
|
u && s.next(a), s.complete();
|
|
952
949
|
})));
|
|
953
950
|
};
|
|
954
951
|
}
|
|
955
|
-
function
|
|
956
|
-
return
|
|
952
|
+
function Ve(t, r) {
|
|
953
|
+
return R(Bt(t, r, arguments.length >= 2, !1, !0));
|
|
957
954
|
}
|
|
958
|
-
var
|
|
955
|
+
var Ut = function(t, r) {
|
|
959
956
|
return t.push(r), t;
|
|
960
957
|
};
|
|
961
|
-
function
|
|
962
|
-
return
|
|
963
|
-
|
|
958
|
+
function Ot() {
|
|
959
|
+
return R(function(t, r) {
|
|
960
|
+
Ve(Ut, [])(t).subscribe(r);
|
|
964
961
|
});
|
|
965
962
|
}
|
|
966
|
-
function
|
|
963
|
+
function kt(t) {
|
|
967
964
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
968
965
|
}
|
|
969
|
-
var
|
|
970
|
-
function
|
|
971
|
-
if (
|
|
972
|
-
|
|
966
|
+
var Y, ce;
|
|
967
|
+
function Et() {
|
|
968
|
+
if (ce) return Y;
|
|
969
|
+
ce = 1;
|
|
973
970
|
class t {
|
|
974
971
|
constructor(e = {}) {
|
|
975
972
|
if (!(e.maxSize && e.maxSize > 0))
|
|
@@ -1029,13 +1026,13 @@ function Pt() {
|
|
|
1029
1026
|
return this._size + e;
|
|
1030
1027
|
}
|
|
1031
1028
|
}
|
|
1032
|
-
return
|
|
1029
|
+
return Y = t, Y;
|
|
1033
1030
|
}
|
|
1034
|
-
var
|
|
1035
|
-
const
|
|
1036
|
-
class
|
|
1031
|
+
var Tt = Et();
|
|
1032
|
+
const Ae = /* @__PURE__ */ kt(Tt);
|
|
1033
|
+
class F {
|
|
1034
|
+
ranges;
|
|
1037
1035
|
constructor(r) {
|
|
1038
|
-
E(this, "ranges");
|
|
1039
1036
|
this.ranges = r;
|
|
1040
1037
|
}
|
|
1041
1038
|
get min() {
|
|
@@ -1054,7 +1051,7 @@ class D {
|
|
|
1054
1051
|
return this.ranges.length > 1;
|
|
1055
1052
|
}
|
|
1056
1053
|
getRanges() {
|
|
1057
|
-
return this.ranges.map((r) => new
|
|
1054
|
+
return this.ranges.map((r) => new F([{ min: r.min, max: r.max }]));
|
|
1058
1055
|
}
|
|
1059
1056
|
toString() {
|
|
1060
1057
|
return this.ranges.map((r) => `[${r.min}-${r.max}]`).join(",");
|
|
@@ -1063,21 +1060,20 @@ class D {
|
|
|
1063
1060
|
const e = [...this.getRanges(), ...r.getRanges()].sort((o, s) => o.min < s.min ? -1 : o.min > s.min ? 1 : o.max < s.max ? -1 : s.max > o.max ? 1 : 0), n = [];
|
|
1064
1061
|
let i = e[0];
|
|
1065
1062
|
for (const o of e)
|
|
1066
|
-
o.min > i.max + 1 ? (n.push(i), i = o) : o.max > i.max && (i = new
|
|
1067
|
-
return n.push(i), n.length === 1 ? n[0] : new
|
|
1063
|
+
o.min > i.max + 1 ? (n.push(i), i = o) : o.max > i.max && (i = new F([{ min: i.min, max: o.max }]));
|
|
1064
|
+
return n.push(i), n.length === 1 ? n[0] : new F(n);
|
|
1068
1065
|
}
|
|
1069
1066
|
}
|
|
1070
|
-
function
|
|
1071
|
-
return
|
|
1067
|
+
function _t(t) {
|
|
1068
|
+
return Ne(t.subarray(2), void 0);
|
|
1072
1069
|
}
|
|
1073
|
-
class
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
this.code = "ERR_ABORTED";
|
|
1070
|
+
class Ct extends Error {
|
|
1071
|
+
code;
|
|
1072
|
+
constructor(r) {
|
|
1073
|
+
super(r), this.code = "ERR_ABORTED";
|
|
1078
1074
|
}
|
|
1079
1075
|
}
|
|
1080
|
-
function
|
|
1076
|
+
function Pt(t) {
|
|
1081
1077
|
t.sort((i, o) => i.offset - o.offset);
|
|
1082
1078
|
const r = [];
|
|
1083
1079
|
let e, n;
|
|
@@ -1089,30 +1085,30 @@ function Ft(t) {
|
|
|
1089
1085
|
}), n = e.offset + e.length;
|
|
1090
1086
|
return r;
|
|
1091
1087
|
}
|
|
1092
|
-
function
|
|
1088
|
+
function H(t) {
|
|
1093
1089
|
if (t && t.aborted)
|
|
1094
1090
|
if (typeof DOMException > "u") {
|
|
1095
|
-
const r = new
|
|
1091
|
+
const r = new Ct("aborted");
|
|
1096
1092
|
throw r.code = "ERR_ABORTED", r;
|
|
1097
1093
|
} else
|
|
1098
1094
|
throw new DOMException("aborted", "AbortError");
|
|
1099
1095
|
}
|
|
1100
|
-
const
|
|
1101
|
-
function
|
|
1096
|
+
const Vt = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
|
|
1097
|
+
function Q(t, r, e, n) {
|
|
1102
1098
|
return t < n && r >= e;
|
|
1103
1099
|
}
|
|
1104
|
-
class
|
|
1100
|
+
class ze {
|
|
1101
|
+
bbi;
|
|
1102
|
+
refsByName;
|
|
1103
|
+
cirTreeOffset;
|
|
1104
|
+
isCompressed;
|
|
1105
|
+
blockType;
|
|
1106
|
+
cirTreePromise;
|
|
1107
|
+
featureCache = new ue({
|
|
1108
|
+
cache: new Ae({ maxSize: 1e3 }),
|
|
1109
|
+
fill: async ({ length: r, offset: e }, n) => this.bbi.read(r, e, { signal: n })
|
|
1110
|
+
});
|
|
1105
1111
|
constructor(r, e, n, i, o) {
|
|
1106
|
-
E(this, "bbi");
|
|
1107
|
-
E(this, "refsByName");
|
|
1108
|
-
E(this, "cirTreeOffset");
|
|
1109
|
-
E(this, "isCompressed");
|
|
1110
|
-
E(this, "blockType");
|
|
1111
|
-
E(this, "cirTreePromise");
|
|
1112
|
-
E(this, "featureCache", new le({
|
|
1113
|
-
cache: new Fe({ maxSize: 1e3 }),
|
|
1114
|
-
fill: async ({ length: r, offset: e }, n) => this.bbi.read(r, e, { signal: n })
|
|
1115
|
-
}));
|
|
1116
1112
|
if (this.bbi = r, this.refsByName = e, this.cirTreeOffset = n, this.isCompressed = i, this.blockType = o, !(n >= 0))
|
|
1117
1113
|
throw new Error("invalid cirTreeOffset!");
|
|
1118
1114
|
}
|
|
@@ -1122,111 +1118,111 @@ class Re {
|
|
|
1122
1118
|
s === void 0 && i.complete();
|
|
1123
1119
|
const u = { chrId: s, start: e, end: n };
|
|
1124
1120
|
this.cirTreePromise || (this.cirTreePromise = this.bbi.read(48, this.cirTreeOffset, o));
|
|
1125
|
-
const a = await this.cirTreePromise,
|
|
1126
|
-
let
|
|
1127
|
-
const f = (
|
|
1121
|
+
const a = await this.cirTreePromise, h = new DataView(a.buffer).getUint32(4, !0);
|
|
1122
|
+
let d = [], b = 0;
|
|
1123
|
+
const f = (w, S, x) => {
|
|
1128
1124
|
try {
|
|
1129
|
-
const p =
|
|
1130
|
-
let
|
|
1131
|
-
const U =
|
|
1132
|
-
|
|
1133
|
-
const T =
|
|
1134
|
-
if (
|
|
1135
|
-
const
|
|
1125
|
+
const p = w.subarray(S), g = new DataView(p.buffer, p.byteOffset, p.length);
|
|
1126
|
+
let y = 0;
|
|
1127
|
+
const U = g.getUint8(y);
|
|
1128
|
+
y += 2;
|
|
1129
|
+
const T = g.getUint16(y, !0);
|
|
1130
|
+
if (y += 2, U === 1) {
|
|
1131
|
+
const k = [];
|
|
1136
1132
|
for (let I = 0; I < T; I++) {
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1139
|
-
const C =
|
|
1140
|
-
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1143
|
-
const
|
|
1144
|
-
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1147
|
-
const
|
|
1148
|
-
|
|
1149
|
-
startChrom:
|
|
1133
|
+
const E = g.getUint32(y, !0);
|
|
1134
|
+
y += 4;
|
|
1135
|
+
const C = g.getUint32(y, !0);
|
|
1136
|
+
y += 4;
|
|
1137
|
+
const P = g.getUint32(y, !0);
|
|
1138
|
+
y += 4;
|
|
1139
|
+
const j = g.getUint32(y, !0);
|
|
1140
|
+
y += 4;
|
|
1141
|
+
const G = Number(g.getBigUint64(y, !0));
|
|
1142
|
+
y += 8;
|
|
1143
|
+
const W = Number(g.getBigUint64(y, !0));
|
|
1144
|
+
y += 8, k.push({
|
|
1145
|
+
startChrom: E,
|
|
1150
1146
|
startBase: C,
|
|
1151
|
-
endBase:
|
|
1152
|
-
endChrom:
|
|
1153
|
-
blockOffset:
|
|
1154
|
-
blockSize:
|
|
1155
|
-
offset:
|
|
1147
|
+
endBase: j,
|
|
1148
|
+
endChrom: P,
|
|
1149
|
+
blockOffset: G,
|
|
1150
|
+
blockSize: W,
|
|
1151
|
+
offset: y
|
|
1156
1152
|
});
|
|
1157
1153
|
}
|
|
1158
|
-
|
|
1154
|
+
d = d.concat(k.filter((I) => m(I)).map((I) => ({
|
|
1159
1155
|
offset: I.blockOffset,
|
|
1160
1156
|
length: I.blockSize
|
|
1161
1157
|
})));
|
|
1162
1158
|
} else if (U === 0) {
|
|
1163
|
-
const
|
|
1164
|
-
for (let
|
|
1165
|
-
const C =
|
|
1166
|
-
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1169
|
-
const
|
|
1170
|
-
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1159
|
+
const k = [];
|
|
1160
|
+
for (let E = 0; E < T; E++) {
|
|
1161
|
+
const C = g.getUint32(y, !0);
|
|
1162
|
+
y += 4;
|
|
1163
|
+
const P = g.getUint32(y, !0);
|
|
1164
|
+
y += 4;
|
|
1165
|
+
const j = g.getUint32(y, !0);
|
|
1166
|
+
y += 4;
|
|
1167
|
+
const G = g.getUint32(y, !0);
|
|
1168
|
+
y += 4;
|
|
1169
|
+
const W = Number(g.getBigUint64(y, !0));
|
|
1170
|
+
y += 8, k.push({
|
|
1175
1171
|
startChrom: C,
|
|
1176
|
-
startBase:
|
|
1177
|
-
endChrom:
|
|
1178
|
-
endBase:
|
|
1179
|
-
blockOffset:
|
|
1180
|
-
offset:
|
|
1172
|
+
startBase: P,
|
|
1173
|
+
endChrom: j,
|
|
1174
|
+
endBase: G,
|
|
1175
|
+
blockOffset: W,
|
|
1176
|
+
offset: y
|
|
1181
1177
|
});
|
|
1182
1178
|
}
|
|
1183
|
-
const I =
|
|
1184
|
-
I.length > 0 &&
|
|
1179
|
+
const I = k.filter((E) => m(E)).map((E) => E.blockOffset);
|
|
1180
|
+
I.length > 0 && B(I, x + 1);
|
|
1185
1181
|
}
|
|
1186
|
-
} catch (
|
|
1187
|
-
i.error(
|
|
1182
|
+
} catch (v) {
|
|
1183
|
+
i.error(v);
|
|
1188
1184
|
}
|
|
1189
|
-
}, m = (
|
|
1190
|
-
const { startChrom: S, startBase:
|
|
1191
|
-
return (S < s || S === s &&
|
|
1192
|
-
}, l = async (
|
|
1185
|
+
}, m = (w) => {
|
|
1186
|
+
const { startChrom: S, startBase: x, endChrom: v, endBase: p } = w;
|
|
1187
|
+
return (S < s || S === s && x <= n) && (v > s || v === s && p >= e);
|
|
1188
|
+
}, l = async (w, S, x) => {
|
|
1193
1189
|
try {
|
|
1194
|
-
const
|
|
1195
|
-
for (const
|
|
1196
|
-
S.contains(
|
|
1190
|
+
const v = S.max - S.min, p = S.min, g = await this.featureCache.get(`${v}_${p}`, { length: v, offset: p }, o?.signal);
|
|
1191
|
+
for (const y of w)
|
|
1192
|
+
S.contains(y) && (f(g, y - p, x), b -= 1, b === 0 && this.readFeatures(i, d, {
|
|
1197
1193
|
...o,
|
|
1198
1194
|
request: u
|
|
1199
1195
|
}).catch((U) => {
|
|
1200
1196
|
i.error(U);
|
|
1201
1197
|
}));
|
|
1202
|
-
} catch (
|
|
1203
|
-
i.error(
|
|
1198
|
+
} catch (v) {
|
|
1199
|
+
i.error(v);
|
|
1204
1200
|
}
|
|
1205
|
-
},
|
|
1201
|
+
}, B = (w, S) => {
|
|
1206
1202
|
try {
|
|
1207
|
-
|
|
1208
|
-
const
|
|
1209
|
-
let
|
|
1203
|
+
b += w.length;
|
|
1204
|
+
const x = 4 + h * 32;
|
|
1205
|
+
let v = new F([
|
|
1210
1206
|
{
|
|
1211
|
-
min:
|
|
1212
|
-
max:
|
|
1207
|
+
min: w[0],
|
|
1208
|
+
max: w[0] + x
|
|
1213
1209
|
}
|
|
1214
1210
|
]);
|
|
1215
|
-
for (let p = 1; p <
|
|
1216
|
-
const
|
|
1211
|
+
for (let p = 1; p < w.length; p += 1) {
|
|
1212
|
+
const g = new F([
|
|
1217
1213
|
{
|
|
1218
|
-
min:
|
|
1219
|
-
max:
|
|
1214
|
+
min: w[p],
|
|
1215
|
+
max: w[p] + x
|
|
1220
1216
|
}
|
|
1221
1217
|
]);
|
|
1222
|
-
|
|
1218
|
+
v = v.union(g);
|
|
1223
1219
|
}
|
|
1224
|
-
|
|
1225
|
-
} catch (
|
|
1226
|
-
i.error(
|
|
1220
|
+
v.getRanges().map((p) => l(w, p, S));
|
|
1221
|
+
} catch (x) {
|
|
1222
|
+
i.error(x);
|
|
1227
1223
|
}
|
|
1228
1224
|
};
|
|
1229
|
-
|
|
1225
|
+
B([this.cirTreeOffset + 48], 1);
|
|
1230
1226
|
return;
|
|
1231
1227
|
} catch (s) {
|
|
1232
1228
|
i.error(s);
|
|
@@ -1243,20 +1239,20 @@ class Re {
|
|
|
1243
1239
|
o += 4;
|
|
1244
1240
|
const c = s.getUint32(o, !0);
|
|
1245
1241
|
o += 4;
|
|
1246
|
-
const
|
|
1242
|
+
const h = s.getUint32(o, !0);
|
|
1247
1243
|
o += 4;
|
|
1248
|
-
const
|
|
1244
|
+
const d = s.getFloat32(o, !0);
|
|
1249
1245
|
o += 4;
|
|
1250
|
-
const
|
|
1246
|
+
const b = s.getFloat32(o, !0);
|
|
1251
1247
|
o += 4;
|
|
1252
1248
|
const f = s.getFloat32(o, !0);
|
|
1253
|
-
o += 4, o += 4, (!n || u === n.chrId &&
|
|
1249
|
+
o += 4, o += 4, (!n || u === n.chrId && Q(a, c, n.start, n.end)) && i.push({
|
|
1254
1250
|
start: a,
|
|
1255
1251
|
end: c,
|
|
1256
|
-
maxScore:
|
|
1257
|
-
minScore:
|
|
1252
|
+
maxScore: b,
|
|
1253
|
+
minScore: d,
|
|
1258
1254
|
summary: !0,
|
|
1259
|
-
score: f / (
|
|
1255
|
+
score: f / (h || 1)
|
|
1260
1256
|
});
|
|
1261
1257
|
}
|
|
1262
1258
|
return i;
|
|
@@ -1266,25 +1262,25 @@ class Re {
|
|
|
1266
1262
|
let s = e;
|
|
1267
1263
|
const u = r, a = new DataView(u.buffer, u.byteOffset, u.length);
|
|
1268
1264
|
for (; s < r.byteLength; ) {
|
|
1269
|
-
const c = s,
|
|
1265
|
+
const c = s, h = a.getUint32(s, !0);
|
|
1270
1266
|
s += 4;
|
|
1271
|
-
const
|
|
1267
|
+
const d = a.getInt32(s, !0);
|
|
1272
1268
|
s += 4;
|
|
1273
|
-
const
|
|
1269
|
+
const b = a.getInt32(s, !0);
|
|
1274
1270
|
s += 4;
|
|
1275
1271
|
let f = s;
|
|
1276
1272
|
for (; f < r.length && r[f] !== 0; f++)
|
|
1277
1273
|
;
|
|
1278
|
-
const m = r.subarray(s, f), l =
|
|
1274
|
+
const m = r.subarray(s, f), l = Vt?.decode(m) ?? m.toString();
|
|
1279
1275
|
s = f + 1, o.push({
|
|
1280
|
-
chromId:
|
|
1281
|
-
start:
|
|
1282
|
-
end:
|
|
1276
|
+
chromId: h,
|
|
1277
|
+
start: d,
|
|
1278
|
+
end: b,
|
|
1283
1279
|
rest: l,
|
|
1284
1280
|
uniqueId: `bb-${n + c}`
|
|
1285
1281
|
});
|
|
1286
1282
|
}
|
|
1287
|
-
return i ? o.filter((c) =>
|
|
1283
|
+
return i ? o.filter((c) => Q(c.start, c.end, i.start, i.end)) : o;
|
|
1288
1284
|
}
|
|
1289
1285
|
parseBigWigBlock(r, e, n) {
|
|
1290
1286
|
const i = r.subarray(e), o = new DataView(i.buffer, i.byteOffset, i.length);
|
|
@@ -1296,33 +1292,33 @@ class Re {
|
|
|
1296
1292
|
s += 4;
|
|
1297
1293
|
const c = o.getUint32(s, !0);
|
|
1298
1294
|
s += 4;
|
|
1299
|
-
const
|
|
1295
|
+
const h = o.getUint8(s);
|
|
1300
1296
|
s += 2;
|
|
1301
|
-
const
|
|
1297
|
+
const d = o.getUint16(s, !0);
|
|
1302
1298
|
s += 2;
|
|
1303
|
-
const
|
|
1304
|
-
switch (
|
|
1299
|
+
const b = new Array(d);
|
|
1300
|
+
switch (h) {
|
|
1305
1301
|
case 1: {
|
|
1306
|
-
for (let f = 0; f <
|
|
1302
|
+
for (let f = 0; f < d; f++) {
|
|
1307
1303
|
const m = o.getInt32(s, !0);
|
|
1308
1304
|
s += 4;
|
|
1309
1305
|
const l = o.getInt32(s, !0);
|
|
1310
1306
|
s += 4;
|
|
1311
|
-
const
|
|
1312
|
-
s += 4,
|
|
1307
|
+
const B = o.getFloat32(s, !0);
|
|
1308
|
+
s += 4, b[f] = {
|
|
1313
1309
|
start: m,
|
|
1314
1310
|
end: l,
|
|
1315
|
-
score:
|
|
1311
|
+
score: B
|
|
1316
1312
|
};
|
|
1317
1313
|
}
|
|
1318
1314
|
break;
|
|
1319
1315
|
}
|
|
1320
1316
|
case 2: {
|
|
1321
|
-
for (let f = 0; f <
|
|
1317
|
+
for (let f = 0; f < d; f++) {
|
|
1322
1318
|
const m = o.getInt32(s, !0);
|
|
1323
1319
|
s += 4;
|
|
1324
1320
|
const l = o.getFloat32(s, !0);
|
|
1325
|
-
s += 4,
|
|
1321
|
+
s += 4, b[f] = {
|
|
1326
1322
|
score: l,
|
|
1327
1323
|
start: m,
|
|
1328
1324
|
end: m + c
|
|
@@ -1331,11 +1327,11 @@ class Re {
|
|
|
1331
1327
|
break;
|
|
1332
1328
|
}
|
|
1333
1329
|
case 3: {
|
|
1334
|
-
for (let f = 0; f <
|
|
1330
|
+
for (let f = 0; f < d; f++) {
|
|
1335
1331
|
const m = o.getFloat32(s, !0);
|
|
1336
1332
|
s += 4;
|
|
1337
1333
|
const l = u + f * a;
|
|
1338
|
-
|
|
1334
|
+
b[f] = {
|
|
1339
1335
|
score: m,
|
|
1340
1336
|
start: l,
|
|
1341
1337
|
end: l + c
|
|
@@ -1344,18 +1340,18 @@ class Re {
|
|
|
1344
1340
|
break;
|
|
1345
1341
|
}
|
|
1346
1342
|
}
|
|
1347
|
-
return n ?
|
|
1343
|
+
return n ? b.filter((f) => Q(f.start, f.end, n.start, n.end)) : b;
|
|
1348
1344
|
}
|
|
1349
1345
|
async readFeatures(r, e, n = {}) {
|
|
1350
1346
|
try {
|
|
1351
|
-
const { blockType: i, isCompressed: o } = this, { signal: s, request: u } = n, a =
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
const { length:
|
|
1347
|
+
const { blockType: i, isCompressed: o } = this, { signal: s, request: u } = n, a = Pt(e);
|
|
1348
|
+
H(s), await Promise.all(a.map(async (c) => {
|
|
1349
|
+
H(s);
|
|
1350
|
+
const { length: h, offset: d } = c, b = await this.featureCache.get(`${h}_${d}`, c, s);
|
|
1355
1351
|
for (const f of c.blocks) {
|
|
1356
|
-
|
|
1357
|
-
let m =
|
|
1358
|
-
switch (o && (m =
|
|
1352
|
+
H(s);
|
|
1353
|
+
let m = b.subarray(f.offset - c.offset);
|
|
1354
|
+
switch (o && (m = _t(m)), H(s), i) {
|
|
1359
1355
|
case "summary": {
|
|
1360
1356
|
r.next(this.parseSummaryBlock(m, 0, u));
|
|
1361
1357
|
break;
|
|
@@ -1378,11 +1374,19 @@ class Re {
|
|
|
1378
1374
|
}
|
|
1379
1375
|
}
|
|
1380
1376
|
}
|
|
1381
|
-
const
|
|
1382
|
-
function
|
|
1377
|
+
const At = -2003829722, ae = -2021002517;
|
|
1378
|
+
function A(t) {
|
|
1383
1379
|
return new DataView(t.buffer, t.byteOffset, t.length);
|
|
1384
1380
|
}
|
|
1385
|
-
class
|
|
1381
|
+
class Fe {
|
|
1382
|
+
bbi;
|
|
1383
|
+
headerP;
|
|
1384
|
+
renameRefSeqs;
|
|
1385
|
+
getHeader(r) {
|
|
1386
|
+
return this.headerP || (this.headerP = this._getHeader(r).catch((e) => {
|
|
1387
|
+
throw this.headerP = void 0, e;
|
|
1388
|
+
})), this.headerP;
|
|
1389
|
+
}
|
|
1386
1390
|
/*
|
|
1387
1391
|
* @param filehandle - a filehandle from generic-filehandle2
|
|
1388
1392
|
*
|
|
@@ -1394,24 +1398,16 @@ class De {
|
|
|
1394
1398
|
* sequences using a mapping function
|
|
1395
1399
|
*/
|
|
1396
1400
|
constructor(r) {
|
|
1397
|
-
E(this, "bbi");
|
|
1398
|
-
E(this, "headerP");
|
|
1399
|
-
E(this, "renameRefSeqs");
|
|
1400
1401
|
const { filehandle: e, renameRefSeqs: n = (s) => s, path: i, url: o } = r;
|
|
1401
1402
|
if (this.renameRefSeqs = n, e)
|
|
1402
1403
|
this.bbi = e;
|
|
1403
1404
|
else if (o)
|
|
1404
|
-
this.bbi = new
|
|
1405
|
+
this.bbi = new Re(o);
|
|
1405
1406
|
else if (i)
|
|
1406
|
-
this.bbi = new
|
|
1407
|
+
this.bbi = new De(i);
|
|
1407
1408
|
else
|
|
1408
1409
|
throw new Error("no file given");
|
|
1409
1410
|
}
|
|
1410
|
-
getHeader(r) {
|
|
1411
|
-
return this.headerP || (this.headerP = this._getHeader(r).catch((e) => {
|
|
1412
|
-
throw this.headerP = void 0, e;
|
|
1413
|
-
})), this.headerP;
|
|
1414
|
-
}
|
|
1415
1411
|
async _getHeader(r) {
|
|
1416
1412
|
const e = await this._getMainHeader(r), n = await this._readChromTree(e, r);
|
|
1417
1413
|
return {
|
|
@@ -1420,8 +1416,8 @@ class De {
|
|
|
1420
1416
|
};
|
|
1421
1417
|
}
|
|
1422
1418
|
async _getMainHeader(r, e = 2e3) {
|
|
1423
|
-
const n = await this.bbi.read(e, 0, r), i =
|
|
1424
|
-
if (o !==
|
|
1419
|
+
const n = await this.bbi.read(e, 0, r), i = A(n), o = i.getInt32(0, !0);
|
|
1420
|
+
if (o !== At && o !== ae)
|
|
1425
1421
|
throw new Error("not a BigWig/BigBed file");
|
|
1426
1422
|
let s = 0;
|
|
1427
1423
|
const u = i.getInt32(s, !0);
|
|
@@ -1430,11 +1426,11 @@ class De {
|
|
|
1430
1426
|
s += 2;
|
|
1431
1427
|
const c = i.getUint16(s, !0);
|
|
1432
1428
|
s += 2;
|
|
1433
|
-
const
|
|
1429
|
+
const h = Number(i.getBigUint64(s, !0));
|
|
1434
1430
|
s += 8;
|
|
1435
|
-
const
|
|
1431
|
+
const d = Number(i.getBigUint64(s, !0));
|
|
1436
1432
|
s += 8;
|
|
1437
|
-
const
|
|
1433
|
+
const b = Number(i.getBigUint64(s, !0));
|
|
1438
1434
|
s += 8;
|
|
1439
1435
|
const f = i.getUint16(s, !0);
|
|
1440
1436
|
s += 2;
|
|
@@ -1442,114 +1438,114 @@ class De {
|
|
|
1442
1438
|
s += 2;
|
|
1443
1439
|
const l = Number(i.getBigUint64(s, !0));
|
|
1444
1440
|
s += 8;
|
|
1445
|
-
const
|
|
1441
|
+
const B = Number(i.getBigUint64(s, !0));
|
|
1446
1442
|
s += 8;
|
|
1447
|
-
const
|
|
1443
|
+
const w = i.getUint32(s, !0);
|
|
1448
1444
|
s += 4;
|
|
1449
1445
|
const S = Number(i.getBigUint64(s, !0));
|
|
1450
1446
|
s += 8;
|
|
1451
|
-
const
|
|
1452
|
-
for (let
|
|
1447
|
+
const x = [];
|
|
1448
|
+
for (let y = 0; y < c; y++) {
|
|
1453
1449
|
const U = i.getUint32(s, !0);
|
|
1454
1450
|
s += 4;
|
|
1455
1451
|
const T = i.getUint32(s, !0);
|
|
1456
1452
|
s += 4;
|
|
1457
|
-
const
|
|
1453
|
+
const k = Number(i.getBigUint64(s, !0));
|
|
1458
1454
|
s += 8;
|
|
1459
1455
|
const I = Number(i.getBigUint64(s, !0));
|
|
1460
|
-
s += 8,
|
|
1456
|
+
s += 8, x.push({
|
|
1461
1457
|
reductionLevel: U,
|
|
1462
1458
|
reserved: T,
|
|
1463
|
-
dataOffset:
|
|
1459
|
+
dataOffset: k,
|
|
1464
1460
|
indexOffset: I
|
|
1465
1461
|
});
|
|
1466
1462
|
}
|
|
1467
|
-
const
|
|
1468
|
-
if (l > e ||
|
|
1463
|
+
const v = u === ae ? "bigbed" : "bigwig";
|
|
1464
|
+
if (l > e || B > e - 40)
|
|
1469
1465
|
return this._getMainHeader(r, e * 2);
|
|
1470
1466
|
let p;
|
|
1471
|
-
if (
|
|
1472
|
-
const
|
|
1467
|
+
if (B) {
|
|
1468
|
+
const y = n.subarray(B);
|
|
1473
1469
|
let U = 0;
|
|
1474
|
-
const T =
|
|
1470
|
+
const T = A(y), k = Number(T.getBigUint64(U, !0));
|
|
1475
1471
|
U += 8;
|
|
1476
1472
|
const I = T.getFloat64(U, !0);
|
|
1477
1473
|
U += 8;
|
|
1478
|
-
const
|
|
1474
|
+
const E = T.getFloat64(U, !0);
|
|
1479
1475
|
U += 8;
|
|
1480
1476
|
const C = T.getFloat64(U, !0);
|
|
1481
1477
|
U += 8;
|
|
1482
|
-
const
|
|
1478
|
+
const P = T.getFloat64(U, !0);
|
|
1483
1479
|
U += 8, p = {
|
|
1484
1480
|
scoreMin: I,
|
|
1485
|
-
scoreMax:
|
|
1481
|
+
scoreMax: E,
|
|
1486
1482
|
scoreSum: C,
|
|
1487
|
-
scoreSumSquares:
|
|
1488
|
-
basesCovered:
|
|
1483
|
+
scoreSumSquares: P,
|
|
1484
|
+
basesCovered: k
|
|
1489
1485
|
};
|
|
1490
1486
|
} else
|
|
1491
1487
|
throw new Error("no stats");
|
|
1492
|
-
const
|
|
1488
|
+
const g = new TextDecoder("utf8");
|
|
1493
1489
|
return {
|
|
1494
|
-
zoomLevels:
|
|
1490
|
+
zoomLevels: x,
|
|
1495
1491
|
magic: u,
|
|
1496
1492
|
extHeaderOffset: S,
|
|
1497
1493
|
numZoomLevels: c,
|
|
1498
1494
|
fieldCount: f,
|
|
1499
1495
|
totalSummary: p,
|
|
1500
1496
|
definedFieldCount: m,
|
|
1501
|
-
uncompressBufSize:
|
|
1497
|
+
uncompressBufSize: w,
|
|
1502
1498
|
asOffset: l,
|
|
1503
|
-
chromTreeOffset:
|
|
1504
|
-
totalSummaryOffset:
|
|
1505
|
-
unzoomedDataOffset:
|
|
1506
|
-
unzoomedIndexOffset:
|
|
1507
|
-
fileType:
|
|
1499
|
+
chromTreeOffset: h,
|
|
1500
|
+
totalSummaryOffset: B,
|
|
1501
|
+
unzoomedDataOffset: d,
|
|
1502
|
+
unzoomedIndexOffset: b,
|
|
1503
|
+
fileType: v,
|
|
1508
1504
|
version: a,
|
|
1509
|
-
autoSql: l ?
|
|
1505
|
+
autoSql: l ? g.decode(n.subarray(l, n.indexOf(0, l))) : ""
|
|
1510
1506
|
};
|
|
1511
1507
|
}
|
|
1512
1508
|
async _readChromTree(r, e) {
|
|
1513
|
-
const n = [], i = {}, o = r.chromTreeOffset, s =
|
|
1509
|
+
const n = [], i = {}, o = r.chromTreeOffset, s = A(await this.bbi.read(32, o, e));
|
|
1514
1510
|
let u = 0;
|
|
1515
1511
|
u += 4, u += 4;
|
|
1516
1512
|
const a = s.getUint32(u, !0);
|
|
1517
1513
|
u += 4;
|
|
1518
1514
|
const c = s.getUint32(u, !0);
|
|
1519
1515
|
u += 4, u += 8;
|
|
1520
|
-
const
|
|
1521
|
-
const f = await this.bbi.read(4,
|
|
1516
|
+
const h = new TextDecoder("utf8"), d = async (b) => {
|
|
1517
|
+
const f = await this.bbi.read(4, b), m = A(f);
|
|
1522
1518
|
let l = 0;
|
|
1523
|
-
const
|
|
1519
|
+
const B = m.getUint8(l);
|
|
1524
1520
|
l += 1, l += 1;
|
|
1525
|
-
const
|
|
1526
|
-
if (l += 2,
|
|
1527
|
-
const S = await this.bbi.read(
|
|
1521
|
+
const w = m.getUint16(l, !0);
|
|
1522
|
+
if (l += 2, B) {
|
|
1523
|
+
const S = await this.bbi.read(w * (a + c), b + l), x = A(S);
|
|
1528
1524
|
l = 0;
|
|
1529
|
-
for (let
|
|
1530
|
-
const p =
|
|
1525
|
+
for (let v = 0; v < w; v++) {
|
|
1526
|
+
const p = h.decode(S.subarray(l, l + a)).replaceAll("\0", "");
|
|
1531
1527
|
l += a;
|
|
1532
|
-
const
|
|
1528
|
+
const g = x.getUint32(l, !0);
|
|
1533
1529
|
l += 4;
|
|
1534
|
-
const
|
|
1535
|
-
l += 4, i[this.renameRefSeqs(p)] =
|
|
1530
|
+
const y = x.getUint32(l, !0);
|
|
1531
|
+
l += 4, i[this.renameRefSeqs(p)] = g, n[g] = {
|
|
1536
1532
|
name: p,
|
|
1537
|
-
id:
|
|
1538
|
-
length:
|
|
1533
|
+
id: g,
|
|
1534
|
+
length: y
|
|
1539
1535
|
};
|
|
1540
1536
|
}
|
|
1541
1537
|
} else {
|
|
1542
|
-
const S = [],
|
|
1538
|
+
const S = [], x = A(await this.bbi.read(w * (a + 8), b + l));
|
|
1543
1539
|
l = 0;
|
|
1544
|
-
for (let
|
|
1540
|
+
for (let v = 0; v < w; v++) {
|
|
1545
1541
|
l += a;
|
|
1546
|
-
const p = Number(
|
|
1547
|
-
l += 8, S.push(
|
|
1542
|
+
const p = Number(x.getBigUint64(l, !0));
|
|
1543
|
+
l += 8, S.push(d(p));
|
|
1548
1544
|
}
|
|
1549
1545
|
await Promise.all(S);
|
|
1550
1546
|
}
|
|
1551
1547
|
};
|
|
1552
|
-
return await
|
|
1548
|
+
return await d(o + 32), {
|
|
1553
1549
|
refsByName: i,
|
|
1554
1550
|
refsByNumber: n
|
|
1555
1551
|
};
|
|
@@ -1560,7 +1556,7 @@ class De {
|
|
|
1560
1556
|
*/
|
|
1561
1557
|
async getUnzoomedView(r) {
|
|
1562
1558
|
const { unzoomedIndexOffset: e, refsByName: n, uncompressBufSize: i, fileType: o } = await this.getHeader(r);
|
|
1563
|
-
return new
|
|
1559
|
+
return new ze(this.bbi, n, e, i > 0, o);
|
|
1564
1560
|
}
|
|
1565
1561
|
/**
|
|
1566
1562
|
* Gets features from a BigWig file
|
|
@@ -1579,18 +1575,18 @@ class De {
|
|
|
1579
1575
|
const o = this.renameRefSeqs(r);
|
|
1580
1576
|
let s;
|
|
1581
1577
|
const { basesPerSpan: u, scale: a } = i || {};
|
|
1582
|
-
return u ? s = await this.getView(1 / u, i) : a ? s = await this.getView(a, i) : s = await this.getView(1, i), new
|
|
1583
|
-
s.readWigData(o, e, n, c, i).catch((
|
|
1584
|
-
c.error(
|
|
1578
|
+
return u ? s = await this.getView(1 / u, i) : a ? s = await this.getView(a, i) : s = await this.getView(1, i), new _((c) => {
|
|
1579
|
+
s.readWigData(o, e, n, c, i).catch((h) => {
|
|
1580
|
+
c.error(h);
|
|
1585
1581
|
});
|
|
1586
1582
|
});
|
|
1587
1583
|
}
|
|
1588
1584
|
async getFeatures(r, e, n, i) {
|
|
1589
1585
|
const o = await this.getFeatureStream(r, e, n, i);
|
|
1590
|
-
return (await
|
|
1586
|
+
return (await _e(o.pipe(Ot()))).flat();
|
|
1591
1587
|
}
|
|
1592
1588
|
}
|
|
1593
|
-
class
|
|
1589
|
+
class Nt extends Fe {
|
|
1594
1590
|
/**
|
|
1595
1591
|
* Retrieves a BlockView of a specific zoomLevel
|
|
1596
1592
|
*
|
|
@@ -1604,31 +1600,28 @@ class $t extends De {
|
|
|
1604
1600
|
for (let a = u; a >= 0; a -= 1) {
|
|
1605
1601
|
const c = n[a];
|
|
1606
1602
|
if (c && c.reductionLevel <= 2 * s)
|
|
1607
|
-
return new
|
|
1603
|
+
return new ze(this.bbi, i, c.indexOffset, o > 0, "summary");
|
|
1608
1604
|
}
|
|
1609
1605
|
return this.getUnzoomedView(e);
|
|
1610
1606
|
}
|
|
1611
1607
|
}
|
|
1612
|
-
function
|
|
1608
|
+
function zt(t) {
|
|
1613
1609
|
return t.filter((r) => !!r);
|
|
1614
1610
|
}
|
|
1615
|
-
class
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
readIndices(e = {}) {
|
|
1624
|
-
const { signal: n, ...i } = e;
|
|
1625
|
-
return this.readIndicesCache.get(JSON.stringify(i), e, n);
|
|
1611
|
+
class Lt extends Fe {
|
|
1612
|
+
readIndicesCache = new ue({
|
|
1613
|
+
cache: new Ae({ maxSize: 1 }),
|
|
1614
|
+
fill: (r, e) => this._readIndices({ ...r, signal: e })
|
|
1615
|
+
});
|
|
1616
|
+
readIndices(r = {}) {
|
|
1617
|
+
const { signal: e, ...n } = r;
|
|
1618
|
+
return this.readIndicesCache.get(JSON.stringify(n), r, e);
|
|
1626
1619
|
}
|
|
1627
1620
|
/*
|
|
1628
1621
|
* retrieve unzoomed view for any scale
|
|
1629
1622
|
*/
|
|
1630
|
-
async getView(
|
|
1631
|
-
return this.getUnzoomedView(
|
|
1623
|
+
async getView(r, e) {
|
|
1624
|
+
return this.getUnzoomedView(e);
|
|
1632
1625
|
}
|
|
1633
1626
|
/*
|
|
1634
1627
|
* parse the bigbed extraIndex fields
|
|
@@ -1637,34 +1630,34 @@ class jt extends De {
|
|
|
1637
1630
|
* @return a Promise for an array of Index data structure since there can be
|
|
1638
1631
|
* multiple extraIndexes in a bigbed, see bedToBigBed documentation
|
|
1639
1632
|
*/
|
|
1640
|
-
async _readIndices(
|
|
1641
|
-
const { extHeaderOffset:
|
|
1642
|
-
let
|
|
1643
|
-
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1646
|
-
const
|
|
1647
|
-
if (
|
|
1633
|
+
async _readIndices(r) {
|
|
1634
|
+
const { extHeaderOffset: e } = await this.getHeader(r), n = await this.bbi.read(64, e), i = new DataView(n.buffer, n.byteOffset, n.length);
|
|
1635
|
+
let o = 0;
|
|
1636
|
+
o += 2;
|
|
1637
|
+
const s = i.getUint16(o, !0);
|
|
1638
|
+
o += 2;
|
|
1639
|
+
const u = Number(i.getBigUint64(o, !0));
|
|
1640
|
+
if (o += 8, s === 0)
|
|
1648
1641
|
return [];
|
|
1649
|
-
const
|
|
1650
|
-
for (let
|
|
1651
|
-
const
|
|
1652
|
-
let
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1655
|
-
const
|
|
1656
|
-
|
|
1657
|
-
const
|
|
1658
|
-
|
|
1659
|
-
const x =
|
|
1660
|
-
|
|
1661
|
-
type:
|
|
1662
|
-
fieldcount:
|
|
1663
|
-
offset:
|
|
1642
|
+
const a = 20, c = a * s, h = await this.bbi.read(c, u), d = [];
|
|
1643
|
+
for (let b = 0; b < s; b += 1) {
|
|
1644
|
+
const f = h.subarray(b * a), m = new DataView(f.buffer, f.byteOffset, f.length);
|
|
1645
|
+
let l = 0;
|
|
1646
|
+
const B = m.getInt16(l, !0);
|
|
1647
|
+
l += 2;
|
|
1648
|
+
const w = m.getInt16(l, !0);
|
|
1649
|
+
l += 2;
|
|
1650
|
+
const S = Number(m.getBigUint64(l, !0));
|
|
1651
|
+
l += 12;
|
|
1652
|
+
const x = m.getInt16(l, !0);
|
|
1653
|
+
d.push({
|
|
1654
|
+
type: B,
|
|
1655
|
+
fieldcount: w,
|
|
1656
|
+
offset: S,
|
|
1664
1657
|
field: x
|
|
1665
1658
|
});
|
|
1666
1659
|
}
|
|
1667
|
-
return
|
|
1660
|
+
return d;
|
|
1668
1661
|
}
|
|
1669
1662
|
/*
|
|
1670
1663
|
* perform a search in the bigbed extraIndex to find which blocks in the
|
|
@@ -1676,74 +1669,74 @@ class jt extends De {
|
|
|
1676
1669
|
*
|
|
1677
1670
|
* @return a Promise for an array of bigbed block Loc entries
|
|
1678
1671
|
*/
|
|
1679
|
-
async searchExtraIndexBlocks(
|
|
1680
|
-
const
|
|
1681
|
-
if (
|
|
1672
|
+
async searchExtraIndexBlocks(r, e = {}) {
|
|
1673
|
+
const n = await this.readIndices(e);
|
|
1674
|
+
if (n.length === 0)
|
|
1682
1675
|
return [];
|
|
1683
|
-
const
|
|
1684
|
-
const { offset:
|
|
1685
|
-
let
|
|
1686
|
-
|
|
1687
|
-
const
|
|
1688
|
-
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1691
|
-
const
|
|
1692
|
-
|
|
1693
|
-
const
|
|
1694
|
-
const
|
|
1695
|
-
let
|
|
1696
|
-
const
|
|
1697
|
-
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1700
|
-
const
|
|
1701
|
-
if (
|
|
1702
|
-
const
|
|
1703
|
-
for (let
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1708
|
-
key:
|
|
1709
|
-
offset:
|
|
1676
|
+
const i = new TextDecoder("utf8"), o = n.map(async (s) => {
|
|
1677
|
+
const { offset: u, field: a } = s, c = await this.bbi.read(32, u, e), h = new DataView(c.buffer, c.byteOffset, c.length);
|
|
1678
|
+
let d = 0;
|
|
1679
|
+
d += 4;
|
|
1680
|
+
const b = h.getInt32(d, !0);
|
|
1681
|
+
d += 4;
|
|
1682
|
+
const f = h.getInt32(d, !0);
|
|
1683
|
+
d += 4;
|
|
1684
|
+
const m = h.getInt32(d, !0);
|
|
1685
|
+
d += 4, d += 8;
|
|
1686
|
+
const l = async (B) => {
|
|
1687
|
+
const w = B, S = 4 + b * (f + m), v = await this.bbi.read(S, w, e), p = new DataView(v.buffer, v.byteOffset, v.length);
|
|
1688
|
+
let g = 0;
|
|
1689
|
+
const y = p.getInt8(g);
|
|
1690
|
+
g += 2;
|
|
1691
|
+
const U = p.getInt16(g, !0);
|
|
1692
|
+
g += 2;
|
|
1693
|
+
const T = [];
|
|
1694
|
+
if (y === 0) {
|
|
1695
|
+
const k = [];
|
|
1696
|
+
for (let E = 0; E < U; E++) {
|
|
1697
|
+
const C = i.decode(v.subarray(g, g + f)).replaceAll("\0", "");
|
|
1698
|
+
g += f;
|
|
1699
|
+
const P = Number(p.getBigUint64(g, !0));
|
|
1700
|
+
g += 8, k.push({
|
|
1701
|
+
key: C,
|
|
1702
|
+
offset: P
|
|
1710
1703
|
});
|
|
1711
1704
|
}
|
|
1712
|
-
let
|
|
1713
|
-
for (const { key:
|
|
1714
|
-
if (
|
|
1715
|
-
return
|
|
1716
|
-
|
|
1705
|
+
let I = 0;
|
|
1706
|
+
for (const { key: E, offset: C } of k) {
|
|
1707
|
+
if (r.localeCompare(E) < 0 && I)
|
|
1708
|
+
return l(I);
|
|
1709
|
+
I = C;
|
|
1717
1710
|
}
|
|
1718
|
-
return
|
|
1719
|
-
} else if (
|
|
1720
|
-
for (let
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1723
|
-
const
|
|
1724
|
-
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1729
|
-
key:
|
|
1730
|
-
offset:
|
|
1731
|
-
length:
|
|
1732
|
-
reserved:
|
|
1711
|
+
return l(I);
|
|
1712
|
+
} else if (y === 1) {
|
|
1713
|
+
for (let k = 0; k < U; k++) {
|
|
1714
|
+
const I = i.decode(v.subarray(g, g + f)).replaceAll("\0", "");
|
|
1715
|
+
g += f;
|
|
1716
|
+
const E = Number(p.getBigUint64(g, !0));
|
|
1717
|
+
g += 8;
|
|
1718
|
+
const C = p.getUint32(g, !0);
|
|
1719
|
+
g += 4;
|
|
1720
|
+
const P = p.getUint32(g, !0);
|
|
1721
|
+
g += 4, T.push({
|
|
1722
|
+
key: I,
|
|
1723
|
+
offset: E,
|
|
1724
|
+
length: C,
|
|
1725
|
+
reserved: P
|
|
1733
1726
|
});
|
|
1734
1727
|
}
|
|
1735
|
-
for (const
|
|
1736
|
-
if (
|
|
1728
|
+
for (const k of T)
|
|
1729
|
+
if (k.key === r)
|
|
1737
1730
|
return {
|
|
1738
|
-
...
|
|
1739
|
-
field:
|
|
1731
|
+
...k,
|
|
1732
|
+
field: a
|
|
1740
1733
|
};
|
|
1741
1734
|
return;
|
|
1742
1735
|
}
|
|
1743
1736
|
};
|
|
1744
|
-
return
|
|
1737
|
+
return l(u + 32);
|
|
1745
1738
|
});
|
|
1746
|
-
return
|
|
1739
|
+
return zt(await Promise.all(o));
|
|
1747
1740
|
}
|
|
1748
1741
|
/*
|
|
1749
1742
|
* retrieve the features from the bigbed data that were found through the
|
|
@@ -1756,26 +1749,23 @@ class jt extends De {
|
|
|
1756
1749
|
*
|
|
1757
1750
|
* @return array of Feature
|
|
1758
1751
|
*/
|
|
1759
|
-
async searchExtraIndex(
|
|
1760
|
-
const
|
|
1761
|
-
if (
|
|
1752
|
+
async searchExtraIndex(r, e = {}) {
|
|
1753
|
+
const n = await this.searchExtraIndexBlocks(r, e);
|
|
1754
|
+
if (n.length === 0)
|
|
1762
1755
|
return [];
|
|
1763
|
-
const
|
|
1764
|
-
|
|
1765
|
-
|
|
1756
|
+
const i = await this.getUnzoomedView(e), o = n.map((u) => new _((a) => {
|
|
1757
|
+
i.readFeatures(a, [u], e).catch((c) => {
|
|
1758
|
+
a.error(c);
|
|
1766
1759
|
});
|
|
1767
|
-
}).pipe(
|
|
1768
|
-
for (const
|
|
1769
|
-
|
|
1770
|
-
return
|
|
1760
|
+
}).pipe(Ve((a, c) => a.concat(c)), Ce((a) => {
|
|
1761
|
+
for (const c of a)
|
|
1762
|
+
c.field = u.field;
|
|
1763
|
+
return a;
|
|
1771
1764
|
})));
|
|
1772
|
-
return (await
|
|
1773
|
-
var c;
|
|
1774
|
-
return ((c = a.rest) == null ? void 0 : c.split(" ")[(a.field || 0) - 3]) === e;
|
|
1775
|
-
});
|
|
1765
|
+
return (await _e(It(...o))).filter((u) => u.rest?.split(" ")[(u.field || 0) - 3] === r);
|
|
1776
1766
|
}
|
|
1777
1767
|
}
|
|
1778
1768
|
export {
|
|
1779
|
-
|
|
1780
|
-
|
|
1769
|
+
Lt as BigBed,
|
|
1770
|
+
Nt as BigWig
|
|
1781
1771
|
};
|