@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.
Files changed (117) hide show
  1. package/dist/@browser/broadcast-channel-pool.d.ts +26 -6
  2. package/dist/@browser/broadcast-channel-pool.d.ts.map +1 -1
  3. package/dist/@browser/index.d.ts +2 -0
  4. package/dist/@browser/index.d.ts.map +1 -1
  5. package/dist/@browser/leader-election.d.ts +40 -2
  6. package/dist/@browser/leader-election.d.ts.map +1 -1
  7. package/dist/@browser/opfs-detection.d.ts +12 -0
  8. package/dist/@browser/opfs-detection.d.ts.map +1 -0
  9. package/dist/@browser/requestIdleCallbackPolyfill.d.ts +2 -0
  10. package/dist/@browser/requestIdleCallbackPolyfill.d.ts.map +1 -0
  11. package/dist/array/difference.d.ts +3 -3
  12. package/dist/array/flatten.d.ts +3 -3
  13. package/dist/array/flattenDeep.d.ts +3 -3
  14. package/dist/array/intersection.d.ts +4 -4
  15. package/dist/array/needArray.d.ts +5 -10
  16. package/dist/array/needArray.d.ts.map +1 -1
  17. package/dist/array/orderBy.d.ts +18 -4
  18. package/dist/array/orderBy.d.ts.map +1 -1
  19. package/dist/array/sortBy.d.ts +5 -5
  20. package/dist/array/unionBy.d.ts +20 -0
  21. package/dist/array/unionBy.d.ts.map +1 -1
  22. package/dist/async/{AsyncTaskExecutor.d.ts → AsyncQueueExecutor.d.ts} +15 -10
  23. package/dist/async/AsyncQueueExecutor.d.ts.map +1 -0
  24. package/dist/async/index.d.ts +1 -1
  25. package/dist/async/index.d.ts.map +1 -1
  26. package/dist/async/nextMacroTask.d.ts +11 -2
  27. package/dist/async/nextMacroTask.d.ts.map +1 -1
  28. package/dist/async/nextMicroTask.d.ts +1 -1
  29. package/dist/binary/uint8ArrayToString.d.ts +1 -1
  30. package/dist/collection/traverseObjectKeys.d.ts.map +1 -1
  31. package/dist/crypto/aesDecrypt.d.ts +12 -5
  32. package/dist/crypto/aesDecrypt.d.ts.map +1 -1
  33. package/dist/crypto/aesEncrypt.d.ts +2 -2
  34. package/dist/crypto/rsaGenerateKey.d.ts +22 -0
  35. package/dist/crypto/rsaGenerateKey.d.ts.map +1 -1
  36. package/dist/date/parseTime.d.ts +23 -0
  37. package/dist/date/parseTime.d.ts.map +1 -1
  38. package/dist/date/stringTime.d.ts +12 -0
  39. package/dist/date/stringTime.d.ts.map +1 -1
  40. package/dist/function/once.d.ts +2 -2
  41. package/dist/function/throttle.d.ts +3 -3
  42. package/dist/index.js +471 -409
  43. package/dist/indexing/fractional-indexing.d.ts +50 -11
  44. package/dist/indexing/fractional-indexing.d.ts.map +1 -1
  45. package/dist/number/canBeNumber.d.ts +2 -2
  46. package/dist/number/numberStep.d.ts +2 -2
  47. package/dist/number/numberStepScreenSize.d.ts +13 -0
  48. package/dist/number/numberStepScreenSize.d.ts.map +1 -1
  49. package/dist/number/numberStrip.d.ts +3 -3
  50. package/dist/number/toInt.d.ts +12 -6
  51. package/dist/number/toInt.d.ts.map +1 -1
  52. package/dist/number/tryToNumber.d.ts +17 -8
  53. package/dist/number/tryToNumber.d.ts.map +1 -1
  54. package/dist/object/deepFreeze.d.ts +17 -1
  55. package/dist/object/deepFreeze.d.ts.map +1 -1
  56. package/dist/object/flattenPathObjectToPlainObject.d.ts +14 -3
  57. package/dist/object/flattenPathObjectToPlainObject.d.ts.map +1 -1
  58. package/dist/object/get.d.ts +2 -2
  59. package/dist/object/has.d.ts +2 -2
  60. package/dist/object/isEqual.d.ts +3 -3
  61. package/dist/object/omit.d.ts +2 -2
  62. package/dist/object/omitBy.d.ts +3 -3
  63. package/dist/object/pick.d.ts +2 -2
  64. package/dist/object/plainObjectToFlattenPathObject.d.ts +10 -4
  65. package/dist/object/plainObjectToFlattenPathObject.d.ts.map +1 -1
  66. package/dist/object/set.d.ts +3 -3
  67. package/dist/object/setWith.d.ts +0 -1
  68. package/dist/object/setWith.d.ts.map +1 -1
  69. package/dist/object/toPlainObject.d.ts +19 -0
  70. package/dist/object/toPlainObject.d.ts.map +1 -1
  71. package/dist/object/zipObject.d.ts +22 -5
  72. package/dist/object/zipObject.d.ts.map +1 -1
  73. package/dist/platform/is-browser.d.ts +14 -1
  74. package/dist/platform/is-browser.d.ts.map +1 -1
  75. package/dist/random/randomArrayItem.d.ts +18 -1
  76. package/dist/random/randomArrayItem.d.ts.map +1 -1
  77. package/dist/random/randomFloat.d.ts +16 -0
  78. package/dist/random/randomFloat.d.ts.map +1 -1
  79. package/dist/random/randomInt.d.ts +14 -4
  80. package/dist/random/randomInt.d.ts.map +1 -1
  81. package/dist/random/randomString.d.ts +16 -0
  82. package/dist/random/randomString.d.ts.map +1 -1
  83. package/dist/random/randomUintByLength.d.ts +15 -0
  84. package/dist/random/randomUintByLength.d.ts.map +1 -1
  85. package/dist/random/randomUintString.d.ts +15 -0
  86. package/dist/random/randomUintString.d.ts.map +1 -1
  87. package/dist/string/camelCase.d.ts +1 -1
  88. package/dist/string/getWords.d.ts +21 -0
  89. package/dist/string/getWords.d.ts.map +1 -1
  90. package/dist/string/kebabCase.d.ts +2 -2
  91. package/dist/string/stringSingleline.d.ts +14 -1
  92. package/dist/string/stringSingleline.d.ts.map +1 -1
  93. package/dist/string/stringToArrayBuffer.d.ts +0 -1
  94. package/dist/string/stringToArrayBuffer.d.ts.map +1 -1
  95. package/dist/tools/event.d.ts +35 -22
  96. package/dist/tools/event.d.ts.map +1 -1
  97. package/dist/tools/index.d.ts +1 -1
  98. package/dist/tools/index.d.ts.map +1 -1
  99. package/dist/type-definition/result-types.d.ts +26 -4
  100. package/dist/type-definition/result-types.d.ts.map +1 -1
  101. package/dist/types/AnyFunction.d.ts +2 -2
  102. package/dist/types/DeepPartial.d.ts +3 -3
  103. package/dist/types/isArray.d.ts +1 -1
  104. package/dist/types/isArrayBuffer.d.ts +3 -3
  105. package/dist/types/isBoolean.d.ts +3 -3
  106. package/dist/types/isDate.d.ts +3 -3
  107. package/dist/types/isEmpty.d.ts +4 -4
  108. package/dist/types/isNil.d.ts +2 -2
  109. package/dist/types/isNumber.d.ts +3 -3
  110. package/dist/types/isObject.d.ts +2 -2
  111. package/dist/types/isPlainObject.d.ts +3 -3
  112. package/dist/types/isPrimitive.d.ts +3 -3
  113. package/dist/types/isRegExp.d.ts +3 -3
  114. package/dist/types/isString.d.ts +2 -2
  115. package/dist/types/isUint8Array.d.ts +3 -3
  116. package/package.json +4 -4
  117. package/dist/async/AsyncTaskExecutor.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,33 +1,58 @@
