@ztimson/utils 0.22.7 → 0.22.9
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/index.cjs +274 -232
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +188 -146
- package/dist/index.mjs.map +1 -1
- package/dist/search.d.ts +1 -0
- package/dist/time.d.ts +11 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
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(exports) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
|
-
var __defNormalProp = (obj, key,
|
|
6
|
-
var __publicField = (obj, key,
|
|
5
|
+
var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
|
|
6
|
+
var __publicField = (obj, key, value2) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value2);
|
|
7
7
|
|
|
8
8
|
function clean(obj, undefinedOnly = false) {
|
|
9
9
|
if (obj == null) throw new Error("Cannot clean a NULL value");
|
|
10
10
|
if (Array.isArray(obj)) {
|
|
11
11
|
obj = obj.filter((o) => o != null);
|
|
12
12
|
} else {
|
|
13
|
-
Object.entries(obj).forEach(([key,
|
|
14
|
-
if (undefinedOnly &&
|
|
13
|
+
Object.entries(obj).forEach(([key, value2]) => {
|
|
14
|
+
if (undefinedOnly && value2 === void 0 || !undefinedOnly && value2 == null) delete obj[key];
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
return obj;
|
|
18
18
|
}
|
|
19
|
-
function deepCopy(
|
|
19
|
+
function deepCopy(value2) {
|
|
20
20
|
try {
|
|
21
|
-
return structuredClone(
|
|
21
|
+
return structuredClone(value2);
|
|
22
22
|
} catch {
|
|
23
|
-
return JSON.parse(JSONSanitize(
|
|
23
|
+
return JSON.parse(JSONSanitize(value2));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
function deepMerge(target, ...sources) {
|
|
@@ -36,22 +36,22 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36
36
|
});
|
|
37
37
|
return target;
|
|
38
38
|
}
|
|
39
|
-
function dotNotation(obj,
|
|
40
|
-
if (obj == null || !
|
|
41
|
-
return
|
|
42
|
-
if (
|
|
43
|
-
if (!(obj2 == null ? void 0 : obj2.hasOwnProperty(
|
|
39
|
+
function dotNotation(obj, prop2, set) {
|
|
40
|
+
if (obj == null || !prop2) return void 0;
|
|
41
|
+
return prop2.split(/[.[\]]/g).filter((prop22) => prop22.length).reduce((obj2, prop22, i, arr) => {
|
|
42
|
+
if (prop22[0] == '"' || prop22[0] == "'") prop22 = prop22.slice(1, -1);
|
|
43
|
+
if (!(obj2 == null ? void 0 : obj2.hasOwnProperty(prop22))) {
|
|
44
44
|
if (set == void 0) return void 0;
|
|
45
|
-
obj2[
|
|
45
|
+
obj2[prop22] = {};
|
|
46
46
|
}
|
|
47
47
|
if (set !== void 0 && i == arr.length - 1)
|
|
48
|
-
return obj2[
|
|
49
|
-
return obj2[
|
|
48
|
+
return obj2[prop22] = set;
|
|
49
|
+
return obj2[prop22];
|
|
50
50
|
}, obj);
|
|
51
51
|
}
|
|
52
52
|
function encodeQuery(data) {
|
|
53
53
|
return Object.entries(data).map(
|
|
54
|
-
([key,
|
|
54
|
+
([key, value2]) => encodeURIComponent(key) + "=" + encodeURIComponent(value2)
|
|
55
55
|
).join("&");
|
|
56
56
|
}
|
|
57
57
|
function flattenObj(obj, parent, result = {}) {
|
|
@@ -70,7 +70,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
70
70
|
}
|
|
71
71
|
function formData(target) {
|
|
72
72
|
const data = new FormData();
|
|
73
|
-
Object.entries(target).forEach(([key,
|
|
73
|
+
Object.entries(target).forEach(([key, value2]) => data.append(key, value2));
|
|
74
74
|
return data;
|
|
75
75
|
}
|
|
76
76
|
function includes(target, values, allowMissing = false) {
|
|
@@ -84,13 +84,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
84
84
|
if (type == "function") return target.toString() == values.toString();
|
|
85
85
|
return target == values;
|
|
86
86
|
}
|
|
87
|
-
function isEqual(
|
|
88
|
-
const ta = typeof
|
|
89
|
-
if (ta != "object" ||
|
|
90
|
-
return ta == "function" && tb == "function" ?
|
|
91
|
-
const keys = Object.keys(
|
|
92
|
-
if (keys.length != Object.keys(
|
|
93
|
-
return Object.keys(
|
|
87
|
+
function isEqual(a2, b2) {
|
|
88
|
+
const ta = typeof a2, tb = typeof b2;
|
|
89
|
+
if (ta != "object" || a2 == null || (tb != "object" || b2 == null))
|
|
90
|
+
return ta == "function" && tb == "function" ? a2.toString() == b2.toString() : a2 === b2;
|
|
91
|
+
const keys = Object.keys(a2);
|
|
92
|
+
if (keys.length != Object.keys(b2).length) return false;
|
|
93
|
+
return Object.keys(a2).every((key) => isEqual(a2[key], b2[key]));
|
|
94
94
|
}
|
|
95
95
|
function mixin(target, constructors) {
|
|
96
96
|
constructors.forEach((c) => {
|
|
@@ -111,39 +111,39 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
function JSONSanitize(obj, space) {
|
|
114
|
-
return JSON.stringify(obj, (key,
|
|
115
|
-
return
|
|
114
|
+
return JSON.stringify(obj, (key, value2) => {
|
|
115
|
+
return value2;
|
|
116
116
|
}, space);
|
|
117
117
|
}
|
|
118
118
|
function addUnique(array, el) {
|
|
119
119
|
if (array.indexOf(el) === -1) array.push(el);
|
|
120
120
|
return array;
|
|
121
121
|
}
|
|
122
|
-
function arrayDiff(
|
|
122
|
+
function arrayDiff(a2, b2) {
|
|
123
123
|
return makeUnique([
|
|
124
|
-
...
|
|
125
|
-
...
|
|
124
|
+
...a2.filter((v1) => !b2.includes((v2) => isEqual(v1, v2))),
|
|
125
|
+
...b2.filter((v1) => !a2.includes((v2) => isEqual(v1, v2)))
|
|
126
126
|
]);
|
|
127
127
|
}
|
|
128
|
-
function caseInsensitiveSort(
|
|
129
|
-
return function(
|
|
130
|
-
const aVal = dotNotation(
|
|
131
|
-
const bVal = dotNotation(
|
|
128
|
+
function caseInsensitiveSort(prop2) {
|
|
129
|
+
return function(a2, b2) {
|
|
130
|
+
const aVal = dotNotation(a2, prop2);
|
|
131
|
+
const bVal = dotNotation(b2, prop2);
|
|
132
132
|
if (typeof aVal !== "string" || typeof bVal !== "string") return 1;
|
|
133
133
|
return aVal.toLowerCase().localeCompare(bVal.toLowerCase());
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
function findByProp(
|
|
137
|
-
return (
|
|
136
|
+
function findByProp(prop2, value2) {
|
|
137
|
+
return (v2) => isEqual(dotNotation(v2, prop2), value2);
|
|
138
138
|
}
|
|
139
139
|
function flattenArr(arr, result = []) {
|
|
140
140
|
arr.forEach((el) => Array.isArray(el) ? flattenArr(el, result) : result.push(el));
|
|
141
141
|
return result;
|
|
142
142
|
}
|
|
143
|
-
function sortByProp(
|
|
144
|
-
return function(
|
|
145
|
-
const aVal = dotNotation(
|
|
146
|
-
const bVal = dotNotation(
|
|
143
|
+
function sortByProp(prop2, reverse = false) {
|
|
144
|
+
return function(a2, b2) {
|
|
145
|
+
const aVal = dotNotation(a2, prop2);
|
|
146
|
+
const bVal = dotNotation(b2, prop2);
|
|
147
147
|
if (typeof aVal == "number" && typeof bVal == "number")
|
|
148
148
|
return (reverse ? -1 : 1) * (aVal - bVal);
|
|
149
149
|
if (aVal > bVal) return reverse ? -1 : 1;
|
|
@@ -157,8 +157,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
157
157
|
}
|
|
158
158
|
return arr;
|
|
159
159
|
}
|
|
160
|
-
function makeArray(
|
|
161
|
-
return Array.isArray(
|
|
160
|
+
function makeArray(value2) {
|
|
161
|
+
return Array.isArray(value2) ? value2 : [value2];
|
|
162
162
|
}
|
|
163
163
|
class ASet extends Array {
|
|
164
164
|
/** Number of elements in set */
|
|
@@ -216,8 +216,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
216
216
|
* @param {number} fromIndex Starting index position
|
|
217
217
|
* @return {number} Element index number or -1 if missing
|
|
218
218
|
*/
|
|
219
|
-
indexOf(
|
|
220
|
-
return super.findIndex((el) => isEqual(el,
|
|
219
|
+
indexOf(search2, fromIndex) {
|
|
220
|
+
return super.findIndex((el) => isEqual(el, search2), fromIndex);
|
|
221
221
|
}
|
|
222
222
|
/**
|
|
223
223
|
* Create list of elements this set has in common with the comparison set
|
|
@@ -299,20 +299,20 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
return new Proxy(this, {
|
|
302
|
-
get: (target,
|
|
303
|
-
if (
|
|
304
|
-
return target.store[
|
|
302
|
+
get: (target, prop2) => {
|
|
303
|
+
if (prop2 in target) return target[prop2];
|
|
304
|
+
return target.store[prop2];
|
|
305
305
|
},
|
|
306
|
-
set: (target,
|
|
307
|
-
if (
|
|
308
|
-
else target.store[
|
|
306
|
+
set: (target, prop2, value2) => {
|
|
307
|
+
if (prop2 in target) target[prop2] = value2;
|
|
308
|
+
else target.store[prop2] = value2;
|
|
309
309
|
return true;
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
|
-
getKey(
|
|
313
|
+
getKey(value2) {
|
|
314
314
|
if (!this.key) throw new Error("No key defined");
|
|
315
|
-
return
|
|
315
|
+
return value2[this.key];
|
|
316
316
|
}
|
|
317
317
|
/**
|
|
318
318
|
* Get all cached items
|
|
@@ -329,9 +329,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
329
329
|
* @param {number | undefined} ttl Override default expiry
|
|
330
330
|
* @return {this}
|
|
331
331
|
*/
|
|
332
|
-
add(
|
|
333
|
-
const key = this.getKey(
|
|
334
|
-
this.set(key,
|
|
332
|
+
add(value2, ttl = this.ttl) {
|
|
333
|
+
const key = this.getKey(value2);
|
|
334
|
+
this.set(key, value2, ttl);
|
|
335
335
|
return this;
|
|
336
336
|
}
|
|
337
337
|
/**
|
|
@@ -341,8 +341,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
341
341
|
* @param complete Mark cache as complete & reliable, defaults to true
|
|
342
342
|
* @return {this}
|
|
343
343
|
*/
|
|
344
|
-
addAll(
|
|
345
|
-
|
|
344
|
+
addAll(rows2, complete = true) {
|
|
345
|
+
rows2.forEach((r2) => this.add(r2));
|
|
346
346
|
this.complete = complete;
|
|
347
347
|
return this;
|
|
348
348
|
}
|
|
@@ -401,8 +401,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
401
401
|
* @param {number | undefined} ttl Override default expiry in seconds
|
|
402
402
|
* @return {this}
|
|
403
403
|
*/
|
|
404
|
-
set(key,
|
|
405
|
-
this.store[key] =
|
|
404
|
+
set(key, value2, ttl = this.options.ttl) {
|
|
405
|
+
this.store[key] = value2;
|
|
406
406
|
if (this.options.storageKey && this.options.storage)
|
|
407
407
|
this.options.storage.setItem(this.options.storageKey, JSON.stringify(this.store));
|
|
408
408
|
if (ttl) setTimeout(() => {
|
|
@@ -466,16 +466,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
466
466
|
const after = str.slice(start + deleteCount);
|
|
467
467
|
return before + insert + after;
|
|
468
468
|
}
|
|
469
|
-
function matchAll(
|
|
470
|
-
if (typeof
|
|
471
|
-
|
|
469
|
+
function matchAll(value2, regex2) {
|
|
470
|
+
if (typeof regex2 === "string") {
|
|
471
|
+
regex2 = new RegExp(regex2, "g");
|
|
472
472
|
}
|
|
473
|
-
if (!
|
|
473
|
+
if (!regex2.global) {
|
|
474
474
|
throw new TypeError("Regular expression must be global.");
|
|
475
475
|
}
|
|
476
476
|
let ret = [];
|
|
477
477
|
let match;
|
|
478
|
-
while ((match =
|
|
478
|
+
while ((match = regex2.exec(value2)) !== null) {
|
|
479
479
|
ret.push(match);
|
|
480
480
|
}
|
|
481
481
|
return ret;
|
|
@@ -503,11 +503,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
503
503
|
return groups;
|
|
504
504
|
}
|
|
505
505
|
function md5(d) {
|
|
506
|
-
var
|
|
507
|
-
return
|
|
506
|
+
var r2 = M(V(Y(X(d), 8 * d.length)));
|
|
507
|
+
return r2.toLowerCase();
|
|
508
508
|
}
|
|
509
509
|
function M(d) {
|
|
510
|
-
for (var _, m = "0123456789ABCDEF", f = "",
|
|
510
|
+
for (var _, m = "0123456789ABCDEF", f = "", r2 = 0; r2 < d.length; r2++) _ = d.charCodeAt(r2), f += m.charAt(_ >>> 4 & 15) + m.charAt(15 & _);
|
|
511
511
|
return f;
|
|
512
512
|
}
|
|
513
513
|
function X(d) {
|
|
@@ -521,26 +521,26 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
521
521
|
}
|
|
522
522
|
function Y(d, _) {
|
|
523
523
|
d[_ >> 5] |= 128 << _ % 32, d[14 + (_ + 64 >>> 9 << 4)] = _;
|
|
524
|
-
for (var m = 1732584193, f = -271733879,
|
|
525
|
-
var h = m, t = f, g =
|
|
526
|
-
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,
|
|
524
|
+
for (var m = 1732584193, f = -271733879, r2 = -1732584194, i = 271733878, n = 0; n < d.length; n += 16) {
|
|
525
|
+
var h = m, t = f, g = r2, e = i;
|
|
526
|
+
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, r2 = md5_ff(r2, i = md5_ff(i, m = md5_ff(m, f, r2, i, d[n + 0], 7, -680876936), f, r2, d[n + 1], 12, -389564586), m, f, d[n + 2], 17, 606105819), i, m, d[n + 3], 22, -1044525330), r2 = md5_ff(r2, i = md5_ff(i, m = md5_ff(m, f, r2, i, d[n + 4], 7, -176418897), f, r2, d[n + 5], 12, 1200080426), m, f, d[n + 6], 17, -1473231341), i, m, d[n + 7], 22, -45705983), r2 = md5_ff(r2, i = md5_ff(i, m = md5_ff(m, f, r2, i, d[n + 8], 7, 1770035416), f, r2, d[n + 9], 12, -1958414417), m, f, d[n + 10], 17, -42063), i, m, d[n + 11], 22, -1990404162), r2 = md5_ff(r2, i = md5_ff(i, m = md5_ff(m, f, r2, i, d[n + 12], 7, 1804603682), f, r2, d[n + 13], 12, -40341101), m, f, d[n + 14], 17, -1502002290), i, m, d[n + 15], 22, 1236535329), r2 = md5_gg(r2, i = md5_gg(i, m = md5_gg(m, f, r2, i, d[n + 1], 5, -165796510), f, r2, d[n + 6], 9, -1069501632), m, f, d[n + 11], 14, 643717713), i, m, d[n + 0], 20, -373897302), r2 = md5_gg(r2, i = md5_gg(i, m = md5_gg(m, f, r2, i, d[n + 5], 5, -701558691), f, r2, d[n + 10], 9, 38016083), m, f, d[n + 15], 14, -660478335), i, m, d[n + 4], 20, -405537848), r2 = md5_gg(r2, i = md5_gg(i, m = md5_gg(m, f, r2, i, d[n + 9], 5, 568446438), f, r2, d[n + 14], 9, -1019803690), m, f, d[n + 3], 14, -187363961), i, m, d[n + 8], 20, 1163531501), r2 = md5_gg(r2, i = md5_gg(i, m = md5_gg(m, f, r2, i, d[n + 13], 5, -1444681467), f, r2, d[n + 2], 9, -51403784), m, f, d[n + 7], 14, 1735328473), i, m, d[n + 12], 20, -1926607734), r2 = md5_hh(r2, i = md5_hh(i, m = md5_hh(m, f, r2, i, d[n + 5], 4, -378558), f, r2, d[n + 8], 11, -2022574463), m, f, d[n + 11], 16, 1839030562), i, m, d[n + 14], 23, -35309556), r2 = md5_hh(r2, i = md5_hh(i, m = md5_hh(m, f, r2, i, d[n + 1], 4, -1530992060), f, r2, d[n + 4], 11, 1272893353), m, f, d[n + 7], 16, -155497632), i, m, d[n + 10], 23, -1094730640), r2 = md5_hh(r2, i = md5_hh(i, m = md5_hh(m, f, r2, i, d[n + 13], 4, 681279174), f, r2, d[n + 0], 11, -358537222), m, f, d[n + 3], 16, -722521979), i, m, d[n + 6], 23, 76029189), r2 = md5_hh(r2, i = md5_hh(i, m = md5_hh(m, f, r2, i, d[n + 9], 4, -640364487), f, r2, d[n + 12], 11, -421815835), m, f, d[n + 15], 16, 530742520), i, m, d[n + 2], 23, -995338651), r2 = md5_ii(r2, i = md5_ii(i, m = md5_ii(m, f, r2, i, d[n + 0], 6, -198630844), f, r2, d[n + 7], 10, 1126891415), m, f, d[n + 14], 15, -1416354905), i, m, d[n + 5], 21, -57434055), r2 = md5_ii(r2, i = md5_ii(i, m = md5_ii(m, f, r2, i, d[n + 12], 6, 1700485571), f, r2, d[n + 3], 10, -1894986606), m, f, d[n + 10], 15, -1051523), i, m, d[n + 1], 21, -2054922799), r2 = md5_ii(r2, i = md5_ii(i, m = md5_ii(m, f, r2, i, d[n + 8], 6, 1873313359), f, r2, d[n + 15], 10, -30611744), m, f, d[n + 6], 15, -1560198380), i, m, d[n + 13], 21, 1309151649), r2 = md5_ii(r2, i = md5_ii(i, m = md5_ii(m, f, r2, i, d[n + 4], 6, -145523070), f, r2, 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), r2 = safe_add(r2, g), i = safe_add(i, e);
|
|
527
527
|
}
|
|
528
|
-
return Array(m, f,
|
|
528
|
+
return Array(m, f, r2, i);
|
|
529
529
|
}
|
|
530
|
-
function md5_cmn(d, _, m, f,
|
|
531
|
-
return safe_add(bit_rol(safe_add(safe_add(_, d), safe_add(f, i)),
|
|
530
|
+
function md5_cmn(d, _, m, f, r2, i) {
|
|
531
|
+
return safe_add(bit_rol(safe_add(safe_add(_, d), safe_add(f, i)), r2), m);
|
|
532
532
|
}
|
|
533
|
-
function md5_ff(d, _, m, f,
|
|
534
|
-
return md5_cmn(_ & m | ~_ & f, d, _,
|
|
533
|
+
function md5_ff(d, _, m, f, r2, i, n) {
|
|
534
|
+
return md5_cmn(_ & m | ~_ & f, d, _, r2, i, n);
|
|
535
535
|
}
|
|
536
|
-
function md5_gg(d, _, m, f,
|
|
537
|
-
return md5_cmn(_ & f | m & ~f, d, _,
|
|
536
|
+
function md5_gg(d, _, m, f, r2, i, n) {
|
|
537
|
+
return md5_cmn(_ & f | m & ~f, d, _, r2, i, n);
|
|
538
538
|
}
|
|
539
|
-
function md5_hh(d, _, m, f,
|
|
540
|
-
return md5_cmn(_ ^ m ^ f, d, _,
|
|
539
|
+
function md5_hh(d, _, m, f, r2, i, n) {
|
|
540
|
+
return md5_cmn(_ ^ m ^ f, d, _, r2, i, n);
|
|
541
541
|
}
|
|
542
|
-
function md5_ii(d, _, m, f,
|
|
543
|
-
return md5_cmn(m ^ (_ | ~f), d, _,
|
|
542
|
+
function md5_ii(d, _, m, f, r2, i, n) {
|
|
543
|
+
return md5_cmn(m ^ (_ | ~f), d, _, r2, i, n);
|
|
544
544
|
}
|
|
545
545
|
function safe_add(d, _) {
|
|
546
546
|
var m = (65535 & d) + (65535 & _);
|
|
@@ -556,23 +556,23 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
556
556
|
const row = csv.split("\n");
|
|
557
557
|
let headers = hasHeaders ? row.splice(0, 1)[0] : null;
|
|
558
558
|
if (headers) headers = headers.match(/(?:[^,"']+|"[^"]*"|'[^']*')+/g);
|
|
559
|
-
return row.map((
|
|
559
|
+
return row.map((r2) => {
|
|
560
560
|
function parseLine(line) {
|
|
561
561
|
const parts = line.split(","), columns = [];
|
|
562
562
|
let quoted = false;
|
|
563
|
-
for (const
|
|
564
|
-
if (quoted) columns[columns.length - 1] = columns.at(-1) + "," +
|
|
565
|
-
else columns.push(
|
|
566
|
-
if (/[^"]"$/g.test(
|
|
563
|
+
for (const p2 of parts) {
|
|
564
|
+
if (quoted) columns[columns.length - 1] = columns.at(-1) + "," + p2;
|
|
565
|
+
else columns.push(p2);
|
|
566
|
+
if (/[^"]"$/g.test(p2)) {
|
|
567
567
|
quoted = false;
|
|
568
|
-
} else if (/^"[^"]/g.test(
|
|
568
|
+
} else if (/^"[^"]/g.test(p2)) {
|
|
569
569
|
quoted = true;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
return columns;
|
|
573
573
|
}
|
|
574
|
-
const props = parseLine(
|
|
575
|
-
const h = headers || Array(props.length).fill(null).map((
|
|
574
|
+
const props = parseLine(r2);
|
|
575
|
+
const h = headers || Array(props.length).fill(null).map((r22, i) => {
|
|
576
576
|
let letter = "";
|
|
577
577
|
const first = i / 26;
|
|
578
578
|
if (first > 1) letter += LETTER_LIST[Math.floor(first - 1)];
|
|
@@ -590,15 +590,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
590
590
|
return [
|
|
591
591
|
headers.join(","),
|
|
592
592
|
...target.map((row) => headers.map((h) => {
|
|
593
|
-
const
|
|
594
|
-
return typeof
|
|
593
|
+
const value2 = dotNotation(row, h);
|
|
594
|
+
return typeof value2 == "object" && value2 != null ? '"' + JSONSanitize(value2).replaceAll('"', '""') + '"' : value2;
|
|
595
595
|
}).join(","))
|
|
596
596
|
].join("\n");
|
|
597
597
|
}
|
|
598
598
|
class PromiseProgress extends Promise {
|
|
599
599
|
constructor(executor) {
|
|
600
600
|
super((resolve, reject) => executor(
|
|
601
|
-
(
|
|
601
|
+
(value2) => resolve(value2),
|
|
602
602
|
(reason) => reject(reason),
|
|
603
603
|
(progress) => this.progress = progress
|
|
604
604
|
));
|
|
@@ -608,10 +608,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
608
608
|
get progress() {
|
|
609
609
|
return this._progress;
|
|
610
610
|
}
|
|
611
|
-
set progress(
|
|
612
|
-
if (
|
|
613
|
-
this._progress =
|
|
614
|
-
this.listeners.forEach((l) => l(
|
|
611
|
+
set progress(p2) {
|
|
612
|
+
if (p2 == this._progress) return;
|
|
613
|
+
this._progress = p2;
|
|
614
|
+
this.listeners.forEach((l) => l(p2));
|
|
615
615
|
}
|
|
616
616
|
static from(promise) {
|
|
617
617
|
if (promise instanceof PromiseProgress) return promise;
|
|
@@ -619,7 +619,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
619
619
|
}
|
|
620
620
|
from(promise) {
|
|
621
621
|
const newPromise = PromiseProgress.from(promise);
|
|
622
|
-
this.onProgress((
|
|
622
|
+
this.onProgress((p2) => newPromise.progress = p2);
|
|
623
623
|
return newPromise;
|
|
624
624
|
}
|
|
625
625
|
onProgress(callback) {
|
|
@@ -644,12 +644,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
644
644
|
URL.revokeObjectURL(url);
|
|
645
645
|
}
|
|
646
646
|
function downloadUrl(href, name) {
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
document.body.appendChild(
|
|
651
|
-
|
|
652
|
-
document.body.removeChild(
|
|
647
|
+
const a2 = document.createElement("a");
|
|
648
|
+
a2.href = href;
|
|
649
|
+
a2.download = name || href.split("/").pop();
|
|
650
|
+
document.body.appendChild(a2);
|
|
651
|
+
a2.click();
|
|
652
|
+
document.body.removeChild(a2);
|
|
653
653
|
}
|
|
654
654
|
function fileBrowser(options = {}) {
|
|
655
655
|
return new Promise((res) => {
|
|
@@ -690,7 +690,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
690
690
|
xhr.addEventListener("error", () => rej(JSONAttemptParse(xhr.responseText)));
|
|
691
691
|
xhr.addEventListener("timeout", () => rej({ error: "Request timed out" }));
|
|
692
692
|
xhr.open("POST", options.url);
|
|
693
|
-
Object.entries(options.headers || {}).forEach(([key,
|
|
693
|
+
Object.entries(options.headers || {}).forEach(([key, value2]) => xhr.setRequestHeader(key, value2));
|
|
694
694
|
xhr.send(formData2);
|
|
695
695
|
});
|
|
696
696
|
}
|
|
@@ -1100,9 +1100,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1100
1100
|
__publicField(_Logger, "LOG_LEVEL", 4);
|
|
1101
1101
|
let Logger = _Logger;
|
|
1102
1102
|
function dec2Frac(num) {
|
|
1103
|
-
const gcd = (
|
|
1104
|
-
if (
|
|
1105
|
-
return gcd(
|
|
1103
|
+
const gcd = (a2, b2) => {
|
|
1104
|
+
if (b2 < 1e-7) return a2;
|
|
1105
|
+
return gcd(b2, ~~(a2 % b2));
|
|
1106
1106
|
};
|
|
1107
1107
|
const len = num.toString().length - 2;
|
|
1108
1108
|
let denominator = Math.pow(10, len);
|
|
@@ -1124,8 +1124,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1124
1124
|
if (!email) return "";
|
|
1125
1125
|
return `https://www.gravatar.com/avatar/${md5(email)}?d=${def}`;
|
|
1126
1126
|
}
|
|
1127
|
-
function escapeRegex(
|
|
1128
|
-
return
|
|
1127
|
+
function escapeRegex(value2) {
|
|
1128
|
+
return value2.replace(/[.*+?^${}()|\[\]\\]/g, "\\$&");
|
|
1129
1129
|
}
|
|
1130
1130
|
function PE(str, ...args) {
|
|
1131
1131
|
const combined = [];
|
|
@@ -1160,15 +1160,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1160
1160
|
__publicField(this, "methods");
|
|
1161
1161
|
var _a;
|
|
1162
1162
|
if (typeof Event == "object") return Object.assign(this, Event);
|
|
1163
|
-
let [
|
|
1163
|
+
let [p2, scope, method] = Event.replaceAll(/\/{2,}/g, "/").split(":");
|
|
1164
1164
|
if (!method) method = scope || "*";
|
|
1165
|
-
if (
|
|
1166
|
-
|
|
1165
|
+
if (p2 == "*" || !p2 && method == "*") {
|
|
1166
|
+
p2 = "";
|
|
1167
1167
|
method = "*";
|
|
1168
1168
|
}
|
|
1169
|
-
let temp =
|
|
1169
|
+
let temp = p2.split("/").filter((p22) => !!p22);
|
|
1170
1170
|
this.module = ((_a = temp.splice(0, 1)[0]) == null ? void 0 : _a.toLowerCase()) || "";
|
|
1171
|
-
this.fullPath =
|
|
1171
|
+
this.fullPath = p2;
|
|
1172
1172
|
this.path = temp.join("/");
|
|
1173
1173
|
this.name = temp.pop() || "";
|
|
1174
1174
|
this.methods = new ASet(method.split(""));
|
|
@@ -1177,43 +1177,43 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1177
1177
|
get all() {
|
|
1178
1178
|
return this.methods.has("*");
|
|
1179
1179
|
}
|
|
1180
|
-
set all(
|
|
1181
|
-
|
|
1180
|
+
set all(v2) {
|
|
1181
|
+
v2 ? new ASet(["*"]) : this.methods.delete("*");
|
|
1182
1182
|
}
|
|
1183
1183
|
/** None specified */
|
|
1184
1184
|
get none() {
|
|
1185
1185
|
return this.methods.has("n");
|
|
1186
1186
|
}
|
|
1187
|
-
set none(
|
|
1188
|
-
|
|
1187
|
+
set none(v2) {
|
|
1188
|
+
v2 ? this.methods = new ASet(["n"]) : this.methods.delete("n");
|
|
1189
1189
|
}
|
|
1190
1190
|
/** Create method specified */
|
|
1191
1191
|
get create() {
|
|
1192
1192
|
return !this.methods.has("n") && (this.methods.has("*") || this.methods.has("c"));
|
|
1193
1193
|
}
|
|
1194
|
-
set create(
|
|
1195
|
-
|
|
1194
|
+
set create(v2) {
|
|
1195
|
+
v2 ? this.methods.delete("n").add("c") : this.methods.delete("c");
|
|
1196
1196
|
}
|
|
1197
1197
|
/** Read method specified */
|
|
1198
1198
|
get read() {
|
|
1199
1199
|
return !this.methods.has("n") && (this.methods.has("*") || this.methods.has("r"));
|
|
1200
1200
|
}
|
|
1201
|
-
set read(
|
|
1202
|
-
|
|
1201
|
+
set read(v2) {
|
|
1202
|
+
v2 ? this.methods.delete("n").add("r") : this.methods.delete("r");
|
|
1203
1203
|
}
|
|
1204
1204
|
/** Update method specified */
|
|
1205
1205
|
get update() {
|
|
1206
1206
|
return !this.methods.has("n") && (this.methods.has("*") || this.methods.has("u"));
|
|
1207
1207
|
}
|
|
1208
|
-
set update(
|
|
1209
|
-
|
|
1208
|
+
set update(v2) {
|
|
1209
|
+
v2 ? this.methods.delete("n").add("u") : this.methods.delete("u");
|
|
1210
1210
|
}
|
|
1211
1211
|
/** Delete method specified */
|
|
1212
1212
|
get delete() {
|
|
1213
1213
|
return !this.methods.has("n") && (this.methods.has("*") || this.methods.has("d"));
|
|
1214
1214
|
}
|
|
1215
|
-
set delete(
|
|
1216
|
-
|
|
1215
|
+
set delete(v2) {
|
|
1216
|
+
v2 ? this.methods.delete("n").add("d") : this.methods.delete("d");
|
|
1217
1217
|
}
|
|
1218
1218
|
/**
|
|
1219
1219
|
* Combine multiple events into one parsed object. Longest path takes precedent, but all subsequent methods are
|
|
@@ -1224,14 +1224,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1224
1224
|
*/
|
|
1225
1225
|
static combine(...paths) {
|
|
1226
1226
|
let hitNone = false;
|
|
1227
|
-
const combined = paths.map((
|
|
1227
|
+
const combined = paths.map((p2) => new PathEvent(p2)).toSorted((p1, p2) => {
|
|
1228
1228
|
const l1 = p1.fullPath.length, l2 = p2.fullPath.length;
|
|
1229
1229
|
return l1 < l2 ? 1 : l1 > l2 ? -1 : 0;
|
|
1230
|
-
}).reduce((acc,
|
|
1231
|
-
if (
|
|
1232
|
-
if (!acc) return
|
|
1230
|
+
}).reduce((acc, p2) => {
|
|
1231
|
+
if (p2.none) hitNone = true;
|
|
1232
|
+
if (!acc) return p2;
|
|
1233
1233
|
if (hitNone) return acc;
|
|
1234
|
-
acc.methods = [...acc.methods, ...
|
|
1234
|
+
acc.methods = [...acc.methods, ...p2.methods];
|
|
1235
1235
|
return acc;
|
|
1236
1236
|
}, null);
|
|
1237
1237
|
combined.methods = new ASet(combined.methods);
|
|
@@ -1262,12 +1262,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1262
1262
|
static has(target, ...has) {
|
|
1263
1263
|
const parsedRequired = makeArray(has).map((pe) => new PathEvent(pe));
|
|
1264
1264
|
const parsedTarget = makeArray(target).map((pe) => new PathEvent(pe));
|
|
1265
|
-
return !!parsedRequired.find((
|
|
1266
|
-
if (!
|
|
1267
|
-
const filtered = parsedTarget.filter((
|
|
1265
|
+
return !!parsedRequired.find((r2) => {
|
|
1266
|
+
if (!r2.fullPath && r2.all) return true;
|
|
1267
|
+
const filtered = parsedTarget.filter((p2) => r2.fullPath.startsWith(p2.fullPath));
|
|
1268
1268
|
if (!filtered.length) return false;
|
|
1269
1269
|
const combined = PathEvent.combine(...filtered);
|
|
1270
|
-
return !combined.none && (combined.all ||
|
|
1270
|
+
return !combined.none && (combined.all || r2.all) || combined.methods.intersection(r2.methods).length;
|
|
1271
1271
|
});
|
|
1272
1272
|
}
|
|
1273
1273
|
/**
|
|
@@ -1306,10 +1306,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1306
1306
|
* @return {string} String representation of Event
|
|
1307
1307
|
*/
|
|
1308
1308
|
static toString(path, methods) {
|
|
1309
|
-
let
|
|
1310
|
-
|
|
1311
|
-
if (methods == null ? void 0 : methods.length)
|
|
1312
|
-
return
|
|
1309
|
+
let p2 = makeArray(path).filter((p22) => p22 != null).join("/");
|
|
1310
|
+
p2 = p2 == null ? void 0 : p2.trim().replaceAll(/\/{2,}/g, "/").replaceAll(/(^\/|\/$)/g, "");
|
|
1311
|
+
if (methods == null ? void 0 : methods.length) p2 += `:${makeArray(methods).map((m) => m.toLowerCase()).join("")}`;
|
|
1312
|
+
return p2;
|
|
1313
1313
|
}
|
|
1314
1314
|
/**
|
|
1315
1315
|
* Filter a set of paths based on this event
|
|
@@ -1357,22 +1357,59 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1357
1357
|
emitter.on("*", (event, ...args) => this.emit(event, ...args));
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
|
+
function search(rows, search, regex, transform = (r2) => r2) {
|
|
1361
|
+
if (!rows) return [];
|
|
1362
|
+
return rows.filter((r) => {
|
|
1363
|
+
const value = transform(r);
|
|
1364
|
+
if (!search) return true;
|
|
1365
|
+
if (regex) {
|
|
1366
|
+
return !!Object.values(value).filter((v2) => {
|
|
1367
|
+
try {
|
|
1368
|
+
return RegExp(search, "gm").test(v2.toString());
|
|
1369
|
+
} catch {
|
|
1370
|
+
return false;
|
|
1371
|
+
}
|
|
1372
|
+
}).length;
|
|
1373
|
+
}
|
|
1374
|
+
const or = search.split("||").map((p2) => p2.trim()).filter((p2) => !!p2);
|
|
1375
|
+
return -1 != or.findIndex((p) => {
|
|
1376
|
+
const and = p.split("&&").map((p2) => p2.trim()).filter((p2) => !!p2);
|
|
1377
|
+
return and.filter((p) => {
|
|
1378
|
+
const prop = /(\w+)\s*(==?|!=|>=|>|<=|<)\s*(\w+)/g.exec(p);
|
|
1379
|
+
if (prop) {
|
|
1380
|
+
const a = JSON.stringify(JSONAttemptParse(dotNotation(value, prop[1])));
|
|
1381
|
+
const operator = prop[2] == "=" ? "==" : prop[2];
|
|
1382
|
+
const b = JSON.stringify(JSONAttemptParse(prop[3]));
|
|
1383
|
+
return eval(`${a} ${operator} ${b}`);
|
|
1384
|
+
}
|
|
1385
|
+
const v = Object.values(value).join("");
|
|
1386
|
+
if (/[A-Z]/g.test(search)) return v.includes(p);
|
|
1387
|
+
return v.toLowerCase().includes(p);
|
|
1388
|
+
}).length == and.length;
|
|
1389
|
+
});
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1360
1392
|
function adjustedInterval(cb, ms) {
|
|
1361
1393
|
let cancel = false, timeout = null;
|
|
1362
|
-
const
|
|
1394
|
+
const p2 = async () => {
|
|
1363
1395
|
if (cancel) return;
|
|
1364
1396
|
const start = (/* @__PURE__ */ new Date()).getTime();
|
|
1365
1397
|
await cb();
|
|
1366
1398
|
const end = (/* @__PURE__ */ new Date()).getTime();
|
|
1367
|
-
timeout = setTimeout(() =>
|
|
1399
|
+
timeout = setTimeout(() => p2(), ms - (end - start) || 1);
|
|
1368
1400
|
};
|
|
1369
|
-
|
|
1401
|
+
p2();
|
|
1370
1402
|
return () => {
|
|
1371
1403
|
cancel = true;
|
|
1372
1404
|
if (timeout) clearTimeout(timeout);
|
|
1373
1405
|
};
|
|
1374
1406
|
}
|
|
1375
|
-
function
|
|
1407
|
+
function adjustTz(date, offset) {
|
|
1408
|
+
const currentOffset = date.getTimezoneOffset();
|
|
1409
|
+
offset = currentOffset - offset * 60;
|
|
1410
|
+
return new Date(date.getTime() + offset * 6e4);
|
|
1411
|
+
}
|
|
1412
|
+
function formatDate(date, format = "YYYY-MM-DD H:mm", tz) {
|
|
1376
1413
|
if (typeof date == "number" || typeof date == "string") date = new Date(date);
|
|
1377
1414
|
function day(num) {
|
|
1378
1415
|
switch (num) {
|
|
@@ -1447,11 +1484,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1447
1484
|
return (offset > 0 ? "-" : "") + `${hours}:${minutes.toString().padStart(2, "0")}`;
|
|
1448
1485
|
}
|
|
1449
1486
|
function timezone(date2) {
|
|
1450
|
-
|
|
1451
|
-
const formattedDate = formatter.format(date2);
|
|
1452
|
-
return formattedDate.split(" ").pop() || "";
|
|
1487
|
+
return new Intl.DateTimeFormat("en-US", { timeZoneName: "short" }).format(date2).split(" ").pop() || "";
|
|
1453
1488
|
}
|
|
1454
|
-
return format.replaceAll("YYYY", date.getFullYear().toString()).replaceAll("YY", date.getFullYear().toString().slice(2)).replaceAll("MMMM", month(date.getMonth())).replaceAll("MMM", month(date.getMonth()).slice(0, 2)).replaceAll("MM", (date.getMonth() + 1).toString().padStart(2, "0")).replaceAll("M", (date.getMonth() + 1).toString()).replaceAll("DDD", doy(date).toString()).replaceAll("DD", date.getDate().toString().padStart(2, "0")).replaceAll("Do", suffix(date.getDate())).replaceAll("D", date.getDate().toString()).replaceAll("dddd", day(date.getDay())).replaceAll("ddd", day(date.getDay()).slice(0, 2)).replaceAll("dd", date.getDate().toString().padStart(2, "0")).replaceAll("d", date.getDay().toString()).replaceAll("HH", date.getHours().toString().padStart(2, "0")).replaceAll("H", date.getHours().toString()).replaceAll("hh", (date.getHours() > 12 ? date.getHours() - 12 : date.getHours()).toString().padStart(2, "0")).replaceAll("h", (date.getHours() > 12 ? date.getHours() - 12 : date.getHours()).toString()).replaceAll("mm", date.getMinutes().toString().padStart(2, "0")).replaceAll("m", date.getMinutes().toString()).replaceAll("ss", date.getSeconds().toString().padStart(2, "0")).replaceAll("s", date.getSeconds().toString()).replaceAll("SSS", date.getMilliseconds().toString()).replaceAll("SS", date.getMilliseconds().toString().slice(0, 1)).replaceAll("S", date.getMilliseconds().toString()[0]).replaceAll("A", date.getHours() >= 12 ? "PM" : "AM").replaceAll("a", date.getHours() >= 12 ? "pm" : "am").replaceAll("ZZ", tzOffset(date.getTimezoneOffset()).replace(":", "")).replaceAll("Z", tzOffset(date.getTimezoneOffset())).replaceAll("z", timezone(date));
|
|
1489
|
+
return format.replaceAll("YYYY", date.getFullYear().toString()).replaceAll("YY", date.getFullYear().toString().slice(2)).replaceAll("MMMM", month(date.getMonth())).replaceAll("MMM", month(date.getMonth()).slice(0, 2)).replaceAll("MM", (date.getMonth() + 1).toString().padStart(2, "0")).replaceAll("M", (date.getMonth() + 1).toString()).replaceAll("DDD", doy(date).toString()).replaceAll("DD", date.getDate().toString().padStart(2, "0")).replaceAll("Do", suffix(date.getDate())).replaceAll("D", date.getDate().toString()).replaceAll("dddd", day(date.getDay())).replaceAll("ddd", day(date.getDay()).slice(0, 2)).replaceAll("dd", date.getDate().toString().padStart(2, "0")).replaceAll("d", date.getDay().toString()).replaceAll("HH", date.getHours().toString().padStart(2, "0")).replaceAll("H", date.getHours().toString()).replaceAll("hh", (date.getHours() > 12 ? date.getHours() - 12 : date.getHours()).toString().padStart(2, "0")).replaceAll("h", (date.getHours() > 12 ? date.getHours() - 12 : date.getHours()).toString()).replaceAll("mm", date.getMinutes().toString().padStart(2, "0")).replaceAll("m", date.getMinutes().toString()).replaceAll("ss", date.getSeconds().toString().padStart(2, "0")).replaceAll("s", date.getSeconds().toString()).replaceAll("SSS", date.getMilliseconds().toString().padEnd(3, "0")).replaceAll("SS", date.getMilliseconds().toString().slice(0, 1).padEnd(2, "0")).replaceAll("S", date.getMilliseconds().toString()[0]).replaceAll("A", date.getHours() >= 12 ? "PM" : "AM").replaceAll("a", date.getHours() >= 12 ? "pm" : "am").replaceAll("ZZ", tzOffset(isNaN(tz) ? date.getTimezoneOffset() : tz).replace(":", "")).replaceAll("Z", tzOffset(isNaN(tz) ? date.getTimezoneOffset() : tz)).replaceAll("z", typeof tz == "string" ? tz : timezone(date));
|
|
1490
|
+
}
|
|
1491
|
+
function instantInterval(fn, interval) {
|
|
1492
|
+
fn();
|
|
1493
|
+
return setInterval(fn, interval);
|
|
1455
1494
|
}
|
|
1456
1495
|
function sleep(ms) {
|
|
1457
1496
|
return new Promise((res) => setTimeout(res, ms));
|
|
@@ -1465,90 +1504,93 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1465
1504
|
function typeKeys() {
|
|
1466
1505
|
return Object.keys({});
|
|
1467
1506
|
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1507
|
+
exports.ASet = ASet;
|
|
1508
|
+
exports.BadGatewayError = BadGatewayError;
|
|
1509
|
+
exports.BadRequestError = BadRequestError;
|
|
1510
|
+
exports.CHAR_LIST = CHAR_LIST;
|
|
1511
|
+
exports.Cache = Cache;
|
|
1512
|
+
exports.CliBackground = CliBackground;
|
|
1513
|
+
exports.CliEffects = CliEffects;
|
|
1514
|
+
exports.CliForeground = CliForeground;
|
|
1515
|
+
exports.CustomError = CustomError;
|
|
1516
|
+
exports.ForbiddenError = ForbiddenError;
|
|
1517
|
+
exports.GatewayTimeoutError = GatewayTimeoutError;
|
|
1518
|
+
exports.Http = Http;
|
|
1519
|
+
exports.InternalServerError = InternalServerError;
|
|
1520
|
+
exports.JSONAttemptParse = JSONAttemptParse;
|
|
1521
|
+
exports.JSONSanitize = JSONSanitize;
|
|
1522
|
+
exports.LETTER_LIST = LETTER_LIST;
|
|
1523
|
+
exports.LOG_LEVEL = LOG_LEVEL;
|
|
1524
|
+
exports.Logger = Logger;
|
|
1525
|
+
exports.MethodNotAllowedError = MethodNotAllowedError;
|
|
1526
|
+
exports.NUMBER_LIST = NUMBER_LIST;
|
|
1527
|
+
exports.NotAcceptableError = NotAcceptableError;
|
|
1528
|
+
exports.NotFoundError = NotFoundError;
|
|
1529
|
+
exports.NotImplementedError = NotImplementedError;
|
|
1530
|
+
exports.PE = PE;
|
|
1531
|
+
exports.PES = PES;
|
|
1532
|
+
exports.PathError = PathError;
|
|
1533
|
+
exports.PathEvent = PathEvent;
|
|
1534
|
+
exports.PathEventEmitter = PathEventEmitter;
|
|
1535
|
+
exports.PaymentRequiredError = PaymentRequiredError;
|
|
1536
|
+
exports.PromiseProgress = PromiseProgress;
|
|
1537
|
+
exports.SYMBOL_LIST = SYMBOL_LIST;
|
|
1538
|
+
exports.ServiceUnavailableError = ServiceUnavailableError;
|
|
1539
|
+
exports.TypedEmitter = TypedEmitter;
|
|
1540
|
+
exports.UnauthorizedError = UnauthorizedError;
|
|
1541
|
+
exports.addUnique = addUnique;
|
|
1542
|
+
exports.adjustTz = adjustTz;
|
|
1543
|
+
exports.adjustedInterval = adjustedInterval;
|
|
1544
|
+
exports.arrayDiff = arrayDiff;
|
|
1545
|
+
exports.caseInsensitiveSort = caseInsensitiveSort;
|
|
1546
|
+
exports.clean = clean;
|
|
1547
|
+
exports.dec2Frac = dec2Frac;
|
|
1548
|
+
exports.deepCopy = deepCopy;
|
|
1549
|
+
exports.deepMerge = deepMerge;
|
|
1550
|
+
exports.dotNotation = dotNotation;
|
|
1551
|
+
exports.downloadFile = downloadFile;
|
|
1552
|
+
exports.downloadUrl = downloadUrl;
|
|
1553
|
+
exports.encodeQuery = encodeQuery;
|
|
1554
|
+
exports.errorFromCode = errorFromCode;
|
|
1555
|
+
exports.escapeRegex = escapeRegex;
|
|
1556
|
+
exports.fileBrowser = fileBrowser;
|
|
1557
|
+
exports.fileText = fileText;
|
|
1558
|
+
exports.findByProp = findByProp;
|
|
1559
|
+
exports.flattenArr = flattenArr;
|
|
1560
|
+
exports.flattenObj = flattenObj;
|
|
1561
|
+
exports.formData = formData;
|
|
1562
|
+
exports.formatBytes = formatBytes;
|
|
1563
|
+
exports.formatDate = formatDate;
|
|
1564
|
+
exports.formatPhoneNumber = formatPhoneNumber;
|
|
1565
|
+
exports.fracToDec = fracToDec;
|
|
1566
|
+
exports.fromCsv = fromCsv;
|
|
1567
|
+
exports.gravatar = gravatar;
|
|
1568
|
+
exports.includes = includes;
|
|
1569
|
+
exports.insertAt = insertAt;
|
|
1570
|
+
exports.instantInterval = instantInterval;
|
|
1571
|
+
exports.isEqual = isEqual;
|
|
1572
|
+
exports.jwtDecode = jwtDecode;
|
|
1573
|
+
exports.makeArray = makeArray;
|
|
1574
|
+
exports.makeUnique = makeUnique;
|
|
1575
|
+
exports.matchAll = matchAll;
|
|
1576
|
+
exports.md5 = md5;
|
|
1577
|
+
exports.mixin = mixin;
|
|
1578
|
+
exports.pad = pad;
|
|
1579
|
+
exports.parseUrl = parseUrl;
|
|
1580
|
+
exports.randomHex = randomHex;
|
|
1581
|
+
exports.randomString = randomString;
|
|
1582
|
+
exports.randomStringBuilder = randomStringBuilder;
|
|
1583
|
+
exports.search = search;
|
|
1584
|
+
exports.sleep = sleep;
|
|
1585
|
+
exports.sleepWhile = sleepWhile;
|
|
1586
|
+
exports.sortByProp = sortByProp;
|
|
1587
|
+
exports.strSplice = strSplice;
|
|
1588
|
+
exports.timeUntil = timeUntil;
|
|
1589
|
+
exports.timestampFilename = timestampFilename;
|
|
1590
|
+
exports.toCsv = toCsv;
|
|
1591
|
+
exports.typeKeys = typeKeys;
|
|
1592
|
+
exports.uploadWithProgress = uploadWithProgress;
|
|
1593
|
+
exports.validateEmail = validateEmail;
|
|
1594
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
1553
1595
|
});
|
|
1554
1596
|
//# sourceMappingURL=index.cjs.map
|