@ztimson/utils 0.23.23 → 0.24.1
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/cache.d.ts +0 -9
- package/dist/index.cjs +290 -271
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +196 -177
- package/dist/index.mjs.map +1 -1
- package/dist/jwt.d.ts +1 -1
- package/dist/misc.d.ts +7 -0
- package/dist/search.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.utils = {}));
|
|
3
|
-
})(this, function(
|
|
3
|
+
})(this, function(exports2) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
|
-
var __defNormalProp = (obj, key,
|
|
6
|
-
var __publicField = (obj, key,
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
7
|
|
|
8
8
|
class ArgParser {
|
|
9
9
|
/**
|
|
@@ -53,7 +53,7 @@ var __publicField = (obj, key, value2) => __defNormalProp(obj, typeof key !== "s
|
|
|
53
53
|
let arg = queue.splice(0, 1)[0];
|
|
54
54
|
if (arg[0] == "-") {
|
|
55
55
|
if (arg[1] != "-" && arg.length > 2) {
|
|
56
|
-
queue = [...arg.substring(2).split("").map((
|
|
56
|
+
queue = [...arg.substring(2).split("").map((a) => `-${a}`), ...queue];
|
|
57
57
|
arg = `-${arg[1]}`;
|
|
58
58
|
}
|
|
59
59
|
const combined = arg.split("=");
|
|
@@ -65,9 +65,9 @@ var __publicField = (obj, key, value2) => __defNormalProp(obj, typeof key !== "s
|
|
|
65
65
|
extras.push(arg);
|
|
66
66
|
continue;
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
parsed[argDef.name] =
|
|
68
|
+
const value = argDef.default === false ? true : argDef.default === true ? false : queue.splice(queue.findIndex((q) => q[0] != "-"), 1)[0] || argDef.default;
|
|
69
|
+
if (value == null) parsed["_error"].push(`Option missing value: ${argDef.name || combined[0]}`);
|
|
70
|
+
parsed[argDef.name] = value;
|
|
71
71
|
} else {
|
|
72
72
|
const c = this.commands.find((command) => command.name == arg);
|
|
73
73
|
if (!!c) {
|
|
@@ -126,17 +126,17 @@ ${opts.message || this.desc}`;
|
|
|
126
126
|
if (Array.isArray(obj)) {
|
|
127
127
|
obj = obj.filter((o) => o != null);
|
|
128
128
|
} else {
|
|
129
|
-
Object.entries(obj).forEach(([key,
|
|
130
|
-
if (undefinedOnly &&
|
|
129
|
+
Object.entries(obj).forEach(([key, value]) => {
|
|
130
|
+
if (undefinedOnly && value === void 0 || !undefinedOnly && value == null) delete obj[key];
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
return obj;
|
|
134
134
|
}
|
|
135
|
-
function deepCopy(
|
|
135
|
+
function deepCopy(value) {
|
|
136
136
|
try {
|
|
137
|
-
return structuredClone(
|
|
137
|
+
return structuredClone(value);
|
|
138
138
|
} catch {
|
|
139
|
-
return JSON.parse(JSONSanitize(
|
|
139
|
+
return JSON.parse(JSONSanitize(value));
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
function deepMerge(target, ...sources) {
|
|
@@ -152,22 +152,22 @@ ${opts.message || this.desc}`;
|
|
|
152
152
|
});
|
|
153
153
|
return target;
|
|
154
154
|
}
|
|
155
|
-
function dotNotation(obj,
|
|
156
|
-
if (obj == null || !
|
|
157
|
-
return
|
|
158
|
-
if (
|
|
159
|
-
if (!(obj2 == null ? void 0 : obj2.hasOwnProperty(
|
|
155
|
+
function dotNotation(obj, prop, set) {
|
|
156
|
+
if (obj == null || !prop) return void 0;
|
|
157
|
+
return prop.split(/[.[\]]/g).filter((prop2) => prop2.length).reduce((obj2, prop2, i, arr) => {
|
|
158
|
+
if (prop2[0] == '"' || prop2[0] == "'") prop2 = prop2.slice(1, -1);
|
|
159
|
+
if (!(obj2 == null ? void 0 : obj2.hasOwnProperty(prop2))) {
|
|
160
160
|
if (set == void 0) return void 0;
|
|
161
|
-
obj2[
|
|
161
|
+
obj2[prop2] = {};
|
|
162
162
|
}
|
|
163
163
|
if (set !== void 0 && i == arr.length - 1)
|
|
164
|
-
return obj2[
|
|
165
|
-
return obj2[
|
|
164
|
+
return obj2[prop2] = set;
|
|
165
|
+
return obj2[prop2];
|
|
166
166
|
}, obj);
|
|
167
167
|
}
|
|
168
168
|
function encodeQuery(data) {
|
|
169
169
|
return Object.entries(data).map(
|
|
170
|
-
([key,
|
|
170
|
+
([key, value]) => encodeURIComponent(key) + "=" + encodeURIComponent(value)
|
|
171
171
|
).join("&");
|
|
172
172
|
}
|
|
173
173
|
function flattenObj(obj, parent, result = {}) {
|
|
@@ -186,7 +186,7 @@ ${opts.message || this.desc}`;
|
|
|
186
186
|
}
|
|
187
187
|
function formData(target) {
|
|
188
188
|
const data = new FormData();
|
|
189
|
-
Object.entries(target).forEach(([key,
|
|
189
|
+
Object.entries(target).forEach(([key, value]) => data.append(key, value));
|
|
190
190
|
return data;
|
|
191
191
|
}
|
|
192
192
|
function includes(target, values, allowMissing = false) {
|
|
@@ -200,13 +200,13 @@ ${opts.message || this.desc}`;
|
|
|
200
200
|
if (type == "function") return target.toString() == values.toString();
|
|
201
201
|
return target == values;
|
|
202
202
|
}
|
|
203
|
-
function isEqual(
|
|
204
|
-
const ta = typeof
|
|
205
|
-
if (ta != "object" ||
|
|
206
|
-
return ta == "function" && tb == "function" ?
|
|
207
|
-
const keys = Object.keys(
|
|
208
|
-
if (keys.length != Object.keys(
|
|
209
|
-
return Object.keys(
|
|
203
|
+
function isEqual(a, b) {
|
|
204
|
+
const ta = typeof a, tb = typeof b;
|
|
205
|
+
if (ta != "object" || a == null || (tb != "object" || b == null))
|
|
206
|
+
return ta == "function" && tb == "function" ? a.toString() == b.toString() : a === b;
|
|
207
|
+
const keys = Object.keys(a);
|
|
208
|
+
if (keys.length != Object.keys(b).length) return false;
|
|
209
|
+
return Object.keys(a).every((key) => isEqual(a[key], b[key]));
|
|
210
210
|
}
|
|
211
211
|
function mixin(target, constructors) {
|
|
212
212
|
constructors.forEach((c) => {
|
|
@@ -231,39 +231,39 @@ ${opts.message || this.desc}`;
|
|
|
231
231
|
return obj;
|
|
232
232
|
}
|
|
233
233
|
function JSONSanitize(obj, space) {
|
|
234
|
-
return JSON.stringify(obj, (key,
|
|
235
|
-
return
|
|
234
|
+
return JSON.stringify(obj, (key, value) => {
|
|
235
|
+
return value;
|
|
236
236
|
}, space);
|
|
237
237
|
}
|
|
238
238
|
function addUnique(array, el) {
|
|
239
239
|
if (array.indexOf(el) === -1) array.push(el);
|
|
240
240
|
return array;
|
|
241
241
|
}
|
|
242
|
-
function arrayDiff(
|
|
242
|
+
function arrayDiff(a, b) {
|
|
243
243
|
return makeUnique([
|
|
244
|
-
...
|
|
245
|
-
...
|
|
244
|
+
...a.filter((v1) => !b.includes((v2) => isEqual(v1, v2))),
|
|
245
|
+
...b.filter((v1) => !a.includes((v2) => isEqual(v1, v2)))
|
|
246
246
|
]);
|
|
247
247
|
}
|
|
248
|
-
function caseInsensitiveSort(
|
|
249
|
-
return function(
|
|
250
|
-
const aVal = dotNotation(
|
|
251
|
-
const bVal = dotNotation(
|
|
248
|
+
function caseInsensitiveSort(prop) {
|
|
249
|
+
return function(a, b) {
|
|
250
|
+
const aVal = dotNotation(a, prop);
|
|
251
|
+
const bVal = dotNotation(b, prop);
|
|
252
252
|
if (typeof aVal !== "string" || typeof bVal !== "string") return 1;
|
|
253
253
|
return aVal.toLowerCase().localeCompare(bVal.toLowerCase());
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
|
-
function findByProp(
|
|
257
|
-
return (
|
|
256
|
+
function findByProp(prop, value) {
|
|
257
|
+
return (v) => isEqual(dotNotation(v, prop), value);
|
|
258
258
|
}
|
|
259
259
|
function flattenArr(arr, result = []) {
|
|
260
260
|
arr.forEach((el) => Array.isArray(el) ? flattenArr(el, result) : result.push(el));
|
|
261
261
|
return result;
|
|
262
262
|
}
|
|
263
|
-
function sortByProp(
|
|
264
|
-
return function(
|
|
265
|
-
const aVal = dotNotation(
|
|
266
|
-
const bVal = dotNotation(
|
|
263
|
+
function sortByProp(prop, reverse = false) {
|
|
264
|
+
return function(a, b) {
|
|
265
|
+
const aVal = dotNotation(a, prop);
|
|
266
|
+
const bVal = dotNotation(b, prop);
|
|
267
267
|
if (typeof aVal == "number" && typeof bVal == "number")
|
|
268
268
|
return (reverse ? -1 : 1) * (aVal - bVal);
|
|
269
269
|
if (aVal > bVal) return reverse ? -1 : 1;
|
|
@@ -277,8 +277,8 @@ ${opts.message || this.desc}`;
|
|
|
277
277
|
}
|
|
278
278
|
return arr;
|
|
279
279
|
}
|
|
280
|
-
function makeArray(
|
|
281
|
-
return Array.isArray(
|
|
280
|
+
function makeArray(value) {
|
|
281
|
+
return Array.isArray(value) ? value : [value];
|
|
282
282
|
}
|
|
283
283
|
class ASet extends Array {
|
|
284
284
|
/** Number of elements in set */
|
|
@@ -391,7 +391,6 @@ ${opts.message || this.desc}`;
|
|
|
391
391
|
class Cache {
|
|
392
392
|
/**
|
|
393
393
|
* Create new cache
|
|
394
|
-
*
|
|
395
394
|
* @param {keyof T} key Default property to use as primary key
|
|
396
395
|
* @param options
|
|
397
396
|
*/
|
|
@@ -401,7 +400,6 @@ ${opts.message || this.desc}`;
|
|
|
401
400
|
__publicField(this, "complete", false);
|
|
402
401
|
/**
|
|
403
402
|
* Get all cached items
|
|
404
|
-
*
|
|
405
403
|
* @return {T[]} Array of items
|
|
406
404
|
*/
|
|
407
405
|
__publicField(this, "values", this.all());
|
|
@@ -419,24 +417,23 @@ ${opts.message || this.desc}`;
|
|
|
419
417
|
}
|
|
420
418
|
}
|
|
421
419
|
return new Proxy(this, {
|
|
422
|
-
get: (target,
|
|
423
|
-
if (
|
|
424
|
-
return deepCopy(target.store[
|
|
420
|
+
get: (target, prop) => {
|
|
421
|
+
if (prop in target) return target[prop];
|
|
422
|
+
return deepCopy(target.store[prop]);
|
|
425
423
|
},
|
|
426
|
-
set: (target,
|
|
427
|
-
if (
|
|
428
|
-
else this.set(
|
|
424
|
+
set: (target, prop, value) => {
|
|
425
|
+
if (prop in target) target[prop] = value;
|
|
426
|
+
else this.set(prop, value);
|
|
429
427
|
return true;
|
|
430
428
|
}
|
|
431
429
|
});
|
|
432
430
|
}
|
|
433
|
-
getKey(
|
|
431
|
+
getKey(value) {
|
|
434
432
|
if (!this.key) throw new Error("No key defined");
|
|
435
|
-
return
|
|
433
|
+
return value[this.key];
|
|
436
434
|
}
|
|
437
435
|
/**
|
|
438
436
|
* Get all cached items
|
|
439
|
-
*
|
|
440
437
|
* @return {T[]} Array of items
|
|
441
438
|
*/
|
|
442
439
|
all() {
|
|
@@ -444,25 +441,24 @@ ${opts.message || this.desc}`;
|
|
|
444
441
|
}
|
|
445
442
|
/**
|
|
446
443
|
* Add a new item to the cache. Like set, but finds key automatically
|
|
447
|
-
*
|
|
448
444
|
* @param {T} value Item to add to cache
|
|
449
445
|
* @param {number | undefined} ttl Override default expiry
|
|
450
446
|
* @return {this}
|
|
451
447
|
*/
|
|
452
|
-
add(
|
|
453
|
-
const key = this.getKey(
|
|
454
|
-
this.set(key,
|
|
448
|
+
add(value, ttl = this.ttl) {
|
|
449
|
+
const key = this.getKey(value);
|
|
450
|
+
this.set(key, value, ttl);
|
|
455
451
|
return this;
|
|
456
452
|
}
|
|
457
453
|
/**
|
|
458
454
|
* Add several rows to the cache
|
|
459
|
-
*
|
|
460
455
|
* @param {T[]} rows Several items that will be cached using the default key
|
|
461
456
|
* @param complete Mark cache as complete & reliable, defaults to true
|
|
462
457
|
* @return {this}
|
|
463
458
|
*/
|
|
464
|
-
addAll(
|
|
465
|
-
|
|
459
|
+
addAll(rows, complete = true) {
|
|
460
|
+
this.clear();
|
|
461
|
+
rows.forEach((r) => this.add(r));
|
|
466
462
|
this.complete = complete;
|
|
467
463
|
return this;
|
|
468
464
|
}
|
|
@@ -474,7 +470,6 @@ ${opts.message || this.desc}`;
|
|
|
474
470
|
}
|
|
475
471
|
/**
|
|
476
472
|
* Delete an item from the cache
|
|
477
|
-
*
|
|
478
473
|
* @param {K} key Item's primary key
|
|
479
474
|
*/
|
|
480
475
|
delete(key) {
|
|
@@ -499,7 +494,6 @@ ${opts.message || this.desc}`;
|
|
|
499
494
|
}
|
|
500
495
|
/**
|
|
501
496
|
* Get a list of cached keys
|
|
502
|
-
*
|
|
503
497
|
* @return {K[]} Array of keys
|
|
504
498
|
*/
|
|
505
499
|
keys() {
|
|
@@ -507,7 +501,6 @@ ${opts.message || this.desc}`;
|
|
|
507
501
|
}
|
|
508
502
|
/**
|
|
509
503
|
* Get map of cached items
|
|
510
|
-
*
|
|
511
504
|
* @return {Record<K, T>}
|
|
512
505
|
*/
|
|
513
506
|
map() {
|
|
@@ -515,14 +508,13 @@ ${opts.message || this.desc}`;
|
|
|
515
508
|
}
|
|
516
509
|
/**
|
|
517
510
|
* Add an item to the cache manually specifying the key
|
|
518
|
-
*
|
|
519
511
|
* @param {K} key Key item will be cached under
|
|
520
512
|
* @param {T} value Item to cache
|
|
521
513
|
* @param {number | undefined} ttl Override default expiry in seconds
|
|
522
514
|
* @return {this}
|
|
523
515
|
*/
|
|
524
|
-
set(key,
|
|
525
|
-
this.store[key] =
|
|
516
|
+
set(key, value, ttl = this.options.ttl) {
|
|
517
|
+
this.store[key] = value;
|
|
526
518
|
if (this.options.storageKey && this.options.storage)
|
|
527
519
|
this.options.storage.setItem(this.options.storageKey, JSON.stringify(this.store));
|
|
528
520
|
if (ttl) setTimeout(() => {
|
|
@@ -535,8 +527,8 @@ ${opts.message || this.desc}`;
|
|
|
535
527
|
function blackOrWhite(background) {
|
|
536
528
|
const exploded = background == null ? void 0 : background.match(background.length >= 6 ? /\w\w/g : /\w/g);
|
|
537
529
|
if (!exploded) return "black";
|
|
538
|
-
const [
|
|
539
|
-
const luminance = (0.299 *
|
|
530
|
+
const [r, g, b] = exploded.map((hex) => parseInt(hex, 16));
|
|
531
|
+
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
540
532
|
return luminance > 0.5 ? "black" : "white";
|
|
541
533
|
}
|
|
542
534
|
const LETTER_LIST = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
@@ -613,16 +605,16 @@ ${opts.message || this.desc}`;
|
|
|
613
605
|
const after = str.slice(start + deleteCount);
|
|
614
606
|
return before + insert + after;
|
|
615
607
|
}
|
|
616
|
-
function matchAll(
|
|
617
|
-
if (typeof
|
|
618
|
-
|
|
608
|
+
function matchAll(value, regex) {
|
|
609
|
+
if (typeof regex === "string") {
|
|
610
|
+
regex = new RegExp(regex, "g");
|
|
619
611
|
}
|
|
620
|
-
if (!
|
|
612
|
+
if (!regex.global) {
|
|
621
613
|
throw new TypeError("Regular expression must be global.");
|
|
622
614
|
}
|
|
623
615
|
let ret = [];
|
|
624
616
|
let match;
|
|
625
|
-
while ((match =
|
|
617
|
+
while ((match = regex.exec(value)) !== null) {
|
|
626
618
|
ret.push(match);
|
|
627
619
|
}
|
|
628
620
|
return ret;
|
|
@@ -650,11 +642,11 @@ ${opts.message || this.desc}`;
|
|
|
650
642
|
return groups;
|
|
651
643
|
}
|
|
652
644
|
function md5(d) {
|
|
653
|
-
var
|
|
654
|
-
return
|
|
645
|
+
var r = M(V(Y(X(d), 8 * d.length)));
|
|
646
|
+
return r.toLowerCase();
|
|
655
647
|
}
|
|
656
648
|
function M(d) {
|
|
657
|
-
for (var _, m = "0123456789ABCDEF", f = "",
|
|
649
|
+
for (var _, m = "0123456789ABCDEF", f = "", r = 0; r < d.length; r++) _ = d.charCodeAt(r), f += m.charAt(_ >>> 4 & 15) + m.charAt(15 & _);
|
|
658
650
|
return f;
|
|
659
651
|
}
|
|
660
652
|
function X(d) {
|
|
@@ -668,26 +660,26 @@ ${opts.message || this.desc}`;
|
|
|
668
660
|
}
|
|
669
661
|
function Y(d, _) {
|
|
670
662
|
d[_ >> 5] |= 128 << _ % 32, d[14 + (_ + 64 >>> 9 << 4)] = _;
|
|
671
|
-
for (var m = 1732584193, f = -271733879,
|
|
672
|
-
var h = m, t = f, g =
|
|
673
|
-
f = md5_ii(f = md5_ii(f = md5_ii(f = md5_ii(f = md5_hh(f = md5_hh(f = md5_hh(f = md5_hh(f = md5_gg(f = md5_gg(f = md5_gg(f = md5_gg(f = md5_ff(f = md5_ff(f = md5_ff(f = md5_ff(f,
|
|
663
|
+
for (var m = 1732584193, f = -271733879, r = -1732584194, i = 271733878, n = 0; n < d.length; n += 16) {
|
|
664
|
+
var h = m, t = f, g = r, e = i;
|
|
665
|
+
f = md5_ii(f = md5_ii(f = md5_ii(f = md5_ii(f = md5_hh(f = md5_hh(f = md5_hh(f = md5_hh(f = md5_gg(f = md5_gg(f = md5_gg(f = md5_gg(f = md5_ff(f = md5_ff(f = md5_ff(f = md5_ff(f, r = md5_ff(r, i = md5_ff(i, m = md5_ff(m, f, r, i, d[n + 0], 7, -680876936), f, r, d[n + 1], 12, -389564586), m, f, d[n + 2], 17, 606105819), i, m, d[n + 3], 22, -1044525330), r = md5_ff(r, i = md5_ff(i, m = md5_ff(m, f, r, i, d[n + 4], 7, -176418897), f, r, d[n + 5], 12, 1200080426), m, f, d[n + 6], 17, -1473231341), i, m, d[n + 7], 22, -45705983), r = md5_ff(r, i = md5_ff(i, m = md5_ff(m, f, r, i, d[n + 8], 7, 1770035416), f, r, d[n + 9], 12, -1958414417), m, f, d[n + 10], 17, -42063), i, m, d[n + 11], 22, -1990404162), r = md5_ff(r, i = md5_ff(i, m = md5_ff(m, f, r, i, d[n + 12], 7, 1804603682), f, r, d[n + 13], 12, -40341101), m, f, d[n + 14], 17, -1502002290), i, m, d[n + 15], 22, 1236535329), r = md5_gg(r, i = md5_gg(i, m = md5_gg(m, f, r, i, d[n + 1], 5, -165796510), f, r, d[n + 6], 9, -1069501632), m, f, d[n + 11], 14, 643717713), i, m, d[n + 0], 20, -373897302), r = md5_gg(r, i = md5_gg(i, m = md5_gg(m, f, r, i, d[n + 5], 5, -701558691), f, r, d[n + 10], 9, 38016083), m, f, d[n + 15], 14, -660478335), i, m, d[n + 4], 20, -405537848), r = md5_gg(r, i = md5_gg(i, m = md5_gg(m, f, r, i, d[n + 9], 5, 568446438), f, r, d[n + 14], 9, -1019803690), m, f, d[n + 3], 14, -187363961), i, m, d[n + 8], 20, 1163531501), r = md5_gg(r, i = md5_gg(i, m = md5_gg(m, f, r, i, d[n + 13], 5, -1444681467), f, r, d[n + 2], 9, -51403784), m, f, d[n + 7], 14, 1735328473), i, m, d[n + 12], 20, -1926607734), r = md5_hh(r, i = md5_hh(i, m = md5_hh(m, f, r, i, d[n + 5], 4, -378558), f, r, d[n + 8], 11, -2022574463), m, f, d[n + 11], 16, 1839030562), i, m, d[n + 14], 23, -35309556), r = md5_hh(r, i = md5_hh(i, m = md5_hh(m, f, r, i, d[n + 1], 4, -1530992060), f, r, d[n + 4], 11, 1272893353), m, f, d[n + 7], 16, -155497632), i, m, d[n + 10], 23, -1094730640), r = md5_hh(r, i = md5_hh(i, m = md5_hh(m, f, r, i, d[n + 13], 4, 681279174), f, r, d[n + 0], 11, -358537222), m, f, d[n + 3], 16, -722521979), i, m, d[n + 6], 23, 76029189), r = md5_hh(r, i = md5_hh(i, m = md5_hh(m, f, r, i, d[n + 9], 4, -640364487), f, r, d[n + 12], 11, -421815835), m, f, d[n + 15], 16, 530742520), i, m, d[n + 2], 23, -995338651), r = md5_ii(r, i = md5_ii(i, m = md5_ii(m, f, r, i, d[n + 0], 6, -198630844), f, r, d[n + 7], 10, 1126891415), m, f, d[n + 14], 15, -1416354905), i, m, d[n + 5], 21, -57434055), r = md5_ii(r, i = md5_ii(i, m = md5_ii(m, f, r, i, d[n + 12], 6, 1700485571), f, r, d[n + 3], 10, -1894986606), m, f, d[n + 10], 15, -1051523), i, m, d[n + 1], 21, -2054922799), r = md5_ii(r, i = md5_ii(i, m = md5_ii(m, f, r, i, d[n + 8], 6, 1873313359), f, r, d[n + 15], 10, -30611744), m, f, d[n + 6], 15, -1560198380), i, m, d[n + 13], 21, 1309151649), r = md5_ii(r, i = md5_ii(i, m = md5_ii(m, f, r, i, d[n + 4], 6, -145523070), f, r, d[n + 11], 10, -1120210379), m, f, d[n + 2], 15, 718787259), i, m, d[n + 9], 21, -343485551), m = safe_add(m, h), f = safe_add(f, t), r = safe_add(r, g), i = safe_add(i, e);
|
|
674
666
|
}
|
|
675
|
-
return Array(m, f,
|
|
667
|
+
return Array(m, f, r, i);
|
|
676
668
|
}
|
|
677
|
-
function md5_cmn(d, _, m, f,
|
|
678
|
-
return safe_add(bit_rol(safe_add(safe_add(_, d), safe_add(f, i)),
|
|
669
|
+
function md5_cmn(d, _, m, f, r, i) {
|
|
670
|
+
return safe_add(bit_rol(safe_add(safe_add(_, d), safe_add(f, i)), r), m);
|
|
679
671
|
}
|
|
680
|
-
function md5_ff(d, _, m, f,
|
|
681
|
-
return md5_cmn(_ & m | ~_ & f, d, _,
|
|
672
|
+
function md5_ff(d, _, m, f, r, i, n) {
|
|
673
|
+
return md5_cmn(_ & m | ~_ & f, d, _, r, i, n);
|
|
682
674
|
}
|
|
683
|
-
function md5_gg(d, _, m, f,
|
|
684
|
-
return md5_cmn(_ & f | m & ~f, d, _,
|
|
675
|
+
function md5_gg(d, _, m, f, r, i, n) {
|
|
676
|
+
return md5_cmn(_ & f | m & ~f, d, _, r, i, n);
|
|
685
677
|
}
|
|
686
|
-
function md5_hh(d, _, m, f,
|
|
687
|
-
return md5_cmn(_ ^ m ^ f, d, _,
|
|
678
|
+
function md5_hh(d, _, m, f, r, i, n) {
|
|
679
|
+
return md5_cmn(_ ^ m ^ f, d, _, r, i, n);
|
|
688
680
|
}
|
|
689
|
-
function md5_ii(d, _, m, f,
|
|
690
|
-
return md5_cmn(m ^ (_ | ~f), d, _,
|
|
681
|
+
function md5_ii(d, _, m, f, r, i, n) {
|
|
682
|
+
return md5_cmn(m ^ (_ | ~f), d, _, r, i, n);
|
|
691
683
|
}
|
|
692
684
|
function safe_add(d, _) {
|
|
693
685
|
var m = (65535 & d) + (65535 & _);
|
|
@@ -720,20 +712,20 @@ ${opts.message || this.desc}`;
|
|
|
720
712
|
columns.push(current.trim());
|
|
721
713
|
return columns.map((col) => col.replace(/^"|"$/g, "").replace(/""/g, '"'));
|
|
722
714
|
}
|
|
723
|
-
const
|
|
715
|
+
const rows = [];
|
|
724
716
|
let currentRow = "", inQuotes = false;
|
|
725
717
|
for (const char of csv.replace(/\r\n/g, "\n")) {
|
|
726
718
|
if (char === '"') inQuotes = !inQuotes;
|
|
727
719
|
if (char === "\n" && !inQuotes) {
|
|
728
|
-
|
|
720
|
+
rows.push(currentRow.trim());
|
|
729
721
|
currentRow = "";
|
|
730
722
|
} else currentRow += char;
|
|
731
723
|
}
|
|
732
|
-
if (currentRow)
|
|
733
|
-
let headers = hasHeaders ?
|
|
724
|
+
if (currentRow) rows.push(currentRow.trim());
|
|
725
|
+
let headers = hasHeaders ? rows.splice(0, 1)[0] : null;
|
|
734
726
|
if (headers) headers = (_a = headers.match(/(?:[^,"']+|"(?:[^"]|"")*"|'(?:[^']|'')*')+/g)) == null ? void 0 : _a.map((h) => h.trim());
|
|
735
|
-
return
|
|
736
|
-
const props = parseLine(
|
|
727
|
+
return rows.map((r) => {
|
|
728
|
+
const props = parseLine(r);
|
|
737
729
|
const h = headers || Array(props.length).fill(null).map((_, i) => {
|
|
738
730
|
let letter = "";
|
|
739
731
|
const first = i / 26;
|
|
@@ -753,18 +745,18 @@ ${opts.message || this.desc}`;
|
|
|
753
745
|
return [
|
|
754
746
|
headers.join(","),
|
|
755
747
|
...t.map((row) => headers.map((h) => {
|
|
756
|
-
const
|
|
757
|
-
if (
|
|
758
|
-
if (typeof
|
|
759
|
-
if (typeof
|
|
760
|
-
return
|
|
748
|
+
const value = dotNotation(row, h);
|
|
749
|
+
if (value == null) return "";
|
|
750
|
+
if (typeof value == "object") return `"${JSONSanitize(value).replaceAll('"', '""')}"`;
|
|
751
|
+
if (typeof value == "string" && /[\n",]/g.test(value)) return `"${value.replaceAll('"', '""')}"`;
|
|
752
|
+
return value;
|
|
761
753
|
}).join(","))
|
|
762
754
|
].join("\n");
|
|
763
755
|
}
|
|
764
756
|
class PromiseProgress extends Promise {
|
|
765
757
|
constructor(executor) {
|
|
766
758
|
super((resolve, reject) => executor(
|
|
767
|
-
(
|
|
759
|
+
(value) => resolve(value),
|
|
768
760
|
(reason) => reject(reason),
|
|
769
761
|
(progress) => this.progress = progress
|
|
770
762
|
));
|
|
@@ -774,10 +766,10 @@ ${opts.message || this.desc}`;
|
|
|
774
766
|
get progress() {
|
|
775
767
|
return this._progress;
|
|
776
768
|
}
|
|
777
|
-
set progress(
|
|
778
|
-
if (
|
|
779
|
-
this._progress =
|
|
780
|
-
this.listeners.forEach((l) => l(
|
|
769
|
+
set progress(p) {
|
|
770
|
+
if (p == this._progress) return;
|
|
771
|
+
this._progress = p;
|
|
772
|
+
this.listeners.forEach((l) => l(p));
|
|
781
773
|
}
|
|
782
774
|
static from(promise) {
|
|
783
775
|
if (promise instanceof PromiseProgress) return promise;
|
|
@@ -785,7 +777,7 @@ ${opts.message || this.desc}`;
|
|
|
785
777
|
}
|
|
786
778
|
from(promise) {
|
|
787
779
|
const newPromise = PromiseProgress.from(promise);
|
|
788
|
-
this.onProgress((
|
|
780
|
+
this.onProgress((p) => newPromise.progress = p);
|
|
789
781
|
return newPromise;
|
|
790
782
|
}
|
|
791
783
|
onProgress(callback) {
|
|
@@ -805,14 +797,14 @@ ${opts.message || this.desc}`;
|
|
|
805
797
|
}
|
|
806
798
|
function adjustedInterval(cb, ms) {
|
|
807
799
|
let cancel = false, timeout = null;
|
|
808
|
-
const
|
|
800
|
+
const p = async () => {
|
|
809
801
|
if (cancel) return;
|
|
810
802
|
const start = (/* @__PURE__ */ new Date()).getTime();
|
|
811
803
|
await cb();
|
|
812
804
|
const end = (/* @__PURE__ */ new Date()).getTime();
|
|
813
|
-
timeout = setTimeout(() =>
|
|
805
|
+
timeout = setTimeout(() => p(), ms - (end - start) || 1);
|
|
814
806
|
};
|
|
815
|
-
|
|
807
|
+
p();
|
|
816
808
|
return () => {
|
|
817
809
|
cancel = true;
|
|
818
810
|
if (timeout) clearTimeout(timeout);
|
|
@@ -938,12 +930,12 @@ ${opts.message || this.desc}`;
|
|
|
938
930
|
URL.revokeObjectURL(url);
|
|
939
931
|
}
|
|
940
932
|
function downloadUrl(href, name) {
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
document.body.appendChild(
|
|
945
|
-
|
|
946
|
-
document.body.removeChild(
|
|
933
|
+
const a = document.createElement("a");
|
|
934
|
+
a.href = href;
|
|
935
|
+
a.download = name || href.split("/").pop();
|
|
936
|
+
document.body.appendChild(a);
|
|
937
|
+
a.click();
|
|
938
|
+
document.body.removeChild(a);
|
|
947
939
|
}
|
|
948
940
|
function fileBrowser(options = {}) {
|
|
949
941
|
return new Promise((res) => {
|
|
@@ -984,7 +976,7 @@ ${opts.message || this.desc}`;
|
|
|
984
976
|
xhr.addEventListener("error", () => rej(JSONAttemptParse(xhr.responseText)));
|
|
985
977
|
xhr.addEventListener("timeout", () => rej({ error: "Request timed out" }));
|
|
986
978
|
xhr.open("POST", options.url);
|
|
987
|
-
Object.entries(options.headers || {}).forEach(([key,
|
|
979
|
+
Object.entries(options.headers || {}).forEach(([key, value]) => xhr.setRequestHeader(key, value));
|
|
988
980
|
xhr.send(formData2);
|
|
989
981
|
});
|
|
990
982
|
}
|
|
@@ -1318,7 +1310,7 @@ ${opts.message || this.desc}`;
|
|
|
1318
1310
|
__publicField(_Http, "interceptors", {});
|
|
1319
1311
|
__publicField(_Http, "headers", {});
|
|
1320
1312
|
let Http = _Http;
|
|
1321
|
-
function
|
|
1313
|
+
function decodeJwt(token) {
|
|
1322
1314
|
const base64 = token.split(".")[1].replace(/-/g, "+").replace(/_/g, "/");
|
|
1323
1315
|
return JSONAttemptParse(decodeURIComponent(atob(base64).split("").map(function(c) {
|
|
1324
1316
|
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
|
|
@@ -1414,9 +1406,9 @@ ${opts.message || this.desc}`;
|
|
|
1414
1406
|
__publicField(_Logger, "LOG_LEVEL", 4);
|
|
1415
1407
|
let Logger = _Logger;
|
|
1416
1408
|
function dec2Frac(num) {
|
|
1417
|
-
const gcd = (
|
|
1418
|
-
if (
|
|
1419
|
-
return gcd(
|
|
1409
|
+
const gcd = (a, b) => {
|
|
1410
|
+
if (b < 1e-7) return a;
|
|
1411
|
+
return gcd(b, ~~(a % b));
|
|
1420
1412
|
};
|
|
1421
1413
|
const len = num.toString().length - 2;
|
|
1422
1414
|
let denominator = Math.pow(10, len);
|
|
@@ -1434,12 +1426,16 @@ ${opts.message || this.desc}`;
|
|
|
1434
1426
|
split = split.pop().split("/");
|
|
1435
1427
|
return whole + Number(split[0]) / Number(split[1]);
|
|
1436
1428
|
}
|
|
1429
|
+
function asyncFunction(args, fn) {
|
|
1430
|
+
const keys = Object.keys(args);
|
|
1431
|
+
return new Function(...keys, `return (async (${keys.join(",")}) => { ${fn} })(${keys.join(",")})`)(...keys.map((k) => args[k]));
|
|
1432
|
+
}
|
|
1437
1433
|
function gravatar(email, def = "mp") {
|
|
1438
1434
|
if (!email) return "";
|
|
1439
1435
|
return `https://www.gravatar.com/avatar/${md5(email)}?d=${def}`;
|
|
1440
1436
|
}
|
|
1441
|
-
function escapeRegex(
|
|
1442
|
-
return
|
|
1437
|
+
function escapeRegex(value) {
|
|
1438
|
+
return value.replace(/[.*+?^${}()|\[\]\\]/g, "\\$&");
|
|
1443
1439
|
}
|
|
1444
1440
|
function PE(str, ...args) {
|
|
1445
1441
|
const combined = [];
|
|
@@ -1474,15 +1470,15 @@ ${opts.message || this.desc}`;
|
|
|
1474
1470
|
__publicField(this, "methods");
|
|
1475
1471
|
var _a;
|
|
1476
1472
|
if (typeof Event == "object") return Object.assign(this, Event);
|
|
1477
|
-
let [
|
|
1473
|
+
let [p, scope, method] = Event.replaceAll(/\/{2,}/g, "/").split(":");
|
|
1478
1474
|
if (!method) method = scope || "*";
|
|
1479
|
-
if (
|
|
1480
|
-
|
|
1475
|
+
if (p == "*" || !p && method == "*") {
|
|
1476
|
+
p = "";
|
|
1481
1477
|
method = "*";
|
|
1482
1478
|
}
|
|
1483
|
-
let temp =
|
|
1479
|
+
let temp = p.split("/").filter((p2) => !!p2);
|
|
1484
1480
|
this.module = ((_a = temp.splice(0, 1)[0]) == null ? void 0 : _a.toLowerCase()) || "";
|
|
1485
|
-
this.fullPath =
|
|
1481
|
+
this.fullPath = p;
|
|
1486
1482
|
this.path = temp.join("/");
|
|
1487
1483
|
this.name = temp.pop() || "";
|
|
1488
1484
|
this.methods = new ASet(method.split(""));
|
|
@@ -1491,43 +1487,43 @@ ${opts.message || this.desc}`;
|
|
|
1491
1487
|
get all() {
|
|
1492
1488
|
return this.methods.has("*");
|
|
1493
1489
|
}
|
|
1494
|
-
set all(
|
|
1495
|
-
|
|
1490
|
+
set all(v) {
|
|
1491
|
+
v ? new ASet(["*"]) : this.methods.delete("*");
|
|
1496
1492
|
}
|
|
1497
1493
|
/** None specified */
|
|
1498
1494
|
get none() {
|
|
1499
1495
|
return this.methods.has("n");
|
|
1500
1496
|
}
|
|
1501
|
-
set none(
|
|
1502
|
-
|
|
1497
|
+
set none(v) {
|
|
1498
|
+
v ? this.methods = new ASet(["n"]) : this.methods.delete("n");
|
|
1503
1499
|
}
|
|
1504
1500
|
/** Create method specified */
|
|
1505
1501
|
get create() {
|
|
1506
1502
|
return !this.methods.has("n") && (this.methods.has("*") || this.methods.has("c"));
|
|
1507
1503
|
}
|
|
1508
|
-
set create(
|
|
1509
|
-
|
|
1504
|
+
set create(v) {
|
|
1505
|
+
v ? this.methods.delete("n").add("c") : this.methods.delete("c");
|
|
1510
1506
|
}
|
|
1511
1507
|
/** Read method specified */
|
|
1512
1508
|
get read() {
|
|
1513
1509
|
return !this.methods.has("n") && (this.methods.has("*") || this.methods.has("r"));
|
|
1514
1510
|
}
|
|
1515
|
-
set read(
|
|
1516
|
-
|
|
1511
|
+
set read(v) {
|
|
1512
|
+
v ? this.methods.delete("n").add("r") : this.methods.delete("r");
|
|
1517
1513
|
}
|
|
1518
1514
|
/** Update method specified */
|
|
1519
1515
|
get update() {
|
|
1520
1516
|
return !this.methods.has("n") && (this.methods.has("*") || this.methods.has("u"));
|
|
1521
1517
|
}
|
|
1522
|
-
set update(
|
|
1523
|
-
|
|
1518
|
+
set update(v) {
|
|
1519
|
+
v ? this.methods.delete("n").add("u") : this.methods.delete("u");
|
|
1524
1520
|
}
|
|
1525
1521
|
/** Delete method specified */
|
|
1526
1522
|
get delete() {
|
|
1527
1523
|
return !this.methods.has("n") && (this.methods.has("*") || this.methods.has("d"));
|
|
1528
1524
|
}
|
|
1529
|
-
set delete(
|
|
1530
|
-
|
|
1525
|
+
set delete(v) {
|
|
1526
|
+
v ? this.methods.delete("n").add("d") : this.methods.delete("d");
|
|
1531
1527
|
}
|
|
1532
1528
|
/**
|
|
1533
1529
|
* Combine multiple events into one parsed object. Longest path takes precedent, but all subsequent methods are
|
|
@@ -1538,14 +1534,14 @@ ${opts.message || this.desc}`;
|
|
|
1538
1534
|
*/
|
|
1539
1535
|
static combine(...paths) {
|
|
1540
1536
|
let hitNone = false;
|
|
1541
|
-
const combined = paths.map((
|
|
1537
|
+
const combined = paths.map((p) => new PathEvent(p)).toSorted((p1, p2) => {
|
|
1542
1538
|
const l1 = p1.fullPath.length, l2 = p2.fullPath.length;
|
|
1543
1539
|
return l1 < l2 ? 1 : l1 > l2 ? -1 : 0;
|
|
1544
|
-
}).reduce((acc,
|
|
1545
|
-
if (
|
|
1546
|
-
if (!acc) return
|
|
1540
|
+
}).reduce((acc, p) => {
|
|
1541
|
+
if (p.none) hitNone = true;
|
|
1542
|
+
if (!acc) return p;
|
|
1547
1543
|
if (hitNone) return acc;
|
|
1548
|
-
acc.methods = [...acc.methods, ...
|
|
1544
|
+
acc.methods = [...acc.methods, ...p.methods];
|
|
1549
1545
|
return acc;
|
|
1550
1546
|
}, null);
|
|
1551
1547
|
combined.methods = new ASet(combined.methods);
|
|
@@ -1576,12 +1572,12 @@ ${opts.message || this.desc}`;
|
|
|
1576
1572
|
static has(target, ...has) {
|
|
1577
1573
|
const parsedRequired = makeArray(has).map((pe) => new PathEvent(pe));
|
|
1578
1574
|
const parsedTarget = makeArray(target).map((pe) => new PathEvent(pe));
|
|
1579
|
-
return !!parsedRequired.find((
|
|
1580
|
-
if (!
|
|
1581
|
-
const filtered = parsedTarget.filter((
|
|
1575
|
+
return !!parsedRequired.find((r) => {
|
|
1576
|
+
if (!r.fullPath && r.all) return true;
|
|
1577
|
+
const filtered = parsedTarget.filter((p) => r.fullPath.startsWith(p.fullPath));
|
|
1582
1578
|
if (!filtered.length) return false;
|
|
1583
1579
|
const combined = PathEvent.combine(...filtered);
|
|
1584
|
-
return !combined.none && (combined.all ||
|
|
1580
|
+
return !combined.none && (combined.all || r.all) || combined.methods.intersection(r.methods).length;
|
|
1585
1581
|
});
|
|
1586
1582
|
}
|
|
1587
1583
|
/**
|
|
@@ -1620,10 +1616,10 @@ ${opts.message || this.desc}`;
|
|
|
1620
1616
|
* @return {string} String representation of Event
|
|
1621
1617
|
*/
|
|
1622
1618
|
static toString(path, methods) {
|
|
1623
|
-
let
|
|
1624
|
-
|
|
1625
|
-
if (methods == null ? void 0 : methods.length)
|
|
1626
|
-
return
|
|
1619
|
+
let p = makeArray(path).filter((p2) => p2 != null).join("/");
|
|
1620
|
+
p = p == null ? void 0 : p.trim().replaceAll(/\/{2,}/g, "/").replaceAll(/(^\/|\/$)/g, "");
|
|
1621
|
+
if (methods == null ? void 0 : methods.length) p += `:${makeArray(methods).map((m) => m.toLowerCase()).join("")}`;
|
|
1622
|
+
return p;
|
|
1627
1623
|
}
|
|
1628
1624
|
/**
|
|
1629
1625
|
* Filter a set of paths based on this event
|
|
@@ -1671,134 +1667,157 @@ ${opts.message || this.desc}`;
|
|
|
1671
1667
|
emitter.on("*", (event, ...args) => this.emit(event, ...args));
|
|
1672
1668
|
}
|
|
1673
1669
|
}
|
|
1674
|
-
function search(rows,
|
|
1670
|
+
function search(rows, search2, regex, transform = (r) => r) {
|
|
1675
1671
|
if (!rows) return [];
|
|
1676
1672
|
return rows.filter((r) => {
|
|
1677
1673
|
const value = transform(r);
|
|
1678
|
-
if (!
|
|
1674
|
+
if (!search2) return true;
|
|
1679
1675
|
if (regex) {
|
|
1680
|
-
return !!Object.values(value).filter((
|
|
1676
|
+
return !!Object.values(value).filter((v) => {
|
|
1681
1677
|
try {
|
|
1682
|
-
return RegExp(
|
|
1678
|
+
return RegExp(search2, "gm").test(v.toString());
|
|
1683
1679
|
} catch {
|
|
1684
1680
|
return false;
|
|
1685
1681
|
}
|
|
1686
1682
|
}).length;
|
|
1683
|
+
} else {
|
|
1684
|
+
return testCondition(search2, r);
|
|
1687
1685
|
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
return
|
|
1702
|
-
|
|
1703
|
-
|
|
1686
|
+
});
|
|
1687
|
+
}
|
|
1688
|
+
function testCondition(condition, row) {
|
|
1689
|
+
const evalBoolean = (a, op, b) => {
|
|
1690
|
+
switch (op) {
|
|
1691
|
+
case "=":
|
|
1692
|
+
case "==":
|
|
1693
|
+
return a == b;
|
|
1694
|
+
case "!=":
|
|
1695
|
+
return a != b;
|
|
1696
|
+
case ">":
|
|
1697
|
+
return a > b;
|
|
1698
|
+
case ">=":
|
|
1699
|
+
return a >= b;
|
|
1700
|
+
case "<":
|
|
1701
|
+
return a < b;
|
|
1702
|
+
case "<=":
|
|
1703
|
+
return a <= b;
|
|
1704
|
+
default:
|
|
1705
|
+
return false;
|
|
1706
|
+
}
|
|
1707
|
+
};
|
|
1708
|
+
const or = condition.split("||").map((p) => p.trim()).filter((p) => !!p);
|
|
1709
|
+
return -1 != or.findIndex((p) => {
|
|
1710
|
+
const and = p.split("&&").map((p2) => p2.trim()).filter((p2) => !!p2);
|
|
1711
|
+
return and.filter((p2) => {
|
|
1712
|
+
const prop = /(\S+)\s*(==?|!=|>=|>|<=|<)\s*(\S+)/g.exec(p2);
|
|
1713
|
+
if (prop) {
|
|
1714
|
+
const key = Object.keys(row).find((k) => k.toLowerCase() == prop[1].toLowerCase());
|
|
1715
|
+
return evalBoolean(dotNotation(row, key || prop[1]), prop[2], JSONAttemptParse(prop[3]));
|
|
1716
|
+
}
|
|
1717
|
+
const v = Object.values(row).map((v2) => typeof v2 == "object" && v2 != null ? JSON.stringify(v2) : v2).join("");
|
|
1718
|
+
if (/[A-Z]/g.test(condition)) return v.includes(p2);
|
|
1719
|
+
return v.toLowerCase().includes(p2);
|
|
1720
|
+
}).length == and.length;
|
|
1704
1721
|
});
|
|
1705
1722
|
}
|
|
1706
1723
|
function typeKeys() {
|
|
1707
1724
|
return Object.keys({});
|
|
1708
1725
|
}
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1726
|
+
exports2.ASet = ASet;
|
|
1727
|
+
exports2.ArgParser = ArgParser;
|
|
1728
|
+
exports2.BadGatewayError = BadGatewayError;
|
|
1729
|
+
exports2.BadRequestError = BadRequestError;
|
|
1730
|
+
exports2.CHAR_LIST = CHAR_LIST;
|
|
1731
|
+
exports2.Cache = Cache;
|
|
1732
|
+
exports2.CliBackground = CliBackground;
|
|
1733
|
+
exports2.CliEffects = CliEffects;
|
|
1734
|
+
exports2.CliForeground = CliForeground;
|
|
1735
|
+
exports2.CustomError = CustomError;
|
|
1736
|
+
exports2.ForbiddenError = ForbiddenError;
|
|
1737
|
+
exports2.GatewayTimeoutError = GatewayTimeoutError;
|
|
1738
|
+
exports2.Http = Http;
|
|
1739
|
+
exports2.InternalServerError = InternalServerError;
|
|
1740
|
+
exports2.JSONAttemptParse = JSONAttemptParse;
|
|
1741
|
+
exports2.JSONSanitize = JSONSanitize;
|
|
1742
|
+
exports2.JSONSerialize = JSONSerialize;
|
|
1743
|
+
exports2.LETTER_LIST = LETTER_LIST;
|
|
1744
|
+
exports2.LOG_LEVEL = LOG_LEVEL;
|
|
1745
|
+
exports2.Logger = Logger;
|
|
1746
|
+
exports2.MethodNotAllowedError = MethodNotAllowedError;
|
|
1747
|
+
exports2.NUMBER_LIST = NUMBER_LIST;
|
|
1748
|
+
exports2.NotAcceptableError = NotAcceptableError;
|
|
1749
|
+
exports2.NotFoundError = NotFoundError;
|
|
1750
|
+
exports2.NotImplementedError = NotImplementedError;
|
|
1751
|
+
exports2.PE = PE;
|
|
1752
|
+
exports2.PES = PES;
|
|
1753
|
+
exports2.PathError = PathError;
|
|
1754
|
+
exports2.PathEvent = PathEvent;
|
|
1755
|
+
exports2.PathEventEmitter = PathEventEmitter;
|
|
1756
|
+
exports2.PaymentRequiredError = PaymentRequiredError;
|
|
1757
|
+
exports2.PromiseProgress = PromiseProgress;
|
|
1758
|
+
exports2.SYMBOL_LIST = SYMBOL_LIST;
|
|
1759
|
+
exports2.ServiceUnavailableError = ServiceUnavailableError;
|
|
1760
|
+
exports2.TypedEmitter = TypedEmitter;
|
|
1761
|
+
exports2.UnauthorizedError = UnauthorizedError;
|
|
1762
|
+
exports2.addUnique = addUnique;
|
|
1763
|
+
exports2.adjustedInterval = adjustedInterval;
|
|
1764
|
+
exports2.arrayDiff = arrayDiff;
|
|
1765
|
+
exports2.asyncFunction = asyncFunction;
|
|
1766
|
+
exports2.blackOrWhite = blackOrWhite;
|
|
1767
|
+
exports2.camelCase = camelCase;
|
|
1768
|
+
exports2.caseInsensitiveSort = caseInsensitiveSort;
|
|
1769
|
+
exports2.clean = clean;
|
|
1770
|
+
exports2.dec2Frac = dec2Frac;
|
|
1771
|
+
exports2.decodeJwt = decodeJwt;
|
|
1772
|
+
exports2.deepCopy = deepCopy;
|
|
1773
|
+
exports2.deepMerge = deepMerge;
|
|
1774
|
+
exports2.dotNotation = dotNotation;
|
|
1775
|
+
exports2.downloadFile = downloadFile;
|
|
1776
|
+
exports2.downloadUrl = downloadUrl;
|
|
1777
|
+
exports2.encodeQuery = encodeQuery;
|
|
1778
|
+
exports2.errorFromCode = errorFromCode;
|
|
1779
|
+
exports2.escapeRegex = escapeRegex;
|
|
1780
|
+
exports2.fileBrowser = fileBrowser;
|
|
1781
|
+
exports2.fileText = fileText;
|
|
1782
|
+
exports2.findByProp = findByProp;
|
|
1783
|
+
exports2.flattenArr = flattenArr;
|
|
1784
|
+
exports2.flattenObj = flattenObj;
|
|
1785
|
+
exports2.formData = formData;
|
|
1786
|
+
exports2.formatBytes = formatBytes;
|
|
1787
|
+
exports2.formatDate = formatDate;
|
|
1788
|
+
exports2.formatPhoneNumber = formatPhoneNumber;
|
|
1789
|
+
exports2.fracToDec = fracToDec;
|
|
1790
|
+
exports2.fromCsv = fromCsv;
|
|
1791
|
+
exports2.gravatar = gravatar;
|
|
1792
|
+
exports2.includes = includes;
|
|
1793
|
+
exports2.insertAt = insertAt;
|
|
1794
|
+
exports2.instantInterval = instantInterval;
|
|
1795
|
+
exports2.isEqual = isEqual;
|
|
1796
|
+
exports2.kebabCase = kebabCase;
|
|
1797
|
+
exports2.makeArray = makeArray;
|
|
1798
|
+
exports2.makeUnique = makeUnique;
|
|
1799
|
+
exports2.matchAll = matchAll;
|
|
1800
|
+
exports2.md5 = md5;
|
|
1801
|
+
exports2.mixin = mixin;
|
|
1802
|
+
exports2.pad = pad;
|
|
1803
|
+
exports2.parseUrl = parseUrl;
|
|
1804
|
+
exports2.pascalCase = pascalCase;
|
|
1805
|
+
exports2.randomHex = randomHex;
|
|
1806
|
+
exports2.randomString = randomString;
|
|
1807
|
+
exports2.randomStringBuilder = randomStringBuilder;
|
|
1808
|
+
exports2.search = search;
|
|
1809
|
+
exports2.sleep = sleep;
|
|
1810
|
+
exports2.sleepWhile = sleepWhile;
|
|
1811
|
+
exports2.snakeCase = snakeCase;
|
|
1812
|
+
exports2.sortByProp = sortByProp;
|
|
1813
|
+
exports2.strSplice = strSplice;
|
|
1814
|
+
exports2.testCondition = testCondition;
|
|
1815
|
+
exports2.timeUntil = timeUntil;
|
|
1816
|
+
exports2.timestampFilename = timestampFilename;
|
|
1817
|
+
exports2.toCsv = toCsv;
|
|
1818
|
+
exports2.typeKeys = typeKeys;
|
|
1819
|
+
exports2.uploadWithProgress = uploadWithProgress;
|
|
1820
|
+
exports2.validateEmail = validateEmail;
|
|
1821
|
+
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
1803
1822
|
});
|
|
1804
1823
|
//# sourceMappingURL=index.cjs.map
|