1
- import { Observable as ae, BehaviorSubject as W, distinctUntilChanged as V, skip as le } from "rxjs";
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
- #e = /* @__PURE__ */ new Map();
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.#e.get(t);
8
- if (n?.channel)
9
- n.channel.postMessage(r);
10
- else
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
- if (!this.#e.has(t)) {
15
- const r = new ae((n) => {
16
- const o = this.#e.get(t);
17
- o.observerCount++, o.observer = n;
18
- const c = (i) => n.next(i.data), s = new BroadcastChannel(t);
19
- return s.addEventListener("message", c), o.channel = s, () => {
20
- o.observerCount--, o.observerCount <= 0 && (s.removeEventListener("message", c), this.#e.delete(t));
21
- };
22
- });
23
- return this.#e.set(t, { observable: r, observerCount: 0 }), r;
24
- }
25
- return this.#e.get(t).observable;
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 L = new he(), et = (e) => ({
29
- message$: L.on(e),
30
- emit: (n) => L.emit(e, 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 tt {
70
+ class rt {
46
71
  #e = 1e3 * 2;
47
72
  #t;
48
- #r = new W(!1);
49
- idle$ = this.#r.asObservable().pipe(V());
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 rt {
95
+ class nt {
96
+ /**
97
+ * @param name - 锁名称,相同名称的实例竞争同一个 leader 位置
98
+ */
71
99
  constructor(t) {
72
- this.name = t, window.addEventListener("beforeunload", () => this.#n && this.#n(!0));
100
+ this.name = t, window.addEventListener("beforeunload", this.#s);
73
101
  }
74
- #e = new W(!1);
75
- #t = this.#e.asObservable().pipe(V(), le(1));
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.#e.value;
109
+ return this.#n;
80
110
  }
81
- leadership() {
82
- return this.#r || (this.#r = navigator.locks.request(this.name, async () => (this.#e.next(!0), new Promise((t) => {
83
- this.#n = t;
84
- })))), this.#t;
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
- function nt(e, t) {
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 ot = (e, t) => {
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
- }, st = (e, t) => e.filter((r) => !t.includes(r)), ct = (e) => Array.prototype.concat([], ...e), de = (e) => e.flatMap((t) => Array.isArray(t) ? de(t) : t), it = (...e) => e.reduce((t, r) => t.filter((n) => r.includes(n))), S = Array.isArray, me = (e) => e instanceof ArrayBuffer;
105
- function at(e) {
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 Z(e) {
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
- }, ye = (e) => e && e.constructor === Symbol, lt = (e) => {
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 (Z(e)) return isNaN(e.getTime());
121
- if (d(e) || ye(e)) return !1;
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
- }, ut = (e) => p(e) && e % 1 !== 0, ge = (e) => Number.isInteger(e);
127
- function ft(e) {
128
- return S(e) && e.every(ge);
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 Q = (e) => e == null;
131
- function ht(e) {
132
- return S(e) && e.every(p);
189
+ const V = (e) => e == null;
190
+ function mt(e) {
191
+ return b(e) && e.every(p);
133
192
  }
134
- const x = (e) => !!e && e.constructor === Object, pt = (e) => typeof e == "object" && e !== null;
135
- function we(e) {
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 dt(e) {
200
+ function gt(e) {
142
201
  return e == null || typeof e != "object" && typeof e != "function";
143
202
  }
144
- const mt = (e) => !(!e || !e.then || !d(e.then));
145
- function yt(e) {
203
+ const wt = (e) => !(!e || !e.then || !d(e.then));
204
+ function At(e) {
146
205
  return e instanceof RegExp;
147
206
  }
148
- function T(e) {
207
+ function C(e) {
149
208
  return typeof e == "string";
150
209
  }
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 = []) => {
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", u = o[i], l = c[i];
156
- if (u == null && l == null) continue;
157
- if (u == null) return a === "desc" ? 1 : -1;
158
- if (l == null) return a === "desc" ? -1 : 1;
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 (u < l ? f = -1 : u > l && (f = 1), a === "desc" && (f = -f), f !== 0)
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
- }, Et = (e) => (t, r) => {
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
- }, bt = (e, t) => e.filter(/* @__PURE__ */ ((r) => (n) => r.has(t(n)) ? !1 : r.add(t(n)))(/* @__PURE__ */ new Set()));
169
- class St {
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
- return new Promise((r, n) => {
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: r,
186
- reject: n
187
- }), this._runNext();
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._runNext();
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
- _runNext() {
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((c) => {
258
- n(c);
259
- }).catch((c) => {
260
- o(c);
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._runNext();
319
+ this.running--, c !== void 0 && this.queue_map.delete(c), this._run_next();
263
320
  });
264
321
  }
265
322
  }
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);
267
- function Ee(e, t) {
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), H(e[r], t));
326
+ Object.prototype.hasOwnProperty.call(e, r) && (t(r, e[r], e), Z(e[r], t));
270
327
  }
271
- const H = (e, t) => {
272
- Array.isArray(e) ? e.forEach((r) => H(r, t)) : x(e) && Ee(e, t);
273
- }, C = (e) => new Uint8Array(
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 Mt(e, t, r) {
333
+ async function _t(e, t, r) {
277
334
  const n = await crypto.subtle.importKey(
278
335
  "raw",
279
- C(t),
336
+ T(t),
280
337
  {
281
338
  name: "AES-GCM",
282
339
  length: 256
283
340
  },
284
341
  !0,
285
342
  ["decrypt"]
286
- ), o = C(r), c = await crypto.subtle.decrypt(
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
- C(e)
349
+ T(e)
293
350
  );
294
351
  return new TextDecoder().decode(c);
295
352
  }
296
- const b = (e) => {
297
- if (T(e))
353
+ const S = (e) => {
354
+ if (C(e))
298
355
  return btoa(e);
299
- if (M(e) || Array.isArray(e))
356
+ if ($(e) || Array.isArray(e))
300
357
  return btoa(String.fromCharCode(...e));
301
- if (me(e)) {
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 Se() {
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 Te(e) {
374
+ async function Oe(e) {
318
375
  const t = await crypto.subtle.exportKey("raw", e);
319
- return b(t);
376
+ return S(t);
320
377
  }
321
- async function $t(e) {
322
- const t = new TextEncoder(), r = await Se(), n = crypto.getRandomValues(new Uint8Array(16)), o = await crypto.subtle.encrypt(
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 Te(r),
332
- iv: b(n),
333
- cipherText: b(o)
388
+ key: await Oe(r),
389
+ iv: S(n),
390
+ cipherText: S(o)
334
391
  };
335
392
  }
336
- const Oe = (e) => atob(e.replace(/[-]/g, "+").replace(/[_]/g, "/")), xt = (e) => {
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(Oe(r));
397
+ return JSON.parse(Te(r));
341
398
  };
342
- function N(e) {
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 Ce(e) {
349
- const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n = N(r);
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 Nt(e, t) {
362
- const r = await Ce(t), n = await crypto.subtle.decrypt(
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
- C(e)
424
+ T(e)
368
425
  );
369
426
  return new TextDecoder().decode(n);
370
427
  }
371
- function Pe(e) {
372
- const t = e.replace(/-----.*-----/g, "").trim(), r = atob(t), n = N(r);
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 Rt(e, t) {
385
- const r = await Pe(t), n = await crypto.subtle.encrypt(
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
- N(e)
447
+ _(e)
391
448
  );
392
- return b(n);
449
+ return S(n);
393
450
  }
394
- const I = "PUBLIC KEY", _ = "RAS PRIVATE KEY";
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 b(r);
454
+ return S(r);
398
455
  }
399
- async function Bt(e = 1024) {
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 ${I}-----
470
+ publicKey: `-----BEGIN ${N}-----
414
471
  ${n}
415
- -----END ${I}-----`,
416
- privateKey: `-----BEGIN ${_}-----
472
+ -----END ${N}-----`,
473
+ privateKey: `-----BEGIN ${j}-----
417
474
  ${o}
418
- -----END ${_}-----`
475
+ -----END ${j}-----`
419
476
  };
420
477
  }
421
- const Lt = (e) => p(e) || Z(e) ? !0 : Q(e) ? !1 : new Date(e).getTime() > 0, Me = (e) => {
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
- }, $e = (e, t, r) => {
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
- }, jt = (e, t, r) => new Date($e(e, t, r)), J = (e, t) => {
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
- }, 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];
437
- return d(r) ? r({ key: o, value: c }) : Y(o, c, r);
438
- }, _t = (e, t, r) => {
439
- const n = J(e, t);
440
- return d(r) ? r(n) : X.filter((o) => o).map((o) => Y(o, n[o], r)).join(" ");
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(
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 Ut = (e) => ue(e), Kt = () => Math.floor(Date.now() / 1e3), zt = (e, t = 50) => {
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
- }, Ft = () => {
512
+ }, Wt = () => {
456
513
  };
457
- function qt(e) {
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 Gt = (e, t) => {
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
- }, ee = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
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 + " >= " + t);
477
- if (e.slice(-1) === n || t && t.slice(-1) === n)
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] || n) === t[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(0.5 * (o + c));
545
+ const s = Math.round((o + c) / 2);
489
546
  return r[s];
490
- } else
491
- return t && t.length > 1 ? t.slice(0, 1) : r[o] + w(e.slice(1), null, r);
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 re(e) {
550
+ function X(e) {
551
+ const t = e.charCodeAt(0), r = 97, n = 90;
498
552
  if (e >= "a" && e <= "z")
499
- return e.charCodeAt(0) - 97 + 2;
553
+ return t - r + 2;
500
554
  if (e >= "A" && e <= "Z")
501
- return 90 - e.charCodeAt(0) + 2;
502
- throw new Error("invalid order key head: " + e);
555
+ return n - t + 2;
556
+ throw new Error(`invalid order key head: ${e}`);
503
557
  }
504
558
  function E(e) {
505
- const t = re(e[0]);
559
+ const t = X(e[0]);
506
560
  if (t > e.length)
507
- throw new Error("invalid order key: " + e);
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("invalid order key: " + e);
570
+ throw new Error(`invalid order key: ${e}`);
513
571
  const r = E(e);
514
- if (e.slice(r.length).slice(-1) === t[0])
515
- throw new Error("invalid order key: " + e);
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
- te(e);
519
- const [r, ...n] = e.split("");
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
- return "a" + t[0];
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
- } else
533
- return r + n.join("");
588
+ }
589
+ return r + n.join("");
534
590
  }
535
- function xe(e, t) {
536
- te(e);
537
- const [r, ...n] = e.split("");
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.slice(-1) : (n[c] = t[s], o = !1);
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
- return "Z" + t.slice(-1);
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.slice(-1)) : n.pop(), c + n.join("");
550
- } else
551
- return r + n.join("");
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 = ee) {
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 + " >= " + t);
609
+ throw new Error(`${e} >= ${t}`);
610
+ if (e == null && t == null)
611
+ return "a" + r[0];
556
612
  if (e == null) {
557
- if (t == null)
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("", u, r);
615
+ return a + w("", l, r);
562
616
  if (a < t)
563
617
  return a;
564
- const l = xe(a, r);
565
- if (l == null)
618
+ const u = _e(a, r);
619
+ if (u == null)
566
620
  throw new Error("cannot decrement any more");
567
- return l;
621
+ return u;
568
622
  }
569
623
  if (t == null) {
570
- const a = E(e), u = e.slice(a.length), l = U(a, r);
571
- return l ?? a + w(u, null, r);
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 = ee) {
582
- if (r === 0)
583
- return [];
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
- let s = g(e, t, n);
588
- const i = [s];
589
- for (let a = 0; a < r - 1; a++)
590
- s = g(s, t, n), i.push(s);
591
- return i;
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
- let s = g(e, t, n);
595
- const i = [s];
596
- for (let a = 0; a < r - 1; a++)
597
- s = g(e, s, n), i.push(s);
598
- return i.reverse(), i;
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 Ne = (e) => {
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
- }, 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) => {
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
- }, Zt = (e) => {
611
- if (Ne(e)) {
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
- !x(n) && !d(n) || n === null || Be(n);
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 ne(e, t, r, n) {
677
+ function te(e, t, r, n) {
624
678
  const o = d(n) ? n : void 0;
625
- return Le(t).reduce((s, i, a, u) => {
626
- if (a === u.length - 1)
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 l = o(s[i], i, s);
633
- if (l) return s[i] = l;
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(u[a + 1]) ? [] : {};
689
+ return s[i] = /^[0-9]{1,}$/.test(l[a + 1]) ? [] : {};
636
690
  }, e), e;
637
691
  }
638
- function je(e, t, r) {
639
- return ne(e, t, r);
692
+ function Ne(e, t, r) {
693
+ return te(e, t, r);
640
694
  }
641
- function Ie(e, t, r, n) {
695
+ function je(e, t, r, n) {
642
696
  const o = d(n) ? n : void 0;
643
- return ne(e, t, r, o);
697
+ return te(e, t, r, o);
644
698
  }
645
- const Qt = (e) => {
699
+ const Yt = (e) => {
646
700
  const t = {};
647
701
  return Object.keys(e).forEach((r) => {
648
- r.match(/[^\]]*\[\d+\]/) ? je(t, r, e[r]) : Ie(t, r, e[r], Object);
702
+ r.match(/[^\]]*\[\d+\]/) ? Ne(t, r, e[r]) : je(t, r, e[r], Object);
649
703
  }), t;
650
- }, _e = (e, t, r) => {
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
- }, De = (e, t) => {
707
+ }, ke = (e, t) => {
654
708
  const r = t.split(".");
655
- return !!e && (r.length > 1 ? De(e[t.split(".")[0]], r.slice(1).join(".")) : Object.hasOwnProperty.call(e, t));
709
+ return !!e && (r.length > 1 ? ke(e[t.split(".")[0]], r.slice(1).join(".")) : Object.hasOwnProperty.call(e, t));
656
710
  };
657
- function ke(e, t) {
711
+ function Ue(e, t) {
658
712
  return e.length !== t.length ? !1 : e.every((r, n) => r === t[n]);
659
713
  }
660
- const z = (e, t) => {
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 (!z(e[n], t[n])) return !1;
721
+ for (n = r; n-- !== 0; ) if (!q(e[n], t[n])) return !1;
668
722
  return !0;
669
723
  }
670
- if (M(e) && M(t)) return ke(e, t);
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 (!z(e[c], t[c])) return !1;
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
- }, Ht = (e, t) => +e == +t, Jt = (e, t) => e ? !t || t.length === 0 ? e : t.reduce(
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 Yt(e, t) {
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 Xt(e, t) {
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 er(e, t) {
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 $ = (e, t = "", r = {}) => (S(e) ? e.forEach((n, o) => $(n, `${t}[${o}]`, r)) : we(e) ? Object.keys(e).forEach(
701
- (n) => $(e[n], `${t ? t + "." : ""}${n}`, r)
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 tr(e) {
704
- return $(e);
757
+ function or(e) {
758
+ return M(e);
705
759
  }
706
- const rr = (e) => {
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 nr(e, t) {
766
+ function cr(e, t) {
713
767
  if (!e || !e.length)
714
768
  return {};
715
- const r = d(t) ? t : S(t) ? (n, o) => t[o] : () => 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 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) {
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 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) => {
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
- }, Ge = (e = 16) => F(1, oe) + F(e - 1, se), ar = (e = 16) => parseInt(Ge(e), 10), ie = (e) => {
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 ve(t);
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);
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) => ie(o)).join("")}`;
794
+ return `${r.toLowerCase()}${n.map((o) => se(o)).join("")}`;
741
795
  }
742
- const ur = async (e, t = "deflate") => {
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(), u = [];
747
- let l = 0;
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
- u.push(P), l += P.length;
805
+ l.push(P), u += P.length;
752
806
  }
753
- const f = new Uint8Array(l);
807
+ const f = new Uint8Array(u);
754
808
  let A = 0;
755
- for (const m of u)
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
- }, fr = async (e, t = "deflate") => {
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 l = s.readable.getReader(), f = [];
826
+ const u = s.readable.getReader(), f = [];
773
827
  let A = 0;
774
828
  for (; ; ) {
775
- const { done: h, value: B } = await l.read();
829
+ const { done: h, value: x } = await u.read();
776
830
  if (h) break;
777
- f.push(B), A += B.length;
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
- }, Ve = (e) => R(e).map((r) => r.toLowerCase()).join("-"), Ze = {
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 hr(e) {
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 = Ze[c], r === void 0)
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 pr = (e) => {
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
- }, dr = (e) => {
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 = ["角", "分", "厘"], q = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], O = [
923
+ }, Qe = ["角", "分", "厘"], z = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], O = [
870
924
  ["元", "万", "亿", "兆", "京", "垓"],
871
925
  ["", "拾", "佰", "仟"]
872
- ], G = Math.pow(10, 22), mr = (e) => {
926
+ ], v = Math.pow(10, 22), wr = (e) => {
873
927
  const t = e < 0 ? "欠" : "";
874
928
  let r = Math.abs(e);
875
- if (r > G)
876
- throw new Error(`max value is ${G}`);
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 + (q[Math.floor(o * 10 * Math.pow(10, i)) % 10] + s).replace(/零./, ""),
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 = q[r % 10] + O[1][s] + c, r = Math.floor(r / 10);
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 yr(e, t) {
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 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) => {
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 He(t);
902
- }, v = /^([^/:]+):\/*/, Sr = (...e) => {
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) => !(T(s) || p(s))) >= 0)
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(v, "$1:///") : r = n.replace(v, "$1://"), e.shift()), r && !r.endsWith("/") && (r += "/");
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 Tr {
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 event - 要分发的事件对象
1007
+ * @param type - 事件类型
1008
+ * @param data - 事件数据
954
1009
  */
955
- dispatchEvent(t) {
956
- this.#t(t.type).forEach((r) => r.call(this, 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
- removeAllEventListener() {
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
- const n = /* @__PURE__ */ new Set();
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 Or = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=", Cr = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", Pr = (e, ...t) => {
1037
+ const $r = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=", Mr = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", Rr = (e, ...t) => {
979
1038
  const r = [];
980
- x(e) ? Object.keys(e).sort().forEach((o) => {
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
- St as AsyncTaskExecutor,
989
- ee as BASE_62_DIGITS,
990
- Tr as EventDispatcher,
991
- Or as IMAGE_MIN_BASE64_BLACK,
992
- Cr as IMAGE_MIN_BASE64_TRANSPARENT,
993
- or as IS_BROWSER,
994
- tt as IdleTimer,
995
- rt as LeaderElection,
996
- Mt as aesDecrypt,
997
- $t as aesEncrypt,
998
- C as base64Decode,
999
- b as base64Encode,
1000
- lr as camelCase,
1001
- Lt as canBeDate,
1002
- Ne as canBeNumber,
1003
- ie as capitalize,
1004
- ve as capitalizeFirst,
1005
- ot as chunk,
1006
- ur as compressToBase64Url,
1007
- et as createBroadcastTopic,
1008
- jt as dateStringToDate,
1009
- $e as dateStringWithTimezone,
1010
- zt as debounce,
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
- fr as decompressFromBase64Url,
1072
+ dr as decompressFromBase64Url,
1013
1073
  Be as deepFreeze,
1014
- st as difference,
1015
- Ft as emptyFunction,
1016
- ct as flatten,
1017
- de as flattenDeep,
1018
- Qt as flattenPathObjectToPlainObject,
1019
- _t as formatCountdown,
1020
- It as formatPassTime,
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
- _e as get,
1024
- De as has,
1025
- it as intersection,
1026
- S as isArray,
1027
- me as isArrayBuffer,
1028
- at as isBoolean,
1029
- Z as isDate,
1030
- lt as isEmpty,
1031
- z as isEqual,
1032
- Ht as isEqualDate,
1033
- ke as isEqualUint8Array,
1034
- ut as isFloat,
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
- Dt as isISODateString,
1037
- ge as isInt,
1038
- ft as isIntArray,
1039
- kt as isMSTime,
1040
- Q as isNil,
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
- ht as isNumberArray,
1043
- x as isObject,
1044
- pt as isObjectLike,
1045
- we as isPlainObject,
1046
- dt as isPrimitive,
1047
- mt as isPromise,
1048
- yt as isRegExp,
1049
- T as isString,
1050
- gt as isStringArray,
1051
- ye as isSymbol,
1052
- M as isUint8Array,
1053
- Ve as kebabCase,
1054
- Pr as logError,
1055
- Ut as msTimeToMilliseconds,
1056
- wt as needArray,
1057
- Tt as nextMacroTask,
1058
- Ot as nextMicroTask,
1059
- Ft as noop,
1060
- Re as numberStep,
1061
- vt as numberStepScreenSize,
1062
- Wt as numberStrip,
1063
- Jt as omit,
1064
- Yt as omitBy,
1065
- qt as once,
1066
- At as orderBy,
1067
- hr as parseChineseNumber,
1068
- J as parseTime,
1069
- nt as performChunk,
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,
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
- ar as randomUintByLength,
1081
- Ge as randomUintString,
1082
- mr as rmbUppercase,
1083
- Nt as rsaDecrypt,
1084
- Rt as rsaEncrypt,
1085
- Bt as rsaGenerateKey,
1086
- je as set,
1087
- ne as setBase,
1088
- Ie as setWith,
1089
- yr as similarity,
1090
- Ct as sleep,
1091
- gr as snakeCase,
1092
- Et as sortBy,
1093
- wr as startCase,
1094
- Ar as stringSingleline,
1095
- Er as stringTemplate,
1096
- Y as stringTime,
1097
- N as stringToArrayBuffer,
1098
- Gt as throttle,
1099
- Vt as toInt,
1100
- rr as toPlainObject,
1101
- H as traverseObjectKeys,
1102
- Zt as tryToNumber,
1103
- Pt as uint8ArrayToString,
1104
- br as uncapitalize,
1105
- He as uncapitalizeFirst,
1106
- bt as unionBy,
1107
- Kt as unixTimestamp,
1108
- Sr as urlJoin,
1109
- nr as zipObject
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
  };