@aiao/utils 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,63 @@
1
+ /**
2
+ * 执行器状态接口
3
+ */
4
+ interface ExecutorStatus {
5
+ running: number;
6
+ queued: number;
7
+ maxConcurrent: number;
8
+ }
9
+ /**
10
+ * 异步任务执行器
11
+ * 支持并发控制和动态任务调度
12
+ */
13
+ export declare class AsyncTaskExecutor {
14
+ private maxConcurrent;
15
+ private running;
16
+ private queue;
17
+ constructor(maxConcurrent?: number);
18
+ /**
19
+ * 添加任务到执行器
20
+ * @param task - 返回 Promise 的异步任务函数
21
+ * @returns 返回任务执行结果的 Promise
22
+ */
23
+ addTask<T>(task: () => Promise<T>): Promise<T>;
24
+ /**
25
+ * 批量添加多个任务
26
+ * @param tasks - 任务数组
27
+ * @returns 返回所有任务结果的 Promise 数组
28
+ */
29
+ addTasks<T>(tasks: (() => Promise<T>)[]): Promise<T[]>;
30
+ /**
31
+ * 获取当前状态
32
+ * @returns 包含运行中任务数、队列长度和最大并发数
33
+ */
34
+ getStatus(): ExecutorStatus;
35
+ /**
36
+ * 动态修改最大并发数
37
+ * @param newMax - 新的最大并发数
38
+ */
39
+ setMaxConcurrent(newMax: number): void;
40
+ /**
41
+ * 清空队列(不影响正在执行的任务)
42
+ */
43
+ clearQueue(): void;
44
+ /**
45
+ * 等待所有任务完成
46
+ * @returns 当所有任务完成时 resolve
47
+ */
48
+ waitForAll(): Promise<void>;
49
+ /**
50
+ * 获取当前运行中的任务数
51
+ */
52
+ getRunningCount(): number;
53
+ /**
54
+ * 获取队列中等待的任务数
55
+ */
56
+ getQueuedCount(): number;
57
+ /**
58
+ * 执行队列中的下一个任务
59
+ */
60
+ private _runNext;
61
+ }
62
+ export {};
63
+ //# sourceMappingURL=AsyncTaskExecutor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncTaskExecutor.d.ts","sourceRoot":"","sources":["../../src/async/AsyncTaskExecutor.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,OAAO,CAAa;IAC5B,OAAO,CAAC,KAAK,CAAwB;gBAEzB,aAAa,GAAE,MAAU;IAIrC;;;;OAIG;IACH,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAY9C;;;;OAIG;IACH,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAItD;;;OAGG;IACH,SAAS,IAAI,cAAc;IAQ3B;;;OAGG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQtC;;OAEG;IACH,UAAU,IAAI,IAAI;IAOlB;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAa3B;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;OAEG;IACH,cAAc,IAAI,MAAM;IAIxB;;OAEG;IACH,OAAO,CAAC,QAAQ;CAmBjB"}
@@ -1,3 +1,4 @@
1
+ export * from './AsyncTaskExecutor.js';
1
2
  export * from './nextMacroTask.js';
2
3
  export * from './nextMicroTask.js';
3
4
  export * from './sleep.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/async/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/async/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Observable as ae, BehaviorSubject as V, distinctUntilChanged as Z, skip as le } from "rxjs";
1
+ import { Observable as ae, BehaviorSubject as W, distinctUntilChanged as V, skip as le } from "rxjs";
2
2
  import ue from "ms";
3
3
  import { distance as fe } from "fastest-levenshtein";
4
4
  class he {
@@ -25,9 +25,9 @@ class he {
25
25
  return this.#e.get(t).observable;
26
26
  }
27
27
  }
