@byloth/core 2.0.0-rc.6 → 2.0.0-rc.8
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/core.js +802 -591
- package/dist/core.js.map +1 -1
- package/dist/core.umd.cjs +2 -2
- package/dist/core.umd.cjs.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +9 -3
- package/src/models/callbacks/callable-object.ts +23 -0
- package/src/models/callbacks/index.ts +5 -0
- package/src/models/callbacks/publisher.ts +45 -0
- package/src/models/callbacks/switchable-callback.ts +104 -0
- package/src/models/callbacks/types.ts +1 -0
- package/src/models/index.ts +3 -4
- package/src/models/json/types.ts +2 -4
- package/src/models/promises/index.ts +2 -1
- package/src/models/promises/long-running-task.ts +294 -0
- package/src/models/promises/types.ts +2 -0
- package/src/models/timers/clock.ts +18 -15
- package/src/models/timers/countdown.ts +20 -20
- package/src/models/types.ts +3 -1
- package/src/utils/async.ts +7 -2
- package/src/utils/index.ts +1 -1
- package/src/models/publisher.ts +0 -39
package/dist/core.js
CHANGED
|
@@ -1,146 +1,146 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var a = (i, t, e) =>
|
|
4
|
-
const
|
|
5
|
-
var
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
var
|
|
10
|
-
class
|
|
11
|
-
constructor(e, n,
|
|
1
|
+
var Ne = Object.defineProperty;
|
|
2
|
+
var Ye = (i, t, e) => t in i ? Ne(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var a = (i, t, e) => Ye(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
const Oe = typeof window < "u" && typeof window.document < "u";
|
|
5
|
+
var O;
|
|
6
|
+
const Qe = typeof process < "u" && ((O = process.versions) == null ? void 0 : O.node);
|
|
7
|
+
var A;
|
|
8
|
+
const Xe = typeof self == "object" && ((A = self.constructor) == null ? void 0 : A.name) === "DedicatedWorkerGlobalScope";
|
|
9
|
+
var $, q;
|
|
10
|
+
class f extends (q = Error, $ = Symbol.toStringTag, q) {
|
|
11
|
+
constructor(e, n, s = "Exception") {
|
|
12
12
|
super(e);
|
|
13
|
-
a(this,
|
|
14
|
-
this.cause = n, this.name =
|
|
13
|
+
a(this, $, "Exception");
|
|
14
|
+
this.cause = n, this.name = s, n && (n instanceof Error ? this.stack += `
|
|
15
15
|
|
|
16
16
|
Caused by ${n.stack}` : this.stack += `
|
|
17
17
|
|
|
18
18
|
Caused by ${n}`);
|
|
19
19
|
}
|
|
20
20
|
static FromUnknown(e) {
|
|
21
|
-
if (e instanceof
|
|
21
|
+
if (e instanceof f)
|
|
22
22
|
return e;
|
|
23
23
|
if (e instanceof Error) {
|
|
24
|
-
const n = new
|
|
24
|
+
const n = new f(e.message);
|
|
25
25
|
return n.stack = e.stack, n.name = e.name, n;
|
|
26
26
|
}
|
|
27
|
-
return new
|
|
27
|
+
return new f(`${e}`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
var
|
|
31
|
-
class
|
|
32
|
-
constructor(e, n,
|
|
30
|
+
var N, Y;
|
|
31
|
+
class k extends (Y = f, N = Symbol.toStringTag, Y) {
|
|
32
|
+
constructor(e, n, s = "FatalErrorException") {
|
|
33
33
|
e === void 0 && (e = "The program has encountered an unrecoverable error and cannot continue as expected. Please, try again later. If the problem persists, contact the support team.");
|
|
34
|
-
super(e, n,
|
|
35
|
-
a(this,
|
|
34
|
+
super(e, n, s);
|
|
35
|
+
a(this, N, "FatalErrorException");
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
var
|
|
39
|
-
class
|
|
40
|
-
constructor(e, n,
|
|
38
|
+
var z, J;
|
|
39
|
+
class ze extends (J = k, z = Symbol.toStringTag, J) {
|
|
40
|
+
constructor(e, n, s = "NotImplementedException") {
|
|
41
41
|
e === void 0 && (e = "This feature is not implemented yet. Please, try again later.");
|
|
42
|
-
super(e, n,
|
|
43
|
-
a(this,
|
|
42
|
+
super(e, n, s);
|
|
43
|
+
a(this, z, "NotImplementedException");
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
class
|
|
48
|
-
constructor(e, n,
|
|
49
|
-
super(e, n,
|
|
50
|
-
a(this,
|
|
46
|
+
var V, W;
|
|
47
|
+
class Ae extends (W = f, V = Symbol.toStringTag, W) {
|
|
48
|
+
constructor(e, n, s = "FileException") {
|
|
49
|
+
super(e, n, s);
|
|
50
|
+
a(this, V, "FileException");
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
var
|
|
54
|
-
class
|
|
55
|
-
constructor(e, n,
|
|
56
|
-
super(e, n,
|
|
57
|
-
a(this,
|
|
53
|
+
var B, G;
|
|
54
|
+
class Ze extends (G = Ae, B = Symbol.toStringTag, G) {
|
|
55
|
+
constructor(e, n, s = "FileExistsException") {
|
|
56
|
+
super(e, n, s);
|
|
57
|
+
a(this, B, "FileExistsException");
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
var
|
|
61
|
-
class
|
|
62
|
-
constructor(e, n,
|
|
63
|
-
super(e, n,
|
|
64
|
-
a(this,
|
|
60
|
+
var K, L;
|
|
61
|
+
class Ue extends (L = Ae, K = Symbol.toStringTag, L) {
|
|
62
|
+
constructor(e, n, s = "FileNotFoundException") {
|
|
63
|
+
super(e, n, s);
|
|
64
|
+
a(this, K, "FileNotFoundException");
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
var
|
|
68
|
-
class
|
|
69
|
-
constructor(e, n,
|
|
70
|
-
super(e, n,
|
|
71
|
-
a(this,
|
|
67
|
+
var H, Q;
|
|
68
|
+
class x extends (Q = f, H = Symbol.toStringTag, Q) {
|
|
69
|
+
constructor(e, n, s = "KeyException") {
|
|
70
|
+
super(e, n, s);
|
|
71
|
+
a(this, H, "KeyException");
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var
|
|
75
|
-
class
|
|
76
|
-
constructor(e, n,
|
|
77
|
-
super(e, n,
|
|
78
|
-
a(this,
|
|
74
|
+
var X, Z;
|
|
75
|
+
class et extends (Z = f, X = Symbol.toStringTag, Z) {
|
|
76
|
+
constructor(e, n, s = "NetworkException") {
|
|
77
|
+
super(e, n, s);
|
|
78
|
+
a(this, X, "NetworkException");
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
var
|
|
82
|
-
class
|
|
83
|
-
constructor(e, n,
|
|
84
|
-
super(e, n,
|
|
85
|
-
a(this,
|
|
81
|
+
var U, ee;
|
|
82
|
+
class tt extends (ee = f, U = Symbol.toStringTag, ee) {
|
|
83
|
+
constructor(e, n, s = "PermissionException") {
|
|
84
|
+
super(e, n, s);
|
|
85
|
+
a(this, U, "PermissionException");
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
var
|
|
89
|
-
class
|
|
90
|
-
constructor(e, n,
|
|
91
|
-
super(e, n,
|
|
92
|
-
a(this,
|
|
88
|
+
var te, ne;
|
|
89
|
+
class Je extends (ne = f, te = Symbol.toStringTag, ne) {
|
|
90
|
+
constructor(e, n, s = "ReferenceException") {
|
|
91
|
+
super(e, n, s);
|
|
92
|
+
a(this, te, "ReferenceException");
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
var
|
|
96
|
-
class
|
|
97
|
-
constructor(e, n,
|
|
98
|
-
super(e, n,
|
|
99
|
-
a(this,
|
|
95
|
+
var se, re;
|
|
96
|
+
class m extends (re = f, se = Symbol.toStringTag, re) {
|
|
97
|
+
constructor(e, n, s = "RuntimeException") {
|
|
98
|
+
super(e, n, s);
|
|
99
|
+
a(this, se, "RuntimeException");
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
var
|
|
103
|
-
class
|
|
104
|
-
constructor(e, n,
|
|
105
|
-
super(e, n,
|
|
106
|
-
a(this,
|
|
102
|
+
var ie, oe;
|
|
103
|
+
class Ve extends (oe = m, ie = Symbol.toStringTag, oe) {
|
|
104
|
+
constructor(e, n, s = "EnvironmentException") {
|
|
105
|
+
super(e, n, s);
|
|
106
|
+
a(this, ie, "EnvironmentException");
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
var
|
|
110
|
-
class
|
|
111
|
-
constructor(e, n,
|
|
112
|
-
super(e, n,
|
|
113
|
-
a(this,
|
|
109
|
+
var ae, le;
|
|
110
|
+
class We extends (le = f, ae = Symbol.toStringTag, le) {
|
|
111
|
+
constructor(e, n, s = "TimeoutException") {
|
|
112
|
+
super(e, n, s);
|
|
113
|
+
a(this, ae, "TimeoutException");
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
var
|
|
117
|
-
class
|
|
118
|
-
constructor(e, n,
|
|
119
|
-
super(e, n,
|
|
120
|
-
a(this,
|
|
116
|
+
var ue, ce;
|
|
117
|
+
class nt extends (ce = f, ue = Symbol.toStringTag, ce) {
|
|
118
|
+
constructor(e, n, s = "TypeException") {
|
|
119
|
+
super(e, n, s);
|
|
120
|
+
a(this, ue, "TypeException");
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var
|
|
124
|
-
class
|
|
125
|
-
constructor(e, n,
|
|
126
|
-
super(e, n,
|
|
127
|
-
a(this,
|
|
123
|
+
var he, fe;
|
|
124
|
+
class p extends (fe = f, he = Symbol.toStringTag, fe) {
|
|
125
|
+
constructor(e, n, s = "ValueException") {
|
|
126
|
+
super(e, n, s);
|
|
127
|
+
a(this, he, "ValueException");
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
var
|
|
131
|
-
class
|
|
132
|
-
constructor(e, n,
|
|
133
|
-
super(e, n,
|
|
134
|
-
a(this,
|
|
130
|
+
var de, me;
|
|
131
|
+
class $e extends (me = p, de = Symbol.toStringTag, me) {
|
|
132
|
+
constructor(e, n, s = "RangeException") {
|
|
133
|
+
super(e, n, s);
|
|
134
|
+
a(this, de, "RangeException");
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
var
|
|
138
|
-
class
|
|
137
|
+
var _e;
|
|
138
|
+
class c {
|
|
139
139
|
constructor(t) {
|
|
140
140
|
a(this, "_iterator");
|
|
141
141
|
a(this, "return");
|
|
142
142
|
a(this, "throw");
|
|
143
|
-
a(this,
|
|
143
|
+
a(this, _e, "SmartIterator");
|
|
144
144
|
t instanceof Function ? this._iterator = t() : Symbol.iterator in t ? this._iterator = t[Symbol.iterator]() : this._iterator = t, this._iterator.return && (this.return = (e) => this._iterator.return(e)), this._iterator.throw && (this.throw = (e) => this._iterator.throw(e));
|
|
145
145
|
}
|
|
146
146
|
every(t) {
|
|
@@ -167,53 +167,53 @@ class u {
|
|
|
167
167
|
}
|
|
168
168
|
filter(t) {
|
|
169
169
|
const e = this._iterator;
|
|
170
|
-
return new
|
|
170
|
+
return new c(function* () {
|
|
171
171
|
let n = 0;
|
|
172
172
|
for (; ; ) {
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
return
|
|
176
|
-
t(
|
|
173
|
+
const s = e.next();
|
|
174
|
+
if (s.done)
|
|
175
|
+
return s.value;
|
|
176
|
+
t(s.value, n) && (yield s.value), n += 1;
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
map(t) {
|
|
181
181
|
const e = this._iterator;
|
|
182
|
-
return new
|
|
182
|
+
return new c(function* () {
|
|
183
183
|
let n = 0;
|
|
184
184
|
for (; ; ) {
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
return
|
|
188
|
-
yield t(
|
|
185
|
+
const s = e.next();
|
|
186
|
+
if (s.done)
|
|
187
|
+
return s.value;
|
|
188
|
+
yield t(s.value, n), n += 1;
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
reduce(t, e) {
|
|
193
|
-
let n = 0,
|
|
194
|
-
if (
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
throw new
|
|
198
|
-
|
|
193
|
+
let n = 0, s = e;
|
|
194
|
+
if (s === void 0) {
|
|
195
|
+
const r = this._iterator.next();
|
|
196
|
+
if (r.done)
|
|
197
|
+
throw new p("Cannot reduce an empty iterator without an initial value.");
|
|
198
|
+
s = r.value, n += 1;
|
|
199
199
|
}
|
|
200
200
|
for (; ; ) {
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
203
|
-
return
|
|
204
|
-
|
|
201
|
+
const r = this._iterator.next();
|
|
202
|
+
if (r.done)
|
|
203
|
+
return s;
|
|
204
|
+
s = t(s, r.value, n), n += 1;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
flatMap(t) {
|
|
208
208
|
const e = this._iterator;
|
|
209
|
-
return new
|
|
209
|
+
return new c(function* () {
|
|
210
210
|
let n = 0;
|
|
211
211
|
for (; ; ) {
|
|
212
|
-
const
|
|
213
|
-
if (
|
|
214
|
-
return
|
|
215
|
-
const
|
|
216
|
-
for (const o of
|
|
212
|
+
const s = e.next();
|
|
213
|
+
if (s.done)
|
|
214
|
+
return s.value;
|
|
215
|
+
const r = t(s.value, n);
|
|
216
|
+
for (const o of r)
|
|
217
217
|
yield o;
|
|
218
218
|
n += 1;
|
|
219
219
|
}
|
|
@@ -221,7 +221,7 @@ class u {
|
|
|
221
221
|
}
|
|
222
222
|
drop(t) {
|
|
223
223
|
const e = this._iterator;
|
|
224
|
-
return new
|
|
224
|
+
return new c(function* () {
|
|
225
225
|
let n = 0;
|
|
226
226
|
for (; n < t; ) {
|
|
227
227
|
if (e.next().done)
|
|
@@ -229,22 +229,22 @@ class u {
|
|
|
229
229
|
n += 1;
|
|
230
230
|
}
|
|
231
231
|
for (; ; ) {
|
|
232
|
-
const
|
|
233
|
-
if (
|
|
234
|
-
return
|
|
235
|
-
yield
|
|
232
|
+
const s = e.next();
|
|
233
|
+
if (s.done)
|
|
234
|
+
return s.value;
|
|
235
|
+
yield s.value;
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
take(t) {
|
|
240
240
|
const e = this._iterator;
|
|
241
|
-
return new
|
|
241
|
+
return new c(function* () {
|
|
242
242
|
let n = 0;
|
|
243
243
|
for (; n < t; ) {
|
|
244
|
-
const
|
|
245
|
-
if (
|
|
246
|
-
return
|
|
247
|
-
yield
|
|
244
|
+
const s = e.next();
|
|
245
|
+
if (s.done)
|
|
246
|
+
return s.value;
|
|
247
|
+
yield s.value, n += 1;
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
}
|
|
@@ -264,7 +264,7 @@ class u {
|
|
|
264
264
|
}
|
|
265
265
|
unique() {
|
|
266
266
|
const t = this._iterator;
|
|
267
|
-
return new
|
|
267
|
+
return new c(function* () {
|
|
268
268
|
const e = /* @__PURE__ */ new Set();
|
|
269
269
|
for (; ; ) {
|
|
270
270
|
const n = t.next();
|
|
@@ -295,83 +295,83 @@ class u {
|
|
|
295
295
|
return this._iterator.next(...t);
|
|
296
296
|
}
|
|
297
297
|
groupBy(t) {
|
|
298
|
-
return new
|
|
298
|
+
return new S(this.map((e, n) => [t(e, n), e]));
|
|
299
299
|
}
|
|
300
300
|
toArray() {
|
|
301
301
|
return Array.from(this);
|
|
302
302
|
}
|
|
303
|
-
[(
|
|
303
|
+
[(_e = Symbol.toStringTag, Symbol.iterator)]() {
|
|
304
304
|
return this;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
var
|
|
308
|
-
|
|
309
|
-
const
|
|
307
|
+
var we;
|
|
308
|
+
we = Symbol.toStringTag;
|
|
309
|
+
const b = class b {
|
|
310
310
|
constructor(t) {
|
|
311
311
|
a(this, "_elements");
|
|
312
|
-
a(this,
|
|
313
|
-
this._elements = new
|
|
312
|
+
a(this, we, "ReducedIterator");
|
|
313
|
+
this._elements = new c(t);
|
|
314
314
|
}
|
|
315
315
|
every(t) {
|
|
316
|
-
for (const [e, [n,
|
|
317
|
-
if (!t(n,
|
|
316
|
+
for (const [e, [n, s]] of this._elements.enumerate())
|
|
317
|
+
if (!t(n, s, e))
|
|
318
318
|
return !1;
|
|
319
319
|
return !0;
|
|
320
320
|
}
|
|
321
321
|
some(t) {
|
|
322
|
-
for (const [e, [n,
|
|
323
|
-
if (t(n,
|
|
322
|
+
for (const [e, [n, s]] of this._elements.enumerate())
|
|
323
|
+
if (t(n, s, e))
|
|
324
324
|
return !0;
|
|
325
325
|
return !1;
|
|
326
326
|
}
|
|
327
327
|
filter(t) {
|
|
328
328
|
const e = this._elements.enumerate();
|
|
329
|
-
return new
|
|
330
|
-
for (const [n, [
|
|
331
|
-
t(
|
|
329
|
+
return new b(function* () {
|
|
330
|
+
for (const [n, [s, r]] of e)
|
|
331
|
+
t(s, r, n) && (yield [s, r]);
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
334
|
map(t) {
|
|
335
335
|
const e = this._elements.enumerate();
|
|
336
|
-
return new
|
|
337
|
-
for (const [n, [
|
|
338
|
-
yield [
|
|
336
|
+
return new b(function* () {
|
|
337
|
+
for (const [n, [s, r]] of e)
|
|
338
|
+
yield [s, t(s, r, n)];
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
341
|
reduce(t, e) {
|
|
342
|
-
let n = 0,
|
|
343
|
-
if (
|
|
344
|
-
const
|
|
345
|
-
if (
|
|
346
|
-
throw new
|
|
347
|
-
|
|
342
|
+
let n = 0, s = e;
|
|
343
|
+
if (s === void 0) {
|
|
344
|
+
const r = this._elements.next();
|
|
345
|
+
if (r.done)
|
|
346
|
+
throw new p("Cannot reduce an empty iterator without an initial value.");
|
|
347
|
+
s = r.value[1], n += 1;
|
|
348
348
|
}
|
|
349
|
-
for (const [
|
|
350
|
-
|
|
351
|
-
return
|
|
349
|
+
for (const [r, o] of this._elements)
|
|
350
|
+
s = t(r, s, o, n), n += 1;
|
|
351
|
+
return s;
|
|
352
352
|
}
|
|
353
353
|
flatMap(t) {
|
|
354
354
|
const e = this._elements.enumerate();
|
|
355
|
-
return new
|
|
356
|
-
for (const [n, [
|
|
357
|
-
for (const o of t(
|
|
358
|
-
yield [
|
|
355
|
+
return new S(function* () {
|
|
356
|
+
for (const [n, [s, r]] of e)
|
|
357
|
+
for (const o of t(s, r, n))
|
|
358
|
+
yield [s, o];
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
361
|
drop(t) {
|
|
362
362
|
const e = this._elements.enumerate();
|
|
363
|
-
return new
|
|
364
|
-
for (const [n, [
|
|
365
|
-
n >= t && (yield [
|
|
363
|
+
return new b(function* () {
|
|
364
|
+
for (const [n, [s, r]] of e)
|
|
365
|
+
n >= t && (yield [s, r]);
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
take(t) {
|
|
369
369
|
const e = this._elements.enumerate();
|
|
370
|
-
return new
|
|
371
|
-
for (const [n, [
|
|
370
|
+
return new b(function* () {
|
|
371
|
+
for (const [n, [s, r]] of e) {
|
|
372
372
|
if (n >= t)
|
|
373
373
|
break;
|
|
374
|
-
yield [
|
|
374
|
+
yield [s, r];
|
|
375
375
|
}
|
|
376
376
|
});
|
|
377
377
|
}
|
|
@@ -380,10 +380,10 @@ const _ = class _ {
|
|
|
380
380
|
}
|
|
381
381
|
unique() {
|
|
382
382
|
const t = this._elements;
|
|
383
|
-
return new
|
|
383
|
+
return new b(function* () {
|
|
384
384
|
const e = /* @__PURE__ */ new Set();
|
|
385
|
-
for (const [n,
|
|
386
|
-
e.has(
|
|
385
|
+
for (const [n, s] of t)
|
|
386
|
+
e.has(s) || (e.add(s), yield [n, s]);
|
|
387
387
|
});
|
|
388
388
|
}
|
|
389
389
|
count() {
|
|
@@ -393,12 +393,12 @@ const _ = class _ {
|
|
|
393
393
|
return t;
|
|
394
394
|
}
|
|
395
395
|
forEach(t) {
|
|
396
|
-
for (const [e, [n,
|
|
397
|
-
t(n,
|
|
396
|
+
for (const [e, [n, s]] of this._elements.enumerate())
|
|
397
|
+
t(n, s, e);
|
|
398
398
|
}
|
|
399
399
|
keys() {
|
|
400
400
|
const t = this._elements;
|
|
401
|
-
return new
|
|
401
|
+
return new c(function* () {
|
|
402
402
|
for (const [e] of t)
|
|
403
403
|
yield e;
|
|
404
404
|
});
|
|
@@ -408,7 +408,7 @@ const _ = class _ {
|
|
|
408
408
|
}
|
|
409
409
|
values() {
|
|
410
410
|
const t = this._elements;
|
|
411
|
-
return new
|
|
411
|
+
return new c(function* () {
|
|
412
412
|
for (const [e, n] of t)
|
|
413
413
|
yield n;
|
|
414
414
|
});
|
|
@@ -423,130 +423,130 @@ const _ = class _ {
|
|
|
423
423
|
return Object.fromEntries(this.items());
|
|
424
424
|
}
|
|
425
425
|
};
|
|
426
|
-
let
|
|
427
|
-
var
|
|
428
|
-
|
|
429
|
-
const
|
|
426
|
+
let d = b;
|
|
427
|
+
var pe;
|
|
428
|
+
pe = Symbol.toStringTag;
|
|
429
|
+
const y = class y {
|
|
430
430
|
constructor(t) {
|
|
431
431
|
a(this, "_elements");
|
|
432
|
-
a(this,
|
|
433
|
-
this._elements = new
|
|
432
|
+
a(this, pe, "AggregatedAsyncIterator");
|
|
433
|
+
this._elements = new w(t);
|
|
434
434
|
}
|
|
435
435
|
async every(t) {
|
|
436
436
|
const e = /* @__PURE__ */ new Map();
|
|
437
|
-
for await (const [n,
|
|
438
|
-
const [
|
|
439
|
-
o && e.set(n, [
|
|
437
|
+
for await (const [n, s] of this._elements) {
|
|
438
|
+
const [r, o] = e.get(n) ?? [0, !0];
|
|
439
|
+
o && e.set(n, [r + 1, await t(n, s, r)]);
|
|
440
440
|
}
|
|
441
|
-
return new
|
|
442
|
-
for (const [n, [
|
|
443
|
-
yield [n,
|
|
441
|
+
return new d(function* () {
|
|
442
|
+
for (const [n, [s, r]] of e)
|
|
443
|
+
yield [n, r];
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
446
|
async some(t) {
|
|
447
447
|
const e = /* @__PURE__ */ new Map();
|
|
448
|
-
for await (const [n,
|
|
449
|
-
const [
|
|
450
|
-
o || e.set(n, [
|
|
448
|
+
for await (const [n, s] of this._elements) {
|
|
449
|
+
const [r, o] = e.get(n) ?? [0, !1];
|
|
450
|
+
o || e.set(n, [r + 1, await t(n, s, r)]);
|
|
451
451
|
}
|
|
452
|
-
return new
|
|
453
|
-
for (const [n, [
|
|
454
|
-
yield [n,
|
|
452
|
+
return new d(function* () {
|
|
453
|
+
for (const [n, [s, r]] of e)
|
|
454
|
+
yield [n, r];
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
filter(t) {
|
|
458
458
|
const e = this._elements;
|
|
459
|
-
return new
|
|
459
|
+
return new y(async function* () {
|
|
460
460
|
const n = /* @__PURE__ */ new Map();
|
|
461
|
-
for await (const [
|
|
462
|
-
const o = n.get(
|
|
463
|
-
await t(
|
|
461
|
+
for await (const [s, r] of e) {
|
|
462
|
+
const o = n.get(s) ?? 0;
|
|
463
|
+
await t(s, r, o) && (yield [s, r]), n.set(s, o + 1);
|
|
464
464
|
}
|
|
465
465
|
});
|
|
466
466
|
}
|
|
467
467
|
map(t) {
|
|
468
468
|
const e = this._elements;
|
|
469
|
-
return new
|
|
469
|
+
return new y(async function* () {
|
|
470
470
|
const n = /* @__PURE__ */ new Map();
|
|
471
|
-
for await (const [
|
|
472
|
-
const o = n.get(
|
|
473
|
-
yield [
|
|
471
|
+
for await (const [s, r] of e) {
|
|
472
|
+
const o = n.get(s) ?? 0;
|
|
473
|
+
yield [s, await t(s, r, o)], n.set(s, o + 1);
|
|
474
474
|
}
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
477
|
async reduce(t, e) {
|
|
478
478
|
const n = /* @__PURE__ */ new Map();
|
|
479
|
-
for await (const [
|
|
479
|
+
for await (const [s, r] of this._elements) {
|
|
480
480
|
let o, l;
|
|
481
|
-
if (n.has(
|
|
482
|
-
[o, l] = n.get(
|
|
481
|
+
if (n.has(s))
|
|
482
|
+
[o, l] = n.get(s);
|
|
483
483
|
else if (e !== void 0)
|
|
484
|
-
o = 0, l = await e(
|
|
484
|
+
o = 0, l = await e(s);
|
|
485
485
|
else {
|
|
486
|
-
n.set(
|
|
486
|
+
n.set(s, [0, r]);
|
|
487
487
|
continue;
|
|
488
488
|
}
|
|
489
|
-
n.set(
|
|
489
|
+
n.set(s, [o + 1, await t(s, l, r, o)]);
|
|
490
490
|
}
|
|
491
|
-
return new
|
|
492
|
-
for (const [
|
|
493
|
-
yield [
|
|
491
|
+
return new d(function* () {
|
|
492
|
+
for (const [s, [r, o]] of n)
|
|
493
|
+
yield [s, o];
|
|
494
494
|
});
|
|
495
495
|
}
|
|
496
496
|
flatMap(t) {
|
|
497
497
|
const e = this._elements;
|
|
498
|
-
return new
|
|
498
|
+
return new y(async function* () {
|
|
499
499
|
const n = /* @__PURE__ */ new Map();
|
|
500
|
-
for await (const [
|
|
501
|
-
const o = n.get(
|
|
502
|
-
for await (const
|
|
503
|
-
yield [
|
|
504
|
-
n.set(
|
|
500
|
+
for await (const [s, r] of e) {
|
|
501
|
+
const o = n.get(s) ?? 0, l = await t(s, r, o);
|
|
502
|
+
for await (const u of l)
|
|
503
|
+
yield [s, u];
|
|
504
|
+
n.set(s, o + 1);
|
|
505
505
|
}
|
|
506
506
|
});
|
|
507
507
|
}
|
|
508
508
|
drop(t) {
|
|
509
509
|
const e = this._elements;
|
|
510
|
-
return new
|
|
510
|
+
return new y(async function* () {
|
|
511
511
|
const n = /* @__PURE__ */ new Map();
|
|
512
|
-
for await (const [
|
|
513
|
-
const o = n.get(
|
|
512
|
+
for await (const [s, r] of e) {
|
|
513
|
+
const o = n.get(s) ?? 0;
|
|
514
514
|
if (o < t) {
|
|
515
|
-
n.set(
|
|
515
|
+
n.set(s, o + 1);
|
|
516
516
|
continue;
|
|
517
517
|
}
|
|
518
|
-
yield [
|
|
518
|
+
yield [s, r];
|
|
519
519
|
}
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
522
|
take(t) {
|
|
523
523
|
const e = this._elements;
|
|
524
|
-
return new
|
|
524
|
+
return new y(async function* () {
|
|
525
525
|
const n = /* @__PURE__ */ new Map();
|
|
526
|
-
for await (const [
|
|
527
|
-
const o = n.get(
|
|
528
|
-
o >= t || (yield [
|
|
526
|
+
for await (const [s, r] of e) {
|
|
527
|
+
const o = n.get(s) ?? 0;
|
|
528
|
+
o >= t || (yield [s, r], n.set(s, o + 1));
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
532
|
async find(t) {
|
|
533
533
|
const e = /* @__PURE__ */ new Map();
|
|
534
|
-
for await (const [n,
|
|
535
|
-
let [
|
|
536
|
-
o === void 0 && (await t(n,
|
|
534
|
+
for await (const [n, s] of this._elements) {
|
|
535
|
+
let [r, o] = e.get(n) ?? [0, void 0];
|
|
536
|
+
o === void 0 && (await t(n, s, r) && (o = s), e.set(n, [r + 1, o]));
|
|
537
537
|
}
|
|
538
|
-
return new
|
|
539
|
-
for (const [n, [
|
|
540
|
-
yield [n,
|
|
538
|
+
return new d(function* () {
|
|
539
|
+
for (const [n, [s, r]] of e)
|
|
540
|
+
yield [n, r];
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
543
|
unique() {
|
|
544
544
|
const t = this._elements;
|
|
545
|
-
return new
|
|
545
|
+
return new y(async function* () {
|
|
546
546
|
const e = /* @__PURE__ */ new Map();
|
|
547
|
-
for await (const [n,
|
|
548
|
-
const
|
|
549
|
-
|
|
547
|
+
for await (const [n, s] of t) {
|
|
548
|
+
const r = e.get(n) ?? /* @__PURE__ */ new Set();
|
|
549
|
+
r.has(s) || (r.add(s), e.set(n, r), yield [n, s]);
|
|
550
550
|
}
|
|
551
551
|
});
|
|
552
552
|
}
|
|
@@ -556,21 +556,21 @@ const m = class m {
|
|
|
556
556
|
const n = t.get(e) ?? 0;
|
|
557
557
|
t.set(e, n + 1);
|
|
558
558
|
}
|
|
559
|
-
return new
|
|
559
|
+
return new d(function* () {
|
|
560
560
|
for (const [e, n] of t)
|
|
561
561
|
yield [e, n];
|
|
562
562
|
});
|
|
563
563
|
}
|
|
564
564
|
async forEach(t) {
|
|
565
565
|
const e = /* @__PURE__ */ new Map();
|
|
566
|
-
for await (const [n,
|
|
567
|
-
const
|
|
568
|
-
t(n,
|
|
566
|
+
for await (const [n, s] of this._elements) {
|
|
567
|
+
const r = e.get(n) ?? 0;
|
|
568
|
+
t(n, s, r), e.set(n, r + 1);
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
keys() {
|
|
572
572
|
const t = this._elements;
|
|
573
|
-
return new
|
|
573
|
+
return new w(async function* () {
|
|
574
574
|
const e = /* @__PURE__ */ new Set();
|
|
575
575
|
for await (const [n] of t)
|
|
576
576
|
e.has(n) || (e.add(n), yield n);
|
|
@@ -581,7 +581,7 @@ const m = class m {
|
|
|
581
581
|
}
|
|
582
582
|
values() {
|
|
583
583
|
const t = this._elements;
|
|
584
|
-
return new
|
|
584
|
+
return new w(async function* () {
|
|
585
585
|
for await (const [e, n] of t)
|
|
586
586
|
yield n;
|
|
587
587
|
});
|
|
@@ -593,37 +593,37 @@ const m = class m {
|
|
|
593
593
|
async toMap() {
|
|
594
594
|
const t = /* @__PURE__ */ new Map();
|
|
595
595
|
for await (const [e, n] of this._elements) {
|
|
596
|
-
const
|
|
597
|
-
|
|
596
|
+
const s = t.get(e) ?? [];
|
|
597
|
+
s.push(n), t.set(e, s);
|
|
598
598
|
}
|
|
599
599
|
return t;
|
|
600
600
|
}
|
|
601
601
|
async toObject() {
|
|
602
602
|
const t = {};
|
|
603
603
|
for await (const [e, n] of this._elements) {
|
|
604
|
-
const
|
|
605
|
-
|
|
604
|
+
const s = t[e] ?? [];
|
|
605
|
+
s.push(n), t[e] = s;
|
|
606
606
|
}
|
|
607
607
|
return t;
|
|
608
608
|
}
|
|
609
609
|
};
|
|
610
|
-
let
|
|
611
|
-
var
|
|
612
|
-
class
|
|
610
|
+
let E = y;
|
|
611
|
+
var ye;
|
|
612
|
+
class w {
|
|
613
613
|
constructor(t) {
|
|
614
614
|
a(this, "_iterator");
|
|
615
615
|
a(this, "return");
|
|
616
616
|
a(this, "throw");
|
|
617
|
-
a(this,
|
|
617
|
+
a(this, ye, "SmartAsyncIterator");
|
|
618
618
|
if (t instanceof Function) {
|
|
619
619
|
const e = t();
|
|
620
620
|
Symbol.asyncIterator in e ? this._iterator = e : this._iterator = async function* () {
|
|
621
621
|
let n = [];
|
|
622
622
|
for (; ; ) {
|
|
623
|
-
const
|
|
624
|
-
if (
|
|
625
|
-
return
|
|
626
|
-
n = [yield
|
|
623
|
+
const s = e.next(...n);
|
|
624
|
+
if (s.done)
|
|
625
|
+
return s.value;
|
|
626
|
+
n = [yield s.value];
|
|
627
627
|
}
|
|
628
628
|
}();
|
|
629
629
|
} else if (Symbol.asyncIterator in t)
|
|
@@ -674,53 +674,53 @@ class h {
|
|
|
674
674
|
}
|
|
675
675
|
filter(t) {
|
|
676
676
|
const e = this._iterator;
|
|
677
|
-
return new
|
|
677
|
+
return new w(async function* () {
|
|
678
678
|
let n = 0;
|
|
679
679
|
for (; ; ) {
|
|
680
|
-
const
|
|
681
|
-
if (
|
|
682
|
-
return
|
|
683
|
-
await t(
|
|
680
|
+
const s = await e.next();
|
|
681
|
+
if (s.done)
|
|
682
|
+
return s.value;
|
|
683
|
+
await t(s.value, n) && (yield s.value), n += 1;
|
|
684
684
|
}
|
|
685
685
|
});
|
|
686
686
|
}
|
|
687
687
|
map(t) {
|
|
688
688
|
const e = this._iterator;
|
|
689
|
-
return new
|
|
689
|
+
return new w(async function* () {
|
|
690
690
|
let n = 0;
|
|
691
691
|
for (; ; ) {
|
|
692
|
-
const
|
|
693
|
-
if (
|
|
694
|
-
return
|
|
695
|
-
yield await t(
|
|
692
|
+
const s = await e.next();
|
|
693
|
+
if (s.done)
|
|
694
|
+
return s.value;
|
|
695
|
+
yield await t(s.value, n), n += 1;
|
|
696
696
|
}
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
699
|
async reduce(t, e) {
|
|
700
|
-
let n = 0,
|
|
701
|
-
if (
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
704
|
-
throw new
|
|
705
|
-
|
|
700
|
+
let n = 0, s = e;
|
|
701
|
+
if (s === void 0) {
|
|
702
|
+
const r = await this._iterator.next();
|
|
703
|
+
if (r.done)
|
|
704
|
+
throw new p("Cannot reduce an empty iterator without an initial value.");
|
|
705
|
+
s = r.value, n += 1;
|
|
706
706
|
}
|
|
707
707
|
for (; ; ) {
|
|
708
|
-
const
|
|
709
|
-
if (
|
|
710
|
-
return
|
|
711
|
-
|
|
708
|
+
const r = await this._iterator.next();
|
|
709
|
+
if (r.done)
|
|
710
|
+
return s;
|
|
711
|
+
s = await t(s, r.value, n), n += 1;
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
flatMap(t) {
|
|
715
715
|
const e = this._iterator;
|
|
716
|
-
return new
|
|
716
|
+
return new w(async function* () {
|
|
717
717
|
let n = 0;
|
|
718
718
|
for (; ; ) {
|
|
719
|
-
const
|
|
720
|
-
if (
|
|
721
|
-
return
|
|
722
|
-
const
|
|
723
|
-
for await (const o of
|
|
719
|
+
const s = await e.next();
|
|
720
|
+
if (s.done)
|
|
721
|
+
return s.value;
|
|
722
|
+
const r = await t(s.value, n);
|
|
723
|
+
for await (const o of r)
|
|
724
724
|
yield o;
|
|
725
725
|
n += 1;
|
|
726
726
|
}
|
|
@@ -728,7 +728,7 @@ class h {
|
|
|
728
728
|
}
|
|
729
729
|
drop(t) {
|
|
730
730
|
const e = this._iterator;
|
|
731
|
-
return new
|
|
731
|
+
return new w(async function* () {
|
|
732
732
|
let n = 0;
|
|
733
733
|
for (; n < t; ) {
|
|
734
734
|
if ((await e.next()).done)
|
|
@@ -736,22 +736,22 @@ class h {
|
|
|
736
736
|
n += 1;
|
|
737
737
|
}
|
|
738
738
|
for (; ; ) {
|
|
739
|
-
const
|
|
740
|
-
if (
|
|
741
|
-
return
|
|
742
|
-
yield
|
|
739
|
+
const s = await e.next();
|
|
740
|
+
if (s.done)
|
|
741
|
+
return s.value;
|
|
742
|
+
yield s.value;
|
|
743
743
|
}
|
|
744
744
|
});
|
|
745
745
|
}
|
|
746
746
|
take(t) {
|
|
747
747
|
const e = this._iterator;
|
|
748
|
-
return new
|
|
748
|
+
return new w(async function* () {
|
|
749
749
|
let n = 0;
|
|
750
750
|
for (; n < t; ) {
|
|
751
|
-
const
|
|
752
|
-
if (
|
|
753
|
-
return
|
|
754
|
-
yield
|
|
751
|
+
const s = await e.next();
|
|
752
|
+
if (s.done)
|
|
753
|
+
return s.value;
|
|
754
|
+
yield s.value, n += 1;
|
|
755
755
|
}
|
|
756
756
|
});
|
|
757
757
|
}
|
|
@@ -771,7 +771,7 @@ class h {
|
|
|
771
771
|
}
|
|
772
772
|
unique() {
|
|
773
773
|
const t = this._iterator;
|
|
774
|
-
return new
|
|
774
|
+
return new w(async function* () {
|
|
775
775
|
const e = /* @__PURE__ */ new Set();
|
|
776
776
|
for (; ; ) {
|
|
777
777
|
const n = await t.next();
|
|
@@ -802,129 +802,129 @@ class h {
|
|
|
802
802
|
return this._iterator.next(...t);
|
|
803
803
|
}
|
|
804
804
|
groupBy(t) {
|
|
805
|
-
return new
|
|
805
|
+
return new E(this.map(async (e, n) => [await t(e, n), e]));
|
|
806
806
|
}
|
|
807
807
|
toArray() {
|
|
808
808
|
return Array.fromAsync(this);
|
|
809
809
|
}
|
|
810
|
-
[(
|
|
810
|
+
[(ye = Symbol.toStringTag, Symbol.asyncIterator)]() {
|
|
811
811
|
return this;
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
|
-
var
|
|
815
|
-
|
|
816
|
-
const
|
|
814
|
+
var ge;
|
|
815
|
+
ge = Symbol.toStringTag;
|
|
816
|
+
const g = class g {
|
|
817
817
|
constructor(t) {
|
|
818
818
|
a(this, "_elements");
|
|
819
|
-
a(this,
|
|
820
|
-
this._elements = new
|
|
819
|
+
a(this, ge, "AggregatedIterator");
|
|
820
|
+
this._elements = new c(t);
|
|
821
821
|
}
|
|
822
822
|
every(t) {
|
|
823
823
|
const e = /* @__PURE__ */ new Map();
|
|
824
|
-
for (const [n,
|
|
825
|
-
const [
|
|
826
|
-
o && e.set(n, [
|
|
824
|
+
for (const [n, s] of this._elements) {
|
|
825
|
+
const [r, o] = e.get(n) ?? [0, !0];
|
|
826
|
+
o && e.set(n, [r + 1, t(n, s, r)]);
|
|
827
827
|
}
|
|
828
|
-
return new
|
|
829
|
-
for (const [n, [
|
|
830
|
-
yield [n,
|
|
828
|
+
return new d(function* () {
|
|
829
|
+
for (const [n, [s, r]] of e)
|
|
830
|
+
yield [n, r];
|
|
831
831
|
});
|
|
832
832
|
}
|
|
833
833
|
some(t) {
|
|
834
834
|
const e = /* @__PURE__ */ new Map();
|
|
835
|
-
for (const [n,
|
|
836
|
-
const [
|
|
837
|
-
o || e.set(n, [
|
|
835
|
+
for (const [n, s] of this._elements) {
|
|
836
|
+
const [r, o] = e.get(n) ?? [0, !1];
|
|
837
|
+
o || e.set(n, [r + 1, t(n, s, r)]);
|
|
838
838
|
}
|
|
839
|
-
return new
|
|
840
|
-
for (const [n, [
|
|
841
|
-
yield [n,
|
|
839
|
+
return new d(function* () {
|
|
840
|
+
for (const [n, [s, r]] of e)
|
|
841
|
+
yield [n, r];
|
|
842
842
|
});
|
|
843
843
|
}
|
|
844
844
|
filter(t) {
|
|
845
845
|
const e = this._elements;
|
|
846
|
-
return new
|
|
846
|
+
return new g(function* () {
|
|
847
847
|
const n = /* @__PURE__ */ new Map();
|
|
848
|
-
for (const [
|
|
849
|
-
const o = n.get(
|
|
850
|
-
t(
|
|
848
|
+
for (const [s, r] of e) {
|
|
849
|
+
const o = n.get(s) ?? 0;
|
|
850
|
+
t(s, r, o) && (yield [s, r]), n.set(s, o + 1);
|
|
851
851
|
}
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
854
|
map(t) {
|
|
855
855
|
const e = this._elements;
|
|
856
|
-
return new
|
|
856
|
+
return new g(function* () {
|
|
857
857
|
const n = /* @__PURE__ */ new Map();
|
|
858
|
-
for (const [
|
|
859
|
-
const o = n.get(
|
|
860
|
-
yield [
|
|
858
|
+
for (const [s, r] of e) {
|
|
859
|
+
const o = n.get(s) ?? 0;
|
|
860
|
+
yield [s, t(s, r, o)], n.set(s, o + 1);
|
|
861
861
|
}
|
|
862
862
|
});
|
|
863
863
|
}
|
|
864
864
|
reduce(t, e) {
|
|
865
865
|
const n = /* @__PURE__ */ new Map();
|
|
866
|
-
for (const [
|
|
866
|
+
for (const [s, r] of this._elements) {
|
|
867
867
|
let o, l;
|
|
868
|
-
if (n.has(
|
|
869
|
-
[o, l] = n.get(
|
|
868
|
+
if (n.has(s))
|
|
869
|
+
[o, l] = n.get(s);
|
|
870
870
|
else if (e !== void 0)
|
|
871
|
-
o = 0, l = e(
|
|
871
|
+
o = 0, l = e(s);
|
|
872
872
|
else {
|
|
873
|
-
n.set(
|
|
873
|
+
n.set(s, [0, r]);
|
|
874
874
|
continue;
|
|
875
875
|
}
|
|
876
|
-
n.set(
|
|
876
|
+
n.set(s, [o + 1, t(s, l, r, o)]);
|
|
877
877
|
}
|
|
878
|
-
return new
|
|
879
|
-
for (const [
|
|
880
|
-
yield [
|
|
878
|
+
return new d(function* () {
|
|
879
|
+
for (const [s, [r, o]] of n)
|
|
880
|
+
yield [s, o];
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
883
|
flatMap(t) {
|
|
884
884
|
const e = this._elements;
|
|
885
|
-
return new
|
|
885
|
+
return new g(function* () {
|
|
886
886
|
const n = /* @__PURE__ */ new Map();
|
|
887
|
-
for (const [
|
|
888
|
-
const o = n.get(
|
|
889
|
-
for (const
|
|
890
|
-
yield [
|
|
891
|
-
n.set(
|
|
887
|
+
for (const [s, r] of e) {
|
|
888
|
+
const o = n.get(s) ?? 0, l = t(s, r, o);
|
|
889
|
+
for (const u of l)
|
|
890
|
+
yield [s, u];
|
|
891
|
+
n.set(s, o + 1);
|
|
892
892
|
}
|
|
893
893
|
});
|
|
894
894
|
}
|
|
895
895
|
drop(t) {
|
|
896
896
|
const e = this._elements;
|
|
897
|
-
return new
|
|
897
|
+
return new g(function* () {
|
|
898
898
|
const n = /* @__PURE__ */ new Map();
|
|
899
|
-
for (const [
|
|
900
|
-
const o = n.get(
|
|
899
|
+
for (const [s, r] of e) {
|
|
900
|
+
const o = n.get(s) ?? 0;
|
|
901
901
|
if (o < t) {
|
|
902
|
-
n.set(
|
|
902
|
+
n.set(s, o + 1);
|
|
903
903
|
continue;
|
|
904
904
|
}
|
|
905
|
-
yield [
|
|
905
|
+
yield [s, r];
|
|
906
906
|
}
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
909
|
take(t) {
|
|
910
910
|
const e = this._elements;
|
|
911
|
-
return new
|
|
911
|
+
return new g(function* () {
|
|
912
912
|
const n = /* @__PURE__ */ new Map();
|
|
913
|
-
for (const [
|
|
914
|
-
const o = n.get(
|
|
915
|
-
o >= t || (yield [
|
|
913
|
+
for (const [s, r] of e) {
|
|
914
|
+
const o = n.get(s) ?? 0;
|
|
915
|
+
o >= t || (yield [s, r], n.set(s, o + 1));
|
|
916
916
|
}
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
919
|
find(t) {
|
|
920
920
|
const e = /* @__PURE__ */ new Map();
|
|
921
|
-
for (const [n,
|
|
922
|
-
let [
|
|
923
|
-
o === void 0 && (t(n,
|
|
921
|
+
for (const [n, s] of this._elements) {
|
|
922
|
+
let [r, o] = e.get(n) ?? [0, void 0];
|
|
923
|
+
o === void 0 && (t(n, s, r) && (o = s), e.set(n, [r + 1, o]));
|
|
924
924
|
}
|
|
925
|
-
return new
|
|
926
|
-
for (const [n, [
|
|
927
|
-
yield [n,
|
|
925
|
+
return new d(function* () {
|
|
926
|
+
for (const [n, [s, r]] of e)
|
|
927
|
+
yield [n, r];
|
|
928
928
|
});
|
|
929
929
|
}
|
|
930
930
|
enumerate() {
|
|
@@ -932,11 +932,11 @@ const w = class w {
|
|
|
932
932
|
}
|
|
933
933
|
unique() {
|
|
934
934
|
const t = this._elements;
|
|
935
|
-
return new
|
|
935
|
+
return new g(function* () {
|
|
936
936
|
const e = /* @__PURE__ */ new Map();
|
|
937
|
-
for (const [n,
|
|
938
|
-
const
|
|
939
|
-
|
|
937
|
+
for (const [n, s] of t) {
|
|
938
|
+
const r = e.get(n) ?? /* @__PURE__ */ new Set();
|
|
939
|
+
r.has(s) || (r.add(s), e.set(n, r), yield [n, s]);
|
|
940
940
|
}
|
|
941
941
|
});
|
|
942
942
|
}
|
|
@@ -946,21 +946,21 @@ const w = class w {
|
|
|
946
946
|
const n = t.get(e) ?? 0;
|
|
947
947
|
t.set(e, n + 1);
|
|
948
948
|
}
|
|
949
|
-
return new
|
|
949
|
+
return new d(function* () {
|
|
950
950
|
for (const [e, n] of t)
|
|
951
951
|
yield [e, n];
|
|
952
952
|
});
|
|
953
953
|
}
|
|
954
954
|
forEach(t) {
|
|
955
955
|
const e = /* @__PURE__ */ new Map();
|
|
956
|
-
for (const [n,
|
|
957
|
-
const
|
|
958
|
-
t(n,
|
|
956
|
+
for (const [n, s] of this._elements) {
|
|
957
|
+
const r = e.get(n) ?? 0;
|
|
958
|
+
t(n, s, r), e.set(n, r + 1);
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
keys() {
|
|
962
962
|
const t = this._elements;
|
|
963
|
-
return new
|
|
963
|
+
return new c(function* () {
|
|
964
964
|
const e = /* @__PURE__ */ new Set();
|
|
965
965
|
for (const [n] of t)
|
|
966
966
|
e.has(n) || (e.add(n), yield n);
|
|
@@ -971,7 +971,7 @@ const w = class w {
|
|
|
971
971
|
}
|
|
972
972
|
values() {
|
|
973
973
|
const t = this._elements;
|
|
974
|
-
return new
|
|
974
|
+
return new c(function* () {
|
|
975
975
|
for (const [e, n] of t)
|
|
976
976
|
yield n;
|
|
977
977
|
});
|
|
@@ -983,32 +983,117 @@ const w = class w {
|
|
|
983
983
|
toMap() {
|
|
984
984
|
const t = /* @__PURE__ */ new Map();
|
|
985
985
|
for (const [e, n] of this._elements) {
|
|
986
|
-
const
|
|
987
|
-
|
|
986
|
+
const s = t.get(e) ?? [];
|
|
987
|
+
s.push(n), t.set(e, s);
|
|
988
988
|
}
|
|
989
989
|
return t;
|
|
990
990
|
}
|
|
991
991
|
toObject() {
|
|
992
992
|
const t = {};
|
|
993
993
|
for (const [e, n] of this._elements) {
|
|
994
|
-
const
|
|
995
|
-
|
|
994
|
+
const s = t[e] ?? [];
|
|
995
|
+
s.push(n), t[e] = s;
|
|
996
996
|
}
|
|
997
997
|
return t;
|
|
998
998
|
}
|
|
999
999
|
};
|
|
1000
|
-
let
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1000
|
+
let S = g;
|
|
1001
|
+
const Be = Function;
|
|
1002
|
+
class Ge extends Be {
|
|
1003
|
+
constructor() {
|
|
1004
|
+
super("return this.invoke(...arguments);");
|
|
1005
|
+
const t = this.bind(this);
|
|
1006
|
+
return Object.setPrototypeOf(this, t), t;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
var be;
|
|
1010
|
+
be = Symbol.toStringTag;
|
|
1011
|
+
class M {
|
|
1012
|
+
constructor() {
|
|
1013
|
+
a(this, "_subscribers");
|
|
1014
|
+
a(this, be, "Publisher");
|
|
1015
|
+
this._subscribers = /* @__PURE__ */ new Map();
|
|
1016
|
+
}
|
|
1017
|
+
subscribe(t, e) {
|
|
1018
|
+
this._subscribers.has(t) || this._subscribers.set(t, []);
|
|
1019
|
+
const n = this._subscribers.get(t);
|
|
1020
|
+
return n.push(e), () => {
|
|
1021
|
+
const s = n.indexOf(e);
|
|
1022
|
+
if (s < 0)
|
|
1023
|
+
throw new Je("Unable to unsubscribe the required subscriber. The subscription was already unsubscribed.");
|
|
1024
|
+
n.splice(s, 1);
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
publish(t, ...e) {
|
|
1028
|
+
const n = this._subscribers.get(t);
|
|
1029
|
+
return n ? n.slice().map((s) => s(...e)) : [];
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
class st extends Ge {
|
|
1033
|
+
constructor() {
|
|
1034
|
+
const e = () => {
|
|
1035
|
+
throw new ze(
|
|
1036
|
+
"The `SwitchableCallback` has no callback defined yet. Did you forget to call the `register` method?"
|
|
1037
|
+
);
|
|
1038
|
+
};
|
|
1039
|
+
super();
|
|
1040
|
+
a(this, "_callback");
|
|
1041
|
+
a(this, "_callbacks");
|
|
1042
|
+
a(this, "_isEnabled");
|
|
1043
|
+
a(this, "_key");
|
|
1044
|
+
a(this, "invoke");
|
|
1045
|
+
this._callback = e, this._callbacks = /* @__PURE__ */ new Map(), this._isEnabled = !1, this._key = "", this.invoke = (...n) => this._callback(...n);
|
|
1046
|
+
}
|
|
1047
|
+
get isEnabled() {
|
|
1048
|
+
return this._isEnabled;
|
|
1049
|
+
}
|
|
1050
|
+
get key() {
|
|
1051
|
+
return this._key;
|
|
1052
|
+
}
|
|
1053
|
+
enable() {
|
|
1054
|
+
if (!this._key)
|
|
1055
|
+
throw new x(
|
|
1056
|
+
"The `SwitchableCallback` has no callback defined yet. Did you forget to call the `register` method?"
|
|
1057
|
+
);
|
|
1058
|
+
if (this._isEnabled)
|
|
1059
|
+
throw new m("The `SwitchableCallback` is already enabled.");
|
|
1060
|
+
this._callback = this._callbacks.get(this._key), this._isEnabled = !0;
|
|
1061
|
+
}
|
|
1062
|
+
disable() {
|
|
1063
|
+
if (!this._isEnabled)
|
|
1064
|
+
throw new m("The `SwitchableCallback` is already disabled.");
|
|
1065
|
+
this._callback = () => {
|
|
1066
|
+
}, this._isEnabled = !1;
|
|
1067
|
+
}
|
|
1068
|
+
register(e, n) {
|
|
1069
|
+
if (this._callbacks.size === 0)
|
|
1070
|
+
this._key = e, this._callback = n;
|
|
1071
|
+
else if (this._callbacks.has(e))
|
|
1072
|
+
throw new x(`The key '${e}' has already been used for another callback.`);
|
|
1073
|
+
this._callbacks.set(e, n);
|
|
1074
|
+
}
|
|
1075
|
+
unregister(e) {
|
|
1076
|
+
if (!this._callbacks.has(e))
|
|
1077
|
+
throw new x(`The key '${e}' doesn't yet have any associated callback.`);
|
|
1078
|
+
this._callbacks.delete(e);
|
|
1079
|
+
}
|
|
1080
|
+
switch(e) {
|
|
1081
|
+
if (!this._callbacks.has(e))
|
|
1082
|
+
throw new x(`The key '${e}' doesn't yet have any associated callback.`);
|
|
1083
|
+
this._key = e, this._callback = this._callbacks.get(e);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
var xe;
|
|
1087
|
+
xe = Symbol.toStringTag;
|
|
1088
|
+
class qe {
|
|
1004
1089
|
constructor(t, e = 40) {
|
|
1005
1090
|
a(this, "_handle");
|
|
1006
1091
|
a(this, "_startTime");
|
|
1007
1092
|
a(this, "_isRunning");
|
|
1008
1093
|
a(this, "_start");
|
|
1009
1094
|
a(this, "_stop");
|
|
1010
|
-
a(this,
|
|
1011
|
-
this._startTime = 0, this._isRunning = !1,
|
|
1095
|
+
a(this, xe, "GameLoop");
|
|
1096
|
+
this._startTime = 0, this._isRunning = !1, Oe ? (this._start = () => {
|
|
1012
1097
|
t(this.elapsedTime), this._handle = window.requestAnimationFrame(this._start);
|
|
1013
1098
|
}, this._stop = () => window.cancelAnimationFrame(this._handle)) : (console.warn(
|
|
1014
1099
|
`Not a browser environment detected. Using setInterval@${e}ms instead of requestAnimationFrame...`
|
|
@@ -1027,50 +1112,50 @@ class je {
|
|
|
1027
1112
|
}
|
|
1028
1113
|
start(t = 0) {
|
|
1029
1114
|
if (this._isRunning)
|
|
1030
|
-
throw new
|
|
1115
|
+
throw new m("The game loop has already been started.");
|
|
1031
1116
|
this._startTime = performance.now() - t, this._start(), this._isRunning = !0;
|
|
1032
1117
|
}
|
|
1033
1118
|
stop() {
|
|
1034
1119
|
if (!this._isRunning)
|
|
1035
|
-
throw new
|
|
1120
|
+
throw new m("The game loop hadn't yet started.");
|
|
1036
1121
|
if (!this._handle)
|
|
1037
|
-
throw new
|
|
1122
|
+
throw new k();
|
|
1038
1123
|
this._stop(), this._handle = void 0, this._isRunning = !1;
|
|
1039
1124
|
}
|
|
1040
1125
|
}
|
|
1041
|
-
var
|
|
1042
|
-
|
|
1043
|
-
class
|
|
1126
|
+
var ve;
|
|
1127
|
+
ve = Symbol.toStringTag;
|
|
1128
|
+
class rt {
|
|
1044
1129
|
constructor(t = !0) {
|
|
1045
1130
|
a(this, "_preferPersistence");
|
|
1046
1131
|
a(this, "_volatile");
|
|
1047
1132
|
a(this, "_persistent");
|
|
1048
|
-
a(this,
|
|
1049
|
-
if (this._preferPersistence = t, !
|
|
1050
|
-
throw new
|
|
1133
|
+
a(this, ve, "JSONStorage");
|
|
1134
|
+
if (this._preferPersistence = t, !Oe)
|
|
1135
|
+
throw new Ve(
|
|
1051
1136
|
"The `JSONStorage` class can only be instantiated within a browser environment."
|
|
1052
1137
|
);
|
|
1053
1138
|
this._volatile = window.sessionStorage, this._persistent = window.localStorage;
|
|
1054
1139
|
}
|
|
1055
1140
|
_get(t, e, n) {
|
|
1056
|
-
const
|
|
1057
|
-
if (
|
|
1141
|
+
const s = t.getItem(e);
|
|
1142
|
+
if (s)
|
|
1058
1143
|
try {
|
|
1059
|
-
return JSON.parse(
|
|
1144
|
+
return JSON.parse(s);
|
|
1060
1145
|
} catch {
|
|
1061
1146
|
console.warn(
|
|
1062
|
-
`The "${
|
|
1147
|
+
`The "${s}" value for "${e}" property cannot be parsed. Clearing the storage...`
|
|
1063
1148
|
), t.removeItem(e);
|
|
1064
1149
|
}
|
|
1065
1150
|
return n;
|
|
1066
1151
|
}
|
|
1067
1152
|
_set(t, e, n) {
|
|
1068
|
-
const
|
|
1069
|
-
|
|
1153
|
+
const s = JSON.stringify(n);
|
|
1154
|
+
s ? t.setItem(e, s) : t.removeItem(e);
|
|
1070
1155
|
}
|
|
1071
1156
|
get(t, e, n = this._preferPersistence) {
|
|
1072
|
-
const
|
|
1073
|
-
return this._get(
|
|
1157
|
+
const s = n ? this._persistent : this._volatile;
|
|
1158
|
+
return this._get(s, t, e);
|
|
1074
1159
|
}
|
|
1075
1160
|
recall(t, e) {
|
|
1076
1161
|
return this._get(this._volatile, t, e);
|
|
@@ -1132,8 +1217,8 @@ class Qe {
|
|
|
1132
1217
|
* @param persistent Whether to use the persistent `localStorage` or the volatile `sessionStorage`.
|
|
1133
1218
|
*/
|
|
1134
1219
|
set(t, e, n = this._preferPersistence) {
|
|
1135
|
-
const
|
|
1136
|
-
this._set(
|
|
1220
|
+
const s = n ? this._persistent : this._volatile;
|
|
1221
|
+
this._set(s, t, e);
|
|
1137
1222
|
}
|
|
1138
1223
|
/**
|
|
1139
1224
|
* Sets the value with the specified name in the volatile `sessionStorage`.
|
|
@@ -1180,23 +1265,23 @@ class Qe {
|
|
|
1180
1265
|
this._volatile.removeItem(t), this._persistent.removeItem(t);
|
|
1181
1266
|
}
|
|
1182
1267
|
}
|
|
1183
|
-
var
|
|
1184
|
-
|
|
1185
|
-
const
|
|
1268
|
+
var ke;
|
|
1269
|
+
ke = Symbol.toStringTag;
|
|
1270
|
+
const R = class R {
|
|
1186
1271
|
constructor(t) {
|
|
1187
1272
|
a(this, "_isPending");
|
|
1188
1273
|
a(this, "_isFulfilled");
|
|
1189
1274
|
a(this, "_isRejected");
|
|
1190
1275
|
a(this, "_promise");
|
|
1191
|
-
a(this,
|
|
1276
|
+
a(this, ke, "SmartPromise");
|
|
1192
1277
|
this._isPending = !0, this._isFulfilled = !1, this._isRejected = !1;
|
|
1193
|
-
const e = (
|
|
1194
|
-
throw this._isPending = !1, this._isRejected = !0,
|
|
1278
|
+
const e = (s) => (this._isPending = !1, this._isFulfilled = !0, s), n = (s) => {
|
|
1279
|
+
throw this._isPending = !1, this._isRejected = !0, s;
|
|
1195
1280
|
};
|
|
1196
1281
|
this._promise = new Promise(t).then(e, n);
|
|
1197
1282
|
}
|
|
1198
1283
|
static FromPromise(t) {
|
|
1199
|
-
return new
|
|
1284
|
+
return new R((e, n) => t.then(e, n));
|
|
1200
1285
|
}
|
|
1201
1286
|
get isPending() {
|
|
1202
1287
|
return this._isPending;
|
|
@@ -1217,18 +1302,18 @@ const T = class T {
|
|
|
1217
1302
|
return this._promise.finally(t);
|
|
1218
1303
|
}
|
|
1219
1304
|
};
|
|
1220
|
-
let
|
|
1221
|
-
var
|
|
1222
|
-
class
|
|
1305
|
+
let T = R;
|
|
1306
|
+
var Se, Te;
|
|
1307
|
+
class Ke extends (Te = T, Se = Symbol.toStringTag, Te) {
|
|
1223
1308
|
constructor(e, n) {
|
|
1224
|
-
let
|
|
1309
|
+
let s, r;
|
|
1225
1310
|
super((o, l) => {
|
|
1226
|
-
|
|
1311
|
+
s = o, r = l;
|
|
1227
1312
|
});
|
|
1228
1313
|
a(this, "_resolve");
|
|
1229
1314
|
a(this, "_reject");
|
|
1230
|
-
a(this,
|
|
1231
|
-
this._promise.then(e, n), this._resolve =
|
|
1315
|
+
a(this, Se, "DeferredPromise");
|
|
1316
|
+
this._promise.then(e, n), this._resolve = s, this._reject = r;
|
|
1232
1317
|
}
|
|
1233
1318
|
get resolve() {
|
|
1234
1319
|
return this._resolve;
|
|
@@ -1240,12 +1325,165 @@ class Ne extends (xe = b, pe = Symbol.toStringTag, xe) {
|
|
|
1240
1325
|
return e.then(this.resolve, this.reject), this;
|
|
1241
1326
|
}
|
|
1242
1327
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1328
|
+
function it(i) {
|
|
1329
|
+
return new Promise((t) => setTimeout(t, i));
|
|
1330
|
+
}
|
|
1331
|
+
function ot() {
|
|
1332
|
+
return new Promise((i) => requestAnimationFrame(() => i()));
|
|
1333
|
+
}
|
|
1334
|
+
function v() {
|
|
1335
|
+
return new Promise((i) => setTimeout(i));
|
|
1336
|
+
}
|
|
1337
|
+
var Ee;
|
|
1338
|
+
Ee = Symbol.toStringTag;
|
|
1339
|
+
const P = class P {
|
|
1340
|
+
constructor(t, e) {
|
|
1341
|
+
a(this, "_startTime");
|
|
1342
|
+
a(this, "_estimatedTime");
|
|
1343
|
+
a(this, "_endTime");
|
|
1344
|
+
a(this, "_currentStep");
|
|
1345
|
+
a(this, "_percentage");
|
|
1346
|
+
a(this, "_isRunning");
|
|
1347
|
+
a(this, "_hasCompleted");
|
|
1348
|
+
a(this, "_hasFailed");
|
|
1349
|
+
a(this, "_promise");
|
|
1350
|
+
a(this, "_publisher");
|
|
1351
|
+
a(this, Ee, "LongRunningTask");
|
|
1352
|
+
this._startTime = 0, this._estimatedTime = 0, this._currentStep = 0, this._percentage = 0, this._isRunning = !0, this._hasCompleted = !1, this._hasFailed = !1;
|
|
1353
|
+
const n = (o) => (this._estimatedTime = 0, this._endTime = Date.now(), this._percentage = 100, this._isRunning = !1, this._hasCompleted = !0, o), s = (o) => {
|
|
1354
|
+
throw this._endTime = Date.now(), this._isRunning = !1, this._hasFailed = !0, o;
|
|
1355
|
+
};
|
|
1356
|
+
let r;
|
|
1357
|
+
if (e = { ...P._DefaultOptions, ...e }, e.trackProgress) {
|
|
1358
|
+
let o;
|
|
1359
|
+
this._publisher = new M(), e.totalSteps ? e.stepIncrement ? o = (l) => {
|
|
1360
|
+
l ? this._currentStep += l : this._currentStep += e.stepIncrement, this._percentage = this._currentStep / e.totalSteps * 100;
|
|
1361
|
+
const u = Date.now() - this._startTime, h = e.totalSteps - this._currentStep;
|
|
1362
|
+
this._estimatedTime = u / this._currentStep * h;
|
|
1363
|
+
} : o = (l) => {
|
|
1364
|
+
if (l) {
|
|
1365
|
+
this._currentStep += l, this._percentage = this._currentStep / e.totalSteps * 100;
|
|
1366
|
+
const u = Date.now() - this._startTime, h = e.totalSteps - this._currentStep;
|
|
1367
|
+
this._estimatedTime = u / this._currentStep * h;
|
|
1368
|
+
}
|
|
1369
|
+
} : e.stepIncrement ? o = (l) => {
|
|
1370
|
+
l ? this._currentStep += l : this._currentStep += e.stepIncrement;
|
|
1371
|
+
} : o = (l) => {
|
|
1372
|
+
l && (this._currentStep += l);
|
|
1373
|
+
}, e.ignoreErrors ? r = async (l) => {
|
|
1374
|
+
const u = t();
|
|
1375
|
+
for (this._startTime = Date.now(); ; ) {
|
|
1376
|
+
try {
|
|
1377
|
+
const { done: h, value: _ } = await u.next();
|
|
1378
|
+
if (h)
|
|
1379
|
+
return l(_);
|
|
1380
|
+
o(_);
|
|
1381
|
+
} catch (h) {
|
|
1382
|
+
console.error(h);
|
|
1383
|
+
}
|
|
1384
|
+
this._publisher.publish("progress"), await v();
|
|
1385
|
+
}
|
|
1386
|
+
} : r = async (l, u) => {
|
|
1387
|
+
try {
|
|
1388
|
+
const h = t();
|
|
1389
|
+
for (this._startTime = Date.now(); ; ) {
|
|
1390
|
+
const { done: _, value: I } = await h.next();
|
|
1391
|
+
if (_)
|
|
1392
|
+
return l(I);
|
|
1393
|
+
o(I), this._publisher.publish("progress"), await v();
|
|
1394
|
+
}
|
|
1395
|
+
} catch (h) {
|
|
1396
|
+
u(h);
|
|
1397
|
+
}
|
|
1398
|
+
};
|
|
1399
|
+
} else e.ignoreErrors ? r = async (o) => {
|
|
1400
|
+
const l = t();
|
|
1401
|
+
for (this._startTime = Date.now(); ; ) {
|
|
1402
|
+
try {
|
|
1403
|
+
const { done: u, value: h } = await l.next();
|
|
1404
|
+
if (u)
|
|
1405
|
+
return o(h);
|
|
1406
|
+
} catch (u) {
|
|
1407
|
+
console.error(u);
|
|
1408
|
+
}
|
|
1409
|
+
await v();
|
|
1410
|
+
}
|
|
1411
|
+
} : r = async (o, l) => {
|
|
1412
|
+
try {
|
|
1413
|
+
const u = t();
|
|
1414
|
+
for (this._startTime = Date.now(); ; ) {
|
|
1415
|
+
const { done: h, value: _ } = await u.next();
|
|
1416
|
+
if (h)
|
|
1417
|
+
return o(_);
|
|
1418
|
+
await v();
|
|
1419
|
+
}
|
|
1420
|
+
} catch (u) {
|
|
1421
|
+
l(u);
|
|
1422
|
+
}
|
|
1423
|
+
};
|
|
1424
|
+
this._promise = new Promise(r).then(n, s);
|
|
1425
|
+
}
|
|
1426
|
+
static get _DefaultOptions() {
|
|
1427
|
+
return {
|
|
1428
|
+
ignoreErrors: !1,
|
|
1429
|
+
stepIncrement: 1,
|
|
1430
|
+
totalSteps: null,
|
|
1431
|
+
trackProgress: !1
|
|
1432
|
+
};
|
|
1433
|
+
}
|
|
1434
|
+
get startTime() {
|
|
1435
|
+
return this._startTime;
|
|
1436
|
+
}
|
|
1437
|
+
get elapsedTime() {
|
|
1438
|
+
return this._isRunning ? Date.now() - this._startTime : this._endTime - this._startTime;
|
|
1439
|
+
}
|
|
1440
|
+
get estimatedTime() {
|
|
1441
|
+
return this._estimatedTime;
|
|
1442
|
+
}
|
|
1443
|
+
get endTime() {
|
|
1444
|
+
if (this._isRunning)
|
|
1445
|
+
throw new m("The task is still running and has no end time yet.");
|
|
1446
|
+
return this._endTime;
|
|
1447
|
+
}
|
|
1448
|
+
get currentStep() {
|
|
1449
|
+
return this._currentStep;
|
|
1450
|
+
}
|
|
1451
|
+
get percentage() {
|
|
1452
|
+
return this._percentage;
|
|
1453
|
+
}
|
|
1454
|
+
get isRunning() {
|
|
1455
|
+
return this._isRunning;
|
|
1456
|
+
}
|
|
1457
|
+
get hasCompleted() {
|
|
1458
|
+
return this._hasCompleted;
|
|
1459
|
+
}
|
|
1460
|
+
get hasFailed() {
|
|
1461
|
+
return this._hasFailed;
|
|
1462
|
+
}
|
|
1463
|
+
then(t, e) {
|
|
1464
|
+
return this._promise.then(t, e);
|
|
1465
|
+
}
|
|
1466
|
+
catch(t) {
|
|
1467
|
+
return this._promise.catch(t);
|
|
1468
|
+
}
|
|
1469
|
+
finally(t) {
|
|
1470
|
+
return this._promise.finally(t);
|
|
1471
|
+
}
|
|
1472
|
+
onProgress(t) {
|
|
1473
|
+
if (!this._publisher)
|
|
1474
|
+
throw new m(
|
|
1475
|
+
"You cannot subscribe to progress events without enabling progress tracking. Did you forget to set the `trackProgress` option to `true` when creating the task?"
|
|
1476
|
+
);
|
|
1477
|
+
return this._publisher.subscribe("progress", t);
|
|
1478
|
+
}
|
|
1479
|
+
};
|
|
1480
|
+
let C = P;
|
|
1481
|
+
var Me;
|
|
1482
|
+
Me = Symbol.toStringTag;
|
|
1483
|
+
class at {
|
|
1246
1484
|
constructor() {
|
|
1247
1485
|
a(this, "_onFulfilled");
|
|
1248
|
-
a(this,
|
|
1486
|
+
a(this, Me, "Thenable");
|
|
1249
1487
|
this._onFulfilled = (t) => t;
|
|
1250
1488
|
}
|
|
1251
1489
|
_resolve(t) {
|
|
@@ -1254,16 +1492,16 @@ class Xe {
|
|
|
1254
1492
|
then(t, e) {
|
|
1255
1493
|
if (e) {
|
|
1256
1494
|
const n = this._onFulfilled;
|
|
1257
|
-
this._onFulfilled = (
|
|
1495
|
+
this._onFulfilled = (s) => {
|
|
1258
1496
|
try {
|
|
1259
|
-
return
|
|
1260
|
-
} catch (
|
|
1261
|
-
return e(
|
|
1497
|
+
return s = n(s), t(s);
|
|
1498
|
+
} catch (r) {
|
|
1499
|
+
return e(r);
|
|
1262
1500
|
}
|
|
1263
1501
|
};
|
|
1264
1502
|
} else if (t) {
|
|
1265
1503
|
const n = this._onFulfilled;
|
|
1266
|
-
this._onFulfilled = (
|
|
1504
|
+
this._onFulfilled = (s) => (s = n(s), t(s));
|
|
1267
1505
|
}
|
|
1268
1506
|
return this;
|
|
1269
1507
|
}
|
|
@@ -1273,8 +1511,8 @@ class Xe {
|
|
|
1273
1511
|
this._onFulfilled = (n) => {
|
|
1274
1512
|
try {
|
|
1275
1513
|
return e(n);
|
|
1276
|
-
} catch (
|
|
1277
|
-
return t(
|
|
1514
|
+
} catch (s) {
|
|
1515
|
+
return t(s);
|
|
1278
1516
|
}
|
|
1279
1517
|
};
|
|
1280
1518
|
}
|
|
@@ -1294,107 +1532,82 @@ class Xe {
|
|
|
1294
1532
|
return this;
|
|
1295
1533
|
}
|
|
1296
1534
|
}
|
|
1297
|
-
var
|
|
1298
|
-
class
|
|
1535
|
+
var Fe, Re;
|
|
1536
|
+
class lt extends (Re = T, Fe = Symbol.toStringTag, Re) {
|
|
1299
1537
|
constructor(e, n) {
|
|
1300
|
-
super((
|
|
1301
|
-
const o = (
|
|
1302
|
-
clearTimeout(
|
|
1303
|
-
}, l = (
|
|
1304
|
-
clearTimeout(
|
|
1305
|
-
},
|
|
1538
|
+
super((s, r) => {
|
|
1539
|
+
const o = (_) => {
|
|
1540
|
+
clearTimeout(h), s(_);
|
|
1541
|
+
}, l = (_) => {
|
|
1542
|
+
clearTimeout(h), r(_);
|
|
1543
|
+
}, h = setTimeout(() => l(new We("The operation has timed out.")), n);
|
|
1306
1544
|
e(o, l);
|
|
1307
1545
|
});
|
|
1308
|
-
a(this,
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
var ke;
|
|
1312
|
-
ke = Symbol.toStringTag;
|
|
1313
|
-
class y {
|
|
1314
|
-
constructor() {
|
|
1315
|
-
a(this, "_subscribers");
|
|
1316
|
-
a(this, ke, "Publisher");
|
|
1317
|
-
this._subscribers = [];
|
|
1318
|
-
}
|
|
1319
|
-
subscribe(t) {
|
|
1320
|
-
return this._subscribers.push(t), () => {
|
|
1321
|
-
const e = this._subscribers.indexOf(t);
|
|
1322
|
-
if (e < 0)
|
|
1323
|
-
throw new Ce("Unable to unsubscribe the required subscriber. The subscription was already unsubscribed.");
|
|
1324
|
-
this._subscribers.splice(e, 1);
|
|
1325
|
-
};
|
|
1326
|
-
}
|
|
1327
|
-
publish(...t) {
|
|
1328
|
-
return this._subscribers.slice().map((e) => e(...t));
|
|
1546
|
+
a(this, Fe, "TimedPromise");
|
|
1329
1547
|
}
|
|
1330
1548
|
}
|
|
1331
|
-
var
|
|
1332
|
-
function
|
|
1549
|
+
var F = /* @__PURE__ */ ((i) => (i[i.Millisecond = 1] = "Millisecond", i[i.Second = 1e3] = "Second", i[i.Minute = 6e4] = "Minute", i[i.Hour = 36e5] = "Hour", i[i.Day = 864e5] = "Day", i[i.Week = 6048e5] = "Week", i[i.Month = 2592e6] = "Month", i[i.Year = 31536e6] = "Year", i))(F || {});
|
|
1550
|
+
function ut(i, t, e = 864e5) {
|
|
1333
1551
|
return i = new Date(i), t = new Date(t), Math.floor((t.getTime() - i.getTime()) / e);
|
|
1334
1552
|
}
|
|
1335
|
-
function
|
|
1336
|
-
return i = new Date(i), t = new Date(t), new
|
|
1553
|
+
function ct(i, t, e = 864e5) {
|
|
1554
|
+
return i = new Date(i), t = new Date(t), new c(function* () {
|
|
1337
1555
|
const n = t.getTime();
|
|
1338
|
-
let
|
|
1339
|
-
for (;
|
|
1340
|
-
yield new Date(
|
|
1556
|
+
let s = i.getTime();
|
|
1557
|
+
for (; s < n; )
|
|
1558
|
+
yield new Date(s), s += e;
|
|
1341
1559
|
});
|
|
1342
1560
|
}
|
|
1343
|
-
function
|
|
1561
|
+
function ht(i, t = 864e5) {
|
|
1344
1562
|
return i = new Date(i), new Date(Math.floor(i.getTime() / t) * t);
|
|
1345
1563
|
}
|
|
1346
|
-
var
|
|
1347
|
-
class
|
|
1348
|
-
constructor(e =
|
|
1349
|
-
super((n) => this.
|
|
1350
|
-
a(this, "
|
|
1351
|
-
a(this, "
|
|
1352
|
-
|
|
1353
|
-
a(this, Se, "Clock");
|
|
1354
|
-
this._starter = new y(), this._stopper = new y(), this._ticker = new y();
|
|
1564
|
+
var Pe, De;
|
|
1565
|
+
class ft extends (De = qe, Pe = Symbol.toStringTag, De) {
|
|
1566
|
+
constructor(e = F.Second) {
|
|
1567
|
+
super((n) => this._publisher.publish("tick", n), e);
|
|
1568
|
+
a(this, "_publisher");
|
|
1569
|
+
a(this, Pe, "Clock");
|
|
1570
|
+
this._publisher = new M();
|
|
1355
1571
|
}
|
|
1356
1572
|
start(e = 0) {
|
|
1357
1573
|
if (this._isRunning)
|
|
1358
|
-
throw new
|
|
1359
|
-
super.start(e), this.
|
|
1574
|
+
throw new m("The clock has already been started.");
|
|
1575
|
+
super.start(e), this._publisher.publish("start");
|
|
1360
1576
|
}
|
|
1361
1577
|
stop() {
|
|
1362
1578
|
if (!this._isRunning)
|
|
1363
|
-
throw new
|
|
1364
|
-
super.stop(), this.
|
|
1579
|
+
throw new m("The clock hadn't yet started.");
|
|
1580
|
+
super.stop(), this._publisher.publish("stop");
|
|
1365
1581
|
}
|
|
1366
1582
|
onStart(e) {
|
|
1367
|
-
return this.
|
|
1583
|
+
return this._publisher.subscribe("start", e);
|
|
1368
1584
|
}
|
|
1369
1585
|
onStop(e) {
|
|
1370
|
-
return this.
|
|
1586
|
+
return this._publisher.subscribe("stop", e);
|
|
1371
1587
|
}
|
|
1372
1588
|
onTick(e, n = 0) {
|
|
1373
1589
|
if (n < 0)
|
|
1374
|
-
throw new
|
|
1590
|
+
throw new $e("The tick step must be a non-negative number.");
|
|
1375
1591
|
if (n === 0)
|
|
1376
|
-
return this.
|
|
1377
|
-
let
|
|
1378
|
-
return this.
|
|
1379
|
-
|
|
1592
|
+
return this._publisher.subscribe("tick", e);
|
|
1593
|
+
let s = 0;
|
|
1594
|
+
return this._publisher.subscribe("tick", (r) => {
|
|
1595
|
+
r - s < n || (e(r), s = r);
|
|
1380
1596
|
});
|
|
1381
1597
|
}
|
|
1382
1598
|
}
|
|
1383
|
-
var
|
|
1384
|
-
class
|
|
1385
|
-
constructor(e, n =
|
|
1599
|
+
var Ie, Ce;
|
|
1600
|
+
class dt extends (Ce = qe, Ie = Symbol.toStringTag, Ce) {
|
|
1601
|
+
constructor(e, n = F.Second) {
|
|
1386
1602
|
super(() => {
|
|
1387
|
-
const
|
|
1388
|
-
this.
|
|
1603
|
+
const r = this.remainingTime;
|
|
1604
|
+
this._publisher.publish("tick", r), r <= 0 && (this._deferrerStop(), this._publisher.publish("expire"));
|
|
1389
1605
|
}, n);
|
|
1390
1606
|
a(this, "_deferrer");
|
|
1391
|
-
a(this, "
|
|
1392
|
-
a(this, "_starter");
|
|
1393
|
-
a(this, "_stopper");
|
|
1394
|
-
a(this, "_ticker");
|
|
1607
|
+
a(this, "_publisher");
|
|
1395
1608
|
a(this, "_duration");
|
|
1396
|
-
a(this,
|
|
1397
|
-
this.
|
|
1609
|
+
a(this, Ie, "Countdown");
|
|
1610
|
+
this._publisher = new M(), this._duration = e;
|
|
1398
1611
|
}
|
|
1399
1612
|
get duration() {
|
|
1400
1613
|
return this._duration;
|
|
@@ -1404,46 +1617,46 @@ class rt extends (Me = je, Te = Symbol.toStringTag, Me) {
|
|
|
1404
1617
|
}
|
|
1405
1618
|
_deferrerStop(e) {
|
|
1406
1619
|
if (!this._isRunning)
|
|
1407
|
-
throw new
|
|
1620
|
+
throw new m("The countdown hadn't yet started.");
|
|
1408
1621
|
if (!this._deferrer)
|
|
1409
|
-
throw new
|
|
1622
|
+
throw new k();
|
|
1410
1623
|
super.stop(), e !== void 0 ? this._deferrer.reject(e) : this._deferrer.resolve(), this._deferrer = void 0;
|
|
1411
1624
|
}
|
|
1412
1625
|
start(e = this.duration) {
|
|
1413
1626
|
if (this._isRunning)
|
|
1414
|
-
throw new
|
|
1627
|
+
throw new m("The countdown has already been started.");
|
|
1415
1628
|
if (this._deferrer)
|
|
1416
|
-
throw new
|
|
1417
|
-
return this._deferrer = new
|
|
1629
|
+
throw new k();
|
|
1630
|
+
return this._deferrer = new Ke(), super.start(this.duration - e), this._publisher.publish("start"), this._deferrer;
|
|
1418
1631
|
}
|
|
1419
1632
|
stop(e) {
|
|
1420
|
-
this._deferrerStop(e), this.
|
|
1633
|
+
this._deferrerStop(e), this._publisher.publish("stop", e);
|
|
1421
1634
|
}
|
|
1422
1635
|
onExpire(e) {
|
|
1423
|
-
return this.
|
|
1636
|
+
return this._publisher.subscribe("expire", e);
|
|
1424
1637
|
}
|
|
1425
1638
|
onStart(e) {
|
|
1426
|
-
return this.
|
|
1639
|
+
return this._publisher.subscribe("start", e);
|
|
1427
1640
|
}
|
|
1428
1641
|
onStop(e) {
|
|
1429
|
-
return this.
|
|
1642
|
+
return this._publisher.subscribe("stop", e);
|
|
1430
1643
|
}
|
|
1431
1644
|
onTick(e, n = 0) {
|
|
1432
1645
|
if (n < 0)
|
|
1433
|
-
throw new
|
|
1646
|
+
throw new $e("The tick step must be a non-negative number.");
|
|
1434
1647
|
if (n === 0)
|
|
1435
|
-
return this.
|
|
1436
|
-
let
|
|
1437
|
-
return this.
|
|
1438
|
-
|
|
1648
|
+
return this._publisher.subscribe("tick", e);
|
|
1649
|
+
let s = 0;
|
|
1650
|
+
return this._publisher.subscribe("tick", (r) => {
|
|
1651
|
+
s - r < n || (e(r), s = r);
|
|
1439
1652
|
});
|
|
1440
1653
|
}
|
|
1441
1654
|
}
|
|
1442
|
-
var
|
|
1443
|
-
|
|
1444
|
-
const
|
|
1655
|
+
var je;
|
|
1656
|
+
je = Symbol.toStringTag;
|
|
1657
|
+
const D = class D {
|
|
1445
1658
|
constructor() {
|
|
1446
|
-
a(this,
|
|
1659
|
+
a(this, je, "Random");
|
|
1447
1660
|
}
|
|
1448
1661
|
static Boolean(t = 0.5) {
|
|
1449
1662
|
return Math.random() < t;
|
|
@@ -1456,34 +1669,28 @@ const M = class M {
|
|
|
1456
1669
|
}
|
|
1457
1670
|
static Index(t) {
|
|
1458
1671
|
if (t.length === 0)
|
|
1459
|
-
throw new
|
|
1672
|
+
throw new p("You must provide at least one element.");
|
|
1460
1673
|
return this.Integer(t.length);
|
|
1461
1674
|
}
|
|
1462
1675
|
static Choice(t) {
|
|
1463
|
-
return t[
|
|
1676
|
+
return t[D.Index(t)];
|
|
1464
1677
|
}
|
|
1465
1678
|
};
|
|
1466
|
-
let
|
|
1467
|
-
function
|
|
1468
|
-
return new Promise((t) => setTimeout(t, i));
|
|
1469
|
-
}
|
|
1470
|
-
function it() {
|
|
1471
|
-
return new Promise((i) => requestAnimationFrame(() => i()));
|
|
1472
|
-
}
|
|
1473
|
-
function ot(i, t = "text/javascript") {
|
|
1679
|
+
let j = D;
|
|
1680
|
+
function mt(i, t = "text/javascript") {
|
|
1474
1681
|
return new Promise((e, n) => {
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1682
|
+
const s = document.createElement("script");
|
|
1683
|
+
s.async = !0, s.defer = !0, s.src = i, s.type = t, s.onload = () => e(), s.onerror = () => n(), document.body.appendChild(s);
|
|
1477
1684
|
});
|
|
1478
1685
|
}
|
|
1479
|
-
function
|
|
1480
|
-
return new
|
|
1686
|
+
function _t(...i) {
|
|
1687
|
+
return new c(function* () {
|
|
1481
1688
|
for (const t of i)
|
|
1482
1689
|
for (const e of t)
|
|
1483
1690
|
yield e;
|
|
1484
1691
|
});
|
|
1485
1692
|
}
|
|
1486
|
-
function
|
|
1693
|
+
function wt(i) {
|
|
1487
1694
|
if (Array.isArray(i))
|
|
1488
1695
|
return i.length;
|
|
1489
1696
|
let t = 0;
|
|
@@ -1491,21 +1698,21 @@ function ut(i) {
|
|
|
1491
1698
|
t += 1;
|
|
1492
1699
|
return t;
|
|
1493
1700
|
}
|
|
1494
|
-
function
|
|
1495
|
-
return new
|
|
1701
|
+
function pt(i) {
|
|
1702
|
+
return new c(function* () {
|
|
1496
1703
|
let t = 0;
|
|
1497
1704
|
for (const e of i)
|
|
1498
1705
|
yield [t, e], t += 1;
|
|
1499
1706
|
});
|
|
1500
1707
|
}
|
|
1501
|
-
function
|
|
1502
|
-
return new
|
|
1708
|
+
function yt(i, t, e = 1) {
|
|
1709
|
+
return new c(function* () {
|
|
1503
1710
|
t === void 0 && (t = i, i = 0), i > t && (e = e ?? -1);
|
|
1504
1711
|
for (let n = i; n < t; n += e)
|
|
1505
1712
|
yield n;
|
|
1506
1713
|
});
|
|
1507
1714
|
}
|
|
1508
|
-
function
|
|
1715
|
+
function gt(i) {
|
|
1509
1716
|
const t = Array.from(i);
|
|
1510
1717
|
for (let e = t.length - 1; e > 0; e -= 1) {
|
|
1511
1718
|
const n = Math.floor(Math.random() * (e + 1));
|
|
@@ -1513,46 +1720,46 @@ function ft(i) {
|
|
|
1513
1720
|
}
|
|
1514
1721
|
return t;
|
|
1515
1722
|
}
|
|
1516
|
-
function
|
|
1517
|
-
return new
|
|
1723
|
+
function bt(i) {
|
|
1724
|
+
return new c(function* () {
|
|
1518
1725
|
const t = /* @__PURE__ */ new Set();
|
|
1519
1726
|
for (const e of i)
|
|
1520
1727
|
t.has(e) || (t.add(e), yield e);
|
|
1521
1728
|
});
|
|
1522
1729
|
}
|
|
1523
|
-
function
|
|
1524
|
-
return new
|
|
1730
|
+
function Le(i, t) {
|
|
1731
|
+
return new c(function* () {
|
|
1525
1732
|
const e = i[Symbol.iterator](), n = t[Symbol.iterator]();
|
|
1526
1733
|
for (; ; ) {
|
|
1527
|
-
const
|
|
1528
|
-
if (
|
|
1734
|
+
const s = e.next(), r = n.next();
|
|
1735
|
+
if (s.done || r.done)
|
|
1529
1736
|
break;
|
|
1530
|
-
yield [
|
|
1737
|
+
yield [s.value, r.value];
|
|
1531
1738
|
}
|
|
1532
1739
|
});
|
|
1533
1740
|
}
|
|
1534
|
-
function
|
|
1741
|
+
function xt(i, t) {
|
|
1535
1742
|
if (t === void 0) {
|
|
1536
|
-
let
|
|
1743
|
+
let r = 0, o = 0;
|
|
1537
1744
|
for (const l of i)
|
|
1538
|
-
|
|
1745
|
+
r += l, o += 1;
|
|
1539
1746
|
if (o === 0)
|
|
1540
|
-
throw new
|
|
1541
|
-
return
|
|
1747
|
+
throw new p("You must provide at least one value.");
|
|
1748
|
+
return r / o;
|
|
1542
1749
|
}
|
|
1543
|
-
let e = 0, n = 0,
|
|
1544
|
-
for (const [
|
|
1750
|
+
let e = 0, n = 0, s = 0;
|
|
1751
|
+
for (const [r, o] of Le(i, t)) {
|
|
1545
1752
|
if (o <= 0)
|
|
1546
|
-
throw new
|
|
1547
|
-
e +=
|
|
1753
|
+
throw new p(`The weight for the value #${s} must be greater than zero.`);
|
|
1754
|
+
e += r * o, n += o, s += 1;
|
|
1548
1755
|
}
|
|
1549
|
-
if (
|
|
1550
|
-
throw new
|
|
1756
|
+
if (s === 0)
|
|
1757
|
+
throw new p("You must provide at least one value and weight.");
|
|
1551
1758
|
if (n > 0)
|
|
1552
|
-
throw new
|
|
1759
|
+
throw new p("The sum of weights must be greater than zero.");
|
|
1553
1760
|
return e / n;
|
|
1554
1761
|
}
|
|
1555
|
-
function
|
|
1762
|
+
function vt(i) {
|
|
1556
1763
|
let t = 0;
|
|
1557
1764
|
for (let e = 0; e < i.length; e += 1) {
|
|
1558
1765
|
const n = i.charCodeAt(e);
|
|
@@ -1560,68 +1767,72 @@ function mt(i) {
|
|
|
1560
1767
|
}
|
|
1561
1768
|
return t;
|
|
1562
1769
|
}
|
|
1563
|
-
function
|
|
1770
|
+
function kt(i) {
|
|
1564
1771
|
let t = 0;
|
|
1565
1772
|
for (const e of i)
|
|
1566
1773
|
t += e;
|
|
1567
1774
|
return t;
|
|
1568
1775
|
}
|
|
1569
|
-
function
|
|
1776
|
+
function St(i) {
|
|
1570
1777
|
return `${i.charAt(0).toUpperCase()}${i.slice(1)}`;
|
|
1571
1778
|
}
|
|
1572
|
-
const
|
|
1779
|
+
const Tt = "2.0.0-rc.8";
|
|
1573
1780
|
export {
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1781
|
+
E as AggregatedAsyncIterator,
|
|
1782
|
+
S as AggregatedIterator,
|
|
1783
|
+
Ge as CallableObject,
|
|
1784
|
+
ft as Clock,
|
|
1785
|
+
dt as Countdown,
|
|
1786
|
+
Ke as DeferredPromise,
|
|
1787
|
+
f as Exception,
|
|
1788
|
+
k as FatalErrorException,
|
|
1789
|
+
Ae as FileException,
|
|
1790
|
+
Ze as FileExistsException,
|
|
1791
|
+
Ue as FileNotFoundException,
|
|
1792
|
+
qe as GameLoop,
|
|
1793
|
+
rt as JSONStorage,
|
|
1794
|
+
x as KeyException,
|
|
1795
|
+
C as LongRunningTask,
|
|
1796
|
+
et as NetworkException,
|
|
1797
|
+
ze as NotImplementedException,
|
|
1798
|
+
tt as PermissionException,
|
|
1799
|
+
M as Publisher,
|
|
1800
|
+
j as Random,
|
|
1801
|
+
$e as RangeException,
|
|
1802
|
+
d as ReducedIterator,
|
|
1803
|
+
Je as ReferenceException,
|
|
1804
|
+
m as RuntimeException,
|
|
1805
|
+
w as SmartAsyncIterator,
|
|
1806
|
+
c as SmartIterator,
|
|
1807
|
+
T as SmartPromise,
|
|
1808
|
+
st as SwitchableCallback,
|
|
1809
|
+
at as Thenable,
|
|
1810
|
+
F as TimeUnit,
|
|
1811
|
+
lt as TimedPromise,
|
|
1812
|
+
We as TimeoutException,
|
|
1813
|
+
nt as TypeException,
|
|
1814
|
+
Tt as VERSION,
|
|
1815
|
+
p as ValueException,
|
|
1816
|
+
xt as average,
|
|
1817
|
+
St as capitalize,
|
|
1818
|
+
_t as chain,
|
|
1819
|
+
wt as count,
|
|
1820
|
+
ut as dateDifference,
|
|
1821
|
+
ct as dateRange,
|
|
1822
|
+
ht as dateRound,
|
|
1823
|
+
it as delay,
|
|
1824
|
+
pt as enumerate,
|
|
1825
|
+
vt as hash,
|
|
1826
|
+
Oe as isBrowser,
|
|
1827
|
+
Qe as isNode,
|
|
1828
|
+
Xe as isWebWorker,
|
|
1829
|
+
mt as loadScript,
|
|
1830
|
+
ot as nextAnimationFrame,
|
|
1831
|
+
yt as range,
|
|
1832
|
+
gt as shuffle,
|
|
1833
|
+
kt as sum,
|
|
1834
|
+
bt as unique,
|
|
1835
|
+
v as yieldToEventLoop,
|
|
1836
|
+
Le as zip
|
|
1626
1837
|
};
|
|
1627
1838
|
//# sourceMappingURL=core.js.map
|