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