@jobber/components 6.86.0 → 6.86.2
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/Autocomplete/index.cjs +6 -6
- package/dist/Autocomplete/index.mjs +11 -11
- package/dist/Banner-cjs.js +1 -1
- package/dist/Banner-es.js +1 -1
- package/dist/Chip-cjs.js +2 -2
- package/dist/Chip-es.js +3 -3
- package/dist/Combobox-cjs.js +1 -1
- package/dist/Combobox-es.js +2 -2
- package/dist/ComboboxContent-cjs.js +2 -2
- package/dist/ComboboxContent-es.js +5 -5
- package/dist/ComboboxLoadMore-cjs.js +1 -1
- package/dist/ComboboxLoadMore-es.js +2 -2
- package/dist/ConfirmationModal-cjs.js +1 -1
- package/dist/ConfirmationModal-es.js +2 -2
- package/dist/ContentBlock-cjs.js +1 -1
- package/dist/ContentBlock-es.js +2 -2
- package/dist/DataListActionsMenu-cjs.js +4 -4
- package/dist/DataListActionsMenu-es.js +8 -8
- package/dist/DataListHeaderTile-cjs.js +1 -1
- package/dist/DataListHeaderTile-es.js +2 -2
- package/dist/DataListLoadMore-cjs.js +1 -1
- package/dist/DataListLoadMore-es.js +2 -2
- package/dist/DataListOverflowFade-cjs.js +2 -2
- package/dist/DataListOverflowFade-es.js +3 -3
- package/dist/DataListSearch-cjs.js +1 -1
- package/dist/DataListSearch-es.js +2 -2
- package/dist/DataListSortingOptions-cjs.js +2 -2
- package/dist/DataListSortingOptions-es.js +4 -4
- package/dist/DataTable/test-utilities/index.cjs +1 -1
- package/dist/DataTable/test-utilities/index.mjs +1 -1
- package/dist/DataTable-cjs.js +3 -3
- package/dist/DataTable-es.js +4 -4
- package/dist/DatePicker-cjs.js +1 -1
- package/dist/DatePicker-es.js +2 -2
- package/dist/Disclosure-cjs.js +2 -2
- package/dist/Disclosure-es.js +3 -3
- package/dist/FormField-cjs.js +1 -5
- package/dist/FormField-es.js +1 -5
- package/dist/InputText/InputText.d.ts +2 -2
- package/dist/InputText/index.cjs +2 -2
- package/dist/InputText/index.mjs +3 -3
- package/dist/LightBox-cjs.js +51 -67
- package/dist/LightBox-es.js +57 -73
- package/dist/Menu-cjs.js +6 -11
- package/dist/Menu-es.js +11 -16
- package/dist/Modal/index.cjs +3 -3
- package/dist/Modal/index.mjs +7 -7
- package/dist/Page-cjs.js +4 -4
- package/dist/Page-es.js +5 -5
- package/dist/Popover-cjs.js +1 -1
- package/dist/Popover-es.js +3 -3
- package/dist/SideDrawer-cjs.js +6 -6
- package/dist/SideDrawer-es.js +10 -10
- package/dist/Tooltip-cjs.js +2 -2
- package/dist/Tooltip-es.js +5 -5
- package/dist/floating-ui.react-es.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +5 -5
- package/dist/styles.css +27 -6
- package/dist/throttle-cjs.js +0 -1
- package/dist/throttle-es.js +1 -1
- package/dist/useDebounce-cjs.js +69 -4381
- package/dist/useDebounce-es.js +71 -4383
- package/dist/useFocusTrap-cjs.js +3 -8
- package/dist/useFocusTrap-es.js +4 -9
- package/dist/useInView-cjs.js +5 -10
- package/dist/useInView-es.js +6 -11
- package/dist/useIsMounted-cjs.js +4 -19
- package/dist/useIsMounted-es.js +5 -20
- package/dist/useOnKeyDown-cjs.js +2 -7
- package/dist/useOnKeyDown-es.js +3 -8
- package/dist/useRefocusOnActivator-cjs.js +2 -7
- package/dist/useRefocusOnActivator-es.js +3 -8
- package/dist/useResizeObserver-cjs.js +64 -92
- package/dist/useResizeObserver-es.js +65 -94
- package/dist/useSafeLayoutEffect-cjs.js +3 -8
- package/dist/useSafeLayoutEffect-es.js +5 -10
- package/dist/useScrollToActive-cjs.js +4 -9
- package/dist/useScrollToActive-es.js +6 -11
- package/package.json +3 -3
package/dist/useDebounce-es.js
CHANGED
|
@@ -1,4391 +1,79 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
result.push(item);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return result;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
exports.compact = compact;
|
|
71
|
-
} (compact));
|
|
72
|
-
|
|
73
|
-
var countBy = {};
|
|
74
|
-
|
|
75
|
-
(function (exports) {
|
|
76
|
-
|
|
77
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
78
|
-
|
|
79
|
-
function countBy(arr, mapper) {
|
|
80
|
-
const result = {};
|
|
81
|
-
for (let i = 0; i < arr.length; i++) {
|
|
82
|
-
const item = arr[i];
|
|
83
|
-
const key = mapper(item);
|
|
84
|
-
result[key] = (result[key] ?? 0) + 1;
|
|
85
|
-
}
|
|
86
|
-
return result;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
exports.countBy = countBy;
|
|
90
|
-
} (countBy));
|
|
91
|
-
|
|
92
|
-
var difference = {};
|
|
93
|
-
|
|
94
|
-
(function (exports) {
|
|
95
|
-
|
|
96
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
97
|
-
|
|
98
|
-
function difference(firstArr, secondArr) {
|
|
99
|
-
const secondSet = new Set(secondArr);
|
|
100
|
-
return firstArr.filter(item => !secondSet.has(item));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
exports.difference = difference;
|
|
104
|
-
} (difference));
|
|
105
|
-
|
|
106
|
-
var differenceBy = {};
|
|
107
|
-
|
|
108
|
-
(function (exports) {
|
|
109
|
-
|
|
110
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
111
|
-
|
|
112
|
-
function differenceBy(firstArr, secondArr, mapper) {
|
|
113
|
-
const mappedSecondSet = new Set(secondArr.map(item => mapper(item)));
|
|
114
|
-
return firstArr.filter(item => {
|
|
115
|
-
return !mappedSecondSet.has(mapper(item));
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
exports.differenceBy = differenceBy;
|
|
120
|
-
} (differenceBy));
|
|
121
|
-
|
|
122
|
-
var differenceWith = {};
|
|
123
|
-
|
|
124
|
-
(function (exports) {
|
|
125
|
-
|
|
126
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
127
|
-
|
|
128
|
-
function differenceWith(firstArr, secondArr, areItemsEqual) {
|
|
129
|
-
return firstArr.filter(firstItem => {
|
|
130
|
-
return secondArr.every(secondItem => {
|
|
131
|
-
return !areItemsEqual(firstItem, secondItem);
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
exports.differenceWith = differenceWith;
|
|
137
|
-
} (differenceWith));
|
|
138
|
-
|
|
139
|
-
var drop = {};
|
|
140
|
-
|
|
141
|
-
(function (exports) {
|
|
142
|
-
|
|
143
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
144
|
-
|
|
145
|
-
function drop(arr, itemsCount) {
|
|
146
|
-
itemsCount = Math.max(itemsCount, 0);
|
|
147
|
-
return arr.slice(itemsCount);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
exports.drop = drop;
|
|
151
|
-
} (drop));
|
|
152
|
-
|
|
153
|
-
var dropRight = {};
|
|
154
|
-
|
|
155
|
-
(function (exports) {
|
|
156
|
-
|
|
157
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
158
|
-
|
|
159
|
-
function dropRight(arr, itemsCount) {
|
|
160
|
-
itemsCount = Math.min(-itemsCount, 0);
|
|
161
|
-
if (itemsCount === 0) {
|
|
162
|
-
return arr.slice();
|
|
163
|
-
}
|
|
164
|
-
return arr.slice(0, itemsCount);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
exports.dropRight = dropRight;
|
|
168
|
-
} (dropRight));
|
|
169
|
-
|
|
170
|
-
var dropRightWhile = {};
|
|
171
|
-
|
|
172
|
-
(function (exports) {
|
|
173
|
-
|
|
174
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
175
|
-
|
|
176
|
-
function dropRightWhile(arr, canContinueDropping) {
|
|
177
|
-
for (let i = arr.length - 1; i >= 0; i--) {
|
|
178
|
-
if (!canContinueDropping(arr[i], i, arr)) {
|
|
179
|
-
return arr.slice(0, i + 1);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return [];
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
exports.dropRightWhile = dropRightWhile;
|
|
186
|
-
} (dropRightWhile));
|
|
187
|
-
|
|
188
|
-
var dropWhile = {};
|
|
189
|
-
|
|
190
|
-
(function (exports) {
|
|
191
|
-
|
|
192
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
193
|
-
|
|
194
|
-
function dropWhile(arr, canContinueDropping) {
|
|
195
|
-
const dropEndIndex = arr.findIndex((item, index, arr) => !canContinueDropping(item, index, arr));
|
|
196
|
-
if (dropEndIndex === -1) {
|
|
197
|
-
return [];
|
|
198
|
-
}
|
|
199
|
-
return arr.slice(dropEndIndex);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
exports.dropWhile = dropWhile;
|
|
203
|
-
} (dropWhile));
|
|
204
|
-
|
|
205
|
-
var fill = {};
|
|
206
|
-
|
|
207
|
-
(function (exports) {
|
|
208
|
-
|
|
209
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
210
|
-
|
|
211
|
-
function fill(array, value, start = 0, end = array.length) {
|
|
212
|
-
const length = array.length;
|
|
213
|
-
const finalStart = Math.max(start >= 0 ? start : length + start, 0);
|
|
214
|
-
const finalEnd = Math.min(end >= 0 ? end : length + end, length);
|
|
215
|
-
for (let i = finalStart; i < finalEnd; i++) {
|
|
216
|
-
array[i] = value;
|
|
217
|
-
}
|
|
218
|
-
return array;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
exports.fill = fill;
|
|
222
|
-
} (fill));
|
|
223
|
-
|
|
224
|
-
var flatMap = {};
|
|
225
|
-
|
|
226
|
-
var flatten = {};
|
|
227
|
-
|
|
228
|
-
(function (exports) {
|
|
229
|
-
|
|
230
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
231
|
-
|
|
232
|
-
function flatten(arr, depth = 1) {
|
|
233
|
-
const result = [];
|
|
234
|
-
const flooredDepth = Math.floor(depth);
|
|
235
|
-
const recursive = (arr, currentDepth) => {
|
|
236
|
-
for (let i = 0; i < arr.length; i++) {
|
|
237
|
-
const item = arr[i];
|
|
238
|
-
if (Array.isArray(item) && currentDepth < flooredDepth) {
|
|
239
|
-
recursive(item, currentDepth + 1);
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
result.push(item);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
recursive(arr, 0);
|
|
247
|
-
return result;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
exports.flatten = flatten;
|
|
251
|
-
} (flatten));
|
|
252
|
-
|
|
253
|
-
(function (exports) {
|
|
254
|
-
|
|
255
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
256
|
-
|
|
257
|
-
const flatten$1 = flatten;
|
|
258
|
-
|
|
259
|
-
function flatMap(arr, iteratee, depth = 1) {
|
|
260
|
-
return flatten$1.flatten(arr.map(item => iteratee(item)), depth);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
exports.flatMap = flatMap;
|
|
264
|
-
} (flatMap));
|
|
265
|
-
|
|
266
|
-
var flatMapDeep = {};
|
|
267
|
-
|
|
268
|
-
var flattenDeep = {};
|
|
269
|
-
|
|
270
|
-
(function (exports) {
|
|
271
|
-
|
|
272
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
273
|
-
|
|
274
|
-
const flatten$1 = flatten;
|
|
275
|
-
|
|
276
|
-
function flattenDeep(arr) {
|
|
277
|
-
return flatten$1.flatten(arr, Infinity);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
exports.flattenDeep = flattenDeep;
|
|
281
|
-
} (flattenDeep));
|
|
282
|
-
|
|
283
|
-
(function (exports) {
|
|
284
|
-
|
|
285
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
286
|
-
|
|
287
|
-
const flattenDeep$1 = flattenDeep;
|
|
288
|
-
|
|
289
|
-
function flatMapDeep(arr, iteratee) {
|
|
290
|
-
return flattenDeep$1.flattenDeep(arr.map((item) => iteratee(item)));
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
exports.flatMapDeep = flatMapDeep;
|
|
294
|
-
} (flatMapDeep));
|
|
295
|
-
|
|
296
|
-
var forEachRight = {};
|
|
297
|
-
|
|
298
|
-
(function (exports) {
|
|
299
|
-
|
|
300
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
301
|
-
|
|
302
|
-
function forEachRight(arr, callback) {
|
|
303
|
-
for (let i = arr.length - 1; i >= 0; i--) {
|
|
304
|
-
const element = arr[i];
|
|
305
|
-
callback(element, i, arr);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
exports.forEachRight = forEachRight;
|
|
310
|
-
} (forEachRight));
|
|
311
|
-
|
|
312
|
-
var groupBy = {};
|
|
313
|
-
|
|
314
|
-
(function (exports) {
|
|
315
|
-
|
|
316
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
317
|
-
|
|
318
|
-
function groupBy(arr, getKeyFromItem) {
|
|
319
|
-
const result = {};
|
|
320
|
-
for (let i = 0; i < arr.length; i++) {
|
|
321
|
-
const item = arr[i];
|
|
322
|
-
const key = getKeyFromItem(item);
|
|
323
|
-
if (!Object.hasOwn(result, key)) {
|
|
324
|
-
result[key] = [];
|
|
325
|
-
}
|
|
326
|
-
result[key].push(item);
|
|
327
|
-
}
|
|
328
|
-
return result;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
exports.groupBy = groupBy;
|
|
332
|
-
} (groupBy));
|
|
333
|
-
|
|
334
|
-
var head = {};
|
|
335
|
-
|
|
336
|
-
(function (exports) {
|
|
337
|
-
|
|
338
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
339
|
-
|
|
340
|
-
function head(arr) {
|
|
341
|
-
return arr[0];
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
exports.head = head;
|
|
345
|
-
} (head));
|
|
346
|
-
|
|
347
|
-
var initial = {};
|
|
348
|
-
|
|
349
|
-
(function (exports) {
|
|
350
|
-
|
|
351
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
352
|
-
|
|
353
|
-
function initial(arr) {
|
|
354
|
-
return arr.slice(0, -1);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
exports.initial = initial;
|
|
358
|
-
} (initial));
|
|
359
|
-
|
|
360
|
-
var intersection = {};
|
|
361
|
-
|
|
362
|
-
(function (exports) {
|
|
363
|
-
|
|
364
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
365
|
-
|
|
366
|
-
function intersection(firstArr, secondArr) {
|
|
367
|
-
const secondSet = new Set(secondArr);
|
|
368
|
-
return firstArr.filter(item => {
|
|
369
|
-
return secondSet.has(item);
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
exports.intersection = intersection;
|
|
374
|
-
} (intersection));
|
|
375
|
-
|
|
376
|
-
var intersectionBy = {};
|
|
377
|
-
|
|
378
|
-
(function (exports) {
|
|
379
|
-
|
|
380
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
381
|
-
|
|
382
|
-
function intersectionBy(firstArr, secondArr, mapper) {
|
|
383
|
-
const mappedSecondSet = new Set(secondArr.map(mapper));
|
|
384
|
-
return firstArr.filter(item => mappedSecondSet.has(mapper(item)));
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
exports.intersectionBy = intersectionBy;
|
|
388
|
-
} (intersectionBy));
|
|
389
|
-
|
|
390
|
-
var intersectionWith = {};
|
|
391
|
-
|
|
392
|
-
(function (exports) {
|
|
393
|
-
|
|
394
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
395
|
-
|
|
396
|
-
function intersectionWith(firstArr, secondArr, areItemsEqual) {
|
|
397
|
-
return firstArr.filter(firstItem => {
|
|
398
|
-
return secondArr.some(secondItem => {
|
|
399
|
-
return areItemsEqual(firstItem, secondItem);
|
|
400
|
-
});
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
exports.intersectionWith = intersectionWith;
|
|
405
|
-
} (intersectionWith));
|
|
406
|
-
|
|
407
|
-
var isSubset = {};
|
|
408
|
-
|
|
409
|
-
(function (exports) {
|
|
410
|
-
|
|
411
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
412
|
-
|
|
413
|
-
const difference$1 = difference;
|
|
414
|
-
|
|
415
|
-
function isSubset(superset, subset) {
|
|
416
|
-
return difference$1.difference(subset, superset).length === 0;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
exports.isSubset = isSubset;
|
|
420
|
-
} (isSubset));
|
|
421
|
-
|
|
422
|
-
var isSubsetWith = {};
|
|
423
|
-
|
|
424
|
-
(function (exports) {
|
|
425
|
-
|
|
426
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
427
|
-
|
|
428
|
-
const differenceWith$1 = differenceWith;
|
|
429
|
-
|
|
430
|
-
function isSubsetWith(superset, subset, areItemsEqual) {
|
|
431
|
-
return differenceWith$1.differenceWith(subset, superset, areItemsEqual).length === 0;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
exports.isSubsetWith = isSubsetWith;
|
|
435
|
-
} (isSubsetWith));
|
|
436
|
-
|
|
437
|
-
var keyBy = {};
|
|
438
|
-
|
|
439
|
-
(function (exports) {
|
|
440
|
-
|
|
441
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
442
|
-
|
|
443
|
-
function keyBy(arr, getKeyFromItem) {
|
|
444
|
-
const result = {};
|
|
445
|
-
for (let i = 0; i < arr.length; i++) {
|
|
446
|
-
const item = arr[i];
|
|
447
|
-
const key = getKeyFromItem(item);
|
|
448
|
-
result[key] = item;
|
|
449
|
-
}
|
|
450
|
-
return result;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
exports.keyBy = keyBy;
|
|
454
|
-
} (keyBy));
|
|
455
|
-
|
|
456
|
-
var last = {};
|
|
457
|
-
|
|
458
|
-
(function (exports) {
|
|
459
|
-
|
|
460
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
461
|
-
|
|
462
|
-
function last(arr) {
|
|
463
|
-
return arr[arr.length - 1];
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
exports.last = last;
|
|
467
|
-
} (last));
|
|
468
|
-
|
|
469
|
-
var maxBy = {};
|
|
470
|
-
|
|
471
|
-
(function (exports) {
|
|
472
|
-
|
|
473
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
474
|
-
|
|
475
|
-
function maxBy(items, getValue) {
|
|
476
|
-
if (items.length === 0) {
|
|
477
|
-
return undefined;
|
|
478
|
-
}
|
|
479
|
-
let maxElement = items[0];
|
|
480
|
-
let max = getValue(maxElement);
|
|
481
|
-
for (let i = 1; i < items.length; i++) {
|
|
482
|
-
const element = items[i];
|
|
483
|
-
const value = getValue(element);
|
|
484
|
-
if (value > max) {
|
|
485
|
-
max = value;
|
|
486
|
-
maxElement = element;
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
return maxElement;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
exports.maxBy = maxBy;
|
|
493
|
-
} (maxBy));
|
|
494
|
-
|
|
495
|
-
var minBy = {};
|
|
496
|
-
|
|
497
|
-
(function (exports) {
|
|
498
|
-
|
|
499
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
500
|
-
|
|
501
|
-
function minBy(items, getValue) {
|
|
502
|
-
if (items.length === 0) {
|
|
503
|
-
return undefined;
|
|
504
|
-
}
|
|
505
|
-
let minElement = items[0];
|
|
506
|
-
let min = getValue(minElement);
|
|
507
|
-
for (let i = 1; i < items.length; i++) {
|
|
508
|
-
const element = items[i];
|
|
509
|
-
const value = getValue(element);
|
|
510
|
-
if (value < min) {
|
|
511
|
-
min = value;
|
|
512
|
-
minElement = element;
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
return minElement;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
exports.minBy = minBy;
|
|
519
|
-
} (minBy));
|
|
520
|
-
|
|
521
|
-
var orderBy = {};
|
|
522
|
-
|
|
523
|
-
var compareValues = {};
|
|
524
|
-
|
|
525
|
-
(function (exports) {
|
|
526
|
-
|
|
527
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
528
|
-
|
|
529
|
-
function compareValues(a, b, order) {
|
|
530
|
-
if (a < b) {
|
|
531
|
-
return order === 'asc' ? -1 : 1;
|
|
532
|
-
}
|
|
533
|
-
if (a > b) {
|
|
534
|
-
return order === 'asc' ? 1 : -1;
|
|
535
|
-
}
|
|
536
|
-
return 0;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
exports.compareValues = compareValues;
|
|
540
|
-
} (compareValues));
|
|
541
|
-
|
|
542
|
-
(function (exports) {
|
|
543
|
-
|
|
544
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
545
|
-
|
|
546
|
-
const compareValues$1 = compareValues;
|
|
547
|
-
|
|
548
|
-
function orderBy(arr, criteria, orders) {
|
|
549
|
-
return arr.slice().sort((a, b) => {
|
|
550
|
-
const ordersLength = orders.length;
|
|
551
|
-
for (let i = 0; i < criteria.length; i++) {
|
|
552
|
-
const order = ordersLength > i ? orders[i] : orders[ordersLength - 1];
|
|
553
|
-
const criterion = criteria[i];
|
|
554
|
-
const criterionIsFunction = typeof criterion === 'function';
|
|
555
|
-
const valueA = criterionIsFunction ? criterion(a) : a[criterion];
|
|
556
|
-
const valueB = criterionIsFunction ? criterion(b) : b[criterion];
|
|
557
|
-
const result = compareValues$1.compareValues(valueA, valueB, order);
|
|
558
|
-
if (result !== 0) {
|
|
559
|
-
return result;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
return 0;
|
|
563
|
-
});
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
exports.orderBy = orderBy;
|
|
567
|
-
} (orderBy));
|
|
568
|
-
|
|
569
|
-
var partition = {};
|
|
570
|
-
|
|
571
|
-
(function (exports) {
|
|
572
|
-
|
|
573
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
574
|
-
|
|
575
|
-
function partition(arr, isInTruthy) {
|
|
576
|
-
const truthy = [];
|
|
577
|
-
const falsy = [];
|
|
578
|
-
for (let i = 0; i < arr.length; i++) {
|
|
579
|
-
const item = arr[i];
|
|
580
|
-
if (isInTruthy(item)) {
|
|
581
|
-
truthy.push(item);
|
|
582
|
-
}
|
|
583
|
-
else {
|
|
584
|
-
falsy.push(item);
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
return [truthy, falsy];
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
exports.partition = partition;
|
|
591
|
-
} (partition));
|
|
592
|
-
|
|
593
|
-
var pull = {};
|
|
594
|
-
|
|
595
|
-
(function (exports) {
|
|
596
|
-
|
|
597
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
598
|
-
|
|
599
|
-
function pull(arr, valuesToRemove) {
|
|
600
|
-
const valuesSet = new Set(valuesToRemove);
|
|
601
|
-
let resultIndex = 0;
|
|
602
|
-
for (let i = 0; i < arr.length; i++) {
|
|
603
|
-
if (valuesSet.has(arr[i])) {
|
|
604
|
-
continue;
|
|
605
|
-
}
|
|
606
|
-
if (!Object.hasOwn(arr, i)) {
|
|
607
|
-
delete arr[resultIndex++];
|
|
608
|
-
continue;
|
|
609
|
-
}
|
|
610
|
-
arr[resultIndex++] = arr[i];
|
|
611
|
-
}
|
|
612
|
-
arr.length = resultIndex;
|
|
613
|
-
return arr;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
exports.pull = pull;
|
|
617
|
-
} (pull));
|
|
618
|
-
|
|
619
|
-
var pullAt = {};
|
|
620
|
-
|
|
621
|
-
(function (exports) {
|
|
622
|
-
|
|
623
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
624
|
-
|
|
625
|
-
const at$1 = at;
|
|
626
|
-
|
|
627
|
-
function pullAt(arr, indicesToRemove) {
|
|
628
|
-
const removed = at$1.at(arr, indicesToRemove);
|
|
629
|
-
const indices = new Set(indicesToRemove.slice().sort((x, y) => y - x));
|
|
630
|
-
for (const index of indices) {
|
|
631
|
-
arr.splice(index, 1);
|
|
632
|
-
}
|
|
633
|
-
return removed;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
exports.pullAt = pullAt;
|
|
637
|
-
} (pullAt));
|
|
638
|
-
|
|
639
|
-
var remove = {};
|
|
640
|
-
|
|
641
|
-
(function (exports) {
|
|
642
|
-
|
|
643
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
644
|
-
|
|
645
|
-
function remove(arr, shouldRemoveElement) {
|
|
646
|
-
const originalArr = arr.slice();
|
|
647
|
-
const removed = [];
|
|
648
|
-
let resultIndex = 0;
|
|
649
|
-
for (let i = 0; i < arr.length; i++) {
|
|
650
|
-
if (shouldRemoveElement(arr[i], i, originalArr)) {
|
|
651
|
-
removed.push(arr[i]);
|
|
652
|
-
continue;
|
|
653
|
-
}
|
|
654
|
-
if (!Object.hasOwn(arr, i)) {
|
|
655
|
-
delete arr[resultIndex++];
|
|
656
|
-
continue;
|
|
657
|
-
}
|
|
658
|
-
arr[resultIndex++] = arr[i];
|
|
659
|
-
}
|
|
660
|
-
arr.length = resultIndex;
|
|
661
|
-
return removed;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
exports.remove = remove;
|
|
665
|
-
} (remove));
|
|
666
|
-
|
|
667
|
-
var sample = {};
|
|
668
|
-
|
|
669
|
-
(function (exports) {
|
|
670
|
-
|
|
671
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
672
|
-
|
|
673
|
-
function sample(arr) {
|
|
674
|
-
const randomIndex = Math.floor(Math.random() * arr.length);
|
|
675
|
-
return arr[randomIndex];
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
exports.sample = sample;
|
|
679
|
-
} (sample));
|
|
680
|
-
|
|
681
|
-
var sampleSize = {};
|
|
682
|
-
|
|
683
|
-
var randomInt = {};
|
|
684
|
-
|
|
685
|
-
var random = {};
|
|
686
|
-
|
|
687
|
-
(function (exports) {
|
|
688
|
-
|
|
689
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
690
|
-
|
|
691
|
-
function random(minimum, maximum) {
|
|
692
|
-
if (maximum == null) {
|
|
693
|
-
maximum = minimum;
|
|
694
|
-
minimum = 0;
|
|
695
|
-
}
|
|
696
|
-
if (minimum >= maximum) {
|
|
697
|
-
throw new Error('Invalid input: The maximum value must be greater than the minimum value.');
|
|
698
|
-
}
|
|
699
|
-
return Math.random() * (maximum - minimum) + minimum;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
exports.random = random;
|
|
703
|
-
} (random));
|
|
704
|
-
|
|
705
|
-
(function (exports) {
|
|
706
|
-
|
|
707
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
708
|
-
|
|
709
|
-
const random$1 = random;
|
|
710
|
-
|
|
711
|
-
function randomInt(minimum, maximum) {
|
|
712
|
-
return Math.floor(random$1.random(minimum, maximum));
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
exports.randomInt = randomInt;
|
|
716
|
-
} (randomInt));
|
|
717
|
-
|
|
718
|
-
(function (exports) {
|
|
719
|
-
|
|
720
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
721
|
-
|
|
722
|
-
const randomInt$1 = randomInt;
|
|
723
|
-
|
|
724
|
-
function sampleSize(array, size) {
|
|
725
|
-
if (size > array.length) {
|
|
726
|
-
throw new Error('Size must be less than or equal to the length of array.');
|
|
727
|
-
}
|
|
728
|
-
const result = new Array(size);
|
|
729
|
-
const selected = new Set();
|
|
730
|
-
for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) {
|
|
731
|
-
let index = randomInt$1.randomInt(0, step + 1);
|
|
732
|
-
if (selected.has(index)) {
|
|
733
|
-
index = step;
|
|
734
|
-
}
|
|
735
|
-
selected.add(index);
|
|
736
|
-
result[resultIndex] = array[index];
|
|
737
|
-
}
|
|
738
|
-
return result;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
exports.sampleSize = sampleSize;
|
|
742
|
-
} (sampleSize));
|
|
743
|
-
|
|
744
|
-
var shuffle = {};
|
|
745
|
-
|
|
746
|
-
(function (exports) {
|
|
747
|
-
|
|
748
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
749
|
-
|
|
750
|
-
function shuffle(arr) {
|
|
751
|
-
const result = arr.slice();
|
|
752
|
-
for (let i = result.length - 1; i >= 1; i--) {
|
|
753
|
-
const j = Math.floor(Math.random() * (i + 1));
|
|
754
|
-
[result[i], result[j]] = [result[j], result[i]];
|
|
755
|
-
}
|
|
756
|
-
return result;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
exports.shuffle = shuffle;
|
|
760
|
-
} (shuffle));
|
|
761
|
-
|
|
762
|
-
var sortBy = {};
|
|
763
|
-
|
|
764
|
-
(function (exports) {
|
|
765
|
-
|
|
766
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
767
|
-
|
|
768
|
-
const orderBy$1 = orderBy;
|
|
769
|
-
|
|
770
|
-
function sortBy(arr, criteria) {
|
|
771
|
-
return orderBy$1.orderBy(arr, criteria, ['asc']);
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
exports.sortBy = sortBy;
|
|
775
|
-
} (sortBy));
|
|
776
|
-
|
|
777
|
-
var tail = {};
|
|
778
|
-
|
|
779
|
-
(function (exports) {
|
|
780
|
-
|
|
781
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
782
|
-
|
|
783
|
-
function tail(arr) {
|
|
784
|
-
return arr.slice(1);
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
exports.tail = tail;
|
|
788
|
-
} (tail));
|
|
789
|
-
|
|
790
|
-
var take = {};
|
|
791
|
-
|
|
792
|
-
var toInteger = {};
|
|
793
|
-
|
|
794
|
-
var toFinite = {};
|
|
795
|
-
|
|
796
|
-
var toNumber = {};
|
|
797
|
-
|
|
798
|
-
var isSymbol$1 = {};
|
|
799
|
-
|
|
800
|
-
(function (exports) {
|
|
801
|
-
|
|
802
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
803
|
-
|
|
804
|
-
function isSymbol(value) {
|
|
805
|
-
return typeof value === 'symbol' || value instanceof Symbol;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
exports.isSymbol = isSymbol;
|
|
809
|
-
} (isSymbol$1));
|
|
810
|
-
|
|
811
|
-
(function (exports) {
|
|
812
|
-
|
|
813
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
814
|
-
|
|
815
|
-
const isSymbol = isSymbol$1;
|
|
816
|
-
|
|
817
|
-
function toNumber(value) {
|
|
818
|
-
if (isSymbol.isSymbol(value)) {
|
|
819
|
-
return NaN;
|
|
820
|
-
}
|
|
821
|
-
return Number(value);
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
exports.toNumber = toNumber;
|
|
825
|
-
} (toNumber));
|
|
826
|
-
|
|
827
|
-
(function (exports) {
|
|
828
|
-
|
|
829
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
830
|
-
|
|
831
|
-
const toNumber$1 = toNumber;
|
|
832
|
-
|
|
833
|
-
function toFinite(value) {
|
|
834
|
-
if (!value) {
|
|
835
|
-
return value === 0 ? value : 0;
|
|
836
|
-
}
|
|
837
|
-
value = toNumber$1.toNumber(value);
|
|
838
|
-
if (value === Infinity || value === -Infinity) {
|
|
839
|
-
const sign = value < 0 ? -1 : 1;
|
|
840
|
-
return sign * Number.MAX_VALUE;
|
|
841
|
-
}
|
|
842
|
-
return value === value ? value : 0;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
exports.toFinite = toFinite;
|
|
846
|
-
} (toFinite));
|
|
847
|
-
|
|
848
|
-
(function (exports) {
|
|
849
|
-
|
|
850
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
851
|
-
|
|
852
|
-
const toFinite$1 = toFinite;
|
|
853
|
-
|
|
854
|
-
function toInteger(value) {
|
|
855
|
-
const finite = toFinite$1.toFinite(value);
|
|
856
|
-
const remainder = finite % 1;
|
|
857
|
-
return remainder ? finite - remainder : finite;
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
exports.toInteger = toInteger;
|
|
861
|
-
} (toInteger));
|
|
862
|
-
|
|
863
|
-
(function (exports) {
|
|
864
|
-
|
|
865
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
866
|
-
|
|
867
|
-
const toInteger$1 = toInteger;
|
|
868
|
-
|
|
869
|
-
function take(arr, count, guard) {
|
|
870
|
-
count = guard || count === undefined ? 1 : toInteger$1.toInteger(count);
|
|
871
|
-
return arr.slice(0, count);
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
exports.take = take;
|
|
875
|
-
} (take));
|
|
876
|
-
|
|
877
|
-
var takeRight = {};
|
|
878
|
-
|
|
879
|
-
(function (exports) {
|
|
880
|
-
|
|
881
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
882
|
-
|
|
883
|
-
const toInteger$1 = toInteger;
|
|
884
|
-
|
|
885
|
-
function takeRight(arr, count = 1, guard) {
|
|
886
|
-
count = guard || count === undefined ? 1 : toInteger$1.toInteger(count);
|
|
887
|
-
if (count <= 0 || arr == null || arr.length === 0) {
|
|
888
|
-
return [];
|
|
889
|
-
}
|
|
890
|
-
return arr.slice(-count);
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
exports.takeRight = takeRight;
|
|
894
|
-
} (takeRight));
|
|
895
|
-
|
|
896
|
-
var takeRightWhile = {};
|
|
897
|
-
|
|
898
|
-
(function (exports) {
|
|
899
|
-
|
|
900
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
901
|
-
|
|
902
|
-
function takeRightWhile(arr, shouldContinueTaking) {
|
|
903
|
-
for (let i = arr.length - 1; i >= 0; i--) {
|
|
904
|
-
if (!shouldContinueTaking(arr[i])) {
|
|
905
|
-
return arr.slice(i + 1);
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
return arr.slice();
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
exports.takeRightWhile = takeRightWhile;
|
|
912
|
-
} (takeRightWhile));
|
|
913
|
-
|
|
914
|
-
var takeWhile = {};
|
|
915
|
-
|
|
916
|
-
(function (exports) {
|
|
917
|
-
|
|
918
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
919
|
-
|
|
920
|
-
function takeWhile(arr, shouldContinueTaking) {
|
|
921
|
-
const result = [];
|
|
922
|
-
for (let i = 0; i < arr.length; i++) {
|
|
923
|
-
const item = arr[i];
|
|
924
|
-
if (!shouldContinueTaking(item)) {
|
|
925
|
-
break;
|
|
926
|
-
}
|
|
927
|
-
result.push(item);
|
|
928
|
-
}
|
|
929
|
-
return result;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
exports.takeWhile = takeWhile;
|
|
933
|
-
} (takeWhile));
|
|
934
|
-
|
|
935
|
-
var toFilled = {};
|
|
936
|
-
|
|
937
|
-
(function (exports) {
|
|
938
|
-
|
|
939
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
940
|
-
|
|
941
|
-
function toFilled(arr, value, start = 0, end = arr.length) {
|
|
942
|
-
const length = arr.length;
|
|
943
|
-
const finalStart = Math.max(start >= 0 ? start : length + start, 0);
|
|
944
|
-
const finalEnd = Math.min(end >= 0 ? end : length + end, length);
|
|
945
|
-
const newArr = arr.slice();
|
|
946
|
-
for (let i = finalStart; i < finalEnd; i++) {
|
|
947
|
-
newArr[i] = value;
|
|
948
|
-
}
|
|
949
|
-
return newArr;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
exports.toFilled = toFilled;
|
|
953
|
-
} (toFilled));
|
|
954
|
-
|
|
955
|
-
var union = {};
|
|
956
|
-
|
|
957
|
-
var uniq = {};
|
|
958
|
-
|
|
959
|
-
(function (exports) {
|
|
960
|
-
|
|
961
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
962
|
-
|
|
963
|
-
function uniq(arr) {
|
|
964
|
-
return Array.from(new Set(arr));
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
exports.uniq = uniq;
|
|
968
|
-
} (uniq));
|
|
969
|
-
|
|
970
|
-
(function (exports) {
|
|
971
|
-
|
|
972
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
973
|
-
|
|
974
|
-
const uniq$1 = uniq;
|
|
975
|
-
|
|
976
|
-
function union(arr1, arr2) {
|
|
977
|
-
return uniq$1.uniq(arr1.concat(arr2));
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
exports.union = union;
|
|
981
|
-
} (union));
|
|
982
|
-
|
|
983
|
-
var unionBy = {};
|
|
984
|
-
|
|
985
|
-
var uniqBy = {};
|
|
986
|
-
|
|
987
|
-
(function (exports) {
|
|
988
|
-
|
|
989
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
990
|
-
|
|
991
|
-
function uniqBy(arr, mapper) {
|
|
992
|
-
const map = new Map();
|
|
993
|
-
for (let i = 0; i < arr.length; i++) {
|
|
994
|
-
const item = arr[i];
|
|
995
|
-
const key = mapper(item);
|
|
996
|
-
if (!map.has(key)) {
|
|
997
|
-
map.set(key, item);
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
return Array.from(map.values());
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
exports.uniqBy = uniqBy;
|
|
1004
|
-
} (uniqBy));
|
|
1005
|
-
|
|
1006
|
-
(function (exports) {
|
|
1007
|
-
|
|
1008
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1009
|
-
|
|
1010
|
-
const uniqBy$1 = uniqBy;
|
|
1011
|
-
|
|
1012
|
-
function unionBy(arr1, arr2, mapper) {
|
|
1013
|
-
return uniqBy$1.uniqBy(arr1.concat(arr2), mapper);
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
exports.unionBy = unionBy;
|
|
1017
|
-
} (unionBy));
|
|
1018
|
-
|
|
1019
|
-
var unionWith = {};
|
|
1020
|
-
|
|
1021
|
-
var uniqWith = {};
|
|
1022
|
-
|
|
1023
|
-
(function (exports) {
|
|
1024
|
-
|
|
1025
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1026
|
-
|
|
1027
|
-
function uniqWith(arr, areItemsEqual) {
|
|
1028
|
-
const result = [];
|
|
1029
|
-
for (let i = 0; i < arr.length; i++) {
|
|
1030
|
-
const item = arr[i];
|
|
1031
|
-
const isUniq = result.every(v => !areItemsEqual(v, item));
|
|
1032
|
-
if (isUniq) {
|
|
1033
|
-
result.push(item);
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
return result;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
exports.uniqWith = uniqWith;
|
|
1040
|
-
} (uniqWith));
|
|
1041
|
-
|
|
1042
|
-
(function (exports) {
|
|
1043
|
-
|
|
1044
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1045
|
-
|
|
1046
|
-
const uniqWith$1 = uniqWith;
|
|
1047
|
-
|
|
1048
|
-
function unionWith(arr1, arr2, areItemsEqual) {
|
|
1049
|
-
return uniqWith$1.uniqWith(arr1.concat(arr2), areItemsEqual);
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
exports.unionWith = unionWith;
|
|
1053
|
-
} (unionWith));
|
|
1054
|
-
|
|
1055
|
-
var unzip = {};
|
|
1056
|
-
|
|
1057
|
-
(function (exports) {
|
|
1058
|
-
|
|
1059
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1060
|
-
|
|
1061
|
-
function unzip(zipped) {
|
|
1062
|
-
let maxLen = 0;
|
|
1063
|
-
for (let i = 0; i < zipped.length; i++) {
|
|
1064
|
-
if (zipped[i].length > maxLen) {
|
|
1065
|
-
maxLen = zipped[i].length;
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
const result = new Array(maxLen);
|
|
1069
|
-
for (let i = 0; i < maxLen; i++) {
|
|
1070
|
-
result[i] = new Array(zipped.length);
|
|
1071
|
-
for (let j = 0; j < zipped.length; j++) {
|
|
1072
|
-
result[i][j] = zipped[j][i];
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
return result;
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
exports.unzip = unzip;
|
|
1079
|
-
} (unzip));
|
|
1080
|
-
|
|
1081
|
-
var unzipWith = {};
|
|
1082
|
-
|
|
1083
|
-
(function (exports) {
|
|
1084
|
-
|
|
1085
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1086
|
-
|
|
1087
|
-
function unzipWith(target, iteratee) {
|
|
1088
|
-
const maxLength = Math.max(...target.map(innerArray => innerArray.length));
|
|
1089
|
-
const result = new Array(maxLength);
|
|
1090
|
-
for (let i = 0; i < maxLength; i++) {
|
|
1091
|
-
const group = new Array(target.length);
|
|
1092
|
-
for (let j = 0; j < target.length; j++) {
|
|
1093
|
-
group[j] = target[j][i];
|
|
1094
|
-
}
|
|
1095
|
-
result[i] = iteratee(...group);
|
|
1096
|
-
}
|
|
1097
|
-
return result;
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
exports.unzipWith = unzipWith;
|
|
1101
|
-
} (unzipWith));
|
|
1102
|
-
|
|
1103
|
-
var windowed = {};
|
|
1104
|
-
|
|
1105
|
-
(function (exports) {
|
|
1106
|
-
|
|
1107
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1108
|
-
|
|
1109
|
-
function windowed(arr, size, step = 1, { partialWindows = false } = {}) {
|
|
1110
|
-
if (size <= 0 || !Number.isInteger(size)) {
|
|
1111
|
-
throw new Error('Size must be a positive integer.');
|
|
1112
|
-
}
|
|
1113
|
-
if (step <= 0 || !Number.isInteger(step)) {
|
|
1114
|
-
throw new Error('Step must be a positive integer.');
|
|
1115
|
-
}
|
|
1116
|
-
const result = [];
|
|
1117
|
-
const end = partialWindows ? arr.length : arr.length - size + 1;
|
|
1118
|
-
for (let i = 0; i < end; i += step) {
|
|
1119
|
-
result.push(arr.slice(i, i + size));
|
|
1120
|
-
}
|
|
1121
|
-
return result;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
exports.windowed = windowed;
|
|
1125
|
-
} (windowed));
|
|
1126
|
-
|
|
1127
|
-
var without = {};
|
|
1128
|
-
|
|
1129
|
-
(function (exports) {
|
|
1130
|
-
|
|
1131
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1132
|
-
|
|
1133
|
-
const difference$1 = difference;
|
|
1134
|
-
|
|
1135
|
-
function without(array, ...values) {
|
|
1136
|
-
return difference$1.difference(array, values);
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
exports.without = without;
|
|
1140
|
-
} (without));
|
|
1141
|
-
|
|
1142
|
-
var xor = {};
|
|
1143
|
-
|
|
1144
|
-
(function (exports) {
|
|
1145
|
-
|
|
1146
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1147
|
-
|
|
1148
|
-
const difference$1 = difference;
|
|
1149
|
-
const intersection$1 = intersection;
|
|
1150
|
-
const union$1 = union;
|
|
1151
|
-
|
|
1152
|
-
function xor(arr1, arr2) {
|
|
1153
|
-
return difference$1.difference(union$1.union(arr1, arr2), intersection$1.intersection(arr1, arr2));
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
exports.xor = xor;
|
|
1157
|
-
} (xor));
|
|
1158
|
-
|
|
1159
|
-
var xorBy = {};
|
|
1160
|
-
|
|
1161
|
-
(function (exports) {
|
|
1162
|
-
|
|
1163
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1164
|
-
|
|
1165
|
-
const differenceBy$1 = differenceBy;
|
|
1166
|
-
const intersectionBy$1 = intersectionBy;
|
|
1167
|
-
const unionBy$1 = unionBy;
|
|
1168
|
-
|
|
1169
|
-
function xorBy(arr1, arr2, mapper) {
|
|
1170
|
-
const union = unionBy$1.unionBy(arr1, arr2, mapper);
|
|
1171
|
-
const intersection = intersectionBy$1.intersectionBy(arr1, arr2, mapper);
|
|
1172
|
-
return differenceBy$1.differenceBy(union, intersection, mapper);
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
exports.xorBy = xorBy;
|
|
1176
|
-
} (xorBy));
|
|
1177
|
-
|
|
1178
|
-
var xorWith = {};
|
|
1179
|
-
|
|
1180
|
-
(function (exports) {
|
|
1181
|
-
|
|
1182
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1183
|
-
|
|
1184
|
-
const differenceWith$1 = differenceWith;
|
|
1185
|
-
const intersectionWith$1 = intersectionWith;
|
|
1186
|
-
const unionWith$1 = unionWith;
|
|
1187
|
-
|
|
1188
|
-
function xorWith(arr1, arr2, areElementsEqual) {
|
|
1189
|
-
const union = unionWith$1.unionWith(arr1, arr2, areElementsEqual);
|
|
1190
|
-
const intersection = intersectionWith$1.intersectionWith(arr1, arr2, areElementsEqual);
|
|
1191
|
-
return differenceWith$1.differenceWith(union, intersection, areElementsEqual);
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
exports.xorWith = xorWith;
|
|
1195
|
-
} (xorWith));
|
|
1196
|
-
|
|
1197
|
-
var zip = {};
|
|
1198
|
-
|
|
1199
|
-
(function (exports) {
|
|
1200
|
-
|
|
1201
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1202
|
-
|
|
1203
|
-
function zip(...arrs) {
|
|
1204
|
-
let rowCount = 0;
|
|
1205
|
-
for (let i = 0; i < arrs.length; i++) {
|
|
1206
|
-
if (arrs[i].length > rowCount) {
|
|
1207
|
-
rowCount = arrs[i].length;
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
const columnCount = arrs.length;
|
|
1211
|
-
const result = Array(rowCount);
|
|
1212
|
-
for (let i = 0; i < rowCount; ++i) {
|
|
1213
|
-
const row = Array(columnCount);
|
|
1214
|
-
for (let j = 0; j < columnCount; ++j) {
|
|
1215
|
-
row[j] = arrs[j][i];
|
|
1216
|
-
}
|
|
1217
|
-
result[i] = row;
|
|
1218
|
-
}
|
|
1219
|
-
return result;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
exports.zip = zip;
|
|
1223
|
-
} (zip));
|
|
1224
|
-
|
|
1225
|
-
var zipObject = {};
|
|
1226
|
-
|
|
1227
|
-
(function (exports) {
|
|
1228
|
-
|
|
1229
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1230
|
-
|
|
1231
|
-
function zipObject(keys, values) {
|
|
1232
|
-
const result = {};
|
|
1233
|
-
for (let i = 0; i < keys.length; i++) {
|
|
1234
|
-
result[keys[i]] = values[i];
|
|
1235
|
-
}
|
|
1236
|
-
return result;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
exports.zipObject = zipObject;
|
|
1240
|
-
} (zipObject));
|
|
1241
|
-
|
|
1242
|
-
var zipWith = {};
|
|
1243
|
-
|
|
1244
|
-
(function (exports) {
|
|
1245
|
-
|
|
1246
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1247
|
-
|
|
1248
|
-
function zipWith(arr1, ...rest) {
|
|
1249
|
-
const arrs = [arr1, ...rest.slice(0, -1)];
|
|
1250
|
-
const combine = rest[rest.length - 1];
|
|
1251
|
-
const maxIndex = Math.max(...arrs.map(arr => arr.length));
|
|
1252
|
-
const result = Array(maxIndex);
|
|
1253
|
-
for (let i = 0; i < maxIndex; i++) {
|
|
1254
|
-
const elements = arrs.map(arr => arr[i]);
|
|
1255
|
-
result[i] = combine(...elements);
|
|
1256
|
-
}
|
|
1257
|
-
return result;
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
exports.zipWith = zipWith;
|
|
1261
|
-
} (zipWith));
|
|
1262
|
-
|
|
1263
|
-
var AbortError = {};
|
|
1264
|
-
|
|
1265
|
-
(function (exports) {
|
|
1266
|
-
|
|
1267
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1268
|
-
|
|
1269
|
-
class AbortError extends Error {
|
|
1270
|
-
constructor(message = 'The operation was aborted') {
|
|
1271
|
-
super(message);
|
|
1272
|
-
this.name = 'AbortError';
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
exports.AbortError = AbortError;
|
|
1277
|
-
} (AbortError));
|
|
1278
|
-
|
|
1279
|
-
var TimeoutError = {};
|
|
1280
|
-
|
|
1281
|
-
(function (exports) {
|
|
1282
|
-
|
|
1283
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1284
|
-
|
|
1285
|
-
class TimeoutError extends Error {
|
|
1286
|
-
constructor(message = 'The operation was timed out') {
|
|
1287
|
-
super(message);
|
|
1288
|
-
this.name = 'TimeoutError';
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
exports.TimeoutError = TimeoutError;
|
|
1293
|
-
} (TimeoutError));
|
|
1294
|
-
|
|
1295
|
-
var after = {};
|
|
1296
|
-
|
|
1297
|
-
(function (exports) {
|
|
1298
|
-
|
|
1299
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1300
|
-
|
|
1301
|
-
function after(n, func) {
|
|
1302
|
-
if (!Number.isInteger(n) || n < 0) {
|
|
1303
|
-
throw new Error(`n must be a non-negative integer.`);
|
|
1304
|
-
}
|
|
1305
|
-
let counter = 0;
|
|
1306
|
-
return (...args) => {
|
|
1307
|
-
if (++counter >= n) {
|
|
1308
|
-
return func(...args);
|
|
1309
|
-
}
|
|
1310
|
-
return undefined;
|
|
1311
|
-
};
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
exports.after = after;
|
|
1315
|
-
} (after));
|
|
1316
|
-
|
|
1317
|
-
var ary = {};
|
|
1318
|
-
|
|
1319
|
-
(function (exports) {
|
|
1320
|
-
|
|
1321
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1322
|
-
|
|
1323
|
-
function ary(func, n) {
|
|
1324
|
-
return function (...args) {
|
|
1325
|
-
return func.apply(this, args.slice(0, n));
|
|
1326
|
-
};
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
exports.ary = ary;
|
|
1330
|
-
} (ary));
|
|
1331
|
-
|
|
1332
|
-
var asyncNoop = {};
|
|
1333
|
-
|
|
1334
|
-
(function (exports) {
|
|
1335
|
-
|
|
1336
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1337
|
-
|
|
1338
|
-
async function asyncNoop() { }
|
|
1339
|
-
|
|
1340
|
-
exports.asyncNoop = asyncNoop;
|
|
1341
|
-
} (asyncNoop));
|
|
1342
|
-
|
|
1343
|
-
var before = {};
|
|
1344
|
-
|
|
1345
|
-
(function (exports) {
|
|
1346
|
-
|
|
1347
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1348
|
-
|
|
1349
|
-
function before(n, func) {
|
|
1350
|
-
if (!Number.isInteger(n) || n < 0) {
|
|
1351
|
-
throw new Error('n must be a non-negative integer.');
|
|
1352
|
-
}
|
|
1353
|
-
let counter = 0;
|
|
1354
|
-
return (...args) => {
|
|
1355
|
-
if (++counter < n) {
|
|
1356
|
-
return func(...args);
|
|
1357
|
-
}
|
|
1358
|
-
return undefined;
|
|
1359
|
-
};
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
exports.before = before;
|
|
1363
|
-
} (before));
|
|
1364
|
-
|
|
1365
|
-
var curry = {};
|
|
1366
|
-
|
|
1367
|
-
(function (exports) {
|
|
1368
|
-
|
|
1369
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1370
|
-
|
|
1371
|
-
function curry(func) {
|
|
1372
|
-
if (func.length === 0 || func.length === 1) {
|
|
1373
|
-
return func;
|
|
1374
|
-
}
|
|
1375
|
-
return function (arg) {
|
|
1376
|
-
return makeCurry(func, func.length, [arg]);
|
|
1377
|
-
};
|
|
1378
|
-
}
|
|
1379
|
-
function makeCurry(origin, argsLength, args) {
|
|
1380
|
-
if (args.length === argsLength) {
|
|
1381
|
-
return origin(...args);
|
|
1382
|
-
}
|
|
1383
|
-
else {
|
|
1384
|
-
const next = function (arg) {
|
|
1385
|
-
return makeCurry(origin, argsLength, [...args, arg]);
|
|
1386
|
-
};
|
|
1387
|
-
return next;
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
exports.curry = curry;
|
|
1392
|
-
} (curry));
|
|
1393
|
-
|
|
1394
|
-
var curryRight = {};
|
|
1395
|
-
|
|
1396
|
-
(function (exports) {
|
|
1397
|
-
|
|
1398
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1399
|
-
|
|
1400
|
-
function curryRight(func) {
|
|
1401
|
-
if (func.length === 0 || func.length === 1) {
|
|
1402
|
-
return func;
|
|
1403
|
-
}
|
|
1404
|
-
return function (arg) {
|
|
1405
|
-
return makeCurryRight(func, func.length, [arg]);
|
|
1406
|
-
};
|
|
1407
|
-
}
|
|
1408
|
-
function makeCurryRight(origin, argsLength, args) {
|
|
1409
|
-
if (args.length === argsLength) {
|
|
1410
|
-
return origin(...args);
|
|
1411
|
-
}
|
|
1412
|
-
else {
|
|
1413
|
-
const next = function (arg) {
|
|
1414
|
-
return makeCurryRight(origin, argsLength, [arg, ...args]);
|
|
1415
|
-
};
|
|
1416
|
-
return next;
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
exports.curryRight = curryRight;
|
|
1421
|
-
} (curryRight));
|
|
1422
|
-
|
|
1423
|
-
var debounce = {};
|
|
1424
|
-
|
|
1425
|
-
(function (exports) {
|
|
1426
|
-
|
|
1427
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1428
|
-
|
|
1429
|
-
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
1430
|
-
let pendingThis = undefined;
|
|
1431
|
-
let pendingArgs = null;
|
|
1432
|
-
const leading = edges != null && edges.includes('leading');
|
|
1433
|
-
const trailing = edges == null || edges.includes('trailing');
|
|
1434
|
-
const invoke = () => {
|
|
1435
|
-
if (pendingArgs !== null) {
|
|
1436
|
-
func.apply(pendingThis, pendingArgs);
|
|
1437
|
-
pendingThis = undefined;
|
|
1438
|
-
pendingArgs = null;
|
|
1439
|
-
}
|
|
1440
|
-
};
|
|
1441
|
-
const onTimerEnd = () => {
|
|
1442
|
-
if (trailing) {
|
|
1443
|
-
invoke();
|
|
1444
|
-
}
|
|
1445
|
-
cancel();
|
|
1446
|
-
};
|
|
1447
|
-
let timeoutId = null;
|
|
1448
|
-
const schedule = () => {
|
|
1449
|
-
if (timeoutId != null) {
|
|
1450
|
-
clearTimeout(timeoutId);
|
|
1451
|
-
}
|
|
1452
|
-
timeoutId = setTimeout(() => {
|
|
1453
|
-
timeoutId = null;
|
|
1454
|
-
onTimerEnd();
|
|
1455
|
-
}, debounceMs);
|
|
1456
|
-
};
|
|
1457
|
-
const cancelTimer = () => {
|
|
1458
|
-
if (timeoutId !== null) {
|
|
1459
|
-
clearTimeout(timeoutId);
|
|
1460
|
-
timeoutId = null;
|
|
1461
|
-
}
|
|
1462
|
-
};
|
|
1463
|
-
const cancel = () => {
|
|
1464
|
-
cancelTimer();
|
|
1465
|
-
pendingThis = undefined;
|
|
1466
|
-
pendingArgs = null;
|
|
1467
|
-
};
|
|
1468
|
-
const flush = () => {
|
|
1469
|
-
cancelTimer();
|
|
1470
|
-
invoke();
|
|
1471
|
-
};
|
|
1472
|
-
const debounced = function (...args) {
|
|
1473
|
-
if (signal?.aborted) {
|
|
1474
|
-
return;
|
|
1475
|
-
}
|
|
1476
|
-
pendingThis = this;
|
|
1477
|
-
pendingArgs = args;
|
|
1478
|
-
const isFirstCall = timeoutId == null;
|
|
1479
|
-
schedule();
|
|
1480
|
-
if (leading && isFirstCall) {
|
|
1481
|
-
invoke();
|
|
1482
|
-
}
|
|
1483
|
-
};
|
|
1484
|
-
debounced.schedule = schedule;
|
|
1485
|
-
debounced.cancel = cancel;
|
|
1486
|
-
debounced.flush = flush;
|
|
1487
|
-
signal?.addEventListener('abort', cancel, { once: true });
|
|
1488
|
-
return debounced;
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
exports.debounce = debounce;
|
|
1492
|
-
} (debounce));
|
|
1493
|
-
|
|
1494
|
-
var flow = {};
|
|
1495
|
-
|
|
1496
|
-
(function (exports) {
|
|
1497
|
-
|
|
1498
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1499
|
-
|
|
1500
|
-
function flow(...funcs) {
|
|
1501
|
-
return function (...args) {
|
|
1502
|
-
let result = funcs.length ? funcs[0].apply(this, args) : args[0];
|
|
1503
|
-
for (let i = 1; i < funcs.length; i++) {
|
|
1504
|
-
result = funcs[i].call(this, result);
|
|
1505
|
-
}
|
|
1506
|
-
return result;
|
|
1507
|
-
};
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
exports.flow = flow;
|
|
1511
|
-
} (flow));
|
|
1512
|
-
|
|
1513
|
-
var flowRight = {};
|
|
1514
|
-
|
|
1515
|
-
(function (exports) {
|
|
1516
|
-
|
|
1517
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1518
|
-
|
|
1519
|
-
const flow$1 = flow;
|
|
1520
|
-
|
|
1521
|
-
function flowRight(...funcs) {
|
|
1522
|
-
return flow$1.flow(...funcs.reverse());
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
exports.flowRight = flowRight;
|
|
1526
|
-
} (flowRight));
|
|
1527
|
-
|
|
1528
|
-
var identity = {};
|
|
1529
|
-
|
|
1530
|
-
(function (exports) {
|
|
1531
|
-
|
|
1532
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1533
|
-
|
|
1534
|
-
function identity(x) {
|
|
1535
|
-
return x;
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
exports.identity = identity;
|
|
1539
|
-
} (identity));
|
|
1540
|
-
|
|
1541
|
-
var memoize = {};
|
|
1542
|
-
|
|
1543
|
-
(function (exports) {
|
|
1544
|
-
|
|
1545
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1546
|
-
|
|
1547
|
-
function memoize(fn, options = {}) {
|
|
1548
|
-
const { cache = new Map(), getCacheKey } = options;
|
|
1549
|
-
const memoizedFn = function (arg) {
|
|
1550
|
-
const key = getCacheKey ? getCacheKey(arg) : arg;
|
|
1551
|
-
if (cache.has(key)) {
|
|
1552
|
-
return cache.get(key);
|
|
1553
|
-
}
|
|
1554
|
-
const result = fn.call(this, arg);
|
|
1555
|
-
cache.set(key, result);
|
|
1556
|
-
return result;
|
|
1557
|
-
};
|
|
1558
|
-
memoizedFn.cache = cache;
|
|
1559
|
-
return memoizedFn;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
exports.memoize = memoize;
|
|
1563
|
-
} (memoize));
|
|
1564
|
-
|
|
1565
|
-
var negate = {};
|
|
1566
|
-
|
|
1567
|
-
(function (exports) {
|
|
1568
|
-
|
|
1569
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1570
|
-
|
|
1571
|
-
function negate(func) {
|
|
1572
|
-
return ((...args) => !func(...args));
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
exports.negate = negate;
|
|
1576
|
-
} (negate));
|
|
1577
|
-
|
|
1578
|
-
var noop = {};
|
|
1579
|
-
|
|
1580
|
-
(function (exports) {
|
|
1581
|
-
|
|
1582
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1583
|
-
|
|
1584
|
-
function noop() { }
|
|
1585
|
-
|
|
1586
|
-
exports.noop = noop;
|
|
1587
|
-
} (noop));
|
|
1588
|
-
|
|
1589
|
-
var once = {};
|
|
1590
|
-
|
|
1591
|
-
(function (exports) {
|
|
1592
|
-
|
|
1593
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1594
|
-
|
|
1595
|
-
function once(func) {
|
|
1596
|
-
let called = false;
|
|
1597
|
-
let cache;
|
|
1598
|
-
return function (...args) {
|
|
1599
|
-
if (!called) {
|
|
1600
|
-
called = true;
|
|
1601
|
-
cache = func(...args);
|
|
1602
|
-
}
|
|
1603
|
-
return cache;
|
|
1604
|
-
};
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
exports.once = once;
|
|
1608
|
-
} (once));
|
|
1609
|
-
|
|
1610
|
-
var partial = {};
|
|
1611
|
-
|
|
1612
|
-
(function (exports) {
|
|
1613
|
-
|
|
1614
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1615
|
-
|
|
1616
|
-
function partial(func, ...partialArgs) {
|
|
1617
|
-
return partialImpl(func, placeholderSymbol, ...partialArgs);
|
|
1618
|
-
}
|
|
1619
|
-
function partialImpl(func, placeholder, ...partialArgs) {
|
|
1620
|
-
const partialed = function (...providedArgs) {
|
|
1621
|
-
let providedArgsIndex = 0;
|
|
1622
|
-
const substitutedArgs = partialArgs
|
|
1623
|
-
.slice()
|
|
1624
|
-
.map(arg => (arg === placeholder ? providedArgs[providedArgsIndex++] : arg));
|
|
1625
|
-
const remainingArgs = providedArgs.slice(providedArgsIndex);
|
|
1626
|
-
return func.apply(this, substitutedArgs.concat(remainingArgs));
|
|
1627
|
-
};
|
|
1628
|
-
if (func.prototype) {
|
|
1629
|
-
partialed.prototype = Object.create(func.prototype);
|
|
1630
|
-
}
|
|
1631
|
-
return partialed;
|
|
1632
|
-
}
|
|
1633
|
-
const placeholderSymbol = Symbol('partial.placeholder');
|
|
1634
|
-
partial.placeholder = placeholderSymbol;
|
|
1635
|
-
|
|
1636
|
-
exports.partial = partial;
|
|
1637
|
-
exports.partialImpl = partialImpl;
|
|
1638
|
-
} (partial));
|
|
1639
|
-
|
|
1640
|
-
var partialRight = {};
|
|
1641
|
-
|
|
1642
|
-
(function (exports) {
|
|
1643
|
-
|
|
1644
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1645
|
-
|
|
1646
|
-
function partialRight(func, ...partialArgs) {
|
|
1647
|
-
return partialRightImpl(func, placeholderSymbol, ...partialArgs);
|
|
1648
|
-
}
|
|
1649
|
-
function partialRightImpl(func, placeholder, ...partialArgs) {
|
|
1650
|
-
const partialedRight = function (...providedArgs) {
|
|
1651
|
-
const placeholderLength = partialArgs.filter(arg => arg === placeholder).length;
|
|
1652
|
-
const rangeLength = Math.max(providedArgs.length - placeholderLength, 0);
|
|
1653
|
-
const remainingArgs = providedArgs.slice(0, rangeLength);
|
|
1654
|
-
let providedArgsIndex = rangeLength;
|
|
1655
|
-
const substitutedArgs = partialArgs
|
|
1656
|
-
.slice()
|
|
1657
|
-
.map(arg => (arg === placeholder ? providedArgs[providedArgsIndex++] : arg));
|
|
1658
|
-
return func.apply(this, remainingArgs.concat(substitutedArgs));
|
|
1659
|
-
};
|
|
1660
|
-
if (func.prototype) {
|
|
1661
|
-
partialedRight.prototype = Object.create(func.prototype);
|
|
1662
|
-
}
|
|
1663
|
-
return partialedRight;
|
|
1664
|
-
}
|
|
1665
|
-
const placeholderSymbol = Symbol('partialRight.placeholder');
|
|
1666
|
-
partialRight.placeholder = placeholderSymbol;
|
|
1667
|
-
|
|
1668
|
-
exports.partialRight = partialRight;
|
|
1669
|
-
exports.partialRightImpl = partialRightImpl;
|
|
1670
|
-
} (partialRight));
|
|
1671
|
-
|
|
1672
|
-
var rest = {};
|
|
1673
|
-
|
|
1674
|
-
(function (exports) {
|
|
1675
|
-
|
|
1676
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1677
|
-
|
|
1678
|
-
function rest(func, startIndex = func.length - 1) {
|
|
1679
|
-
return function (...args) {
|
|
1680
|
-
const rest = args.slice(startIndex);
|
|
1681
|
-
const params = args.slice(0, startIndex);
|
|
1682
|
-
while (params.length < startIndex) {
|
|
1683
|
-
params.push(undefined);
|
|
1684
|
-
}
|
|
1685
|
-
return func.apply(this, [...params, rest]);
|
|
1686
|
-
};
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
exports.rest = rest;
|
|
1690
|
-
} (rest));
|
|
1691
|
-
|
|
1692
|
-
var retry = {};
|
|
1693
|
-
|
|
1694
|
-
var delay = {};
|
|
1695
|
-
|
|
1696
|
-
(function (exports) {
|
|
1697
|
-
|
|
1698
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1699
|
-
|
|
1700
|
-
const AbortError$1 = AbortError;
|
|
1701
|
-
|
|
1702
|
-
function delay(ms, { signal } = {}) {
|
|
1703
|
-
return new Promise((resolve, reject) => {
|
|
1704
|
-
const abortError = () => {
|
|
1705
|
-
reject(new AbortError$1.AbortError());
|
|
1706
|
-
};
|
|
1707
|
-
const abortHandler = () => {
|
|
1708
|
-
clearTimeout(timeoutId);
|
|
1709
|
-
abortError();
|
|
1710
|
-
};
|
|
1711
|
-
if (signal?.aborted) {
|
|
1712
|
-
return abortError();
|
|
1713
|
-
}
|
|
1714
|
-
const timeoutId = setTimeout(() => {
|
|
1715
|
-
signal?.removeEventListener('abort', abortHandler);
|
|
1716
|
-
resolve();
|
|
1717
|
-
}, ms);
|
|
1718
|
-
signal?.addEventListener('abort', abortHandler, { once: true });
|
|
1719
|
-
});
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
exports.delay = delay;
|
|
1723
|
-
} (delay));
|
|
1724
|
-
|
|
1725
|
-
(function (exports) {
|
|
1726
|
-
|
|
1727
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1728
|
-
|
|
1729
|
-
const delay$1 = delay;
|
|
1730
|
-
|
|
1731
|
-
const DEFAULT_DELAY = 0;
|
|
1732
|
-
const DEFAULT_RETRIES = Number.POSITIVE_INFINITY;
|
|
1733
|
-
async function retry(func, _options) {
|
|
1734
|
-
let delay$1$1;
|
|
1735
|
-
let retries;
|
|
1736
|
-
let signal;
|
|
1737
|
-
if (typeof _options === 'number') {
|
|
1738
|
-
delay$1$1 = DEFAULT_DELAY;
|
|
1739
|
-
retries = _options;
|
|
1740
|
-
signal = undefined;
|
|
1741
|
-
}
|
|
1742
|
-
else {
|
|
1743
|
-
delay$1$1 = _options?.delay ?? DEFAULT_DELAY;
|
|
1744
|
-
retries = _options?.retries ?? DEFAULT_RETRIES;
|
|
1745
|
-
signal = _options?.signal;
|
|
1746
|
-
}
|
|
1747
|
-
let error;
|
|
1748
|
-
for (let attempts = 0; attempts < retries; attempts++) {
|
|
1749
|
-
if (signal?.aborted) {
|
|
1750
|
-
throw error ?? new Error(`The retry operation was aborted due to an abort signal.`);
|
|
1751
|
-
}
|
|
1752
|
-
try {
|
|
1753
|
-
return await func();
|
|
1754
|
-
}
|
|
1755
|
-
catch (err) {
|
|
1756
|
-
error = err;
|
|
1757
|
-
const currentDelay = typeof delay$1$1 === 'function' ? delay$1$1(attempts) : delay$1$1;
|
|
1758
|
-
await delay$1.delay(currentDelay);
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
throw error;
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
exports.retry = retry;
|
|
1765
|
-
} (retry));
|
|
1766
|
-
|
|
1767
|
-
var spread = {};
|
|
1768
|
-
|
|
1769
|
-
(function (exports) {
|
|
1770
|
-
|
|
1771
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1772
|
-
|
|
1773
|
-
function spread(func) {
|
|
1774
|
-
return function (argsArr) {
|
|
1775
|
-
return func.apply(this, argsArr);
|
|
1776
|
-
};
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
exports.spread = spread;
|
|
1780
|
-
} (spread));
|
|
1781
|
-
|
|
1782
|
-
var throttle = {};
|
|
1783
|
-
|
|
1784
|
-
(function (exports) {
|
|
1785
|
-
|
|
1786
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1787
|
-
|
|
1788
|
-
const debounce$1 = debounce;
|
|
1789
|
-
|
|
1790
|
-
function throttle(func, throttleMs, { signal, edges = ['leading', 'trailing'] } = {}) {
|
|
1791
|
-
let pendingAt = null;
|
|
1792
|
-
const debounced = debounce$1.debounce(func, throttleMs, { signal, edges });
|
|
1793
|
-
const throttled = function (...args) {
|
|
1794
|
-
if (pendingAt == null) {
|
|
1795
|
-
pendingAt = Date.now();
|
|
1796
|
-
}
|
|
1797
|
-
else {
|
|
1798
|
-
if (Date.now() - pendingAt >= throttleMs) {
|
|
1799
|
-
pendingAt = Date.now();
|
|
1800
|
-
debounced.cancel();
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1803
|
-
debounced(...args);
|
|
1804
|
-
};
|
|
1805
|
-
throttled.cancel = debounced.cancel;
|
|
1806
|
-
throttled.flush = debounced.flush;
|
|
1807
|
-
return throttled;
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
exports.throttle = throttle;
|
|
1811
|
-
} (throttle));
|
|
1812
|
-
|
|
1813
|
-
var unary = {};
|
|
1814
|
-
|
|
1815
|
-
(function (exports) {
|
|
1816
|
-
|
|
1817
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1818
|
-
|
|
1819
|
-
const ary$1 = ary;
|
|
1820
|
-
|
|
1821
|
-
function unary(func) {
|
|
1822
|
-
return ary$1.ary(func, 1);
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
exports.unary = unary;
|
|
1826
|
-
} (unary));
|
|
1827
|
-
|
|
1828
|
-
var clamp = {};
|
|
1829
|
-
|
|
1830
|
-
(function (exports) {
|
|
1831
|
-
|
|
1832
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1833
|
-
|
|
1834
|
-
function clamp(value, bound1, bound2) {
|
|
1835
|
-
if (bound2 == null) {
|
|
1836
|
-
return Math.min(value, bound1);
|
|
1837
|
-
}
|
|
1838
|
-
return Math.min(Math.max(value, bound1), bound2);
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
exports.clamp = clamp;
|
|
1842
|
-
} (clamp));
|
|
1843
|
-
|
|
1844
|
-
var inRange = {};
|
|
1845
|
-
|
|
1846
|
-
(function (exports) {
|
|
1847
|
-
|
|
1848
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1849
|
-
|
|
1850
|
-
function inRange(value, minimum, maximum) {
|
|
1851
|
-
if (maximum == null) {
|
|
1852
|
-
maximum = minimum;
|
|
1853
|
-
minimum = 0;
|
|
1854
|
-
}
|
|
1855
|
-
if (minimum >= maximum) {
|
|
1856
|
-
throw new Error('The maximum value must be greater than the minimum value.');
|
|
1857
|
-
}
|
|
1858
|
-
return minimum <= value && value < maximum;
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
exports.inRange = inRange;
|
|
1862
|
-
} (inRange));
|
|
1863
|
-
|
|
1864
|
-
var mean = {};
|
|
1865
|
-
|
|
1866
|
-
var sum = {};
|
|
1867
|
-
|
|
1868
|
-
(function (exports) {
|
|
1869
|
-
|
|
1870
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1871
|
-
|
|
1872
|
-
function sum(nums) {
|
|
1873
|
-
let result = 0;
|
|
1874
|
-
for (let i = 0; i < nums.length; i++) {
|
|
1875
|
-
result += nums[i];
|
|
1876
|
-
}
|
|
1877
|
-
return result;
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
exports.sum = sum;
|
|
1881
|
-
} (sum));
|
|
1882
|
-
|
|
1883
|
-
(function (exports) {
|
|
1884
|
-
|
|
1885
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1886
|
-
|
|
1887
|
-
const sum$1 = sum;
|
|
1888
|
-
|
|
1889
|
-
function mean(nums) {
|
|
1890
|
-
return sum$1.sum(nums) / nums.length;
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
exports.mean = mean;
|
|
1894
|
-
} (mean));
|
|
1895
|
-
|
|
1896
|
-
var meanBy = {};
|
|
1897
|
-
|
|
1898
|
-
(function (exports) {
|
|
1899
|
-
|
|
1900
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1901
|
-
|
|
1902
|
-
const mean$1 = mean;
|
|
1903
|
-
|
|
1904
|
-
function meanBy(items, getValue) {
|
|
1905
|
-
const nums = items.map(x => getValue(x));
|
|
1906
|
-
return mean$1.mean(nums);
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
exports.meanBy = meanBy;
|
|
1910
|
-
} (meanBy));
|
|
1911
|
-
|
|
1912
|
-
var median = {};
|
|
1913
|
-
|
|
1914
|
-
(function (exports) {
|
|
1915
|
-
|
|
1916
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1917
|
-
|
|
1918
|
-
function median(nums) {
|
|
1919
|
-
if (nums.length === 0) {
|
|
1920
|
-
return NaN;
|
|
1921
|
-
}
|
|
1922
|
-
const sorted = nums.slice().sort((a, b) => a - b);
|
|
1923
|
-
const middleIndex = Math.floor(sorted.length / 2);
|
|
1924
|
-
if (sorted.length % 2 === 0) {
|
|
1925
|
-
return (sorted[middleIndex - 1] + sorted[middleIndex]) / 2;
|
|
1926
|
-
}
|
|
1927
|
-
else {
|
|
1928
|
-
return sorted[middleIndex];
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
exports.median = median;
|
|
1933
|
-
} (median));
|
|
1934
|
-
|
|
1935
|
-
var medianBy = {};
|
|
1936
|
-
|
|
1937
|
-
(function (exports) {
|
|
1938
|
-
|
|
1939
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1940
|
-
|
|
1941
|
-
const median$1 = median;
|
|
1942
|
-
|
|
1943
|
-
function medianBy(items, getValue) {
|
|
1944
|
-
const nums = items.map(x => getValue(x));
|
|
1945
|
-
return median$1.median(nums);
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
exports.medianBy = medianBy;
|
|
1949
|
-
} (medianBy));
|
|
1950
|
-
|
|
1951
|
-
var range = {};
|
|
1952
|
-
|
|
1953
|
-
(function (exports) {
|
|
1954
|
-
|
|
1955
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1956
|
-
|
|
1957
|
-
function range(start, end, step = 1) {
|
|
1958
|
-
if (end == null) {
|
|
1959
|
-
end = start;
|
|
1960
|
-
start = 0;
|
|
1961
|
-
}
|
|
1962
|
-
if (!Number.isInteger(step) || step === 0) {
|
|
1963
|
-
throw new Error(`The step value must be a non-zero integer.`);
|
|
1964
|
-
}
|
|
1965
|
-
const length = Math.max(Math.ceil((end - start) / step), 0);
|
|
1966
|
-
const result = new Array(length);
|
|
1967
|
-
for (let i = 0; i < length; i++) {
|
|
1968
|
-
result[i] = start + i * step;
|
|
1969
|
-
}
|
|
1970
|
-
return result;
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
exports.range = range;
|
|
1974
|
-
} (range));
|
|
1975
|
-
|
|
1976
|
-
var rangeRight = {};
|
|
1977
|
-
|
|
1978
|
-
(function (exports) {
|
|
1979
|
-
|
|
1980
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1981
|
-
|
|
1982
|
-
function rangeRight(start, end, step = 1) {
|
|
1983
|
-
if (end == null) {
|
|
1984
|
-
end = start;
|
|
1985
|
-
start = 0;
|
|
1986
|
-
}
|
|
1987
|
-
if (!Number.isInteger(step) || step === 0) {
|
|
1988
|
-
throw new Error(`The step value must be a non-zero integer.`);
|
|
1989
|
-
}
|
|
1990
|
-
const length = Math.max(Math.ceil((end - start) / step), 0);
|
|
1991
|
-
const result = new Array(length);
|
|
1992
|
-
for (let i = 0; i < length; i++) {
|
|
1993
|
-
result[i] = start + (length - i - 1) * step;
|
|
1994
|
-
}
|
|
1995
|
-
return result;
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
exports.rangeRight = rangeRight;
|
|
1999
|
-
} (rangeRight));
|
|
2000
|
-
|
|
2001
|
-
var round = {};
|
|
2002
|
-
|
|
2003
|
-
(function (exports) {
|
|
2004
|
-
|
|
2005
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2006
|
-
|
|
2007
|
-
function round(value, precision = 0) {
|
|
2008
|
-
if (!Number.isInteger(precision)) {
|
|
2009
|
-
throw new Error('Precision must be an integer.');
|
|
2010
|
-
}
|
|
2011
|
-
const multiplier = Math.pow(10, precision);
|
|
2012
|
-
return Math.round(value * multiplier) / multiplier;
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
exports.round = round;
|
|
2016
|
-
} (round));
|
|
2017
|
-
|
|
2018
|
-
var sumBy = {};
|
|
2019
|
-
|
|
2020
|
-
(function (exports) {
|
|
2021
|
-
|
|
2022
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2023
|
-
|
|
2024
|
-
function sumBy(items, getValue) {
|
|
2025
|
-
let result = 0;
|
|
2026
|
-
for (let i = 0; i < items.length; i++) {
|
|
2027
|
-
result += getValue(items[i]);
|
|
2028
|
-
}
|
|
2029
|
-
return result;
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2032
|
-
exports.sumBy = sumBy;
|
|
2033
|
-
} (sumBy));
|
|
2034
|
-
|
|
2035
|
-
var clone = {};
|
|
2036
|
-
|
|
2037
|
-
var isPrimitive = {};
|
|
2038
|
-
|
|
2039
|
-
(function (exports) {
|
|
2040
|
-
|
|
2041
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2042
|
-
|
|
2043
|
-
function isPrimitive(value) {
|
|
2044
|
-
return value == null || (typeof value !== 'object' && typeof value !== 'function');
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
exports.isPrimitive = isPrimitive;
|
|
2048
|
-
} (isPrimitive));
|
|
2049
|
-
|
|
2050
|
-
var isTypedArray = {};
|
|
2051
|
-
|
|
2052
|
-
(function (exports) {
|
|
2053
|
-
|
|
2054
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2055
|
-
|
|
2056
|
-
function isTypedArray(x) {
|
|
2057
|
-
return ArrayBuffer.isView(x) && !(x instanceof DataView);
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
exports.isTypedArray = isTypedArray;
|
|
2061
|
-
} (isTypedArray));
|
|
2062
|
-
|
|
2063
|
-
(function (exports) {
|
|
2064
|
-
|
|
2065
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2066
|
-
|
|
2067
|
-
const isPrimitive$1 = isPrimitive;
|
|
2068
|
-
const isTypedArray$1 = isTypedArray;
|
|
2069
|
-
|
|
2070
|
-
function clone(obj) {
|
|
2071
|
-
if (isPrimitive$1.isPrimitive(obj)) {
|
|
2072
|
-
return obj;
|
|
2073
|
-
}
|
|
2074
|
-
if (Array.isArray(obj) ||
|
|
2075
|
-
isTypedArray$1.isTypedArray(obj) ||
|
|
2076
|
-
obj instanceof ArrayBuffer ||
|
|
2077
|
-
(typeof SharedArrayBuffer !== 'undefined' && obj instanceof SharedArrayBuffer)) {
|
|
2078
|
-
return obj.slice(0);
|
|
2079
|
-
}
|
|
2080
|
-
const prototype = Object.getPrototypeOf(obj);
|
|
2081
|
-
const Constructor = prototype.constructor;
|
|
2082
|
-
if (obj instanceof Date || obj instanceof Map || obj instanceof Set) {
|
|
2083
|
-
return new Constructor(obj);
|
|
2084
|
-
}
|
|
2085
|
-
if (obj instanceof RegExp) {
|
|
2086
|
-
const newRegExp = new Constructor(obj);
|
|
2087
|
-
newRegExp.lastIndex = obj.lastIndex;
|
|
2088
|
-
return newRegExp;
|
|
2089
|
-
}
|
|
2090
|
-
if (obj instanceof DataView) {
|
|
2091
|
-
return new Constructor(obj.buffer.slice(0));
|
|
2092
|
-
}
|
|
2093
|
-
if (obj instanceof Error) {
|
|
2094
|
-
const newError = new Constructor(obj.message);
|
|
2095
|
-
newError.stack = obj.stack;
|
|
2096
|
-
newError.name = obj.name;
|
|
2097
|
-
newError.cause = obj.cause;
|
|
2098
|
-
return newError;
|
|
2099
|
-
}
|
|
2100
|
-
if (typeof File !== 'undefined' && obj instanceof File) {
|
|
2101
|
-
const newFile = new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });
|
|
2102
|
-
return newFile;
|
|
2103
|
-
}
|
|
2104
|
-
if (typeof obj === 'object') {
|
|
2105
|
-
const newObject = Object.create(prototype);
|
|
2106
|
-
return Object.assign(newObject, obj);
|
|
2107
|
-
}
|
|
2108
|
-
return obj;
|
|
2109
|
-
}
|
|
2110
|
-
|
|
2111
|
-
exports.clone = clone;
|
|
2112
|
-
} (clone));
|
|
2113
|
-
|
|
2114
|
-
var cloneDeep = {};
|
|
2115
|
-
|
|
2116
|
-
var cloneDeepWith = {};
|
|
2117
|
-
|
|
2118
|
-
var getSymbols = {};
|
|
2119
|
-
|
|
2120
|
-
(function (exports) {
|
|
2121
|
-
|
|
2122
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2123
|
-
|
|
2124
|
-
function getSymbols(object) {
|
|
2125
|
-
return Object.getOwnPropertySymbols(object).filter(symbol => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
exports.getSymbols = getSymbols;
|
|
2129
|
-
} (getSymbols));
|
|
2130
|
-
|
|
2131
|
-
var getTag = {};
|
|
2132
|
-
|
|
2133
|
-
(function (exports) {
|
|
2134
|
-
|
|
2135
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2136
|
-
|
|
2137
|
-
function getTag(value) {
|
|
2138
|
-
if (value == null) {
|
|
2139
|
-
return value === undefined ? '[object Undefined]' : '[object Null]';
|
|
2140
|
-
}
|
|
2141
|
-
return Object.prototype.toString.call(value);
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
exports.getTag = getTag;
|
|
2145
|
-
} (getTag));
|
|
2146
|
-
|
|
2147
|
-
var tags = {};
|
|
2148
|
-
|
|
2149
|
-
(function (exports) {
|
|
2150
|
-
|
|
2151
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2152
|
-
|
|
2153
|
-
const regexpTag = '[object RegExp]';
|
|
2154
|
-
const stringTag = '[object String]';
|
|
2155
|
-
const numberTag = '[object Number]';
|
|
2156
|
-
const booleanTag = '[object Boolean]';
|
|
2157
|
-
const argumentsTag = '[object Arguments]';
|
|
2158
|
-
const symbolTag = '[object Symbol]';
|
|
2159
|
-
const dateTag = '[object Date]';
|
|
2160
|
-
const mapTag = '[object Map]';
|
|
2161
|
-
const setTag = '[object Set]';
|
|
2162
|
-
const arrayTag = '[object Array]';
|
|
2163
|
-
const functionTag = '[object Function]';
|
|
2164
|
-
const arrayBufferTag = '[object ArrayBuffer]';
|
|
2165
|
-
const objectTag = '[object Object]';
|
|
2166
|
-
const errorTag = '[object Error]';
|
|
2167
|
-
const dataViewTag = '[object DataView]';
|
|
2168
|
-
const uint8ArrayTag = '[object Uint8Array]';
|
|
2169
|
-
const uint8ClampedArrayTag = '[object Uint8ClampedArray]';
|
|
2170
|
-
const uint16ArrayTag = '[object Uint16Array]';
|
|
2171
|
-
const uint32ArrayTag = '[object Uint32Array]';
|
|
2172
|
-
const bigUint64ArrayTag = '[object BigUint64Array]';
|
|
2173
|
-
const int8ArrayTag = '[object Int8Array]';
|
|
2174
|
-
const int16ArrayTag = '[object Int16Array]';
|
|
2175
|
-
const int32ArrayTag = '[object Int32Array]';
|
|
2176
|
-
const bigInt64ArrayTag = '[object BigInt64Array]';
|
|
2177
|
-
const float32ArrayTag = '[object Float32Array]';
|
|
2178
|
-
const float64ArrayTag = '[object Float64Array]';
|
|
2179
|
-
|
|
2180
|
-
exports.argumentsTag = argumentsTag;
|
|
2181
|
-
exports.arrayBufferTag = arrayBufferTag;
|
|
2182
|
-
exports.arrayTag = arrayTag;
|
|
2183
|
-
exports.bigInt64ArrayTag = bigInt64ArrayTag;
|
|
2184
|
-
exports.bigUint64ArrayTag = bigUint64ArrayTag;
|
|
2185
|
-
exports.booleanTag = booleanTag;
|
|
2186
|
-
exports.dataViewTag = dataViewTag;
|
|
2187
|
-
exports.dateTag = dateTag;
|
|
2188
|
-
exports.errorTag = errorTag;
|
|
2189
|
-
exports.float32ArrayTag = float32ArrayTag;
|
|
2190
|
-
exports.float64ArrayTag = float64ArrayTag;
|
|
2191
|
-
exports.functionTag = functionTag;
|
|
2192
|
-
exports.int16ArrayTag = int16ArrayTag;
|
|
2193
|
-
exports.int32ArrayTag = int32ArrayTag;
|
|
2194
|
-
exports.int8ArrayTag = int8ArrayTag;
|
|
2195
|
-
exports.mapTag = mapTag;
|
|
2196
|
-
exports.numberTag = numberTag;
|
|
2197
|
-
exports.objectTag = objectTag;
|
|
2198
|
-
exports.regexpTag = regexpTag;
|
|
2199
|
-
exports.setTag = setTag;
|
|
2200
|
-
exports.stringTag = stringTag;
|
|
2201
|
-
exports.symbolTag = symbolTag;
|
|
2202
|
-
exports.uint16ArrayTag = uint16ArrayTag;
|
|
2203
|
-
exports.uint32ArrayTag = uint32ArrayTag;
|
|
2204
|
-
exports.uint8ArrayTag = uint8ArrayTag;
|
|
2205
|
-
exports.uint8ClampedArrayTag = uint8ClampedArrayTag;
|
|
2206
|
-
} (tags));
|
|
2207
|
-
|
|
2208
|
-
(function (exports) {
|
|
2209
|
-
|
|
2210
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2211
|
-
|
|
2212
|
-
const getSymbols$1 = getSymbols;
|
|
2213
|
-
const getTag$1 = getTag;
|
|
2214
|
-
const tags$1 = tags;
|
|
2215
|
-
const isPrimitive$1 = isPrimitive;
|
|
2216
|
-
const isTypedArray$1 = isTypedArray;
|
|
2217
|
-
|
|
2218
|
-
function cloneDeepWith(obj, cloneValue) {
|
|
2219
|
-
return cloneDeepWithImpl(obj, undefined, obj, new Map(), cloneValue);
|
|
2220
|
-
}
|
|
2221
|
-
function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = new Map(), cloneValue = undefined) {
|
|
2222
|
-
const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
|
|
2223
|
-
if (cloned != null) {
|
|
2224
|
-
return cloned;
|
|
2225
|
-
}
|
|
2226
|
-
if (isPrimitive$1.isPrimitive(valueToClone)) {
|
|
2227
|
-
return valueToClone;
|
|
2228
|
-
}
|
|
2229
|
-
if (stack.has(valueToClone)) {
|
|
2230
|
-
return stack.get(valueToClone);
|
|
2231
|
-
}
|
|
2232
|
-
if (Array.isArray(valueToClone)) {
|
|
2233
|
-
const result = new Array(valueToClone.length);
|
|
2234
|
-
stack.set(valueToClone, result);
|
|
2235
|
-
for (let i = 0; i < valueToClone.length; i++) {
|
|
2236
|
-
result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
2237
|
-
}
|
|
2238
|
-
if (Object.hasOwn(valueToClone, 'index')) {
|
|
2239
|
-
result.index = valueToClone.index;
|
|
2240
|
-
}
|
|
2241
|
-
if (Object.hasOwn(valueToClone, 'input')) {
|
|
2242
|
-
result.input = valueToClone.input;
|
|
2243
|
-
}
|
|
2244
|
-
return result;
|
|
2245
|
-
}
|
|
2246
|
-
if (valueToClone instanceof Date) {
|
|
2247
|
-
return new Date(valueToClone.getTime());
|
|
2248
|
-
}
|
|
2249
|
-
if (valueToClone instanceof RegExp) {
|
|
2250
|
-
const result = new RegExp(valueToClone.source, valueToClone.flags);
|
|
2251
|
-
result.lastIndex = valueToClone.lastIndex;
|
|
2252
|
-
return result;
|
|
2253
|
-
}
|
|
2254
|
-
if (valueToClone instanceof Map) {
|
|
2255
|
-
const result = new Map();
|
|
2256
|
-
stack.set(valueToClone, result);
|
|
2257
|
-
for (const [key, value] of valueToClone) {
|
|
2258
|
-
result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
|
|
2259
|
-
}
|
|
2260
|
-
return result;
|
|
2261
|
-
}
|
|
2262
|
-
if (valueToClone instanceof Set) {
|
|
2263
|
-
const result = new Set();
|
|
2264
|
-
stack.set(valueToClone, result);
|
|
2265
|
-
for (const value of valueToClone) {
|
|
2266
|
-
result.add(cloneDeepWithImpl(value, undefined, objectToClone, stack, cloneValue));
|
|
2267
|
-
}
|
|
2268
|
-
return result;
|
|
2269
|
-
}
|
|
2270
|
-
if (typeof Buffer !== 'undefined' && Buffer.isBuffer(valueToClone)) {
|
|
2271
|
-
return valueToClone.subarray();
|
|
2272
|
-
}
|
|
2273
|
-
if (isTypedArray$1.isTypedArray(valueToClone)) {
|
|
2274
|
-
const result = new (Object.getPrototypeOf(valueToClone).constructor)(valueToClone.length);
|
|
2275
|
-
stack.set(valueToClone, result);
|
|
2276
|
-
for (let i = 0; i < valueToClone.length; i++) {
|
|
2277
|
-
result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
2278
|
-
}
|
|
2279
|
-
return result;
|
|
2280
|
-
}
|
|
2281
|
-
if (valueToClone instanceof ArrayBuffer ||
|
|
2282
|
-
(typeof SharedArrayBuffer !== 'undefined' && valueToClone instanceof SharedArrayBuffer)) {
|
|
2283
|
-
return valueToClone.slice(0);
|
|
2284
|
-
}
|
|
2285
|
-
if (valueToClone instanceof DataView) {
|
|
2286
|
-
const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
|
|
2287
|
-
stack.set(valueToClone, result);
|
|
2288
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
2289
|
-
return result;
|
|
2290
|
-
}
|
|
2291
|
-
if (typeof File !== 'undefined' && valueToClone instanceof File) {
|
|
2292
|
-
const result = new File([valueToClone], valueToClone.name, {
|
|
2293
|
-
type: valueToClone.type,
|
|
2294
|
-
});
|
|
2295
|
-
stack.set(valueToClone, result);
|
|
2296
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
2297
|
-
return result;
|
|
2298
|
-
}
|
|
2299
|
-
if (valueToClone instanceof Blob) {
|
|
2300
|
-
const result = new Blob([valueToClone], { type: valueToClone.type });
|
|
2301
|
-
stack.set(valueToClone, result);
|
|
2302
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
2303
|
-
return result;
|
|
2304
|
-
}
|
|
2305
|
-
if (valueToClone instanceof Error) {
|
|
2306
|
-
const result = new valueToClone.constructor();
|
|
2307
|
-
stack.set(valueToClone, result);
|
|
2308
|
-
result.message = valueToClone.message;
|
|
2309
|
-
result.name = valueToClone.name;
|
|
2310
|
-
result.stack = valueToClone.stack;
|
|
2311
|
-
result.cause = valueToClone.cause;
|
|
2312
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
2313
|
-
return result;
|
|
2314
|
-
}
|
|
2315
|
-
if (typeof valueToClone === 'object' && isCloneableObject(valueToClone)) {
|
|
2316
|
-
const result = Object.create(Object.getPrototypeOf(valueToClone));
|
|
2317
|
-
stack.set(valueToClone, result);
|
|
2318
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
2319
|
-
return result;
|
|
2320
|
-
}
|
|
2321
|
-
return valueToClone;
|
|
2322
|
-
}
|
|
2323
|
-
function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
|
|
2324
|
-
const keys = [...Object.keys(source), ...getSymbols$1.getSymbols(source)];
|
|
2325
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2326
|
-
const key = keys[i];
|
|
2327
|
-
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
2328
|
-
if (descriptor == null || descriptor.writable) {
|
|
2329
|
-
target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
}
|
|
2333
|
-
function isCloneableObject(object) {
|
|
2334
|
-
switch (getTag$1.getTag(object)) {
|
|
2335
|
-
case tags$1.argumentsTag:
|
|
2336
|
-
case tags$1.arrayTag:
|
|
2337
|
-
case tags$1.arrayBufferTag:
|
|
2338
|
-
case tags$1.dataViewTag:
|
|
2339
|
-
case tags$1.booleanTag:
|
|
2340
|
-
case tags$1.dateTag:
|
|
2341
|
-
case tags$1.float32ArrayTag:
|
|
2342
|
-
case tags$1.float64ArrayTag:
|
|
2343
|
-
case tags$1.int8ArrayTag:
|
|
2344
|
-
case tags$1.int16ArrayTag:
|
|
2345
|
-
case tags$1.int32ArrayTag:
|
|
2346
|
-
case tags$1.mapTag:
|
|
2347
|
-
case tags$1.numberTag:
|
|
2348
|
-
case tags$1.objectTag:
|
|
2349
|
-
case tags$1.regexpTag:
|
|
2350
|
-
case tags$1.setTag:
|
|
2351
|
-
case tags$1.stringTag:
|
|
2352
|
-
case tags$1.symbolTag:
|
|
2353
|
-
case tags$1.uint8ArrayTag:
|
|
2354
|
-
case tags$1.uint8ClampedArrayTag:
|
|
2355
|
-
case tags$1.uint16ArrayTag:
|
|
2356
|
-
case tags$1.uint32ArrayTag: {
|
|
2357
|
-
return true;
|
|
2358
|
-
}
|
|
2359
|
-
default: {
|
|
2360
|
-
return false;
|
|
2361
|
-
}
|
|
2362
|
-
}
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
exports.cloneDeepWith = cloneDeepWith;
|
|
2366
|
-
exports.cloneDeepWithImpl = cloneDeepWithImpl;
|
|
2367
|
-
exports.copyProperties = copyProperties;
|
|
2368
|
-
} (cloneDeepWith));
|
|
2369
|
-
|
|
2370
|
-
(function (exports) {
|
|
2371
|
-
|
|
2372
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2373
|
-
|
|
2374
|
-
const cloneDeepWith$1 = cloneDeepWith;
|
|
2375
|
-
|
|
2376
|
-
function cloneDeep(obj) {
|
|
2377
|
-
return cloneDeepWith$1.cloneDeepWithImpl(obj, undefined, obj, new Map(), undefined);
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
exports.cloneDeep = cloneDeep;
|
|
2381
|
-
} (cloneDeep));
|
|
2382
|
-
|
|
2383
|
-
var findKey = {};
|
|
2384
|
-
|
|
2385
|
-
(function (exports) {
|
|
2386
|
-
|
|
2387
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2388
|
-
|
|
2389
|
-
function findKey(obj, predicate) {
|
|
2390
|
-
const keys = Object.keys(obj);
|
|
2391
|
-
return keys.find(key => predicate(obj[key], key, obj));
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
exports.findKey = findKey;
|
|
2395
|
-
} (findKey));
|
|
2396
|
-
|
|
2397
|
-
var flattenObject = {};
|
|
2398
|
-
|
|
2399
|
-
var isPlainObject$1 = {};
|
|
2400
|
-
|
|
2401
|
-
(function (exports) {
|
|
2402
|
-
|
|
2403
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2404
|
-
|
|
2405
|
-
function isPlainObject(value) {
|
|
2406
|
-
if (!value || typeof value !== 'object') {
|
|
2407
|
-
return false;
|
|
2408
|
-
}
|
|
2409
|
-
const proto = Object.getPrototypeOf(value);
|
|
2410
|
-
const hasObjectPrototype = proto === null ||
|
|
2411
|
-
proto === Object.prototype ||
|
|
2412
|
-
Object.getPrototypeOf(proto) === null;
|
|
2413
|
-
if (!hasObjectPrototype) {
|
|
2414
|
-
return false;
|
|
2415
|
-
}
|
|
2416
|
-
return Object.prototype.toString.call(value) === '[object Object]';
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
exports.isPlainObject = isPlainObject;
|
|
2420
|
-
} (isPlainObject$1));
|
|
2421
|
-
|
|
2422
|
-
(function (exports) {
|
|
2423
|
-
|
|
2424
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2425
|
-
|
|
2426
|
-
const isPlainObject = isPlainObject$1;
|
|
2427
|
-
|
|
2428
|
-
function flattenObject(object, { delimiter = '.' } = {}) {
|
|
2429
|
-
return flattenObjectImpl(object, '', delimiter);
|
|
2430
|
-
}
|
|
2431
|
-
function flattenObjectImpl(object, prefix = '', delimiter = '.') {
|
|
2432
|
-
const result = {};
|
|
2433
|
-
const keys = Object.keys(object);
|
|
2434
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2435
|
-
const key = keys[i];
|
|
2436
|
-
const value = object[key];
|
|
2437
|
-
const prefixedKey = prefix ? `${prefix}${delimiter}${key}` : key;
|
|
2438
|
-
if (isPlainObject.isPlainObject(value) && Object.keys(value).length > 0) {
|
|
2439
|
-
Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
|
|
2440
|
-
continue;
|
|
2441
|
-
}
|
|
2442
|
-
if (Array.isArray(value)) {
|
|
2443
|
-
Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
|
|
2444
|
-
continue;
|
|
2445
|
-
}
|
|
2446
|
-
result[prefixedKey] = value;
|
|
2447
|
-
}
|
|
2448
|
-
return result;
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
|
-
exports.flattenObject = flattenObject;
|
|
2452
|
-
} (flattenObject));
|
|
2453
|
-
|
|
2454
|
-
var invert = {};
|
|
2455
|
-
|
|
2456
|
-
(function (exports) {
|
|
2457
|
-
|
|
2458
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2459
|
-
|
|
2460
|
-
function invert(obj) {
|
|
2461
|
-
const result = {};
|
|
2462
|
-
const keys = Object.keys(obj);
|
|
2463
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2464
|
-
const key = keys[i];
|
|
2465
|
-
const value = obj[key];
|
|
2466
|
-
result[value] = key;
|
|
2467
|
-
}
|
|
2468
|
-
return result;
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
|
-
exports.invert = invert;
|
|
2472
|
-
} (invert));
|
|
2473
|
-
|
|
2474
|
-
var mapKeys = {};
|
|
2475
|
-
|
|
2476
|
-
(function (exports) {
|
|
2477
|
-
|
|
2478
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2479
|
-
|
|
2480
|
-
function mapKeys(object, getNewKey) {
|
|
2481
|
-
const result = {};
|
|
2482
|
-
const keys = Object.keys(object);
|
|
2483
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2484
|
-
const key = keys[i];
|
|
2485
|
-
const value = object[key];
|
|
2486
|
-
result[getNewKey(value, key, object)] = value;
|
|
2487
|
-
}
|
|
2488
|
-
return result;
|
|
2489
|
-
}
|
|
2490
|
-
|
|
2491
|
-
exports.mapKeys = mapKeys;
|
|
2492
|
-
} (mapKeys));
|
|
2493
|
-
|
|
2494
|
-
var mapValues = {};
|
|
2495
|
-
|
|
2496
|
-
(function (exports) {
|
|
2497
|
-
|
|
2498
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2499
|
-
|
|
2500
|
-
function mapValues(object, getNewValue) {
|
|
2501
|
-
const result = {};
|
|
2502
|
-
const keys = Object.keys(object);
|
|
2503
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2504
|
-
const key = keys[i];
|
|
2505
|
-
const value = object[key];
|
|
2506
|
-
result[key] = getNewValue(value, key, object);
|
|
2507
|
-
}
|
|
2508
|
-
return result;
|
|
2509
|
-
}
|
|
2510
|
-
|
|
2511
|
-
exports.mapValues = mapValues;
|
|
2512
|
-
} (mapValues));
|
|
2513
|
-
|
|
2514
|
-
var merge = {};
|
|
2515
|
-
|
|
2516
|
-
var isUnsafeProperty = {};
|
|
2517
|
-
|
|
2518
|
-
(function (exports) {
|
|
2519
|
-
|
|
2520
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2521
|
-
|
|
2522
|
-
function isUnsafeProperty(key) {
|
|
2523
|
-
return key === '__proto__';
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
exports.isUnsafeProperty = isUnsafeProperty;
|
|
2527
|
-
} (isUnsafeProperty));
|
|
2528
|
-
|
|
2529
|
-
(function (exports) {
|
|
2530
|
-
|
|
2531
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2532
|
-
|
|
2533
|
-
const isUnsafeProperty$1 = isUnsafeProperty;
|
|
2534
|
-
const isPlainObject = isPlainObject$1;
|
|
2535
|
-
|
|
2536
|
-
function merge(target, source) {
|
|
2537
|
-
const sourceKeys = Object.keys(source);
|
|
2538
|
-
for (let i = 0; i < sourceKeys.length; i++) {
|
|
2539
|
-
const key = sourceKeys[i];
|
|
2540
|
-
if (isUnsafeProperty$1.isUnsafeProperty(key)) {
|
|
2541
|
-
continue;
|
|
2542
|
-
}
|
|
2543
|
-
const sourceValue = source[key];
|
|
2544
|
-
const targetValue = target[key];
|
|
2545
|
-
if (Array.isArray(sourceValue)) {
|
|
2546
|
-
if (Array.isArray(targetValue)) {
|
|
2547
|
-
target[key] = merge(targetValue, sourceValue);
|
|
2548
|
-
}
|
|
2549
|
-
else {
|
|
2550
|
-
target[key] = merge([], sourceValue);
|
|
2551
|
-
}
|
|
2552
|
-
}
|
|
2553
|
-
else if (isPlainObject.isPlainObject(sourceValue)) {
|
|
2554
|
-
if (isPlainObject.isPlainObject(targetValue)) {
|
|
2555
|
-
target[key] = merge(targetValue, sourceValue);
|
|
2556
|
-
}
|
|
2557
|
-
else {
|
|
2558
|
-
target[key] = merge({}, sourceValue);
|
|
2559
|
-
}
|
|
2560
|
-
}
|
|
2561
|
-
else if (targetValue === undefined || sourceValue !== undefined) {
|
|
2562
|
-
target[key] = sourceValue;
|
|
2563
|
-
}
|
|
2564
|
-
}
|
|
2565
|
-
return target;
|
|
2566
|
-
}
|
|
2567
|
-
|
|
2568
|
-
exports.merge = merge;
|
|
2569
|
-
} (merge));
|
|
2570
|
-
|
|
2571
|
-
var mergeWith = {};
|
|
2572
|
-
|
|
2573
|
-
var isObjectLike = {};
|
|
2574
|
-
|
|
2575
|
-
(function (exports) {
|
|
2576
|
-
|
|
2577
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2578
|
-
|
|
2579
|
-
function isObjectLike(value) {
|
|
2580
|
-
return typeof value === 'object' && value !== null;
|
|
2581
|
-
}
|
|
2582
|
-
|
|
2583
|
-
exports.isObjectLike = isObjectLike;
|
|
2584
|
-
} (isObjectLike));
|
|
2585
|
-
|
|
2586
|
-
(function (exports) {
|
|
2587
|
-
|
|
2588
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2589
|
-
|
|
2590
|
-
const isUnsafeProperty$1 = isUnsafeProperty;
|
|
2591
|
-
const isObjectLike$1 = isObjectLike;
|
|
2592
|
-
|
|
2593
|
-
function mergeWith(target, source, merge) {
|
|
2594
|
-
const sourceKeys = Object.keys(source);
|
|
2595
|
-
for (let i = 0; i < sourceKeys.length; i++) {
|
|
2596
|
-
const key = sourceKeys[i];
|
|
2597
|
-
if (isUnsafeProperty$1.isUnsafeProperty(key)) {
|
|
2598
|
-
continue;
|
|
2599
|
-
}
|
|
2600
|
-
const sourceValue = source[key];
|
|
2601
|
-
const targetValue = target[key];
|
|
2602
|
-
const merged = merge(targetValue, sourceValue, key, target, source);
|
|
2603
|
-
if (merged != null) {
|
|
2604
|
-
target[key] = merged;
|
|
2605
|
-
}
|
|
2606
|
-
else if (Array.isArray(sourceValue)) {
|
|
2607
|
-
target[key] = mergeWith(targetValue ?? [], sourceValue, merge);
|
|
2608
|
-
}
|
|
2609
|
-
else if (isObjectLike$1.isObjectLike(targetValue) && isObjectLike$1.isObjectLike(sourceValue)) {
|
|
2610
|
-
target[key] = mergeWith(targetValue ?? {}, sourceValue, merge);
|
|
2611
|
-
}
|
|
2612
|
-
else if (targetValue === undefined || sourceValue !== undefined) {
|
|
2613
|
-
target[key] = sourceValue;
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
return target;
|
|
2617
|
-
}
|
|
2618
|
-
|
|
2619
|
-
exports.mergeWith = mergeWith;
|
|
2620
|
-
} (mergeWith));
|
|
2621
|
-
|
|
2622
|
-
var omit = {};
|
|
2623
|
-
|
|
2624
|
-
(function (exports) {
|
|
2625
|
-
|
|
2626
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2627
|
-
|
|
2628
|
-
function omit(obj, keys) {
|
|
2629
|
-
const result = { ...obj };
|
|
2630
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2631
|
-
const key = keys[i];
|
|
2632
|
-
delete result[key];
|
|
2633
|
-
}
|
|
2634
|
-
return result;
|
|
2635
|
-
}
|
|
2636
|
-
|
|
2637
|
-
exports.omit = omit;
|
|
2638
|
-
} (omit));
|
|
2639
|
-
|
|
2640
|
-
var omitBy = {};
|
|
2641
|
-
|
|
2642
|
-
(function (exports) {
|
|
2643
|
-
|
|
2644
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2645
|
-
|
|
2646
|
-
function omitBy(obj, shouldOmit) {
|
|
2647
|
-
const result = {};
|
|
2648
|
-
const keys = Object.keys(obj);
|
|
2649
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2650
|
-
const key = keys[i];
|
|
2651
|
-
const value = obj[key];
|
|
2652
|
-
if (!shouldOmit(value, key)) {
|
|
2653
|
-
result[key] = value;
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
return result;
|
|
2657
|
-
}
|
|
2658
|
-
|
|
2659
|
-
exports.omitBy = omitBy;
|
|
2660
|
-
} (omitBy));
|
|
2661
|
-
|
|
2662
|
-
var pick = {};
|
|
2663
|
-
|
|
2664
|
-
(function (exports) {
|
|
2665
|
-
|
|
2666
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2667
|
-
|
|
2668
|
-
function pick(obj, keys) {
|
|
2669
|
-
const result = {};
|
|
2670
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2671
|
-
const key = keys[i];
|
|
2672
|
-
if (Object.hasOwn(obj, key)) {
|
|
2673
|
-
result[key] = obj[key];
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
return result;
|
|
2677
|
-
}
|
|
2678
|
-
|
|
2679
|
-
exports.pick = pick;
|
|
2680
|
-
} (pick));
|
|
2681
|
-
|
|
2682
|
-
var pickBy = {};
|
|
2683
|
-
|
|
2684
|
-
(function (exports) {
|
|
2685
|
-
|
|
2686
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2687
|
-
|
|
2688
|
-
function pickBy(obj, shouldPick) {
|
|
2689
|
-
const result = {};
|
|
2690
|
-
const keys = Object.keys(obj);
|
|
2691
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2692
|
-
const key = keys[i];
|
|
2693
|
-
const value = obj[key];
|
|
2694
|
-
if (shouldPick(value, key)) {
|
|
2695
|
-
result[key] = value;
|
|
2696
|
-
}
|
|
2697
|
-
}
|
|
2698
|
-
return result;
|
|
2699
|
-
}
|
|
2700
|
-
|
|
2701
|
-
exports.pickBy = pickBy;
|
|
2702
|
-
} (pickBy));
|
|
2703
|
-
|
|
2704
|
-
var toCamelCaseKeys = {};
|
|
2705
|
-
|
|
2706
|
-
var isArray = {};
|
|
2707
|
-
|
|
2708
|
-
(function (exports) {
|
|
2709
|
-
|
|
2710
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2711
|
-
|
|
2712
|
-
function isArray(value) {
|
|
2713
|
-
return Array.isArray(value);
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
exports.isArray = isArray;
|
|
2717
|
-
} (isArray));
|
|
2718
|
-
|
|
2719
|
-
var camelCase = {};
|
|
2720
|
-
|
|
2721
|
-
var capitalize = {};
|
|
2722
|
-
|
|
2723
|
-
(function (exports) {
|
|
2724
|
-
|
|
2725
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2726
|
-
|
|
2727
|
-
function capitalize(str) {
|
|
2728
|
-
return (str.charAt(0).toUpperCase() + str.slice(1).toLowerCase());
|
|
2729
|
-
}
|
|
2730
|
-
|
|
2731
|
-
exports.capitalize = capitalize;
|
|
2732
|
-
} (capitalize));
|
|
2733
|
-
|
|
2734
|
-
var words = {};
|
|
2735
|
-
|
|
2736
|
-
(function (exports) {
|
|
2737
|
-
|
|
2738
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2739
|
-
|
|
2740
|
-
const CASE_SPLIT_PATTERN = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
|
|
2741
|
-
function words(str) {
|
|
2742
|
-
return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
|
|
2743
|
-
}
|
|
2744
|
-
|
|
2745
|
-
exports.CASE_SPLIT_PATTERN = CASE_SPLIT_PATTERN;
|
|
2746
|
-
exports.words = words;
|
|
2747
|
-
} (words));
|
|
2748
|
-
|
|
2749
|
-
(function (exports) {
|
|
2750
|
-
|
|
2751
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2752
|
-
|
|
2753
|
-
const capitalize$1 = capitalize;
|
|
2754
|
-
const words$1 = words;
|
|
2755
|
-
|
|
2756
|
-
function camelCase(str) {
|
|
2757
|
-
const words$1$1 = words$1.words(str);
|
|
2758
|
-
if (words$1$1.length === 0) {
|
|
2759
|
-
return '';
|
|
2760
|
-
}
|
|
2761
|
-
const [first, ...rest] = words$1$1;
|
|
2762
|
-
return `${first.toLowerCase()}${rest.map(word => capitalize$1.capitalize(word)).join('')}`;
|
|
2763
|
-
}
|
|
2764
|
-
|
|
2765
|
-
exports.camelCase = camelCase;
|
|
2766
|
-
} (camelCase));
|
|
2767
|
-
|
|
2768
|
-
(function (exports) {
|
|
2769
|
-
|
|
2770
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2771
|
-
|
|
2772
|
-
const isArray$1 = isArray;
|
|
2773
|
-
const isPlainObject = isPlainObject$1;
|
|
2774
|
-
const camelCase$1 = camelCase;
|
|
2775
|
-
|
|
2776
|
-
function toCamelCaseKeys(obj) {
|
|
2777
|
-
if (isArray$1.isArray(obj)) {
|
|
2778
|
-
return obj.map(item => toCamelCaseKeys(item));
|
|
2779
|
-
}
|
|
2780
|
-
if (isPlainObject.isPlainObject(obj)) {
|
|
2781
|
-
const result = {};
|
|
2782
|
-
const keys = Object.keys(obj);
|
|
2783
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2784
|
-
const key = keys[i];
|
|
2785
|
-
const camelKey = camelCase$1.camelCase(key);
|
|
2786
|
-
const camelCaseKeys = toCamelCaseKeys(obj[key]);
|
|
2787
|
-
result[camelKey] = camelCaseKeys;
|
|
2788
|
-
}
|
|
2789
|
-
return result;
|
|
2790
|
-
}
|
|
2791
|
-
return obj;
|
|
2792
|
-
}
|
|
2793
|
-
|
|
2794
|
-
exports.toCamelCaseKeys = toCamelCaseKeys;
|
|
2795
|
-
} (toCamelCaseKeys));
|
|
2796
|
-
|
|
2797
|
-
var toMerged = {};
|
|
2798
|
-
|
|
2799
|
-
(function (exports) {
|
|
2800
|
-
|
|
2801
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2802
|
-
|
|
2803
|
-
const cloneDeep$1 = cloneDeep;
|
|
2804
|
-
const merge$1 = merge;
|
|
2805
|
-
|
|
2806
|
-
function toMerged(target, source) {
|
|
2807
|
-
return merge$1.merge(cloneDeep$1.cloneDeep(target), source);
|
|
2808
|
-
}
|
|
2809
|
-
|
|
2810
|
-
exports.toMerged = toMerged;
|
|
2811
|
-
} (toMerged));
|
|
2812
|
-
|
|
2813
|
-
var toSnakeCaseKeys = {};
|
|
2814
|
-
|
|
2815
|
-
var isPlainObject = {};
|
|
2816
|
-
|
|
2817
|
-
(function (exports) {
|
|
2818
|
-
|
|
2819
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2820
|
-
|
|
2821
|
-
function isPlainObject(object) {
|
|
2822
|
-
if (typeof object !== 'object') {
|
|
2823
|
-
return false;
|
|
2824
|
-
}
|
|
2825
|
-
if (object == null) {
|
|
2826
|
-
return false;
|
|
2827
|
-
}
|
|
2828
|
-
if (Object.getPrototypeOf(object) === null) {
|
|
2829
|
-
return true;
|
|
2830
|
-
}
|
|
2831
|
-
if (Object.prototype.toString.call(object) !== '[object Object]') {
|
|
2832
|
-
const tag = object[Symbol.toStringTag];
|
|
2833
|
-
if (tag == null) {
|
|
2834
|
-
return false;
|
|
2835
|
-
}
|
|
2836
|
-
const isTagReadonly = !Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable;
|
|
2837
|
-
if (isTagReadonly) {
|
|
2838
|
-
return false;
|
|
2839
|
-
}
|
|
2840
|
-
return object.toString() === `[object ${tag}]`;
|
|
2841
|
-
}
|
|
2842
|
-
let proto = object;
|
|
2843
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
2844
|
-
proto = Object.getPrototypeOf(proto);
|
|
2845
|
-
}
|
|
2846
|
-
return Object.getPrototypeOf(object) === proto;
|
|
2847
|
-
}
|
|
2848
|
-
|
|
2849
|
-
exports.isPlainObject = isPlainObject;
|
|
2850
|
-
} (isPlainObject));
|
|
2851
|
-
|
|
2852
|
-
var snakeCase = {};
|
|
2853
|
-
|
|
2854
|
-
(function (exports) {
|
|
2855
|
-
|
|
2856
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2857
|
-
|
|
2858
|
-
const words$1 = words;
|
|
2859
|
-
|
|
2860
|
-
function snakeCase(str) {
|
|
2861
|
-
const words$1$1 = words$1.words(str);
|
|
2862
|
-
return words$1$1.map(word => word.toLowerCase()).join('_');
|
|
2863
|
-
}
|
|
2864
|
-
|
|
2865
|
-
exports.snakeCase = snakeCase;
|
|
2866
|
-
} (snakeCase));
|
|
2867
|
-
|
|
2868
|
-
(function (exports) {
|
|
2869
|
-
|
|
2870
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2871
|
-
|
|
2872
|
-
const isArray$1 = isArray;
|
|
2873
|
-
const isPlainObject$1 = isPlainObject;
|
|
2874
|
-
const snakeCase$1 = snakeCase;
|
|
2875
|
-
|
|
2876
|
-
function toSnakeCaseKeys(obj) {
|
|
2877
|
-
if (isArray$1.isArray(obj)) {
|
|
2878
|
-
return obj.map(item => toSnakeCaseKeys(item));
|
|
2879
|
-
}
|
|
2880
|
-
if (isPlainObject$1.isPlainObject(obj)) {
|
|
2881
|
-
const result = {};
|
|
2882
|
-
const keys = Object.keys(obj);
|
|
2883
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2884
|
-
const key = keys[i];
|
|
2885
|
-
const snakeKey = snakeCase$1.snakeCase(key);
|
|
2886
|
-
const snakeCaseKeys = toSnakeCaseKeys(obj[key]);
|
|
2887
|
-
result[snakeKey] = snakeCaseKeys;
|
|
2888
|
-
}
|
|
2889
|
-
return result;
|
|
2890
|
-
}
|
|
2891
|
-
return obj;
|
|
2892
|
-
}
|
|
2893
|
-
|
|
2894
|
-
exports.toSnakeCaseKeys = toSnakeCaseKeys;
|
|
2895
|
-
} (toSnakeCaseKeys));
|
|
2896
|
-
|
|
2897
|
-
var isArrayBuffer = {};
|
|
2898
|
-
|
|
2899
|
-
(function (exports) {
|
|
2900
|
-
|
|
2901
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2902
|
-
|
|
2903
|
-
function isArrayBuffer(value) {
|
|
2904
|
-
return value instanceof ArrayBuffer;
|
|
2905
|
-
}
|
|
2906
|
-
|
|
2907
|
-
exports.isArrayBuffer = isArrayBuffer;
|
|
2908
|
-
} (isArrayBuffer));
|
|
2909
|
-
|
|
2910
|
-
var isBlob = {};
|
|
2911
|
-
|
|
2912
|
-
(function (exports) {
|
|
2913
|
-
|
|
2914
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2915
|
-
|
|
2916
|
-
function isBlob(x) {
|
|
2917
|
-
if (typeof Blob === 'undefined') {
|
|
2918
|
-
return false;
|
|
2919
|
-
}
|
|
2920
|
-
return x instanceof Blob;
|
|
2921
|
-
}
|
|
2922
|
-
|
|
2923
|
-
exports.isBlob = isBlob;
|
|
2924
|
-
} (isBlob));
|
|
2925
|
-
|
|
2926
|
-
var isBoolean = {};
|
|
2927
|
-
|
|
2928
|
-
(function (exports) {
|
|
2929
|
-
|
|
2930
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2931
|
-
|
|
2932
|
-
function isBoolean(x) {
|
|
2933
|
-
return typeof x === 'boolean';
|
|
2934
|
-
}
|
|
2935
|
-
|
|
2936
|
-
exports.isBoolean = isBoolean;
|
|
2937
|
-
} (isBoolean));
|
|
2938
|
-
|
|
2939
|
-
var isBrowser = {};
|
|
2940
|
-
|
|
2941
|
-
(function (exports) {
|
|
2942
|
-
|
|
2943
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2944
|
-
|
|
2945
|
-
function isBrowser() {
|
|
2946
|
-
return typeof window !== 'undefined' && window?.document != null;
|
|
2947
|
-
}
|
|
2948
|
-
|
|
2949
|
-
exports.isBrowser = isBrowser;
|
|
2950
|
-
} (isBrowser));
|
|
2951
|
-
|
|
2952
|
-
var isBuffer = {};
|
|
2953
|
-
|
|
2954
|
-
(function (exports) {
|
|
2955
|
-
|
|
2956
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2957
|
-
|
|
2958
|
-
function isBuffer(x) {
|
|
2959
|
-
return typeof Buffer !== 'undefined' && Buffer.isBuffer(x);
|
|
2960
|
-
}
|
|
2961
|
-
|
|
2962
|
-
exports.isBuffer = isBuffer;
|
|
2963
|
-
} (isBuffer));
|
|
2964
|
-
|
|
2965
|
-
var isDate = {};
|
|
2966
|
-
|
|
2967
|
-
(function (exports) {
|
|
2968
|
-
|
|
2969
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2970
|
-
|
|
2971
|
-
function isDate(value) {
|
|
2972
|
-
return value instanceof Date;
|
|
2973
|
-
}
|
|
2974
|
-
|
|
2975
|
-
exports.isDate = isDate;
|
|
2976
|
-
} (isDate));
|
|
2977
|
-
|
|
2978
|
-
var isEqual = {};
|
|
2979
|
-
|
|
2980
|
-
var isEqualWith = {};
|
|
2981
|
-
|
|
2982
|
-
var eq = {};
|
|
2983
|
-
|
|
2984
|
-
(function (exports) {
|
|
2985
|
-
|
|
2986
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2987
|
-
|
|
2988
|
-
function eq(value, other) {
|
|
2989
|
-
return value === other || (Number.isNaN(value) && Number.isNaN(other));
|
|
2990
|
-
}
|
|
2991
|
-
|
|
2992
|
-
exports.eq = eq;
|
|
2993
|
-
} (eq));
|
|
2994
|
-
|
|
2995
|
-
(function (exports) {
|
|
2996
|
-
|
|
2997
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2998
|
-
|
|
2999
|
-
const isPlainObject = isPlainObject$1;
|
|
3000
|
-
const getSymbols$1 = getSymbols;
|
|
3001
|
-
const getTag$1 = getTag;
|
|
3002
|
-
const tags$1 = tags;
|
|
3003
|
-
const eq$1 = eq;
|
|
3004
|
-
|
|
3005
|
-
function isEqualWith(a, b, areValuesEqual) {
|
|
3006
|
-
return isEqualWithImpl(a, b, undefined, undefined, undefined, undefined, areValuesEqual);
|
|
3007
|
-
}
|
|
3008
|
-
function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {
|
|
3009
|
-
const result = areValuesEqual(a, b, property, aParent, bParent, stack);
|
|
3010
|
-
if (result !== undefined) {
|
|
3011
|
-
return result;
|
|
3012
|
-
}
|
|
3013
|
-
if (typeof a === typeof b) {
|
|
3014
|
-
switch (typeof a) {
|
|
3015
|
-
case 'bigint':
|
|
3016
|
-
case 'string':
|
|
3017
|
-
case 'boolean':
|
|
3018
|
-
case 'symbol':
|
|
3019
|
-
case 'undefined': {
|
|
3020
|
-
return a === b;
|
|
3021
|
-
}
|
|
3022
|
-
case 'number': {
|
|
3023
|
-
return a === b || Object.is(a, b);
|
|
3024
|
-
}
|
|
3025
|
-
case 'function': {
|
|
3026
|
-
return a === b;
|
|
3027
|
-
}
|
|
3028
|
-
case 'object': {
|
|
3029
|
-
return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
3030
|
-
}
|
|
3031
|
-
}
|
|
3032
|
-
}
|
|
3033
|
-
return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
3034
|
-
}
|
|
3035
|
-
function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
3036
|
-
if (Object.is(a, b)) {
|
|
3037
|
-
return true;
|
|
3038
|
-
}
|
|
3039
|
-
let aTag = getTag$1.getTag(a);
|
|
3040
|
-
let bTag = getTag$1.getTag(b);
|
|
3041
|
-
if (aTag === tags$1.argumentsTag) {
|
|
3042
|
-
aTag = tags$1.objectTag;
|
|
3043
|
-
}
|
|
3044
|
-
if (bTag === tags$1.argumentsTag) {
|
|
3045
|
-
bTag = tags$1.objectTag;
|
|
3046
|
-
}
|
|
3047
|
-
if (aTag !== bTag) {
|
|
3048
|
-
return false;
|
|
3049
|
-
}
|
|
3050
|
-
switch (aTag) {
|
|
3051
|
-
case tags$1.stringTag:
|
|
3052
|
-
return a.toString() === b.toString();
|
|
3053
|
-
case tags$1.numberTag: {
|
|
3054
|
-
const x = a.valueOf();
|
|
3055
|
-
const y = b.valueOf();
|
|
3056
|
-
return eq$1.eq(x, y);
|
|
3057
|
-
}
|
|
3058
|
-
case tags$1.booleanTag:
|
|
3059
|
-
case tags$1.dateTag:
|
|
3060
|
-
case tags$1.symbolTag:
|
|
3061
|
-
return Object.is(a.valueOf(), b.valueOf());
|
|
3062
|
-
case tags$1.regexpTag: {
|
|
3063
|
-
return a.source === b.source && a.flags === b.flags;
|
|
3064
|
-
}
|
|
3065
|
-
case tags$1.functionTag: {
|
|
3066
|
-
return a === b;
|
|
3067
|
-
}
|
|
3068
|
-
}
|
|
3069
|
-
stack = stack ?? new Map();
|
|
3070
|
-
const aStack = stack.get(a);
|
|
3071
|
-
const bStack = stack.get(b);
|
|
3072
|
-
if (aStack != null && bStack != null) {
|
|
3073
|
-
return aStack === b;
|
|
3074
|
-
}
|
|
3075
|
-
stack.set(a, b);
|
|
3076
|
-
stack.set(b, a);
|
|
3077
|
-
try {
|
|
3078
|
-
switch (aTag) {
|
|
3079
|
-
case tags$1.mapTag: {
|
|
3080
|
-
if (a.size !== b.size) {
|
|
3081
|
-
return false;
|
|
3082
|
-
}
|
|
3083
|
-
for (const [key, value] of a.entries()) {
|
|
3084
|
-
if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) {
|
|
3085
|
-
return false;
|
|
3086
|
-
}
|
|
3087
|
-
}
|
|
3088
|
-
return true;
|
|
3089
|
-
}
|
|
3090
|
-
case tags$1.setTag: {
|
|
3091
|
-
if (a.size !== b.size) {
|
|
3092
|
-
return false;
|
|
3093
|
-
}
|
|
3094
|
-
const aValues = Array.from(a.values());
|
|
3095
|
-
const bValues = Array.from(b.values());
|
|
3096
|
-
for (let i = 0; i < aValues.length; i++) {
|
|
3097
|
-
const aValue = aValues[i];
|
|
3098
|
-
const index = bValues.findIndex(bValue => {
|
|
3099
|
-
return isEqualWithImpl(aValue, bValue, undefined, a, b, stack, areValuesEqual);
|
|
3100
|
-
});
|
|
3101
|
-
if (index === -1) {
|
|
3102
|
-
return false;
|
|
3103
|
-
}
|
|
3104
|
-
bValues.splice(index, 1);
|
|
3105
|
-
}
|
|
3106
|
-
return true;
|
|
3107
|
-
}
|
|
3108
|
-
case tags$1.arrayTag:
|
|
3109
|
-
case tags$1.uint8ArrayTag:
|
|
3110
|
-
case tags$1.uint8ClampedArrayTag:
|
|
3111
|
-
case tags$1.uint16ArrayTag:
|
|
3112
|
-
case tags$1.uint32ArrayTag:
|
|
3113
|
-
case tags$1.bigUint64ArrayTag:
|
|
3114
|
-
case tags$1.int8ArrayTag:
|
|
3115
|
-
case tags$1.int16ArrayTag:
|
|
3116
|
-
case tags$1.int32ArrayTag:
|
|
3117
|
-
case tags$1.bigInt64ArrayTag:
|
|
3118
|
-
case tags$1.float32ArrayTag:
|
|
3119
|
-
case tags$1.float64ArrayTag: {
|
|
3120
|
-
if (typeof Buffer !== 'undefined' && Buffer.isBuffer(a) !== Buffer.isBuffer(b)) {
|
|
3121
|
-
return false;
|
|
3122
|
-
}
|
|
3123
|
-
if (a.length !== b.length) {
|
|
3124
|
-
return false;
|
|
3125
|
-
}
|
|
3126
|
-
for (let i = 0; i < a.length; i++) {
|
|
3127
|
-
if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) {
|
|
3128
|
-
return false;
|
|
3129
|
-
}
|
|
3130
|
-
}
|
|
3131
|
-
return true;
|
|
3132
|
-
}
|
|
3133
|
-
case tags$1.arrayBufferTag: {
|
|
3134
|
-
if (a.byteLength !== b.byteLength) {
|
|
3135
|
-
return false;
|
|
3136
|
-
}
|
|
3137
|
-
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
3138
|
-
}
|
|
3139
|
-
case tags$1.dataViewTag: {
|
|
3140
|
-
if (a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset) {
|
|
3141
|
-
return false;
|
|
3142
|
-
}
|
|
3143
|
-
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
3144
|
-
}
|
|
3145
|
-
case tags$1.errorTag: {
|
|
3146
|
-
return a.name === b.name && a.message === b.message;
|
|
3147
|
-
}
|
|
3148
|
-
case tags$1.objectTag: {
|
|
3149
|
-
const areEqualInstances = areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) ||
|
|
3150
|
-
(isPlainObject.isPlainObject(a) && isPlainObject.isPlainObject(b));
|
|
3151
|
-
if (!areEqualInstances) {
|
|
3152
|
-
return false;
|
|
3153
|
-
}
|
|
3154
|
-
const aKeys = [...Object.keys(a), ...getSymbols$1.getSymbols(a)];
|
|
3155
|
-
const bKeys = [...Object.keys(b), ...getSymbols$1.getSymbols(b)];
|
|
3156
|
-
if (aKeys.length !== bKeys.length) {
|
|
3157
|
-
return false;
|
|
3158
|
-
}
|
|
3159
|
-
for (let i = 0; i < aKeys.length; i++) {
|
|
3160
|
-
const propKey = aKeys[i];
|
|
3161
|
-
const aProp = a[propKey];
|
|
3162
|
-
if (!Object.hasOwn(b, propKey)) {
|
|
3163
|
-
return false;
|
|
3164
|
-
}
|
|
3165
|
-
const bProp = b[propKey];
|
|
3166
|
-
if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) {
|
|
3167
|
-
return false;
|
|
3168
|
-
}
|
|
3169
|
-
}
|
|
3170
|
-
return true;
|
|
3171
|
-
}
|
|
3172
|
-
default: {
|
|
3173
|
-
return false;
|
|
3174
|
-
}
|
|
3175
|
-
}
|
|
3176
|
-
}
|
|
3177
|
-
finally {
|
|
3178
|
-
stack.delete(a);
|
|
3179
|
-
stack.delete(b);
|
|
3180
|
-
}
|
|
3181
|
-
}
|
|
3182
|
-
|
|
3183
|
-
exports.isEqualWith = isEqualWith;
|
|
3184
|
-
} (isEqualWith));
|
|
3185
|
-
|
|
3186
|
-
(function (exports) {
|
|
3187
|
-
|
|
3188
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3189
|
-
|
|
3190
|
-
const isEqualWith$1 = isEqualWith;
|
|
3191
|
-
const noop$1 = noop;
|
|
3192
|
-
|
|
3193
|
-
function isEqual(a, b) {
|
|
3194
|
-
return isEqualWith$1.isEqualWith(a, b, noop$1.noop);
|
|
3195
|
-
}
|
|
3196
|
-
|
|
3197
|
-
exports.isEqual = isEqual;
|
|
3198
|
-
} (isEqual));
|
|
3199
|
-
|
|
3200
|
-
var isError = {};
|
|
3201
|
-
|
|
3202
|
-
(function (exports) {
|
|
3203
|
-
|
|
3204
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3205
|
-
|
|
3206
|
-
function isError(value) {
|
|
3207
|
-
return value instanceof Error;
|
|
3208
|
-
}
|
|
3209
|
-
|
|
3210
|
-
exports.isError = isError;
|
|
3211
|
-
} (isError));
|
|
3212
|
-
|
|
3213
|
-
var isFile = {};
|
|
3214
|
-
|
|
3215
|
-
(function (exports) {
|
|
3216
|
-
|
|
3217
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3218
|
-
|
|
3219
|
-
const isBlob$1 = isBlob;
|
|
3220
|
-
|
|
3221
|
-
function isFile(x) {
|
|
3222
|
-
if (typeof File === 'undefined') {
|
|
3223
|
-
return false;
|
|
3224
|
-
}
|
|
3225
|
-
return isBlob$1.isBlob(x) && x instanceof File;
|
|
3226
|
-
}
|
|
3227
|
-
|
|
3228
|
-
exports.isFile = isFile;
|
|
3229
|
-
} (isFile));
|
|
3230
|
-
|
|
3231
|
-
var isFunction = {};
|
|
3232
|
-
|
|
3233
|
-
(function (exports) {
|
|
3234
|
-
|
|
3235
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3236
|
-
|
|
3237
|
-
function isFunction(value) {
|
|
3238
|
-
return typeof value === 'function';
|
|
3239
|
-
}
|
|
3240
|
-
|
|
3241
|
-
exports.isFunction = isFunction;
|
|
3242
|
-
} (isFunction));
|
|
3243
|
-
|
|
3244
|
-
var isJSON = {};
|
|
3245
|
-
|
|
3246
|
-
(function (exports) {
|
|
3247
|
-
|
|
3248
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3249
|
-
|
|
3250
|
-
function isJSON(value) {
|
|
3251
|
-
if (typeof value !== 'string') {
|
|
3252
|
-
return false;
|
|
3253
|
-
}
|
|
3254
|
-
try {
|
|
3255
|
-
JSON.parse(value);
|
|
3256
|
-
return true;
|
|
3257
|
-
}
|
|
3258
|
-
catch {
|
|
3259
|
-
return false;
|
|
3260
|
-
}
|
|
3261
|
-
}
|
|
3262
|
-
|
|
3263
|
-
exports.isJSON = isJSON;
|
|
3264
|
-
} (isJSON));
|
|
3265
|
-
|
|
3266
|
-
var isJSONValue = {};
|
|
3267
|
-
|
|
3268
|
-
(function (exports) {
|
|
3269
|
-
|
|
3270
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3271
|
-
|
|
3272
|
-
const isPlainObject = isPlainObject$1;
|
|
3273
|
-
|
|
3274
|
-
function isJSONValue(value) {
|
|
3275
|
-
switch (typeof value) {
|
|
3276
|
-
case 'object': {
|
|
3277
|
-
return value === null || isJSONArray(value) || isJSONObject(value);
|
|
3278
|
-
}
|
|
3279
|
-
case 'string':
|
|
3280
|
-
case 'number':
|
|
3281
|
-
case 'boolean': {
|
|
3282
|
-
return true;
|
|
3283
|
-
}
|
|
3284
|
-
default: {
|
|
3285
|
-
return false;
|
|
3286
|
-
}
|
|
3287
|
-
}
|
|
3288
|
-
}
|
|
3289
|
-
function isJSONArray(value) {
|
|
3290
|
-
if (!Array.isArray(value)) {
|
|
3291
|
-
return false;
|
|
3292
|
-
}
|
|
3293
|
-
return value.every(item => isJSONValue(item));
|
|
3294
|
-
}
|
|
3295
|
-
function isJSONObject(obj) {
|
|
3296
|
-
if (!isPlainObject.isPlainObject(obj)) {
|
|
3297
|
-
return false;
|
|
3298
|
-
}
|
|
3299
|
-
const keys = Reflect.ownKeys(obj);
|
|
3300
|
-
for (let i = 0; i < keys.length; i++) {
|
|
3301
|
-
const key = keys[i];
|
|
3302
|
-
const value = obj[key];
|
|
3303
|
-
if (typeof key !== 'string') {
|
|
3304
|
-
return false;
|
|
3305
|
-
}
|
|
3306
|
-
if (!isJSONValue(value)) {
|
|
3307
|
-
return false;
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
return true;
|
|
3311
|
-
}
|
|
3312
|
-
|
|
3313
|
-
exports.isJSONArray = isJSONArray;
|
|
3314
|
-
exports.isJSONObject = isJSONObject;
|
|
3315
|
-
exports.isJSONValue = isJSONValue;
|
|
3316
|
-
} (isJSONValue));
|
|
3317
|
-
|
|
3318
|
-
var isLength = {};
|
|
3319
|
-
|
|
3320
|
-
(function (exports) {
|
|
3321
|
-
|
|
3322
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3323
|
-
|
|
3324
|
-
function isLength(value) {
|
|
3325
|
-
return Number.isSafeInteger(value) && value >= 0;
|
|
3326
|
-
}
|
|
3327
|
-
|
|
3328
|
-
exports.isLength = isLength;
|
|
3329
|
-
} (isLength));
|
|
3330
|
-
|
|
3331
|
-
var isMap = {};
|
|
3332
|
-
|
|
3333
|
-
(function (exports) {
|
|
3334
|
-
|
|
3335
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3336
|
-
|
|
3337
|
-
function isMap(value) {
|
|
3338
|
-
return value instanceof Map;
|
|
3339
|
-
}
|
|
3340
|
-
|
|
3341
|
-
exports.isMap = isMap;
|
|
3342
|
-
} (isMap));
|
|
3343
|
-
|
|
3344
|
-
var isNil = {};
|
|
3345
|
-
|
|
3346
|
-
(function (exports) {
|
|
3347
|
-
|
|
3348
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3349
|
-
|
|
3350
|
-
function isNil(x) {
|
|
3351
|
-
return x == null;
|
|
3352
|
-
}
|
|
3353
|
-
|
|
3354
|
-
exports.isNil = isNil;
|
|
3355
|
-
} (isNil));
|
|
3356
|
-
|
|
3357
|
-
var isNode = {};
|
|
3358
|
-
|
|
3359
|
-
(function (exports) {
|
|
3360
|
-
|
|
3361
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3362
|
-
|
|
3363
|
-
function isNode() {
|
|
3364
|
-
return typeof process !== 'undefined' && process?.versions?.node != null;
|
|
3365
|
-
}
|
|
3366
|
-
|
|
3367
|
-
exports.isNode = isNode;
|
|
3368
|
-
} (isNode));
|
|
3369
|
-
|
|
3370
|
-
var isNotNil = {};
|
|
3371
|
-
|
|
3372
|
-
(function (exports) {
|
|
3373
|
-
|
|
3374
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3375
|
-
|
|
3376
|
-
function isNotNil(x) {
|
|
3377
|
-
return x != null;
|
|
3378
|
-
}
|
|
3379
|
-
|
|
3380
|
-
exports.isNotNil = isNotNil;
|
|
3381
|
-
} (isNotNil));
|
|
3382
|
-
|
|
3383
|
-
var isNull = {};
|
|
3384
|
-
|
|
3385
|
-
(function (exports) {
|
|
3386
|
-
|
|
3387
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3388
|
-
|
|
3389
|
-
function isNull(x) {
|
|
3390
|
-
return x === null;
|
|
3391
|
-
}
|
|
3392
|
-
|
|
3393
|
-
exports.isNull = isNull;
|
|
3394
|
-
} (isNull));
|
|
3395
|
-
|
|
3396
|
-
var isPromise = {};
|
|
3397
|
-
|
|
3398
|
-
(function (exports) {
|
|
3399
|
-
|
|
3400
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3401
|
-
|
|
3402
|
-
function isPromise(value) {
|
|
3403
|
-
return value instanceof Promise;
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
|
-
exports.isPromise = isPromise;
|
|
3407
|
-
} (isPromise));
|
|
3408
|
-
|
|
3409
|
-
var isRegExp = {};
|
|
3410
|
-
|
|
3411
|
-
(function (exports) {
|
|
3412
|
-
|
|
3413
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3414
|
-
|
|
3415
|
-
function isRegExp(value) {
|
|
3416
|
-
return value instanceof RegExp;
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
exports.isRegExp = isRegExp;
|
|
3420
|
-
} (isRegExp));
|
|
3421
|
-
|
|
3422
|
-
var isSet = {};
|
|
3423
|
-
|
|
3424
|
-
(function (exports) {
|
|
3425
|
-
|
|
3426
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3427
|
-
|
|
3428
|
-
function isSet(value) {
|
|
3429
|
-
return value instanceof Set;
|
|
3430
|
-
}
|
|
3431
|
-
|
|
3432
|
-
exports.isSet = isSet;
|
|
3433
|
-
} (isSet));
|
|
3434
|
-
|
|
3435
|
-
var isString = {};
|
|
3436
|
-
|
|
3437
|
-
(function (exports) {
|
|
3438
|
-
|
|
3439
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3440
|
-
|
|
3441
|
-
function isString(value) {
|
|
3442
|
-
return typeof value === 'string';
|
|
3443
|
-
}
|
|
3444
|
-
|
|
3445
|
-
exports.isString = isString;
|
|
3446
|
-
} (isString));
|
|
3447
|
-
|
|
3448
|
-
var isSymbol = {};
|
|
3449
|
-
|
|
3450
|
-
(function (exports) {
|
|
3451
|
-
|
|
3452
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3453
|
-
|
|
3454
|
-
function isSymbol(value) {
|
|
3455
|
-
return typeof value === 'symbol';
|
|
3456
|
-
}
|
|
3457
|
-
|
|
3458
|
-
exports.isSymbol = isSymbol;
|
|
3459
|
-
} (isSymbol));
|
|
3460
|
-
|
|
3461
|
-
var isUndefined = {};
|
|
3462
|
-
|
|
3463
|
-
(function (exports) {
|
|
3464
|
-
|
|
3465
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3466
|
-
|
|
3467
|
-
function isUndefined(x) {
|
|
3468
|
-
return x === undefined;
|
|
3469
|
-
}
|
|
3470
|
-
|
|
3471
|
-
exports.isUndefined = isUndefined;
|
|
3472
|
-
} (isUndefined));
|
|
3473
|
-
|
|
3474
|
-
var isWeakMap = {};
|
|
3475
|
-
|
|
3476
|
-
(function (exports) {
|
|
3477
|
-
|
|
3478
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3479
|
-
|
|
3480
|
-
function isWeakMap(value) {
|
|
3481
|
-
return value instanceof WeakMap;
|
|
3482
|
-
}
|
|
3483
|
-
|
|
3484
|
-
exports.isWeakMap = isWeakMap;
|
|
3485
|
-
} (isWeakMap));
|
|
3486
|
-
|
|
3487
|
-
var isWeakSet = {};
|
|
3488
|
-
|
|
3489
|
-
(function (exports) {
|
|
3490
|
-
|
|
3491
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3492
|
-
|
|
3493
|
-
function isWeakSet(value) {
|
|
3494
|
-
return value instanceof WeakSet;
|
|
3495
|
-
}
|
|
3496
|
-
|
|
3497
|
-
exports.isWeakSet = isWeakSet;
|
|
3498
|
-
} (isWeakSet));
|
|
3499
|
-
|
|
3500
|
-
var mutex = {};
|
|
3501
|
-
|
|
3502
|
-
var semaphore = {};
|
|
3503
|
-
|
|
3504
|
-
(function (exports) {
|
|
3505
|
-
|
|
3506
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3507
|
-
|
|
3508
|
-
class Semaphore {
|
|
3509
|
-
capacity;
|
|
3510
|
-
available;
|
|
3511
|
-
deferredTasks = [];
|
|
3512
|
-
constructor(capacity) {
|
|
3513
|
-
this.capacity = capacity;
|
|
3514
|
-
this.available = capacity;
|
|
3515
|
-
}
|
|
3516
|
-
async acquire() {
|
|
3517
|
-
if (this.available > 0) {
|
|
3518
|
-
this.available--;
|
|
3519
|
-
return;
|
|
3520
|
-
}
|
|
3521
|
-
return new Promise(resolve => {
|
|
3522
|
-
this.deferredTasks.push(resolve);
|
|
3523
|
-
});
|
|
3524
|
-
}
|
|
3525
|
-
release() {
|
|
3526
|
-
const deferredTask = this.deferredTasks.shift();
|
|
3527
|
-
if (deferredTask != null) {
|
|
3528
|
-
deferredTask();
|
|
3529
|
-
return;
|
|
3530
|
-
}
|
|
3531
|
-
if (this.available < this.capacity) {
|
|
3532
|
-
this.available++;
|
|
3533
|
-
}
|
|
3534
|
-
}
|
|
3535
|
-
}
|
|
3536
|
-
|
|
3537
|
-
exports.Semaphore = Semaphore;
|
|
3538
|
-
} (semaphore));
|
|
3539
|
-
|
|
3540
|
-
(function (exports) {
|
|
3541
|
-
|
|
3542
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3543
|
-
|
|
3544
|
-
const semaphore$1 = semaphore;
|
|
3545
|
-
|
|
3546
|
-
class Mutex {
|
|
3547
|
-
semaphore = new semaphore$1.Semaphore(1);
|
|
3548
|
-
get isLocked() {
|
|
3549
|
-
return this.semaphore.available === 0;
|
|
3550
|
-
}
|
|
3551
|
-
async acquire() {
|
|
3552
|
-
return this.semaphore.acquire();
|
|
3553
|
-
}
|
|
3554
|
-
release() {
|
|
3555
|
-
this.semaphore.release();
|
|
3556
|
-
}
|
|
3557
|
-
}
|
|
3558
|
-
|
|
3559
|
-
exports.Mutex = Mutex;
|
|
3560
|
-
} (mutex));
|
|
3561
|
-
|
|
3562
|
-
var timeout = {};
|
|
3563
|
-
|
|
3564
|
-
(function (exports) {
|
|
3565
|
-
|
|
3566
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3567
|
-
|
|
3568
|
-
const delay$1 = delay;
|
|
3569
|
-
const TimeoutError$1 = TimeoutError;
|
|
3570
|
-
|
|
3571
|
-
async function timeout(ms) {
|
|
3572
|
-
await delay$1.delay(ms);
|
|
3573
|
-
throw new TimeoutError$1.TimeoutError();
|
|
3574
|
-
}
|
|
3575
|
-
|
|
3576
|
-
exports.timeout = timeout;
|
|
3577
|
-
} (timeout));
|
|
3578
|
-
|
|
3579
|
-
var withTimeout = {};
|
|
3580
|
-
|
|
3581
|
-
(function (exports) {
|
|
3582
|
-
|
|
3583
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3584
|
-
|
|
3585
|
-
const timeout$1 = timeout;
|
|
3586
|
-
|
|
3587
|
-
async function withTimeout(run, ms) {
|
|
3588
|
-
return Promise.race([run(), timeout$1.timeout(ms)]);
|
|
3589
|
-
}
|
|
3590
|
-
|
|
3591
|
-
exports.withTimeout = withTimeout;
|
|
3592
|
-
} (withTimeout));
|
|
3593
|
-
|
|
3594
|
-
var constantCase = {};
|
|
3595
|
-
|
|
3596
|
-
(function (exports) {
|
|
3597
|
-
|
|
3598
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3599
|
-
|
|
3600
|
-
const words$1 = words;
|
|
3601
|
-
|
|
3602
|
-
function constantCase(str) {
|
|
3603
|
-
const words$1$1 = words$1.words(str);
|
|
3604
|
-
return words$1$1.map(word => word.toUpperCase()).join('_');
|
|
3605
|
-
}
|
|
3606
|
-
|
|
3607
|
-
exports.constantCase = constantCase;
|
|
3608
|
-
} (constantCase));
|
|
3609
|
-
|
|
3610
|
-
var deburr = {};
|
|
3611
|
-
|
|
3612
|
-
(function (exports) {
|
|
3613
|
-
|
|
3614
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3615
|
-
|
|
3616
|
-
const deburrMap = new Map(Object.entries({
|
|
3617
|
-
Æ: 'Ae',
|
|
3618
|
-
Ð: 'D',
|
|
3619
|
-
Ø: 'O',
|
|
3620
|
-
Þ: 'Th',
|
|
3621
|
-
ß: 'ss',
|
|
3622
|
-
æ: 'ae',
|
|
3623
|
-
ð: 'd',
|
|
3624
|
-
ø: 'o',
|
|
3625
|
-
þ: 'th',
|
|
3626
|
-
Đ: 'D',
|
|
3627
|
-
đ: 'd',
|
|
3628
|
-
Ħ: 'H',
|
|
3629
|
-
ħ: 'h',
|
|
3630
|
-
ı: 'i',
|
|
3631
|
-
IJ: 'IJ',
|
|
3632
|
-
ij: 'ij',
|
|
3633
|
-
ĸ: 'k',
|
|
3634
|
-
Ŀ: 'L',
|
|
3635
|
-
ŀ: 'l',
|
|
3636
|
-
Ł: 'L',
|
|
3637
|
-
ł: 'l',
|
|
3638
|
-
ʼn: "'n",
|
|
3639
|
-
Ŋ: 'N',
|
|
3640
|
-
ŋ: 'n',
|
|
3641
|
-
Œ: 'Oe',
|
|
3642
|
-
œ: 'oe',
|
|
3643
|
-
Ŧ: 'T',
|
|
3644
|
-
ŧ: 't',
|
|
3645
|
-
ſ: 's',
|
|
3646
|
-
}));
|
|
3647
|
-
function deburr(str) {
|
|
3648
|
-
str = str.normalize('NFD');
|
|
3649
|
-
let result = '';
|
|
3650
|
-
for (let i = 0; i < str.length; i++) {
|
|
3651
|
-
const char = str[i];
|
|
3652
|
-
if ((char >= '\u0300' && char <= '\u036f') || (char >= '\ufe20' && char <= '\ufe23')) {
|
|
3653
|
-
continue;
|
|
3654
|
-
}
|
|
3655
|
-
result += deburrMap.get(char) ?? char;
|
|
3656
|
-
}
|
|
3657
|
-
return result;
|
|
3658
|
-
}
|
|
3659
|
-
|
|
3660
|
-
exports.deburr = deburr;
|
|
3661
|
-
} (deburr));
|
|
3662
|
-
|
|
3663
|
-
var _escape = {};
|
|
3664
|
-
|
|
3665
|
-
(function (exports) {
|
|
3666
|
-
|
|
3667
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3668
|
-
|
|
3669
|
-
const htmlEscapes = {
|
|
3670
|
-
'&': '&',
|
|
3671
|
-
'<': '<',
|
|
3672
|
-
'>': '>',
|
|
3673
|
-
'"': '"',
|
|
3674
|
-
"'": ''',
|
|
3675
|
-
};
|
|
3676
|
-
function escape(str) {
|
|
3677
|
-
return str.replace(/[&<>"']/g, match => htmlEscapes[match]);
|
|
3678
|
-
}
|
|
3679
|
-
|
|
3680
|
-
exports.escape = escape;
|
|
3681
|
-
} (_escape));
|
|
3682
|
-
|
|
3683
|
-
var escapeRegExp = {};
|
|
3684
|
-
|
|
3685
|
-
(function (exports) {
|
|
3686
|
-
|
|
3687
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3688
|
-
|
|
3689
|
-
function escapeRegExp(str) {
|
|
3690
|
-
return str.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&');
|
|
3691
|
-
}
|
|
3692
|
-
|
|
3693
|
-
exports.escapeRegExp = escapeRegExp;
|
|
3694
|
-
} (escapeRegExp));
|
|
3695
|
-
|
|
3696
|
-
var kebabCase = {};
|
|
3697
|
-
|
|
3698
|
-
(function (exports) {
|
|
3699
|
-
|
|
3700
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3701
|
-
|
|
3702
|
-
const words$1 = words;
|
|
3703
|
-
|
|
3704
|
-
function kebabCase(str) {
|
|
3705
|
-
const words$1$1 = words$1.words(str);
|
|
3706
|
-
return words$1$1.map(word => word.toLowerCase()).join('-');
|
|
3707
|
-
}
|
|
3708
|
-
|
|
3709
|
-
exports.kebabCase = kebabCase;
|
|
3710
|
-
} (kebabCase));
|
|
3711
|
-
|
|
3712
|
-
var lowerCase = {};
|
|
3713
|
-
|
|
3714
|
-
(function (exports) {
|
|
3715
|
-
|
|
3716
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3717
|
-
|
|
3718
|
-
const words$1 = words;
|
|
3719
|
-
|
|
3720
|
-
function lowerCase(str) {
|
|
3721
|
-
const words$1$1 = words$1.words(str);
|
|
3722
|
-
return words$1$1.map(word => word.toLowerCase()).join(' ');
|
|
3723
|
-
}
|
|
3724
|
-
|
|
3725
|
-
exports.lowerCase = lowerCase;
|
|
3726
|
-
} (lowerCase));
|
|
3727
|
-
|
|
3728
|
-
var lowerFirst = {};
|
|
3729
|
-
|
|
3730
|
-
(function (exports) {
|
|
3731
|
-
|
|
3732
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3733
|
-
|
|
3734
|
-
function lowerFirst(str) {
|
|
3735
|
-
return str.substring(0, 1).toLowerCase() + str.substring(1);
|
|
3736
|
-
}
|
|
3737
|
-
|
|
3738
|
-
exports.lowerFirst = lowerFirst;
|
|
3739
|
-
} (lowerFirst));
|
|
3740
|
-
|
|
3741
|
-
var pad = {};
|
|
3742
|
-
|
|
3743
|
-
(function (exports) {
|
|
3744
|
-
|
|
3745
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3746
|
-
|
|
3747
|
-
function pad(str, length, chars = ' ') {
|
|
3748
|
-
return str.padStart(Math.floor((length - str.length) / 2) + str.length, chars).padEnd(length, chars);
|
|
3749
|
-
}
|
|
3750
|
-
|
|
3751
|
-
exports.pad = pad;
|
|
3752
|
-
} (pad));
|
|
3753
|
-
|
|
3754
|
-
var pascalCase = {};
|
|
3755
|
-
|
|
3756
|
-
(function (exports) {
|
|
3757
|
-
|
|
3758
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3759
|
-
|
|
3760
|
-
const capitalize$1 = capitalize;
|
|
3761
|
-
const words$1 = words;
|
|
3762
|
-
|
|
3763
|
-
function pascalCase(str) {
|
|
3764
|
-
const words$1$1 = words$1.words(str);
|
|
3765
|
-
return words$1$1.map(word => capitalize$1.capitalize(word)).join('');
|
|
3766
|
-
}
|
|
3767
|
-
|
|
3768
|
-
exports.pascalCase = pascalCase;
|
|
3769
|
-
} (pascalCase));
|
|
3770
|
-
|
|
3771
|
-
var reverseString = {};
|
|
3772
|
-
|
|
3773
|
-
(function (exports) {
|
|
3774
|
-
|
|
3775
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3776
|
-
|
|
3777
|
-
function reverseString(value) {
|
|
3778
|
-
return [...value].reverse().join('');
|
|
3779
|
-
}
|
|
3780
|
-
|
|
3781
|
-
exports.reverseString = reverseString;
|
|
3782
|
-
} (reverseString));
|
|
3783
|
-
|
|
3784
|
-
var startCase = {};
|
|
3785
|
-
|
|
3786
|
-
(function (exports) {
|
|
3787
|
-
|
|
3788
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3789
|
-
|
|
3790
|
-
const words$1 = words;
|
|
3791
|
-
|
|
3792
|
-
function startCase(str) {
|
|
3793
|
-
const words$1$1 = words$1.words(str.trim());
|
|
3794
|
-
let result = '';
|
|
3795
|
-
for (let i = 0; i < words$1$1.length; i++) {
|
|
3796
|
-
const word = words$1$1[i];
|
|
3797
|
-
if (result) {
|
|
3798
|
-
result += ' ';
|
|
3799
|
-
}
|
|
3800
|
-
result += word[0].toUpperCase() + word.slice(1).toLowerCase();
|
|
3801
|
-
}
|
|
3802
|
-
return result;
|
|
3803
|
-
}
|
|
3804
|
-
|
|
3805
|
-
exports.startCase = startCase;
|
|
3806
|
-
} (startCase));
|
|
3807
|
-
|
|
3808
|
-
var trim = {};
|
|
3809
|
-
|
|
3810
|
-
var trimEnd = {};
|
|
3811
|
-
|
|
3812
|
-
(function (exports) {
|
|
3813
|
-
|
|
3814
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3815
|
-
|
|
3816
|
-
function trimEnd(str, chars) {
|
|
3817
|
-
if (chars === undefined) {
|
|
3818
|
-
return str.trimEnd();
|
|
3819
|
-
}
|
|
3820
|
-
let endIndex = str.length;
|
|
3821
|
-
switch (typeof chars) {
|
|
3822
|
-
case 'string': {
|
|
3823
|
-
if (chars.length !== 1) {
|
|
3824
|
-
throw new Error(`The 'chars' parameter should be a single character string.`);
|
|
3825
|
-
}
|
|
3826
|
-
while (endIndex > 0 && str[endIndex - 1] === chars) {
|
|
3827
|
-
endIndex--;
|
|
3828
|
-
}
|
|
3829
|
-
break;
|
|
3830
|
-
}
|
|
3831
|
-
case 'object': {
|
|
3832
|
-
while (endIndex > 0 && chars.includes(str[endIndex - 1])) {
|
|
3833
|
-
endIndex--;
|
|
3834
|
-
}
|
|
3835
|
-
}
|
|
3836
|
-
}
|
|
3837
|
-
return str.substring(0, endIndex);
|
|
3838
|
-
}
|
|
3839
|
-
|
|
3840
|
-
exports.trimEnd = trimEnd;
|
|
3841
|
-
} (trimEnd));
|
|
3842
|
-
|
|
3843
|
-
var trimStart = {};
|
|
3844
|
-
|
|
3845
|
-
(function (exports) {
|
|
3846
|
-
|
|
3847
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3848
|
-
|
|
3849
|
-
function trimStart(str, chars) {
|
|
3850
|
-
if (chars === undefined) {
|
|
3851
|
-
return str.trimStart();
|
|
3852
|
-
}
|
|
3853
|
-
let startIndex = 0;
|
|
3854
|
-
switch (typeof chars) {
|
|
3855
|
-
case 'string': {
|
|
3856
|
-
while (startIndex < str.length && str[startIndex] === chars) {
|
|
3857
|
-
startIndex++;
|
|
3858
|
-
}
|
|
3859
|
-
break;
|
|
3860
|
-
}
|
|
3861
|
-
case 'object': {
|
|
3862
|
-
while (startIndex < str.length && chars.includes(str[startIndex])) {
|
|
3863
|
-
startIndex++;
|
|
3864
|
-
}
|
|
3865
|
-
}
|
|
3866
|
-
}
|
|
3867
|
-
return str.substring(startIndex);
|
|
3868
|
-
}
|
|
3869
|
-
|
|
3870
|
-
exports.trimStart = trimStart;
|
|
3871
|
-
} (trimStart));
|
|
3872
|
-
|
|
3873
|
-
(function (exports) {
|
|
3874
|
-
|
|
3875
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3876
|
-
|
|
3877
|
-
const trimEnd$1 = trimEnd;
|
|
3878
|
-
const trimStart$1 = trimStart;
|
|
3879
|
-
|
|
3880
|
-
function trim(str, chars) {
|
|
3881
|
-
if (chars === undefined) {
|
|
3882
|
-
return str.trim();
|
|
3883
|
-
}
|
|
3884
|
-
return trimStart$1.trimStart(trimEnd$1.trimEnd(str, chars), chars);
|
|
3885
|
-
}
|
|
3886
|
-
|
|
3887
|
-
exports.trim = trim;
|
|
3888
|
-
} (trim));
|
|
3889
|
-
|
|
3890
|
-
var _unescape = {};
|
|
3891
|
-
|
|
3892
|
-
(function (exports) {
|
|
3893
|
-
|
|
3894
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3895
|
-
|
|
3896
|
-
const htmlUnescapes = {
|
|
3897
|
-
'&': '&',
|
|
3898
|
-
'<': '<',
|
|
3899
|
-
'>': '>',
|
|
3900
|
-
'"': '"',
|
|
3901
|
-
''': "'",
|
|
3902
|
-
};
|
|
3903
|
-
function unescape(str) {
|
|
3904
|
-
return str.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g, match => htmlUnescapes[match] || "'");
|
|
3905
|
-
}
|
|
3906
|
-
|
|
3907
|
-
exports.unescape = unescape;
|
|
3908
|
-
} (_unescape));
|
|
3909
|
-
|
|
3910
|
-
var upperCase = {};
|
|
3911
|
-
|
|
3912
|
-
(function (exports) {
|
|
3913
|
-
|
|
3914
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3915
|
-
|
|
3916
|
-
const words$1 = words;
|
|
3917
|
-
|
|
3918
|
-
function upperCase(str) {
|
|
3919
|
-
const words$1$1 = words$1.words(str);
|
|
3920
|
-
let result = '';
|
|
3921
|
-
for (let i = 0; i < words$1$1.length; i++) {
|
|
3922
|
-
result += words$1$1[i].toUpperCase();
|
|
3923
|
-
if (i < words$1$1.length - 1) {
|
|
3924
|
-
result += ' ';
|
|
3925
|
-
}
|
|
3926
|
-
}
|
|
3927
|
-
return result;
|
|
3928
|
-
}
|
|
3929
|
-
|
|
3930
|
-
exports.upperCase = upperCase;
|
|
3931
|
-
} (upperCase));
|
|
3932
|
-
|
|
3933
|
-
var upperFirst = {};
|
|
3934
|
-
|
|
3935
|
-
(function (exports) {
|
|
3936
|
-
|
|
3937
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3938
|
-
|
|
3939
|
-
function upperFirst(str) {
|
|
3940
|
-
return str.substring(0, 1).toUpperCase() + str.substring(1);
|
|
3941
|
-
}
|
|
3942
|
-
|
|
3943
|
-
exports.upperFirst = upperFirst;
|
|
3944
|
-
} (upperFirst));
|
|
3945
|
-
|
|
3946
|
-
var attempt = {};
|
|
3947
|
-
|
|
3948
|
-
(function (exports) {
|
|
3949
|
-
|
|
3950
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3951
|
-
|
|
3952
|
-
function attempt(func) {
|
|
3953
|
-
try {
|
|
3954
|
-
return [null, func()];
|
|
3955
|
-
}
|
|
3956
|
-
catch (error) {
|
|
3957
|
-
return [error, null];
|
|
3958
|
-
}
|
|
3959
|
-
}
|
|
3960
|
-
|
|
3961
|
-
exports.attempt = attempt;
|
|
3962
|
-
} (attempt));
|
|
3963
|
-
|
|
3964
|
-
var attemptAsync = {};
|
|
3965
|
-
|
|
3966
|
-
(function (exports) {
|
|
3967
|
-
|
|
3968
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3969
|
-
|
|
3970
|
-
async function attemptAsync(func) {
|
|
3971
|
-
try {
|
|
3972
|
-
const result = await func();
|
|
3973
|
-
return [null, result];
|
|
3974
|
-
}
|
|
3975
|
-
catch (error) {
|
|
3976
|
-
return [error, null];
|
|
3977
|
-
}
|
|
3978
|
-
}
|
|
3979
|
-
|
|
3980
|
-
exports.attemptAsync = attemptAsync;
|
|
3981
|
-
} (attemptAsync));
|
|
3982
|
-
|
|
3983
|
-
var invariant = {};
|
|
3984
|
-
|
|
3985
|
-
(function (exports) {
|
|
3986
|
-
|
|
3987
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3988
|
-
|
|
3989
|
-
function invariant(condition, message) {
|
|
3990
|
-
if (condition) {
|
|
3991
|
-
return;
|
|
3992
|
-
}
|
|
3993
|
-
if (typeof message === 'string') {
|
|
3994
|
-
throw new Error(message);
|
|
3995
|
-
}
|
|
3996
|
-
throw message;
|
|
3997
|
-
}
|
|
3998
|
-
|
|
3999
|
-
exports.invariant = invariant;
|
|
4000
|
-
} (invariant));
|
|
4001
|
-
|
|
4002
|
-
(function (exports) {
|
|
4003
|
-
|
|
4004
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4005
|
-
|
|
4006
|
-
const at$1 = at;
|
|
4007
|
-
const chunk$1 = chunk;
|
|
4008
|
-
const compact$1 = compact;
|
|
4009
|
-
const countBy$1 = countBy;
|
|
4010
|
-
const difference$1 = difference;
|
|
4011
|
-
const differenceBy$1 = differenceBy;
|
|
4012
|
-
const differenceWith$1 = differenceWith;
|
|
4013
|
-
const drop$1 = drop;
|
|
4014
|
-
const dropRight$1 = dropRight;
|
|
4015
|
-
const dropRightWhile$1 = dropRightWhile;
|
|
4016
|
-
const dropWhile$1 = dropWhile;
|
|
4017
|
-
const fill$1 = fill;
|
|
4018
|
-
const flatMap$1 = flatMap;
|
|
4019
|
-
const flatMapDeep$1 = flatMapDeep;
|
|
4020
|
-
const flatten$1 = flatten;
|
|
4021
|
-
const flattenDeep$1 = flattenDeep;
|
|
4022
|
-
const forEachRight$1 = forEachRight;
|
|
4023
|
-
const groupBy$1 = groupBy;
|
|
4024
|
-
const head$1 = head;
|
|
4025
|
-
const initial$1 = initial;
|
|
4026
|
-
const intersection$1 = intersection;
|
|
4027
|
-
const intersectionBy$1 = intersectionBy;
|
|
4028
|
-
const intersectionWith$1 = intersectionWith;
|
|
4029
|
-
const isSubset$1 = isSubset;
|
|
4030
|
-
const isSubsetWith$1 = isSubsetWith;
|
|
4031
|
-
const keyBy$1 = keyBy;
|
|
4032
|
-
const last$1 = last;
|
|
4033
|
-
const maxBy$1 = maxBy;
|
|
4034
|
-
const minBy$1 = minBy;
|
|
4035
|
-
const orderBy$1 = orderBy;
|
|
4036
|
-
const partition$1 = partition;
|
|
4037
|
-
const pull$1 = pull;
|
|
4038
|
-
const pullAt$1 = pullAt;
|
|
4039
|
-
const remove$1 = remove;
|
|
4040
|
-
const sample$1 = sample;
|
|
4041
|
-
const sampleSize$1 = sampleSize;
|
|
4042
|
-
const shuffle$1 = shuffle;
|
|
4043
|
-
const sortBy$1 = sortBy;
|
|
4044
|
-
const tail$1 = tail;
|
|
4045
|
-
const take$1 = take;
|
|
4046
|
-
const takeRight$1 = takeRight;
|
|
4047
|
-
const takeRightWhile$1 = takeRightWhile;
|
|
4048
|
-
const takeWhile$1 = takeWhile;
|
|
4049
|
-
const toFilled$1 = toFilled;
|
|
4050
|
-
const union$1 = union;
|
|
4051
|
-
const unionBy$1 = unionBy;
|
|
4052
|
-
const unionWith$1 = unionWith;
|
|
4053
|
-
const uniq$1 = uniq;
|
|
4054
|
-
const uniqBy$1 = uniqBy;
|
|
4055
|
-
const uniqWith$1 = uniqWith;
|
|
4056
|
-
const unzip$1 = unzip;
|
|
4057
|
-
const unzipWith$1 = unzipWith;
|
|
4058
|
-
const windowed$1 = windowed;
|
|
4059
|
-
const without$1 = without;
|
|
4060
|
-
const xor$1 = xor;
|
|
4061
|
-
const xorBy$1 = xorBy;
|
|
4062
|
-
const xorWith$1 = xorWith;
|
|
4063
|
-
const zip$1 = zip;
|
|
4064
|
-
const zipObject$1 = zipObject;
|
|
4065
|
-
const zipWith$1 = zipWith;
|
|
4066
|
-
const AbortError$1 = AbortError;
|
|
4067
|
-
const TimeoutError$1 = TimeoutError;
|
|
4068
|
-
const after$1 = after;
|
|
4069
|
-
const ary$1 = ary;
|
|
4070
|
-
const asyncNoop$1 = asyncNoop;
|
|
4071
|
-
const before$1 = before;
|
|
4072
|
-
const curry$1 = curry;
|
|
4073
|
-
const curryRight$1 = curryRight;
|
|
4074
|
-
const debounce$1 = debounce;
|
|
4075
|
-
const flow$1 = flow;
|
|
4076
|
-
const flowRight$1 = flowRight;
|
|
4077
|
-
const identity$1 = identity;
|
|
4078
|
-
const memoize$1 = memoize;
|
|
4079
|
-
const negate$1 = negate;
|
|
4080
|
-
const noop$1 = noop;
|
|
4081
|
-
const once$1 = once;
|
|
4082
|
-
const partial$1 = partial;
|
|
4083
|
-
const partialRight$1 = partialRight;
|
|
4084
|
-
const rest$1 = rest;
|
|
4085
|
-
const retry$1 = retry;
|
|
4086
|
-
const spread$1 = spread;
|
|
4087
|
-
const throttle$1 = throttle;
|
|
4088
|
-
const unary$1 = unary;
|
|
4089
|
-
const clamp$1 = clamp;
|
|
4090
|
-
const inRange$1 = inRange;
|
|
4091
|
-
const mean$1 = mean;
|
|
4092
|
-
const meanBy$1 = meanBy;
|
|
4093
|
-
const median$1 = median;
|
|
4094
|
-
const medianBy$1 = medianBy;
|
|
4095
|
-
const random$1 = random;
|
|
4096
|
-
const randomInt$1 = randomInt;
|
|
4097
|
-
const range$1 = range;
|
|
4098
|
-
const rangeRight$1 = rangeRight;
|
|
4099
|
-
const round$1 = round;
|
|
4100
|
-
const sum$1 = sum;
|
|
4101
|
-
const sumBy$1 = sumBy;
|
|
4102
|
-
const clone$1 = clone;
|
|
4103
|
-
const cloneDeep$1 = cloneDeep;
|
|
4104
|
-
const cloneDeepWith$1 = cloneDeepWith;
|
|
4105
|
-
const findKey$1 = findKey;
|
|
4106
|
-
const flattenObject$1 = flattenObject;
|
|
4107
|
-
const invert$1 = invert;
|
|
4108
|
-
const mapKeys$1 = mapKeys;
|
|
4109
|
-
const mapValues$1 = mapValues;
|
|
4110
|
-
const merge$1 = merge;
|
|
4111
|
-
const mergeWith$1 = mergeWith;
|
|
4112
|
-
const omit$1 = omit;
|
|
4113
|
-
const omitBy$1 = omitBy;
|
|
4114
|
-
const pick$1 = pick;
|
|
4115
|
-
const pickBy$1 = pickBy;
|
|
4116
|
-
const toCamelCaseKeys$1 = toCamelCaseKeys;
|
|
4117
|
-
const toMerged$1 = toMerged;
|
|
4118
|
-
const toSnakeCaseKeys$1 = toSnakeCaseKeys;
|
|
4119
|
-
const isArrayBuffer$1 = isArrayBuffer;
|
|
4120
|
-
const isBlob$1 = isBlob;
|
|
4121
|
-
const isBoolean$1 = isBoolean;
|
|
4122
|
-
const isBrowser$1 = isBrowser;
|
|
4123
|
-
const isBuffer$1 = isBuffer;
|
|
4124
|
-
const isDate$1 = isDate;
|
|
4125
|
-
const isEqual$1 = isEqual;
|
|
4126
|
-
const isEqualWith$1 = isEqualWith;
|
|
4127
|
-
const isError$1 = isError;
|
|
4128
|
-
const isFile$1 = isFile;
|
|
4129
|
-
const isFunction$1 = isFunction;
|
|
4130
|
-
const isJSON$1 = isJSON;
|
|
4131
|
-
const isJSONValue$1 = isJSONValue;
|
|
4132
|
-
const isLength$1 = isLength;
|
|
4133
|
-
const isMap$1 = isMap;
|
|
4134
|
-
const isNil$1 = isNil;
|
|
4135
|
-
const isNode$1 = isNode;
|
|
4136
|
-
const isNotNil$1 = isNotNil;
|
|
4137
|
-
const isNull$1 = isNull;
|
|
4138
|
-
const isPlainObject = isPlainObject$1;
|
|
4139
|
-
const isPrimitive$1 = isPrimitive;
|
|
4140
|
-
const isPromise$1 = isPromise;
|
|
4141
|
-
const isRegExp$1 = isRegExp;
|
|
4142
|
-
const isSet$1 = isSet;
|
|
4143
|
-
const isString$1 = isString;
|
|
4144
|
-
const isSymbol$1 = isSymbol;
|
|
4145
|
-
const isTypedArray$1 = isTypedArray;
|
|
4146
|
-
const isUndefined$1 = isUndefined;
|
|
4147
|
-
const isWeakMap$1 = isWeakMap;
|
|
4148
|
-
const isWeakSet$1 = isWeakSet;
|
|
4149
|
-
const delay$1 = delay;
|
|
4150
|
-
const mutex$1 = mutex;
|
|
4151
|
-
const semaphore$1 = semaphore;
|
|
4152
|
-
const timeout$1 = timeout;
|
|
4153
|
-
const withTimeout$1 = withTimeout;
|
|
4154
|
-
const camelCase$1 = camelCase;
|
|
4155
|
-
const capitalize$1 = capitalize;
|
|
4156
|
-
const constantCase$1 = constantCase;
|
|
4157
|
-
const deburr$1 = deburr;
|
|
4158
|
-
const escape = _escape;
|
|
4159
|
-
const escapeRegExp$1 = escapeRegExp;
|
|
4160
|
-
const kebabCase$1 = kebabCase;
|
|
4161
|
-
const lowerCase$1 = lowerCase;
|
|
4162
|
-
const lowerFirst$1 = lowerFirst;
|
|
4163
|
-
const pad$1 = pad;
|
|
4164
|
-
const pascalCase$1 = pascalCase;
|
|
4165
|
-
const reverseString$1 = reverseString;
|
|
4166
|
-
const snakeCase$1 = snakeCase;
|
|
4167
|
-
const startCase$1 = startCase;
|
|
4168
|
-
const trim$1 = trim;
|
|
4169
|
-
const trimEnd$1 = trimEnd;
|
|
4170
|
-
const trimStart$1 = trimStart;
|
|
4171
|
-
const unescape = _unescape;
|
|
4172
|
-
const upperCase$1 = upperCase;
|
|
4173
|
-
const upperFirst$1 = upperFirst;
|
|
4174
|
-
const words$1 = words;
|
|
4175
|
-
const attempt$1 = attempt;
|
|
4176
|
-
const attemptAsync$1 = attemptAsync;
|
|
4177
|
-
const invariant$1 = invariant;
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
exports.at = at$1.at;
|
|
4182
|
-
exports.chunk = chunk$1.chunk;
|
|
4183
|
-
exports.compact = compact$1.compact;
|
|
4184
|
-
exports.countBy = countBy$1.countBy;
|
|
4185
|
-
exports.difference = difference$1.difference;
|
|
4186
|
-
exports.differenceBy = differenceBy$1.differenceBy;
|
|
4187
|
-
exports.differenceWith = differenceWith$1.differenceWith;
|
|
4188
|
-
exports.drop = drop$1.drop;
|
|
4189
|
-
exports.dropRight = dropRight$1.dropRight;
|
|
4190
|
-
exports.dropRightWhile = dropRightWhile$1.dropRightWhile;
|
|
4191
|
-
exports.dropWhile = dropWhile$1.dropWhile;
|
|
4192
|
-
exports.fill = fill$1.fill;
|
|
4193
|
-
exports.flatMap = flatMap$1.flatMap;
|
|
4194
|
-
exports.flatMapDeep = flatMapDeep$1.flatMapDeep;
|
|
4195
|
-
exports.flatten = flatten$1.flatten;
|
|
4196
|
-
exports.flattenDeep = flattenDeep$1.flattenDeep;
|
|
4197
|
-
exports.forEachRight = forEachRight$1.forEachRight;
|
|
4198
|
-
exports.groupBy = groupBy$1.groupBy;
|
|
4199
|
-
exports.head = head$1.head;
|
|
4200
|
-
exports.initial = initial$1.initial;
|
|
4201
|
-
exports.intersection = intersection$1.intersection;
|
|
4202
|
-
exports.intersectionBy = intersectionBy$1.intersectionBy;
|
|
4203
|
-
exports.intersectionWith = intersectionWith$1.intersectionWith;
|
|
4204
|
-
exports.isSubset = isSubset$1.isSubset;
|
|
4205
|
-
exports.isSubsetWith = isSubsetWith$1.isSubsetWith;
|
|
4206
|
-
exports.keyBy = keyBy$1.keyBy;
|
|
4207
|
-
exports.last = last$1.last;
|
|
4208
|
-
exports.maxBy = maxBy$1.maxBy;
|
|
4209
|
-
exports.minBy = minBy$1.minBy;
|
|
4210
|
-
exports.orderBy = orderBy$1.orderBy;
|
|
4211
|
-
exports.partition = partition$1.partition;
|
|
4212
|
-
exports.pull = pull$1.pull;
|
|
4213
|
-
exports.pullAt = pullAt$1.pullAt;
|
|
4214
|
-
exports.remove = remove$1.remove;
|
|
4215
|
-
exports.sample = sample$1.sample;
|
|
4216
|
-
exports.sampleSize = sampleSize$1.sampleSize;
|
|
4217
|
-
exports.shuffle = shuffle$1.shuffle;
|
|
4218
|
-
exports.sortBy = sortBy$1.sortBy;
|
|
4219
|
-
exports.tail = tail$1.tail;
|
|
4220
|
-
exports.take = take$1.take;
|
|
4221
|
-
exports.takeRight = takeRight$1.takeRight;
|
|
4222
|
-
exports.takeRightWhile = takeRightWhile$1.takeRightWhile;
|
|
4223
|
-
exports.takeWhile = takeWhile$1.takeWhile;
|
|
4224
|
-
exports.toFilled = toFilled$1.toFilled;
|
|
4225
|
-
exports.union = union$1.union;
|
|
4226
|
-
exports.unionBy = unionBy$1.unionBy;
|
|
4227
|
-
exports.unionWith = unionWith$1.unionWith;
|
|
4228
|
-
exports.uniq = uniq$1.uniq;
|
|
4229
|
-
exports.uniqBy = uniqBy$1.uniqBy;
|
|
4230
|
-
exports.uniqWith = uniqWith$1.uniqWith;
|
|
4231
|
-
exports.unzip = unzip$1.unzip;
|
|
4232
|
-
exports.unzipWith = unzipWith$1.unzipWith;
|
|
4233
|
-
exports.windowed = windowed$1.windowed;
|
|
4234
|
-
exports.without = without$1.without;
|
|
4235
|
-
exports.xor = xor$1.xor;
|
|
4236
|
-
exports.xorBy = xorBy$1.xorBy;
|
|
4237
|
-
exports.xorWith = xorWith$1.xorWith;
|
|
4238
|
-
exports.zip = zip$1.zip;
|
|
4239
|
-
exports.zipObject = zipObject$1.zipObject;
|
|
4240
|
-
exports.zipWith = zipWith$1.zipWith;
|
|
4241
|
-
exports.AbortError = AbortError$1.AbortError;
|
|
4242
|
-
exports.TimeoutError = TimeoutError$1.TimeoutError;
|
|
4243
|
-
exports.after = after$1.after;
|
|
4244
|
-
exports.ary = ary$1.ary;
|
|
4245
|
-
exports.asyncNoop = asyncNoop$1.asyncNoop;
|
|
4246
|
-
exports.before = before$1.before;
|
|
4247
|
-
exports.curry = curry$1.curry;
|
|
4248
|
-
exports.curryRight = curryRight$1.curryRight;
|
|
4249
|
-
exports.debounce = debounce$1.debounce;
|
|
4250
|
-
exports.flow = flow$1.flow;
|
|
4251
|
-
exports.flowRight = flowRight$1.flowRight;
|
|
4252
|
-
exports.identity = identity$1.identity;
|
|
4253
|
-
exports.memoize = memoize$1.memoize;
|
|
4254
|
-
exports.negate = negate$1.negate;
|
|
4255
|
-
exports.noop = noop$1.noop;
|
|
4256
|
-
exports.once = once$1.once;
|
|
4257
|
-
exports.partial = partial$1.partial;
|
|
4258
|
-
exports.partialRight = partialRight$1.partialRight;
|
|
4259
|
-
exports.rest = rest$1.rest;
|
|
4260
|
-
exports.retry = retry$1.retry;
|
|
4261
|
-
exports.spread = spread$1.spread;
|
|
4262
|
-
exports.throttle = throttle$1.throttle;
|
|
4263
|
-
exports.unary = unary$1.unary;
|
|
4264
|
-
exports.clamp = clamp$1.clamp;
|
|
4265
|
-
exports.inRange = inRange$1.inRange;
|
|
4266
|
-
exports.mean = mean$1.mean;
|
|
4267
|
-
exports.meanBy = meanBy$1.meanBy;
|
|
4268
|
-
exports.median = median$1.median;
|
|
4269
|
-
exports.medianBy = medianBy$1.medianBy;
|
|
4270
|
-
exports.random = random$1.random;
|
|
4271
|
-
exports.randomInt = randomInt$1.randomInt;
|
|
4272
|
-
exports.range = range$1.range;
|
|
4273
|
-
exports.rangeRight = rangeRight$1.rangeRight;
|
|
4274
|
-
exports.round = round$1.round;
|
|
4275
|
-
exports.sum = sum$1.sum;
|
|
4276
|
-
exports.sumBy = sumBy$1.sumBy;
|
|
4277
|
-
exports.clone = clone$1.clone;
|
|
4278
|
-
exports.cloneDeep = cloneDeep$1.cloneDeep;
|
|
4279
|
-
exports.cloneDeepWith = cloneDeepWith$1.cloneDeepWith;
|
|
4280
|
-
exports.findKey = findKey$1.findKey;
|
|
4281
|
-
exports.flattenObject = flattenObject$1.flattenObject;
|
|
4282
|
-
exports.invert = invert$1.invert;
|
|
4283
|
-
exports.mapKeys = mapKeys$1.mapKeys;
|
|
4284
|
-
exports.mapValues = mapValues$1.mapValues;
|
|
4285
|
-
exports.merge = merge$1.merge;
|
|
4286
|
-
exports.mergeWith = mergeWith$1.mergeWith;
|
|
4287
|
-
exports.omit = omit$1.omit;
|
|
4288
|
-
exports.omitBy = omitBy$1.omitBy;
|
|
4289
|
-
exports.pick = pick$1.pick;
|
|
4290
|
-
exports.pickBy = pickBy$1.pickBy;
|
|
4291
|
-
exports.toCamelCaseKeys = toCamelCaseKeys$1.toCamelCaseKeys;
|
|
4292
|
-
exports.toMerged = toMerged$1.toMerged;
|
|
4293
|
-
exports.toSnakeCaseKeys = toSnakeCaseKeys$1.toSnakeCaseKeys;
|
|
4294
|
-
exports.isArrayBuffer = isArrayBuffer$1.isArrayBuffer;
|
|
4295
|
-
exports.isBlob = isBlob$1.isBlob;
|
|
4296
|
-
exports.isBoolean = isBoolean$1.isBoolean;
|
|
4297
|
-
exports.isBrowser = isBrowser$1.isBrowser;
|
|
4298
|
-
exports.isBuffer = isBuffer$1.isBuffer;
|
|
4299
|
-
exports.isDate = isDate$1.isDate;
|
|
4300
|
-
exports.isEqual = isEqual$1.isEqual;
|
|
4301
|
-
exports.isEqualWith = isEqualWith$1.isEqualWith;
|
|
4302
|
-
exports.isError = isError$1.isError;
|
|
4303
|
-
exports.isFile = isFile$1.isFile;
|
|
4304
|
-
exports.isFunction = isFunction$1.isFunction;
|
|
4305
|
-
exports.isJSON = isJSON$1.isJSON;
|
|
4306
|
-
exports.isJSONArray = isJSONValue$1.isJSONArray;
|
|
4307
|
-
exports.isJSONObject = isJSONValue$1.isJSONObject;
|
|
4308
|
-
exports.isJSONValue = isJSONValue$1.isJSONValue;
|
|
4309
|
-
exports.isLength = isLength$1.isLength;
|
|
4310
|
-
exports.isMap = isMap$1.isMap;
|
|
4311
|
-
exports.isNil = isNil$1.isNil;
|
|
4312
|
-
exports.isNode = isNode$1.isNode;
|
|
4313
|
-
exports.isNotNil = isNotNil$1.isNotNil;
|
|
4314
|
-
exports.isNull = isNull$1.isNull;
|
|
4315
|
-
exports.isPlainObject = isPlainObject.isPlainObject;
|
|
4316
|
-
exports.isPrimitive = isPrimitive$1.isPrimitive;
|
|
4317
|
-
exports.isPromise = isPromise$1.isPromise;
|
|
4318
|
-
exports.isRegExp = isRegExp$1.isRegExp;
|
|
4319
|
-
exports.isSet = isSet$1.isSet;
|
|
4320
|
-
exports.isString = isString$1.isString;
|
|
4321
|
-
exports.isSymbol = isSymbol$1.isSymbol;
|
|
4322
|
-
exports.isTypedArray = isTypedArray$1.isTypedArray;
|
|
4323
|
-
exports.isUndefined = isUndefined$1.isUndefined;
|
|
4324
|
-
exports.isWeakMap = isWeakMap$1.isWeakMap;
|
|
4325
|
-
exports.isWeakSet = isWeakSet$1.isWeakSet;
|
|
4326
|
-
exports.delay = delay$1.delay;
|
|
4327
|
-
exports.Mutex = mutex$1.Mutex;
|
|
4328
|
-
exports.Semaphore = semaphore$1.Semaphore;
|
|
4329
|
-
exports.timeout = timeout$1.timeout;
|
|
4330
|
-
exports.withTimeout = withTimeout$1.withTimeout;
|
|
4331
|
-
exports.camelCase = camelCase$1.camelCase;
|
|
4332
|
-
exports.capitalize = capitalize$1.capitalize;
|
|
4333
|
-
exports.constantCase = constantCase$1.constantCase;
|
|
4334
|
-
exports.deburr = deburr$1.deburr;
|
|
4335
|
-
exports.escape = escape.escape;
|
|
4336
|
-
exports.escapeRegExp = escapeRegExp$1.escapeRegExp;
|
|
4337
|
-
exports.kebabCase = kebabCase$1.kebabCase;
|
|
4338
|
-
exports.lowerCase = lowerCase$1.lowerCase;
|
|
4339
|
-
exports.lowerFirst = lowerFirst$1.lowerFirst;
|
|
4340
|
-
exports.pad = pad$1.pad;
|
|
4341
|
-
exports.pascalCase = pascalCase$1.pascalCase;
|
|
4342
|
-
exports.reverseString = reverseString$1.reverseString;
|
|
4343
|
-
exports.snakeCase = snakeCase$1.snakeCase;
|
|
4344
|
-
exports.startCase = startCase$1.startCase;
|
|
4345
|
-
exports.trim = trim$1.trim;
|
|
4346
|
-
exports.trimEnd = trimEnd$1.trimEnd;
|
|
4347
|
-
exports.trimStart = trimStart$1.trimStart;
|
|
4348
|
-
exports.unescape = unescape.unescape;
|
|
4349
|
-
exports.upperCase = upperCase$1.upperCase;
|
|
4350
|
-
exports.upperFirst = upperFirst$1.upperFirst;
|
|
4351
|
-
exports.words = words$1.words;
|
|
4352
|
-
exports.attempt = attempt$1.attempt;
|
|
4353
|
-
exports.attemptAsync = attemptAsync$1.attemptAsync;
|
|
4354
|
-
exports.assert = invariant$1.invariant;
|
|
4355
|
-
exports.invariant = invariant$1.invariant;
|
|
4356
|
-
} (dist));
|
|
4357
|
-
|
|
4358
|
-
var useCallbackRef$2 = {};
|
|
4359
|
-
|
|
4360
|
-
var useCallbackRef$1 = {};
|
|
1
|
+
import { useRef, useEffect, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
4
|
+
let pendingThis = undefined;
|
|
5
|
+
let pendingArgs = null;
|
|
6
|
+
const leading = edges != null && edges.includes('leading');
|
|
7
|
+
const trailing = edges == null || edges.includes('trailing');
|
|
8
|
+
const invoke = () => {
|
|
9
|
+
if (pendingArgs !== null) {
|
|
10
|
+
func.apply(pendingThis, pendingArgs);
|
|
11
|
+
pendingThis = undefined;
|
|
12
|
+
pendingArgs = null;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const onTimerEnd = () => {
|
|
16
|
+
if (trailing) {
|
|
17
|
+
invoke();
|
|
18
|
+
}
|
|
19
|
+
cancel();
|
|
20
|
+
};
|
|
21
|
+
let timeoutId = null;
|
|
22
|
+
const schedule = () => {
|
|
23
|
+
if (timeoutId != null) {
|
|
24
|
+
clearTimeout(timeoutId);
|
|
25
|
+
}
|
|
26
|
+
timeoutId = setTimeout(() => {
|
|
27
|
+
timeoutId = null;
|
|
28
|
+
onTimerEnd();
|
|
29
|
+
}, debounceMs);
|
|
30
|
+
};
|
|
31
|
+
const cancelTimer = () => {
|
|
32
|
+
if (timeoutId !== null) {
|
|
33
|
+
clearTimeout(timeoutId);
|
|
34
|
+
timeoutId = null;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const cancel = () => {
|
|
38
|
+
cancelTimer();
|
|
39
|
+
pendingThis = undefined;
|
|
40
|
+
pendingArgs = null;
|
|
41
|
+
};
|
|
42
|
+
const flush = () => {
|
|
43
|
+
cancelTimer();
|
|
44
|
+
invoke();
|
|
45
|
+
};
|
|
46
|
+
const debounced = function (...args) {
|
|
47
|
+
if (signal?.aborted) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
pendingThis = this;
|
|
51
|
+
pendingArgs = args;
|
|
52
|
+
const isFirstCall = timeoutId == null;
|
|
53
|
+
schedule();
|
|
54
|
+
if (leading && isFirstCall) {
|
|
55
|
+
invoke();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
debounced.schedule = schedule;
|
|
59
|
+
debounced.cancel = cancel;
|
|
60
|
+
debounced.flush = flush;
|
|
61
|
+
signal?.addEventListener('abort', cancel, { once: true });
|
|
62
|
+
return debounced;
|
|
63
|
+
}
|
|
4361
64
|
|
|
4362
|
-
Object.defineProperty(useCallbackRef$1, "__esModule", { value: true });
|
|
4363
|
-
useCallbackRef$1.useCallbackRef = useCallbackRef;
|
|
4364
|
-
const react_1$1 = React__default;
|
|
4365
65
|
/**
|
|
4366
66
|
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
4367
67
|
* prop or avoid re-executing effects when passed as a dependency
|
|
4368
68
|
*/
|
|
4369
69
|
function useCallbackRef(callback) {
|
|
4370
|
-
const callbackRef =
|
|
4371
|
-
|
|
70
|
+
const callbackRef = useRef(callback);
|
|
71
|
+
useEffect(() => {
|
|
4372
72
|
callbackRef.current = callback;
|
|
4373
73
|
});
|
|
4374
|
-
return
|
|
74
|
+
return useMemo(() => ((...args) => { var _a; return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args); }), []);
|
|
4375
75
|
}
|
|
4376
76
|
|
|
4377
|
-
(function (exports) {
|
|
4378
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4379
|
-
exports.useCallbackRef = void 0;
|
|
4380
|
-
var useCallbackRef_1 = useCallbackRef$1;
|
|
4381
|
-
Object.defineProperty(exports, "useCallbackRef", { enumerable: true, get: function () { return useCallbackRef_1.useCallbackRef; } });
|
|
4382
|
-
} (useCallbackRef$2));
|
|
4383
|
-
|
|
4384
|
-
Object.defineProperty(useDebounce$1, "__esModule", { value: true });
|
|
4385
|
-
var useDebounce_2 = useDebounce$1.useDebounce = useDebounce;
|
|
4386
|
-
const react_1 = React__default;
|
|
4387
|
-
const es_toolkit_1 = dist;
|
|
4388
|
-
const useCallbackRef_1 = useCallbackRef$2;
|
|
4389
77
|
/**
|
|
4390
78
|
* A hook to easily manage debounced functions, including their cleanup.
|
|
4391
79
|
* @param func The function to debounce.
|
|
@@ -4394,20 +82,20 @@ const useCallbackRef_1 = useCallbackRef$2;
|
|
|
4394
82
|
* @returns The debounced function.
|
|
4395
83
|
*/
|
|
4396
84
|
function useDebounce(func, wait, options) {
|
|
4397
|
-
const funcRef =
|
|
85
|
+
const funcRef = useCallbackRef(func);
|
|
4398
86
|
// Note: do not add additional dependencies! There is currently no use case where we would change
|
|
4399
87
|
// the wait delay or options between renders. By not tracking as dependencies, this allows
|
|
4400
88
|
// consumers of useDebounce to provide a raw object for options rather than forcing them to
|
|
4401
89
|
// memoize that param. Same with the func they provide, we're using a ref to keep that up
|
|
4402
90
|
// to date and to avoid forcing the consumer to memoize it.
|
|
4403
|
-
const debounced =
|
|
4404
|
-
return
|
|
91
|
+
const debounced = useMemo(() => {
|
|
92
|
+
return debounce((...args) => funcRef(...args), wait, options);
|
|
4405
93
|
}, [funcRef]);
|
|
4406
|
-
|
|
94
|
+
useEffect(() => {
|
|
4407
95
|
// If the debounced function is recreated (or unmounted), cancel the last call.
|
|
4408
96
|
return () => debounced.cancel();
|
|
4409
97
|
}, [debounced]);
|
|
4410
98
|
return debounced;
|
|
4411
99
|
}
|
|
4412
100
|
|
|
4413
|
-
export {
|
|
101
|
+
export { useDebounce as u };
|