@aiao/utils 0.0.5 → 0.0.7
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/@browser/broadcast-channel-pool.d.ts +26 -6
- package/dist/@browser/broadcast-channel-pool.d.ts.map +1 -1
- package/dist/@browser/index.d.ts +2 -0
- package/dist/@browser/index.d.ts.map +1 -1
- package/dist/@browser/leader-election.d.ts +40 -2
- package/dist/@browser/leader-election.d.ts.map +1 -1
- package/dist/@browser/opfs-detection.d.ts +12 -0
- package/dist/@browser/opfs-detection.d.ts.map +1 -0
- package/dist/@browser/requestIdleCallbackPolyfill.d.ts +2 -0
- package/dist/@browser/requestIdleCallbackPolyfill.d.ts.map +1 -0
- package/dist/array/difference.d.ts +3 -3
- package/dist/array/flatten.d.ts +3 -3
- package/dist/array/flattenDeep.d.ts +3 -3
- package/dist/array/intersection.d.ts +4 -4
- package/dist/array/needArray.d.ts +5 -10
- package/dist/array/needArray.d.ts.map +1 -1
- package/dist/array/orderBy.d.ts +18 -4
- package/dist/array/orderBy.d.ts.map +1 -1
- package/dist/array/sortBy.d.ts +5 -5
- package/dist/array/unionBy.d.ts +20 -0
- package/dist/array/unionBy.d.ts.map +1 -1
- package/dist/async/{AsyncTaskExecutor.d.ts → AsyncQueueExecutor.d.ts} +15 -10
- package/dist/async/AsyncQueueExecutor.d.ts.map +1 -0
- package/dist/async/index.d.ts +1 -1
- package/dist/async/index.d.ts.map +1 -1
- package/dist/async/nextMacroTask.d.ts +11 -2
- package/dist/async/nextMacroTask.d.ts.map +1 -1
- package/dist/async/nextMicroTask.d.ts +1 -1
- package/dist/binary/uint8ArrayToString.d.ts +1 -1
- package/dist/collection/traverseObjectKeys.d.ts.map +1 -1
- package/dist/crypto/aesDecrypt.d.ts +12 -5
- package/dist/crypto/aesDecrypt.d.ts.map +1 -1
- package/dist/crypto/aesEncrypt.d.ts +2 -2
- package/dist/crypto/rsaGenerateKey.d.ts +22 -0
- package/dist/crypto/rsaGenerateKey.d.ts.map +1 -1
- package/dist/date/parseTime.d.ts +23 -0
- package/dist/date/parseTime.d.ts.map +1 -1
- package/dist/date/stringTime.d.ts +12 -0
- package/dist/date/stringTime.d.ts.map +1 -1
- package/dist/function/once.d.ts +2 -2
- package/dist/function/throttle.d.ts +3 -3
- package/dist/index.js +471 -409
- package/dist/indexing/fractional-indexing.d.ts +50 -11
- package/dist/indexing/fractional-indexing.d.ts.map +1 -1
- package/dist/number/canBeNumber.d.ts +2 -2
- package/dist/number/numberStep.d.ts +2 -2
- package/dist/number/numberStepScreenSize.d.ts +13 -0
- package/dist/number/numberStepScreenSize.d.ts.map +1 -1
- package/dist/number/numberStrip.d.ts +3 -3
- package/dist/number/toInt.d.ts +12 -6
- package/dist/number/toInt.d.ts.map +1 -1
- package/dist/number/tryToNumber.d.ts +17 -8
- package/dist/number/tryToNumber.d.ts.map +1 -1
- package/dist/object/deepFreeze.d.ts +17 -1
- package/dist/object/deepFreeze.d.ts.map +1 -1
- package/dist/object/flattenPathObjectToPlainObject.d.ts +14 -3
- package/dist/object/flattenPathObjectToPlainObject.d.ts.map +1 -1
- package/dist/object/get.d.ts +2 -2
- package/dist/object/has.d.ts +2 -2
- package/dist/object/isEqual.d.ts +3 -3
- package/dist/object/omit.d.ts +2 -2
- package/dist/object/omitBy.d.ts +3 -3
- package/dist/object/pick.d.ts +2 -2
- package/dist/object/plainObjectToFlattenPathObject.d.ts +10 -4
- package/dist/object/plainObjectToFlattenPathObject.d.ts.map +1 -1
- package/dist/object/set.d.ts +3 -3
- package/dist/object/setWith.d.ts +0 -1
- package/dist/object/setWith.d.ts.map +1 -1
- package/dist/object/toPlainObject.d.ts +19 -0
- package/dist/object/toPlainObject.d.ts.map +1 -1
- package/dist/object/zipObject.d.ts +22 -5
- package/dist/object/zipObject.d.ts.map +1 -1
- package/dist/platform/is-browser.d.ts +14 -1
- package/dist/platform/is-browser.d.ts.map +1 -1
- package/dist/random/randomArrayItem.d.ts +18 -1
- package/dist/random/randomArrayItem.d.ts.map +1 -1
- package/dist/random/randomFloat.d.ts +16 -0
- package/dist/random/randomFloat.d.ts.map +1 -1
- package/dist/random/randomInt.d.ts +14 -4
- package/dist/random/randomInt.d.ts.map +1 -1
- package/dist/random/randomString.d.ts +16 -0
- package/dist/random/randomString.d.ts.map +1 -1
- package/dist/random/randomUintByLength.d.ts +15 -0
- package/dist/random/randomUintByLength.d.ts.map +1 -1
- package/dist/random/randomUintString.d.ts +15 -0
- package/dist/random/randomUintString.d.ts.map +1 -1
- package/dist/string/camelCase.d.ts +1 -1
- package/dist/string/getWords.d.ts +21 -0
- package/dist/string/getWords.d.ts.map +1 -1
- package/dist/string/kebabCase.d.ts +2 -2
- package/dist/string/stringSingleline.d.ts +14 -1
- package/dist/string/stringSingleline.d.ts.map +1 -1
- package/dist/string/stringToArrayBuffer.d.ts +0 -1
- package/dist/string/stringToArrayBuffer.d.ts.map +1 -1
- package/dist/tools/event.d.ts +35 -22
- package/dist/tools/event.d.ts.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/type-definition/result-types.d.ts +26 -4
- package/dist/type-definition/result-types.d.ts.map +1 -1
- package/dist/types/AnyFunction.d.ts +2 -2
- package/dist/types/DeepPartial.d.ts +3 -3
- package/dist/types/isArray.d.ts +1 -1
- package/dist/types/isArrayBuffer.d.ts +3 -3
- package/dist/types/isBoolean.d.ts +3 -3
- package/dist/types/isDate.d.ts +3 -3
- package/dist/types/isEmpty.d.ts +4 -4
- package/dist/types/isNil.d.ts +2 -2
- package/dist/types/isNumber.d.ts +3 -3
- package/dist/types/isObject.d.ts +2 -2
- package/dist/types/isPlainObject.d.ts +3 -3
- package/dist/types/isPrimitive.d.ts +3 -3
- package/dist/types/isRegExp.d.ts +3 -3
- package/dist/types/isString.d.ts +2 -2
- package/dist/types/isUint8Array.d.ts +3 -3
- package/package.json +4 -4
- package/dist/async/AsyncTaskExecutor.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,33 +1,58 @@
|
|
|
1
|
-
import { Observable as
|
|
1
|
+
import { Observable as ce, shareReplay as ie, BehaviorSubject as ae, distinctUntilChanged as le } from "rxjs";
|
|
2
2
|
import ue from "ms";
|
|
3
3
|
import { distance as fe } from "fastest-levenshtein";
|
|
4
4
|
class he {
|
|
5
|
-
|
|
5
|
+
cache = /* @__PURE__ */ new Map();
|
|
6
|
+
/**
|
|
7
|
+
* 发送消息到指定频道
|
|
8
|
+
* @param event 频道名称
|
|
9
|
+
* @param data 消息数据
|
|
10
|
+
* @throws 如果频道不存在则抛出错误
|
|
11
|
+
*/
|
|
6
12
|
emit(t, r) {
|
|
7
|
-
const n = this
|
|
8
|
-
if (n
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
throw new Error("broadcast-channel not found");
|
|
13
|
+
const n = this.cache.get(t);
|
|
14
|
+
if (!n)
|
|
15
|
+
throw new Error(`BroadcastChannel "${t}" not found`);
|
|
16
|
+
n.channel.postMessage(r);
|
|
12
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* 订阅指定频道的消息
|
|
20
|
+
* @param event 频道名称
|
|
21
|
+
* @returns Observable 消息流
|
|
22
|
+
*/
|
|
13
23
|
on(t) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const r = this.cache.get(t);
|
|
25
|
+
if (r)
|
|
26
|
+
return r.refCount++, r.observable;
|
|
27
|
+
const n = new BroadcastChannel(t), o = new ce((s) => {
|
|
28
|
+
const i = (a) => {
|
|
29
|
+
try {
|
|
30
|
+
s.next(a.data);
|
|
31
|
+
} catch (l) {
|
|
32
|
+
s.error(l);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
return n.addEventListener("message", i), () => {
|
|
36
|
+
n.removeEventListener("message", i), this.decrementRef(t);
|
|
37
|
+
};
|
|
38
|
+
}).pipe(ie(1)), c = {
|
|
39
|
+
observable: o,
|
|
40
|
+
channel: n,
|
|
41
|
+
refCount: 1
|
|
42
|
+
};
|
|
43
|
+
return this.cache.set(t, c), o;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 减少引用计数,当计数为 0 时关闭频道
|
|
47
|
+
*/
|
|
48
|
+
decrementRef(t) {
|
|
49
|
+
const r = this.cache.get(t);
|
|
50
|
+
r && (r.refCount--, r.refCount <= 0 && (r.channel.close(), this.cache.delete(t)));
|
|
26
51
|
}
|
|
27
52
|
}
|
|
28
|
-
const
|
|
29
|
-
message$:
|
|
30
|
-
emit: (n) =>
|
|
53
|
+
const B = new he(), tt = (e) => ({
|
|
54
|
+
message$: B.on(e),
|
|
55
|
+
emit: (n) => B.emit(e, n)
|
|
31
56
|
}), pe = [
|
|
32
57
|
"mousemove",
|
|
33
58
|
"keydown",
|
|
@@ -42,11 +67,11 @@ const L = new he(), et = (e) => ({
|
|
|
42
67
|
"visibilitychange",
|
|
43
68
|
"focus"
|
|
44
69
|
];
|
|
45
|
-
class
|
|
70
|
+
class rt {
|
|
46
71
|
#e = 1e3 * 2;
|
|
47
72
|
#t;
|
|
48
|
-
#r = new
|
|
49
|
-
idle$ = this.#r.asObservable().pipe(
|
|
73
|
+
#r = new ae(!1);
|
|
74
|
+
idle$ = this.#r.asObservable().pipe(le());
|
|
50
75
|
constructor(t) {
|
|
51
76
|
this.#e = t?.timeout || this.#e;
|
|
52
77
|
}
|
|
@@ -67,24 +92,48 @@ class tt {
|
|
|
67
92
|
);
|
|
68
93
|
}
|
|
69
94
|
}
|
|
70
|
-
class
|
|
95
|
+
class nt {
|
|
96
|
+
/**
|
|
97
|
+
* @param name - 锁名称,相同名称的实例竞争同一个 leader 位置
|
|
98
|
+
*/
|
|
71
99
|
constructor(t) {
|
|
72
|
-
this.name = t, window.addEventListener("beforeunload",
|
|
100
|
+
this.name = t, window.addEventListener("beforeunload", this.#s);
|
|
73
101
|
}
|
|
74
|
-
#e
|
|
75
|
-
#t
|
|
76
|
-
#r;
|
|
77
|
-
#n;
|
|
102
|
+
#e;
|
|
103
|
+
#t;
|
|
104
|
+
#r = !1;
|
|
105
|
+
#n = !1;
|
|
106
|
+
#o = /* @__PURE__ */ new Set();
|
|
107
|
+
/** 当前是否为 leader */
|
|
78
108
|
get isLeader() {
|
|
79
|
-
return this.#
|
|
109
|
+
return this.#n;
|
|
80
110
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
111
|
+
/**
|
|
112
|
+
* 参与 leader 选举
|
|
113
|
+
* @param callback - 成为 leader 时回调,参数为 `true`
|
|
114
|
+
* @returns 取消订阅函数
|
|
115
|
+
*/
|
|
116
|
+
elect(t) {
|
|
117
|
+
return this.#o.add(t), this.#n ? t(!0) : this.#e || (this.#e = navigator.locks.request(this.name, async () => {
|
|
118
|
+
this.#n = !0, this.#o.forEach((r) => r(!0)), await new Promise((r) => {
|
|
119
|
+
this.#t = r;
|
|
120
|
+
});
|
|
121
|
+
})), () => this.#o.delete(t);
|
|
122
|
+
}
|
|
123
|
+
/** 释放 leader 身份并清理资源 */
|
|
124
|
+
dispose() {
|
|
125
|
+
this.#r || (this.#r = !0, window.removeEventListener("beforeunload", this.#s), this.#t?.(), this.#o.clear());
|
|
85
126
|
}
|
|
127
|
+
#s = () => this.dispose();
|
|
86
128
|
}
|
|
87
|
-
|
|
129
|
+
const de = () => "storage" in navigator && "getDirectory" in navigator.storage, ot = async () => {
|
|
130
|
+
try {
|
|
131
|
+
return de() ? !!await navigator.storage.getDirectory() : !1;
|
|
132
|
+
} catch (e) {
|
|
133
|
+
return console.error("OPFS not available:", e), !1;
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
function st(e, t) {
|
|
88
137
|
if (e.length === 0) return;
|
|
89
138
|
let r = 0;
|
|
90
139
|
function n() {
|
|
@@ -96,16 +145,26 @@ function nt(e, t) {
|
|
|
96
145
|
}
|
|
97
146
|
n();
|
|
98
147
|
}
|
|
99
|
-
const
|
|
148
|
+
const ct = () => {
|
|
149
|
+
window.requestIdleCallback = window.requestIdleCallback || ((e) => {
|
|
150
|
+
const t = Date.now();
|
|
151
|
+
return setTimeout(() => {
|
|
152
|
+
e({
|
|
153
|
+
didTimeout: !1,
|
|
154
|
+
timeRemaining: () => Math.max(0, 50 - (Date.now() - t))
|
|
155
|
+
});
|
|
156
|
+
}, 0);
|
|
157
|
+
}), window.cancelIdleCallback = window.cancelIdleCallback || ((e) => clearTimeout(e));
|
|
158
|
+
}, it = (e, t) => {
|
|
100
159
|
const r = Math.floor(t), n = [];
|
|
101
160
|
for (let o = 0; o < e.length; o += r)
|
|
102
161
|
n.push(e.slice(o, o + r));
|
|
103
162
|
return n;
|
|
104
|
-
},
|
|
105
|
-
function
|
|
163
|
+
}, at = (e, t) => e.filter((r) => !t.includes(r)), lt = (e) => Array.prototype.concat([], ...e), me = (e) => e.flatMap((t) => Array.isArray(t) ? me(t) : t), ut = (...e) => e.reduce((t, r) => t.filter((n) => r.includes(n))), b = Array.isArray, ye = (e) => e instanceof ArrayBuffer;
|
|
164
|
+
function ft(e) {
|
|
106
165
|
return e === !0 || e === !1 || e != null && typeof e.valueOf() == "boolean";
|
|
107
166
|
}
|
|
108
|
-
function
|
|
167
|
+
function G(e) {
|
|
109
168
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
110
169
|
}
|
|
111
170
|
const d = (e) => !!(e && e.constructor && e.call && e.apply), p = (e) => {
|
|
@@ -114,86 +173,84 @@ const d = (e) => !!(e && e.constructor && e.call && e.apply), p = (e) => {
|
|
|
114
173
|
} catch {
|
|
115
174
|
return !1;
|
|
116
175
|
}
|
|
117
|
-
},
|
|
176
|
+
}, ge = (e) => e && e.constructor === Symbol, ht = (e) => {
|
|
118
177
|
if (e === !0 || e === !1 || e === null || e === void 0) return !0;
|
|
119
178
|
if (p(e)) return e === 0;
|
|
120
|
-
if (
|
|
121
|
-
if (d(e) ||
|
|
179
|
+
if (G(e)) return isNaN(e.getTime());
|
|
180
|
+
if (d(e) || ge(e)) return !1;
|
|
122
181
|
const t = e.length;
|
|
123
182
|
if (p(t)) return t === 0;
|
|
124
183
|
const r = e.size;
|
|
125
184
|
return p(r) ? r === 0 : Object.keys(e).length === 0;
|
|
126
|
-
},
|
|
127
|
-
function
|
|
128
|
-
return
|
|
185
|
+
}, pt = (e) => p(e) && e % 1 !== 0, we = (e) => Number.isInteger(e);
|
|
186
|
+
function dt(e) {
|
|
187
|
+
return b(e) && e.every(we);
|
|
129
188
|
}
|
|
130
|
-
const
|
|
131
|
-
function
|
|
132
|
-
return
|
|
189
|
+
const V = (e) => e == null;
|
|
190
|
+
function mt(e) {
|
|
191
|
+
return b(e) && e.every(p);
|
|
133
192
|
}
|
|
134
|
-
const
|
|
135
|
-
function
|
|
193
|
+
const R = (e) => !!e && e.constructor === Object, yt = (e) => typeof e == "object" && e !== null;
|
|
194
|
+
function Ae(e) {
|
|
136
195
|
if (Object.prototype.toString.call(e) !== "[object Object]")
|
|
137
196
|
return !1;
|
|
138
197
|
const t = Object.getPrototypeOf(e);
|
|
139
198
|
return t === null || t === Object.prototype;
|
|
140
199
|
}
|
|
141
|
-
function
|
|
200
|
+
function gt(e) {
|
|
142
201
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
143
202
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
203
|
+
const wt = (e) => !(!e || !e.then || !d(e.then));
|
|
204
|
+
function At(e) {
|
|
146
205
|
return e instanceof RegExp;
|
|
147
206
|
}
|
|
148
|
-
function
|
|
207
|
+
function C(e) {
|
|
149
208
|
return typeof e == "string";
|
|
150
209
|
}
|
|
151
|
-
const
|
|
210
|
+
const Et = (e) => b(e) ? e.every(C) : !1, $ = (e) => e instanceof Uint8Array, St = (e) => Array.isArray(e) ? e : V(e) ? [] : [e], bt = (e, t = [], r = []) => {
|
|
152
211
|
const n = [...e];
|
|
153
212
|
return n.sort((o, c) => {
|
|
154
213
|
for (let s = 0; s < t.length; s++) {
|
|
155
|
-
const i = t[s], a = r[s] || "asc",
|
|
156
|
-
if (
|
|
157
|
-
if (
|
|
158
|
-
if (
|
|
214
|
+
const i = t[s], a = r[s] || "asc", l = o[i], u = c[i];
|
|
215
|
+
if (l == null && u == null) continue;
|
|
216
|
+
if (l == null) return a === "desc" ? 1 : -1;
|
|
217
|
+
if (u == null) return a === "desc" ? -1 : 1;
|
|
159
218
|
let f = 0;
|
|
160
|
-
if (
|
|
219
|
+
if (l < u ? f = -1 : l > u && (f = 1), a === "desc" && (f = -f), f !== 0)
|
|
161
220
|
return f;
|
|
162
221
|
}
|
|
163
222
|
return 0;
|
|
164
223
|
}), n;
|
|
165
|
-
},
|
|
224
|
+
}, Ct = (e) => (t, r) => {
|
|
166
225
|
const n = t[e], o = r[e];
|
|
167
226
|
return n == null && o == null ? 0 : n == null ? 1 : o == null ? -1 : n > o ? 1 : n < o ? -1 : 0;
|
|
168
|
-
},
|
|
169
|
-
class
|
|
227
|
+
}, Ot = (e, t) => e.filter(/* @__PURE__ */ ((r) => (n) => r.has(t(n)) ? !1 : r.add(t(n)))(/* @__PURE__ */ new Set()));
|
|
228
|
+
class Tt {
|
|
170
229
|
maxConcurrent;
|
|
171
230
|
running = 0;
|
|
172
231
|
queue = [];
|
|
232
|
+
queue_map = /* @__PURE__ */ new Map();
|
|
173
233
|
constructor(t = 3) {
|
|
174
234
|
this.maxConcurrent = t || 1;
|
|
175
235
|
}
|
|
176
236
|
/**
|
|
177
237
|
* 添加任务到执行器
|
|
178
238
|
* @param task - 返回 Promise 的异步任务函数
|
|
239
|
+
* @param id - 任务唯一标识符(可选),用于去重相同任务
|
|
179
240
|
* @returns 返回任务执行结果的 Promise
|
|
180
241
|
*/
|
|
181
|
-
addTask(t) {
|
|
182
|
-
|
|
242
|
+
addTask(t, r) {
|
|
243
|
+
if (r && this.queue_map.has(r))
|
|
244
|
+
return this.queue_map.get(r);
|
|
245
|
+
const n = new Promise((o, c) => {
|
|
183
246
|
this.queue.push({
|
|
184
247
|
task: t,
|
|
185
|
-
resolve:
|
|
186
|
-
reject:
|
|
187
|
-
|
|
248
|
+
resolve: o,
|
|
249
|
+
reject: c,
|
|
250
|
+
id: r
|
|
251
|
+
}), this._run_next();
|
|
188
252
|
});
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* 批量添加多个任务
|
|
192
|
-
* @param tasks - 任务数组
|
|
193
|
-
* @returns 返回所有任务结果的 Promise 数组
|
|
194
|
-
*/
|
|
195
|
-
addTasks(t) {
|
|
196
|
-
return Promise.all(t.map((r) => this.addTask(r)));
|
|
253
|
+
return r !== void 0 && this.queue_map.set(r, n), n;
|
|
197
254
|
}
|
|
198
255
|
/**
|
|
199
256
|
* 获取当前状态
|
|
@@ -212,7 +269,7 @@ class St {
|
|
|
212
269
|
*/
|
|
213
270
|
setMaxConcurrent(t) {
|
|
214
271
|
for (t = t || 1, this.maxConcurrent = t; this.running < this.maxConcurrent && this.queue.length > 0; )
|
|
215
|
-
this.
|
|
272
|
+
this._run_next();
|
|
216
273
|
}
|
|
217
274
|
/**
|
|
218
275
|
* 清空队列(不影响正在执行的任务)
|
|
@@ -220,7 +277,7 @@ class St {
|
|
|
220
277
|
clearQueue() {
|
|
221
278
|
this.queue.forEach(({ reject: t }) => {
|
|
222
279
|
t(new Error("Task cancelled: queue cleared"));
|
|
223
|
-
}), this.queue = [];
|
|
280
|
+
}), this.queue = [], this.queue_map.clear();
|
|
224
281
|
}
|
|
225
282
|
/**
|
|
226
283
|
* 等待所有任务完成
|
|
@@ -249,62 +306,62 @@ class St {
|
|
|
249
306
|
/**
|
|
250
307
|
* 执行队列中的下一个任务
|
|
251
308
|
*/
|
|
252
|
-
|
|
309
|
+
_run_next() {
|
|
253
310
|
if (this.running >= this.maxConcurrent || this.queue.length === 0) return;
|
|
254
311
|
const t = this.queue.shift();
|
|
255
312
|
if (!t) return;
|
|
256
|
-
const { task: r, resolve: n, reject: o } = t;
|
|
257
|
-
this.running++, Promise.resolve().then(() => r()).then((
|
|
258
|
-
n(
|
|
259
|
-
}).catch((
|
|
260
|
-
o(
|
|
313
|
+
const { task: r, resolve: n, reject: o, id: c } = t;
|
|
314
|
+
this.running++, Promise.resolve().then(() => r()).then((s) => {
|
|
315
|
+
n(s);
|
|
316
|
+
}).catch((s) => {
|
|
317
|
+
o(s);
|
|
261
318
|
}).finally(() => {
|
|
262
|
-
this.running--, this.
|
|
319
|
+
this.running--, c !== void 0 && this.queue_map.delete(c), this._run_next();
|
|
263
320
|
});
|
|
264
321
|
}
|
|
265
322
|
}
|
|
266
|
-
const
|
|
267
|
-
function
|
|
323
|
+
const Pt = (e) => setTimeout(() => e(), 0), L = /* @__PURE__ */ Promise.resolve(), $t = (e) => e ? L.then(e) : L, Mt = (e) => new Promise((t) => setTimeout(t, e)), Ee = new TextDecoder(), Rt = (e) => Ee.decode(e);
|
|
324
|
+
function Se(e, t) {
|
|
268
325
|
for (const r in e)
|
|
269
|
-
Object.prototype.hasOwnProperty.call(e, r) && (t(r, e[r], e),
|
|
326
|
+
Object.prototype.hasOwnProperty.call(e, r) && (t(r, e[r], e), Z(e[r], t));
|
|
270
327
|
}
|
|
271
|
-
const
|
|
272
|
-
Array.isArray(e) ? e.forEach((r) =>
|
|
273
|
-
},
|
|
328
|
+
const Z = (e, t) => {
|
|
329
|
+
Array.isArray(e) ? e.forEach((r) => Z(r, t)) : R(e) && Se(e, t);
|
|
330
|
+
}, T = (e) => new Uint8Array(
|
|
274
331
|
atob(e).split("").map((t) => t.charCodeAt(0))
|
|
275
332
|
);
|
|
276
|
-
async function
|
|
333
|
+
async function _t(e, t, r) {
|
|
277
334
|
const n = await crypto.subtle.importKey(
|
|
278
335
|
"raw",
|
|
279
|
-
|
|
336
|
+
T(t),
|
|
280
337
|
{
|
|
281
338
|
name: "AES-GCM",
|
|
282
339
|
length: 256
|
|
283
340
|
},
|
|
284
341
|
!0,
|
|
285
342
|
["decrypt"]
|
|
286
|
-
), o =
|
|
343
|
+
), o = T(r), c = await crypto.subtle.decrypt(
|
|
287
344
|
{
|
|
288
345
|
name: "AES-GCM",
|
|
289
346
|
iv: o
|
|
290
347
|
},
|
|
291
348
|
n,
|
|
292
|
-
|
|
349
|
+
T(e)
|
|
293
350
|
);
|
|
294
351
|
return new TextDecoder().decode(c);
|
|
295
352
|
}
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
353
|
+
const S = (e) => {
|
|
354
|
+
if (C(e))
|
|
298
355
|
return btoa(e);
|
|
299
|
-
if (
|
|
356
|
+
if ($(e) || Array.isArray(e))
|
|
300
357
|
return btoa(String.fromCharCode(...e));
|
|
301
|
-
if (
|
|
358
|
+
if (ye(e)) {
|
|
302
359
|
const t = new Uint8Array(e);
|
|
303
360
|
return btoa(String.fromCharCode(...t));
|
|
304
361
|
}
|
|
305
362
|
throw new TypeError(`Unsupported type for base64 encoding: ${typeof e}`);
|
|
306
363
|
}, { subtle: be } = globalThis.crypto;
|
|
307
|
-
async function
|
|
364
|
+
async function Ce() {
|
|
308
365
|
return await be.generateKey(
|
|
309
366
|
{
|
|
310
367
|
name: "AES-GCM",
|
|
@@ -314,12 +371,12 @@ async function Se() {
|
|
|
314
371
|
["encrypt", "decrypt"]
|
|
315
372
|
);
|
|
316
373
|
}
|
|
317
|
-
async function
|
|
374
|
+
async function Oe(e) {
|
|
318
375
|
const t = await crypto.subtle.exportKey("raw", e);
|
|
319
|
-
return
|
|
376
|
+
return S(t);
|
|
320
377
|
}
|
|
321
|
-
async function
|
|
322
|
-
const t = new TextEncoder(), r = await
|
|
378
|
+
async function It(e) {
|
|
379
|
+
const t = new TextEncoder(), r = await Ce(), n = crypto.getRandomValues(new Uint8Array(16)), o = await crypto.subtle.encrypt(
|
|
323
380
|
{
|
|
324
381
|
name: "AES-GCM",
|
|
325
382
|
iv: n
|
|
@@ -328,25 +385,25 @@ async function $t(e) {
|
|
|
328
385
|
t.encode(e)
|
|
329
386
|
);
|
|
330
387
|
return {
|
|
331
|
-
key: await
|
|
332
|
-
iv:
|
|
333
|
-
cipherText:
|
|
388
|
+
key: await Oe(r),
|
|
389
|
+
iv: S(n),
|
|
390
|
+
cipherText: S(o)
|
|
334
391
|
};
|
|
335
392
|
}
|
|
336
|
-
const
|
|
393
|
+
const Te = (e) => atob(e.replace(/[-]/g, "+").replace(/[_]/g, "/")), xt = (e) => {
|
|
337
394
|
const t = e.split(".");
|
|
338
395
|
if (t.length !== 3) throw new Error("JWT is not valid: not a JWT structure");
|
|
339
396
|
const r = t[1];
|
|
340
|
-
return JSON.parse(
|
|
397
|
+
return JSON.parse(Te(r));
|
|
341
398
|
};
|
|
342
|
-
function
|
|
399
|
+
function _(e) {
|
|
343
400
|
const t = new ArrayBuffer(e.length), r = new Uint8Array(t);
|
|
344
401
|
for (let n = 0, o = e.length; n < o; n++)
|
|
345
402
|
r[n] = e.charCodeAt(n);
|
|
346
403
|
return t;
|
|
347
404
|
}
|
|
348
|
-
function
|
|
349
|
-
const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n =
|
|
405
|
+
function Pe(e) {
|
|
406
|
+
const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n = _(r);
|
|
350
407
|
return crypto.subtle.importKey(
|
|
351
408
|
"pkcs8",
|
|
352
409
|
n,
|
|
@@ -358,18 +415,18 @@ function Ce(e) {
|
|
|
358
415
|
["decrypt"]
|
|
359
416
|
);
|
|
360
417
|
}
|
|
361
|
-
async function
|
|
362
|
-
const r = await
|
|
418
|
+
async function Bt(e, t) {
|
|
419
|
+
const r = await Pe(t), n = await crypto.subtle.decrypt(
|
|
363
420
|
{
|
|
364
421
|
name: "RSA-OAEP"
|
|
365
422
|
},
|
|
366
423
|
r,
|
|
367
|
-
|
|
424
|
+
T(e)
|
|
368
425
|
);
|
|
369
426
|
return new TextDecoder().decode(n);
|
|
370
427
|
}
|
|
371
|
-
function
|
|
372
|
-
const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n =
|
|
428
|
+
function $e(e) {
|
|
429
|
+
const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n = _(r);
|
|
373
430
|
return crypto.subtle.importKey(
|
|
374
431
|
"spki",
|
|
375
432
|
n,
|
|
@@ -381,22 +438,22 @@ function Pe(e) {
|
|
|
381
438
|
["encrypt"]
|
|
382
439
|
);
|
|
383
440
|
}
|
|
384
|
-
async function
|
|
385
|
-
const r = await
|
|
441
|
+
async function Lt(e, t) {
|
|
442
|
+
const r = await $e(t), n = await crypto.subtle.encrypt(
|
|
386
443
|
{
|
|
387
444
|
name: "RSA-OAEP"
|
|
388
445
|
},
|
|
389
446
|
r,
|
|
390
|
-
|
|
447
|
+
_(e)
|
|
391
448
|
);
|
|
392
|
-
return
|
|
449
|
+
return S(n);
|
|
393
450
|
}
|
|
394
|
-
const
|
|
451
|
+
const N = "PUBLIC KEY", j = "RSA PRIVATE KEY";
|
|
395
452
|
async function D(e, t = "pkcs8") {
|
|
396
453
|
const r = await crypto.subtle.exportKey(t, e);
|
|
397
|
-
return
|
|
454
|
+
return S(r);
|
|
398
455
|
}
|
|
399
|
-
async function
|
|
456
|
+
async function Nt(e = 1024) {
|
|
400
457
|
const { publicKey: t, privateKey: r } = await crypto.subtle.generateKey(
|
|
401
458
|
{
|
|
402
459
|
name: "RSA-OAEP",
|
|
@@ -410,15 +467,15 @@ async function Bt(e = 1024) {
|
|
|
410
467
|
["encrypt", "decrypt"]
|
|
411
468
|
), n = await D(t, "spki"), o = await D(r, "pkcs8");
|
|
412
469
|
return {
|
|
413
|
-
publicKey: `-----BEGIN ${
|
|
470
|
+
publicKey: `-----BEGIN ${N}-----
|
|
414
471
|
${n}
|
|
415
|
-
-----END ${
|
|
416
|
-
privateKey: `-----BEGIN ${
|
|
472
|
+
-----END ${N}-----`,
|
|
473
|
+
privateKey: `-----BEGIN ${j}-----
|
|
417
474
|
${o}
|
|
418
|
-
-----END ${
|
|
475
|
+
-----END ${j}-----`
|
|
419
476
|
};
|
|
420
477
|
}
|
|
421
|
-
const
|
|
478
|
+
const jt = (e) => p(e) || G(e) ? !0 : V(e) ? !1 : new Date(e).getTime() > 0, Me = (e) => {
|
|
422
479
|
const t = e > 0 ? "+" : "-", r = Math.abs(e), n = `${Math.floor(r / 60)}`.padStart(2, "0"), o = `${r % 60}`.padStart(2, "0");
|
|
423
480
|
return {
|
|
424
481
|
flag: t,
|
|
@@ -426,25 +483,25 @@ const Lt = (e) => p(e) || Z(e) ? !0 : Q(e) ? !1 : new Date(e).getTime() > 0, Me
|
|
|
426
483
|
hour: n,
|
|
427
484
|
minute: o
|
|
428
485
|
};
|
|
429
|
-
},
|
|
486
|
+
}, Re = (e, t, r) => {
|
|
430
487
|
const { flag: n, hour: o, minute: c } = Me(r);
|
|
431
488
|
return `${e}T${t}${n}${o}:${c}`;
|
|
432
|
-
},
|
|
489
|
+
}, Dt = (e, t, r) => new Date(Re(e, t, r)), H = (e, t) => {
|
|
433
490
|
const r = t.getTime() - e.getTime(), n = Math.floor(r / 864e5), o = Math.floor(n / 30), c = Math.floor(o / 12), s = Math.floor(r / 36e5) % 24, i = Math.floor(r / 6e4) % 60, a = Math.floor(r / 1e3) % 60;
|
|
434
491
|
return { year: c, month: o, day: n, hour: s, minute: i, second: a };
|
|
435
|
-
},
|
|
436
|
-
const n =
|
|
437
|
-
return d(r) ? r({ key: o, value: c }) :
|
|
438
|
-
},
|
|
439
|
-
const n =
|
|
440
|
-
return d(r) ? r(n) :
|
|
441
|
-
},
|
|
442
|
-
function
|
|
443
|
-
return p(e) ? !0 :
|
|
492
|
+
}, Q = (e, t, r) => r ? `${t} ${r[e] || e}` : `${t} ${e}`, J = ["year", "month", "day", "hour", "minute", "second"], kt = (e, t, r) => {
|
|
493
|
+
const n = H(e, t), o = J.find((s) => n[s] > 0) || "second", c = n[o];
|
|
494
|
+
return d(r) ? r({ key: o, value: c }) : Q(o, c, r);
|
|
495
|
+
}, Ut = (e, t, r) => {
|
|
496
|
+
const n = H(e, t);
|
|
497
|
+
return d(r) ? r(n) : J.filter((o) => o).map((o) => Q(o, n[o], r)).join(" ");
|
|
498
|
+
}, Kt = (e) => C(e) && /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|\+[0-2]\d(?:\\:[0-5]\d)?)?/g.test(e);
|
|
499
|
+
function qt(e) {
|
|
500
|
+
return p(e) ? !0 : C(e) ? !!/^(?<value>-?(?:\d+)?\.?\d+) *(?<type>milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
444
501
|
e
|
|
445
502
|
)?.groups : !1;
|
|
446
503
|
}
|
|
447
|
-
const
|
|
504
|
+
const Ft = (e) => ue(e), zt = () => Math.floor(Date.now() / 1e3), vt = (e, t = 50) => {
|
|
448
505
|
let r;
|
|
449
506
|
return function(...n) {
|
|
450
507
|
const o = () => {
|
|
@@ -452,9 +509,9 @@ const Ut = (e) => ue(e), Kt = () => Math.floor(Date.now() / 1e3), zt = (e, t = 5
|
|
|
452
509
|
};
|
|
453
510
|
r !== void 0 && clearTimeout(r), r = setTimeout(o, t);
|
|
454
511
|
};
|
|
455
|
-
},
|
|
512
|
+
}, Wt = () => {
|
|
456
513
|
};
|
|
457
|
-
function
|
|
514
|
+
function Gt(e) {
|
|
458
515
|
let t = !1, r;
|
|
459
516
|
return function() {
|
|
460
517
|
if (t)
|
|
@@ -463,112 +520,109 @@ function qt(e) {
|
|
|
463
520
|
return t = !0, r = n, n;
|
|
464
521
|
};
|
|
465
522
|
}
|
|
466
|
-
const
|
|
523
|
+
const Vt = (e, t) => {
|
|
467
524
|
let r = 0;
|
|
468
525
|
return function(...n) {
|
|
469
526
|
const o = (/* @__PURE__ */ new Date()).getTime();
|
|
470
527
|
o - r >= t && (e.apply(this, n), r = o);
|
|
471
528
|
};
|
|
472
|
-
},
|
|
529
|
+
}, Y = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
473
530
|
function w(e, t, r) {
|
|
474
531
|
const n = r[0];
|
|
475
532
|
if (t != null && e >= t)
|
|
476
|
-
throw new Error(e
|
|
477
|
-
if (e.
|
|
533
|
+
throw new Error(`${e} >= ${t}`);
|
|
534
|
+
if (e.endsWith(n) || t && t.endsWith(n))
|
|
478
535
|
throw new Error("trailing zero");
|
|
479
536
|
if (t) {
|
|
480
537
|
let s = 0;
|
|
481
|
-
for (; (e[s]
|
|
538
|
+
for (; (e[s] ?? n) === t[s]; )
|
|
482
539
|
s++;
|
|
483
540
|
if (s > 0)
|
|
484
541
|
return t.slice(0, s) + w(e.slice(s), t.slice(s), r);
|
|
485
542
|
}
|
|
486
543
|
const o = e ? r.indexOf(e[0]) : 0, c = t != null ? r.indexOf(t[0]) : r.length;
|
|
487
544
|
if (c - o > 1) {
|
|
488
|
-
const s = Math.round(
|
|
545
|
+
const s = Math.round((o + c) / 2);
|
|
489
546
|
return r[s];
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
}
|
|
493
|
-
function te(e) {
|
|
494
|
-
if (e.length !== re(e[0]))
|
|
495
|
-
throw new Error("invalid integer part of order key: " + e);
|
|
547
|
+
}
|
|
548
|
+
return t && t.length > 1 ? t[0] : r[o] + w(e.slice(1), null, r);
|
|
496
549
|
}
|
|
497
|
-
function
|
|
550
|
+
function X(e) {
|
|
551
|
+
const t = e.charCodeAt(0), r = 97, n = 90;
|
|
498
552
|
if (e >= "a" && e <= "z")
|
|
499
|
-
return
|
|
553
|
+
return t - r + 2;
|
|
500
554
|
if (e >= "A" && e <= "Z")
|
|
501
|
-
return
|
|
502
|
-
throw new Error(
|
|
555
|
+
return n - t + 2;
|
|
556
|
+
throw new Error(`invalid order key head: ${e}`);
|
|
503
557
|
}
|
|
504
558
|
function E(e) {
|
|
505
|
-
const t =
|
|
559
|
+
const t = X(e[0]);
|
|
506
560
|
if (t > e.length)
|
|
507
|
-
throw new Error(
|
|
561
|
+
throw new Error(`invalid order key: ${e}`);
|
|
508
562
|
return e.slice(0, t);
|
|
509
563
|
}
|
|
564
|
+
function ee(e) {
|
|
565
|
+
if (e.length !== X(e[0]))
|
|
566
|
+
throw new Error(`invalid integer part of order key: ${e}`);
|
|
567
|
+
}
|
|
510
568
|
function k(e, t) {
|
|
511
569
|
if (e === "A" + t[0].repeat(26))
|
|
512
|
-
throw new Error(
|
|
570
|
+
throw new Error(`invalid order key: ${e}`);
|
|
513
571
|
const r = E(e);
|
|
514
|
-
if (e.slice(r.length).
|
|
515
|
-
throw new Error(
|
|
572
|
+
if (e.slice(r.length).endsWith(t[0]))
|
|
573
|
+
throw new Error(`invalid order key: ${e}`);
|
|
516
574
|
}
|
|
517
575
|
function U(e, t) {
|
|
518
|
-
|
|
519
|
-
const [
|
|
576
|
+
ee(e);
|
|
577
|
+
const r = e[0], n = e.slice(1).split("");
|
|
520
578
|
let o = !0;
|
|
521
579
|
for (let c = n.length - 1; o && c >= 0; c--) {
|
|
522
580
|
const s = t.indexOf(n[c]) + 1;
|
|
523
581
|
s === t.length ? n[c] = t[0] : (n[c] = t[s], o = !1);
|
|
524
582
|
}
|
|
525
583
|
if (o) {
|
|
526
|
-
if (r === "Z")
|
|
527
|
-
|
|
528
|
-
if (r === "z")
|
|
529
|
-
return null;
|
|
584
|
+
if (r === "Z") return "a" + t[0];
|
|
585
|
+
if (r === "z") return null;
|
|
530
586
|
const c = String.fromCharCode(r.charCodeAt(0) + 1);
|
|
531
587
|
return c > "a" ? n.push(t[0]) : n.pop(), c + n.join("");
|
|
532
|
-
}
|
|
533
|
-
|
|
588
|
+
}
|
|
589
|
+
return r + n.join("");
|
|
534
590
|
}
|
|
535
|
-
function
|
|
536
|
-
|
|
537
|
-
const [
|
|
591
|
+
function _e(e, t) {
|
|
592
|
+
ee(e);
|
|
593
|
+
const r = e[0], n = e.slice(1).split("");
|
|
538
594
|
let o = !0;
|
|
539
595
|
for (let c = n.length - 1; o && c >= 0; c--) {
|
|
540
596
|
const s = t.indexOf(n[c]) - 1;
|
|
541
|
-
s === -1 ? n[c] = t.
|
|
597
|
+
s === -1 ? n[c] = t[t.length - 1] : (n[c] = t[s], o = !1);
|
|
542
598
|
}
|
|
543
599
|
if (o) {
|
|
544
|
-
if (r === "a")
|
|
545
|
-
|
|
546
|
-
if (r === "A")
|
|
547
|
-
return null;
|
|
600
|
+
if (r === "a") return "Z" + t[t.length - 1];
|
|
601
|
+
if (r === "A") return null;
|
|
548
602
|
const c = String.fromCharCode(r.charCodeAt(0) - 1);
|
|
549
|
-
return c < "Z" ? n.push(t.
|
|
550
|
-
}
|
|
551
|
-
|
|
603
|
+
return c < "Z" ? n.push(t[t.length - 1]) : n.pop(), c + n.join("");
|
|
604
|
+
}
|
|
605
|
+
return r + n.join("");
|
|
552
606
|
}
|
|
553
|
-
function g(e, t, r =
|
|
607
|
+
function g(e, t, r = Y) {
|
|
554
608
|
if (e != null && k(e, r), t != null && k(t, r), e != null && t != null && e >= t)
|
|
555
|
-
throw new Error(e
|
|
609
|
+
throw new Error(`${e} >= ${t}`);
|
|
610
|
+
if (e == null && t == null)
|
|
611
|
+
return "a" + r[0];
|
|
556
612
|
if (e == null) {
|
|
557
|
-
|
|
558
|
-
return "a" + r[0];
|
|
559
|
-
const a = E(t), u = t.slice(a.length);
|
|
613
|
+
const a = E(t), l = t.slice(a.length);
|
|
560
614
|
if (a === "A" + r[0].repeat(26))
|
|
561
|
-
return a + w("",
|
|
615
|
+
return a + w("", l, r);
|
|
562
616
|
if (a < t)
|
|
563
617
|
return a;
|
|
564
|
-
const
|
|
565
|
-
if (
|
|
618
|
+
const u = _e(a, r);
|
|
619
|
+
if (u == null)
|
|
566
620
|
throw new Error("cannot decrement any more");
|
|
567
|
-
return
|
|
621
|
+
return u;
|
|
568
622
|
}
|
|
569
623
|
if (t == null) {
|
|
570
|
-
const a = E(e),
|
|
571
|
-
return
|
|
624
|
+
const a = E(e), l = e.slice(a.length);
|
|
625
|
+
return U(a, r) ?? a + w(l, null, r);
|
|
572
626
|
}
|
|
573
627
|
const n = E(e), o = e.slice(n.length), c = E(t), s = t.slice(c.length);
|
|
574
628
|
if (n === c)
|
|
@@ -578,37 +632,37 @@ function g(e, t, r = ee) {
|
|
|
578
632
|
throw new Error("cannot increment any more");
|
|
579
633
|
return i < t ? i : n + w(o, null, r);
|
|
580
634
|
}
|
|
581
|
-
function K(e, t, r, n =
|
|
582
|
-
if (r === 0)
|
|
583
|
-
|
|
584
|
-
if (r === 1)
|
|
585
|
-
return [g(e, t, n)];
|
|
635
|
+
function K(e, t, r, n = Y) {
|
|
636
|
+
if (r === 0) return [];
|
|
637
|
+
if (r === 1) return [g(e, t, n)];
|
|
586
638
|
if (t == null) {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
639
|
+
const s = [];
|
|
640
|
+
let i = g(e, t, n);
|
|
641
|
+
s.push(i);
|
|
642
|
+
for (let a = 1; a < r; a++)
|
|
643
|
+
i = g(i, t, n), s.push(i);
|
|
644
|
+
return s;
|
|
592
645
|
}
|
|
593
646
|
if (e == null) {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
647
|
+
const s = [];
|
|
648
|
+
let i = g(e, t, n);
|
|
649
|
+
s.push(i);
|
|
650
|
+
for (let a = 1; a < r; a++)
|
|
651
|
+
i = g(e, i, n), s.push(i);
|
|
652
|
+
return s.reverse();
|
|
599
653
|
}
|
|
600
654
|
const o = Math.floor(r / 2), c = g(e, t, n);
|
|
601
655
|
return [...K(e, c, o, n), c, ...K(c, t, r - o - 1, n)];
|
|
602
656
|
}
|
|
603
|
-
const
|
|
657
|
+
const Ie = (e) => {
|
|
604
658
|
if (e == null || e === "") return !1;
|
|
605
659
|
const t = parseFloat(e);
|
|
606
660
|
return !(isNaN(t) || !isFinite(t));
|
|
607
|
-
},
|
|
661
|
+
}, xe = (e, t) => Math.ceil(e / t) * t, Zt = (e, t = 80, r = 1) => xe(e * r, t), Ht = (e, t = 12) => parseFloat(e.toPrecision(t)), Qt = (e) => {
|
|
608
662
|
const t = Number(e);
|
|
609
663
|
return t < 0 ? Math.ceil(t) : Math.floor(t);
|
|
610
|
-
},
|
|
611
|
-
if (
|
|
664
|
+
}, Jt = (e) => {
|
|
665
|
+
if (Ie(e)) {
|
|
612
666
|
const t = Number(e);
|
|
613
667
|
return isNaN(t) || !isFinite(t) ? e : t;
|
|
614
668
|
}
|
|
@@ -616,58 +670,58 @@ const Ne = (e) => {
|
|
|
616
670
|
}, Be = (e) => {
|
|
617
671
|
for (const r of Object.getOwnPropertyNames(e)) {
|
|
618
672
|
const n = e[r];
|
|
619
|
-
!
|
|
673
|
+
!R(n) && !d(n) || n === null || Be(n);
|
|
620
674
|
}
|
|
621
675
|
return Object.isFrozen(e) ? e : Object.freeze(e);
|
|
622
676
|
}, Le = (e) => e.replace(/\[/g, ".").replace(/\]/g, "").split(".");
|
|
623
|
-
function
|
|
677
|
+
function te(e, t, r, n) {
|
|
624
678
|
const o = d(n) ? n : void 0;
|
|
625
|
-
return Le(t).reduce((s, i, a,
|
|
626
|
-
if (a ===
|
|
679
|
+
return Le(t).reduce((s, i, a, l) => {
|
|
680
|
+
if (a === l.length - 1)
|
|
627
681
|
return s[i] = r, s;
|
|
628
682
|
if (i in s)
|
|
629
683
|
return s[i];
|
|
630
684
|
if (!i) return s;
|
|
631
685
|
if (o) {
|
|
632
|
-
const
|
|
633
|
-
if (
|
|
686
|
+
const u = o(s[i], i, s);
|
|
687
|
+
if (u) return s[i] = u;
|
|
634
688
|
}
|
|
635
|
-
return s[i] = /^[0-9]{1,}$/.test(
|
|
689
|
+
return s[i] = /^[0-9]{1,}$/.test(l[a + 1]) ? [] : {};
|
|
636
690
|
}, e), e;
|
|
637
691
|
}
|
|
638
|
-
function
|
|
639
|
-
return
|
|
692
|
+
function Ne(e, t, r) {
|
|
693
|
+
return te(e, t, r);
|
|
640
694
|
}
|
|
641
|
-
function
|
|
695
|
+
function je(e, t, r, n) {
|
|
642
696
|
const o = d(n) ? n : void 0;
|
|
643
|
-
return
|
|
697
|
+
return te(e, t, r, o);
|
|
644
698
|
}
|
|
645
|
-
const
|
|
699
|
+
const Yt = (e) => {
|
|
646
700
|
const t = {};
|
|
647
701
|
return Object.keys(e).forEach((r) => {
|
|
648
|
-
r.match(/[^\]]*\[\d+\]/) ?
|
|
702
|
+
r.match(/[^\]]*\[\d+\]/) ? Ne(t, r, e[r]) : je(t, r, e[r], Object);
|
|
649
703
|
}), t;
|
|
650
|
-
},
|
|
704
|
+
}, De = (e, t, r) => {
|
|
651
705
|
const n = (c) => String.prototype.split.call(t, c).filter(Boolean).reduce((s, i) => s != null ? s[i] : s, e), o = n(/[,[\]]+?/) || n(/[,[\].]+?/);
|
|
652
706
|
return o === void 0 || o === e ? r : o;
|
|
653
|
-
},
|
|
707
|
+
}, ke = (e, t) => {
|
|
654
708
|
const r = t.split(".");
|
|
655
|
-
return !!e && (r.length > 1 ?
|
|
709
|
+
return !!e && (r.length > 1 ? ke(e[t.split(".")[0]], r.slice(1).join(".")) : Object.hasOwnProperty.call(e, t));
|
|
656
710
|
};
|
|
657
|
-
function
|
|
711
|
+
function Ue(e, t) {
|
|
658
712
|
return e.length !== t.length ? !1 : e.every((r, n) => r === t[n]);
|
|
659
713
|
}
|
|
660
|
-
const
|
|
714
|
+
const q = (e, t) => {
|
|
661
715
|
if (e === t || Object.is(e, t)) return !0;
|
|
662
716
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
663
717
|
if (e.constructor !== t.constructor) return !1;
|
|
664
718
|
let r, n;
|
|
665
719
|
if (Array.isArray(e)) {
|
|
666
720
|
if (r = e.length, r != t.length) return !1;
|
|
667
|
-
for (n = r; n-- !== 0; ) if (!
|
|
721
|
+
for (n = r; n-- !== 0; ) if (!q(e[n], t[n])) return !1;
|
|
668
722
|
return !0;
|
|
669
723
|
}
|
|
670
|
-
if (
|
|
724
|
+
if ($(e) && $(t)) return Ue(e, t);
|
|
671
725
|
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
|
|
672
726
|
if (e.valueOf !== Object.prototype.valueOf) return e.valueOf() === t.valueOf();
|
|
673
727
|
if (e.toString !== Object.prototype.toString) return e.toString() === t.toString();
|
|
@@ -676,90 +730,90 @@ const z = (e, t) => {
|
|
|
676
730
|
for (n = r; n-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(t, o[n])) return !1;
|
|
677
731
|
for (n = r; n-- !== 0; ) {
|
|
678
732
|
const c = o[n];
|
|
679
|
-
if (!
|
|
733
|
+
if (!q(e[c], t[c])) return !1;
|
|
680
734
|
}
|
|
681
735
|
return !0;
|
|
682
736
|
}
|
|
683
737
|
return e !== e && t !== t;
|
|
684
|
-
},
|
|
738
|
+
}, Xt = (e, t) => +e == +t, er = (e, t) => e ? !t || t.length === 0 ? e : t.reduce(
|
|
685
739
|
(r, n) => (delete r[n], r),
|
|
686
740
|
{ ...e }
|
|
687
741
|
) : {};
|
|
688
|
-
function
|
|
742
|
+
function tr(e, t) {
|
|
689
743
|
return Object.keys(e).filter((r) => !t(e[r], r)).reduce((r, n) => (r[n] = e[n], r), {});
|
|
690
744
|
}
|
|
691
|
-
function
|
|
745
|
+
function rr(e, t) {
|
|
692
746
|
return e ? t.reduce(
|
|
693
747
|
(r, n) => (Object.prototype.hasOwnProperty.call(e, n) && (r[n] = e[n]), r),
|
|
694
748
|
{}
|
|
695
749
|
) : {};
|
|
696
750
|
}
|
|
697
|
-
function
|
|
751
|
+
function nr(e, t) {
|
|
698
752
|
return Object.keys(e).filter((r) => t(e[r], r)).reduce((r, n) => (r[n] = e[n], r), {});
|
|
699
753
|
}
|
|
700
|
-
const
|
|
701
|
-
(n) =>
|
|
754
|
+
const M = (e, t = "", r = {}) => (b(e) ? e.forEach((n, o) => M(n, `${t}[${o}]`, r)) : Ae(e) ? Object.keys(e).forEach(
|
|
755
|
+
(n) => M(e[n], `${t ? t + "." : ""}${n}`, r)
|
|
702
756
|
) : r[`${t}`] = e, r);
|
|
703
|
-
function
|
|
704
|
-
return
|
|
757
|
+
function or(e) {
|
|
758
|
+
return M(e);
|
|
705
759
|
}
|
|
706
|
-
const
|
|
760
|
+
const sr = (e) => {
|
|
707
761
|
const t = {};
|
|
708
762
|
for (const r in e)
|
|
709
763
|
Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
|
|
710
764
|
return t;
|
|
711
765
|
};
|
|
712
|
-
function
|
|
766
|
+
function cr(e, t) {
|
|
713
767
|
if (!e || !e.length)
|
|
714
768
|
return {};
|
|
715
|
-
const r = d(t) ? t :
|
|
769
|
+
const r = d(t) ? t : b(t) ? (n, o) => t[o] : () => t;
|
|
716
770
|
return e.reduce(
|
|
717
771
|
(n, o, c) => (n[o] = r(o, c), n),
|
|
718
772
|
{}
|
|
719
773
|
);
|
|
720
774
|
}
|
|
721
|
-
const
|
|
722
|
-
function
|
|
775
|
+
const ir = typeof window == "object", ar = (e) => e[Math.floor(Math.random() * e.length)], lr = (e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) => Math.random() * (t - e) + e;
|
|
776
|
+
function ur(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
|
|
723
777
|
return Math.floor(Math.random() * (t - e + 1) + e);
|
|
724
778
|
}
|
|
725
|
-
const
|
|
779
|
+
const Ke = "0", re = "123456789", ne = Ke + re, oe = "abcdefghijklmnopqrstuvwxyz", qe = oe.toUpperCase(), Fe = oe + qe, ze = "_-", ve = ne + Fe + ze, F = (e = 16, t = ve) => {
|
|
726
780
|
let r = "";
|
|
727
781
|
const n = crypto.getRandomValues(new Uint8Array(e |= 0)), o = t.length - 1;
|
|
728
782
|
for (; e--; ) r += t[n[e] & o];
|
|
729
783
|
return r;
|
|
730
|
-
},
|
|
784
|
+
}, We = (e = 16) => F(1, re) + F(e - 1, ne), fr = (e = 16) => parseInt(We(e), 10), se = (e) => {
|
|
731
785
|
if (!e) return "";
|
|
732
786
|
const t = e.toLowerCase();
|
|
733
|
-
return
|
|
734
|
-
},
|
|
735
|
-
function
|
|
736
|
-
const t =
|
|
787
|
+
return Ge(t);
|
|
788
|
+
}, Ge = (e) => e ? e.substring(0, 1).toUpperCase() + e.substring(1, e.length) : "", Ve = /[A-Z]?[a-z]+|[0-9]+|[A-Z]+(?![a-z])/g, I = (e) => Array.from(e.match(Ve) ?? []);
|
|
789
|
+
function hr(e) {
|
|
790
|
+
const t = I(e);
|
|
737
791
|
if (t.length === 0)
|
|
738
792
|
return "";
|
|
739
793
|
const [r, ...n] = t;
|
|
740
|
-
return `${r.toLowerCase()}${n.map((o) =>
|
|
794
|
+
return `${r.toLowerCase()}${n.map((o) => se(o)).join("")}`;
|
|
741
795
|
}
|
|
742
|
-
const
|
|
796
|
+
const pr = async (e, t = "deflate") => {
|
|
743
797
|
try {
|
|
744
798
|
const n = new TextEncoder().encode(e), o = new CompressionStream(t), s = o.writable.getWriter();
|
|
745
799
|
await s.write(n), await s.close();
|
|
746
|
-
const a = o.readable.getReader(),
|
|
747
|
-
let
|
|
800
|
+
const a = o.readable.getReader(), l = [];
|
|
801
|
+
let u = 0;
|
|
748
802
|
for (; ; ) {
|
|
749
803
|
const { done: m, value: P } = await a.read();
|
|
750
804
|
if (m) break;
|
|
751
|
-
|
|
805
|
+
l.push(P), u += P.length;
|
|
752
806
|
}
|
|
753
|
-
const f = new Uint8Array(
|
|
807
|
+
const f = new Uint8Array(u);
|
|
754
808
|
let A = 0;
|
|
755
|
-
for (const m of
|
|
809
|
+
for (const m of l)
|
|
756
810
|
f.set(m, A), A += m.length;
|
|
757
811
|
let y = btoa(String.fromCharCode(...f));
|
|
758
812
|
return y = y.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, ""), y;
|
|
759
813
|
} catch (r) {
|
|
760
814
|
throw console.error("压缩过程中出错:", r), r;
|
|
761
815
|
}
|
|
762
|
-
},
|
|
816
|
+
}, dr = async (e, t = "deflate") => {
|
|
763
817
|
try {
|
|
764
818
|
let r = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
765
819
|
const n = (4 - r.length % 4) % 4;
|
|
@@ -769,12 +823,12 @@ const ur = async (e, t = "deflate") => {
|
|
|
769
823
|
c[h] = o.charCodeAt(h);
|
|
770
824
|
const s = new DecompressionStream(t), a = s.writable.getWriter();
|
|
771
825
|
await a.write(c), await a.close();
|
|
772
|
-
const
|
|
826
|
+
const u = s.readable.getReader(), f = [];
|
|
773
827
|
let A = 0;
|
|
774
828
|
for (; ; ) {
|
|
775
|
-
const { done: h, value:
|
|
829
|
+
const { done: h, value: x } = await u.read();
|
|
776
830
|
if (h) break;
|
|
777
|
-
f.push(
|
|
831
|
+
f.push(x), A += x.length;
|
|
778
832
|
}
|
|
779
833
|
const y = new Uint8Array(A);
|
|
780
834
|
let m = 0;
|
|
@@ -784,7 +838,7 @@ const ur = async (e, t = "deflate") => {
|
|
|
784
838
|
} catch (r) {
|
|
785
839
|
throw console.error("解压过程中出错:", r), r;
|
|
786
840
|
}
|
|
787
|
-
},
|
|
841
|
+
}, Ze = (e) => I(e).map((r) => r.toLowerCase()).join("-"), He = {
|
|
788
842
|
"〇": 0,
|
|
789
843
|
一: 1,
|
|
790
844
|
二: 2,
|
|
@@ -823,10 +877,10 @@ const ur = async (e, t = "deflate") => {
|
|
|
823
877
|
8: 8,
|
|
824
878
|
9: 9
|
|
825
879
|
};
|
|
826
|
-
function
|
|
880
|
+
function mr(e) {
|
|
827
881
|
let t = 0, r = 0, n = 0, o = !1;
|
|
828
882
|
for (const c of e.split("").reverse()) {
|
|
829
|
-
if (r =
|
|
883
|
+
if (r = He[c], r === void 0)
|
|
830
884
|
throw new Error(`无法解析的数字: ${c}`);
|
|
831
885
|
switch (r) {
|
|
832
886
|
case 10: {
|
|
@@ -849,7 +903,7 @@ function hr(e) {
|
|
|
849
903
|
}
|
|
850
904
|
return o && (t += r), t;
|
|
851
905
|
}
|
|
852
|
-
const
|
|
906
|
+
const yr = (e) => {
|
|
853
907
|
const t = {};
|
|
854
908
|
return new URLSearchParams(e).forEach((n, o) => {
|
|
855
909
|
if (Object.prototype.hasOwnProperty.call(t, o)) {
|
|
@@ -858,7 +912,7 @@ const pr = (e) => {
|
|
|
858
912
|
} else
|
|
859
913
|
t[o] = n;
|
|
860
914
|
}), t;
|
|
861
|
-
},
|
|
915
|
+
}, gr = (e) => {
|
|
862
916
|
const t = new URLSearchParams();
|
|
863
917
|
for (const r in e)
|
|
864
918
|
if (Object.prototype.hasOwnProperty.call(e, r)) {
|
|
@@ -866,19 +920,19 @@ const pr = (e) => {
|
|
|
866
920
|
Array.isArray(n) ? n.forEach((o) => t.append(r, `${o}`)) : t.set(r, `${n}`);
|
|
867
921
|
}
|
|
868
922
|
return t.sort(), t.toString();
|
|
869
|
-
}, Qe = ["角", "分", "厘"],
|
|
923
|
+
}, Qe = ["角", "分", "厘"], z = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], O = [
|
|
870
924
|
["元", "万", "亿", "兆", "京", "垓"],
|
|
871
925
|
["", "拾", "佰", "仟"]
|
|
872
|
-
],
|
|
926
|
+
], v = Math.pow(10, 22), wr = (e) => {
|
|
873
927
|
const t = e < 0 ? "欠" : "";
|
|
874
928
|
let r = Math.abs(e);
|
|
875
|
-
if (r >
|
|
876
|
-
throw new Error(`max value is ${
|
|
929
|
+
if (r > v)
|
|
930
|
+
throw new Error(`max value is ${v}`);
|
|
877
931
|
let n = "";
|
|
878
932
|
if (e > Math.floor(e)) {
|
|
879
933
|
const o = +("0." + `${r}`.split(".")[1]);
|
|
880
934
|
n = Qe.reduce(
|
|
881
|
-
(c, s, i) => c + (
|
|
935
|
+
(c, s, i) => c + (z[Math.floor(o * 10 * Math.pow(10, i)) % 10] + s).replace(/零./, ""),
|
|
882
936
|
""
|
|
883
937
|
);
|
|
884
938
|
}
|
|
@@ -886,27 +940,27 @@ const pr = (e) => {
|
|
|
886
940
|
for (let o = 0; o < O[0].length && r > 0; o++) {
|
|
887
941
|
let c = "";
|
|
888
942
|
for (let s = 0; s < O[1].length && r > 0; s++)
|
|
889
|
-
c =
|
|
943
|
+
c = z[r % 10] + O[1][s] + c, r = Math.floor(r / 10);
|
|
890
944
|
n = c.replace(/(零.)*零$/g, "").replace(/^$/, "零") + O[0][o] + n;
|
|
891
945
|
}
|
|
892
946
|
return `${t}${n.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整")}`;
|
|
893
947
|
};
|
|
894
|
-
function
|
|
948
|
+
function Ar(e, t) {
|
|
895
949
|
const r = e || "", n = t || "", o = Math.max(r.length, n.length);
|
|
896
950
|
return o === 0 ? 1 : (o - fe(r, n)) / o;
|
|
897
951
|
}
|
|
898
|
-
const
|
|
952
|
+
const Er = (e) => I(e).map((r) => r.toLowerCase()).join("_"), Sr = (e) => Ze(e).split("-").filter((t) => !!t).map((t) => se(t.toLowerCase())).join(" "), br = (e) => e.trim().replace(/\s+/g, " "), Cr = (e, t) => e.replace(/\${([^}]+)}/g, (r, n) => De(t, n.trim(), "")), Je = (e) => e ? e.substring(0, 1).toLowerCase() + e.substring(1, e.length) : "", Or = (e) => {
|
|
899
953
|
if (!e) return "";
|
|
900
954
|
const t = e.toLowerCase();
|
|
901
|
-
return
|
|
902
|
-
},
|
|
955
|
+
return Je(t);
|
|
956
|
+
}, W = /^([^/:]+):\/*/, Tr = (...e) => {
|
|
903
957
|
if (e = e.filter((s) => s !== ""), e.length === 0)
|
|
904
958
|
return "";
|
|
905
|
-
if (e.findIndex((s) => !(
|
|
959
|
+
if (e.findIndex((s) => !(C(s) || p(s))) >= 0)
|
|
906
960
|
throw new Error("paths must be a string or number");
|
|
907
961
|
let r = "";
|
|
908
962
|
const n = `${e[0]}`;
|
|
909
|
-
n.startsWith("//") ? r = "//" : n.startsWith("/") ? r = "/" : (n.startsWith("file:") && e.length > 1 && (n + e[1]).match(/^file:\/\/\//) ? r = n.replace(
|
|
963
|
+
n.startsWith("//") ? r = "//" : n.startsWith("/") ? r = "/" : (n.startsWith("file:") && e.length > 1 && (n + e[1]).match(/^file:\/\/\//) ? r = n.replace(W, "$1:///") : r = n.replace(W, "$1://"), e.shift()), r && !r.endsWith("/") && (r += "/");
|
|
910
964
|
let o = e.map(
|
|
911
965
|
(s) => `${s}`.replace(/^\/+/, "").replace(/^\.\/+/, "").replace(/\/+$/, "")
|
|
912
966
|
).filter((s) => s !== "").join("/");
|
|
@@ -921,7 +975,7 @@ const gr = (e) => R(e).map((r) => r.toLowerCase()).join("_"), wr = (e) => Ve(e).
|
|
|
921
975
|
}
|
|
922
976
|
return c.replace(/\/(\?|&|#[^!])/g, "$1");
|
|
923
977
|
};
|
|
924
|
-
class
|
|
978
|
+
class Pr {
|
|
925
979
|
#e = /* @__PURE__ */ new Map();
|
|
926
980
|
/**
|
|
927
981
|
* 添加事件监听器
|
|
@@ -950,15 +1004,22 @@ class Tr {
|
|
|
950
1004
|
}
|
|
951
1005
|
/**
|
|
952
1006
|
* 分发事件
|
|
953
|
-
* @param
|
|
1007
|
+
* @param type - 事件类型
|
|
1008
|
+
* @param data - 事件数据
|
|
954
1009
|
*/
|
|
955
|
-
dispatchEvent(t) {
|
|
956
|
-
this.#t(t
|
|
1010
|
+
dispatchEvent(t, r) {
|
|
1011
|
+
this.#t(t).forEach((n) => {
|
|
1012
|
+
try {
|
|
1013
|
+
n(r);
|
|
1014
|
+
} catch (o) {
|
|
1015
|
+
console.error(`Error in event handler for "${String(t)}":`, o);
|
|
1016
|
+
}
|
|
1017
|
+
});
|
|
957
1018
|
}
|
|
958
1019
|
/**
|
|
959
1020
|
* 移除所有事件监听器
|
|
960
1021
|
*/
|
|
961
|
-
|
|
1022
|
+
removeAllEventListeners() {
|
|
962
1023
|
this.#e.clear();
|
|
963
1024
|
}
|
|
964
1025
|
/**
|
|
@@ -969,15 +1030,13 @@ class Tr {
|
|
|
969
1030
|
#t(t) {
|
|
970
1031
|
if (this.#e.has(t))
|
|
971
1032
|
return this.#e.get(t);
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
return this.#e.set(t, n), n;
|
|
975
|
-
}
|
|
1033
|
+
const r = /* @__PURE__ */ new Set();
|
|
1034
|
+
return this.#e.set(t, r), r;
|
|
976
1035
|
}
|
|
977
1036
|
}
|
|
978
|
-
const
|
|
1037
|
+
const $r = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=", Mr = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", Rr = (e, ...t) => {
|
|
979
1038
|
const r = [];
|
|
980
|
-
|
|
1039
|
+
R(e) ? Object.keys(e).sort().forEach((o) => {
|
|
981
1040
|
const c = e[o];
|
|
982
1041
|
r.push([o, c]);
|
|
983
1042
|
}) : r.push([e]), t.length && t.forEach((o) => {
|
|
@@ -985,126 +1044,129 @@ const Or = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBAD
|
|
|
985
1044
|
}), (console?.table ?? console.log)(r);
|
|
986
1045
|
};
|
|
987
1046
|
export {
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
ot as
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1047
|
+
Tt as AsyncQueueExecutor,
|
|
1048
|
+
Y as BASE_62_DIGITS,
|
|
1049
|
+
Pr as EventDispatcher,
|
|
1050
|
+
$r as IMAGE_MIN_BASE64_BLACK,
|
|
1051
|
+
Mr as IMAGE_MIN_BASE64_TRANSPARENT,
|
|
1052
|
+
ir as IS_BROWSER,
|
|
1053
|
+
rt as IdleTimer,
|
|
1054
|
+
nt as LeaderElection,
|
|
1055
|
+
_t as aesDecrypt,
|
|
1056
|
+
It as aesEncrypt,
|
|
1057
|
+
T as base64Decode,
|
|
1058
|
+
S as base64Encode,
|
|
1059
|
+
hr as camelCase,
|
|
1060
|
+
jt as canBeDate,
|
|
1061
|
+
Ie as canBeNumber,
|
|
1062
|
+
se as capitalize,
|
|
1063
|
+
Ge as capitalizeFirst,
|
|
1064
|
+
ot as checkOPFSAvailable,
|
|
1065
|
+
it as chunk,
|
|
1066
|
+
pr as compressToBase64Url,
|
|
1067
|
+
tt as createBroadcastTopic,
|
|
1068
|
+
Dt as dateStringToDate,
|
|
1069
|
+
Re as dateStringWithTimezone,
|
|
1070
|
+
vt as debounce,
|
|
1011
1071
|
xt as decodeJWTPayload,
|
|
1012
|
-
|
|
1072
|
+
dr as decompressFromBase64Url,
|
|
1013
1073
|
Be as deepFreeze,
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1074
|
+
at as difference,
|
|
1075
|
+
Wt as emptyFunction,
|
|
1076
|
+
lt as flatten,
|
|
1077
|
+
me as flattenDeep,
|
|
1078
|
+
Yt as flattenPathObjectToPlainObject,
|
|
1079
|
+
Ut as formatCountdown,
|
|
1080
|
+
kt as formatPassTime,
|
|
1021
1081
|
g as generateKeyBetween,
|
|
1022
1082
|
K as generateKeysBetween,
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1083
|
+
De as get,
|
|
1084
|
+
ke as has,
|
|
1085
|
+
ut as intersection,
|
|
1086
|
+
b as isArray,
|
|
1087
|
+
ye as isArrayBuffer,
|
|
1088
|
+
ft as isBoolean,
|
|
1089
|
+
G as isDate,
|
|
1090
|
+
ht as isEmpty,
|
|
1091
|
+
q as isEqual,
|
|
1092
|
+
Xt as isEqualDate,
|
|
1093
|
+
Ue as isEqualUint8Array,
|
|
1094
|
+
pt as isFloat,
|
|
1035
1095
|
d as isFunction,
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1096
|
+
Kt as isISODateString,
|
|
1097
|
+
we as isInt,
|
|
1098
|
+
dt as isIntArray,
|
|
1099
|
+
qt as isMSTime,
|
|
1100
|
+
V as isNil,
|
|
1041
1101
|
p as isNumber,
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1102
|
+
mt as isNumberArray,
|
|
1103
|
+
de as isOPFSSupported,
|
|
1104
|
+
R as isObject,
|
|
1105
|
+
yt as isObjectLike,
|
|
1106
|
+
Ae as isPlainObject,
|
|
1107
|
+
gt as isPrimitive,
|
|
1108
|
+
wt as isPromise,
|
|
1109
|
+
At as isRegExp,
|
|
1110
|
+
C as isString,
|
|
1111
|
+
Et as isStringArray,
|
|
1112
|
+
ge as isSymbol,
|
|
1113
|
+
$ as isUint8Array,
|
|
1114
|
+
Ze as kebabCase,
|
|
1115
|
+
Rr as logError,
|
|
1116
|
+
Ft as msTimeToMilliseconds,
|
|
1117
|
+
St as needArray,
|
|
1118
|
+
Pt as nextMacroTask,
|
|
1119
|
+
$t as nextMicroTask,
|
|
1120
|
+
Wt as noop,
|
|
1121
|
+
xe as numberStep,
|
|
1122
|
+
Zt as numberStepScreenSize,
|
|
1123
|
+
Ht as numberStrip,
|
|
1124
|
+
er as omit,
|
|
1125
|
+
tr as omitBy,
|
|
1126
|
+
Gt as once,
|
|
1127
|
+
bt as orderBy,
|
|
1128
|
+
mr as parseChineseNumber,
|
|
1129
|
+
H as parseTime,
|
|
1130
|
+
st as performChunk,
|
|
1131
|
+
rr as pick,
|
|
1132
|
+
nr as pickBy,
|
|
1133
|
+
or as plainObjectToFlattenPathObject,
|
|
1134
|
+
B as pool,
|
|
1135
|
+
yr as queryParse,
|
|
1136
|
+
gr as queryStringify,
|
|
1137
|
+
ar as randomArrayItem,
|
|
1138
|
+
lr as randomFloat,
|
|
1139
|
+
ur as randomInt,
|
|
1079
1140
|
F as randomString,
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
Vt as
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1141
|
+
fr as randomUintByLength,
|
|
1142
|
+
We as randomUintString,
|
|
1143
|
+
ct as requestIdleCallbackPolyfill,
|
|
1144
|
+
wr as rmbUppercase,
|
|
1145
|
+
Bt as rsaDecrypt,
|
|
1146
|
+
Lt as rsaEncrypt,
|
|
1147
|
+
Nt as rsaGenerateKey,
|
|
1148
|
+
Ne as set,
|
|
1149
|
+
te as setBase,
|
|
1150
|
+
je as setWith,
|
|
1151
|
+
Ar as similarity,
|
|
1152
|
+
Mt as sleep,
|
|
1153
|
+
Er as snakeCase,
|
|
1154
|
+
Ct as sortBy,
|
|
1155
|
+
Sr as startCase,
|
|
1156
|
+
br as stringSingleline,
|
|
1157
|
+
Cr as stringTemplate,
|
|
1158
|
+
Q as stringTime,
|
|
1159
|
+
_ as stringToArrayBuffer,
|
|
1160
|
+
Vt as throttle,
|
|
1161
|
+
Qt as toInt,
|
|
1162
|
+
sr as toPlainObject,
|
|
1163
|
+
Z as traverseObjectKeys,
|
|
1164
|
+
Jt as tryToNumber,
|
|
1165
|
+
Rt as uint8ArrayToString,
|
|
1166
|
+
Or as uncapitalize,
|
|
1167
|
+
Je as uncapitalizeFirst,
|
|
1168
|
+
Ot as unionBy,
|
|
1169
|
+
zt as unixTimestamp,
|
|
1170
|
+
Tr as urlJoin,
|
|
1171
|
+
cr as zipObject
|
|
1110
1172
|
};
|