28
- const N = new he(), et = (e) => ({
29
- message$: N.on(e),
30
- emit: (n) => N.emit(e, n)
28
+ const L = new he(), et = (e) => ({
29
+ message$: L.on(e),
30
+ emit: (n) => L.emit(e, n)
31
31
  }), pe = [
32
32
  "mousemove",
33
33
  "keydown",
@@ -45,8 +45,8 @@ const N = new he(), et = (e) => ({
45
45
  class tt {
46
46
  #e = 1e3 * 2;
47
47
  #t;
48
- #r = new V(!1);
49
- idle$ = this.#r.asObservable().pipe(Z());
48
+ #r = new W(!1);
49
+ idle$ = this.#r.asObservable().pipe(V());
50
50
  constructor(t) {
51
51
  this.#e = t?.timeout || this.#e;
52
52
  }
@@ -71,8 +71,8 @@ class rt {
71
71
  constructor(t) {
72
72
  this.name = t, window.addEventListener("beforeunload", () => this.#n && this.#n(!0));
73
73
  }
74
- #e = new V(!1);
75
- #t = this.#e.asObservable().pipe(Z(), le(1));
74
+ #e = new W(!1);
75
+ #t = this.#e.asObservable().pipe(V(), le(1));
76
76
  #r;
77
77
  #n;
78
78
  get isLeader() {
@@ -105,7 +105,7 @@ const ot = (e, t) => {
105
105
  function at(e) {
106
106
  return e === !0 || e === !1 || e != null && typeof e.valueOf() == "boolean";
107
107
  }
108
- function q(e) {
108
+ function Z(e) {
109
109
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
110
110
  }
111
111
  const d = (e) => !!(e && e.constructor && e.call && e.apply), p = (e) => {
@@ -117,22 +117,22 @@ const d = (e) => !!(e && e.constructor && e.call && e.apply), p = (e) => {
117
117
  }, ye = (e) => e && e.constructor === Symbol, lt = (e) => {
118
118
  if (e === !0 || e === !1 || e === null || e === void 0) return !0;
119
119
  if (p(e)) return e === 0;
120
- if (q(e)) return isNaN(e.getTime());
120
+ if (Z(e)) return isNaN(e.getTime());
121
121
  if (d(e) || ye(e)) return !1;
122
122
  const t = e.length;
123
123
  if (p(t)) return t === 0;
124
124
  const r = e.size;
125
125
  return p(r) ? r === 0 : Object.keys(e).length === 0;
126
- }, ut = (e) => p(e) && e % 1 !== 0, we = (e) => Number.isInteger(e);
126
+ }, ut = (e) => p(e) && e % 1 !== 0, ge = (e) => Number.isInteger(e);
127
127
  function ft(e) {
128
- return S(e) && e.every(we);
128
+ return S(e) && e.every(ge);
129
129
  }
130
- const H = (e) => e == null;
130
+ const Q = (e) => e == null;
131
131
  function ht(e) {
132
132
  return S(e) && e.every(p);
133
133
  }
134
- const R = (e) => !!e && e.constructor === Object, pt = (e) => typeof e == "object" && e !== null;
135
- function ge(e) {
134
+ const x = (e) => !!e && e.constructor === Object, pt = (e) => typeof e == "object" && e !== null;
135
+ function we(e) {
136
136
  if (Object.prototype.toString.call(e) !== "[object Object]")
137
137
  return !1;
138
138
  const t = Object.getPrototypeOf(e);
@@ -145,10 +145,10 @@ const mt = (e) => !(!e || !e.then || !d(e.then));
145
145
  function yt(e) {
146
146
  return e instanceof RegExp;
147
147
  }
148
- function O(e) {
148
+ function T(e) {
149
149
  return typeof e == "string";
150
150
  }
151
- const wt = (e) => S(e) ? e.every(O) : !1, P = (e) => e instanceof Uint8Array, gt = (e) => Array.isArray(e) ? e : H(e) ? [] : [e], At = (e, t = [], r = []) => {
151
+ const gt = (e) => S(e) ? e.every(T) : !1, M = (e) => e instanceof Uint8Array, wt = (e) => Array.isArray(e) ? e : Q(e) ? [] : [e], At = (e, t = [], r = []) => {
152
152
  const n = [...e];
153
153
  return n.sort((o, c) => {
154
154
  for (let s = 0; s < t.length; s++) {
@@ -165,13 +165,111 @@ const wt = (e) => S(e) ? e.every(O) : !1, P = (e) => e instanceof Uint8Array, gt
165
165
  }, Et = (e) => (t, r) => {
166
166
  const n = t[e], o = r[e];
167
167
  return n == null && o == null ? 0 : n == null ? 1 : o == null ? -1 : n > o ? 1 : n < o ? -1 : 0;
168
- }, bt = (e, t) => e.filter(/* @__PURE__ */ ((r) => (n) => r.has(t(n)) ? !1 : r.add(t(n)))(/* @__PURE__ */ new Set())), St = (e) => setTimeout(() => e(), 0), j = /* @__PURE__ */ Promise.resolve(), Ot = (e) => e ? j.then(e) : j, Tt = (e) => new Promise((t) => setTimeout(t, e)), Ae = new TextDecoder(), Ct = (e) => Ae.decode(e);
168
+ }, bt = (e, t) => e.filter(/* @__PURE__ */ ((r) => (n) => r.has(t(n)) ? !1 : r.add(t(n)))(/* @__PURE__ */ new Set()));
169
+ class St {
170
+ maxConcurrent;
171
+ running = 0;
172
+ queue = [];
173
+ constructor(t = 3) {
174
+ this.maxConcurrent = t || 1;
175
+ }
176
+ /**
177
+ * 添加任务到执行器
178
+ * @param task - 返回 Promise 的异步任务函数
179
+ * @returns 返回任务执行结果的 Promise
180
+ */
181
+ addTask(t) {
182
+ return new Promise((r, n) => {
183
+ this.queue.push({
184
+ task: t,
185
+ resolve: r,
186
+ reject: n
187
+ }), this._runNext();
188
+ });
189
+ }
190
+ /**
191
+ * 批量添加多个任务
192
+ * @param tasks - 任务数组
193
+ * @returns 返回所有任务结果的 Promise 数组
194
+ */
195
+ addTasks(t) {
196
+ return Promise.all(t.map((r) => this.addTask(r)));
197
+ }
198
+ /**
199
+ * 获取当前状态
200
+ * @returns 包含运行中任务数、队列长度和最大并发数
201
+ */
202
+ getStatus() {
203
+ return {
204
+ running: this.running,
205
+ queued: this.queue.length,
206
+ maxConcurrent: this.maxConcurrent
207
+ };
208
+ }
209
+ /**
210
+ * 动态修改最大并发数
211
+ * @param newMax - 新的最大并发数
212
+ */
213
+ setMaxConcurrent(t) {
214
+ for (t = t || 1, this.maxConcurrent = t; this.running < this.maxConcurrent && this.queue.length > 0; )
215
+ this._runNext();
216
+ }
217
+ /**
218
+ * 清空队列(不影响正在执行的任务)
219
+ */
220
+ clearQueue() {
221
+ this.queue.forEach(({ reject: t }) => {
222
+ t(new Error("Task cancelled: queue cleared"));
223
+ }), this.queue = [];
224
+ }
225
+ /**
226
+ * 等待所有任务完成
227
+ * @returns 当所有任务完成时 resolve
228
+ */
229
+ waitForAll() {
230
+ return new Promise((t) => {
231
+ const r = () => {
232
+ this.running === 0 && this.queue.length === 0 ? t() : setTimeout(r, 50);
233
+ };
234
+ r();
235
+ });
236
+ }
237
+ /**
238
+ * 获取当前运行中的任务数
239
+ */
240
+ getRunningCount() {
241
+ return this.running;
242
+ }
243
+ /**
244
+ * 获取队列中等待的任务数
245
+ */
246
+ getQueuedCount() {
247
+ return this.queue.length;
248
+ }
249
+ /**
250
+ * 执行队列中的下一个任务
251
+ */
252
+ _runNext() {
253
+ if (this.running >= this.maxConcurrent || this.queue.length === 0) return;
254
+ const t = this.queue.shift();
255
+ if (!t) return;
256
+ const { task: r, resolve: n, reject: o } = t;
257
+ this.running++, Promise.resolve().then(() => r()).then((c) => {
258
+ n(c);
259
+ }).catch((c) => {
260
+ o(c);
261
+ }).finally(() => {
262
+ this.running--, this._runNext();
263
+ });
264
+ }
265
+ }
266
+ const Tt = (e) => setTimeout(() => e(), 0), j = /* @__PURE__ */ Promise.resolve(), Ot = (e) => e ? j.then(e) : j, Ct = (e) => new Promise((t) => setTimeout(t, e)), Ae = new TextDecoder(), Pt = (e) => Ae.decode(e);
169
267
  function Ee(e, t) {
170
268
  for (const r in e)
171
- Object.prototype.hasOwnProperty.call(e, r) && (t(r, e[r], e), J(e[r], t));
269
+ Object.prototype.hasOwnProperty.call(e, r) && (t(r, e[r], e), H(e[r], t));
172
270
  }
173
- const J = (e, t) => {
174
- Array.isArray(e) ? e.forEach((r) => J(r, t)) : R(e) && Ee(e, t);
271
+ const H = (e, t) => {
272
+ Array.isArray(e) ? e.forEach((r) => H(r, t)) : x(e) && Ee(e, t);
175
273
  }, C = (e) => new Uint8Array(
176
274
  atob(e).split("").map((t) => t.charCodeAt(0))
177
275
  );
@@ -196,9 +294,9 @@ async function Mt(e, t, r) {
196
294
  return new TextDecoder().decode(c);
197
295
  }
198
296
  const b = (e) => {
199
- if (O(e))
297
+ if (T(e))
200
298
  return btoa(e);
201
- if (P(e) || Array.isArray(e))
299
+ if (M(e) || Array.isArray(e))
202
300
  return btoa(String.fromCharCode(...e));
203
301
  if (me(e)) {
204
302
  const t = new Uint8Array(e);
@@ -216,11 +314,11 @@ async function Se() {
216
314
  ["encrypt", "decrypt"]
217
315
  );
218
316
  }
219
- async function Oe(e) {
317
+ async function Te(e) {
220
318
  const t = await crypto.subtle.exportKey("raw", e);
221
319
  return b(t);
222
320
  }
223
- async function Pt(e) {
321
+ async function $t(e) {
224
322
  const t = new TextEncoder(), r = await Se(), n = crypto.getRandomValues(new Uint8Array(16)), o = await crypto.subtle.encrypt(
225
323
  {
226
324
  name: "AES-GCM",
@@ -230,25 +328,25 @@ async function Pt(e) {
230
328
  t.encode(e)
231
329
  );
232
330
  return {
233
- key: await Oe(r),
331
+ key: await Te(r),
234
332
  iv: b(n),
235
333
  cipherText: b(o)
236
334
  };
237
335
  }
238
- const Te = (e) => atob(e.replace(/[-]/g, "+").replace(/[_]/g, "/")), $t = (e) => {
336
+ const Oe = (e) => atob(e.replace(/[-]/g, "+").replace(/[_]/g, "/")), xt = (e) => {
239
337
  const t = e.split(".");
240
338
  if (t.length !== 3) throw new Error("JWT is not valid: not a JWT structure");
241
339
  const r = t[1];
242
- return JSON.parse(Te(r));
340
+ return JSON.parse(Oe(r));
243
341
  };
244
- function B(e) {
342
+ function N(e) {
245
343
  const t = new ArrayBuffer(e.length), r = new Uint8Array(t);
246
344
  for (let n = 0, o = e.length; n < o; n++)
247
345
  r[n] = e.charCodeAt(n);
248
346
  return t;
249
347
  }
250
348
  function Ce(e) {
251
- const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n = B(r);
349
+ const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n = N(r);
252
350
  return crypto.subtle.importKey(
253
351
  "pkcs8",
254
352
  n,
@@ -260,7 +358,7 @@ function Ce(e) {
260
358
  ["decrypt"]
261
359
  );
262
360
  }
263
- async function Rt(e, t) {
361
+ async function Nt(e, t) {
264
362
  const r = await Ce(t), n = await crypto.subtle.decrypt(
265
363
  {
266
364
  name: "RSA-OAEP"
@@ -270,8 +368,8 @@ async function Rt(e, t) {
270
368
  );
271
369
  return new TextDecoder().decode(n);
272
370
  }
273
- function Me(e) {
274
- const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n = B(r);
371
+ function Pe(e) {
372
+ const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n = N(r);
275
373
  return crypto.subtle.importKey(
276
374
  "spki",
277
375
  n,
@@ -283,22 +381,22 @@ function Me(e) {
283
381
  ["encrypt"]
284
382
  );
285
383
  }
286
- async function Bt(e, t) {
287
- const r = await Me(t), n = await crypto.subtle.encrypt(
384
+ async function Rt(e, t) {
385
+ const r = await Pe(t), n = await crypto.subtle.encrypt(
288
386
  {
289
387
  name: "RSA-OAEP"
290
388
  },
291
389
  r,
292
- B(e)
390
+ N(e)
293
391
  );
294
392
  return b(n);
295
393
  }
296
- const D = "PUBLIC KEY", x = "RAS PRIVATE KEY";
297
- async function U(e, t = "pkcs8") {
394
+ const I = "PUBLIC KEY", _ = "RAS PRIVATE KEY";
395
+ async function D(e, t = "pkcs8") {
298
396
  const r = await crypto.subtle.exportKey(t, e);
299
397
  return b(r);
300
398
  }
301
- async function Lt(e = 1024) {
399
+ async function Bt(e = 1024) {
302
400
  const { publicKey: t, privateKey: r } = await crypto.subtle.generateKey(
303
401
  {
304
402
  name: "RSA-OAEP",
@@ -310,17 +408,17 @@ async function Lt(e = 1024) {
310
408
  },
311
409
  !0,
312
410
  ["encrypt", "decrypt"]
313
- ), n = await U(t, "spki"), o = await U(r, "pkcs8");
411
+ ), n = await D(t, "spki"), o = await D(r, "pkcs8");
314
412
  return {
315
- publicKey: `-----BEGIN ${D}-----
413
+ publicKey: `-----BEGIN ${I}-----
316
414
  ${n}
317
- -----END ${D}-----`,
318
- privateKey: `-----BEGIN ${x}-----
415
+ -----END ${I}-----`,
416
+ privateKey: `-----BEGIN ${_}-----
319
417
  ${o}
320
- -----END ${x}-----`
418
+ -----END ${_}-----`
321
419
  };
322
420
  }
323
- const It = (e) => p(e) || q(e) ? !0 : H(e) ? !1 : new Date(e).getTime() > 0, Pe = (e) => {
421
+ const Lt = (e) => p(e) || Z(e) ? !0 : Q(e) ? !1 : new Date(e).getTime() > 0, Me = (e) => {
324
422
  const t = e > 0 ? "+" : "-", r = Math.abs(e), n = `${Math.floor(r / 60)}`.padStart(2, "0"), o = `${r % 60}`.padStart(2, "0");
325
423
  return {
326
424
  flag: t,
@@ -329,24 +427,24 @@ const It = (e) => p(e) || q(e) ? !0 : H(e) ? !1 : new Date(e).getTime() > 0, Pe
329
427
  minute: o
330
428
  };
331
429
  }, $e = (e, t, r) => {
332
- const { flag: n, hour: o, minute: c } = Pe(r);
430
+ const { flag: n, hour: o, minute: c } = Me(r);
333
431
  return `${e}T${t}${n}${o}:${c}`;
334
- }, Nt = (e, t, r) => new Date($e(e, t, r)), Q = (e, t) => {
432
+ }, jt = (e, t, r) => new Date($e(e, t, r)), J = (e, t) => {
335
433
  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;
336
434
  return { year: c, month: o, day: n, hour: s, minute: i, second: a };
337
- }, Y = (e, t, r) => r ? `${t} ${r[e] || e}` : `${t} ${e}`, X = ["year", "month", "day", "hour", "minute", "second"], jt = (e, t, r) => {
338
- const n = Q(e, t), o = X.find((s) => n[s] > 0) || "second", c = n[o];
435
+ }, Y = (e, t, r) => r ? `${t} ${r[e] || e}` : `${t} ${e}`, X = ["year", "month", "day", "hour", "minute", "second"], It = (e, t, r) => {
436
+ const n = J(e, t), o = X.find((s) => n[s] > 0) || "second", c = n[o];
339
437
  return d(r) ? r({ key: o, value: c }) : Y(o, c, r);
340
- }, Dt = (e, t, r) => {
341
- const n = Q(e, t);
438
+ }, _t = (e, t, r) => {
439
+ const n = J(e, t);
342
440
  return d(r) ? r(n) : X.filter((o) => o).map((o) => Y(o, n[o], r)).join(" ");
343
- }, xt = (e) => O(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);
344
- function Ut(e) {
345
- return p(e) ? !0 : O(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(
441
+ }, Dt = (e) => T(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);
442
+ function kt(e) {
443
+ return p(e) ? !0 : T(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(
346
444
  e
347
445
  )?.groups : !1;
348
446
  }
349
- const _t = (e) => ue(e), Kt = () => Math.floor(Date.now() / 1e3), kt = (e, t = 50) => {
447
+ const Ut = (e) => ue(e), Kt = () => Math.floor(Date.now() / 1e3), zt = (e, t = 50) => {
350
448
  let r;
351
449
  return function(...n) {
352
450
  const o = () => {
@@ -354,9 +452,9 @@ const _t = (e) => ue(e), Kt = () => Math.floor(Date.now() / 1e3), kt = (e, t = 5
354
452
  };
355
453
  r !== void 0 && clearTimeout(r), r = setTimeout(o, t);
356
454
  };
357
- }, zt = () => {
455
+ }, Ft = () => {
358
456
  };
359
- function Ft(e) {
457
+ function qt(e) {
360
458
  let t = !1, r;
361
459
  return function() {
362
460
  if (t)
@@ -372,7 +470,7 @@ const Gt = (e, t) => {
372
470
  o - r >= t && (e.apply(this, n), r = o);
373
471
  };
374
472
  }, ee = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
375
- function g(e, t, r) {
473
+ function w(e, t, r) {
376
474
  const n = r[0];
377
475
  if (t != null && e >= t)
378
476
  throw new Error(e + " >= " + t);
@@ -383,14 +481,14 @@ function g(e, t, r) {
383
481
  for (; (e[s] || n) === t[s]; )
384
482
  s++;
385
483
  if (s > 0)
386
- return t.slice(0, s) + g(e.slice(s), t.slice(s), r);
484
+ return t.slice(0, s) + w(e.slice(s), t.slice(s), r);
387
485
  }
388
486
  const o = e ? r.indexOf(e[0]) : 0, c = t != null ? r.indexOf(t[0]) : r.length;
389
487
  if (c - o > 1) {
390
488
  const s = Math.round(0.5 * (o + c));
391
489
  return r[s];
392
490
  } else
393
- return t && t.length > 1 ? t.slice(0, 1) : r[o] + g(e.slice(1), null, r);
491
+ return t && t.length > 1 ? t.slice(0, 1) : r[o] + w(e.slice(1), null, r);
394
492
  }
395
493
  function te(e) {
396
494
  if (e.length !== re(e[0]))
@@ -409,14 +507,14 @@ function E(e) {
409
507
  throw new Error("invalid order key: " + e);
410
508
  return e.slice(0, t);
411
509
  }
412
- function _(e, t) {
510
+ function k(e, t) {
413
511
  if (e === "A" + t[0].repeat(26))
414
512
  throw new Error("invalid order key: " + e);
415
513
  const r = E(e);
416
514
  if (e.slice(r.length).slice(-1) === t[0])
417
515
  throw new Error("invalid order key: " + e);
418
516
  }
419
- function K(e, t) {
517
+ function U(e, t) {
420
518
  te(e);
421
519
  const [r, ...n] = e.split("");
422
520
  let o = !0;
@@ -434,7 +532,7 @@ function K(e, t) {
434
532
  } else
435
533
  return r + n.join("");
436
534
  }
437
- function Re(e, t) {
535
+ function xe(e, t) {
438
536
  te(e);
439
537
  const [r, ...n] = e.split("");
440
538
  let o = !0;
@@ -452,79 +550,79 @@ function Re(e, t) {
452
550
  } else
453
551
  return r + n.join("");
454
552
  }
455
- function w(e, t, r = ee) {
456
- if (e != null && _(e, r), t != null && _(t, r), e != null && t != null && e >= t)
553
+ function g(e, t, r = ee) {
554
+ if (e != null && k(e, r), t != null && k(t, r), e != null && t != null && e >= t)
457
555
  throw new Error(e + " >= " + t);
458
556
  if (e == null) {
459
557
  if (t == null)
460
558
  return "a" + r[0];
461
559
  const a = E(t), u = t.slice(a.length);
462
560
  if (a === "A" + r[0].repeat(26))
463
- return a + g("", u, r);
561
+ return a + w("", u, r);
464
562
  if (a < t)
465
563
  return a;
466
- const l = Re(a, r);
564
+ const l = xe(a, r);
467
565
  if (l == null)
468
566
  throw new Error("cannot decrement any more");
469
567
  return l;
470
568
  }
471
569
  if (t == null) {
472
- const a = E(e), u = e.slice(a.length), l = K(a, r);
473
- return l ?? a + g(u, null, r);
570
+ const a = E(e), u = e.slice(a.length), l = U(a, r);
571
+ return l ?? a + w(u, null, r);
474
572
  }
475
573
  const n = E(e), o = e.slice(n.length), c = E(t), s = t.slice(c.length);
476
574
  if (n === c)
477
- return n + g(o, s, r);
478
- const i = K(n, r);
575
+ return n + w(o, s, r);
576
+ const i = U(n, r);
479
577
  if (i == null)
480
578
  throw new Error("cannot increment any more");
481
- return i < t ? i : n + g(o, null, r);
579
+ return i < t ? i : n + w(o, null, r);
482
580
  }
483
- function k(e, t, r, n = ee) {
581
+ function K(e, t, r, n = ee) {
484
582
  if (r === 0)
485
583
  return [];
486
584
  if (r === 1)
487
- return [w(e, t, n)];
585
+ return [g(e, t, n)];
488
586
  if (t == null) {
489
- let s = w(e, t, n);
587
+ let s = g(e, t, n);
490
588
  const i = [s];
491
589
  for (let a = 0; a < r - 1; a++)
492
- s = w(s, t, n), i.push(s);
590
+ s = g(s, t, n), i.push(s);
493
591
  return i;
494
592
  }
495
593
  if (e == null) {
496
- let s = w(e, t, n);
594
+ let s = g(e, t, n);
497
595
  const i = [s];
498
596
  for (let a = 0; a < r - 1; a++)
499
- s = w(e, s, n), i.push(s);
597
+ s = g(e, s, n), i.push(s);
500
598
  return i.reverse(), i;
501
599
  }
502
- const o = Math.floor(r / 2), c = w(e, t, n);
503
- return [...k(e, c, o, n), c, ...k(c, t, r - o - 1, n)];
600
+ const o = Math.floor(r / 2), c = g(e, t, n);
601
+ return [...K(e, c, o, n), c, ...K(c, t, r - o - 1, n)];
504
602
  }
505
- const Be = (e) => {
603
+ const Ne = (e) => {
506
604
  if (e == null || e === "") return !1;
507
605
  const t = parseFloat(e);
508
606
  return !(isNaN(t) || !isFinite(t));
509
- }, Le = (e, t) => Math.ceil(e / t) * t, Wt = (e, t = 80, r = 1) => Le(e * r, t), vt = (e, t = 12) => parseFloat(e.toPrecision(t)), Vt = (e) => {
607
+ }, Re = (e, t) => Math.ceil(e / t) * t, vt = (e, t = 80, r = 1) => Re(e * r, t), Wt = (e, t = 12) => parseFloat(e.toPrecision(t)), Vt = (e) => {
510
608
  const t = Number(e);
511
609
  return t < 0 ? Math.ceil(t) : Math.floor(t);
512
610
  }, Zt = (e) => {
513
- if (Be(e)) {
611
+ if (Ne(e)) {
514
612
  const t = Number(e);
515
613
  return isNaN(t) || !isFinite(t) ? e : t;
516
614
  }
517
615
  return e;
518
- }, Ie = (e) => {
616
+ }, Be = (e) => {
519
617
  for (const r of Object.getOwnPropertyNames(e)) {
520
618
  const n = e[r];
521
- !R(n) && !d(n) || n === null || Ie(n);
619
+ !x(n) && !d(n) || n === null || Be(n);
522
620
  }
523
621
  return Object.isFrozen(e) ? e : Object.freeze(e);
524
- }, Ne = (e) => e.replace(/\[/g, ".").replace(/\]/g, "").split(".");
622
+ }, Le = (e) => e.replace(/\[/g, ".").replace(/\]/g, "").split(".");
525
623
  function ne(e, t, r, n) {
526
624
  const o = d(n) ? n : void 0;
527
- return Ne(t).reduce((s, i, a, u) => {
625
+ return Le(t).reduce((s, i, a, u) => {
528
626
  if (a === u.length - 1)
529
627
  return s[i] = r, s;
530
628
  if (i in s)
@@ -540,23 +638,23 @@ function ne(e, t, r, n) {
540
638
  function je(e, t, r) {
541
639
  return ne(e, t, r);
542
640
  }
543
- function De(e, t, r, n) {
641
+ function Ie(e, t, r, n) {
544
642
  const o = d(n) ? n : void 0;
545
643
  return ne(e, t, r, o);
546
644
  }
547
- const qt = (e) => {
645
+ const Qt = (e) => {
548
646
  const t = {};
549
647
  return Object.keys(e).forEach((r) => {
550
- r.match(/[^\]]*\[\d+\]/) ? je(t, r, e[r]) : De(t, r, e[r], Object);
648
+ r.match(/[^\]]*\[\d+\]/) ? je(t, r, e[r]) : Ie(t, r, e[r], Object);
551
649
  }), t;
552
- }, xe = (e, t, r) => {
650
+ }, _e = (e, t, r) => {
553
651
  const n = (c) => String.prototype.split.call(t, c).filter(Boolean).reduce((s, i) => s != null ? s[i] : s, e), o = n(/[,[\]]+?/) || n(/[,[\].]+?/);
554
652
  return o === void 0 || o === e ? r : o;
555
- }, Ue = (e, t) => {
653
+ }, De = (e, t) => {
556
654
  const r = t.split(".");
557
- return !!e && (r.length > 1 ? Ue(e[t.split(".")[0]], r.slice(1).join(".")) : Object.hasOwnProperty.call(e, t));
655
+ return !!e && (r.length > 1 ? De(e[t.split(".")[0]], r.slice(1).join(".")) : Object.hasOwnProperty.call(e, t));
558
656
  };
559
- function _e(e, t) {
657
+ function ke(e, t) {
560
658
  return e.length !== t.length ? !1 : e.every((r, n) => r === t[n]);
561
659
  }
562
660
  const z = (e, t) => {
@@ -569,7 +667,7 @@ const z = (e, t) => {
569
667
  for (n = r; n-- !== 0; ) if (!z(e[n], t[n])) return !1;
570
668
  return !0;
571
669
  }
572
- if (P(e) && P(t)) return _e(e, t);
670
+ if (M(e) && M(t)) return ke(e, t);
573
671
  if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
574
672
  if (e.valueOf !== Object.prototype.valueOf) return e.valueOf() === t.valueOf();
575
673
  if (e.toString !== Object.prototype.toString) return e.toString() === t.toString();
@@ -587,31 +685,31 @@ const z = (e, t) => {
587
685
  (r, n) => (delete r[n], r),
588
686
  { ...e }
589
687
  ) : {};
590
- function Qt(e, t) {
688
+ function Yt(e, t) {
591
689
  return Object.keys(e).filter((r) => !t(e[r], r)).reduce((r, n) => (r[n] = e[n], r), {});
592
690
  }
593
- function Yt(e, t) {
691
+ function Xt(e, t) {
594
692
  return e ? t.reduce(
595
693
  (r, n) => (Object.prototype.hasOwnProperty.call(e, n) && (r[n] = e[n]), r),
596
694
  {}
597
695
  ) : {};
598
696
  }
599
- function Xt(e, t) {
697
+ function er(e, t) {
600
698
  return Object.keys(e).filter((r) => t(e[r], r)).reduce((r, n) => (r[n] = e[n], r), {});
601
699
  }
602
- const $ = (e, t = "", r = {}) => (S(e) ? e.forEach((n, o) => $(n, `${t}[${o}]`, r)) : ge(e) ? Object.keys(e).forEach(
700
+ const $ = (e, t = "", r = {}) => (S(e) ? e.forEach((n, o) => $(n, `${t}[${o}]`, r)) : we(e) ? Object.keys(e).forEach(
603
701
  (n) => $(e[n], `${t ? t + "." : ""}${n}`, r)
604
702
  ) : r[`${t}`] = e, r);
605
- function er(e) {
703
+ function tr(e) {
606
704
  return $(e);
607
705
  }
608
- const tr = (e) => {
706
+ const rr = (e) => {
609
707
  const t = {};
610
708
  for (const r in e)
611
709
  Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
612
710
  return t;
613
711
  };
614
- function rr(e, t) {
712
+ function nr(e, t) {
615
713
  if (!e || !e.length)
616
714
  return {};
617
715
  const r = d(t) ? t : S(t) ? (n, o) => t[o] : () => t;
@@ -620,37 +718,37 @@ function rr(e, t) {
620
718
  {}
621
719
  );
622
720
  }
623
- const nr = typeof window == "object", or = (e) => e[Math.floor(Math.random() * e.length)], sr = (e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) => Math.random() * (t - e) + e;
624
- function cr(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
721
+ const or = typeof window == "object", sr = (e) => e[Math.floor(Math.random() * e.length)], cr = (e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) => Math.random() * (t - e) + e;
722
+ function ir(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
625
723
  return Math.floor(Math.random() * (t - e + 1) + e);
626
724
  }
627
- const Ke = "0", oe = "123456789", se = Ke + oe, ce = "abcdefghijklmnopqrstuvwxyz", ke = ce.toUpperCase(), ze = ce + ke, Fe = "_-", Ge = se + ze + Fe, F = (e = 16, t = Ge) => {
725
+ const Ue = "0", oe = "123456789", se = Ue + oe, ce = "abcdefghijklmnopqrstuvwxyz", Ke = ce.toUpperCase(), ze = ce + Ke, Fe = "_-", qe = se + ze + Fe, F = (e = 16, t = qe) => {
628
726
  let r = "";
629
727
  const n = crypto.getRandomValues(new Uint8Array(e |= 0)), o = t.length - 1;
630
728
  for (; e--; ) r += t[n[e] & o];
631
729
  return r;
632
- }, We = (e = 16) => F(1, oe) + F(e - 1, se), ir = (e = 16) => parseInt(We(e), 10), ie = (e) => {
730
+ }, Ge = (e = 16) => F(1, oe) + F(e - 1, se), ar = (e = 16) => parseInt(Ge(e), 10), ie = (e) => {
633
731
  if (!e) return "";
634
732
  const t = e.toLowerCase();
635
733
  return ve(t);
636
- }, ve = (e) => e ? e.substring(0, 1).toUpperCase() + e.substring(1, e.length) : "", Ve = /[A-Z]?[a-z]+|[0-9]+|[A-Z]+(?![a-z])/g, L = (e) => Array.from(e.match(Ve) ?? []);
637
- function ar(e) {
638
- const t = L(e);
734
+ }, ve = (e) => e ? e.substring(0, 1).toUpperCase() + e.substring(1, e.length) : "", We = /[A-Z]?[a-z]+|[0-9]+|[A-Z]+(?![a-z])/g, R = (e) => Array.from(e.match(We) ?? []);
735
+ function lr(e) {
736
+ const t = R(e);
639
737
  if (t.length === 0)
640
738
  return "";
641
739
  const [r, ...n] = t;
642
740
  return `${r.toLowerCase()}${n.map((o) => ie(o)).join("")}`;
643
741
  }
644
- const lr = async (e, t = "deflate") => {
742
+ const ur = async (e, t = "deflate") => {
645
743
  try {
646
744
  const n = new TextEncoder().encode(e), o = new CompressionStream(t), s = o.writable.getWriter();
647
745
  await s.write(n), await s.close();
648
746
  const a = o.readable.getReader(), u = [];
649
747
  let l = 0;
650
748
  for (; ; ) {
651
- const { done: m, value: M } = await a.read();
749
+ const { done: m, value: P } = await a.read();
652
750
  if (m) break;
653
- u.push(M), l += M.length;
751
+ u.push(P), l += P.length;
654
752
  }
655
753
  const f = new Uint8Array(l);
656
754
  let A = 0;
@@ -661,7 +759,7 @@ const lr = async (e, t = "deflate") => {
661
759
  } catch (r) {
662
760
  throw console.error("压缩过程中出错:", r), r;
663
761
  }
664
- }, ur = async (e, t = "deflate") => {
762
+ }, fr = async (e, t = "deflate") => {
665
763
  try {
666
764
  let r = e.replace(/-/g, "+").replace(/_/g, "/");
667
765
  const n = (4 - r.length % 4) % 4;
@@ -674,9 +772,9 @@ const lr = async (e, t = "deflate") => {
674
772
  const l = s.readable.getReader(), f = [];
675
773
  let A = 0;
676
774
  for (; ; ) {
677
- const { done: h, value: I } = await l.read();
775
+ const { done: h, value: B } = await l.read();
678
776
  if (h) break;
679
- f.push(I), A += I.length;
777
+ f.push(B), A += B.length;
680
778
  }
681
779
  const y = new Uint8Array(A);
682
780
  let m = 0;
@@ -686,7 +784,7 @@ const lr = async (e, t = "deflate") => {
686
784
  } catch (r) {
687
785
  throw console.error("解压过程中出错:", r), r;
688
786
  }
689
- }, Ze = (e) => L(e).map((r) => r.toLowerCase()).join("-"), qe = {
787
+ }, Ve = (e) => R(e).map((r) => r.toLowerCase()).join("-"), Ze = {
690
788
  "〇": 0,
691
789
  一: 1,
692
790
  二: 2,
@@ -725,10 +823,10 @@ const lr = async (e, t = "deflate") => {
725
823
  8: 8,
726
824
  9: 9
727
825
  };
728
- function fr(e) {
826
+ function hr(e) {
729
827
  let t = 0, r = 0, n = 0, o = !1;
730
828
  for (const c of e.split("").reverse()) {
731
- if (r = qe[c], r === void 0)
829
+ if (r = Ze[c], r === void 0)
732
830
  throw new Error(`无法解析的数字: ${c}`);
733
831
  switch (r) {
734
832
  case 10: {
@@ -751,7 +849,7 @@ function fr(e) {
751
849
  }
752
850
  return o && (t += r), t;
753
851
  }
754
- const hr = (e) => {
852
+ const pr = (e) => {
755
853
  const t = {};
756
854
  return new URLSearchParams(e).forEach((n, o) => {
757
855
  if (Object.prototype.hasOwnProperty.call(t, o)) {
@@ -760,7 +858,7 @@ const hr = (e) => {
760
858
  } else
761
859
  t[o] = n;
762
860
  }), t;
763
- }, pr = (e) => {
861
+ }, dr = (e) => {
764
862
  const t = new URLSearchParams();
765
863
  for (const r in e)
766
864
  if (Object.prototype.hasOwnProperty.call(e, r)) {
@@ -768,43 +866,43 @@ const hr = (e) => {
768
866
  Array.isArray(n) ? n.forEach((o) => t.append(r, `${o}`)) : t.set(r, `${n}`);
769
867
  }
770
868
  return t.sort(), t.toString();
771
- }, He = ["角", "分", "厘"], G = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], T = [
869
+ }, Qe = ["角", "分", "厘"], q = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], O = [
772
870
  ["元", "万", "亿", "兆", "京", "垓"],
773
871
  ["", "拾", "佰", "仟"]
774
- ], W = Math.pow(10, 22), dr = (e) => {
872
+ ], G = Math.pow(10, 22), mr = (e) => {
775
873
  const t = e < 0 ? "欠" : "";
776
874
  let r = Math.abs(e);
777
- if (r > W)
778
- throw new Error(`max value is ${W}`);
875
+ if (r > G)
876
+ throw new Error(`max value is ${G}`);
779
877
  let n = "";
780
878
  if (e > Math.floor(e)) {
781
879
  const o = +("0." + `${r}`.split(".")[1]);
782
- n = He.reduce(
783
- (c, s, i) => c + (G[Math.floor(o * 10 * Math.pow(10, i)) % 10] + s).replace(/零./, ""),
880
+ n = Qe.reduce(
881
+ (c, s, i) => c + (q[Math.floor(o * 10 * Math.pow(10, i)) % 10] + s).replace(/零./, ""),
784
882
  ""
785
883
  );
786
884
  }
787
885
  n = n || "整", r = Math.floor(r);
788
- for (let o = 0; o < T[0].length && r > 0; o++) {
886
+ for (let o = 0; o < O[0].length && r > 0; o++) {
789
887
  let c = "";
790
- for (let s = 0; s < T[1].length && r > 0; s++)
791
- c = G[r % 10] + T[1][s] + c, r = Math.floor(r / 10);
792
- n = c.replace(/(零.)*零$/g, "").replace(/^$/, "零") + T[0][o] + n;
888
+ for (let s = 0; s < O[1].length && r > 0; s++)
889
+ c = q[r % 10] + O[1][s] + c, r = Math.floor(r / 10);
890
+ n = c.replace(/(零.)*零$/g, "").replace(/^$/, "零") + O[0][o] + n;
793
891
  }
794
892
  return `${t}${n.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整")}`;
795
893
  };
796
- function mr(e, t) {
894
+ function yr(e, t) {
797
895
  const r = e || "", n = t || "", o = Math.max(r.length, n.length);
798
896
  return o === 0 ? 1 : (o - fe(r, n)) / o;
799
897
  }
800
- const yr = (e) => L(e).map((r) => r.toLowerCase()).join("_"), wr = (e) => Ze(e).split("-").filter((t) => !!t).map((t) => ie(t.toLowerCase())).join(" "), gr = (e) => e.trim().replace(/\s+/g, " "), Ar = (e, t) => e.replace(/\${([^}]+)}/g, (r, n) => xe(t, n.trim(), "")), Je = (e) => e ? e.substring(0, 1).toLowerCase() + e.substring(1, e.length) : "", Er = (e) => {
898
+ const gr = (e) => R(e).map((r) => r.toLowerCase()).join("_"), wr = (e) => Ve(e).split("-").filter((t) => !!t).map((t) => ie(t.toLowerCase())).join(" "), Ar = (e) => e.trim().replace(/\s+/g, " "), Er = (e, t) => e.replace(/\${([^}]+)}/g, (r, n) => _e(t, n.trim(), "")), He = (e) => e ? e.substring(0, 1).toLowerCase() + e.substring(1, e.length) : "", br = (e) => {
801
899
  if (!e) return "";
802
900
  const t = e.toLowerCase();
803
- return Je(t);
804
- }, v = /^([^/:]+):\/*/, br = (...e) => {
901
+ return He(t);
902
+ }, v = /^([^/:]+):\/*/, Sr = (...e) => {
805
903
  if (e = e.filter((s) => s !== ""), e.length === 0)
806
904
  return "";
807
- if (e.findIndex((s) => !(O(s) || p(s))) >= 0)
905
+ if (e.findIndex((s) => !(T(s) || p(s))) >= 0)
808
906
  throw new Error("paths must be a string or number");
809
907
  let r = "";
810
908
  const n = `${e[0]}`;
@@ -823,7 +921,7 @@ const yr = (e) => L(e).map((r) => r.toLowerCase()).join("_"), wr = (e) => Ze(e).
823
921
  }
824
922
  return c.replace(/\/(\?|&|#[^!])/g, "$1");
825
923
  };
826
- class Sr {
924
+ class Tr {
827
925
  #e = /* @__PURE__ */ new Map();
828
926
  /**
829
927
  * 添加事件监听器
@@ -877,9 +975,9 @@ class Sr {
877
975
  }
878
976
  }
879
977
  }
880
- const Or = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=", Tr = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", Cr = (e, ...t) => {
978
+ const Or = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=", Cr = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", Pr = (e, ...t) => {
881
979
  const r = [];
882
- R(e) ? Object.keys(e).sort().forEach((o) => {
980
+ x(e) ? Object.keys(e).sort().forEach((o) => {
883
981
  const c = e[o];
884
982
  r.push([o, c]);
885
983
  }) : r.push([e]), t.length && t.forEach((o) => {
@@ -887,125 +985,126 @@ const Or = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBAD
887
985
  }), (console?.table ?? console.log)(r);
888
986
  };
889
987
  export {
988
+ St as AsyncTaskExecutor,
890
989
  ee as BASE_62_DIGITS,
891
- Sr as EventDispatcher,
990
+ Tr as EventDispatcher,
892
991
  Or as IMAGE_MIN_BASE64_BLACK,
893
- Tr as IMAGE_MIN_BASE64_TRANSPARENT,
894
- nr as IS_BROWSER,
992
+ Cr as IMAGE_MIN_BASE64_TRANSPARENT,
993
+ or as IS_BROWSER,
895
994
  tt as IdleTimer,
896
995
  rt as LeaderElection,
897
996
  Mt as aesDecrypt,
898
- Pt as aesEncrypt,
997
+ $t as aesEncrypt,
899
998
  C as base64Decode,
900
999
  b as base64Encode,
901
- ar as camelCase,
902
- It as canBeDate,
903
- Be as canBeNumber,
1000
+ lr as camelCase,
1001
+ Lt as canBeDate,
1002
+ Ne as canBeNumber,
904
1003
  ie as capitalize,
905
1004
  ve as capitalizeFirst,
906
1005
  ot as chunk,
907
- lr as compressToBase64Url,
1006
+ ur as compressToBase64Url,
908
1007
  et as createBroadcastTopic,
909
- Nt as dateStringToDate,
1008
+ jt as dateStringToDate,
910
1009
  $e as dateStringWithTimezone,
911
- kt as debounce,
912
- $t as decodeJWTPayload,
913
- ur as decompressFromBase64Url,
914
- Ie as deepFreeze,
1010
+ zt as debounce,
1011
+ xt as decodeJWTPayload,
1012
+ fr as decompressFromBase64Url,
1013
+ Be as deepFreeze,
915
1014
  st as difference,
916
- zt as emptyFunction,
1015
+ Ft as emptyFunction,
917
1016
  ct as flatten,
918
1017
  de as flattenDeep,
919
- qt as flattenPathObjectToPlainObject,
920
- Dt as formatCountdown,
921
- jt as formatPassTime,
922
- w as generateKeyBetween,
923
- k as generateKeysBetween,
924
- xe as get,
925
- Ue as has,
1018
+ Qt as flattenPathObjectToPlainObject,
1019
+ _t as formatCountdown,
1020
+ It as formatPassTime,
1021
+ g as generateKeyBetween,
1022
+ K as generateKeysBetween,
1023
+ _e as get,
1024
+ De as has,
926
1025
  it as intersection,
927
1026
  S as isArray,
928
1027
  me as isArrayBuffer,
929
1028
  at as isBoolean,
930
- q as isDate,
1029
+ Z as isDate,
931
1030
  lt as isEmpty,
932
1031
  z as isEqual,
933
1032
  Ht as isEqualDate,
934
- _e as isEqualUint8Array,
1033
+ ke as isEqualUint8Array,
935
1034
  ut as isFloat,
936
1035
  d as isFunction,
937
- xt as isISODateString,
938
- we as isInt,
1036
+ Dt as isISODateString,
1037
+ ge as isInt,
939
1038
  ft as isIntArray,
940
- Ut as isMSTime,
941
- H as isNil,
1039
+ kt as isMSTime,
1040
+ Q as isNil,
942
1041
  p as isNumber,
943
1042
  ht as isNumberArray,
944
- R as isObject,
1043
+ x as isObject,
945
1044
  pt as isObjectLike,
946
- ge as isPlainObject,
1045
+ we as isPlainObject,
947
1046
  dt as isPrimitive,
948
1047
  mt as isPromise,
949
1048
  yt as isRegExp,
950
- O as isString,
951
- wt as isStringArray,
1049
+ T as isString,
1050
+ gt as isStringArray,
952
1051
  ye as isSymbol,
953
- P as isUint8Array,
954
- Ze as kebabCase,
955
- Cr as logError,
956
- _t as msTimeToMilliseconds,
957
- gt as needArray,
958
- St as nextMacroTask,
1052
+ M as isUint8Array,
1053
+ Ve as kebabCase,
1054
+ Pr as logError,
1055
+ Ut as msTimeToMilliseconds,
1056
+ wt as needArray,
1057
+ Tt as nextMacroTask,
959
1058
  Ot as nextMicroTask,
960
- zt as noop,
961
- Le as numberStep,
962
- Wt as numberStepScreenSize,
963
- vt as numberStrip,
1059
+ Ft as noop,
1060
+ Re as numberStep,
1061
+ vt as numberStepScreenSize,
1062
+ Wt as numberStrip,
964
1063
  Jt as omit,
965
- Qt as omitBy,
966
- Ft as once,
1064
+ Yt as omitBy,
1065
+ qt as once,
967
1066
  At as orderBy,
968
- fr as parseChineseNumber,
969
- Q as parseTime,
1067
+ hr as parseChineseNumber,
1068
+ J as parseTime,
970
1069
  nt as performChunk,
971
- Yt as pick,
972
- Xt as pickBy,
973
- er as plainObjectToFlattenPathObject,
974
- N as pool,
975
- hr as queryParse,
976
- pr as queryStringify,
977
- or as randomArrayItem,
978
- sr as randomFloat,
979
- cr as randomInt,
1070
+ Xt as pick,
1071
+ er as pickBy,
1072
+ tr as plainObjectToFlattenPathObject,
1073
+ L as pool,
1074
+ pr as queryParse,
1075
+ dr as queryStringify,
1076
+ sr as randomArrayItem,
1077
+ cr as randomFloat,
1078
+ ir as randomInt,
980
1079
  F as randomString,
981
- ir as randomUintByLength,
982
- We as randomUintString,
983
- dr as rmbUppercase,
984
- Rt as rsaDecrypt,
985
- Bt as rsaEncrypt,
986
- Lt as rsaGenerateKey,
1080
+ ar as randomUintByLength,
1081
+ Ge as randomUintString,
1082
+ mr as rmbUppercase,
1083
+ Nt as rsaDecrypt,
1084
+ Rt as rsaEncrypt,
1085
+ Bt as rsaGenerateKey,
987
1086
  je as set,
988
1087
  ne as setBase,
989
- De as setWith,
990
- mr as similarity,
991
- Tt as sleep,
992
- yr as snakeCase,
1088
+ Ie as setWith,
1089
+ yr as similarity,
1090
+ Ct as sleep,
1091
+ gr as snakeCase,
993
1092
  Et as sortBy,
994
1093
  wr as startCase,
995
- gr as stringSingleline,
996
- Ar as stringTemplate,
1094
+ Ar as stringSingleline,
1095
+ Er as stringTemplate,
997
1096
  Y as stringTime,
998
- B as stringToArrayBuffer,
1097
+ N as stringToArrayBuffer,
999
1098
  Gt as throttle,
1000
1099
  Vt as toInt,
1001
- tr as toPlainObject,
1002
- J as traverseObjectKeys,
1100
+ rr as toPlainObject,
1101
+ H as traverseObjectKeys,
1003
1102
  Zt as tryToNumber,
1004
- Ct as uint8ArrayToString,
1005
- Er as uncapitalize,
1006
- Je as uncapitalizeFirst,
1103
+ Pt as uint8ArrayToString,
1104
+ br as uncapitalize,
1105
+ He as uncapitalizeFirst,
1007
1106
  bt as unionBy,
1008
1107
  Kt as unixTimestamp,
1009
- br as urlJoin,
1010
- rr as zipObject
1108
+ Sr as urlJoin,
1109
+ nr as zipObject
1011
1110
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiao/utils",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",