@blackglory/match 0.3.2 → 0.3.5
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/es2015/index.min.mjs +1 -1
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +1543 -586
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +1545 -588
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +1 -1
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +1 -1
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +1543 -586
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +1545 -588
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +1 -1
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/match-element.js +2 -2
- package/lib/es2015/match-element.js.map +1 -1
- package/lib/es2015/match.js +2 -2
- package/lib/es2015/match.js.map +1 -1
- package/lib/es2015/matchers/child-nodes.js +3 -3
- package/lib/es2015/matchers/child-nodes.js.map +1 -1
- package/lib/es2015/matchers/children.js +3 -3
- package/lib/es2015/matchers/children.js.map +1 -1
- package/lib/es2015/matchers/css.js +2 -2
- package/lib/es2015/matchers/css.js.map +1 -1
- package/lib/es2015/matchers/element.js +6 -6
- package/lib/es2015/matchers/element.js.map +1 -1
- package/lib/es2015/matchers/multiple.js +5 -5
- package/lib/es2015/matchers/multiple.js.map +1 -1
- package/lib/es2015/matchers/node.js +5 -5
- package/lib/es2015/matchers/node.js.map +1 -1
- package/lib/es2015/matchers/optional.js +1 -1
- package/lib/es2015/matchers/optional.js.map +1 -1
- package/lib/es2015/matchers/repeat.js +2 -2
- package/lib/es2015/matchers/repeat.js.map +1 -1
- package/lib/es2015/matchers/text-content-equals.js +1 -1
- package/lib/es2015/matchers/text-content-equals.js.map +1 -1
- package/lib/es2015/matchers/text-content-includes.js +1 -1
- package/lib/es2015/matchers/text-content-includes.js.map +1 -1
- package/lib/es2015/matchers/text-content-matches.js +1 -1
- package/lib/es2015/matchers/text-content-matches.js.map +1 -1
- package/lib/es2015/matchers/text-node.js +6 -6
- package/lib/es2015/matchers/text-node.js.map +1 -1
- package/lib/es2015/matchers/xpath.js +3 -3
- package/lib/es2015/matchers/xpath.js.map +1 -1
- package/lib/es2015/utils/match-multiple.js +1 -1
- package/lib/es2015/utils/match-multiple.js.map +1 -1
- package/lib/es2015/utils/match-one-by-one.js +3 -3
- package/lib/es2015/utils/match-one-by-one.js.map +1 -1
- package/lib/{es2018/utils/merge.d.ts → es2015/utils/merge-in-place.d.ts} +1 -1
- package/lib/{es2018/utils/merge.js → es2015/utils/merge-in-place.js} +8 -7
- package/lib/es2015/utils/merge-in-place.js.map +1 -0
- package/lib/es2018/match-element.js +2 -2
- package/lib/es2018/match-element.js.map +1 -1
- package/lib/es2018/match.js +2 -2
- package/lib/es2018/match.js.map +1 -1
- package/lib/es2018/matchers/child-nodes.js +3 -3
- package/lib/es2018/matchers/child-nodes.js.map +1 -1
- package/lib/es2018/matchers/children.js +3 -3
- package/lib/es2018/matchers/children.js.map +1 -1
- package/lib/es2018/matchers/css.js +2 -2
- package/lib/es2018/matchers/css.js.map +1 -1
- package/lib/es2018/matchers/element.js +6 -6
- package/lib/es2018/matchers/element.js.map +1 -1
- package/lib/es2018/matchers/multiple.js +5 -5
- package/lib/es2018/matchers/multiple.js.map +1 -1
- package/lib/es2018/matchers/node.js +5 -5
- package/lib/es2018/matchers/node.js.map +1 -1
- package/lib/es2018/matchers/optional.js +1 -1
- package/lib/es2018/matchers/optional.js.map +1 -1
- package/lib/es2018/matchers/repeat.js +2 -2
- package/lib/es2018/matchers/repeat.js.map +1 -1
- package/lib/es2018/matchers/text-content-equals.js +1 -1
- package/lib/es2018/matchers/text-content-equals.js.map +1 -1
- package/lib/es2018/matchers/text-content-includes.js +1 -1
- package/lib/es2018/matchers/text-content-includes.js.map +1 -1
- package/lib/es2018/matchers/text-content-matches.js +1 -1
- package/lib/es2018/matchers/text-content-matches.js.map +1 -1
- package/lib/es2018/matchers/text-node.js +6 -6
- package/lib/es2018/matchers/text-node.js.map +1 -1
- package/lib/es2018/matchers/xpath.js +3 -3
- package/lib/es2018/matchers/xpath.js.map +1 -1
- package/lib/es2018/utils/match-multiple.js +1 -1
- package/lib/es2018/utils/match-multiple.js.map +1 -1
- package/lib/es2018/utils/match-one-by-one.js +3 -3
- package/lib/es2018/utils/match-one-by-one.js.map +1 -1
- package/lib/{es2015/utils/merge.d.ts → es2018/utils/merge-in-place.d.ts} +1 -1
- package/lib/{es2015/utils/merge.js → es2018/utils/merge-in-place.js} +8 -7
- package/lib/es2018/utils/merge-in-place.js.map +1 -0
- package/package.json +24 -24
- package/CHANGELOG.md +0 -60
- package/lib/es2015/utils/merge.js.map +0 -1
- package/lib/es2018/utils/merge.js.map +0 -1
package/dist/es2015/index.umd.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Match = {}));
|
|
5
|
-
}(this, (function (exports) { 'use strict';
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
8
8
|
|
|
9
|
-
var es2018$
|
|
9
|
+
var es2018$7 = {};
|
|
10
10
|
|
|
11
11
|
var flatMap$1 = {};
|
|
12
12
|
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
const utils_1$5 = utils$1;
|
|
41
41
|
const remove_all_children_1 = removeAllChildren$1;
|
|
42
42
|
function flatMap(node, fn) {
|
|
43
|
-
const newNodes = utils_1$5.cloneNodes(fn(utils_1$5.clone(node)));
|
|
43
|
+
const newNodes = (0, utils_1$5.cloneNodes)(fn((0, utils_1$5.clone)(node)));
|
|
44
44
|
return newNodes.map(node => {
|
|
45
45
|
const newChildNodes = [];
|
|
46
46
|
for (const childNode of node.childNodes) {
|
|
47
|
-
newChildNodes.push(...utils_1$5.cloneNodes(flatMap(childNode, fn)));
|
|
47
|
+
newChildNodes.push(...(0, utils_1$5.cloneNodes)(flatMap(childNode, fn)));
|
|
48
48
|
}
|
|
49
|
-
remove_all_children_1.removeAllChildren(node);
|
|
50
|
-
utils_1$5.copyNodesToChildNodes(newChildNodes, node);
|
|
49
|
+
(0, remove_all_children_1.removeAllChildren)(node);
|
|
50
|
+
(0, utils_1$5.copyNodesToChildNodes)(newChildNodes, node);
|
|
51
51
|
return node;
|
|
52
52
|
});
|
|
53
53
|
}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
map$3.map = void 0;
|
|
59
59
|
const utils_1$4 = utils$1;
|
|
60
60
|
function map$2(node, fn) {
|
|
61
|
-
const newNode = utils_1$4.clone(fn(utils_1$4.clone(node)));
|
|
61
|
+
const newNode = (0, utils_1$4.clone)(fn((0, utils_1$4.clone)(node)));
|
|
62
62
|
for (const node of newNode.childNodes) {
|
|
63
63
|
newNode.replaceChild(map$2(node, fn), node);
|
|
64
64
|
}
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
filter$3.filter = void 0;
|
|
72
72
|
const flat_map_1$1 = flatMap$1;
|
|
73
73
|
function filter$2(node, predicate) {
|
|
74
|
-
const results = flat_map_1$1.flatMap(node, node => {
|
|
74
|
+
const results = (0, flat_map_1$1.flatMap)(node, node => {
|
|
75
75
|
if (predicate(node)) {
|
|
76
76
|
return [node];
|
|
77
77
|
}
|
|
@@ -87,13 +87,13 @@
|
|
|
87
87
|
|
|
88
88
|
var unwrap$1 = {};
|
|
89
89
|
|
|
90
|
-
var es2018$
|
|
90
|
+
var es2018$6 = {};
|
|
91
91
|
|
|
92
92
|
var middleware = {};
|
|
93
93
|
|
|
94
94
|
var chunkAsync$1 = {};
|
|
95
95
|
|
|
96
|
-
var es2018$
|
|
96
|
+
var es2018$5 = {};
|
|
97
97
|
|
|
98
98
|
var go$1 = {};
|
|
99
99
|
|
|
@@ -115,9 +115,9 @@
|
|
|
115
115
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
116
116
|
};__exportStar(go$1, exports);
|
|
117
117
|
|
|
118
|
-
}(es2018$
|
|
118
|
+
}(es2018$5));
|
|
119
119
|
|
|
120
|
-
var es2018$
|
|
120
|
+
var es2018$4 = {};
|
|
121
121
|
|
|
122
122
|
var customError = {};
|
|
123
123
|
|
|
@@ -195,15 +195,15 @@
|
|
|
195
195
|
__exportStar(refute$1, exports);
|
|
196
196
|
__exportStar(assert$1, exports);
|
|
197
197
|
|
|
198
|
-
}(es2018$
|
|
198
|
+
}(es2018$4));
|
|
199
199
|
|
|
200
200
|
chunkAsync$1.chunkAsync = void 0;
|
|
201
|
-
const go_1$
|
|
202
|
-
const errors_1$m = es2018$
|
|
201
|
+
const go_1$g = es2018$5;
|
|
202
|
+
const errors_1$m = es2018$4;
|
|
203
203
|
function chunkAsync(iterable, size) {
|
|
204
|
-
errors_1$m.assert(Number.isInteger(size), 'The parameter size must be an integer');
|
|
205
|
-
errors_1$m.assert(size > 0, 'The parameter size must be greater than 0');
|
|
206
|
-
return go_1$
|
|
204
|
+
(0, errors_1$m.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
205
|
+
(0, errors_1$m.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
206
|
+
return (0, go_1$g.go)(async function* () {
|
|
207
207
|
let buffer = [];
|
|
208
208
|
for await (const element of iterable) {
|
|
209
209
|
buffer.push(element);
|
|
@@ -220,319 +220,297 @@
|
|
|
220
220
|
|
|
221
221
|
var chunkByAsync$1 = {};
|
|
222
222
|
|
|
223
|
-
var es2018$
|
|
223
|
+
var es2018$3 = {};
|
|
224
224
|
|
|
225
|
-
var array = {};
|
|
225
|
+
var array$1 = {};
|
|
226
226
|
|
|
227
|
-
array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
|
|
228
|
-
function isArray(val) {
|
|
227
|
+
array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
|
|
228
|
+
function isArray$1(val) {
|
|
229
229
|
return Array.isArray(val);
|
|
230
230
|
}
|
|
231
|
-
array.isArray = isArray;
|
|
232
|
-
function isntArray(val) {
|
|
233
|
-
return !isArray(val);
|
|
231
|
+
array$1.isArray = isArray$1;
|
|
232
|
+
function isntArray$1(val) {
|
|
233
|
+
return !isArray$1(val);
|
|
234
234
|
}
|
|
235
|
-
array.isntArray = isntArray;
|
|
236
|
-
function isEmptyArray(val) {
|
|
235
|
+
array$1.isntArray = isntArray$1;
|
|
236
|
+
function isEmptyArray$1(val) {
|
|
237
237
|
return val.length === 0;
|
|
238
238
|
}
|
|
239
|
-
array.isEmptyArray = isEmptyArray;
|
|
240
|
-
function isntEmptyArray(val) {
|
|
239
|
+
array$1.isEmptyArray = isEmptyArray$1;
|
|
240
|
+
function isntEmptyArray$1(val) {
|
|
241
241
|
return val.length !== 0;
|
|
242
242
|
}
|
|
243
|
-
array.isntEmptyArray = isntEmptyArray;
|
|
243
|
+
array$1.isntEmptyArray = isntEmptyArray$1;
|
|
244
244
|
|
|
245
|
-
var asyncIterable = {};
|
|
245
|
+
var asyncIterable$1 = {};
|
|
246
246
|
|
|
247
|
-
var _null = {};
|
|
247
|
+
var _null$1 = {};
|
|
248
248
|
|
|
249
|
-
_null.isntNull = _null.isNull = void 0;
|
|
250
|
-
function isNull(val) {
|
|
249
|
+
_null$1.isntNull = _null$1.isNull = void 0;
|
|
250
|
+
function isNull$1(val) {
|
|
251
251
|
return val === null;
|
|
252
252
|
}
|
|
253
|
-
_null.isNull = isNull;
|
|
254
|
-
function isntNull(val) {
|
|
255
|
-
return !isNull(val);
|
|
253
|
+
_null$1.isNull = isNull$1;
|
|
254
|
+
function isntNull$1(val) {
|
|
255
|
+
return !isNull$1(val);
|
|
256
256
|
}
|
|
257
|
-
_null.isntNull = isntNull;
|
|
257
|
+
_null$1.isntNull = isntNull$1;
|
|
258
258
|
|
|
259
|
-
var _undefined = {};
|
|
259
|
+
var _undefined$1 = {};
|
|
260
260
|
|
|
261
|
-
_undefined.isntUndefined = _undefined.isUndefined = void 0;
|
|
262
|
-
function isUndefined(val) {
|
|
261
|
+
_undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
|
|
262
|
+
function isUndefined$1(val) {
|
|
263
263
|
return val === undefined;
|
|
264
264
|
}
|
|
265
|
-
_undefined.isUndefined = isUndefined;
|
|
266
|
-
function isntUndefined(val) {
|
|
267
|
-
return !isUndefined(val);
|
|
265
|
+
_undefined$1.isUndefined = isUndefined$1;
|
|
266
|
+
function isntUndefined$1(val) {
|
|
267
|
+
return !isUndefined$1(val);
|
|
268
268
|
}
|
|
269
|
-
_undefined.isntUndefined = isntUndefined;
|
|
269
|
+
_undefined$1.isntUndefined = isntUndefined$1;
|
|
270
270
|
|
|
271
|
-
asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
|
|
272
|
-
const null_1$
|
|
273
|
-
const undefined_1$
|
|
274
|
-
function isAsyncIterable(val) {
|
|
275
|
-
return null_1$
|
|
276
|
-
&& undefined_1$
|
|
271
|
+
asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
|
|
272
|
+
const null_1$3 = _null$1;
|
|
273
|
+
const undefined_1$5 = _undefined$1;
|
|
274
|
+
function isAsyncIterable$1(val) {
|
|
275
|
+
return (0, null_1$3.isntNull)(val)
|
|
276
|
+
&& (0, undefined_1$5.isntUndefined)(val)
|
|
277
277
|
&& typeof val[Symbol.asyncIterator] === 'function';
|
|
278
278
|
}
|
|
279
|
-
asyncIterable.isAsyncIterable = isAsyncIterable;
|
|
280
|
-
function isntAsyncIterable(val) {
|
|
281
|
-
return !isAsyncIterable(val);
|
|
279
|
+
asyncIterable$1.isAsyncIterable = isAsyncIterable$1;
|
|
280
|
+
function isntAsyncIterable$1(val) {
|
|
281
|
+
return !isAsyncIterable$1(val);
|
|
282
282
|
}
|
|
283
|
-
asyncIterable.isntAsyncIterable = isntAsyncIterable;
|
|
283
|
+
asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
|
|
284
284
|
|
|
285
|
-
var bigint = {};
|
|
285
|
+
var bigint$1 = {};
|
|
286
286
|
|
|
287
|
-
bigint.isntBigInt = bigint.isBigInt = void 0;
|
|
288
|
-
function isBigInt(val) {
|
|
287
|
+
bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
|
|
288
|
+
function isBigInt$1(val) {
|
|
289
289
|
return typeof val === 'bigint';
|
|
290
290
|
}
|
|
291
|
-
bigint.isBigInt = isBigInt;
|
|
292
|
-
function isntBigInt(val) {
|
|
293
|
-
return !isBigInt(val);
|
|
291
|
+
bigint$1.isBigInt = isBigInt$1;
|
|
292
|
+
function isntBigInt$1(val) {
|
|
293
|
+
return !isBigInt$1(val);
|
|
294
294
|
}
|
|
295
|
-
bigint.isntBigInt = isntBigInt;
|
|
295
|
+
bigint$1.isntBigInt = isntBigInt$1;
|
|
296
296
|
|
|
297
|
-
var boolean = {};
|
|
297
|
+
var boolean$1 = {};
|
|
298
298
|
|
|
299
|
-
boolean.isntBoolean = boolean.isBoolean = void 0;
|
|
300
|
-
function isBoolean(val) {
|
|
299
|
+
boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
|
|
300
|
+
function isBoolean$1(val) {
|
|
301
301
|
return typeof val === 'boolean';
|
|
302
302
|
}
|
|
303
|
-
boolean.isBoolean = isBoolean;
|
|
304
|
-
function isntBoolean(val) {
|
|
305
|
-
return !isBoolean(val);
|
|
303
|
+
boolean$1.isBoolean = isBoolean$1;
|
|
304
|
+
function isntBoolean$1(val) {
|
|
305
|
+
return !isBoolean$1(val);
|
|
306
306
|
}
|
|
307
|
-
boolean.isntBoolean = isntBoolean;
|
|
307
|
+
boolean$1.isntBoolean = isntBoolean$1;
|
|
308
308
|
|
|
309
|
-
var char = {};
|
|
309
|
+
var char$1 = {};
|
|
310
310
|
|
|
311
|
-
var string = {};
|
|
311
|
+
var string$1 = {};
|
|
312
312
|
|
|
313
|
-
string.
|
|
314
|
-
function isString(val) {
|
|
315
|
-
return isStringPrimitive(val) || isStringObject(val);
|
|
316
|
-
}
|
|
317
|
-
string.isString = isString;
|
|
318
|
-
function isntString(val) {
|
|
319
|
-
return !isString(val);
|
|
320
|
-
}
|
|
321
|
-
string.isntString = isntString;
|
|
322
|
-
function isStringPrimitive(val) {
|
|
313
|
+
string$1.isntString = string$1.isString = void 0;
|
|
314
|
+
function isString$1(val) {
|
|
323
315
|
return typeof val === 'string';
|
|
324
316
|
}
|
|
325
|
-
string.
|
|
326
|
-
function
|
|
327
|
-
return !
|
|
328
|
-
}
|
|
329
|
-
string.isntStringPrimitive = isntStringPrimitive;
|
|
330
|
-
function isStringObject(val) {
|
|
331
|
-
return typeof val === 'object' && val instanceof String;
|
|
317
|
+
string$1.isString = isString$1;
|
|
318
|
+
function isntString$1(val) {
|
|
319
|
+
return !isString$1(val);
|
|
332
320
|
}
|
|
333
|
-
string.
|
|
334
|
-
function isntStringObject(val) {
|
|
335
|
-
return !isStringObject(val);
|
|
336
|
-
}
|
|
337
|
-
string.isntStringObject = isntStringObject;
|
|
321
|
+
string$1.isntString = isntString$1;
|
|
338
322
|
|
|
339
|
-
char.
|
|
340
|
-
const string_1$
|
|
341
|
-
function isChar(val) {
|
|
342
|
-
return (string_1$
|
|
343
|
-
&& val.length === 1;
|
|
344
|
-
}
|
|
345
|
-
char.isChar = isChar;
|
|
346
|
-
function isntChar(val) {
|
|
347
|
-
return !isChar(val);
|
|
348
|
-
}
|
|
349
|
-
char.isntChar = isntChar;
|
|
350
|
-
function isCharPrimitive(val) {
|
|
351
|
-
return string_1$1.isString(val)
|
|
323
|
+
char$1.isntChar = char$1.isChar = void 0;
|
|
324
|
+
const string_1$3 = string$1;
|
|
325
|
+
function isChar$1(val) {
|
|
326
|
+
return (0, string_1$3.isString)(val)
|
|
352
327
|
&& val.length === 1;
|
|
353
328
|
}
|
|
354
|
-
char.
|
|
355
|
-
function
|
|
356
|
-
return !
|
|
329
|
+
char$1.isChar = isChar$1;
|
|
330
|
+
function isntChar$1(val) {
|
|
331
|
+
return !isChar$1(val);
|
|
357
332
|
}
|
|
358
|
-
char.
|
|
359
|
-
function isCharObject(val) {
|
|
360
|
-
return string_1$1.isStringObject(val)
|
|
361
|
-
&& val.length === 1;
|
|
362
|
-
}
|
|
363
|
-
char.isCharObject = isCharObject;
|
|
364
|
-
function isntCharObject(val) {
|
|
365
|
-
return !isCharObject(val);
|
|
366
|
-
}
|
|
367
|
-
char.isntCharObject = isntCharObject;
|
|
333
|
+
char$1.isntChar = isntChar$1;
|
|
368
334
|
|
|
369
|
-
var date = {};
|
|
335
|
+
var date$1 = {};
|
|
370
336
|
|
|
371
|
-
date.isntDate = date.isDate = void 0;
|
|
372
|
-
function isDate(val) {
|
|
337
|
+
date$1.isntDate = date$1.isDate = void 0;
|
|
338
|
+
function isDate$1(val) {
|
|
373
339
|
return val instanceof Date;
|
|
374
340
|
}
|
|
375
|
-
date.isDate = isDate;
|
|
376
|
-
function isntDate(val) {
|
|
377
|
-
return !isDate(val);
|
|
341
|
+
date$1.isDate = isDate$1;
|
|
342
|
+
function isntDate$1(val) {
|
|
343
|
+
return !isDate$1(val);
|
|
378
344
|
}
|
|
379
|
-
date.isntDate = isntDate;
|
|
345
|
+
date$1.isntDate = isntDate$1;
|
|
380
346
|
|
|
381
|
-
var _enum = {};
|
|
347
|
+
var _enum$1 = {};
|
|
382
348
|
|
|
383
|
-
_enum.inEnum = void 0;
|
|
384
|
-
function inEnum(val, _enum) {
|
|
349
|
+
_enum$1.inEnum = void 0;
|
|
350
|
+
function inEnum$1(val, _enum) {
|
|
385
351
|
return Object.values(_enum).includes(val);
|
|
386
352
|
}
|
|
387
|
-
_enum.inEnum = inEnum;
|
|
353
|
+
_enum$1.inEnum = inEnum$1;
|
|
388
354
|
|
|
389
|
-
var
|
|
355
|
+
var error$1 = {};
|
|
390
356
|
|
|
391
|
-
|
|
392
|
-
function
|
|
357
|
+
error$1.isntError = error$1.isError = void 0;
|
|
358
|
+
function isError$1(val) {
|
|
359
|
+
return val instanceof Error;
|
|
360
|
+
}
|
|
361
|
+
error$1.isError = isError$1;
|
|
362
|
+
function isntError$1(val) {
|
|
363
|
+
return !isError$1(val);
|
|
364
|
+
}
|
|
365
|
+
error$1.isntError = isntError$1;
|
|
366
|
+
|
|
367
|
+
var falsy$1 = {};
|
|
368
|
+
|
|
369
|
+
falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
|
|
370
|
+
function isFalsy$1(val) {
|
|
393
371
|
return !val;
|
|
394
372
|
}
|
|
395
|
-
falsy.isFalsy = isFalsy;
|
|
396
|
-
function isntFalsy(val) {
|
|
397
|
-
return !isFalsy(val);
|
|
373
|
+
falsy$1.isFalsy = isFalsy$1;
|
|
374
|
+
function isntFalsy$1(val) {
|
|
375
|
+
return !isFalsy$1(val);
|
|
398
376
|
}
|
|
399
|
-
falsy.isntFalsy = isntFalsy;
|
|
377
|
+
falsy$1.isntFalsy = isntFalsy$1;
|
|
400
378
|
|
|
401
|
-
var _function = {};
|
|
379
|
+
var _function$1 = {};
|
|
402
380
|
|
|
403
|
-
_function.isntFunction = _function.isFunction = void 0;
|
|
404
|
-
function isFunction(val) {
|
|
381
|
+
_function$1.isntFunction = _function$1.isFunction = void 0;
|
|
382
|
+
function isFunction$1(val) {
|
|
405
383
|
return typeof val === 'function';
|
|
406
384
|
}
|
|
407
|
-
_function.isFunction = isFunction;
|
|
408
|
-
function isntFunction(val) {
|
|
409
|
-
return !isFunction(val);
|
|
385
|
+
_function$1.isFunction = isFunction$1;
|
|
386
|
+
function isntFunction$1(val) {
|
|
387
|
+
return !isFunction$1(val);
|
|
410
388
|
}
|
|
411
|
-
_function.isntFunction = isntFunction;
|
|
389
|
+
_function$1.isntFunction = isntFunction$1;
|
|
412
390
|
|
|
413
|
-
var iterable = {};
|
|
391
|
+
var iterable$1 = {};
|
|
414
392
|
|
|
415
|
-
iterable.isntIterable = iterable.isIterable = void 0;
|
|
416
|
-
const null_1 = _null;
|
|
417
|
-
const undefined_1$
|
|
418
|
-
function isIterable(val) {
|
|
419
|
-
return null_1.isntNull(val)
|
|
420
|
-
&& undefined_1$
|
|
393
|
+
iterable$1.isntIterable = iterable$1.isIterable = void 0;
|
|
394
|
+
const null_1$2 = _null$1;
|
|
395
|
+
const undefined_1$4 = _undefined$1;
|
|
396
|
+
function isIterable$1(val) {
|
|
397
|
+
return (0, null_1$2.isntNull)(val)
|
|
398
|
+
&& (0, undefined_1$4.isntUndefined)(val)
|
|
421
399
|
&& typeof val[Symbol.iterator] === 'function';
|
|
422
400
|
}
|
|
423
|
-
iterable.isIterable = isIterable;
|
|
424
|
-
function isntIterable(val) {
|
|
425
|
-
return !isIterable(val);
|
|
401
|
+
iterable$1.isIterable = isIterable$1;
|
|
402
|
+
function isntIterable$1(val) {
|
|
403
|
+
return !isIterable$1(val);
|
|
426
404
|
}
|
|
427
|
-
iterable.isntIterable = isntIterable;
|
|
405
|
+
iterable$1.isntIterable = isntIterable$1;
|
|
428
406
|
|
|
429
|
-
var jsonRpc = {};
|
|
407
|
+
var jsonRpc$1 = {};
|
|
430
408
|
|
|
431
|
-
var object = {};
|
|
409
|
+
var object$1 = {};
|
|
432
410
|
|
|
433
|
-
object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
|
|
434
|
-
function isObject(val) {
|
|
411
|
+
object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isRecord = object$1.isntObject = object$1.isObject = void 0;
|
|
412
|
+
function isObject$2(val) {
|
|
435
413
|
return val !== null && typeof val === 'object';
|
|
436
414
|
}
|
|
437
|
-
object.isObject = isObject;
|
|
438
|
-
function isntObject(val) {
|
|
439
|
-
return !isObject(val);
|
|
415
|
+
object$1.isObject = isObject$2;
|
|
416
|
+
function isntObject$1(val) {
|
|
417
|
+
return !isObject$2(val);
|
|
440
418
|
}
|
|
441
|
-
object.isntObject = isntObject;
|
|
419
|
+
object$1.isntObject = isntObject$1;
|
|
442
420
|
function isRecord(val) {
|
|
443
|
-
return isObject(val);
|
|
421
|
+
return isObject$2(val);
|
|
444
422
|
}
|
|
445
|
-
object.isRecord = isRecord;
|
|
446
|
-
function isEmptyObject(val) {
|
|
423
|
+
object$1.isRecord = isRecord;
|
|
424
|
+
function isEmptyObject$1(val) {
|
|
447
425
|
return Object.keys(val).length === 0;
|
|
448
426
|
}
|
|
449
|
-
object.isEmptyObject = isEmptyObject;
|
|
450
|
-
function isntEmptyObject(val) {
|
|
427
|
+
object$1.isEmptyObject = isEmptyObject$1;
|
|
428
|
+
function isntEmptyObject$1(val) {
|
|
451
429
|
return Object.keys(val).length !== 0;
|
|
452
430
|
}
|
|
453
|
-
object.isntEmptyObject = isntEmptyObject;
|
|
431
|
+
object$1.isntEmptyObject = isntEmptyObject$1;
|
|
454
432
|
|
|
455
|
-
var number = {};
|
|
433
|
+
var number$1 = {};
|
|
456
434
|
|
|
457
|
-
number.isntNumber = number.isNumber = void 0;
|
|
458
|
-
function isNumber(val) {
|
|
435
|
+
number$1.isntNumber = number$1.isNumber = void 0;
|
|
436
|
+
function isNumber$1(val) {
|
|
459
437
|
return typeof val === 'number';
|
|
460
438
|
}
|
|
461
|
-
number.isNumber = isNumber;
|
|
462
|
-
function isntNumber(val) {
|
|
463
|
-
return !isNumber(val);
|
|
464
|
-
}
|
|
465
|
-
number.isntNumber = isntNumber;
|
|
466
|
-
|
|
467
|
-
jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
|
|
468
|
-
const array_1 = array;
|
|
469
|
-
const object_1 = object;
|
|
470
|
-
const string_1 = string;
|
|
471
|
-
const number_1 = number;
|
|
472
|
-
const undefined_1 = _undefined;
|
|
473
|
-
function isJsonRpcId(val) {
|
|
474
|
-
return string_1.isString(val) || number_1.isNumber(val);
|
|
475
|
-
}
|
|
476
|
-
function isJsonRpcParams(val) {
|
|
477
|
-
return array_1.isArray(val) || object_1.isObject(val);
|
|
478
|
-
}
|
|
479
|
-
function isJsonRpcNotification(val) {
|
|
480
|
-
return object_1.isRecord(val)
|
|
481
|
-
&& string_1.isString(val.jsonrpc)
|
|
482
|
-
&& string_1.isString(val.method)
|
|
483
|
-
&& undefined_1.isUndefined(val.id)
|
|
484
|
-
&& isJsonRpcParams(val.params);
|
|
485
|
-
}
|
|
486
|
-
jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
|
|
487
|
-
function isntJsonRpcNotification(val) {
|
|
488
|
-
return !isJsonRpcNotification(val);
|
|
489
|
-
}
|
|
490
|
-
jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
|
|
491
|
-
function isJsonRpcRequest(val) {
|
|
492
|
-
return object_1.isRecord(val)
|
|
493
|
-
&& string_1.isString(val.jsonrpc)
|
|
494
|
-
&& string_1.isString(val.method)
|
|
495
|
-
&& isJsonRpcId(val.id)
|
|
496
|
-
&& isJsonRpcParams(val.params);
|
|
497
|
-
}
|
|
498
|
-
jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
|
|
499
|
-
function isntJsonRpcRequest(val) {
|
|
500
|
-
return !isJsonRpcRequest(val);
|
|
501
|
-
}
|
|
502
|
-
jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
|
|
503
|
-
function isJsonRpcSuccess(val) {
|
|
504
|
-
return object_1.isRecord(val)
|
|
505
|
-
&& string_1.isString(val.jsonrpc)
|
|
506
|
-
&& string_1.isString(val.id)
|
|
507
|
-
&&
|
|
508
|
-
}
|
|
509
|
-
jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
|
|
510
|
-
function isntJsonRpcSuccess(val) {
|
|
511
|
-
return !isJsonRpcSuccess(val);
|
|
512
|
-
}
|
|
513
|
-
jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
|
|
514
|
-
function isJsonRpcError(val) {
|
|
515
|
-
return object_1.isRecord(val)
|
|
516
|
-
&& string_1.isString(val.jsonrpc)
|
|
517
|
-
&& isJsonRpcId(val.id)
|
|
518
|
-
&& isJsonRpcErrorObject(val.error);
|
|
519
|
-
}
|
|
520
|
-
jsonRpc.isJsonRpcError = isJsonRpcError;
|
|
521
|
-
function isntJsonRpcError(val) {
|
|
522
|
-
return !isJsonRpcError(val);
|
|
523
|
-
}
|
|
524
|
-
jsonRpc.isntJsonRpcError = isntJsonRpcError;
|
|
525
|
-
function isJsonRpcErrorObject(val) {
|
|
526
|
-
return object_1.isRecord(val)
|
|
527
|
-
&& number_1.isNumber(val.code)
|
|
528
|
-
&& string_1.isString(val.message)
|
|
529
|
-
&& (undefined_1.isUndefined(val.data) || object_1.isObject(val.data));
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
var json = {};
|
|
533
|
-
|
|
534
|
-
json.isntJson = json.isJson = void 0;
|
|
535
|
-
function isJson(val) {
|
|
439
|
+
number$1.isNumber = isNumber$1;
|
|
440
|
+
function isntNumber$1(val) {
|
|
441
|
+
return !isNumber$1(val);
|
|
442
|
+
}
|
|
443
|
+
number$1.isntNumber = isntNumber$1;
|
|
444
|
+
|
|
445
|
+
jsonRpc$1.isntJsonRpcError = jsonRpc$1.isJsonRpcError = jsonRpc$1.isntJsonRpcSuccess = jsonRpc$1.isJsonRpcSuccess = jsonRpc$1.isntJsonRpcRequest = jsonRpc$1.isJsonRpcRequest = jsonRpc$1.isntJsonRpcNotification = jsonRpc$1.isJsonRpcNotification = void 0;
|
|
446
|
+
const array_1$1 = array$1;
|
|
447
|
+
const object_1$1 = object$1;
|
|
448
|
+
const string_1$2 = string$1;
|
|
449
|
+
const number_1$1 = number$1;
|
|
450
|
+
const undefined_1$3 = _undefined$1;
|
|
451
|
+
function isJsonRpcId$1(val) {
|
|
452
|
+
return (0, string_1$2.isString)(val) || (0, number_1$1.isNumber)(val);
|
|
453
|
+
}
|
|
454
|
+
function isJsonRpcParams$1(val) {
|
|
455
|
+
return (0, array_1$1.isArray)(val) || (0, object_1$1.isObject)(val);
|
|
456
|
+
}
|
|
457
|
+
function isJsonRpcNotification$1(val) {
|
|
458
|
+
return (0, object_1$1.isRecord)(val)
|
|
459
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
460
|
+
&& (0, string_1$2.isString)(val.method)
|
|
461
|
+
&& (0, undefined_1$3.isUndefined)(val.id)
|
|
462
|
+
&& isJsonRpcParams$1(val.params);
|
|
463
|
+
}
|
|
464
|
+
jsonRpc$1.isJsonRpcNotification = isJsonRpcNotification$1;
|
|
465
|
+
function isntJsonRpcNotification$1(val) {
|
|
466
|
+
return !isJsonRpcNotification$1(val);
|
|
467
|
+
}
|
|
468
|
+
jsonRpc$1.isntJsonRpcNotification = isntJsonRpcNotification$1;
|
|
469
|
+
function isJsonRpcRequest$1(val) {
|
|
470
|
+
return (0, object_1$1.isRecord)(val)
|
|
471
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
472
|
+
&& (0, string_1$2.isString)(val.method)
|
|
473
|
+
&& isJsonRpcId$1(val.id)
|
|
474
|
+
&& isJsonRpcParams$1(val.params);
|
|
475
|
+
}
|
|
476
|
+
jsonRpc$1.isJsonRpcRequest = isJsonRpcRequest$1;
|
|
477
|
+
function isntJsonRpcRequest$1(val) {
|
|
478
|
+
return !isJsonRpcRequest$1(val);
|
|
479
|
+
}
|
|
480
|
+
jsonRpc$1.isntJsonRpcRequest = isntJsonRpcRequest$1;
|
|
481
|
+
function isJsonRpcSuccess$1(val) {
|
|
482
|
+
return (0, object_1$1.isRecord)(val)
|
|
483
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
484
|
+
&& (0, string_1$2.isString)(val.id)
|
|
485
|
+
&& 'result' in val;
|
|
486
|
+
}
|
|
487
|
+
jsonRpc$1.isJsonRpcSuccess = isJsonRpcSuccess$1;
|
|
488
|
+
function isntJsonRpcSuccess$1(val) {
|
|
489
|
+
return !isJsonRpcSuccess$1(val);
|
|
490
|
+
}
|
|
491
|
+
jsonRpc$1.isntJsonRpcSuccess = isntJsonRpcSuccess$1;
|
|
492
|
+
function isJsonRpcError$1(val) {
|
|
493
|
+
return (0, object_1$1.isRecord)(val)
|
|
494
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
495
|
+
&& isJsonRpcId$1(val.id)
|
|
496
|
+
&& isJsonRpcErrorObject$1(val.error);
|
|
497
|
+
}
|
|
498
|
+
jsonRpc$1.isJsonRpcError = isJsonRpcError$1;
|
|
499
|
+
function isntJsonRpcError$1(val) {
|
|
500
|
+
return !isJsonRpcError$1(val);
|
|
501
|
+
}
|
|
502
|
+
jsonRpc$1.isntJsonRpcError = isntJsonRpcError$1;
|
|
503
|
+
function isJsonRpcErrorObject$1(val) {
|
|
504
|
+
return (0, object_1$1.isRecord)(val)
|
|
505
|
+
&& (0, number_1$1.isNumber)(val.code)
|
|
506
|
+
&& (0, string_1$2.isString)(val.message)
|
|
507
|
+
&& ((0, undefined_1$3.isUndefined)(val.data) || (0, object_1$1.isObject)(val.data));
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
var json$1 = {};
|
|
511
|
+
|
|
512
|
+
json$1.isntJson = json$1.isJson = void 0;
|
|
513
|
+
function isJson$1(val) {
|
|
536
514
|
try {
|
|
537
515
|
JSON.stringify(val);
|
|
538
516
|
return true;
|
|
@@ -541,16 +519,16 @@
|
|
|
541
519
|
return false;
|
|
542
520
|
}
|
|
543
521
|
}
|
|
544
|
-
json.isJson = isJson;
|
|
545
|
-
function isntJson(val) {
|
|
546
|
-
return !isntJson();
|
|
522
|
+
json$1.isJson = isJson$1;
|
|
523
|
+
function isntJson$1(val) {
|
|
524
|
+
return !isntJson$1();
|
|
547
525
|
}
|
|
548
|
-
json.isntJson = isntJson;
|
|
526
|
+
json$1.isntJson = isntJson$1;
|
|
549
527
|
|
|
550
|
-
var url = {};
|
|
528
|
+
var url$1 = {};
|
|
551
529
|
|
|
552
|
-
url.isAbsoluteURL = void 0;
|
|
553
|
-
function isAbsoluteURL(str) {
|
|
530
|
+
url$1.isAbsoluteURL = void 0;
|
|
531
|
+
function isAbsoluteURL$1(str) {
|
|
554
532
|
try {
|
|
555
533
|
new URL(str);
|
|
556
534
|
return true;
|
|
@@ -559,7 +537,7 @@
|
|
|
559
537
|
return false;
|
|
560
538
|
}
|
|
561
539
|
}
|
|
562
|
-
url.isAbsoluteURL = isAbsoluteURL;
|
|
540
|
+
url$1.isAbsoluteURL = isAbsoluteURL$1;
|
|
563
541
|
|
|
564
542
|
(function (exports) {
|
|
565
543
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -571,31 +549,32 @@
|
|
|
571
549
|
}));
|
|
572
550
|
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
573
551
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
574
|
-
};__exportStar(array, exports);
|
|
575
|
-
__exportStar(asyncIterable, exports);
|
|
576
|
-
__exportStar(bigint, exports);
|
|
577
|
-
__exportStar(boolean, exports);
|
|
578
|
-
__exportStar(char, exports);
|
|
579
|
-
__exportStar(date, exports);
|
|
580
|
-
__exportStar(_enum, exports);
|
|
581
|
-
__exportStar(
|
|
582
|
-
__exportStar(
|
|
583
|
-
__exportStar(
|
|
584
|
-
__exportStar(
|
|
585
|
-
__exportStar(
|
|
586
|
-
__exportStar(
|
|
587
|
-
__exportStar(
|
|
588
|
-
__exportStar(
|
|
589
|
-
__exportStar(
|
|
590
|
-
__exportStar(
|
|
591
|
-
__exportStar(
|
|
552
|
+
};__exportStar(array$1, exports);
|
|
553
|
+
__exportStar(asyncIterable$1, exports);
|
|
554
|
+
__exportStar(bigint$1, exports);
|
|
555
|
+
__exportStar(boolean$1, exports);
|
|
556
|
+
__exportStar(char$1, exports);
|
|
557
|
+
__exportStar(date$1, exports);
|
|
558
|
+
__exportStar(_enum$1, exports);
|
|
559
|
+
__exportStar(error$1, exports);
|
|
560
|
+
__exportStar(falsy$1, exports);
|
|
561
|
+
__exportStar(_function$1, exports);
|
|
562
|
+
__exportStar(iterable$1, exports);
|
|
563
|
+
__exportStar(jsonRpc$1, exports);
|
|
564
|
+
__exportStar(json$1, exports);
|
|
565
|
+
__exportStar(_null$1, exports);
|
|
566
|
+
__exportStar(number$1, exports);
|
|
567
|
+
__exportStar(object$1, exports);
|
|
568
|
+
__exportStar(string$1, exports);
|
|
569
|
+
__exportStar(_undefined$1, exports);
|
|
570
|
+
__exportStar(url$1, exports);
|
|
592
571
|
|
|
593
|
-
}(es2018$
|
|
572
|
+
}(es2018$3));
|
|
594
573
|
|
|
595
574
|
chunkByAsync$1.chunkByAsync = void 0;
|
|
596
|
-
const types_1$l = es2018$
|
|
575
|
+
const types_1$l = es2018$3;
|
|
597
576
|
function chunkByAsync(iterable, predicate) {
|
|
598
|
-
if (types_1$l.isAsyncIterable(iterable)) {
|
|
577
|
+
if ((0, types_1$l.isAsyncIterable)(iterable)) {
|
|
599
578
|
return chunkByAsyncIterable(iterable);
|
|
600
579
|
}
|
|
601
580
|
else {
|
|
@@ -654,12 +633,12 @@
|
|
|
654
633
|
var chunk$1 = {};
|
|
655
634
|
|
|
656
635
|
chunk$1.chunk = void 0;
|
|
657
|
-
const go_1$
|
|
658
|
-
const errors_1$l = es2018$
|
|
636
|
+
const go_1$f = es2018$5;
|
|
637
|
+
const errors_1$l = es2018$4;
|
|
659
638
|
function chunk(iterable, size) {
|
|
660
|
-
errors_1$l.assert(Number.isInteger(size), 'The parameter size must be an integer');
|
|
661
|
-
errors_1$l.assert(size > 0, 'The parameter size must be greater than 0');
|
|
662
|
-
return go_1$
|
|
639
|
+
(0, errors_1$l.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
640
|
+
(0, errors_1$l.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
641
|
+
return (0, go_1$f.go)(function* () {
|
|
663
642
|
let buffer = [];
|
|
664
643
|
for (const element of iterable) {
|
|
665
644
|
buffer.push(element);
|
|
@@ -677,12 +656,12 @@
|
|
|
677
656
|
var concatAsync$1 = {};
|
|
678
657
|
|
|
679
658
|
concatAsync$1.concatAsync = void 0;
|
|
680
|
-
const types_1$k = es2018$
|
|
681
|
-
const go_1$
|
|
659
|
+
const types_1$k = es2018$3;
|
|
660
|
+
const go_1$e = es2018$5;
|
|
682
661
|
function concatAsync(iterable, ...otherIterables) {
|
|
683
|
-
return go_1$
|
|
662
|
+
return (0, go_1$e.go)(async function* () {
|
|
684
663
|
for (const iter of [iterable, ...otherIterables]) {
|
|
685
|
-
if (types_1$k.isAsyncIterable(iter)) {
|
|
664
|
+
if ((0, types_1$k.isAsyncIterable)(iter)) {
|
|
686
665
|
for await (const element of iter) {
|
|
687
666
|
yield element;
|
|
688
667
|
}
|
|
@@ -700,9 +679,9 @@
|
|
|
700
679
|
var concat$2 = {};
|
|
701
680
|
|
|
702
681
|
concat$2.concat = void 0;
|
|
703
|
-
const go_1$
|
|
682
|
+
const go_1$d = es2018$5;
|
|
704
683
|
function concat$1(iterable, ...otherIterables) {
|
|
705
|
-
return go_1$
|
|
684
|
+
return (0, go_1$d.go)(function* () {
|
|
706
685
|
for (const iter of [iterable, ...otherIterables]) {
|
|
707
686
|
yield* iter;
|
|
708
687
|
}
|
|
@@ -729,15 +708,15 @@
|
|
|
729
708
|
utils.copyIterable = copyIterable;
|
|
730
709
|
|
|
731
710
|
dropAsync$1.dropAsync = void 0;
|
|
732
|
-
const go_1$
|
|
711
|
+
const go_1$c = es2018$5;
|
|
733
712
|
const utils_1$3 = utils;
|
|
734
|
-
const errors_1$k = es2018$
|
|
713
|
+
const errors_1$k = es2018$4;
|
|
735
714
|
function dropAsync(iterable, count) {
|
|
736
|
-
errors_1$k.assert(Number.isInteger(count), 'The parameter count must be an integer');
|
|
737
|
-
errors_1$k.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
715
|
+
(0, errors_1$k.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
716
|
+
(0, errors_1$k.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
738
717
|
if (count === 0)
|
|
739
|
-
return utils_1$3.copyAsyncIterable(iterable);
|
|
740
|
-
return go_1$
|
|
718
|
+
return (0, utils_1$3.copyAsyncIterable)(iterable);
|
|
719
|
+
return (0, go_1$c.go)(async function* () {
|
|
741
720
|
var _a;
|
|
742
721
|
const iterator = iterable[Symbol.asyncIterator]();
|
|
743
722
|
let done;
|
|
@@ -764,15 +743,15 @@
|
|
|
764
743
|
var dropRightAsync$1 = {};
|
|
765
744
|
|
|
766
745
|
dropRightAsync$1.dropRightAsync = void 0;
|
|
767
|
-
const go_1$
|
|
746
|
+
const go_1$b = es2018$5;
|
|
768
747
|
const utils_1$2 = utils;
|
|
769
|
-
const errors_1$j = es2018$
|
|
748
|
+
const errors_1$j = es2018$4;
|
|
770
749
|
function dropRightAsync(iterable, count) {
|
|
771
|
-
errors_1$j.assert(Number.isInteger(count), 'The parameter count must be an integer');
|
|
772
|
-
errors_1$j.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
750
|
+
(0, errors_1$j.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
751
|
+
(0, errors_1$j.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
773
752
|
if (count === 0)
|
|
774
|
-
return utils_1$2.copyAsyncIterable(iterable);
|
|
775
|
-
return go_1$
|
|
753
|
+
return (0, utils_1$2.copyAsyncIterable)(iterable);
|
|
754
|
+
return (0, go_1$b.go)(async function* () {
|
|
776
755
|
const arr = await toArrayAsync$2(iterable);
|
|
777
756
|
const result = arr.slice(0, -count);
|
|
778
757
|
for (const value of result) {
|
|
@@ -792,15 +771,15 @@
|
|
|
792
771
|
var dropRight$1 = {};
|
|
793
772
|
|
|
794
773
|
dropRight$1.dropRight = void 0;
|
|
795
|
-
const go_1$
|
|
774
|
+
const go_1$a = es2018$5;
|
|
796
775
|
const utils_1$1 = utils;
|
|
797
|
-
const errors_1$i = es2018$
|
|
776
|
+
const errors_1$i = es2018$4;
|
|
798
777
|
function dropRight(iterable, count) {
|
|
799
|
-
errors_1$i.assert(Number.isInteger(count), 'The parameter count must be an integer');
|
|
800
|
-
errors_1$i.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
778
|
+
(0, errors_1$i.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
779
|
+
(0, errors_1$i.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
801
780
|
if (count === 0)
|
|
802
|
-
return utils_1$1.copyIterable(iterable);
|
|
803
|
-
return go_1$
|
|
781
|
+
return (0, utils_1$1.copyIterable)(iterable);
|
|
782
|
+
return (0, go_1$a.go)(function* () {
|
|
804
783
|
const arr = Array.from(iterable);
|
|
805
784
|
yield* arr.slice(0, -count);
|
|
806
785
|
});
|
|
@@ -810,9 +789,9 @@
|
|
|
810
789
|
var dropUntilAsync$1 = {};
|
|
811
790
|
|
|
812
791
|
dropUntilAsync$1.dropUntilAsync = void 0;
|
|
813
|
-
const types_1$j = es2018$
|
|
792
|
+
const types_1$j = es2018$3;
|
|
814
793
|
function dropUntilAsync(iterable, predicate) {
|
|
815
|
-
if (types_1$j.isAsyncIterable(iterable)) {
|
|
794
|
+
if ((0, types_1$j.isAsyncIterable)(iterable)) {
|
|
816
795
|
return dropUntilAsyncIterable(iterable);
|
|
817
796
|
}
|
|
818
797
|
else {
|
|
@@ -892,15 +871,15 @@
|
|
|
892
871
|
var drop$1 = {};
|
|
893
872
|
|
|
894
873
|
drop$1.drop = void 0;
|
|
895
|
-
const go_1$
|
|
874
|
+
const go_1$9 = es2018$5;
|
|
896
875
|
const utils_1 = utils;
|
|
897
|
-
const errors_1$h = es2018$
|
|
876
|
+
const errors_1$h = es2018$4;
|
|
898
877
|
function drop(iterable, count) {
|
|
899
|
-
errors_1$h.assert(Number.isInteger(count), 'The parameter count must be an integer');
|
|
900
|
-
errors_1$h.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
878
|
+
(0, errors_1$h.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
879
|
+
(0, errors_1$h.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
901
880
|
if (count === 0)
|
|
902
|
-
return utils_1.copyIterable(iterable);
|
|
903
|
-
return go_1$
|
|
881
|
+
return (0, utils_1.copyIterable)(iterable);
|
|
882
|
+
return (0, go_1$9.go)(function* () {
|
|
904
883
|
var _a;
|
|
905
884
|
const iterator = iterable[Symbol.iterator]();
|
|
906
885
|
let done;
|
|
@@ -927,9 +906,9 @@
|
|
|
927
906
|
var filterAsync$1 = {};
|
|
928
907
|
|
|
929
908
|
filterAsync$1.filterAsync = void 0;
|
|
930
|
-
const types_1$i = es2018$
|
|
909
|
+
const types_1$i = es2018$3;
|
|
931
910
|
function filterAsync(iterable, predicate) {
|
|
932
|
-
if (types_1$i.isAsyncIterable(iterable)) {
|
|
911
|
+
if ((0, types_1$i.isAsyncIterable)(iterable)) {
|
|
933
912
|
return filterAsyncIterable(iterable);
|
|
934
913
|
}
|
|
935
914
|
else {
|
|
@@ -974,9 +953,9 @@
|
|
|
974
953
|
var flattenByAsync$1 = {};
|
|
975
954
|
|
|
976
955
|
flattenByAsync$1.flattenByAsync = void 0;
|
|
977
|
-
const types_1$h = es2018$
|
|
956
|
+
const types_1$h = es2018$3;
|
|
978
957
|
function flattenByAsync(iterable, predicate) {
|
|
979
|
-
if (types_1$h.isAsyncIterable(iterable)) {
|
|
958
|
+
if ((0, types_1$h.isAsyncIterable)(iterable)) {
|
|
980
959
|
return flattenByAsyncIterable(iterable);
|
|
981
960
|
}
|
|
982
961
|
else {
|
|
@@ -1009,30 +988,30 @@
|
|
|
1009
988
|
}
|
|
1010
989
|
flattenByAsync$1.flattenByAsync = flattenByAsync;
|
|
1011
990
|
function isFiniteIterable$1(val) {
|
|
1012
|
-
return types_1$h.isIterable(val) && types_1$h.isntChar(val);
|
|
991
|
+
return (0, types_1$h.isIterable)(val) && (0, types_1$h.isntChar)(val);
|
|
1013
992
|
}
|
|
1014
993
|
|
|
1015
994
|
flattenDeepAsync$1.flattenDeepAsync = void 0;
|
|
1016
995
|
const flatten_by_async_1 = flattenByAsync$1;
|
|
1017
|
-
const errors_1$g = es2018$
|
|
996
|
+
const errors_1$g = es2018$4;
|
|
1018
997
|
function flattenDeepAsync(iterable, depth = Infinity) {
|
|
1019
|
-
errors_1$g.assert(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
1020
|
-
errors_1$g.assert(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
1021
|
-
return flatten_by_async_1.flattenByAsync(iterable, (_, level) => level <= depth);
|
|
998
|
+
(0, errors_1$g.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
999
|
+
(0, errors_1$g.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
1000
|
+
return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
|
|
1022
1001
|
}
|
|
1023
1002
|
flattenDeepAsync$1.flattenDeepAsync = flattenDeepAsync;
|
|
1024
1003
|
|
|
1025
1004
|
flattenAsync$1.flattenAsync = void 0;
|
|
1026
1005
|
const flatten_deep_async_1 = flattenDeepAsync$1;
|
|
1027
1006
|
function flattenAsync(iterable) {
|
|
1028
|
-
return flatten_deep_async_1.flattenDeepAsync(iterable, 1);
|
|
1007
|
+
return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
|
|
1029
1008
|
}
|
|
1030
1009
|
flattenAsync$1.flattenAsync = flattenAsync;
|
|
1031
1010
|
|
|
1032
1011
|
var flattenBy$1 = {};
|
|
1033
1012
|
|
|
1034
1013
|
flattenBy$1.flattenBy = void 0;
|
|
1035
|
-
const types_1$g = es2018$
|
|
1014
|
+
const types_1$g = es2018$3;
|
|
1036
1015
|
function flattenBy(iterable, predicate) {
|
|
1037
1016
|
return flatten(iterable, 1);
|
|
1038
1017
|
function* flatten(iterable, level) {
|
|
@@ -1048,18 +1027,18 @@
|
|
|
1048
1027
|
}
|
|
1049
1028
|
flattenBy$1.flattenBy = flattenBy;
|
|
1050
1029
|
function isFiniteIterable(val) {
|
|
1051
|
-
return types_1$g.isIterable(val) && types_1$g.isntChar(val);
|
|
1030
|
+
return (0, types_1$g.isIterable)(val) && (0, types_1$g.isntChar)(val);
|
|
1052
1031
|
}
|
|
1053
1032
|
|
|
1054
1033
|
var flattenDeep$1 = {};
|
|
1055
1034
|
|
|
1056
1035
|
flattenDeep$1.flattenDeep = void 0;
|
|
1057
1036
|
const flatten_by_1 = flattenBy$1;
|
|
1058
|
-
const errors_1$f = es2018$
|
|
1037
|
+
const errors_1$f = es2018$4;
|
|
1059
1038
|
function flattenDeep(iterable, depth = Infinity) {
|
|
1060
|
-
errors_1$f.assert(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
1061
|
-
errors_1$f.assert(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
1062
|
-
return flatten_by_1.flattenBy(iterable, (_, level) => level <= depth);
|
|
1039
|
+
(0, errors_1$f.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
1040
|
+
(0, errors_1$f.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
1041
|
+
return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
|
|
1063
1042
|
}
|
|
1064
1043
|
flattenDeep$1.flattenDeep = flattenDeep;
|
|
1065
1044
|
|
|
@@ -1068,16 +1047,16 @@
|
|
|
1068
1047
|
flatten$1.flatten = void 0;
|
|
1069
1048
|
const flatten_deep_1 = flattenDeep$1;
|
|
1070
1049
|
function flatten(iterable) {
|
|
1071
|
-
return flatten_deep_1.flattenDeep(iterable, 1);
|
|
1050
|
+
return (0, flatten_deep_1.flattenDeep)(iterable, 1);
|
|
1072
1051
|
}
|
|
1073
1052
|
flatten$1.flatten = flatten;
|
|
1074
1053
|
|
|
1075
1054
|
var mapAsync$1 = {};
|
|
1076
1055
|
|
|
1077
1056
|
mapAsync$1.mapAsync = void 0;
|
|
1078
|
-
const types_1$f = es2018$
|
|
1057
|
+
const types_1$f = es2018$3;
|
|
1079
1058
|
function mapAsync(iterable, fn) {
|
|
1080
|
-
if (types_1$f.isAsyncIterable(iterable)) {
|
|
1059
|
+
if ((0, types_1$f.isAsyncIterable)(iterable)) {
|
|
1081
1060
|
return mapAsyncIterable(iterable);
|
|
1082
1061
|
}
|
|
1083
1062
|
else {
|
|
@@ -1115,14 +1094,14 @@
|
|
|
1115
1094
|
var repeatAsync$1 = {};
|
|
1116
1095
|
|
|
1117
1096
|
repeatAsync$1.repeatAsync = void 0;
|
|
1118
|
-
const go_1$
|
|
1119
|
-
const errors_1$e = es2018$
|
|
1097
|
+
const go_1$8 = es2018$5;
|
|
1098
|
+
const errors_1$e = es2018$4;
|
|
1120
1099
|
function repeatAsync(iterable, times) {
|
|
1121
|
-
errors_1$e.assert(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
1122
|
-
errors_1$e.assert(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
1100
|
+
(0, errors_1$e.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
1101
|
+
(0, errors_1$e.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
1123
1102
|
if (times === Infinity)
|
|
1124
1103
|
warnInfiniteLoop$1();
|
|
1125
|
-
return go_1$
|
|
1104
|
+
return (0, go_1$8.go)(async function* () {
|
|
1126
1105
|
const cache = [];
|
|
1127
1106
|
if (times > 0) {
|
|
1128
1107
|
for await (const element of iterable) {
|
|
@@ -1150,14 +1129,14 @@
|
|
|
1150
1129
|
var repeat$4 = {};
|
|
1151
1130
|
|
|
1152
1131
|
repeat$4.repeat = void 0;
|
|
1153
|
-
const go_1$
|
|
1154
|
-
const errors_1$d = es2018$
|
|
1132
|
+
const go_1$7 = es2018$5;
|
|
1133
|
+
const errors_1$d = es2018$4;
|
|
1155
1134
|
function repeat$3(iterable, times) {
|
|
1156
|
-
errors_1$d.assert(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
1157
|
-
errors_1$d.assert(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
1135
|
+
(0, errors_1$d.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
1136
|
+
(0, errors_1$d.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
1158
1137
|
if (times === Infinity)
|
|
1159
1138
|
warnInfiniteLoop();
|
|
1160
|
-
return go_1$
|
|
1139
|
+
return (0, go_1$7.go)(function* () {
|
|
1161
1140
|
const cache = [];
|
|
1162
1141
|
if (times > 0) {
|
|
1163
1142
|
for (const element of iterable) {
|
|
@@ -1185,14 +1164,14 @@
|
|
|
1185
1164
|
var sliceAsync$1 = {};
|
|
1186
1165
|
|
|
1187
1166
|
sliceAsync$1.sliceAsync = void 0;
|
|
1188
|
-
const go_1$
|
|
1189
|
-
const errors_1$c = es2018$
|
|
1167
|
+
const go_1$6 = es2018$5;
|
|
1168
|
+
const errors_1$c = es2018$4;
|
|
1190
1169
|
function sliceAsync(iterable, start, end = Infinity) {
|
|
1191
|
-
errors_1$c.assert(Number.isInteger(start), 'The parameter start must be an integer');
|
|
1192
|
-
errors_1$c.assert(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
1193
|
-
errors_1$c.assert(Number.isInteger(end), 'The parameter end must be an integer');
|
|
1194
|
-
errors_1$c.assert(end >= start, 'The parameter end must be greater than or equal to start');
|
|
1195
|
-
return go_1$
|
|
1170
|
+
(0, errors_1$c.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
1171
|
+
(0, errors_1$c.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
1172
|
+
(0, errors_1$c.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
1173
|
+
(0, errors_1$c.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
1174
|
+
return (0, go_1$6.go)(async function* () {
|
|
1196
1175
|
let index = 0;
|
|
1197
1176
|
for await (const element of iterable) {
|
|
1198
1177
|
if (index >= end)
|
|
@@ -1208,14 +1187,14 @@
|
|
|
1208
1187
|
var slice$1 = {};
|
|
1209
1188
|
|
|
1210
1189
|
slice$1.slice = void 0;
|
|
1211
|
-
const go_1$
|
|
1212
|
-
const errors_1$b = es2018$
|
|
1190
|
+
const go_1$5 = es2018$5;
|
|
1191
|
+
const errors_1$b = es2018$4;
|
|
1213
1192
|
function slice(iterable, start, end = Infinity) {
|
|
1214
|
-
errors_1$b.assert(Number.isInteger(start), 'The parameter start must be an integer');
|
|
1215
|
-
errors_1$b.assert(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
1216
|
-
errors_1$b.assert(Number.isInteger(end), 'The parameter end must be an integer');
|
|
1217
|
-
errors_1$b.assert(end >= start, 'The parameter end must be greater than or equal to start');
|
|
1218
|
-
return go_1$
|
|
1193
|
+
(0, errors_1$b.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
1194
|
+
(0, errors_1$b.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
1195
|
+
(0, errors_1$b.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
1196
|
+
(0, errors_1$b.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
1197
|
+
return (0, go_1$5.go)(function* () {
|
|
1219
1198
|
let index = 0;
|
|
1220
1199
|
for (const element of iterable) {
|
|
1221
1200
|
if (index >= end)
|
|
@@ -1249,9 +1228,9 @@
|
|
|
1249
1228
|
var splitByAsync$1 = {};
|
|
1250
1229
|
|
|
1251
1230
|
splitByAsync$1.splitByAsync = void 0;
|
|
1252
|
-
const types_1$e = es2018$
|
|
1231
|
+
const types_1$e = es2018$3;
|
|
1253
1232
|
function splitByAsync(iterable, predicate) {
|
|
1254
|
-
if (types_1$e.isAsyncIterable(iterable)) {
|
|
1233
|
+
if ((0, types_1$e.isAsyncIterable)(iterable)) {
|
|
1255
1234
|
return splitByAsyncIterable(iterable);
|
|
1256
1235
|
}
|
|
1257
1236
|
else {
|
|
@@ -1331,12 +1310,12 @@
|
|
|
1331
1310
|
var takeAsync$1 = {};
|
|
1332
1311
|
|
|
1333
1312
|
takeAsync$1.takeAsync = void 0;
|
|
1334
|
-
const go_1$
|
|
1335
|
-
const errors_1$a = es2018$
|
|
1313
|
+
const go_1$4 = es2018$5;
|
|
1314
|
+
const errors_1$a = es2018$4;
|
|
1336
1315
|
function takeAsync(iterable, count) {
|
|
1337
|
-
errors_1$a.assert(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1338
|
-
errors_1$a.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
1339
|
-
return go_1$
|
|
1316
|
+
(0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1317
|
+
(0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
1318
|
+
return (0, go_1$4.go)(async function* () {
|
|
1340
1319
|
if (count === 0)
|
|
1341
1320
|
return;
|
|
1342
1321
|
for await (const element of iterable) {
|
|
@@ -1352,12 +1331,12 @@
|
|
|
1352
1331
|
var takeRightAsync$1 = {};
|
|
1353
1332
|
|
|
1354
1333
|
takeRightAsync$1.takeRightAsync = void 0;
|
|
1355
|
-
const go_1$
|
|
1356
|
-
const errors_1$9 = es2018$
|
|
1334
|
+
const go_1$3 = es2018$5;
|
|
1335
|
+
const errors_1$9 = es2018$4;
|
|
1357
1336
|
function takeRightAsync(iterable, count) {
|
|
1358
|
-
errors_1$9.assert(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1359
|
-
errors_1$9.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
1360
|
-
return go_1$
|
|
1337
|
+
(0, errors_1$9.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1338
|
+
(0, errors_1$9.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
1339
|
+
return (0, go_1$3.go)(async function* () {
|
|
1361
1340
|
var _a;
|
|
1362
1341
|
const iterator = iterable[Symbol.asyncIterator]();
|
|
1363
1342
|
let done;
|
|
@@ -1382,12 +1361,12 @@
|
|
|
1382
1361
|
var takeRight$1 = {};
|
|
1383
1362
|
|
|
1384
1363
|
takeRight$1.takeRight = void 0;
|
|
1385
|
-
const go_1$
|
|
1386
|
-
const errors_1$8 = es2018$
|
|
1364
|
+
const go_1$2 = es2018$5;
|
|
1365
|
+
const errors_1$8 = es2018$4;
|
|
1387
1366
|
function takeRight(iterable, count) {
|
|
1388
|
-
errors_1$8.assert(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1389
|
-
errors_1$8.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
1390
|
-
return go_1$
|
|
1367
|
+
(0, errors_1$8.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1368
|
+
(0, errors_1$8.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
1369
|
+
return (0, go_1$2.go)(function* () {
|
|
1391
1370
|
var _a;
|
|
1392
1371
|
const iterator = iterable[Symbol.iterator]();
|
|
1393
1372
|
let done;
|
|
@@ -1412,9 +1391,9 @@
|
|
|
1412
1391
|
var takeUntilAsync$1 = {};
|
|
1413
1392
|
|
|
1414
1393
|
takeUntilAsync$1.takeUntilAsync = void 0;
|
|
1415
|
-
const types_1$d = es2018$
|
|
1394
|
+
const types_1$d = es2018$3;
|
|
1416
1395
|
function takeUntilAsync(iterable, predicate) {
|
|
1417
|
-
if (types_1$d.isAsyncIterable(iterable)) {
|
|
1396
|
+
if ((0, types_1$d.isAsyncIterable)(iterable)) {
|
|
1418
1397
|
return takeUntilAsyncIterable(iterable);
|
|
1419
1398
|
}
|
|
1420
1399
|
else {
|
|
@@ -1458,12 +1437,12 @@
|
|
|
1458
1437
|
var take$1 = {};
|
|
1459
1438
|
|
|
1460
1439
|
take$1.take = void 0;
|
|
1461
|
-
const go_1 = es2018$
|
|
1462
|
-
const errors_1$7 = es2018$
|
|
1440
|
+
const go_1$1 = es2018$5;
|
|
1441
|
+
const errors_1$7 = es2018$4;
|
|
1463
1442
|
function take(iterable, count) {
|
|
1464
|
-
errors_1$7.assert(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1465
|
-
errors_1$7.assert(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
1466
|
-
return go_1.go(function* () {
|
|
1443
|
+
(0, errors_1$7.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1444
|
+
(0, errors_1$7.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
1445
|
+
return (0, go_1$1.go)(function* () {
|
|
1467
1446
|
if (count === 0)
|
|
1468
1447
|
return;
|
|
1469
1448
|
for (const element of iterable) {
|
|
@@ -1479,9 +1458,9 @@
|
|
|
1479
1458
|
var tapAsync$1 = {};
|
|
1480
1459
|
|
|
1481
1460
|
tapAsync$1.tapAsync = void 0;
|
|
1482
|
-
const types_1$c = es2018$
|
|
1461
|
+
const types_1$c = es2018$3;
|
|
1483
1462
|
function tapAsync(iterable, fn) {
|
|
1484
|
-
if (types_1$c.isAsyncIterable(iterable)) {
|
|
1463
|
+
if ((0, types_1$c.isAsyncIterable)(iterable)) {
|
|
1485
1464
|
return tapAsyncIterable(iterable);
|
|
1486
1465
|
}
|
|
1487
1466
|
else {
|
|
@@ -1562,9 +1541,9 @@
|
|
|
1562
1541
|
var uniqByAsync$1 = {};
|
|
1563
1542
|
|
|
1564
1543
|
uniqByAsync$1.uniqByAsync = void 0;
|
|
1565
|
-
const types_1$b = es2018$
|
|
1544
|
+
const types_1$b = es2018$3;
|
|
1566
1545
|
function uniqByAsync(iterable, fn) {
|
|
1567
|
-
if (types_1$b.isAsyncIterable(iterable)) {
|
|
1546
|
+
if ((0, types_1$b.isAsyncIterable)(iterable)) {
|
|
1568
1547
|
return uniqByAsyncIterable(iterable);
|
|
1569
1548
|
}
|
|
1570
1549
|
else {
|
|
@@ -1631,7 +1610,7 @@
|
|
|
1631
1610
|
var zipAsync$1 = {};
|
|
1632
1611
|
|
|
1633
1612
|
zipAsync$1.zipAsync = void 0;
|
|
1634
|
-
const types_1$a = es2018$
|
|
1613
|
+
const types_1$a = es2018$3;
|
|
1635
1614
|
var Kind;
|
|
1636
1615
|
(function (Kind) {
|
|
1637
1616
|
Kind[Kind["Sync"] = 0] = "Sync";
|
|
@@ -1645,7 +1624,7 @@
|
|
|
1645
1624
|
var _a, _b, _c, _d;
|
|
1646
1625
|
const length = iterables.length;
|
|
1647
1626
|
const iterators = iterables.map(iterable => {
|
|
1648
|
-
if (types_1$a.isAsyncIterable(iterable)) {
|
|
1627
|
+
if ((0, types_1$a.isAsyncIterable)(iterable)) {
|
|
1649
1628
|
return [Kind.Async, iterable[Symbol.asyncIterator]()];
|
|
1650
1629
|
}
|
|
1651
1630
|
else {
|
|
@@ -1791,9 +1770,9 @@
|
|
|
1791
1770
|
var eachAsync$1 = {};
|
|
1792
1771
|
|
|
1793
1772
|
eachAsync$1.eachAsync = void 0;
|
|
1794
|
-
const types_1$9 = es2018$
|
|
1773
|
+
const types_1$9 = es2018$3;
|
|
1795
1774
|
function eachAsync(iterable, fn) {
|
|
1796
|
-
if (types_1$9.isAsyncIterable(iterable)) {
|
|
1775
|
+
if ((0, types_1$9.isAsyncIterable)(iterable)) {
|
|
1797
1776
|
return eachAsyncIterable(iterable);
|
|
1798
1777
|
}
|
|
1799
1778
|
else {
|
|
@@ -1831,9 +1810,9 @@
|
|
|
1831
1810
|
var everyAsync$1 = {};
|
|
1832
1811
|
|
|
1833
1812
|
everyAsync$1.everyAsync = void 0;
|
|
1834
|
-
const types_1$8 = es2018$
|
|
1813
|
+
const types_1$8 = es2018$3;
|
|
1835
1814
|
function everyAsync(iterable, predicate) {
|
|
1836
|
-
if (types_1$8.isAsyncIterable(iterable)) {
|
|
1815
|
+
if ((0, types_1$8.isAsyncIterable)(iterable)) {
|
|
1837
1816
|
return everyAsyncIterable(iterable);
|
|
1838
1817
|
}
|
|
1839
1818
|
else {
|
|
@@ -1877,9 +1856,9 @@
|
|
|
1877
1856
|
var findAsync$1 = {};
|
|
1878
1857
|
|
|
1879
1858
|
findAsync$1.findAsync = void 0;
|
|
1880
|
-
const types_1$7 = es2018$
|
|
1859
|
+
const types_1$7 = es2018$3;
|
|
1881
1860
|
function findAsync(iterable, predicate) {
|
|
1882
|
-
if (types_1$7.isAsyncIterable(iterable)) {
|
|
1861
|
+
if ((0, types_1$7.isAsyncIterable)(iterable)) {
|
|
1883
1862
|
return findAsyncIterable(iterable);
|
|
1884
1863
|
}
|
|
1885
1864
|
else {
|
|
@@ -2001,9 +1980,9 @@
|
|
|
2001
1980
|
var reduceAsync$1 = {};
|
|
2002
1981
|
|
|
2003
1982
|
reduceAsync$1.reduceAsync = void 0;
|
|
2004
|
-
const types_1$6 = es2018$
|
|
1983
|
+
const types_1$6 = es2018$3;
|
|
2005
1984
|
function reduceAsync(iterable, fn, initialValue) {
|
|
2006
|
-
if (types_1$6.isUndefined(initialValue)) {
|
|
1985
|
+
if ((0, types_1$6.isUndefined)(initialValue)) {
|
|
2007
1986
|
return reduceAsyncWithoutInitialValue(iterable, fn);
|
|
2008
1987
|
}
|
|
2009
1988
|
else {
|
|
@@ -2012,7 +1991,7 @@
|
|
|
2012
1991
|
}
|
|
2013
1992
|
reduceAsync$1.reduceAsync = reduceAsync;
|
|
2014
1993
|
function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
|
|
2015
|
-
if (types_1$6.isAsyncIterable(iterable)) {
|
|
1994
|
+
if ((0, types_1$6.isAsyncIterable)(iterable)) {
|
|
2016
1995
|
return reduceAsyncIterable(iterable);
|
|
2017
1996
|
}
|
|
2018
1997
|
else {
|
|
@@ -2034,7 +2013,7 @@
|
|
|
2034
2013
|
}
|
|
2035
2014
|
}
|
|
2036
2015
|
function reduceAsyncWithoutInitialValue(iterable, fn) {
|
|
2037
|
-
if (types_1$6.isAsyncIterable(iterable)) {
|
|
2016
|
+
if ((0, types_1$6.isAsyncIterable)(iterable)) {
|
|
2038
2017
|
return reduceAsyncIterable(iterable);
|
|
2039
2018
|
}
|
|
2040
2019
|
else {
|
|
@@ -2097,9 +2076,9 @@
|
|
|
2097
2076
|
var reduce$1 = {};
|
|
2098
2077
|
|
|
2099
2078
|
reduce$1.reduce = void 0;
|
|
2100
|
-
const types_1$5 = es2018$
|
|
2079
|
+
const types_1$5 = es2018$3;
|
|
2101
2080
|
function reduce(iterable, fn, initialValue) {
|
|
2102
|
-
if (types_1$5.isUndefined(initialValue)) {
|
|
2081
|
+
if ((0, types_1$5.isUndefined)(initialValue)) {
|
|
2103
2082
|
return reduceWithoutInitialValue(iterable, fn);
|
|
2104
2083
|
}
|
|
2105
2084
|
else {
|
|
@@ -2144,9 +2123,9 @@
|
|
|
2144
2123
|
var someAsync$1 = {};
|
|
2145
2124
|
|
|
2146
2125
|
someAsync$1.someAsync = void 0;
|
|
2147
|
-
const types_1$4 = es2018$
|
|
2126
|
+
const types_1$4 = es2018$3;
|
|
2148
2127
|
function someAsync(iterable, predicate) {
|
|
2149
|
-
if (types_1$4.isAsyncIterable(iterable)) {
|
|
2128
|
+
if ((0, types_1$4.isAsyncIterable)(iterable)) {
|
|
2150
2129
|
return someAsyncIterable(iterable);
|
|
2151
2130
|
}
|
|
2152
2131
|
else {
|
|
@@ -2236,7 +2215,7 @@
|
|
|
2236
2215
|
toArrayAsync$1.toArrayAsync = void 0;
|
|
2237
2216
|
const consume_1$3 = consume$1;
|
|
2238
2217
|
function toArrayAsync(iterable) {
|
|
2239
|
-
return consume_1$3.consume(iterable, async (iterable) => {
|
|
2218
|
+
return (0, consume_1$3.consume)(iterable, async (iterable) => {
|
|
2240
2219
|
const result = [];
|
|
2241
2220
|
for await (const element of iterable) {
|
|
2242
2221
|
result.push(element);
|
|
@@ -2251,7 +2230,7 @@
|
|
|
2251
2230
|
toArray$1.toArray = void 0;
|
|
2252
2231
|
const consume_1$2 = consume$1;
|
|
2253
2232
|
function toArray(iterable) {
|
|
2254
|
-
return consume_1$2.consume(iterable, iterable => Array.from(iterable));
|
|
2233
|
+
return (0, consume_1$2.consume)(iterable, iterable => Array.from(iterable));
|
|
2255
2234
|
}
|
|
2256
2235
|
toArray$1.toArray = toArray;
|
|
2257
2236
|
|
|
@@ -2260,7 +2239,7 @@
|
|
|
2260
2239
|
toSetAsync$1.toSetAsync = void 0;
|
|
2261
2240
|
const consume_1$1 = consume$1;
|
|
2262
2241
|
function toSetAsync(iterable) {
|
|
2263
|
-
return consume_1$1.consume(iterable, async (iterable) => {
|
|
2242
|
+
return (0, consume_1$1.consume)(iterable, async (iterable) => {
|
|
2264
2243
|
const result = new Set();
|
|
2265
2244
|
for await (const element of iterable) {
|
|
2266
2245
|
result.add(element);
|
|
@@ -2275,7 +2254,7 @@
|
|
|
2275
2254
|
toSet$1.toSet = void 0;
|
|
2276
2255
|
const consume_1 = consume$1;
|
|
2277
2256
|
function toSet(iterable) {
|
|
2278
|
-
return consume_1.consume(iterable, iterable => new Set(iterable));
|
|
2257
|
+
return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
|
|
2279
2258
|
}
|
|
2280
2259
|
toSet$1.toSet = toSet;
|
|
2281
2260
|
|
|
@@ -2328,15 +2307,15 @@
|
|
|
2328
2307
|
};__exportStar(middleware, exports);
|
|
2329
2308
|
__exportStar(output, exports);
|
|
2330
2309
|
|
|
2331
|
-
}(es2018$
|
|
2310
|
+
}(es2018$6));
|
|
2332
2311
|
|
|
2333
2312
|
unwrap$1.unwrap = void 0;
|
|
2334
2313
|
const flat_map_1 = flatMap$1;
|
|
2335
|
-
const iterable_operator_1$2 = es2018$
|
|
2314
|
+
const iterable_operator_1$2 = es2018$6;
|
|
2336
2315
|
function unwrap(node, predicate) {
|
|
2337
|
-
return flat_map_1.flatMap(node, node => {
|
|
2316
|
+
return (0, flat_map_1.flatMap)(node, node => {
|
|
2338
2317
|
if (predicate(node)) {
|
|
2339
|
-
return iterable_operator_1$2.toArray(iterable_operator_1$2.flatten(iterable_operator_1$2.map(node.childNodes, node => unwrap(node, predicate))));
|
|
2318
|
+
return (0, iterable_operator_1$2.toArray)((0, iterable_operator_1$2.flatten)((0, iterable_operator_1$2.map)(node.childNodes, node => unwrap(node, predicate))));
|
|
2340
2319
|
}
|
|
2341
2320
|
else {
|
|
2342
2321
|
return [node];
|
|
@@ -2362,9 +2341,9 @@
|
|
|
2362
2341
|
|
|
2363
2342
|
findInDescendantNodes$1.findInDescendantNodes = void 0;
|
|
2364
2343
|
const traverse_descendant_nodes_1 = traverseDescendantNodes$1;
|
|
2365
|
-
const iterable_operator_1$1 = es2018$
|
|
2344
|
+
const iterable_operator_1$1 = es2018$6;
|
|
2366
2345
|
function findInDescendantNodes(node, predicate) {
|
|
2367
|
-
return iterable_operator_1$1.find(traverse_descendant_nodes_1.traverseDescendantNodes(node), node => predicate(node));
|
|
2346
|
+
return (0, iterable_operator_1$1.find)((0, traverse_descendant_nodes_1.traverseDescendantNodes)(node), node => predicate(node));
|
|
2368
2347
|
}
|
|
2369
2348
|
findInDescendantNodes$1.findInDescendantNodes = findInDescendantNodes;
|
|
2370
2349
|
|
|
@@ -2373,7 +2352,7 @@
|
|
|
2373
2352
|
function find(node, predicate) {
|
|
2374
2353
|
if (predicate(node))
|
|
2375
2354
|
return node;
|
|
2376
|
-
return find_in_descendant_nodes_1.findInDescendantNodes(node, predicate);
|
|
2355
|
+
return (0, find_in_descendant_nodes_1.findInDescendantNodes)(node, predicate);
|
|
2377
2356
|
}
|
|
2378
2357
|
find$1.find = find;
|
|
2379
2358
|
|
|
@@ -2403,7 +2382,7 @@
|
|
|
2403
2382
|
const parse_1 = parse$1;
|
|
2404
2383
|
const stringify_1 = stringify$1;
|
|
2405
2384
|
function normalize(html) {
|
|
2406
|
-
return stringify_1.stringify(parse_1.parse(html));
|
|
2385
|
+
return (0, stringify_1.stringify)((0, parse_1.parse)(html));
|
|
2407
2386
|
}
|
|
2408
2387
|
normalize$1.normalize = normalize;
|
|
2409
2388
|
|
|
@@ -2472,52 +2451,553 @@
|
|
|
2472
2451
|
|
|
2473
2452
|
}(nodeType));
|
|
2474
2453
|
|
|
2475
|
-
|
|
2476
|
-
const node_type_1$2 = nodeType;
|
|
2477
|
-
const types_1$3 = es2018$1;
|
|
2478
|
-
function isDocument(val) {
|
|
2479
|
-
if ('HTMLDocument' in globalThis && val instanceof HTMLDocument)
|
|
2480
|
-
return true;
|
|
2481
|
-
return types_1$3.isRecord(val) && val.nodeType === node_type_1$2.NodeType.DOCUMENT_NODE;
|
|
2482
|
-
}
|
|
2483
|
-
isDocument$1.isDocument = isDocument;
|
|
2454
|
+
var es2018$2 = {};
|
|
2484
2455
|
|
|
2485
|
-
var
|
|
2456
|
+
var array = {};
|
|
2486
2457
|
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
function isElement(val) {
|
|
2491
|
-
if ('HTMLElement' in globalThis && val instanceof HTMLElement)
|
|
2492
|
-
return true;
|
|
2493
|
-
return types_1$2.isRecord(val) && val.nodeType === node_type_1$1.NodeType.ELEMENT_NODE;
|
|
2458
|
+
array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
|
|
2459
|
+
function isArray(val) {
|
|
2460
|
+
return Array.isArray(val);
|
|
2494
2461
|
}
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
const is_document_1$2 = isDocument$1;
|
|
2499
|
-
const is_element_1$4 = isElement$1;
|
|
2500
|
-
function getBySelector(selectors) {
|
|
2501
|
-
const root = (is_element_1$4.isElement(this) || is_document_1$2.isDocument(this)
|
|
2502
|
-
? this
|
|
2503
|
-
: document);
|
|
2504
|
-
const result = root.querySelector(selectors);
|
|
2505
|
-
if (result) {
|
|
2506
|
-
return result;
|
|
2507
|
-
}
|
|
2508
|
-
else {
|
|
2509
|
-
throw new Error(`Could not find any elements matching ${selectors}`);
|
|
2510
|
-
}
|
|
2462
|
+
array.isArray = isArray;
|
|
2463
|
+
function isntArray(val) {
|
|
2464
|
+
return !isArray(val);
|
|
2511
2465
|
}
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2466
|
+
array.isntArray = isntArray;
|
|
2467
|
+
function isEmptyArray(val) {
|
|
2468
|
+
return val.length === 0;
|
|
2469
|
+
}
|
|
2470
|
+
array.isEmptyArray = isEmptyArray;
|
|
2471
|
+
function isntEmptyArray(val) {
|
|
2472
|
+
return val.length !== 0;
|
|
2473
|
+
}
|
|
2474
|
+
array.isntEmptyArray = isntEmptyArray;
|
|
2475
|
+
|
|
2476
|
+
var asyncIterable = {};
|
|
2477
|
+
|
|
2478
|
+
var _null = {};
|
|
2479
|
+
|
|
2480
|
+
_null.isntNull = _null.isNull = void 0;
|
|
2481
|
+
function isNull(val) {
|
|
2482
|
+
return val === null;
|
|
2483
|
+
}
|
|
2484
|
+
_null.isNull = isNull;
|
|
2485
|
+
function isntNull(val) {
|
|
2486
|
+
return !isNull(val);
|
|
2487
|
+
}
|
|
2488
|
+
_null.isntNull = isntNull;
|
|
2489
|
+
|
|
2490
|
+
var _undefined = {};
|
|
2491
|
+
|
|
2492
|
+
_undefined.isntUndefined = _undefined.isUndefined = void 0;
|
|
2493
|
+
function isUndefined(val) {
|
|
2494
|
+
return val === undefined;
|
|
2495
|
+
}
|
|
2496
|
+
_undefined.isUndefined = isUndefined;
|
|
2497
|
+
function isntUndefined(val) {
|
|
2498
|
+
return !isUndefined(val);
|
|
2499
|
+
}
|
|
2500
|
+
_undefined.isntUndefined = isntUndefined;
|
|
2501
|
+
|
|
2502
|
+
asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
|
|
2503
|
+
const null_1$1 = _null;
|
|
2504
|
+
const undefined_1$2 = _undefined;
|
|
2505
|
+
function isAsyncIterable(val) {
|
|
2506
|
+
return (0, null_1$1.isntNull)(val)
|
|
2507
|
+
&& (0, undefined_1$2.isntUndefined)(val)
|
|
2508
|
+
&& typeof val[Symbol.asyncIterator] === 'function';
|
|
2509
|
+
}
|
|
2510
|
+
asyncIterable.isAsyncIterable = isAsyncIterable;
|
|
2511
|
+
function isntAsyncIterable(val) {
|
|
2512
|
+
return !isAsyncIterable(val);
|
|
2513
|
+
}
|
|
2514
|
+
asyncIterable.isntAsyncIterable = isntAsyncIterable;
|
|
2515
|
+
|
|
2516
|
+
var bigint = {};
|
|
2517
|
+
|
|
2518
|
+
bigint.isntBigInt = bigint.isBigInt = void 0;
|
|
2519
|
+
function isBigInt(val) {
|
|
2520
|
+
return typeof val === 'bigint';
|
|
2521
|
+
}
|
|
2522
|
+
bigint.isBigInt = isBigInt;
|
|
2523
|
+
function isntBigInt(val) {
|
|
2524
|
+
return !isBigInt(val);
|
|
2525
|
+
}
|
|
2526
|
+
bigint.isntBigInt = isntBigInt;
|
|
2527
|
+
|
|
2528
|
+
var boolean = {};
|
|
2529
|
+
|
|
2530
|
+
boolean.isntBoolean = boolean.isBoolean = void 0;
|
|
2531
|
+
function isBoolean(val) {
|
|
2532
|
+
return typeof val === 'boolean';
|
|
2533
|
+
}
|
|
2534
|
+
boolean.isBoolean = isBoolean;
|
|
2535
|
+
function isntBoolean(val) {
|
|
2536
|
+
return !isBoolean(val);
|
|
2537
|
+
}
|
|
2538
|
+
boolean.isntBoolean = isntBoolean;
|
|
2539
|
+
|
|
2540
|
+
var char = {};
|
|
2541
|
+
|
|
2542
|
+
var string = {};
|
|
2543
|
+
|
|
2544
|
+
string.isntString = string.isString = void 0;
|
|
2545
|
+
function isString(val) {
|
|
2546
|
+
return typeof val === 'string';
|
|
2547
|
+
}
|
|
2548
|
+
string.isString = isString;
|
|
2549
|
+
function isntString(val) {
|
|
2550
|
+
return !isString(val);
|
|
2551
|
+
}
|
|
2552
|
+
string.isntString = isntString;
|
|
2553
|
+
|
|
2554
|
+
char.isntChar = char.isChar = void 0;
|
|
2555
|
+
const string_1$1 = string;
|
|
2556
|
+
function isChar(val) {
|
|
2557
|
+
return (0, string_1$1.isString)(val)
|
|
2558
|
+
&& val.length === 1;
|
|
2559
|
+
}
|
|
2560
|
+
char.isChar = isChar;
|
|
2561
|
+
function isntChar(val) {
|
|
2562
|
+
return !isChar(val);
|
|
2563
|
+
}
|
|
2564
|
+
char.isntChar = isntChar;
|
|
2565
|
+
|
|
2566
|
+
var date = {};
|
|
2567
|
+
|
|
2568
|
+
date.isntDate = date.isDate = void 0;
|
|
2569
|
+
function isDate(val) {
|
|
2570
|
+
return val instanceof Date;
|
|
2571
|
+
}
|
|
2572
|
+
date.isDate = isDate;
|
|
2573
|
+
function isntDate(val) {
|
|
2574
|
+
return !isDate(val);
|
|
2575
|
+
}
|
|
2576
|
+
date.isntDate = isntDate;
|
|
2577
|
+
|
|
2578
|
+
var _enum = {};
|
|
2579
|
+
|
|
2580
|
+
_enum.inEnum = void 0;
|
|
2581
|
+
function inEnum(val, _enum) {
|
|
2582
|
+
return Object.values(_enum).includes(val);
|
|
2583
|
+
}
|
|
2584
|
+
_enum.inEnum = inEnum;
|
|
2585
|
+
|
|
2586
|
+
var error = {};
|
|
2587
|
+
|
|
2588
|
+
error.isntError = error.isError = void 0;
|
|
2589
|
+
function isError(val) {
|
|
2590
|
+
return val instanceof Error;
|
|
2591
|
+
}
|
|
2592
|
+
error.isError = isError;
|
|
2593
|
+
function isntError(val) {
|
|
2594
|
+
return !isError(val);
|
|
2595
|
+
}
|
|
2596
|
+
error.isntError = isntError;
|
|
2597
|
+
|
|
2598
|
+
var falsy = {};
|
|
2599
|
+
|
|
2600
|
+
falsy.isntFalsy = falsy.isFalsy = void 0;
|
|
2601
|
+
function isFalsy(val) {
|
|
2602
|
+
return !val;
|
|
2603
|
+
}
|
|
2604
|
+
falsy.isFalsy = isFalsy;
|
|
2605
|
+
function isntFalsy(val) {
|
|
2606
|
+
return !isFalsy(val);
|
|
2607
|
+
}
|
|
2608
|
+
falsy.isntFalsy = isntFalsy;
|
|
2609
|
+
|
|
2610
|
+
var _function = {};
|
|
2611
|
+
|
|
2612
|
+
_function.isntFunction = _function.isFunction = void 0;
|
|
2613
|
+
function isFunction(val) {
|
|
2614
|
+
return typeof val === 'function';
|
|
2615
|
+
}
|
|
2616
|
+
_function.isFunction = isFunction;
|
|
2617
|
+
function isntFunction(val) {
|
|
2618
|
+
return !isFunction(val);
|
|
2619
|
+
}
|
|
2620
|
+
_function.isntFunction = isntFunction;
|
|
2621
|
+
|
|
2622
|
+
var iterable = {};
|
|
2623
|
+
|
|
2624
|
+
iterable.isntIterable = iterable.isIterable = void 0;
|
|
2625
|
+
const null_1 = _null;
|
|
2626
|
+
const undefined_1$1 = _undefined;
|
|
2627
|
+
function isIterable(val) {
|
|
2628
|
+
return (0, null_1.isntNull)(val)
|
|
2629
|
+
&& (0, undefined_1$1.isntUndefined)(val)
|
|
2630
|
+
&& typeof val[Symbol.iterator] === 'function';
|
|
2631
|
+
}
|
|
2632
|
+
iterable.isIterable = isIterable;
|
|
2633
|
+
function isntIterable(val) {
|
|
2634
|
+
return !isIterable(val);
|
|
2635
|
+
}
|
|
2636
|
+
iterable.isntIterable = isntIterable;
|
|
2637
|
+
|
|
2638
|
+
var jsonRpc = {};
|
|
2639
|
+
|
|
2640
|
+
var object = {};
|
|
2641
|
+
|
|
2642
|
+
/**
|
|
2643
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
2644
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
2645
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
2646
|
+
* Released under MIT license <https://lodash.com/license>
|
|
2647
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2648
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2649
|
+
*/
|
|
2650
|
+
|
|
2651
|
+
/** `Object#toString` result references. */
|
|
2652
|
+
var objectTag = '[object Object]';
|
|
2653
|
+
|
|
2654
|
+
/**
|
|
2655
|
+
* Checks if `value` is a host object in IE < 9.
|
|
2656
|
+
*
|
|
2657
|
+
* @private
|
|
2658
|
+
* @param {*} value The value to check.
|
|
2659
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
2660
|
+
*/
|
|
2661
|
+
function isHostObject(value) {
|
|
2662
|
+
// Many host objects are `Object` objects that can coerce to strings
|
|
2663
|
+
// despite having improperly defined `toString` methods.
|
|
2664
|
+
var result = false;
|
|
2665
|
+
if (value != null && typeof value.toString != 'function') {
|
|
2666
|
+
try {
|
|
2667
|
+
result = !!(value + '');
|
|
2668
|
+
} catch (e) {}
|
|
2669
|
+
}
|
|
2670
|
+
return result;
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
/**
|
|
2674
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
2675
|
+
*
|
|
2676
|
+
* @private
|
|
2677
|
+
* @param {Function} func The function to wrap.
|
|
2678
|
+
* @param {Function} transform The argument transform.
|
|
2679
|
+
* @returns {Function} Returns the new function.
|
|
2680
|
+
*/
|
|
2681
|
+
function overArg(func, transform) {
|
|
2682
|
+
return function(arg) {
|
|
2683
|
+
return func(transform(arg));
|
|
2684
|
+
};
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
/** Used for built-in method references. */
|
|
2688
|
+
var funcProto = Function.prototype,
|
|
2689
|
+
objectProto$1 = Object.prototype;
|
|
2690
|
+
|
|
2691
|
+
/** Used to resolve the decompiled source of functions. */
|
|
2692
|
+
var funcToString = funcProto.toString;
|
|
2693
|
+
|
|
2694
|
+
/** Used to check objects for own properties. */
|
|
2695
|
+
var hasOwnProperty = objectProto$1.hasOwnProperty;
|
|
2696
|
+
|
|
2697
|
+
/** Used to infer the `Object` constructor. */
|
|
2698
|
+
var objectCtorString = funcToString.call(Object);
|
|
2699
|
+
|
|
2700
|
+
/**
|
|
2701
|
+
* Used to resolve the
|
|
2702
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
2703
|
+
* of values.
|
|
2704
|
+
*/
|
|
2705
|
+
var objectToString$1 = objectProto$1.toString;
|
|
2706
|
+
|
|
2707
|
+
/** Built-in value references. */
|
|
2708
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
2709
|
+
|
|
2710
|
+
/**
|
|
2711
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
2712
|
+
* and has a `typeof` result of "object".
|
|
2713
|
+
*
|
|
2714
|
+
* @static
|
|
2715
|
+
* @memberOf _
|
|
2716
|
+
* @since 4.0.0
|
|
2717
|
+
* @category Lang
|
|
2718
|
+
* @param {*} value The value to check.
|
|
2719
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
2720
|
+
* @example
|
|
2721
|
+
*
|
|
2722
|
+
* _.isObjectLike({});
|
|
2723
|
+
* // => true
|
|
2724
|
+
*
|
|
2725
|
+
* _.isObjectLike([1, 2, 3]);
|
|
2726
|
+
* // => true
|
|
2727
|
+
*
|
|
2728
|
+
* _.isObjectLike(_.noop);
|
|
2729
|
+
* // => false
|
|
2730
|
+
*
|
|
2731
|
+
* _.isObjectLike(null);
|
|
2732
|
+
* // => false
|
|
2733
|
+
*/
|
|
2734
|
+
function isObjectLike$1(value) {
|
|
2735
|
+
return !!value && typeof value == 'object';
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
/**
|
|
2739
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
2740
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
2741
|
+
*
|
|
2742
|
+
* @static
|
|
2743
|
+
* @memberOf _
|
|
2744
|
+
* @since 0.8.0
|
|
2745
|
+
* @category Lang
|
|
2746
|
+
* @param {*} value The value to check.
|
|
2747
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
2748
|
+
* @example
|
|
2749
|
+
*
|
|
2750
|
+
* function Foo() {
|
|
2751
|
+
* this.a = 1;
|
|
2752
|
+
* }
|
|
2753
|
+
*
|
|
2754
|
+
* _.isPlainObject(new Foo);
|
|
2755
|
+
* // => false
|
|
2756
|
+
*
|
|
2757
|
+
* _.isPlainObject([1, 2, 3]);
|
|
2758
|
+
* // => false
|
|
2759
|
+
*
|
|
2760
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
2761
|
+
* // => true
|
|
2762
|
+
*
|
|
2763
|
+
* _.isPlainObject(Object.create(null));
|
|
2764
|
+
* // => true
|
|
2765
|
+
*/
|
|
2766
|
+
function isPlainObject$1(value) {
|
|
2767
|
+
if (!isObjectLike$1(value) ||
|
|
2768
|
+
objectToString$1.call(value) != objectTag || isHostObject(value)) {
|
|
2769
|
+
return false;
|
|
2770
|
+
}
|
|
2771
|
+
var proto = getPrototype(value);
|
|
2772
|
+
if (proto === null) {
|
|
2773
|
+
return true;
|
|
2774
|
+
}
|
|
2775
|
+
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
2776
|
+
return (typeof Ctor == 'function' &&
|
|
2777
|
+
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
var lodash_isplainobject = isPlainObject$1;
|
|
2781
|
+
|
|
2782
|
+
var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
2783
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2784
|
+
};object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
|
|
2785
|
+
const lodash_isplainobject_1 = __importDefault$1(lodash_isplainobject);
|
|
2786
|
+
function isObject$1(val) {
|
|
2787
|
+
return val !== null
|
|
2788
|
+
&& typeof val === 'object';
|
|
2789
|
+
}
|
|
2790
|
+
object.isObject = isObject$1;
|
|
2791
|
+
function isntObject(val) {
|
|
2792
|
+
return !isObject$1(val);
|
|
2793
|
+
}
|
|
2794
|
+
object.isntObject = isntObject;
|
|
2795
|
+
function isPlainObject(val) {
|
|
2796
|
+
return (0, lodash_isplainobject_1.default)(val);
|
|
2797
|
+
}
|
|
2798
|
+
object.isPlainObject = isPlainObject;
|
|
2799
|
+
function isntPlainObject(val) {
|
|
2800
|
+
return !isPlainObject(val);
|
|
2801
|
+
}
|
|
2802
|
+
object.isntPlainObject = isntPlainObject;
|
|
2803
|
+
function isEmptyObject(val) {
|
|
2804
|
+
return Object.keys(val).length === 0;
|
|
2805
|
+
}
|
|
2806
|
+
object.isEmptyObject = isEmptyObject;
|
|
2807
|
+
function isntEmptyObject(val) {
|
|
2808
|
+
return Object.keys(val).length !== 0;
|
|
2809
|
+
}
|
|
2810
|
+
object.isntEmptyObject = isntEmptyObject;
|
|
2811
|
+
|
|
2812
|
+
var number = {};
|
|
2813
|
+
|
|
2814
|
+
number.isntNumber = number.isNumber = void 0;
|
|
2815
|
+
function isNumber(val) {
|
|
2816
|
+
return typeof val === 'number';
|
|
2817
|
+
}
|
|
2818
|
+
number.isNumber = isNumber;
|
|
2819
|
+
function isntNumber(val) {
|
|
2820
|
+
return !isNumber(val);
|
|
2821
|
+
}
|
|
2822
|
+
number.isntNumber = isntNumber;
|
|
2823
|
+
|
|
2824
|
+
jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
|
|
2825
|
+
const array_1 = array;
|
|
2826
|
+
const object_1 = object;
|
|
2827
|
+
const string_1 = string;
|
|
2828
|
+
const number_1 = number;
|
|
2829
|
+
const undefined_1 = _undefined;
|
|
2830
|
+
function isJsonRpcId(val) {
|
|
2831
|
+
return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
|
|
2832
|
+
}
|
|
2833
|
+
function isJsonRpcParams(val) {
|
|
2834
|
+
return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
|
|
2835
|
+
}
|
|
2836
|
+
function isJsonRpcNotification(val) {
|
|
2837
|
+
return (0, object_1.isPlainObject)(val)
|
|
2838
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
2839
|
+
&& (0, string_1.isString)(val.method)
|
|
2840
|
+
&& (0, undefined_1.isUndefined)(val.id)
|
|
2841
|
+
&& isJsonRpcParams(val.params);
|
|
2842
|
+
}
|
|
2843
|
+
jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
|
|
2844
|
+
function isntJsonRpcNotification(val) {
|
|
2845
|
+
return !isJsonRpcNotification(val);
|
|
2846
|
+
}
|
|
2847
|
+
jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
|
|
2848
|
+
function isJsonRpcRequest(val) {
|
|
2849
|
+
return (0, object_1.isPlainObject)(val)
|
|
2850
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
2851
|
+
&& (0, string_1.isString)(val.method)
|
|
2852
|
+
&& isJsonRpcId(val.id)
|
|
2853
|
+
&& isJsonRpcParams(val.params);
|
|
2854
|
+
}
|
|
2855
|
+
jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
|
|
2856
|
+
function isntJsonRpcRequest(val) {
|
|
2857
|
+
return !isJsonRpcRequest(val);
|
|
2858
|
+
}
|
|
2859
|
+
jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
|
|
2860
|
+
function isJsonRpcSuccess(val) {
|
|
2861
|
+
return (0, object_1.isPlainObject)(val)
|
|
2862
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
2863
|
+
&& (0, string_1.isString)(val.id)
|
|
2864
|
+
&& 'result' in val;
|
|
2865
|
+
}
|
|
2866
|
+
jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
|
|
2867
|
+
function isntJsonRpcSuccess(val) {
|
|
2868
|
+
return !isJsonRpcSuccess(val);
|
|
2869
|
+
}
|
|
2870
|
+
jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
|
|
2871
|
+
function isJsonRpcError(val) {
|
|
2872
|
+
return (0, object_1.isPlainObject)(val)
|
|
2873
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
2874
|
+
&& isJsonRpcId(val.id)
|
|
2875
|
+
&& isJsonRpcErrorObject(val.error);
|
|
2876
|
+
}
|
|
2877
|
+
jsonRpc.isJsonRpcError = isJsonRpcError;
|
|
2878
|
+
function isntJsonRpcError(val) {
|
|
2879
|
+
return !isJsonRpcError(val);
|
|
2880
|
+
}
|
|
2881
|
+
jsonRpc.isntJsonRpcError = isntJsonRpcError;
|
|
2882
|
+
function isJsonRpcErrorObject(val) {
|
|
2883
|
+
return (0, object_1.isPlainObject)(val)
|
|
2884
|
+
&& (0, number_1.isNumber)(val.code)
|
|
2885
|
+
&& (0, string_1.isString)(val.message)
|
|
2886
|
+
&& ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
var json = {};
|
|
2890
|
+
|
|
2891
|
+
json.isntJson = json.isJson = void 0;
|
|
2892
|
+
function isJson(val) {
|
|
2893
|
+
try {
|
|
2894
|
+
JSON.stringify(val);
|
|
2895
|
+
return true;
|
|
2896
|
+
}
|
|
2897
|
+
catch (_a) {
|
|
2898
|
+
return false;
|
|
2899
|
+
}
|
|
2900
|
+
}
|
|
2901
|
+
json.isJson = isJson;
|
|
2902
|
+
function isntJson(val) {
|
|
2903
|
+
return !isntJson();
|
|
2904
|
+
}
|
|
2905
|
+
json.isntJson = isntJson;
|
|
2906
|
+
|
|
2907
|
+
var url = {};
|
|
2908
|
+
|
|
2909
|
+
url.isAbsoluteURL = void 0;
|
|
2910
|
+
function isAbsoluteURL(str) {
|
|
2911
|
+
try {
|
|
2912
|
+
new URL(str);
|
|
2913
|
+
return true;
|
|
2914
|
+
}
|
|
2915
|
+
catch (_a) {
|
|
2916
|
+
return false;
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
url.isAbsoluteURL = isAbsoluteURL;
|
|
2920
|
+
|
|
2921
|
+
(function (exports) {
|
|
2922
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2923
|
+
if (k2 === undefined) k2 = k;
|
|
2924
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
2925
|
+
}) : (function(o, m, k, k2) {
|
|
2926
|
+
if (k2 === undefined) k2 = k;
|
|
2927
|
+
o[k2] = m[k];
|
|
2928
|
+
}));
|
|
2929
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
2930
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2931
|
+
};__exportStar(array, exports);
|
|
2932
|
+
__exportStar(asyncIterable, exports);
|
|
2933
|
+
__exportStar(bigint, exports);
|
|
2934
|
+
__exportStar(boolean, exports);
|
|
2935
|
+
__exportStar(char, exports);
|
|
2936
|
+
__exportStar(date, exports);
|
|
2937
|
+
__exportStar(_enum, exports);
|
|
2938
|
+
__exportStar(error, exports);
|
|
2939
|
+
__exportStar(falsy, exports);
|
|
2940
|
+
__exportStar(_function, exports);
|
|
2941
|
+
__exportStar(iterable, exports);
|
|
2942
|
+
__exportStar(jsonRpc, exports);
|
|
2943
|
+
__exportStar(json, exports);
|
|
2944
|
+
__exportStar(_null, exports);
|
|
2945
|
+
__exportStar(number, exports);
|
|
2946
|
+
__exportStar(object, exports);
|
|
2947
|
+
__exportStar(string, exports);
|
|
2948
|
+
__exportStar(_undefined, exports);
|
|
2949
|
+
__exportStar(url, exports);
|
|
2950
|
+
|
|
2951
|
+
}(es2018$2));
|
|
2952
|
+
|
|
2953
|
+
isDocument$1.isDocument = void 0;
|
|
2954
|
+
const node_type_1$2 = nodeType;
|
|
2955
|
+
const types_1$3 = es2018$2;
|
|
2956
|
+
function isDocument(val) {
|
|
2957
|
+
if ('HTMLDocument' in globalThis && val instanceof HTMLDocument)
|
|
2958
|
+
return true;
|
|
2959
|
+
return (0, types_1$3.isObject)(val)
|
|
2960
|
+
&& val.nodeType === node_type_1$2.NodeType.DOCUMENT_NODE;
|
|
2961
|
+
}
|
|
2962
|
+
isDocument$1.isDocument = isDocument;
|
|
2963
|
+
|
|
2964
|
+
var isElement$1 = {};
|
|
2965
|
+
|
|
2966
|
+
isElement$1.isElement = void 0;
|
|
2967
|
+
const node_type_1$1 = nodeType;
|
|
2968
|
+
const types_1$2 = es2018$2;
|
|
2969
|
+
function isElement(val) {
|
|
2970
|
+
if ('HTMLElement' in globalThis && val instanceof HTMLElement)
|
|
2971
|
+
return true;
|
|
2972
|
+
return (0, types_1$2.isObject)(val)
|
|
2973
|
+
&& val.nodeType === node_type_1$1.NodeType.ELEMENT_NODE;
|
|
2974
|
+
}
|
|
2975
|
+
isElement$1.isElement = isElement;
|
|
2976
|
+
|
|
2977
|
+
getBySelector$1.getBySelector = void 0;
|
|
2978
|
+
const is_document_1$2 = isDocument$1;
|
|
2979
|
+
const is_element_1$4 = isElement$1;
|
|
2980
|
+
function getBySelector(selectors) {
|
|
2981
|
+
const root = ((0, is_element_1$4.isElement)(this) || (0, is_document_1$2.isDocument)(this)
|
|
2982
|
+
? this
|
|
2983
|
+
: document);
|
|
2984
|
+
const result = root.querySelector(selectors);
|
|
2985
|
+
if (result) {
|
|
2986
|
+
return result;
|
|
2987
|
+
}
|
|
2988
|
+
else {
|
|
2989
|
+
throw new Error(`Could not find any elements matching ${selectors}`);
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
getBySelector$1.getBySelector = getBySelector;
|
|
2993
|
+
|
|
2994
|
+
var getAllBySelector$1 = {};
|
|
2515
2995
|
|
|
2516
2996
|
getAllBySelector$1.getAllBySelector = void 0;
|
|
2517
2997
|
const is_document_1$1 = isDocument$1;
|
|
2518
2998
|
const is_element_1$3 = isElement$1;
|
|
2519
2999
|
function getAllBySelector(selectors) {
|
|
2520
|
-
const root = (is_element_1$3.isElement(this) || is_document_1$1.isDocument(this)
|
|
3000
|
+
const root = ((0, is_element_1$3.isElement)(this) || (0, is_document_1$1.isDocument)(this)
|
|
2521
3001
|
? this
|
|
2522
3002
|
: document);
|
|
2523
3003
|
const results = root.querySelectorAll(selectors);
|
|
@@ -2546,9 +3026,9 @@
|
|
|
2546
3026
|
|
|
2547
3027
|
findInAncestorNodes$1.findInAncestorNodes = void 0;
|
|
2548
3028
|
const traverse_ancestor_nodes_1 = traverseAncestorNodes$1;
|
|
2549
|
-
const iterable_operator_1 = es2018$
|
|
3029
|
+
const iterable_operator_1 = es2018$6;
|
|
2550
3030
|
function findInAncestorNodes(node, predicate) {
|
|
2551
|
-
return iterable_operator_1.find(traverse_ancestor_nodes_1.traverseAncestorNodes(node), node => predicate(node));
|
|
3031
|
+
return (0, iterable_operator_1.find)((0, traverse_ancestor_nodes_1.traverseAncestorNodes)(node), node => predicate(node));
|
|
2552
3032
|
}
|
|
2553
3033
|
findInAncestorNodes$1.findInAncestorNodes = findInAncestorNodes;
|
|
2554
3034
|
|
|
@@ -2587,10 +3067,10 @@
|
|
|
2587
3067
|
var parentNode$1 = {};
|
|
2588
3068
|
|
|
2589
3069
|
parentNode$1.parentNode = void 0;
|
|
2590
|
-
const errors_1$6 = es2018$
|
|
3070
|
+
const errors_1$6 = es2018$4;
|
|
2591
3071
|
function parentNode(node, distance = 1) {
|
|
2592
|
-
errors_1$6.assert(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
2593
|
-
errors_1$6.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
3072
|
+
(0, errors_1$6.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
3073
|
+
(0, errors_1$6.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
2594
3074
|
return _parentNode(node, distance);
|
|
2595
3075
|
}
|
|
2596
3076
|
parentNode$1.parentNode = parentNode;
|
|
@@ -2609,10 +3089,10 @@
|
|
|
2609
3089
|
var nextSibling$2 = {};
|
|
2610
3090
|
|
|
2611
3091
|
nextSibling$2.nextSibling = void 0;
|
|
2612
|
-
const errors_1$5 = es2018$
|
|
3092
|
+
const errors_1$5 = es2018$4;
|
|
2613
3093
|
function nextSibling$1(node, distance = 1) {
|
|
2614
|
-
errors_1$5.assert(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
2615
|
-
errors_1$5.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
3094
|
+
(0, errors_1$5.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
3095
|
+
(0, errors_1$5.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
2616
3096
|
return _nextSibling(node, distance);
|
|
2617
3097
|
}
|
|
2618
3098
|
nextSibling$2.nextSibling = nextSibling$1;
|
|
@@ -2631,33 +3111,33 @@
|
|
|
2631
3111
|
var previousSibling$1 = {};
|
|
2632
3112
|
|
|
2633
3113
|
previousSibling$1.previousSibling = void 0;
|
|
2634
|
-
const errors_1$4 = es2018$
|
|
3114
|
+
const errors_1$4 = es2018$4;
|
|
2635
3115
|
function previousSibling(node, distance = 1) {
|
|
2636
|
-
errors_1$4.assert(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
2637
|
-
errors_1$4.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
2638
|
-
return
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
return _previousSibling(currentNode, distance - 1);
|
|
3116
|
+
(0, errors_1$4.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
3117
|
+
(0, errors_1$4.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
3118
|
+
return previousSibling(node, distance);
|
|
3119
|
+
function previousSibling(node, distance = 1) {
|
|
3120
|
+
const currentNode = node.previousSibling;
|
|
3121
|
+
if (!currentNode)
|
|
3122
|
+
return undefined;
|
|
3123
|
+
if (distance === 1) {
|
|
3124
|
+
return currentNode;
|
|
3125
|
+
}
|
|
3126
|
+
else {
|
|
3127
|
+
return previousSibling(currentNode, distance - 1);
|
|
3128
|
+
}
|
|
2650
3129
|
}
|
|
2651
3130
|
}
|
|
3131
|
+
previousSibling$1.previousSibling = previousSibling;
|
|
2652
3132
|
|
|
2653
3133
|
var nextElementSibling$2 = {};
|
|
2654
3134
|
|
|
2655
3135
|
nextElementSibling$2.nextElementSibling = void 0;
|
|
2656
3136
|
const is_element_1$2 = isElement$1;
|
|
2657
|
-
const errors_1$3 = es2018$
|
|
3137
|
+
const errors_1$3 = es2018$4;
|
|
2658
3138
|
function nextElementSibling$1(node, distance = 1) {
|
|
2659
|
-
errors_1$3.assert(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
2660
|
-
errors_1$3.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
3139
|
+
(0, errors_1$3.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
3140
|
+
(0, errors_1$3.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
2661
3141
|
return _nextElementSibling(node, distance);
|
|
2662
3142
|
}
|
|
2663
3143
|
nextElementSibling$2.nextElementSibling = nextElementSibling$1;
|
|
@@ -2665,7 +3145,7 @@
|
|
|
2665
3145
|
const currentNode = node.nextSibling;
|
|
2666
3146
|
if (!currentNode)
|
|
2667
3147
|
return undefined;
|
|
2668
|
-
if (is_element_1$2.isElement(currentNode)) {
|
|
3148
|
+
if ((0, is_element_1$2.isElement)(currentNode)) {
|
|
2669
3149
|
if (distance === 1) {
|
|
2670
3150
|
return currentNode;
|
|
2671
3151
|
}
|
|
@@ -2682,36 +3162,36 @@
|
|
|
2682
3162
|
|
|
2683
3163
|
previousElementSibling$1.previousElementSibling = void 0;
|
|
2684
3164
|
const is_element_1$1 = isElement$1;
|
|
2685
|
-
const errors_1$2 = es2018$
|
|
3165
|
+
const errors_1$2 = es2018$4;
|
|
2686
3166
|
function previousElementSibling(node, distance = 1) {
|
|
2687
|
-
errors_1$2.assert(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
2688
|
-
errors_1$2.assert(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
2689
|
-
return
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
3167
|
+
(0, errors_1$2.assert)(Number.isInteger(distance), 'parameter distance must be an integer');
|
|
3168
|
+
(0, errors_1$2.assert)(distance >= 1, 'parameter distance must be greater than or equal to 1');
|
|
3169
|
+
return previousElementSibling(node, distance);
|
|
3170
|
+
function previousElementSibling(node, distance = 1) {
|
|
3171
|
+
const currentNode = node.previousSibling;
|
|
3172
|
+
if (!currentNode)
|
|
3173
|
+
return undefined;
|
|
3174
|
+
if ((0, is_element_1$1.isElement)(currentNode)) {
|
|
3175
|
+
if (distance === 1) {
|
|
3176
|
+
return currentNode;
|
|
3177
|
+
}
|
|
3178
|
+
else {
|
|
3179
|
+
return previousElementSibling(currentNode, distance - 1);
|
|
3180
|
+
}
|
|
2699
3181
|
}
|
|
2700
3182
|
else {
|
|
2701
|
-
return
|
|
3183
|
+
return previousElementSibling(currentNode, distance);
|
|
2702
3184
|
}
|
|
2703
3185
|
}
|
|
2704
|
-
else {
|
|
2705
|
-
return _previousElementSibling(currentNode, distance);
|
|
2706
|
-
}
|
|
2707
3186
|
}
|
|
3187
|
+
previousElementSibling$1.previousElementSibling = previousElementSibling;
|
|
2708
3188
|
|
|
2709
3189
|
var isntDocument$1 = {};
|
|
2710
3190
|
|
|
2711
3191
|
isntDocument$1.isntDocument = void 0;
|
|
2712
3192
|
const is_document_1 = isDocument$1;
|
|
2713
3193
|
function isntDocument(val) {
|
|
2714
|
-
return !is_document_1.isDocument(val);
|
|
3194
|
+
return !(0, is_document_1.isDocument)(val);
|
|
2715
3195
|
}
|
|
2716
3196
|
isntDocument$1.isntDocument = isntDocument;
|
|
2717
3197
|
|
|
@@ -2720,18 +3200,18 @@
|
|
|
2720
3200
|
isntElement$1.isntElement = void 0;
|
|
2721
3201
|
const is_element_1 = isElement$1;
|
|
2722
3202
|
function isntElement(val) {
|
|
2723
|
-
return !is_element_1.isElement(val);
|
|
3203
|
+
return !(0, is_element_1.isElement)(val);
|
|
2724
3204
|
}
|
|
2725
3205
|
isntElement$1.isntElement = isntElement;
|
|
2726
3206
|
|
|
2727
3207
|
var isNode$1 = {};
|
|
2728
3208
|
|
|
2729
3209
|
isNode$1.isNode = void 0;
|
|
2730
|
-
const types_1$1 = es2018$
|
|
3210
|
+
const types_1$1 = es2018$2;
|
|
2731
3211
|
function isNode(val) {
|
|
2732
3212
|
if ('Node' in globalThis && val instanceof Node)
|
|
2733
3213
|
return true;
|
|
2734
|
-
return types_1$1.isObject(val) && 'nodeType' in val;
|
|
3214
|
+
return (0, types_1$1.isObject)(val) && 'nodeType' in val;
|
|
2735
3215
|
}
|
|
2736
3216
|
isNode$1.isNode = isNode;
|
|
2737
3217
|
|
|
@@ -2740,7 +3220,7 @@
|
|
|
2740
3220
|
isntNode$1.isntNode = void 0;
|
|
2741
3221
|
const is_node_1$1 = isNode$1;
|
|
2742
3222
|
function isntNode(val) {
|
|
2743
|
-
return !is_node_1$1.isNode(val);
|
|
3223
|
+
return !(0, is_node_1$1.isNode)(val);
|
|
2744
3224
|
}
|
|
2745
3225
|
isntNode$1.isntNode = isntNode;
|
|
2746
3226
|
|
|
@@ -2748,11 +3228,12 @@
|
|
|
2748
3228
|
|
|
2749
3229
|
isTextNode$1.isTextNode = void 0;
|
|
2750
3230
|
const node_type_1 = nodeType;
|
|
2751
|
-
const types_1 = es2018$
|
|
3231
|
+
const types_1 = es2018$2;
|
|
2752
3232
|
function isTextNode(val) {
|
|
2753
3233
|
if ('Text' in globalThis && val instanceof Text)
|
|
2754
3234
|
return true;
|
|
2755
|
-
return types_1.
|
|
3235
|
+
return (0, types_1.isObject)(val)
|
|
3236
|
+
&& val.nodeType === node_type_1.NodeType.TEXT_NODE;
|
|
2756
3237
|
}
|
|
2757
3238
|
isTextNode$1.isTextNode = isTextNode;
|
|
2758
3239
|
|
|
@@ -2761,7 +3242,7 @@
|
|
|
2761
3242
|
isntTextNode$1.isntTextNode = void 0;
|
|
2762
3243
|
const is_text_node_1 = isTextNode$1;
|
|
2763
3244
|
function isntTextNode(val) {
|
|
2764
|
-
return !is_text_node_1.isTextNode(val);
|
|
3245
|
+
return !(0, is_text_node_1.isTextNode)(val);
|
|
2765
3246
|
}
|
|
2766
3247
|
isntTextNode$1.isntTextNode = isntTextNode;
|
|
2767
3248
|
|
|
@@ -2770,7 +3251,7 @@
|
|
|
2770
3251
|
isParentNode$1.isParentNode = void 0;
|
|
2771
3252
|
const is_node_1 = isNode$1;
|
|
2772
3253
|
function isParentNode(val) {
|
|
2773
|
-
return is_node_1.isNode(val) && 'children' in val;
|
|
3254
|
+
return (0, is_node_1.isNode)(val) && 'children' in val;
|
|
2774
3255
|
}
|
|
2775
3256
|
isParentNode$1.isParentNode = isParentNode;
|
|
2776
3257
|
|
|
@@ -2779,7 +3260,7 @@
|
|
|
2779
3260
|
isntParentNode$1.isntParentNode = void 0;
|
|
2780
3261
|
const is_parent_node_1 = isParentNode$1;
|
|
2781
3262
|
function isntParentNode(val) {
|
|
2782
|
-
return !is_parent_node_1.isParentNode(val);
|
|
3263
|
+
return !(0, is_parent_node_1.isParentNode)(val);
|
|
2783
3264
|
}
|
|
2784
3265
|
isntParentNode$1.isntParentNode = isntParentNode;
|
|
2785
3266
|
|
|
@@ -2828,7 +3309,7 @@
|
|
|
2828
3309
|
replaceBrWithNewline$1.replaceBrWithNewline = void 0;
|
|
2829
3310
|
const map_1 = map$3;
|
|
2830
3311
|
function replaceBrWithNewline(node) {
|
|
2831
|
-
return map_1.map(node, node => {
|
|
3312
|
+
return (0, map_1.map)(node, node => {
|
|
2832
3313
|
if (node.nodeName === 'BR') {
|
|
2833
3314
|
return document.createTextNode('\n');
|
|
2834
3315
|
}
|
|
@@ -2914,7 +3395,7 @@
|
|
|
2914
3395
|
__exportStar(isBefore$1, exports);
|
|
2915
3396
|
__exportStar(isAfter$1, exports);
|
|
2916
3397
|
|
|
2917
|
-
}(es2018$
|
|
3398
|
+
}(es2018$7));
|
|
2918
3399
|
|
|
2919
3400
|
function matchOneByOne(context, source, ...matchers) {
|
|
2920
3401
|
if (matchers.length === 0)
|
|
@@ -2924,7 +3405,7 @@
|
|
|
2924
3405
|
const [matcher, ...otherMatchers] = matchers;
|
|
2925
3406
|
const result = Reflect.apply(matcher, context, [source]);
|
|
2926
3407
|
// TerminalMatcher
|
|
2927
|
-
if (es2018$
|
|
3408
|
+
if (es2018$3.isBoolean(result)) {
|
|
2928
3409
|
if (result) {
|
|
2929
3410
|
const nextNode = context.next(source);
|
|
2930
3411
|
return matchOneByOne(context, nextNode, ...otherMatchers);
|
|
@@ -2934,13 +3415,13 @@
|
|
|
2934
3415
|
}
|
|
2935
3416
|
}
|
|
2936
3417
|
// 此处一定是成功匹配, 因为SkipMatcher在失败时会返回false.
|
|
2937
|
-
if (es2018$
|
|
3418
|
+
if (es2018$3.isNumber(result)) {
|
|
2938
3419
|
const distance = result;
|
|
2939
3420
|
const nextNode = context.next(source, distance);
|
|
2940
3421
|
return matchOneByOne(context, nextNode, ...otherMatchers);
|
|
2941
3422
|
}
|
|
2942
3423
|
// SkipMatcher返回Iterable意味着存在多种可能性, 可能出现失败回溯.
|
|
2943
|
-
if (es2018$
|
|
3424
|
+
if (es2018$3.isIterable(result)) {
|
|
2944
3425
|
for (const distance of result) {
|
|
2945
3426
|
const nextNode = context.next(source, distance);
|
|
2946
3427
|
if (matchOneByOne(context, nextNode, ...otherMatchers)) {
|
|
@@ -2956,11 +3437,11 @@
|
|
|
2956
3437
|
function nextSibling(node, distance = 1) {
|
|
2957
3438
|
if (distance === 0)
|
|
2958
3439
|
return node;
|
|
2959
|
-
return es2018$
|
|
3440
|
+
return es2018$7.nextSibling(node, distance);
|
|
2960
3441
|
}
|
|
2961
3442
|
|
|
2962
3443
|
function match(node, ...matchers) {
|
|
2963
|
-
const document = es2018$
|
|
3444
|
+
const document = es2018$7.isDocument(this) ? this : globalThis.document;
|
|
2964
3445
|
const context = {
|
|
2965
3446
|
document,
|
|
2966
3447
|
collection: {},
|
|
@@ -2977,11 +3458,11 @@
|
|
|
2977
3458
|
function nextElementSibling(node, distance = 1) {
|
|
2978
3459
|
if (distance === 0)
|
|
2979
3460
|
return node;
|
|
2980
|
-
return es2018$
|
|
3461
|
+
return es2018$7.nextElementSibling(node, distance);
|
|
2981
3462
|
}
|
|
2982
3463
|
|
|
2983
3464
|
function matchElement(element, ...matchers) {
|
|
2984
|
-
const document = es2018$
|
|
3465
|
+
const document = es2018$7.isDocument(this) ? this : globalThis.document;
|
|
2985
3466
|
const context = {
|
|
2986
3467
|
document,
|
|
2987
3468
|
collection: {},
|
|
@@ -3001,11 +3482,11 @@
|
|
|
3001
3482
|
};
|
|
3002
3483
|
}
|
|
3003
3484
|
|
|
3004
|
-
function
|
|
3485
|
+
function mergeInPlace(target, source) {
|
|
3005
3486
|
for (const [key, value] of Object.entries(source)) {
|
|
3006
3487
|
if (target[key]) {
|
|
3007
|
-
if (
|
|
3008
|
-
if (
|
|
3488
|
+
if (es2018$3.isArray(target[key])) {
|
|
3489
|
+
if (es2018$3.isArray(value)) {
|
|
3009
3490
|
target[key] = [...target[key], ...value];
|
|
3010
3491
|
}
|
|
3011
3492
|
else {
|
|
@@ -3013,7 +3494,7 @@
|
|
|
3013
3494
|
}
|
|
3014
3495
|
}
|
|
3015
3496
|
else {
|
|
3016
|
-
if (
|
|
3497
|
+
if (es2018$3.isArray(value)) {
|
|
3017
3498
|
target[key] = [target[key], ...value];
|
|
3018
3499
|
}
|
|
3019
3500
|
else {
|
|
@@ -3038,7 +3519,7 @@
|
|
|
3038
3519
|
const context = Object.assign(Object.assign({}, this), { collection: {}, next: nextSibling });
|
|
3039
3520
|
const result = matchOneByOne(context, node.childNodes[0], ...matchers);
|
|
3040
3521
|
if (result) {
|
|
3041
|
-
|
|
3522
|
+
mergeInPlace(this.collection, context.collection);
|
|
3042
3523
|
}
|
|
3043
3524
|
return result;
|
|
3044
3525
|
};
|
|
@@ -3055,7 +3536,7 @@
|
|
|
3055
3536
|
const context = Object.assign(Object.assign({}, this), { collection: {}, next: nextElementSibling });
|
|
3056
3537
|
const result = matchOneByOne(context, element.children[0], ...matchers);
|
|
3057
3538
|
if (result) {
|
|
3058
|
-
|
|
3539
|
+
mergeInPlace(this.collection, context.collection);
|
|
3059
3540
|
}
|
|
3060
3541
|
return result;
|
|
3061
3542
|
};
|
|
@@ -3072,7 +3553,7 @@
|
|
|
3072
3553
|
}
|
|
3073
3554
|
|
|
3074
3555
|
function css(...args) {
|
|
3075
|
-
if (es2018$
|
|
3556
|
+
if (es2018$3.isString(args[0])) {
|
|
3076
3557
|
const [selector] = args;
|
|
3077
3558
|
return (element) => element.matches(selector);
|
|
3078
3559
|
}
|
|
@@ -3084,24 +3565,24 @@
|
|
|
3084
3565
|
}
|
|
3085
3566
|
|
|
3086
3567
|
function element(...args) {
|
|
3087
|
-
if (
|
|
3568
|
+
if (es2018$3.isArray(args[0])) {
|
|
3088
3569
|
const [strings, ...values] = args;
|
|
3089
3570
|
const name = concat(strings, values).join('');
|
|
3090
3571
|
return (...matchers) => element(name, ...matchers);
|
|
3091
3572
|
}
|
|
3092
|
-
if (es2018$
|
|
3573
|
+
if (es2018$3.isString(args[0])) {
|
|
3093
3574
|
const [name, ...matchers] = args;
|
|
3094
3575
|
return function (_element) {
|
|
3095
3576
|
const result = element(...matchers).call(this, _element);
|
|
3096
3577
|
if (result) {
|
|
3097
|
-
|
|
3578
|
+
mergeInPlace(this.collection, { [name]: _element });
|
|
3098
3579
|
}
|
|
3099
3580
|
return result;
|
|
3100
3581
|
};
|
|
3101
3582
|
}
|
|
3102
3583
|
const [...matchers] = args;
|
|
3103
3584
|
return function (element) {
|
|
3104
|
-
if (es2018$
|
|
3585
|
+
if (es2018$7.isntElement(element))
|
|
3105
3586
|
return false;
|
|
3106
3587
|
if (matchers.length === 0)
|
|
3107
3588
|
return true;
|
|
@@ -3109,7 +3590,7 @@
|
|
|
3109
3590
|
};
|
|
3110
3591
|
}
|
|
3111
3592
|
|
|
3112
|
-
var es2018 = {};
|
|
3593
|
+
var es2018$1 = {};
|
|
3113
3594
|
|
|
3114
3595
|
var of$1 = {};
|
|
3115
3596
|
|
|
@@ -3122,14 +3603,15 @@
|
|
|
3122
3603
|
var repeat$2 = {};
|
|
3123
3604
|
|
|
3124
3605
|
repeat$2.repeat = void 0;
|
|
3125
|
-
const errors_1$1 = es2018$
|
|
3606
|
+
const errors_1$1 = es2018$4;
|
|
3607
|
+
const go_1 = es2018$5;
|
|
3126
3608
|
function repeat$1(val, times = Infinity) {
|
|
3127
|
-
errors_1$1.assert(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
3128
|
-
return (function* () {
|
|
3609
|
+
(0, errors_1$1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
3610
|
+
return (0, go_1.go)(function* () {
|
|
3129
3611
|
while (times-- > 0) {
|
|
3130
3612
|
yield val;
|
|
3131
3613
|
}
|
|
3132
|
-
})
|
|
3614
|
+
});
|
|
3133
3615
|
}
|
|
3134
3616
|
repeat$2.repeat = repeat$1;
|
|
3135
3617
|
|
|
@@ -3160,9 +3642,9 @@
|
|
|
3160
3642
|
var range$1 = {};
|
|
3161
3643
|
|
|
3162
3644
|
range$1.range = void 0;
|
|
3163
|
-
const errors_1 = es2018$
|
|
3645
|
+
const errors_1 = es2018$4;
|
|
3164
3646
|
function range(start, end, step = 1) {
|
|
3165
|
-
errors_1.assert(step > 0, 'step parameter must be greater than 0');
|
|
3647
|
+
(0, errors_1.assert)(step > 0, 'step parameter must be greater than 0');
|
|
3166
3648
|
return rangeByUnsignedStep(start, end, step);
|
|
3167
3649
|
}
|
|
3168
3650
|
range$1.range = range;
|
|
@@ -3183,18 +3665,24 @@
|
|
|
3183
3665
|
|
|
3184
3666
|
stringifyJsonStream.stringifyJSONStream = void 0;
|
|
3185
3667
|
function* stringifyJSONStream(iterable) {
|
|
3668
|
+
var _a;
|
|
3186
3669
|
const iter = iterable[Symbol.iterator]();
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3670
|
+
let done;
|
|
3671
|
+
try {
|
|
3672
|
+
let value;
|
|
3673
|
+
({ value, done } = iter.next());
|
|
3674
|
+
yield '[';
|
|
3675
|
+
if (!done)
|
|
3676
|
+
yield JSON.stringify(value);
|
|
3677
|
+
while ({ value, done } = iter.next(), !done) {
|
|
3678
|
+
yield ',' + JSON.stringify(value);
|
|
3679
|
+
}
|
|
3680
|
+
yield ']';
|
|
3681
|
+
}
|
|
3682
|
+
finally {
|
|
3683
|
+
if (!done)
|
|
3684
|
+
(_a = iter.return) === null || _a === void 0 ? void 0 : _a.call(iter);
|
|
3196
3685
|
}
|
|
3197
|
-
yield ']';
|
|
3198
3686
|
}
|
|
3199
3687
|
stringifyJsonStream.stringifyJSONStream = stringifyJSONStream;
|
|
3200
3688
|
|
|
@@ -3202,18 +3690,24 @@
|
|
|
3202
3690
|
|
|
3203
3691
|
stringifyJsonStreamAsync.stringifyJSONStreamAsync = void 0;
|
|
3204
3692
|
async function* stringifyJSONStreamAsync(asyncIterable) {
|
|
3693
|
+
var _a;
|
|
3205
3694
|
const iter = asyncIterable[Symbol.asyncIterator]();
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3695
|
+
let done;
|
|
3696
|
+
try {
|
|
3697
|
+
let value;
|
|
3698
|
+
({ value, done } = await iter.next());
|
|
3699
|
+
yield '[';
|
|
3700
|
+
if (!done)
|
|
3701
|
+
yield JSON.stringify(value);
|
|
3702
|
+
while ({ value, done } = await iter.next(), !done) {
|
|
3703
|
+
yield ',' + JSON.stringify(value);
|
|
3704
|
+
}
|
|
3705
|
+
yield ']';
|
|
3706
|
+
}
|
|
3707
|
+
finally {
|
|
3708
|
+
if (!done)
|
|
3709
|
+
await ((_a = iter.return) === null || _a === void 0 ? void 0 : _a.call(iter));
|
|
3215
3710
|
}
|
|
3216
|
-
yield ']';
|
|
3217
3711
|
}
|
|
3218
3712
|
stringifyJsonStreamAsync.stringifyJSONStreamAsync = stringifyJSONStreamAsync;
|
|
3219
3713
|
|
|
@@ -3221,15 +3715,21 @@
|
|
|
3221
3715
|
|
|
3222
3716
|
stringifyNdjsonStream.stringifyNDJSONStream = void 0;
|
|
3223
3717
|
function* stringifyNDJSONStream(iterable) {
|
|
3718
|
+
var _a;
|
|
3224
3719
|
const iter = iterable[Symbol.iterator]();
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3720
|
+
let done;
|
|
3721
|
+
try {
|
|
3722
|
+
let value;
|
|
3723
|
+
({ value, done } = iter.next());
|
|
3724
|
+
if (!done)
|
|
3725
|
+
yield JSON.stringify(value);
|
|
3726
|
+
while ({ value, done } = iter.next(), !done) {
|
|
3727
|
+
yield '\n' + JSON.stringify(value);
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3730
|
+
finally {
|
|
3731
|
+
if (!done)
|
|
3732
|
+
(_a = iter.return) === null || _a === void 0 ? void 0 : _a.call(iter);
|
|
3233
3733
|
}
|
|
3234
3734
|
}
|
|
3235
3735
|
stringifyNdjsonStream.stringifyNDJSONStream = stringifyNDJSONStream;
|
|
@@ -3238,15 +3738,21 @@
|
|
|
3238
3738
|
|
|
3239
3739
|
stringifyNdjsonStreamAsync.stringifyNDJSONStreamAsync = void 0;
|
|
3240
3740
|
async function* stringifyNDJSONStreamAsync(asyncIterable) {
|
|
3741
|
+
var _a;
|
|
3241
3742
|
const iter = asyncIterable[Symbol.asyncIterator]();
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3743
|
+
let done;
|
|
3744
|
+
try {
|
|
3745
|
+
let value;
|
|
3746
|
+
({ value, done } = await iter.next());
|
|
3747
|
+
if (!done)
|
|
3748
|
+
yield JSON.stringify(value);
|
|
3749
|
+
while ({ value, done } = await iter.next(), !done) {
|
|
3750
|
+
yield '\n' + JSON.stringify(value);
|
|
3751
|
+
}
|
|
3752
|
+
}
|
|
3753
|
+
finally {
|
|
3754
|
+
if (!done)
|
|
3755
|
+
await ((_a = iter.return) === null || _a === void 0 ? void 0 : _a.call(iter));
|
|
3250
3756
|
}
|
|
3251
3757
|
}
|
|
3252
3758
|
stringifyNdjsonStreamAsync.stringifyNDJSONStreamAsync = stringifyNDJSONStreamAsync;
|
|
@@ -3268,6 +3774,454 @@
|
|
|
3268
3774
|
}
|
|
3269
3775
|
sse$1.sse = sse;
|
|
3270
3776
|
|
|
3777
|
+
var reusableIterable = {};
|
|
3778
|
+
|
|
3779
|
+
var es2018 = {};
|
|
3780
|
+
|
|
3781
|
+
var lazy$1 = {};
|
|
3782
|
+
|
|
3783
|
+
/**
|
|
3784
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
3785
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
3786
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
3787
|
+
* Released under MIT license <https://lodash.com/license>
|
|
3788
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
3789
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
3790
|
+
*/
|
|
3791
|
+
|
|
3792
|
+
/** Used as the `TypeError` message for "Functions" methods. */
|
|
3793
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
3794
|
+
|
|
3795
|
+
/** Used as references for various `Number` constants. */
|
|
3796
|
+
var INFINITY = 1 / 0,
|
|
3797
|
+
MAX_INTEGER = 1.7976931348623157e+308,
|
|
3798
|
+
NAN = 0 / 0;
|
|
3799
|
+
|
|
3800
|
+
/** `Object#toString` result references. */
|
|
3801
|
+
var symbolTag = '[object Symbol]';
|
|
3802
|
+
|
|
3803
|
+
/** Used to match leading and trailing whitespace. */
|
|
3804
|
+
var reTrim = /^\s+|\s+$/g;
|
|
3805
|
+
|
|
3806
|
+
/** Used to detect bad signed hexadecimal string values. */
|
|
3807
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
3808
|
+
|
|
3809
|
+
/** Used to detect binary string values. */
|
|
3810
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
3811
|
+
|
|
3812
|
+
/** Used to detect octal string values. */
|
|
3813
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
3814
|
+
|
|
3815
|
+
/** Built-in method references without a dependency on `root`. */
|
|
3816
|
+
var freeParseInt = parseInt;
|
|
3817
|
+
|
|
3818
|
+
/** Used for built-in method references. */
|
|
3819
|
+
var objectProto = Object.prototype;
|
|
3820
|
+
|
|
3821
|
+
/**
|
|
3822
|
+
* Used to resolve the
|
|
3823
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
3824
|
+
* of values.
|
|
3825
|
+
*/
|
|
3826
|
+
var objectToString = objectProto.toString;
|
|
3827
|
+
|
|
3828
|
+
/**
|
|
3829
|
+
* Creates a function that invokes `func`, with the `this` binding and arguments
|
|
3830
|
+
* of the created function, while it's called less than `n` times. Subsequent
|
|
3831
|
+
* calls to the created function return the result of the last `func` invocation.
|
|
3832
|
+
*
|
|
3833
|
+
* @static
|
|
3834
|
+
* @memberOf _
|
|
3835
|
+
* @since 3.0.0
|
|
3836
|
+
* @category Function
|
|
3837
|
+
* @param {number} n The number of calls at which `func` is no longer invoked.
|
|
3838
|
+
* @param {Function} func The function to restrict.
|
|
3839
|
+
* @returns {Function} Returns the new restricted function.
|
|
3840
|
+
* @example
|
|
3841
|
+
*
|
|
3842
|
+
* jQuery(element).on('click', _.before(5, addContactToList));
|
|
3843
|
+
* // => Allows adding up to 4 contacts to the list.
|
|
3844
|
+
*/
|
|
3845
|
+
function before(n, func) {
|
|
3846
|
+
var result;
|
|
3847
|
+
if (typeof func != 'function') {
|
|
3848
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3849
|
+
}
|
|
3850
|
+
n = toInteger(n);
|
|
3851
|
+
return function() {
|
|
3852
|
+
if (--n > 0) {
|
|
3853
|
+
result = func.apply(this, arguments);
|
|
3854
|
+
}
|
|
3855
|
+
if (n <= 1) {
|
|
3856
|
+
func = undefined;
|
|
3857
|
+
}
|
|
3858
|
+
return result;
|
|
3859
|
+
};
|
|
3860
|
+
}
|
|
3861
|
+
|
|
3862
|
+
/**
|
|
3863
|
+
* Creates a function that is restricted to invoking `func` once. Repeat calls
|
|
3864
|
+
* to the function return the value of the first invocation. The `func` is
|
|
3865
|
+
* invoked with the `this` binding and arguments of the created function.
|
|
3866
|
+
*
|
|
3867
|
+
* @static
|
|
3868
|
+
* @memberOf _
|
|
3869
|
+
* @since 0.1.0
|
|
3870
|
+
* @category Function
|
|
3871
|
+
* @param {Function} func The function to restrict.
|
|
3872
|
+
* @returns {Function} Returns the new restricted function.
|
|
3873
|
+
* @example
|
|
3874
|
+
*
|
|
3875
|
+
* var initialize = _.once(createApplication);
|
|
3876
|
+
* initialize();
|
|
3877
|
+
* initialize();
|
|
3878
|
+
* // => `createApplication` is invoked once
|
|
3879
|
+
*/
|
|
3880
|
+
function once(func) {
|
|
3881
|
+
return before(2, func);
|
|
3882
|
+
}
|
|
3883
|
+
|
|
3884
|
+
/**
|
|
3885
|
+
* Checks if `value` is the
|
|
3886
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
3887
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
3888
|
+
*
|
|
3889
|
+
* @static
|
|
3890
|
+
* @memberOf _
|
|
3891
|
+
* @since 0.1.0
|
|
3892
|
+
* @category Lang
|
|
3893
|
+
* @param {*} value The value to check.
|
|
3894
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
3895
|
+
* @example
|
|
3896
|
+
*
|
|
3897
|
+
* _.isObject({});
|
|
3898
|
+
* // => true
|
|
3899
|
+
*
|
|
3900
|
+
* _.isObject([1, 2, 3]);
|
|
3901
|
+
* // => true
|
|
3902
|
+
*
|
|
3903
|
+
* _.isObject(_.noop);
|
|
3904
|
+
* // => true
|
|
3905
|
+
*
|
|
3906
|
+
* _.isObject(null);
|
|
3907
|
+
* // => false
|
|
3908
|
+
*/
|
|
3909
|
+
function isObject(value) {
|
|
3910
|
+
var type = typeof value;
|
|
3911
|
+
return !!value && (type == 'object' || type == 'function');
|
|
3912
|
+
}
|
|
3913
|
+
|
|
3914
|
+
/**
|
|
3915
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
3916
|
+
* and has a `typeof` result of "object".
|
|
3917
|
+
*
|
|
3918
|
+
* @static
|
|
3919
|
+
* @memberOf _
|
|
3920
|
+
* @since 4.0.0
|
|
3921
|
+
* @category Lang
|
|
3922
|
+
* @param {*} value The value to check.
|
|
3923
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
3924
|
+
* @example
|
|
3925
|
+
*
|
|
3926
|
+
* _.isObjectLike({});
|
|
3927
|
+
* // => true
|
|
3928
|
+
*
|
|
3929
|
+
* _.isObjectLike([1, 2, 3]);
|
|
3930
|
+
* // => true
|
|
3931
|
+
*
|
|
3932
|
+
* _.isObjectLike(_.noop);
|
|
3933
|
+
* // => false
|
|
3934
|
+
*
|
|
3935
|
+
* _.isObjectLike(null);
|
|
3936
|
+
* // => false
|
|
3937
|
+
*/
|
|
3938
|
+
function isObjectLike(value) {
|
|
3939
|
+
return !!value && typeof value == 'object';
|
|
3940
|
+
}
|
|
3941
|
+
|
|
3942
|
+
/**
|
|
3943
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
3944
|
+
*
|
|
3945
|
+
* @static
|
|
3946
|
+
* @memberOf _
|
|
3947
|
+
* @since 4.0.0
|
|
3948
|
+
* @category Lang
|
|
3949
|
+
* @param {*} value The value to check.
|
|
3950
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
3951
|
+
* @example
|
|
3952
|
+
*
|
|
3953
|
+
* _.isSymbol(Symbol.iterator);
|
|
3954
|
+
* // => true
|
|
3955
|
+
*
|
|
3956
|
+
* _.isSymbol('abc');
|
|
3957
|
+
* // => false
|
|
3958
|
+
*/
|
|
3959
|
+
function isSymbol(value) {
|
|
3960
|
+
return typeof value == 'symbol' ||
|
|
3961
|
+
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
|
3962
|
+
}
|
|
3963
|
+
|
|
3964
|
+
/**
|
|
3965
|
+
* Converts `value` to a finite number.
|
|
3966
|
+
*
|
|
3967
|
+
* @static
|
|
3968
|
+
* @memberOf _
|
|
3969
|
+
* @since 4.12.0
|
|
3970
|
+
* @category Lang
|
|
3971
|
+
* @param {*} value The value to convert.
|
|
3972
|
+
* @returns {number} Returns the converted number.
|
|
3973
|
+
* @example
|
|
3974
|
+
*
|
|
3975
|
+
* _.toFinite(3.2);
|
|
3976
|
+
* // => 3.2
|
|
3977
|
+
*
|
|
3978
|
+
* _.toFinite(Number.MIN_VALUE);
|
|
3979
|
+
* // => 5e-324
|
|
3980
|
+
*
|
|
3981
|
+
* _.toFinite(Infinity);
|
|
3982
|
+
* // => 1.7976931348623157e+308
|
|
3983
|
+
*
|
|
3984
|
+
* _.toFinite('3.2');
|
|
3985
|
+
* // => 3.2
|
|
3986
|
+
*/
|
|
3987
|
+
function toFinite(value) {
|
|
3988
|
+
if (!value) {
|
|
3989
|
+
return value === 0 ? value : 0;
|
|
3990
|
+
}
|
|
3991
|
+
value = toNumber(value);
|
|
3992
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
3993
|
+
var sign = (value < 0 ? -1 : 1);
|
|
3994
|
+
return sign * MAX_INTEGER;
|
|
3995
|
+
}
|
|
3996
|
+
return value === value ? value : 0;
|
|
3997
|
+
}
|
|
3998
|
+
|
|
3999
|
+
/**
|
|
4000
|
+
* Converts `value` to an integer.
|
|
4001
|
+
*
|
|
4002
|
+
* **Note:** This method is loosely based on
|
|
4003
|
+
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
4004
|
+
*
|
|
4005
|
+
* @static
|
|
4006
|
+
* @memberOf _
|
|
4007
|
+
* @since 4.0.0
|
|
4008
|
+
* @category Lang
|
|
4009
|
+
* @param {*} value The value to convert.
|
|
4010
|
+
* @returns {number} Returns the converted integer.
|
|
4011
|
+
* @example
|
|
4012
|
+
*
|
|
4013
|
+
* _.toInteger(3.2);
|
|
4014
|
+
* // => 3
|
|
4015
|
+
*
|
|
4016
|
+
* _.toInteger(Number.MIN_VALUE);
|
|
4017
|
+
* // => 0
|
|
4018
|
+
*
|
|
4019
|
+
* _.toInteger(Infinity);
|
|
4020
|
+
* // => 1.7976931348623157e+308
|
|
4021
|
+
*
|
|
4022
|
+
* _.toInteger('3.2');
|
|
4023
|
+
* // => 3
|
|
4024
|
+
*/
|
|
4025
|
+
function toInteger(value) {
|
|
4026
|
+
var result = toFinite(value),
|
|
4027
|
+
remainder = result % 1;
|
|
4028
|
+
|
|
4029
|
+
return result === result ? (remainder ? result - remainder : result) : 0;
|
|
4030
|
+
}
|
|
4031
|
+
|
|
4032
|
+
/**
|
|
4033
|
+
* Converts `value` to a number.
|
|
4034
|
+
*
|
|
4035
|
+
* @static
|
|
4036
|
+
* @memberOf _
|
|
4037
|
+
* @since 4.0.0
|
|
4038
|
+
* @category Lang
|
|
4039
|
+
* @param {*} value The value to process.
|
|
4040
|
+
* @returns {number} Returns the number.
|
|
4041
|
+
* @example
|
|
4042
|
+
*
|
|
4043
|
+
* _.toNumber(3.2);
|
|
4044
|
+
* // => 3.2
|
|
4045
|
+
*
|
|
4046
|
+
* _.toNumber(Number.MIN_VALUE);
|
|
4047
|
+
* // => 5e-324
|
|
4048
|
+
*
|
|
4049
|
+
* _.toNumber(Infinity);
|
|
4050
|
+
* // => Infinity
|
|
4051
|
+
*
|
|
4052
|
+
* _.toNumber('3.2');
|
|
4053
|
+
* // => 3.2
|
|
4054
|
+
*/
|
|
4055
|
+
function toNumber(value) {
|
|
4056
|
+
if (typeof value == 'number') {
|
|
4057
|
+
return value;
|
|
4058
|
+
}
|
|
4059
|
+
if (isSymbol(value)) {
|
|
4060
|
+
return NAN;
|
|
4061
|
+
}
|
|
4062
|
+
if (isObject(value)) {
|
|
4063
|
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
4064
|
+
value = isObject(other) ? (other + '') : other;
|
|
4065
|
+
}
|
|
4066
|
+
if (typeof value != 'string') {
|
|
4067
|
+
return value === 0 ? value : +value;
|
|
4068
|
+
}
|
|
4069
|
+
value = value.replace(reTrim, '');
|
|
4070
|
+
var isBinary = reIsBinary.test(value);
|
|
4071
|
+
return (isBinary || reIsOctal.test(value))
|
|
4072
|
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
4073
|
+
: (reIsBadHex.test(value) ? NAN : +value);
|
|
4074
|
+
}
|
|
4075
|
+
|
|
4076
|
+
var lodash_once = once;
|
|
4077
|
+
|
|
4078
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
4079
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4080
|
+
};lazy$1.lazy = void 0;
|
|
4081
|
+
const lodash_once_1 = __importDefault(lodash_once);
|
|
4082
|
+
function lazy(getter) {
|
|
4083
|
+
return (0, lodash_once_1.default)(getter);
|
|
4084
|
+
}
|
|
4085
|
+
lazy$1.lazy = lazy;
|
|
4086
|
+
|
|
4087
|
+
var lazyFunction$1 = {};
|
|
4088
|
+
|
|
4089
|
+
lazyFunction$1.lazyFunction = void 0;
|
|
4090
|
+
const lazy_1 = lazy$1;
|
|
4091
|
+
function lazyFunction(getter) {
|
|
4092
|
+
const getFn = (0, lazy_1.lazy)(getter);
|
|
4093
|
+
return (...args) => getFn()(...args);
|
|
4094
|
+
}
|
|
4095
|
+
lazyFunction$1.lazyFunction = lazyFunction;
|
|
4096
|
+
|
|
4097
|
+
(function (exports) {
|
|
4098
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4099
|
+
if (k2 === undefined) k2 = k;
|
|
4100
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
4101
|
+
}) : (function(o, m, k, k2) {
|
|
4102
|
+
if (k2 === undefined) k2 = k;
|
|
4103
|
+
o[k2] = m[k];
|
|
4104
|
+
}));
|
|
4105
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
4106
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
4107
|
+
};__exportStar(lazy$1, exports);
|
|
4108
|
+
__exportStar(lazyFunction$1, exports);
|
|
4109
|
+
|
|
4110
|
+
}(es2018));
|
|
4111
|
+
|
|
4112
|
+
var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
4113
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4114
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4115
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4116
|
+
};
|
|
4117
|
+
var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
4118
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4119
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4120
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
4121
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
4122
|
+
};
|
|
4123
|
+
var _ReusableIterable_done;reusableIterable.ReusableIterable = void 0;
|
|
4124
|
+
const extra_lazy_1$1 = es2018;
|
|
4125
|
+
class ReusableIterable {
|
|
4126
|
+
constructor(iterable) {
|
|
4127
|
+
_ReusableIterable_done.set(this, void 0);
|
|
4128
|
+
this.getIterator = (0, extra_lazy_1$1.lazy)(() => iterable[Symbol.iterator]());
|
|
4129
|
+
}
|
|
4130
|
+
get done() {
|
|
4131
|
+
return __classPrivateFieldGet$1(this, _ReusableIterable_done, "f");
|
|
4132
|
+
}
|
|
4133
|
+
close() {
|
|
4134
|
+
var _a, _b;
|
|
4135
|
+
if (!this.done) {
|
|
4136
|
+
__classPrivateFieldSet$1(this, _ReusableIterable_done, true, "f");
|
|
4137
|
+
(_b = (_a = this.getIterator()).return) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4140
|
+
[(_ReusableIterable_done = new WeakMap(), Symbol.iterator)]() {
|
|
4141
|
+
return {
|
|
4142
|
+
next: () => {
|
|
4143
|
+
if (__classPrivateFieldGet$1(this, _ReusableIterable_done, "f"))
|
|
4144
|
+
return { done: true, value: undefined };
|
|
4145
|
+
const { value, done } = this.getIterator().next();
|
|
4146
|
+
if (done) {
|
|
4147
|
+
__classPrivateFieldSet$1(this, _ReusableIterable_done, true, "f");
|
|
4148
|
+
}
|
|
4149
|
+
return { value, done };
|
|
4150
|
+
}
|
|
4151
|
+
};
|
|
4152
|
+
}
|
|
4153
|
+
}
|
|
4154
|
+
reusableIterable.ReusableIterable = ReusableIterable;
|
|
4155
|
+
|
|
4156
|
+
var reusableAsyncIterable = {};
|
|
4157
|
+
|
|
4158
|
+
var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
4159
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4160
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4161
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4162
|
+
};
|
|
4163
|
+
var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
4164
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4165
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4166
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
4167
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
4168
|
+
};
|
|
4169
|
+
var _ReusableAsyncIterable_done;reusableAsyncIterable.ReusableAsyncIterable = void 0;
|
|
4170
|
+
const extra_lazy_1 = es2018;
|
|
4171
|
+
class ReusableAsyncIterable {
|
|
4172
|
+
constructor(iterable) {
|
|
4173
|
+
_ReusableAsyncIterable_done.set(this, void 0);
|
|
4174
|
+
this.getIterator = (0, extra_lazy_1.lazy)(() => iterable[Symbol.asyncIterator]());
|
|
4175
|
+
}
|
|
4176
|
+
get done() {
|
|
4177
|
+
return __classPrivateFieldGet(this, _ReusableAsyncIterable_done, "f");
|
|
4178
|
+
}
|
|
4179
|
+
async close() {
|
|
4180
|
+
var _a, _b;
|
|
4181
|
+
if (!this.done) {
|
|
4182
|
+
__classPrivateFieldSet(this, _ReusableAsyncIterable_done, true, "f");
|
|
4183
|
+
await ((_b = (_a = this.getIterator()).return) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
4184
|
+
}
|
|
4185
|
+
}
|
|
4186
|
+
[(_ReusableAsyncIterable_done = new WeakMap(), Symbol.asyncIterator)]() {
|
|
4187
|
+
return {
|
|
4188
|
+
next: async () => {
|
|
4189
|
+
if (__classPrivateFieldGet(this, _ReusableAsyncIterable_done, "f"))
|
|
4190
|
+
return { done: true, value: undefined };
|
|
4191
|
+
const { value, done } = await this.getIterator().next();
|
|
4192
|
+
if (done) {
|
|
4193
|
+
__classPrivateFieldSet(this, _ReusableAsyncIterable_done, true, "f");
|
|
4194
|
+
}
|
|
4195
|
+
return { value, done };
|
|
4196
|
+
}
|
|
4197
|
+
};
|
|
4198
|
+
}
|
|
4199
|
+
}
|
|
4200
|
+
reusableAsyncIterable.ReusableAsyncIterable = ReusableAsyncIterable;
|
|
4201
|
+
|
|
4202
|
+
var timestampBasedId$1 = {};
|
|
4203
|
+
|
|
4204
|
+
timestampBasedId$1.timestampBasedId = void 0;
|
|
4205
|
+
function* timestampBasedId() {
|
|
4206
|
+
const num = 0;
|
|
4207
|
+
const timestamp = Date.now();
|
|
4208
|
+
yield [timestamp, num];
|
|
4209
|
+
let lastTimestamp = timestamp;
|
|
4210
|
+
let lastNum = num;
|
|
4211
|
+
while (true) {
|
|
4212
|
+
const timestamp = Date.now();
|
|
4213
|
+
if (timestamp === lastTimestamp) {
|
|
4214
|
+
yield [lastTimestamp, ++lastNum];
|
|
4215
|
+
}
|
|
4216
|
+
else {
|
|
4217
|
+
lastNum = 0;
|
|
4218
|
+
lastTimestamp = timestamp;
|
|
4219
|
+
yield [lastTimestamp, lastNum];
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
}
|
|
4223
|
+
timestampBasedId$1.timestampBasedId = timestampBasedId;
|
|
4224
|
+
|
|
3271
4225
|
(function (exports) {
|
|
3272
4226
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3273
4227
|
if (k2 === undefined) k2 = k;
|
|
@@ -3288,15 +4242,18 @@
|
|
|
3288
4242
|
__exportStar(stringifyNdjsonStream, exports);
|
|
3289
4243
|
__exportStar(stringifyNdjsonStreamAsync, exports);
|
|
3290
4244
|
__exportStar(sse$1, exports);
|
|
4245
|
+
__exportStar(reusableIterable, exports);
|
|
4246
|
+
__exportStar(reusableAsyncIterable, exports);
|
|
4247
|
+
__exportStar(timestampBasedId$1, exports);
|
|
3291
4248
|
|
|
3292
|
-
}(es2018));
|
|
4249
|
+
}(es2018$1));
|
|
3293
4250
|
|
|
3294
4251
|
/**
|
|
3295
4252
|
* @returns {number} 返回值为成功匹配的元素个数, 当此值等于ubound时, 代表匹配成功.
|
|
3296
4253
|
*/
|
|
3297
4254
|
function matchMultiple(node, ubound, matcher) {
|
|
3298
4255
|
let currentNode = node;
|
|
3299
|
-
for (const round of es2018.countup(1, ubound)) {
|
|
4256
|
+
for (const round of es2018$1.countup(1, ubound)) {
|
|
3300
4257
|
if (!currentNode)
|
|
3301
4258
|
return round - 1;
|
|
3302
4259
|
const result = matcher.call(this, currentNode);
|
|
@@ -3316,10 +4273,10 @@
|
|
|
3316
4273
|
Range[Range["Max"] = 1] = "Max";
|
|
3317
4274
|
})(Range || (Range = {}));
|
|
3318
4275
|
function multiple([min, max], matcher, options = { greedy: true }) {
|
|
3319
|
-
es2018$
|
|
3320
|
-
es2018$
|
|
3321
|
-
es2018$
|
|
3322
|
-
es2018$
|
|
4276
|
+
es2018$4.assert(Number.isInteger(min), 'parameter min must be an integer');
|
|
4277
|
+
es2018$4.assert(Number.isInteger(max) || max === Infinity, 'parameter max must be an integer or Infinity');
|
|
4278
|
+
es2018$4.assert(min >= 0, 'parameter min must be greater than or equal to 0');
|
|
4279
|
+
es2018$4.assert(min <= max, 'parameter max must be greater than or equal to min');
|
|
3323
4280
|
return function* (node) {
|
|
3324
4281
|
if (options.greedy) {
|
|
3325
4282
|
let ubound = max;
|
|
@@ -3334,7 +4291,7 @@
|
|
|
3334
4291
|
}
|
|
3335
4292
|
}
|
|
3336
4293
|
else {
|
|
3337
|
-
for (const ubound of es2018.countup(min, max)) {
|
|
4294
|
+
for (const ubound of es2018$1.countup(min, max)) {
|
|
3338
4295
|
const result = matchMultiple.call(this, node, ubound, matcher);
|
|
3339
4296
|
// 如果匹配的节点数量少于ubound, 说明匹配失败, 即使尝试更长的匹配也不会成功.
|
|
3340
4297
|
if (result < ubound)
|
|
@@ -3347,17 +4304,17 @@
|
|
|
3347
4304
|
}
|
|
3348
4305
|
|
|
3349
4306
|
function node(...args) {
|
|
3350
|
-
if (
|
|
4307
|
+
if (es2018$3.isArray(args[0])) {
|
|
3351
4308
|
const [strings, ...values] = args;
|
|
3352
4309
|
const name = concat(strings, values).join('');
|
|
3353
4310
|
return (...matchers) => node(name, ...matchers);
|
|
3354
4311
|
}
|
|
3355
|
-
if (es2018$
|
|
4312
|
+
if (es2018$3.isString(args[0])) {
|
|
3356
4313
|
const [name, ...matchers] = args;
|
|
3357
4314
|
return function (_node) {
|
|
3358
4315
|
const result = node(...matchers).call(this, _node);
|
|
3359
4316
|
if (result) {
|
|
3360
|
-
|
|
4317
|
+
mergeInPlace(this.collection, { [name]: _node });
|
|
3361
4318
|
}
|
|
3362
4319
|
return result;
|
|
3363
4320
|
};
|
|
@@ -3375,8 +4332,8 @@
|
|
|
3375
4332
|
}
|
|
3376
4333
|
|
|
3377
4334
|
function repeat(times, matcher) {
|
|
3378
|
-
es2018$
|
|
3379
|
-
es2018$
|
|
4335
|
+
es2018$4.assert(Number.isInteger(times), 'parameter times must be an integer');
|
|
4336
|
+
es2018$4.assert(times >= 0, 'parameter number must be greater than or equal to 0');
|
|
3380
4337
|
return function (node) {
|
|
3381
4338
|
const result = matchMultiple.call(this, node, times, matcher);
|
|
3382
4339
|
if (result === times) {
|
|
@@ -3398,7 +4355,7 @@
|
|
|
3398
4355
|
|
|
3399
4356
|
function textContentEquals(text, { caseSensitive = true, trim = false } = {}) {
|
|
3400
4357
|
return (node) => {
|
|
3401
|
-
if (es2018$
|
|
4358
|
+
if (es2018$3.isNull(node.textContent))
|
|
3402
4359
|
return false;
|
|
3403
4360
|
let textContent = node.textContent;
|
|
3404
4361
|
if (!caseSensitive) {
|
|
@@ -3413,7 +4370,7 @@
|
|
|
3413
4370
|
|
|
3414
4371
|
function textContentIncludes(searchString, { caseSensitive = true, trim = false } = {}) {
|
|
3415
4372
|
return (node) => {
|
|
3416
|
-
if (es2018$
|
|
4373
|
+
if (es2018$3.isNull(node.textContent))
|
|
3417
4374
|
return false;
|
|
3418
4375
|
let textContent = node.textContent;
|
|
3419
4376
|
if (!caseSensitive) {
|
|
@@ -3428,7 +4385,7 @@
|
|
|
3428
4385
|
|
|
3429
4386
|
function textContentMatches(pattern, { trim = false } = {}) {
|
|
3430
4387
|
return (node) => {
|
|
3431
|
-
if (es2018$
|
|
4388
|
+
if (es2018$3.isNull(node.textContent))
|
|
3432
4389
|
return false;
|
|
3433
4390
|
let textContent = node.textContent;
|
|
3434
4391
|
if (trim)
|
|
@@ -3438,24 +4395,24 @@
|
|
|
3438
4395
|
}
|
|
3439
4396
|
|
|
3440
4397
|
function textNode(...args) {
|
|
3441
|
-
if (
|
|
4398
|
+
if (es2018$3.isArray(args[0])) {
|
|
3442
4399
|
const [strings, ...values] = args;
|
|
3443
4400
|
const name = concat(strings, values).join('');
|
|
3444
4401
|
return (...matchers) => textNode(name, ...matchers);
|
|
3445
4402
|
}
|
|
3446
|
-
if (es2018$
|
|
4403
|
+
if (es2018$3.isString(args[0])) {
|
|
3447
4404
|
const [name, ...matchers] = args;
|
|
3448
4405
|
return function (node) {
|
|
3449
4406
|
const result = textNode(...matchers).call(this, node);
|
|
3450
4407
|
if (result) {
|
|
3451
|
-
|
|
4408
|
+
mergeInPlace(this.collection, { [name]: node });
|
|
3452
4409
|
}
|
|
3453
4410
|
return result;
|
|
3454
4411
|
};
|
|
3455
4412
|
}
|
|
3456
4413
|
const [...matchers] = args;
|
|
3457
4414
|
return function (node) {
|
|
3458
|
-
if (es2018$
|
|
4415
|
+
if (es2018$7.isntTextNode(node))
|
|
3459
4416
|
return false;
|
|
3460
4417
|
if (matchers.length === 0)
|
|
3461
4418
|
return true;
|
|
@@ -3467,9 +4424,9 @@
|
|
|
3467
4424
|
? XPathResult.UNORDERED_NODE_ITERATOR_TYPE
|
|
3468
4425
|
: 4;
|
|
3469
4426
|
function xpath(...args) {
|
|
3470
|
-
if (es2018$
|
|
4427
|
+
if (es2018$3.isString(args[0])) {
|
|
3471
4428
|
const [expression] = args;
|
|
3472
|
-
es2018$
|
|
4429
|
+
es2018$4.assert(expression.startsWith('//*'), 'XPath expressions must start with "//*"');
|
|
3473
4430
|
return function (node) {
|
|
3474
4431
|
return xpathMatches(this.document, expression, node);
|
|
3475
4432
|
};
|
|
@@ -3510,5 +4467,5 @@
|
|
|
3510
4467
|
|
|
3511
4468
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3512
4469
|
|
|
3513
|
-
}))
|
|
4470
|
+
}));
|
|
3514
4471
|
//# sourceMappingURL=index.umd.js.map
|