@genome-spy/app 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/{AbortablePromiseCache-CcuMrnn7.js → AbortablePromiseCache-Dj0vzLnp.js} +4 -4
- package/dist/blosc-D1xNXZJs.js +719 -0
- package/dist/{browser-BRemItdO.js → browser-0iNU5Wit.js} +33 -33
- package/dist/chunk-INHXZS53-DiyuLb3Z.js +14 -0
- package/dist/{index-DHay3ip-.js → index-BUsSzlHg.js} +583 -593
- package/dist/index-BYsZN7b0.js +1597 -0
- package/dist/{index-D-w7Mmt9.js → index-C7wOh6y1.js} +138 -140
- package/dist/index-CRaQAuki.js +326 -0
- package/dist/{index-D74H8TTz.js → index-D9v1PCj9.js} +1 -2
- package/dist/{index-BatuyGAI.js → index-GDOuv_D5.js} +75 -80
- package/dist/{index-DbJ0oeYM.js → index-Gt44EOIH.js} +160 -163
- package/dist/index.es.js +29149 -26002
- package/dist/index.js +1507 -1285
- package/dist/lz4-1Ws5oVWR.js +640 -0
- package/dist/schema.json +301 -0
- package/dist/style.css +1 -1
- package/dist/{unzip-NywezaRR.js → unzip-Bac01w6X.js} +1 -1
- package/dist/zstd-C4EcZnjq.js +603 -0
- package/package.json +5 -4
- package/dist/index-ByuE8dvu.js +0 -332
- package/dist/index-D28m8tSW.js +0 -1607
|
@@ -1,71 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { A as le } from "./AbortablePromiseCache-CcuMrnn7.js";
|
|
6
|
-
import { i as $e } from "./inflate-GtwLkvSP.js";
|
|
7
|
-
function je(t) {
|
|
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
|
+
function Le(t) {
|
|
8
5
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
9
6
|
}
|
|
10
|
-
const
|
|
11
|
-
function
|
|
7
|
+
const fe = BigInt(32);
|
|
8
|
+
function Me(t, r, e) {
|
|
12
9
|
const n = +!!e, i = +!e;
|
|
13
|
-
return BigInt(t.getInt32(r, e) * i + t.getInt32(r + 4, e) * n) <<
|
|
10
|
+
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);
|
|
14
11
|
}
|
|
15
|
-
function
|
|
12
|
+
function He(t, r, e) {
|
|
16
13
|
const n = t.getUint32(r, e), i = t.getUint32(r + 4, e), o = +!!e, s = +!e;
|
|
17
|
-
return BigInt(n * s + i * o) <<
|
|
14
|
+
return BigInt(n * s + i * o) << fe | BigInt(n * o + i * s);
|
|
18
15
|
}
|
|
19
16
|
"getBigInt64" in DataView || (DataView.prototype.getBigInt64 = function(t, r) {
|
|
20
|
-
return
|
|
17
|
+
return Me(this, t, r);
|
|
21
18
|
});
|
|
22
19
|
"getBigUint64" in DataView || (DataView.prototype.getBigUint64 = function(t, r) {
|
|
23
|
-
return
|
|
20
|
+
return He(this, t, r);
|
|
24
21
|
});
|
|
25
|
-
var
|
|
26
|
-
return
|
|
22
|
+
var J = function(t, r) {
|
|
23
|
+
return J = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
27
24
|
e.__proto__ = n;
|
|
28
25
|
} || function(e, n) {
|
|
29
26
|
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
30
|
-
},
|
|
27
|
+
}, J(t, r);
|
|
31
28
|
};
|
|
32
|
-
function
|
|
29
|
+
function X(t, r) {
|
|
33
30
|
if (typeof r != "function" && r !== null)
|
|
34
31
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
|
35
|
-
|
|
32
|
+
J(t, r);
|
|
36
33
|
function e() {
|
|
37
34
|
this.constructor = t;
|
|
38
35
|
}
|
|
39
36
|
t.prototype = r === null ? Object.create(r) : (e.prototype = r.prototype, new e());
|
|
40
37
|
}
|
|
41
|
-
function
|
|
38
|
+
function $e(t, r, e, n) {
|
|
42
39
|
function i(o) {
|
|
43
40
|
return o instanceof e ? o : new e(function(s) {
|
|
44
41
|
s(o);
|
|
45
42
|
});
|
|
46
43
|
}
|
|
47
44
|
return new (e || (e = Promise))(function(o, s) {
|
|
48
|
-
function u(
|
|
45
|
+
function u(h) {
|
|
49
46
|
try {
|
|
50
|
-
c(n.next(
|
|
51
|
-
} catch (
|
|
52
|
-
s(
|
|
47
|
+
c(n.next(h));
|
|
48
|
+
} catch (d) {
|
|
49
|
+
s(d);
|
|
53
50
|
}
|
|
54
51
|
}
|
|
55
|
-
function a(
|
|
52
|
+
function a(h) {
|
|
56
53
|
try {
|
|
57
|
-
c(n.throw(
|
|
58
|
-
} catch (
|
|
59
|
-
s(
|
|
54
|
+
c(n.throw(h));
|
|
55
|
+
} catch (d) {
|
|
56
|
+
s(d);
|
|
60
57
|
}
|
|
61
58
|
}
|
|
62
|
-
function c(
|
|
63
|
-
|
|
59
|
+
function c(h) {
|
|
60
|
+
h.done ? o(h.value) : i(h.value).then(u, a);
|
|
64
61
|
}
|
|
65
62
|
c((n = n.apply(t, r || [])).next());
|
|
66
63
|
});
|
|
67
64
|
}
|
|
68
|
-
function
|
|
65
|
+
function le(t, r) {
|
|
69
66
|
var e = { label: 0, sent: function() {
|
|
70
67
|
if (o[0] & 1) throw o[1];
|
|
71
68
|
return o[1];
|
|
@@ -74,8 +71,8 @@ function de(t, r) {
|
|
|
74
71
|
return this;
|
|
75
72
|
}), s;
|
|
76
73
|
function u(c) {
|
|
77
|
-
return function(
|
|
78
|
-
return a([c,
|
|
74
|
+
return function(h) {
|
|
75
|
+
return a([c, h]);
|
|
79
76
|
};
|
|
80
77
|
}
|
|
81
78
|
function a(c) {
|
|
@@ -116,8 +113,8 @@ function de(t, r) {
|
|
|
116
113
|
continue;
|
|
117
114
|
}
|
|
118
115
|
c = r.call(t, e);
|
|
119
|
-
} catch (
|
|
120
|
-
c = [6,
|
|
116
|
+
} catch (h) {
|
|
117
|
+
c = [6, h], i = 0;
|
|
121
118
|
} finally {
|
|
122
119
|
n = o = 0;
|
|
123
120
|
}
|
|
@@ -125,7 +122,7 @@ function de(t, r) {
|
|
|
125
122
|
return { value: c[0] ? c[1] : void 0, done: !0 };
|
|
126
123
|
}
|
|
127
124
|
}
|
|
128
|
-
function
|
|
125
|
+
function N(t) {
|
|
129
126
|
var r = typeof Symbol == "function" && Symbol.iterator, e = r && t[r], n = 0;
|
|
130
127
|
if (e) return e.call(t);
|
|
131
128
|
if (t && typeof t.length == "number") return {
|
|
@@ -135,7 +132,7 @@ function M(t) {
|
|
|
135
132
|
};
|
|
136
133
|
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
137
134
|
}
|
|
138
|
-
function
|
|
135
|
+
function Z(t, r) {
|
|
139
136
|
var e = typeof Symbol == "function" && t[Symbol.iterator];
|
|
140
137
|
if (!e) return t;
|
|
141
138
|
var n = e.call(t), i, o = [], s;
|
|
@@ -152,15 +149,15 @@ function X(t, r) {
|
|
|
152
149
|
}
|
|
153
150
|
return o;
|
|
154
151
|
}
|
|
155
|
-
function
|
|
152
|
+
function K(t, r, e) {
|
|
156
153
|
if (e || arguments.length === 2) for (var n = 0, i = r.length, o; n < i; n++)
|
|
157
154
|
(o || !(n in r)) && (o || (o = Array.prototype.slice.call(r, 0, n)), o[n] = r[n]);
|
|
158
155
|
return t.concat(o || Array.prototype.slice.call(r));
|
|
159
156
|
}
|
|
160
|
-
function
|
|
161
|
-
return this instanceof
|
|
157
|
+
function z(t) {
|
|
158
|
+
return this instanceof z ? (this.v = t, this) : new z(t);
|
|
162
159
|
}
|
|
163
|
-
function
|
|
160
|
+
function je(t, r, e) {
|
|
164
161
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
165
162
|
var n = e.apply(t, r || []), i, o = [];
|
|
166
163
|
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), u("next"), u("throw"), u("return", s), i[Symbol.asyncIterator] = function() {
|
|
@@ -168,13 +165,13 @@ function Ye(t, r, e) {
|
|
|
168
165
|
}, i;
|
|
169
166
|
function s(f) {
|
|
170
167
|
return function(m) {
|
|
171
|
-
return Promise.resolve(m).then(f,
|
|
168
|
+
return Promise.resolve(m).then(f, d);
|
|
172
169
|
};
|
|
173
170
|
}
|
|
174
171
|
function u(f, m) {
|
|
175
172
|
n[f] && (i[f] = function(l) {
|
|
176
|
-
return new Promise(function(
|
|
177
|
-
o.push([f, l,
|
|
173
|
+
return new Promise(function(B, w) {
|
|
174
|
+
o.push([f, l, B, w]) > 1 || a(f, l);
|
|
178
175
|
});
|
|
179
176
|
}, m && (i[f] = m(i[f])));
|
|
180
177
|
}
|
|
@@ -182,26 +179,26 @@ function Ye(t, r, e) {
|
|
|
182
179
|
try {
|
|
183
180
|
c(n[f](m));
|
|
184
181
|
} catch (l) {
|
|
185
|
-
|
|
182
|
+
b(o[0][3], l);
|
|
186
183
|
}
|
|
187
184
|
}
|
|
188
185
|
function c(f) {
|
|
189
|
-
f.value instanceof
|
|
186
|
+
f.value instanceof z ? Promise.resolve(f.value.v).then(h, d) : b(o[0][2], f);
|
|
190
187
|
}
|
|
191
|
-
function
|
|
188
|
+
function h(f) {
|
|
192
189
|
a("next", f);
|
|
193
190
|
}
|
|
194
|
-
function
|
|
191
|
+
function d(f) {
|
|
195
192
|
a("throw", f);
|
|
196
193
|
}
|
|
197
|
-
function
|
|
194
|
+
function b(f, m) {
|
|
198
195
|
f(m), o.shift(), o.length && a(o[0][0], o[0][1]);
|
|
199
196
|
}
|
|
200
197
|
}
|
|
201
|
-
function
|
|
198
|
+
function Ge(t) {
|
|
202
199
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
203
200
|
var r = t[Symbol.asyncIterator], e;
|
|
204
|
-
return r ? r.call(t) : (t = typeof
|
|
201
|
+
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() {
|
|
205
202
|
return this;
|
|
206
203
|
}, e);
|
|
207
204
|
function n(o) {
|
|
@@ -220,13 +217,13 @@ function Qe(t) {
|
|
|
220
217
|
function O(t) {
|
|
221
218
|
return typeof t == "function";
|
|
222
219
|
}
|
|
223
|
-
function
|
|
220
|
+
function he(t) {
|
|
224
221
|
var r = function(n) {
|
|
225
222
|
Error.call(n), n.stack = new Error().stack;
|
|
226
223
|
}, e = t(r);
|
|
227
224
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
228
225
|
}
|
|
229
|
-
var
|
|
226
|
+
var q = he(function(t) {
|
|
230
227
|
return function(e) {
|
|
231
228
|
t(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
232
229
|
` + e.map(function(n, i) {
|
|
@@ -235,13 +232,13 @@ var Y = me(function(t) {
|
|
|
235
232
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
236
233
|
};
|
|
237
234
|
});
|
|
238
|
-
function
|
|
235
|
+
function ne(t, r) {
|
|
239
236
|
if (t) {
|
|
240
237
|
var e = t.indexOf(r);
|
|
241
238
|
0 <= e && t.splice(e, 1);
|
|
242
239
|
}
|
|
243
240
|
}
|
|
244
|
-
var
|
|
241
|
+
var ee = (function() {
|
|
245
242
|
function t(r) {
|
|
246
243
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
247
244
|
}
|
|
@@ -253,7 +250,7 @@ var re = (function() {
|
|
|
253
250
|
if (s)
|
|
254
251
|
if (this._parentage = null, Array.isArray(s))
|
|
255
252
|
try {
|
|
256
|
-
for (var u =
|
|
253
|
+
for (var u = N(s), a = u.next(); !a.done; a = u.next()) {
|
|
257
254
|
var c = a.value;
|
|
258
255
|
c.remove(this);
|
|
259
256
|
}
|
|
@@ -268,43 +265,43 @@ var re = (function() {
|
|
|
268
265
|
}
|
|
269
266
|
else
|
|
270
267
|
s.remove(this);
|
|
271
|
-
var
|
|
272
|
-
if (O(
|
|
268
|
+
var h = this.initialTeardown;
|
|
269
|
+
if (O(h))
|
|
273
270
|
try {
|
|
274
|
-
|
|
271
|
+
h();
|
|
275
272
|
} catch (l) {
|
|
276
|
-
o = l instanceof
|
|
273
|
+
o = l instanceof q ? l.errors : [l];
|
|
277
274
|
}
|
|
278
|
-
var
|
|
279
|
-
if (
|
|
275
|
+
var d = this._finalizers;
|
|
276
|
+
if (d) {
|
|
280
277
|
this._finalizers = null;
|
|
281
278
|
try {
|
|
282
|
-
for (var
|
|
279
|
+
for (var b = N(d), f = b.next(); !f.done; f = b.next()) {
|
|
283
280
|
var m = f.value;
|
|
284
281
|
try {
|
|
285
|
-
|
|
282
|
+
ie(m);
|
|
286
283
|
} catch (l) {
|
|
287
|
-
o = o ?? [], l instanceof
|
|
284
|
+
o = o ?? [], l instanceof q ? o = K(K([], Z(o)), Z(l.errors)) : o.push(l);
|
|
288
285
|
}
|
|
289
286
|
}
|
|
290
287
|
} catch (l) {
|
|
291
288
|
n = { error: l };
|
|
292
289
|
} finally {
|
|
293
290
|
try {
|
|
294
|
-
f && !f.done && (i =
|
|
291
|
+
f && !f.done && (i = b.return) && i.call(b);
|
|
295
292
|
} finally {
|
|
296
293
|
if (n) throw n.error;
|
|
297
294
|
}
|
|
298
295
|
}
|
|
299
296
|
}
|
|
300
297
|
if (o)
|
|
301
|
-
throw new
|
|
298
|
+
throw new q(o);
|
|
302
299
|
}
|
|
303
300
|
}, t.prototype.add = function(r) {
|
|
304
301
|
var e;
|
|
305
302
|
if (r && r !== this)
|
|
306
303
|
if (this.closed)
|
|
307
|
-
|
|
304
|
+
ie(r);
|
|
308
305
|
else {
|
|
309
306
|
if (r instanceof t) {
|
|
310
307
|
if (r.closed || r._hasParent(this))
|
|
@@ -321,53 +318,53 @@ var re = (function() {
|
|
|
321
318
|
this._parentage = Array.isArray(e) ? (e.push(r), e) : e ? [e, r] : r;
|
|
322
319
|
}, t.prototype._removeParent = function(r) {
|
|
323
320
|
var e = this._parentage;
|
|
324
|
-
e === r ? this._parentage = null : Array.isArray(e) &&
|
|
321
|
+
e === r ? this._parentage = null : Array.isArray(e) && ne(e, r);
|
|
325
322
|
}, t.prototype.remove = function(r) {
|
|
326
323
|
var e = this._finalizers;
|
|
327
|
-
e &&
|
|
324
|
+
e && ne(e, r), r instanceof t && r._removeParent(this);
|
|
328
325
|
}, t.EMPTY = (function() {
|
|
329
326
|
var r = new t();
|
|
330
327
|
return r.closed = !0, r;
|
|
331
328
|
})(), t;
|
|
332
329
|
})();
|
|
333
|
-
|
|
334
|
-
function
|
|
335
|
-
return t instanceof
|
|
330
|
+
ee.EMPTY;
|
|
331
|
+
function de(t) {
|
|
332
|
+
return t instanceof ee || t && "closed" in t && O(t.remove) && O(t.add) && O(t.unsubscribe);
|
|
336
333
|
}
|
|
337
|
-
function
|
|
334
|
+
function ie(t) {
|
|
338
335
|
O(t) ? t() : t.unsubscribe();
|
|
339
336
|
}
|
|
340
|
-
var
|
|
337
|
+
var We = {
|
|
341
338
|
Promise: void 0
|
|
342
|
-
},
|
|
339
|
+
}, qe = {
|
|
343
340
|
setTimeout: function(t, r) {
|
|
344
341
|
for (var e = [], n = 2; n < arguments.length; n++)
|
|
345
342
|
e[n - 2] = arguments[n];
|
|
346
|
-
return setTimeout.apply(void 0,
|
|
343
|
+
return setTimeout.apply(void 0, K([t, r], Z(e)));
|
|
347
344
|
},
|
|
348
345
|
clearTimeout: function(t) {
|
|
349
346
|
return clearTimeout(t);
|
|
350
347
|
},
|
|
351
348
|
delegate: void 0
|
|
352
349
|
};
|
|
353
|
-
function
|
|
354
|
-
|
|
350
|
+
function me(t) {
|
|
351
|
+
qe.setTimeout(function() {
|
|
355
352
|
throw t;
|
|
356
353
|
});
|
|
357
354
|
}
|
|
358
|
-
function
|
|
355
|
+
function oe() {
|
|
359
356
|
}
|
|
360
|
-
function
|
|
357
|
+
function Ye(t) {
|
|
361
358
|
t();
|
|
362
359
|
}
|
|
363
|
-
var
|
|
364
|
-
|
|
360
|
+
var te = (function(t) {
|
|
361
|
+
X(r, t);
|
|
365
362
|
function r(e) {
|
|
366
363
|
var n = t.call(this) || this;
|
|
367
|
-
return n.isStopped = !1, e ? (n.destination = e,
|
|
364
|
+
return n.isStopped = !1, e ? (n.destination = e, de(e) && e.add(n)) : n.destination = Ze, n;
|
|
368
365
|
}
|
|
369
366
|
return r.create = function(e, n, i) {
|
|
370
|
-
return new
|
|
367
|
+
return new $(e, n, i);
|
|
371
368
|
}, r.prototype.next = function(e) {
|
|
372
369
|
this.isStopped || this._next(e);
|
|
373
370
|
}, r.prototype.error = function(e) {
|
|
@@ -391,7 +388,7 @@ var ne = (function(t) {
|
|
|
391
388
|
this.unsubscribe();
|
|
392
389
|
}
|
|
393
390
|
}, r;
|
|
394
|
-
})(
|
|
391
|
+
})(ee), Qe = (function() {
|
|
395
392
|
function t(r) {
|
|
396
393
|
this.partialObserver = r;
|
|
397
394
|
}
|
|
@@ -401,7 +398,7 @@ var ne = (function(t) {
|
|
|
401
398
|
try {
|
|
402
399
|
e.next(r);
|
|
403
400
|
} catch (n) {
|
|
404
|
-
|
|
401
|
+
M(n);
|
|
405
402
|
}
|
|
406
403
|
}, t.prototype.error = function(r) {
|
|
407
404
|
var e = this.partialObserver;
|
|
@@ -409,56 +406,56 @@ var ne = (function(t) {
|
|
|
409
406
|
try {
|
|
410
407
|
e.error(r);
|
|
411
408
|
} catch (n) {
|
|
412
|
-
|
|
409
|
+
M(n);
|
|
413
410
|
}
|
|
414
411
|
else
|
|
415
|
-
|
|
412
|
+
M(r);
|
|
416
413
|
}, t.prototype.complete = function() {
|
|
417
414
|
var r = this.partialObserver;
|
|
418
415
|
if (r.complete)
|
|
419
416
|
try {
|
|
420
417
|
r.complete();
|
|
421
418
|
} catch (e) {
|
|
422
|
-
|
|
419
|
+
M(e);
|
|
423
420
|
}
|
|
424
421
|
}, t;
|
|
425
|
-
})(),
|
|
426
|
-
|
|
422
|
+
})(), $ = (function(t) {
|
|
423
|
+
X(r, t);
|
|
427
424
|
function r(e, n, i) {
|
|
428
425
|
var o = t.call(this) || this, s;
|
|
429
426
|
return O(e) || !e ? s = {
|
|
430
427
|
next: e ?? void 0,
|
|
431
428
|
error: n ?? void 0,
|
|
432
429
|
complete: i ?? void 0
|
|
433
|
-
} : s = e, o.destination = new
|
|
430
|
+
} : s = e, o.destination = new Qe(s), o;
|
|
434
431
|
}
|
|
435
432
|
return r;
|
|
436
|
-
})(
|
|
437
|
-
function
|
|
438
|
-
|
|
433
|
+
})(te);
|
|
434
|
+
function M(t) {
|
|
435
|
+
me(t);
|
|
439
436
|
}
|
|
440
|
-
function
|
|
437
|
+
function Je(t) {
|
|
441
438
|
throw t;
|
|
442
439
|
}
|
|
443
|
-
var
|
|
440
|
+
var Ze = {
|
|
444
441
|
closed: !0,
|
|
445
|
-
next:
|
|
446
|
-
error:
|
|
447
|
-
complete:
|
|
448
|
-
},
|
|
442
|
+
next: oe,
|
|
443
|
+
error: Je,
|
|
444
|
+
complete: oe
|
|
445
|
+
}, re = (function() {
|
|
449
446
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
450
447
|
})();
|
|
451
|
-
function
|
|
448
|
+
function ge(t) {
|
|
452
449
|
return t;
|
|
453
450
|
}
|
|
454
|
-
function
|
|
455
|
-
return t.length === 0 ?
|
|
451
|
+
function Ke(t) {
|
|
452
|
+
return t.length === 0 ? ge : t.length === 1 ? t[0] : function(e) {
|
|
456
453
|
return t.reduce(function(n, i) {
|
|
457
454
|
return i(n);
|
|
458
455
|
}, e);
|
|
459
456
|
};
|
|
460
457
|
}
|
|
461
|
-
var
|
|
458
|
+
var _ = (function() {
|
|
462
459
|
function t(r) {
|
|
463
460
|
r && (this._subscribe = r);
|
|
464
461
|
}
|
|
@@ -466,8 +463,8 @@ var P = (function() {
|
|
|
466
463
|
var e = new t();
|
|
467
464
|
return e.source = this, e.operator = r, e;
|
|
468
465
|
}, t.prototype.subscribe = function(r, e, n) {
|
|
469
|
-
var i = this, o =
|
|
470
|
-
return
|
|
466
|
+
var i = this, o = et(r) ? r : new $(r, e, n);
|
|
467
|
+
return Ye(function() {
|
|
471
468
|
var s = i, u = s.operator, a = s.source;
|
|
472
469
|
o.add(u ? u.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
|
|
473
470
|
}), o;
|
|
@@ -479,8 +476,8 @@ var P = (function() {
|
|
|
479
476
|
}
|
|
480
477
|
}, t.prototype.forEach = function(r, e) {
|
|
481
478
|
var n = this;
|
|
482
|
-
return e =
|
|
483
|
-
var s = new
|
|
479
|
+
return e = se(e), new e(function(i, o) {
|
|
480
|
+
var s = new $({
|
|
484
481
|
next: function(u) {
|
|
485
482
|
try {
|
|
486
483
|
r(u);
|
|
@@ -496,15 +493,15 @@ var P = (function() {
|
|
|
496
493
|
}, t.prototype._subscribe = function(r) {
|
|
497
494
|
var e;
|
|
498
495
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(r);
|
|
499
|
-
}, t.prototype[
|
|
496
|
+
}, t.prototype[re] = function() {
|
|
500
497
|
return this;
|
|
501
498
|
}, t.prototype.pipe = function() {
|
|
502
499
|
for (var r = [], e = 0; e < arguments.length; e++)
|
|
503
500
|
r[e] = arguments[e];
|
|
504
|
-
return
|
|
501
|
+
return Ke(r)(this);
|
|
505
502
|
}, t.prototype.toPromise = function(r) {
|
|
506
503
|
var e = this;
|
|
507
|
-
return r =
|
|
504
|
+
return r = se(r), new r(function(n, i) {
|
|
508
505
|
var o;
|
|
509
506
|
e.subscribe(function(s) {
|
|
510
507
|
return o = s;
|
|
@@ -518,22 +515,22 @@ var P = (function() {
|
|
|
518
515
|
return new t(r);
|
|
519
516
|
}, t;
|
|
520
517
|
})();
|
|
521
|
-
function
|
|
518
|
+
function se(t) {
|
|
522
519
|
var r;
|
|
523
|
-
return (r = t ??
|
|
520
|
+
return (r = t ?? We.Promise) !== null && r !== void 0 ? r : Promise;
|
|
524
521
|
}
|
|
525
|
-
function
|
|
522
|
+
function Xe(t) {
|
|
526
523
|
return t && O(t.next) && O(t.error) && O(t.complete);
|
|
527
524
|
}
|
|
528
|
-
function
|
|
529
|
-
return t && t instanceof
|
|
525
|
+
function et(t) {
|
|
526
|
+
return t && t instanceof te || Xe(t) && de(t);
|
|
530
527
|
}
|
|
531
|
-
function
|
|
532
|
-
return O(t
|
|
528
|
+
function tt(t) {
|
|
529
|
+
return O(t?.lift);
|
|
533
530
|
}
|
|
534
|
-
function
|
|
531
|
+
function R(t) {
|
|
535
532
|
return function(r) {
|
|
536
|
-
if (
|
|
533
|
+
if (tt(r))
|
|
537
534
|
return r.lift(function(e) {
|
|
538
535
|
try {
|
|
539
536
|
return t(e, this);
|
|
@@ -544,24 +541,24 @@ function N(t) {
|
|
|
544
541
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
545
542
|
};
|
|
546
543
|
}
|
|
547
|
-
function
|
|
548
|
-
return new
|
|
544
|
+
function L(t, r, e, n, i) {
|
|
545
|
+
return new rt(t, r, e, n, i);
|
|
549
546
|
}
|
|
550
|
-
var
|
|
551
|
-
|
|
547
|
+
var rt = (function(t) {
|
|
548
|
+
X(r, t);
|
|
552
549
|
function r(e, n, i, o, s, u) {
|
|
553
550
|
var a = t.call(this, e) || this;
|
|
554
551
|
return a.onFinalize = s, a.shouldUnsubscribe = u, a._next = n ? function(c) {
|
|
555
552
|
try {
|
|
556
553
|
n(c);
|
|
557
|
-
} catch (
|
|
558
|
-
e.error(
|
|
554
|
+
} catch (h) {
|
|
555
|
+
e.error(h);
|
|
559
556
|
}
|
|
560
557
|
} : t.prototype._next, a._error = o ? function(c) {
|
|
561
558
|
try {
|
|
562
559
|
o(c);
|
|
563
|
-
} catch (
|
|
564
|
-
e.error(
|
|
560
|
+
} catch (h) {
|
|
561
|
+
e.error(h);
|
|
565
562
|
} finally {
|
|
566
563
|
this.unsubscribe();
|
|
567
564
|
}
|
|
@@ -582,60 +579,60 @@ var st = (function(t) {
|
|
|
582
579
|
t.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
583
580
|
}
|
|
584
581
|
}, r;
|
|
585
|
-
})(
|
|
582
|
+
})(te), nt = new _(function(t) {
|
|
586
583
|
return t.complete();
|
|
587
584
|
});
|
|
588
|
-
function
|
|
585
|
+
function it(t) {
|
|
589
586
|
return t && O(t.schedule);
|
|
590
587
|
}
|
|
591
|
-
function
|
|
588
|
+
function ye(t) {
|
|
592
589
|
return t[t.length - 1];
|
|
593
590
|
}
|
|
594
|
-
function
|
|
595
|
-
return
|
|
591
|
+
function ot(t) {
|
|
592
|
+
return it(ye(t)) ? t.pop() : void 0;
|
|
596
593
|
}
|
|
597
|
-
function
|
|
598
|
-
return typeof
|
|
594
|
+
function st(t, r) {
|
|
595
|
+
return typeof ye(t) == "number" ? t.pop() : r;
|
|
599
596
|
}
|
|
600
|
-
var
|
|
597
|
+
var be = (function(t) {
|
|
601
598
|
return t && typeof t.length == "number" && typeof t != "function";
|
|
602
599
|
});
|
|
603
|
-
function
|
|
604
|
-
return O(t
|
|
600
|
+
function pe(t) {
|
|
601
|
+
return O(t?.then);
|
|
605
602
|
}
|
|
606
|
-
function
|
|
607
|
-
return O(t[
|
|
603
|
+
function we(t) {
|
|
604
|
+
return O(t[re]);
|
|
608
605
|
}
|
|
609
|
-
function
|
|
610
|
-
return Symbol.asyncIterator && O(t
|
|
606
|
+
function ve(t) {
|
|
607
|
+
return Symbol.asyncIterator && O(t?.[Symbol.asyncIterator]);
|
|
611
608
|
}
|
|
612
|
-
function
|
|
609
|
+
function Se(t) {
|
|
613
610
|
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.");
|
|
614
611
|
}
|
|
615
|
-
function
|
|
612
|
+
function ct() {
|
|
616
613
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
617
614
|
}
|
|
618
|
-
var
|
|
619
|
-
function
|
|
620
|
-
return O(t
|
|
615
|
+
var xe = ct();
|
|
616
|
+
function Ie(t) {
|
|
617
|
+
return O(t?.[xe]);
|
|
621
618
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
619
|
+
function Be(t) {
|
|
620
|
+
return je(this, arguments, function() {
|
|
624
621
|
var e, n, i, o;
|
|
625
|
-
return
|
|
622
|
+
return le(this, function(s) {
|
|
626
623
|
switch (s.label) {
|
|
627
624
|
case 0:
|
|
628
625
|
e = t.getReader(), s.label = 1;
|
|
629
626
|
case 1:
|
|
630
627
|
s.trys.push([1, , 9, 10]), s.label = 2;
|
|
631
628
|
case 2:
|
|
632
|
-
return [4,
|
|
629
|
+
return [4, z(e.read())];
|
|
633
630
|
case 3:
|
|
634
|
-
return n = s.sent(), i = n.value, o = n.done, o ? [4,
|
|
631
|
+
return n = s.sent(), i = n.value, o = n.done, o ? [4, z(void 0)] : [3, 5];
|
|
635
632
|
case 4:
|
|
636
633
|
return [2, s.sent()];
|
|
637
634
|
case 5:
|
|
638
|
-
return [4,
|
|
635
|
+
return [4, z(i)];
|
|
639
636
|
case 6:
|
|
640
637
|
return [4, s.sent()];
|
|
641
638
|
case 7:
|
|
@@ -650,57 +647,57 @@ function Oe(t) {
|
|
|
650
647
|
});
|
|
651
648
|
});
|
|
652
649
|
}
|
|
653
|
-
function
|
|
654
|
-
return O(t
|
|
650
|
+
function Ue(t) {
|
|
651
|
+
return O(t?.getReader);
|
|
655
652
|
}
|
|
656
|
-
function
|
|
657
|
-
if (t instanceof
|
|
653
|
+
function D(t) {
|
|
654
|
+
if (t instanceof _)
|
|
658
655
|
return t;
|
|
659
656
|
if (t != null) {
|
|
660
|
-
if (Se(t))
|
|
661
|
-
return ht(t);
|
|
662
657
|
if (we(t))
|
|
663
|
-
return
|
|
658
|
+
return at(t);
|
|
659
|
+
if (be(t))
|
|
660
|
+
return ut(t);
|
|
661
|
+
if (pe(t))
|
|
662
|
+
return ft(t);
|
|
664
663
|
if (ve(t))
|
|
665
|
-
return
|
|
666
|
-
if (
|
|
667
|
-
return
|
|
664
|
+
return Oe(t);
|
|
665
|
+
if (Ie(t))
|
|
666
|
+
return lt(t);
|
|
668
667
|
if (Ue(t))
|
|
669
|
-
return
|
|
670
|
-
if (ke(t))
|
|
671
|
-
return yt(t);
|
|
668
|
+
return ht(t);
|
|
672
669
|
}
|
|
673
|
-
throw
|
|
670
|
+
throw Se(t);
|
|
674
671
|
}
|
|
675
|
-
function
|
|
676
|
-
return new
|
|
677
|
-
var e = t[
|
|
672
|
+
function at(t) {
|
|
673
|
+
return new _(function(r) {
|
|
674
|
+
var e = t[re]();
|
|
678
675
|
if (O(e.subscribe))
|
|
679
676
|
return e.subscribe(r);
|
|
680
677
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
681
678
|
});
|
|
682
679
|
}
|
|
683
|
-
function
|
|
684
|
-
return new
|
|
680
|
+
function ut(t) {
|
|
681
|
+
return new _(function(r) {
|
|
685
682
|
for (var e = 0; e < t.length && !r.closed; e++)
|
|
686
683
|
r.next(t[e]);
|
|
687
684
|
r.complete();
|
|
688
685
|
});
|
|
689
686
|
}
|
|
690
|
-
function
|
|
691
|
-
return new
|
|
687
|
+
function ft(t) {
|
|
688
|
+
return new _(function(r) {
|
|
692
689
|
t.then(function(e) {
|
|
693
690
|
r.closed || (r.next(e), r.complete());
|
|
694
691
|
}, function(e) {
|
|
695
692
|
return r.error(e);
|
|
696
|
-
}).then(null,
|
|
693
|
+
}).then(null, me);
|
|
697
694
|
});
|
|
698
695
|
}
|
|
699
|
-
function
|
|
700
|
-
return new
|
|
696
|
+
function lt(t) {
|
|
697
|
+
return new _(function(r) {
|
|
701
698
|
var e, n;
|
|
702
699
|
try {
|
|
703
|
-
for (var i =
|
|
700
|
+
for (var i = N(t), o = i.next(); !o.done; o = i.next()) {
|
|
704
701
|
var s = o.value;
|
|
705
702
|
if (r.next(s), r.closed)
|
|
706
703
|
return;
|
|
@@ -717,24 +714,24 @@ function gt(t) {
|
|
|
717
714
|
r.complete();
|
|
718
715
|
});
|
|
719
716
|
}
|
|
720
|
-
function
|
|
721
|
-
return new
|
|
722
|
-
|
|
717
|
+
function Oe(t) {
|
|
718
|
+
return new _(function(r) {
|
|
719
|
+
dt(t, r).catch(function(e) {
|
|
723
720
|
return r.error(e);
|
|
724
721
|
});
|
|
725
722
|
});
|
|
726
723
|
}
|
|
727
|
-
function
|
|
728
|
-
return
|
|
724
|
+
function ht(t) {
|
|
725
|
+
return Oe(Be(t));
|
|
729
726
|
}
|
|
730
|
-
function
|
|
727
|
+
function dt(t, r) {
|
|
731
728
|
var e, n, i, o;
|
|
732
|
-
return
|
|
729
|
+
return $e(this, void 0, void 0, function() {
|
|
733
730
|
var s, u;
|
|
734
|
-
return
|
|
731
|
+
return le(this, function(a) {
|
|
735
732
|
switch (a.label) {
|
|
736
733
|
case 0:
|
|
737
|
-
a.trys.push([0, 5, 6, 11]), e =
|
|
734
|
+
a.trys.push([0, 5, 6, 11]), e = Ge(t), a.label = 1;
|
|
738
735
|
case 1:
|
|
739
736
|
return [4, e.next()];
|
|
740
737
|
case 2:
|
|
@@ -765,7 +762,7 @@ function bt(t, r) {
|
|
|
765
762
|
});
|
|
766
763
|
});
|
|
767
764
|
}
|
|
768
|
-
function
|
|
765
|
+
function V(t, r, e, n, i) {
|
|
769
766
|
n === void 0 && (n = 0), i === void 0 && (i = !1);
|
|
770
767
|
var o = r.schedule(function() {
|
|
771
768
|
e(), i ? t.add(this.schedule(null, n)) : this.unsubscribe();
|
|
@@ -773,49 +770,49 @@ function z(t, r, e, n, i) {
|
|
|
773
770
|
if (t.add(o), !i)
|
|
774
771
|
return o;
|
|
775
772
|
}
|
|
776
|
-
function
|
|
777
|
-
return r === void 0 && (r = 0),
|
|
778
|
-
e.subscribe(
|
|
779
|
-
return
|
|
773
|
+
function ke(t, r) {
|
|
774
|
+
return r === void 0 && (r = 0), R(function(e, n) {
|
|
775
|
+
e.subscribe(L(n, function(i) {
|
|
776
|
+
return V(n, t, function() {
|
|
780
777
|
return n.next(i);
|
|
781
778
|
}, r);
|
|
782
779
|
}, function() {
|
|
783
|
-
return
|
|
780
|
+
return V(n, t, function() {
|
|
784
781
|
return n.complete();
|
|
785
782
|
}, r);
|
|
786
783
|
}, function(i) {
|
|
787
|
-
return
|
|
784
|
+
return V(n, t, function() {
|
|
788
785
|
return n.error(i);
|
|
789
786
|
}, r);
|
|
790
787
|
}));
|
|
791
788
|
});
|
|
792
789
|
}
|
|
793
|
-
function
|
|
794
|
-
return r === void 0 && (r = 0),
|
|
790
|
+
function Ee(t, r) {
|
|
791
|
+
return r === void 0 && (r = 0), R(function(e, n) {
|
|
795
792
|
n.add(t.schedule(function() {
|
|
796
793
|
return e.subscribe(n);
|
|
797
794
|
}, r));
|
|
798
795
|
});
|
|
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
|
|
800
|
+
function gt(t, r) {
|
|
801
|
+
return D(t).pipe(Ee(r), ke(r));
|
|
805
802
|
}
|
|
806
|
-
function
|
|
807
|
-
return new
|
|
803
|
+
function yt(t, r) {
|
|
804
|
+
return new _(function(e) {
|
|
808
805
|
var n = 0;
|
|
809
806
|
return r.schedule(function() {
|
|
810
807
|
n === t.length ? e.complete() : (e.next(t[n++]), e.closed || this.schedule());
|
|
811
808
|
});
|
|
812
809
|
});
|
|
813
810
|
}
|
|
814
|
-
function
|
|
815
|
-
return new
|
|
811
|
+
function bt(t, r) {
|
|
812
|
+
return new _(function(e) {
|
|
816
813
|
var n;
|
|
817
|
-
return
|
|
818
|
-
n = t[
|
|
814
|
+
return V(e, r, function() {
|
|
815
|
+
n = t[xe](), V(e, r, function() {
|
|
819
816
|
var i, o, s;
|
|
820
817
|
try {
|
|
821
818
|
i = n.next(), o = i.value, s = i.done;
|
|
@@ -826,17 +823,17 @@ function St(t, r) {
|
|
|
826
823
|
s ? e.complete() : e.next(o);
|
|
827
824
|
}, 0, !0);
|
|
828
825
|
}), function() {
|
|
829
|
-
return O(n
|
|
826
|
+
return O(n?.return) && n.return();
|
|
830
827
|
};
|
|
831
828
|
});
|
|
832
829
|
}
|
|
833
|
-
function
|
|
830
|
+
function Te(t, r) {
|
|
834
831
|
if (!t)
|
|
835
832
|
throw new Error("Iterable cannot be null");
|
|
836
|
-
return new
|
|
837
|
-
|
|
833
|
+
return new _(function(e) {
|
|
834
|
+
V(e, r, function() {
|
|
838
835
|
var n = t[Symbol.asyncIterator]();
|
|
839
|
-
|
|
836
|
+
V(e, r, function() {
|
|
840
837
|
n.next().then(function(i) {
|
|
841
838
|
i.done ? e.complete() : e.next(i.value);
|
|
842
839
|
});
|
|
@@ -844,132 +841,132 @@ function Ce(t, r) {
|
|
|
844
841
|
});
|
|
845
842
|
});
|
|
846
843
|
}
|
|
847
|
-
function
|
|
848
|
-
return
|
|
844
|
+
function pt(t, r) {
|
|
845
|
+
return Te(Be(t), r);
|
|
849
846
|
}
|
|
850
|
-
function
|
|
847
|
+
function wt(t, r) {
|
|
851
848
|
if (t != null) {
|
|
852
|
-
if (Se(t))
|
|
853
|
-
return pt(t, r);
|
|
854
849
|
if (we(t))
|
|
855
|
-
return
|
|
850
|
+
return mt(t, r);
|
|
851
|
+
if (be(t))
|
|
852
|
+
return yt(t, r);
|
|
853
|
+
if (pe(t))
|
|
854
|
+
return gt(t, r);
|
|
856
855
|
if (ve(t))
|
|
857
|
-
return
|
|
858
|
-
if (
|
|
859
|
-
return
|
|
856
|
+
return Te(t, r);
|
|
857
|
+
if (Ie(t))
|
|
858
|
+
return bt(t, r);
|
|
860
859
|
if (Ue(t))
|
|
861
|
-
return
|
|
862
|
-
if (ke(t))
|
|
863
|
-
return xt(t, r);
|
|
860
|
+
return pt(t, r);
|
|
864
861
|
}
|
|
865
|
-
throw
|
|
862
|
+
throw Se(t);
|
|
866
863
|
}
|
|
867
|
-
function
|
|
868
|
-
return r ?
|
|
864
|
+
function vt(t, r) {
|
|
865
|
+
return r ? wt(t, r) : D(t);
|
|
869
866
|
}
|
|
870
|
-
var
|
|
867
|
+
var St = he(function(t) {
|
|
871
868
|
return function() {
|
|
872
869
|
t(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
873
870
|
};
|
|
874
871
|
});
|
|
875
|
-
function
|
|
872
|
+
function _e(t, r) {
|
|
876
873
|
return new Promise(function(e, n) {
|
|
877
|
-
var i = new
|
|
874
|
+
var i = new $({
|
|
878
875
|
next: function(o) {
|
|
879
876
|
e(o), i.unsubscribe();
|
|
880
877
|
},
|
|
881
878
|
error: n,
|
|
882
879
|
complete: function() {
|
|
883
|
-
n(new
|
|
880
|
+
n(new St());
|
|
884
881
|
}
|
|
885
882
|
});
|
|
886
883
|
t.subscribe(i);
|
|
887
884
|
});
|
|
888
885
|
}
|
|
889
|
-
function
|
|
890
|
-
return
|
|
886
|
+
function Ce(t, r) {
|
|
887
|
+
return R(function(e, n) {
|
|
891
888
|
var i = 0;
|
|
892
|
-
e.subscribe(
|
|
889
|
+
e.subscribe(L(n, function(o) {
|
|
893
890
|
n.next(t.call(r, o, i++));
|
|
894
891
|
}));
|
|
895
892
|
});
|
|
896
893
|
}
|
|
897
|
-
function
|
|
898
|
-
var a = [], c = 0,
|
|
899
|
-
|
|
894
|
+
function xt(t, r, e, n, i, o, s, u) {
|
|
895
|
+
var a = [], c = 0, h = 0, d = !1, b = function() {
|
|
896
|
+
d && !a.length && !c && r.complete();
|
|
900
897
|
}, f = function(l) {
|
|
901
898
|
return c < n ? m(l) : a.push(l);
|
|
902
899
|
}, m = function(l) {
|
|
903
900
|
c++;
|
|
904
|
-
var
|
|
905
|
-
|
|
906
|
-
r.next(
|
|
901
|
+
var B = !1;
|
|
902
|
+
D(e(l, h++)).subscribe(L(r, function(w) {
|
|
903
|
+
r.next(w);
|
|
907
904
|
}, function() {
|
|
908
|
-
|
|
905
|
+
B = !0;
|
|
909
906
|
}, void 0, function() {
|
|
910
|
-
if (
|
|
907
|
+
if (B)
|
|
911
908
|
try {
|
|
912
909
|
c--;
|
|
913
|
-
for (var
|
|
910
|
+
for (var w = function() {
|
|
914
911
|
var S = a.shift();
|
|
915
912
|
s || m(S);
|
|
916
913
|
}; a.length && c < n; )
|
|
917
|
-
|
|
918
|
-
|
|
914
|
+
w();
|
|
915
|
+
b();
|
|
919
916
|
} catch (S) {
|
|
920
917
|
r.error(S);
|
|
921
918
|
}
|
|
922
919
|
}));
|
|
923
920
|
};
|
|
924
|
-
return t.subscribe(
|
|
925
|
-
|
|
921
|
+
return t.subscribe(L(r, f, function() {
|
|
922
|
+
d = !0, b();
|
|
926
923
|
})), function() {
|
|
927
924
|
};
|
|
928
925
|
}
|
|
929
|
-
function
|
|
930
|
-
return e === void 0 && (e = 1 / 0), O(r) ?
|
|
931
|
-
return
|
|
926
|
+
function Pe(t, r, e) {
|
|
927
|
+
return e === void 0 && (e = 1 / 0), O(r) ? Pe(function(n, i) {
|
|
928
|
+
return Ce(function(o, s) {
|
|
932
929
|
return r(n, o, i, s);
|
|
933
|
-
})(
|
|
934
|
-
}, e) : (typeof r == "number" && (e = r),
|
|
935
|
-
return
|
|
930
|
+
})(D(t(n, i)));
|
|
931
|
+
}, e) : (typeof r == "number" && (e = r), R(function(n, i) {
|
|
932
|
+
return xt(n, i, t, e);
|
|
936
933
|
}));
|
|
937
934
|
}
|
|
938
|
-
function
|
|
939
|
-
return t === void 0 && (t = 1 / 0),
|
|
935
|
+
function It(t) {
|
|
936
|
+
return t === void 0 && (t = 1 / 0), Pe(ge, t);
|
|
940
937
|
}
|
|
941
|
-
function
|
|
938
|
+
function Bt() {
|
|
942
939
|
for (var t = [], r = 0; r < arguments.length; r++)
|
|
943
940
|
t[r] = arguments[r];
|
|
944
|
-
var e =
|
|
945
|
-
return i.length ? i.length === 1 ?
|
|
941
|
+
var e = ot(t), n = st(t, 1 / 0), i = t;
|
|
942
|
+
return i.length ? i.length === 1 ? D(i[0]) : It(n)(vt(i, e)) : nt;
|
|
946
943
|
}
|
|
947
|
-
function
|
|
944
|
+
function Ut(t, r, e, n, i) {
|
|
948
945
|
return function(o, s) {
|
|
949
946
|
var u = e, a = r, c = 0;
|
|
950
|
-
o.subscribe(
|
|
951
|
-
var
|
|
952
|
-
a = u ? t(a,
|
|
947
|
+
o.subscribe(L(s, function(h) {
|
|
948
|
+
var d = c++;
|
|
949
|
+
a = u ? t(a, h, d) : (u = !0, h);
|
|
953
950
|
}, (function() {
|
|
954
951
|
u && s.next(a), s.complete();
|
|
955
952
|
})));
|
|
956
953
|
};
|
|
957
954
|
}
|
|
958
|
-
function
|
|
959
|
-
return
|
|
955
|
+
function Ve(t, r) {
|
|
956
|
+
return R(Ut(t, r, arguments.length >= 2, !1, !0));
|
|
960
957
|
}
|
|
961
|
-
var
|
|
958
|
+
var Ot = function(t, r) {
|
|
962
959
|
return t.push(r), t;
|
|
963
960
|
};
|
|
964
|
-
function
|
|
965
|
-
return
|
|
966
|
-
|
|
961
|
+
function kt() {
|
|
962
|
+
return R(function(t, r) {
|
|
963
|
+
Ve(Ot, [])(t).subscribe(r);
|
|
967
964
|
});
|
|
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__ */ Le(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(kt()))).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(Bt(...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
|
};
|