nhanh-pure-function 2.0.6 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,12 +1,209 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".nhanh-pure-function{--nhanh: 2233}.no-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
2
- var Q = Object.defineProperty;
3
- var W = (n) => {
2
+ var it = Object.defineProperty;
3
+ var tt = (n) => {
4
4
  throw TypeError(n);
5
5
  };
6
- var tt = (n, e, t) => e in n ? Q(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
7
- var y = (n, e, t) => tt(n, typeof e != "symbol" ? e + "" : e, t), G = (n, e, t) => e.has(n) || W("Cannot " + t);
8
- var c = (n, e, t) => (G(n, e, "read from private field"), t ? t.call(n) : e.get(n)), f = (n, e, t) => e.has(n) ? W("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), m = (n, e, t, o) => (G(n, e, "write to private field"), o ? o.call(n, t) : e.set(n, t), t);
9
- const et = {
6
+ var st = (n, t, e) => t in n ? it(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
7
+ var F = (n, t, e) => st(n, typeof t != "symbol" ? t + "" : t, e), et = (n, t, e) => t.has(n) || tt("Cannot " + e);
8
+ var a = (n, t, e) => (et(n, t, "read from private field"), e ? e.call(n) : t.get(n)), h = (n, t, e) => t.has(n) ? tt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), f = (n, t, e, r) => (et(n, t, "write to private field"), r ? r.call(n, e) : t.set(n, e), e);
9
+ function vt(n, t = 500) {
10
+ let e, r = !0;
11
+ function o(i) {
12
+ if (!r) return;
13
+ e || (e = i);
14
+ let s = Math.min((i - e) / t, 1);
15
+ n(s), i - e < t && requestAnimationFrame(o);
16
+ }
17
+ return requestAnimationFrame(o), () => r = !1;
18
+ }
19
+ function bt(n, t, e, r, o = 2) {
20
+ let i = n, s = !1, c = 1, u = n, l = t, m = e;
21
+ const d = () => {
22
+ const w = (l - u) / m;
23
+ return Number(w.toFixed(o));
24
+ };
25
+ let g = d();
26
+ const y = (w) => Math.min(Math.max(w, u), l), E = (w) => Number(w.toFixed(o)), T = (w, W, V) => {
27
+ const R = [];
28
+ return w >= W && R.push("最小值必须小于最大值"), V <= 0 ? R.push("分段数必须为正数") : d() == 0 && R.push("数值精度过低,致使动画步长为 0"), R;
29
+ }, k = (w, W, V) => {
30
+ const R = T(w, W, V);
31
+ return R.length > 0 ? (console.error(`参数更新失败: ${R.join("; ")}`), !1) : (u = w, l = W, m = V, g = d(), i = y(i), !0);
32
+ }, H = () => {
33
+ s && (c = i >= l ? -1 : i <= u ? 1 : c, i = y(i + g * c), r(E(i)), requestAnimationFrame(H));
34
+ };
35
+ return {
36
+ /** 启动/继续动画 */
37
+ play(w = i) {
38
+ if (i = y(w), T(u, l, m).length)
39
+ return console.error("配置参数错误", this.getParams());
40
+ s || (s = !0, H());
41
+ },
42
+ /** 暂停动画 */
43
+ pause() {
44
+ s = !1;
45
+ },
46
+ /** 获取当前值 */
47
+ getCurrent: () => E(i),
48
+ /** 是否正在运行 */
49
+ isPlaying: () => s,
50
+ /** 更新参数(不中断动画) */
51
+ updateParams: k,
52
+ /** 获取当前参数 */
53
+ getParams: () => ({ min: u, max: l, steps: m, precision: o, stepSize: g })
54
+ };
55
+ }
56
+ function _t(n, t, e, r, o = 2) {
57
+ if (e <= 0) return console.error("动画步数 必须为正数");
58
+ const i = (d) => Number(d.toFixed(o)), s = t - n, c = i(Math.abs(s) / e);
59
+ if (c === 0) return console.error("数值精度过低,致使动画步长为 0");
60
+ const u = Math.sign(s);
61
+ let l = n;
62
+ const m = () => {
63
+ l = i(l + c * u), (u > 0 ? l < t : l > t) ? (r(l), requestAnimationFrame(m)) : r(t);
64
+ };
65
+ m();
66
+ }
67
+ function Mt(n, t = "image/png") {
68
+ try {
69
+ let e, r = t;
70
+ if (n instanceof File)
71
+ return URL.createObjectURL(n);
72
+ if (typeof n == "string") {
73
+ let i = n;
74
+ const s = i.match(/^data:([^;]*)(;base64)?,(.*)$/i);
75
+ if (s) {
76
+ if (!s[2])
77
+ return console.error("无效的数据 URL:缺少 base64 编码声明");
78
+ if (r = s[1] || r, i = s[3], !i)
79
+ return console.error("数据 URL 包含空有效负载");
80
+ }
81
+ i = i.replace(/[^A-Za-z0-9+/=]/g, "");
82
+ const c = atob(i);
83
+ e = new Uint8Array(c.length);
84
+ for (let u = 0; u < c.length; u++)
85
+ e[u] = c.charCodeAt(u);
86
+ } else if (n instanceof ArrayBuffer)
87
+ e = new Uint8Array(n);
88
+ else if (n instanceof Uint8Array)
89
+ e = n;
90
+ else
91
+ return console.error(
92
+ "不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array"
93
+ );
94
+ const o = new Blob([e], { type: r });
95
+ return URL.createObjectURL(o);
96
+ } catch (e) {
97
+ return console.error(
98
+ "数据到 ImageURL 的转换失败:",
99
+ e.message,
100
+ e.stack || "没有可用的堆栈跟踪"
101
+ ), null;
102
+ }
103
+ }
104
+ function Et(n, t = 10) {
105
+ let e = 0, r = t;
106
+ function o() {
107
+ if (r > 0)
108
+ r--, requestAnimationFrame(o);
109
+ else {
110
+ const s = (+/* @__PURE__ */ new Date() - e) / t, c = 1e3 / s;
111
+ n(Number(c.toFixed(2)), Number(s.toFixed(2)));
112
+ }
113
+ }
114
+ requestAnimationFrame(() => {
115
+ e = +/* @__PURE__ */ new Date(), o();
116
+ });
117
+ }
118
+ function Ft(n) {
119
+ const t = () => Promise.resolve(), e = (c) => (console.error(c), Promise.reject(c));
120
+ function r() {
121
+ return navigator.clipboard.writeText(n).then(t).catch(e);
122
+ }
123
+ function o() {
124
+ const c = document.createElement("div");
125
+ c.innerText = n, document.body.appendChild(c);
126
+ const u = document.createRange();
127
+ u.selectNodeContents(c);
128
+ const l = window.getSelection();
129
+ let m = !1;
130
+ return l && (l.removeAllRanges(), l.addRange(u), m = document.execCommand("copy")), document.body.removeChild(c), m ? Promise.resolve() : Promise.reject();
131
+ }
132
+ function i() {
133
+ const c = document.createElement("textarea");
134
+ c.value = n, document.body.appendChild(c), c.select(), c.setSelectionRange(0, n.length);
135
+ let u = !1;
136
+ return document.activeElement === c && (u = document.execCommand("Copy", !0)), document.body.removeChild(c), u ? Promise.resolve() : Promise.reject();
137
+ }
138
+ function s() {
139
+ return o().then(t).catch(() => {
140
+ i().then(t).catch(() => e("复制方式尽皆失效"));
141
+ });
142
+ }
143
+ return navigator.clipboard ? r().catch(s) : s();
144
+ }
145
+ class ct {
146
+ /** 请使用静态方法 */
147
+ constructor() {
148
+ }
149
+ /** 添加已有窗口 */
150
+ static add(t, e) {
151
+ this.keys.set(t, e);
152
+ }
153
+ /**
154
+ * 根据键打开或聚焦窗口
155
+ * @param key 窗口的唯一键
156
+ * @param url 要打开的URL
157
+ * @param target 窗口的目标
158
+ * @param windowFeatures 新窗口的特性
159
+ * @returns 返回已打开或新打开的窗口
160
+ */
161
+ static open(t, e, r, o) {
162
+ const i = this.keys.get(t);
163
+ if (i && !i.closed)
164
+ return i.focus(), i;
165
+ {
166
+ const s = window.open(e, r, o);
167
+ if (s)
168
+ return this.keys.set(t, s), s;
169
+ console.error("window.open failed: 可能是浏览器阻止了弹出窗口"), this.keys.delete(t);
170
+ }
171
+ }
172
+ /**
173
+ * 检查指定键的窗口是否打开
174
+ * @param key 窗口的唯一键
175
+ * @returns 如果窗口打开则返回true,否则返回false
176
+ */
177
+ static isOpen(t) {
178
+ const e = this.keys.get(t);
179
+ return e != null && e.closed && this.keys.delete(t), this.keys.has(t);
180
+ }
181
+ /**
182
+ * 获取与指定键关联的窗口
183
+ * @param key 窗口的唯一键
184
+ * @returns 返回对应的窗口,如果窗口已关闭则返回undefined
185
+ */
186
+ static getWindow(t) {
187
+ if (this.isOpen(t)) return this.keys.get(t);
188
+ }
189
+ /**
190
+ * 关闭与指定键关联的窗口
191
+ * @param key 窗口的唯一键
192
+ */
193
+ static close(t) {
194
+ const e = this.keys.get(t);
195
+ e && (e.close(), this.keys.delete(t));
196
+ }
197
+ /**
198
+ * 关闭所有打开的窗口并清空Map
199
+ */
200
+ static closeAll() {
201
+ this.keys.forEach((t, e) => t.close()), this.keys.clear();
202
+ }
203
+ }
204
+ // 存储键与对应窗口的Map
205
+ F(ct, "keys", /* @__PURE__ */ new Map());
206
+ const at = {
10
207
  /* 常见扩展名映射 */
11
208
  ".mp3": "audio/mpeg",
12
209
  ".mp4": "video/mp4",
@@ -70,7 +267,7 @@ const et = {
70
267
  ".eot": "application/vnd.ms-fontobject",
71
268
  ".map": "application/json"
72
269
  // 可根据需要继续扩展
73
- }, B = {
270
+ }, K = {
74
271
  image: [
75
272
  ".jpg",
76
273
  ".jpeg",
@@ -250,7 +447,7 @@ const et = {
250
447
  ".awk",
251
448
  ".php"
252
449
  ]
253
- }, V = [
450
+ }, nt = [
254
451
  "",
255
452
  "万",
256
453
  "亿",
@@ -265,71 +462,41 @@ const et = {
265
462
  "载",
266
463
  "极"
267
464
  ];
268
- function ft(n) {
269
- return n != null;
270
- }
271
- function ht(n) {
272
- return !(n === null || typeof n != "object" || Array.isArray(n));
273
- }
274
- function pt(n) {
275
- if (typeof n != "function")
276
- return console.error("非函数:", n);
277
- const e = function(t) {
278
- t.didTimeout || t.timeRemaining() <= 0 ? requestIdleCallback(e) : n();
279
- };
280
- requestIdleCallback(e);
465
+ function Ct(n) {
466
+ return n.charAt(0).toUpperCase() + n.slice(1);
281
467
  }
282
- function gt(n, e) {
283
- const t = +/* @__PURE__ */ new Date();
284
- return new Promise((o, r) => {
285
- const i = () => {
286
- if (+/* @__PURE__ */ new Date() - t >= e) return r("超时");
287
- if (n()) return o("完成");
288
- requestIdleCallback(i);
289
- };
290
- i();
291
- });
468
+ function Lt(n, t, e = 2) {
469
+ return !Number.isFinite(n) || !Number.isFinite(t) || !Number.isFinite(e) ? (console.error("所有参数必须是有限的数字"), "") : t === 0 ? (console.error("分母不能为零"), "") : e < 0 ? (console.error("小数位数不能为负数"), "") : (n / t * 100).toFixed(e) + "%";
292
470
  }
293
- function wt(n, e, t = ",") {
294
- const o = new RegExp(
295
- `(^|${t})${e}(${t}|$)`,
296
- "g"
297
- );
298
- return n.replace(o, function(r, i, s) {
299
- return i === s ? t : "";
300
- });
471
+ function Tt(n) {
472
+ const e = n.toString().split("."), r = e[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
473
+ return e.length > 1 ? r + "." + e[1] : r;
301
474
  }
302
- function xt(n) {
303
- return n.charAt(0).toUpperCase() + n.slice(1);
475
+ function Pt(n, t) {
476
+ const e = {
477
+ join: !0,
478
+ suffix: "",
479
+ decimalPlaces: 2
480
+ }, { join: r, suffix: o, decimalPlaces: i } = {
481
+ ...e,
482
+ ...t || {}
483
+ }, s = Number(n);
484
+ if (isNaN(s)) return r ? `0${o}` : [0, o];
485
+ const c = Math.abs(s), u = s >= 0, l = Math.max(0, Math.floor(Math.log10(c) / 4)), m = Math.pow(1e4, l), d = c / m, g = (u ? 1 : -1) * parseFloat(d.toFixed(Math.max(0, i)));
486
+ return r ? `${g}${nt[l]}${o}` : [g, nt[l] + o];
304
487
  }
305
- function H(n, e, t = [], o = +/* @__PURE__ */ new Date()) {
306
- if (o < +/* @__PURE__ */ new Date() - 50) {
307
- console.error("_MergeObjects 合并异常:疑似死循环");
308
- return;
309
- }
310
- const r = Z(n), i = Z(e);
311
- if (r != i) return e;
312
- if (r == "object" || r == "array") {
313
- if (t.some(([s, a]) => s == n && a == e)) return n;
314
- if (t.push([n, e]), r == "object") {
315
- for (const s in e)
316
- if (Object.prototype.hasOwnProperty.call(e, s)) {
317
- const a = e[s], l = n[s], u = H(l, a, t, o);
318
- n[s] = u;
319
- }
320
- return n;
321
- } else if (r == "array")
322
- return e.forEach((s, a) => {
323
- const l = s, u = n[a], d = H(u, l, t, o);
324
- n[a] = d;
325
- }), n;
326
- } else return e;
488
+ function Ut(n) {
489
+ const t = ["B", "KB", "MB", "GB", "TB", "PB"];
490
+ let e = 0;
491
+ for (; n > 1024; )
492
+ n /= 1024, e++;
493
+ return `${Math.round(n * 100) / 100} ${t[e]}`;
327
494
  }
328
- function vt(n, e = "YYYY-MM-DD hh:mm:ss", t = !0) {
329
- const o = new Date(n);
330
- if (isNaN(o.getTime()))
495
+ function Rt(n, t = "YYYY-MM-DD hh:mm:ss", e = !0) {
496
+ const r = new Date(n);
497
+ if (isNaN(r.getTime()))
331
498
  return console.error("Invalid date"), "";
332
- const r = {
499
+ const o = {
333
500
  YYYY: (i) => i.getFullYear(),
334
501
  MM: (i) => i.getMonth() + 1,
335
502
  // Adjust for 0-based month
@@ -339,158 +506,85 @@ function vt(n, e = "YYYY-MM-DD hh:mm:ss", t = !0) {
339
506
  ss: (i) => i.getSeconds(),
340
507
  ms: (i) => i.getMilliseconds()
341
508
  };
342
- return e.replace(/YYYY|MM|DD|hh|mm|ss|ms/g, (i) => {
343
- const s = r[i](o);
344
- return t ? String(s).padStart(2, "0") : String(s);
345
- });
346
- }
347
- function bt(n) {
348
- return new Promise((e, t) => {
349
- fetch(n).then((o) => e(o.text())).catch((o) => {
350
- console.error("Error fetching :", o), t(o);
351
- });
509
+ return t.replace(/YYYY|MM|DD|hh|mm|ss|ms/g, (i) => {
510
+ const s = o[i](r);
511
+ return e ? String(s).padStart(2, "0") : String(s);
352
512
  });
353
513
  }
354
- function X(n, e = "file") {
355
- if (!n || (n = String(n).trim(), n === "")) return e;
356
- const t = n.split("/");
357
- return t[t.length - 1].split("?")[0];
514
+ function J(n, t = "file") {
515
+ if (!n || (n = String(n).trim(), n === "")) return t;
516
+ const e = n.split("/");
517
+ return e[e.length - 1].split("?")[0];
358
518
  }
359
- function yt(n, e) {
360
- return new Promise((t, o) => {
361
- try {
362
- e = e || X(n, "downloaded_file"), fetch(n).then((r) => (r.ok || o(`文件下载失败,状态码: ${r.status}`), r.blob())).then((r) => {
363
- const i = URL.createObjectURL(r), s = document.createElement("a");
364
- s.href = i, s.download = decodeURIComponent(e), document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(i), t(r);
365
- }).catch(o);
366
- } catch (r) {
367
- o(r);
368
- }
369
- });
519
+ function jt(n, t) {
520
+ return n = n.replace(/([^a-zA-Z][a-z])/g, (e) => e.toUpperCase()), t ? n.replace(/[^a-zA-Z]+/g, "") : n;
370
521
  }
371
- function Et(n, e = 10) {
372
- let t = 0, o = e;
373
- function r() {
374
- if (o > 0)
375
- o--, requestAnimationFrame(r);
376
- else {
377
- const s = (+/* @__PURE__ */ new Date() - t) / e, a = 1e3 / s;
378
- n(Number(a.toFixed(2)), Number(s.toFixed(2)));
379
- }
380
- }
381
- requestAnimationFrame(() => {
382
- t = +/* @__PURE__ */ new Date(), r();
522
+ function It(n, t, e = ",") {
523
+ const r = new RegExp(
524
+ `(^|${e})${t}(${e}|$)`,
525
+ "g"
526
+ );
527
+ return n.replace(r, function(o, i, s) {
528
+ return i === s ? e : "";
383
529
  });
384
530
  }
385
- function Mt(n, e) {
386
- return n = n.replace(/([^a-zA-Z][a-z])/g, (t) => t.toUpperCase()), e ? n.replace(/[^a-zA-Z]+/g, "") : n;
387
- }
388
- function Ct(n, e, t) {
389
- if (!t) {
390
- let s = e.replace(/^[^.]+./, "");
391
- s = s == e ? "text/plain" : "application/" + s, t = { type: s };
392
- }
393
- const o = new Blob(n, t), r = URL.createObjectURL(o), i = document.createElement("a");
394
- i.href = r, i.download = e, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
395
- }
396
- function Ft(n = "") {
397
- return n + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
398
- const t = Math.random() * 16 | 0;
399
- return (e === "x" ? t : t & 3 | 8).toString(16);
400
- });
531
+ function At(n) {
532
+ return !(n === null || typeof n != "object" || Array.isArray(n));
401
533
  }
402
- function nt(n, e) {
403
- let t;
404
- return function(...o) {
405
- clearTimeout(t), t = setTimeout(() => {
406
- n(...o), t = void 0;
407
- }, e);
408
- };
534
+ function lt(n, t = 2) {
535
+ if (Array.isArray(n) && n.length >= t) {
536
+ for (let r = 0; r < n.length; r++)
537
+ if (typeof n[r] != "number" || !Number.isFinite(n[r])) return !1;
538
+ } else return !1;
539
+ return !0;
409
540
  }
410
- function Lt(n, e) {
411
- let t = -1 / 0;
412
- return function(...o) {
413
- const r = performance.now();
414
- if (r - t > e) {
415
- t = r;
416
- try {
417
- n(...o);
418
- } catch (i) {
419
- console.error("Throttled function execution failed:", i);
420
- }
421
- }
422
- };
541
+ function St(n, t = 1, e = 2) {
542
+ if (Array.isArray(n) && n.length >= t) {
543
+ for (let o = 0; o < n.length; o++)
544
+ if (!lt(n[o], e)) return !1;
545
+ } else return !1;
546
+ return !0;
423
547
  }
424
- function Z(n) {
425
- return Array.isArray(n) ? "array" : n === null ? "null" : typeof n;
548
+ function kt(n, t, e) {
549
+ return Math.abs(n - t) <= e;
426
550
  }
427
- function Tt(n) {
428
- const e = () => Promise.resolve(), t = (a) => (console.error(a), Promise.reject(a));
429
- function o() {
430
- return navigator.clipboard.writeText(n).then(e).catch(t);
431
- }
432
- function r() {
433
- const a = document.createElement("div");
434
- a.innerText = n, document.body.appendChild(a);
435
- const l = document.createRange();
436
- l.selectNodeContents(a);
437
- const u = window.getSelection();
438
- let d = !1;
439
- return u && (u.removeAllRanges(), u.addRange(l), d = document.execCommand("copy")), document.body.removeChild(a), d ? Promise.resolve() : Promise.reject();
551
+ function Dt(n, t) {
552
+ let e = !1;
553
+ const { x: r, y: o } = n, i = t.length;
554
+ for (let s = 0, c = i - 1; s < i; c = s++) {
555
+ const u = t[s].x, l = t[s].y, m = t[c].x, d = t[c].y;
556
+ l > o != d > o && r < (m - u) * (o - l) / (d - l) + u && (e = !e);
440
557
  }
441
- function i() {
442
- const a = document.createElement("textarea");
443
- a.value = n, document.body.appendChild(a), a.select(), a.setSelectionRange(0, n.length);
444
- let l = !1;
445
- return document.activeElement === a && (l = document.execCommand("Copy", !0)), document.body.removeChild(a), l ? Promise.resolve() : Promise.reject();
558
+ return e;
559
+ }
560
+ function zt(n, t, e, r) {
561
+ const o = Math.min(n[0], t[0]), i = Math.max(n[0], t[0]), s = Math.min(n[1], t[1]), c = Math.max(n[1], t[1]), u = [
562
+ [o, s],
563
+ // 左上
564
+ [i, s],
565
+ // 右上
566
+ [i, c],
567
+ // 右下
568
+ [o, c]
569
+ // 左下
570
+ ], l = r[1] - e[1], m = e[0] - r[0], d = r[0] * e[1] - e[0] * r[1];
571
+ if (l === 0 && m === 0) {
572
+ const [T, k] = e;
573
+ return T >= o && T <= i && k >= s && k <= c;
446
574
  }
447
- function s() {
448
- return r().then(e).catch(() => {
449
- i().then(e).catch(() => t("复制方式尽皆失效"));
450
- });
575
+ const g = 1e-10;
576
+ let y = !1, E = !1;
577
+ for (const [T, k] of u) {
578
+ const H = l * T + m * k + d;
579
+ if (Math.abs(H) < g || (H > g ? y = !0 : E = !0, y && E))
580
+ return !0;
451
581
  }
452
- return navigator.clipboard ? o().catch(s) : s();
582
+ return y && E;
453
583
  }
454
- function Rt(n, e) {
455
- const t = e.split(".");
456
- return t.reduce((o, r, i) => (r in o || (i === t.length - 1 ? o[r] = void 0 : o[r] = {}), o[r]), n);
457
- }
458
- function jt(n, e) {
459
- const t = e.split(".");
460
- return t.reduce((o, r, i) => o.hasOwnProperty(r) ? o[r] : o[r] = i == t.length - 1 ? void 0 : {}, n);
461
- }
462
- function Pt(n, e, t) {
463
- const o = e.split(".");
464
- return o.reduce((r, i, s) => (s === o.length - 1 && (r[i] = t), r[i]), n);
465
- }
466
- function _t(n) {
467
- return new Promise((e, t) => {
468
- if (typeof n != "string" || n.trim() === "" || !n.includes("://")) {
469
- t(new Error("Invalid URL: Must be a non-empty string"));
470
- return;
471
- }
472
- try {
473
- new XMLHttpRequest().open("HEAD", n, !0);
474
- } catch (i) {
475
- t(new Error(`Invalid URL format: ${i.message}`));
476
- return;
477
- }
478
- const o = new XMLHttpRequest();
479
- o.open("HEAD", n, !0);
480
- const r = (i) => {
481
- t(new Error(`Request failed: ${i.type}`));
482
- };
483
- o.onreadystatechange = function() {
484
- o.readyState === XMLHttpRequest.DONE && (o.status === 0 ? t(new Error("Network error or CORS blocked")) : o.status >= 200 && o.status < 300 ? e(!0) : t(new Error(`HTTP Error: ${o.status}`)));
485
- }, o.onerror = r, o.onabort = r, o.ontimeout = r;
486
- try {
487
- o.send();
488
- } catch (i) {
489
- t(new Error(`Request send failed: ${i.message}`));
490
- }
491
- });
584
+ function rt(n) {
585
+ return Array.isArray(n) ? "array" : n === null ? "null" : typeof n;
492
586
  }
493
- function kt(n) {
587
+ function Ot(n) {
494
588
  return [
495
589
  "https:",
496
590
  // HTTPS协议,用于安全地浏览网页
@@ -512,24 +606,51 @@ function kt(n) {
512
606
  // Remote Desktop Protocol,用于安全的远程桌面连接
513
607
  "vpn:"
514
608
  // VPN协议,用于创建安全的网络连接
515
- ].some((t) => n.startsWith(t));
609
+ ].some((e) => n.startsWith(e));
610
+ }
611
+ function Nt(n) {
612
+ return new Promise((t, e) => {
613
+ if (typeof n != "string" || n.trim() === "" || !n.includes("://")) {
614
+ e(new Error("Invalid URL: Must be a non-empty string"));
615
+ return;
616
+ }
617
+ try {
618
+ new XMLHttpRequest().open("HEAD", n, !0);
619
+ } catch (i) {
620
+ e(new Error(`Invalid URL format: ${i.message}`));
621
+ return;
622
+ }
623
+ const r = new XMLHttpRequest();
624
+ r.open("HEAD", n, !0);
625
+ const o = (i) => {
626
+ e(new Error(`Request failed: ${i.type}`));
627
+ };
628
+ r.onreadystatechange = function() {
629
+ r.readyState === XMLHttpRequest.DONE && (r.status === 0 ? e(new Error("Network error or CORS blocked")) : r.status >= 200 && r.status < 300 ? t(!0) : e(new Error(`HTTP Error: ${r.status}`)));
630
+ }, r.onerror = o, r.onabort = o, r.ontimeout = o;
631
+ try {
632
+ r.send();
633
+ } catch (i) {
634
+ e(new Error(`Request send failed: ${i.message}`));
635
+ }
636
+ });
516
637
  }
517
- const C = class C {
638
+ const P = class P {
518
639
  constructor() {
519
- if (new.target === C)
640
+ if (new.target === P)
520
641
  throw new Error("请直接使用静态方法,而不是实例化此类");
521
642
  }
522
- static check(e, t) {
523
- if (!e || typeof e != "string")
524
- return console.error("Invalid URL provided"), t ? !1 : "unknown";
525
- const o = X(e).toLowerCase();
526
- if (t) {
527
- if (!B.hasOwnProperty(t))
528
- return console.error(`Unknown file type: ${t}`), "unknown";
529
- const r = B[t];
530
- return C._checkExtension(o, r);
643
+ static check(t, e) {
644
+ if (!t || typeof t != "string")
645
+ return console.error("Invalid URL provided"), e ? !1 : "unknown";
646
+ const r = J(t).toLowerCase();
647
+ if (e) {
648
+ if (!K.hasOwnProperty(e))
649
+ return console.error(`Unknown file type: ${e}`), "unknown";
650
+ const o = K[e];
651
+ return P._checkExtension(r, o);
531
652
  }
532
- return C._detectFileType(o);
653
+ return P._detectFileType(r);
533
654
  }
534
655
  /**
535
656
  * 静态方法,用于解析地址信息
@@ -539,10 +660,10 @@ const C = class C {
539
660
  * @param {string} url - 以逗号分隔的URL字符串,每个URL代表一个资源的位置
540
661
  * @returns {Array} - 包含每个URL及其相关信息(名称和类型)的对象数组
541
662
  */
542
- static parseAddresses(e) {
543
- return !e || typeof e != "string" ? (console.error("Invalid URL provided"), []) : e.split(",").map((t) => {
544
- const o = X(t), r = this.check(t);
545
- return { url: t, name: o, type: r };
663
+ static parseAddresses(t) {
664
+ return !t || typeof t != "string" ? (console.error("Invalid URL provided"), []) : t.split(",").map((e) => {
665
+ const r = J(e), o = this.check(e);
666
+ return { url: e, name: r, type: o };
546
667
  });
547
668
  }
548
669
  /**
@@ -551,13 +672,13 @@ const C = class C {
551
672
  * @param {string} [accept] - 可接受的 MIME 类型模式(如 "image/*, text/plain")
552
673
  * @returns {boolean} - 如果类型匹配,则返回 true,否则返回 false
553
674
  */
554
- static matchesMimeType(e, t) {
555
- if (!t) return !0;
556
- if (typeof e != "string" || typeof t != "string") return !1;
557
- const o = C._normalizeType(e), r = t.split(",").map((a) => C._normalizeType(a.trim())), [i, s = "*"] = o.split("/");
558
- return r.some((a) => {
559
- const [l, u = "*"] = a.split("/");
560
- return (l === "*" || i === "*" || l === i) && (u === "*" || s === "*" || u === s);
675
+ static matchesMimeType(t, e) {
676
+ if (!e) return !0;
677
+ if (typeof t != "string" || typeof e != "string") return !1;
678
+ const r = P._normalizeType(t), o = e.split(",").map((c) => P._normalizeType(c.trim())), [i, s = "*"] = r.split("/");
679
+ return o.some((c) => {
680
+ const [u, l = "*"] = c.split("/");
681
+ return (u === "*" || i === "*" || u === i) && (l === "*" || s === "*" || l === s);
561
682
  });
562
683
  }
563
684
  /**
@@ -568,8 +689,8 @@ const C = class C {
568
689
  * @param {string} type - 文件类型或MIME类型字符串
569
690
  * @returns {string} 标准化的MIME类型字符串,如果无法识别则返回原始输入
570
691
  */
571
- static _normalizeType(e) {
572
- return e.startsWith(".") && !e.includes("/") ? et[e.toLowerCase()] || e : e.includes("/") ? e : `${e}/*`;
692
+ static _normalizeType(t) {
693
+ return t.startsWith(".") && !t.includes("/") ? at[t.toLowerCase()] || t : t.includes("/") ? t : `${t}/*`;
573
694
  }
574
695
  /**
575
696
  * 检查URL是否具有任何指定的文件扩展名
@@ -577,192 +698,202 @@ const C = class C {
577
698
  * @param {string[]} validExtensions - 有效文件扩展名的数组
578
699
  * @returns {boolean} - 如果URL具有任何指定的文件扩展名,则返回true,否则返回false
579
700
  */
580
- static _checkExtension(e, t) {
581
- return t.some((o) => e.endsWith(o));
701
+ static _checkExtension(t, e) {
702
+ return e.some((r) => t.endsWith(r));
582
703
  }
583
704
  /**
584
705
  * 检测文件URL的类型
585
706
  * @param {string} url - 文件的URL
586
707
  * @returns {string} - 如果URL与任何已知类型匹配,则返回文件类型,否则返回"unknown"
587
708
  */
588
- static _detectFileType(e) {
589
- for (const [t, o] of C.cachedEntries)
590
- if (o.some((r) => e.endsWith(r)))
591
- return t;
709
+ static _detectFileType(t) {
710
+ for (const [e, r] of P.cachedEntries)
711
+ if (r.some((o) => t.endsWith(o)))
712
+ return e;
592
713
  return "unknown";
593
714
  }
594
715
  };
595
716
  // 缓存文件扩展名的条目,以提高性能
596
- y(C, "cachedEntries", Object.entries(B));
597
- let K = C;
598
- function At(n) {
599
- return n.map((e, t) => n.slice(t).concat(n.slice(0, t)));
717
+ F(P, "cachedEntries", Object.entries(K));
718
+ let ot = P;
719
+ function qt(n) {
720
+ if (typeof n != "function")
721
+ return console.error("非函数:", n);
722
+ const t = function(e) {
723
+ e.didTimeout || e.timeRemaining() <= 0 ? requestIdleCallback(t) : n();
724
+ };
725
+ requestIdleCallback(t);
600
726
  }
601
- function Ut(n) {
602
- const e = window.structuredClone, t = (o) => o === null || typeof o != "object" ? o : H(Array.isArray(o) ? [] : {}, o);
603
- try {
604
- return e ? e(n) : t(n);
605
- } catch (o) {
606
- return console.error("structuredClone error:", o), e && t(n);
607
- }
727
+ function Yt(n, t) {
728
+ const e = +/* @__PURE__ */ new Date();
729
+ return new Promise((r, o) => {
730
+ const i = () => {
731
+ if (+/* @__PURE__ */ new Date() - e >= t) return o("超时");
732
+ if (n()) return r("完成");
733
+ requestIdleCallback(i);
734
+ };
735
+ i();
736
+ });
608
737
  }
609
- class ot {
610
- /** 请使用静态方法 */
611
- constructor() {
612
- }
613
- /** 添加已有窗口 */
614
- static add(e, t) {
615
- this.keys.set(e, t);
738
+ function Q(n, t, e = [], r = +/* @__PURE__ */ new Date()) {
739
+ if (r < +/* @__PURE__ */ new Date() - 50) {
740
+ console.error("_MergeObjects 合并异常:疑似死循环");
741
+ return;
616
742
  }
617
- /**
618
- * 根据键打开或聚焦窗口
619
- * @param key 窗口的唯一键
620
- * @param url 要打开的URL
621
- * @param target 窗口的目标
622
- * @param windowFeatures 新窗口的特性
623
- * @returns 返回已打开或新打开的窗口
624
- */
625
- static open(e, t, o, r) {
626
- const i = this.keys.get(e);
627
- if (i && !i.closed)
628
- return i.focus(), i;
629
- {
630
- const s = window.open(t, o, r);
631
- if (s)
632
- return this.keys.set(e, s), s;
633
- console.error("window.open failed: 可能是浏览器阻止了弹出窗口"), this.keys.delete(e);
743
+ const o = rt(n), i = rt(t);
744
+ if (o != i) return t;
745
+ if (o == "object" || o == "array") {
746
+ if (e.some(([s, c]) => s == n && c == t)) return n;
747
+ if (e.push([n, t]), o == "object") {
748
+ for (const s in t)
749
+ if (Object.prototype.hasOwnProperty.call(t, s)) {
750
+ const c = t[s], u = n[s], l = Q(
751
+ u,
752
+ c,
753
+ e,
754
+ r
755
+ );
756
+ n[s] = l;
757
+ }
758
+ return n;
759
+ } else if (o == "array")
760
+ return t.forEach((s, c) => {
761
+ const u = s, l = n[c], m = Q(
762
+ l,
763
+ u,
764
+ e,
765
+ r
766
+ );
767
+ n[c] = m;
768
+ }), n;
769
+ } else return t;
770
+ }
771
+ function $t(n = "") {
772
+ return n + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
773
+ const e = Math.random() * 16 | 0;
774
+ return (t === "x" ? e : e & 3 | 8).toString(16);
775
+ });
776
+ }
777
+ function ut(n, t) {
778
+ let e;
779
+ return function(...r) {
780
+ clearTimeout(e), e = setTimeout(() => {
781
+ n(...r), e = void 0;
782
+ }, t);
783
+ };
784
+ }
785
+ function Xt(n, t) {
786
+ let e = -1 / 0;
787
+ return function(...r) {
788
+ const o = performance.now();
789
+ if (o - e > t) {
790
+ e = o;
791
+ try {
792
+ n(...r);
793
+ } catch (i) {
794
+ console.error("Throttled function execution failed:", i);
795
+ }
634
796
  }
635
- }
636
- /**
637
- * 检查指定键的窗口是否打开
638
- * @param key 窗口的唯一键
639
- * @returns 如果窗口打开则返回true,否则返回false
640
- */
641
- static isOpen(e) {
642
- const t = this.keys.get(e);
643
- return t != null && t.closed && this.keys.delete(e), this.keys.has(e);
644
- }
645
- /**
646
- * 获取与指定键关联的窗口
647
- * @param key 窗口的唯一键
648
- * @returns 返回对应的窗口,如果窗口已关闭则返回undefined
649
- */
650
- static getWindow(e) {
651
- if (this.isOpen(e)) return this.keys.get(e);
652
- }
653
- /**
654
- * 关闭与指定键关联的窗口
655
- * @param key 窗口的唯一键
656
- */
657
- static close(e) {
658
- const t = this.keys.get(e);
659
- t && (t.close(), this.keys.delete(e));
660
- }
661
- /**
662
- * 关闭所有打开的窗口并清空Map
663
- */
664
- static closeAll() {
665
- this.keys.forEach((e, t) => e.close()), this.keys.clear();
666
- }
797
+ };
667
798
  }
668
- // 存储键与对应窗口的Map
669
- y(ot, "keys", /* @__PURE__ */ new Map());
670
- function Dt(n, e = "image/png") {
799
+ function Bt(n, t, e) {
800
+ if (!n || !t) return n;
801
+ const r = t.split(".");
802
+ return r.reduce((o, i, s) => o.hasOwnProperty(i) ? o[i] : s === r.length - 1 ? o[i] = e : o[i] = {}, n);
803
+ }
804
+ function Ht(n, t) {
805
+ if (!n || !t) return n;
806
+ const e = t.split(".");
807
+ return e.reduce((r, o, i) => r.hasOwnProperty(o) ? r[o] : i == e.length - 1 ? void 0 : {}, n);
808
+ }
809
+ function Wt(n, t, e) {
810
+ if (!n || !t) return n;
811
+ const r = t.split(".");
812
+ return r.reduce((o, i, s) => (s === r.length - 1 && (o[i] = e), o.hasOwnProperty(i) ? o[i] : o[i] = {}), n);
813
+ }
814
+ function Vt(n) {
815
+ return n.map((t, e) => n.slice(e).concat(n.slice(0, e)));
816
+ }
817
+ function Gt(n) {
818
+ const t = window.structuredClone, e = (r) => r === null || typeof r != "object" ? r : Q(Array.isArray(r) ? [] : {}, r);
671
819
  try {
672
- let t, o = e;
673
- if (n instanceof File)
674
- return URL.createObjectURL(n);
675
- if (typeof n == "string") {
676
- let i = n;
677
- const s = i.match(/^data:([^;]*)(;base64)?,(.*)$/i);
678
- if (s) {
679
- if (!s[2])
680
- throw new Error("无效的数据 URL:缺少 base64 编码声明");
681
- if (o = s[1] || o, i = s[3], !i)
682
- throw new Error("数据 URL 包含空有效负载");
683
- }
684
- i = i.replace(/[^A-Za-z0-9+/=]/g, "");
685
- const a = atob(i);
686
- t = new Uint8Array(a.length);
687
- for (let l = 0; l < a.length; l++)
688
- t[l] = a.charCodeAt(l);
689
- } else if (n instanceof ArrayBuffer)
690
- t = new Uint8Array(n);
691
- else if (n instanceof Uint8Array)
692
- t = n;
693
- else
694
- throw new Error(
695
- "不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array"
696
- );
697
- const r = new Blob([t], { type: o });
698
- return URL.createObjectURL(r);
699
- } catch (t) {
700
- return console.error(
701
- "数据到 ImageURL 的转换失败:",
702
- t.message,
703
- t.stack || "没有可用的堆栈跟踪"
704
- ), null;
820
+ return t ? t(n) : e(n);
821
+ } catch (r) {
822
+ return console.error("structuredClone error:", r), t && e(n);
705
823
  }
706
824
  }
707
- function It(n, e, t = 30) {
825
+ function Zt(n, t, e = 30) {
708
826
  if (typeof n != "function")
709
- throw new Error("The first argument must be a function.");
710
- if (!Array.isArray(e))
711
- throw new Error("The second argument must be an array.");
712
- let o = [], r = 0;
713
- const i = (s, a) => {
714
- for (const [l, u] of a)
715
- if (s >= l)
716
- return u;
827
+ return console.error("第一个参数必须是一个函数。");
828
+ if (!Array.isArray(t))
829
+ return console.error("第二个参数必须是一个数组。");
830
+ let r = [], o = 0;
831
+ const i = (s, c) => {
832
+ for (const [u, l] of c)
833
+ if (s >= u)
834
+ return l;
717
835
  return "black";
718
836
  };
719
837
  return function(...s) {
720
- const a = performance.now(), l = n(...s), u = performance.now() - a;
721
- o.push(u), o.length > t && o.shift(), r = o.reduce((L, $) => L + $, 0) / o.length || 0;
722
- const d = i(u, e), p = i(r, e);
838
+ const c = performance.now(), u = n(...s), l = performance.now() - c;
839
+ r.push(l), r.length > e && r.shift(), o = r.reduce((g, y) => g + y, 0) / r.length || 0;
840
+ const m = i(l, t), d = i(o, t);
723
841
  return console.log(
724
- `%c单次耗时:${u.toFixed(2)}ms
725
- %c平均耗时(${o.length}次):${r.toFixed(2)}ms`,
726
- `color: ${d}; padding: 2px 0;`,
727
- `color: ${p}; padding: 2px 0;`
728
- ), l;
842
+ `%c单次耗时:${l.toFixed(2)}ms
843
+ %c平均耗时(${r.length}次):${o.toFixed(2)}ms`,
844
+ `color: ${m}; padding: 2px 0;`,
845
+ `color: ${d}; padding: 2px 0;`
846
+ ), u;
729
847
  };
730
848
  }
731
- function St(n) {
732
- const e = nt(n, 100);
733
- let t = 0, o = 0;
734
- return function(r) {
735
- const i = r.target;
849
+ function Kt(n) {
850
+ const t = Date.now();
851
+ let e = performance.now();
852
+ for (; Date.now() - t < n; ) {
853
+ e = Math.sin(e) * 1e6, (e > 1e6 || e < -1e6) && (e = 0);
854
+ try {
855
+ const r = e.toString().substring(0, 8);
856
+ history.replaceState(null, "", `#${r}`);
857
+ } catch {
858
+ }
859
+ }
860
+ return Date.now() - t;
861
+ }
862
+ function Jt(n) {
863
+ const t = ut(n, 100);
864
+ let e = 0, r = 0;
865
+ return function(o) {
866
+ const i = o.target;
736
867
  if (!i || !(i instanceof Element)) return;
737
868
  const {
738
869
  scrollTop: s,
739
- scrollHeight: a,
740
- clientHeight: l,
741
- scrollLeft: u,
742
- scrollWidth: d,
743
- clientWidth: p
870
+ scrollHeight: c,
871
+ clientHeight: u,
872
+ scrollLeft: l,
873
+ scrollWidth: m,
874
+ clientWidth: d
744
875
  } = i;
745
- function L() {
746
- if (t == s) return;
747
- const Y = t > s;
748
- if (t = s, Y) return;
749
- a - s - l <= 1 && e("vertical");
876
+ function g() {
877
+ if (e == s) return;
878
+ const E = e > s;
879
+ if (e = s, E) return;
880
+ c - s - u <= 1 && t("vertical");
750
881
  }
751
- function $() {
752
- if (o == u) return;
753
- const Y = o > u;
754
- if (o = u, Y) return;
755
- d - u - p <= 1 && e("horizontal");
882
+ function y() {
883
+ if (r == l) return;
884
+ const E = r > l;
885
+ if (r = l, E) return;
886
+ m - l - d <= 1 && t("horizontal");
756
887
  }
757
- L(), $();
888
+ g(), y();
758
889
  };
759
890
  }
760
- function Ot(n, e, t) {
761
- const { isClickAllowed: o, uiLibrary: r = ["naiveUI", "ElementPlus", "Element"] } = t || {}, i = function(l) {
762
- const u = [];
763
- for (const d in l)
764
- Object.hasOwnProperty.call(l, d) && r.includes(d) && u.push(...l[d]);
765
- return u;
891
+ function Qt(n, t, e) {
892
+ const { isClickAllowed: r, uiLibrary: o = ["naiveUI", "ElementPlus", "Element"] } = e || {}, i = function(u) {
893
+ const l = [];
894
+ for (const m in u)
895
+ Object.hasOwnProperty.call(u, m) && o.includes(m) && l.push(...u[m]);
896
+ return l;
766
897
  }({
767
898
  naiveUI: [
768
899
  ".v-binder-follower-container",
@@ -773,37 +904,37 @@ function Ot(n, e, t) {
773
904
  Element: [".el-popper"]
774
905
  });
775
906
  function s() {
776
- e(), document.removeEventListener("mousedown", a);
907
+ t(), document.removeEventListener("mousedown", c);
777
908
  }
778
- function a(l) {
779
- if (o) {
780
- const p = o(l);
781
- if (p) return;
782
- if (p === !1) return s();
909
+ function c(u) {
910
+ if (r) {
911
+ const d = r(u);
912
+ if (d) return;
913
+ if (d === !1) return s();
783
914
  }
784
- const u = l.target;
785
- if (!(u instanceof Element) || !u.isConnected) return;
786
- n.concat(i).some((p) => !!(u != null && u.closest(p))) || s();
915
+ const l = u.target;
916
+ if (!(l instanceof Element) || !l.isConnected) return;
917
+ n.concat(i).some((d) => !!(l != null && l.closest(d))) || s();
787
918
  }
788
919
  requestAnimationFrame(
789
- () => document.addEventListener("mousedown", a)
920
+ () => document.addEventListener("mousedown", c)
790
921
  );
791
922
  }
792
- var w, T, R, k, A, E, M, F, U;
793
- class zt {
923
+ var v, j, I, z, O, C, L, U, N;
924
+ class te {
794
925
  constructor() {
795
- f(this, w);
796
- f(this, T, !1);
797
- f(this, R, {});
798
- f(this, k, 0);
799
- f(this, A, 0);
800
- f(this, E, 0);
801
- f(this, M, 0);
802
- f(this, F);
803
- f(this, U);
926
+ h(this, v);
927
+ h(this, j, !1);
928
+ h(this, I, {});
929
+ h(this, z, 0);
930
+ h(this, O, 0);
931
+ h(this, C, 0);
932
+ h(this, L, 0);
933
+ h(this, U);
934
+ h(this, N);
804
935
  }
805
- init(e, t) {
806
- m(this, w, e), m(this, F, t == null ? void 0 : t.limit), m(this, U, t == null ? void 0 : t.dragDom), m(this, R, {
936
+ init(t, e) {
937
+ f(this, v, t), f(this, U, e == null ? void 0 : e.limit), f(this, N, e == null ? void 0 : e.dragDom), f(this, I, {
807
938
  mousedown: this.mousedown.bind(this),
808
939
  mousemove: this.mousemove.bind(this),
809
940
  mouseup: this.mouseup.bind(this)
@@ -812,47 +943,47 @@ class zt {
812
943
  finish() {
813
944
  this.bindOrUnbindEvent("unbind");
814
945
  }
815
- bindOrUnbindEvent(e) {
816
- const t = e === "bind" ? "addEventListener" : "removeEventListener";
817
- if (!c(this, w)) return console.error("No DOM");
818
- c(this, w)[t]("mousedown", c(this, R).mousedown), document[t]("mousemove", c(this, R).mousemove), document[t]("mouseup", c(this, R).mouseup);
946
+ bindOrUnbindEvent(t) {
947
+ const e = t === "bind" ? "addEventListener" : "removeEventListener";
948
+ if (!a(this, v)) return console.error("No DOM");
949
+ a(this, v)[e]("mousedown", a(this, I).mousedown), document[e]("mousemove", a(this, I).mousemove), document[e]("mouseup", a(this, I).mouseup);
819
950
  }
820
951
  alterLocation() {
821
- if (!c(this, w)) return console.error("No DOM");
822
- c(this, F) && (m(this, E, Math.min(c(this, E), c(this, F).max.top)), m(this, E, Math.max(c(this, E), c(this, F).min.top)), m(this, M, Math.min(c(this, M), c(this, F).max.left)), m(this, M, Math.max(c(this, M), c(this, F).min.left))), c(this, w).style.setProperty("--top", c(this, E) + "px"), c(this, w).style.setProperty("--left", c(this, M) + "px");
952
+ if (!a(this, v)) return console.error("No DOM");
953
+ a(this, U) && (f(this, C, Math.min(a(this, C), a(this, U).max.top)), f(this, C, Math.max(a(this, C), a(this, U).min.top)), f(this, L, Math.min(a(this, L), a(this, U).max.left)), f(this, L, Math.max(a(this, L), a(this, U).min.left))), a(this, v).style.setProperty("--top", a(this, C) + "px"), a(this, v).style.setProperty("--left", a(this, L) + "px");
823
954
  }
824
- mousedown(e) {
825
- if (!c(this, w)) return console.error("No DOM");
826
- if (c(this, U) && e.target != c(this, U)) return;
827
- document.body.classList.add("no-select"), m(this, T, !0);
828
- const t = c(this, w).getBoundingClientRect(), { pageX: o, pageY: r } = e;
829
- m(this, k, o), m(this, A, r), m(this, E, t.y), m(this, M, t.x);
955
+ mousedown(t) {
956
+ if (!a(this, v)) return console.error("No DOM");
957
+ if (a(this, N) && t.target != a(this, N)) return;
958
+ document.body.classList.add("no-select"), f(this, j, !0);
959
+ const e = a(this, v).getBoundingClientRect(), { pageX: r, pageY: o } = t;
960
+ f(this, z, r), f(this, O, o), f(this, C, e.y), f(this, L, e.x);
830
961
  }
831
- mousemove(e) {
832
- const { pageX: t, pageY: o } = e;
833
- c(this, T) && (m(this, E, c(this, E) + (o - c(this, A))), m(this, M, c(this, M) + (t - c(this, k))), m(this, k, t), m(this, A, o), this.alterLocation());
962
+ mousemove(t) {
963
+ const { pageX: e, pageY: r } = t;
964
+ a(this, j) && (f(this, C, a(this, C) + (r - a(this, O))), f(this, L, a(this, L) + (e - a(this, z))), f(this, z, e), f(this, O, r), this.alterLocation());
834
965
  }
835
966
  mouseup() {
836
- c(this, T) && (m(this, T, !1), document.body.classList.remove("no-select"));
967
+ a(this, j) && (f(this, j, !1), document.body.classList.remove("no-select"));
837
968
  }
838
969
  }
839
- w = new WeakMap(), T = new WeakMap(), R = new WeakMap(), k = new WeakMap(), A = new WeakMap(), E = new WeakMap(), M = new WeakMap(), F = new WeakMap(), U = new WeakMap();
840
- var x, j, P, D, I, v, b, g, S, O;
841
- class Nt {
970
+ v = new WeakMap(), j = new WeakMap(), I = new WeakMap(), z = new WeakMap(), O = new WeakMap(), C = new WeakMap(), L = new WeakMap(), U = new WeakMap(), N = new WeakMap();
971
+ var b, A, S, q, Y, _, M, x, $, X;
972
+ class ee {
842
973
  constructor() {
843
- f(this, x);
844
- f(this, j, !1);
845
- f(this, P, {});
846
- f(this, D, 0);
847
- f(this, I, 0);
848
- f(this, v, 0);
849
- f(this, b, 0);
850
- f(this, g);
851
- f(this, S);
852
- f(this, O);
974
+ h(this, b);
975
+ h(this, A, !1);
976
+ h(this, S, {});
977
+ h(this, q, 0);
978
+ h(this, Y, 0);
979
+ h(this, _, 0);
980
+ h(this, M, 0);
981
+ h(this, x);
982
+ h(this, $);
983
+ h(this, X);
853
984
  }
854
- init(e, t = {}) {
855
- m(this, x, e), m(this, g, t.limit), m(this, S, t.update_move), m(this, O, t.update_up), m(this, P, {
985
+ init(t, e = {}) {
986
+ f(this, b, t), f(this, x, e.limit), f(this, $, e.update_move), f(this, X, e.update_up), f(this, S, {
856
987
  mousedown: this.mousedown.bind(this),
857
988
  mousemove: this.mousemove.bind(this),
858
989
  mouseup: this.mouseup.bind(this)
@@ -861,359 +992,331 @@ class Nt {
861
992
  finish() {
862
993
  this.bindOrUnbindEvent("unbind");
863
994
  }
864
- bindOrUnbindEvent(e) {
865
- const t = e === "bind" ? "addEventListener" : "removeEventListener";
866
- if (!c(this, x)) return console.error("No DOM");
867
- c(this, x)[t]("mousedown", c(this, P).mousedown), document[t]("mousemove", c(this, P).mousemove), document[t]("mouseup", c(this, P).mouseup);
995
+ bindOrUnbindEvent(t) {
996
+ const e = t === "bind" ? "addEventListener" : "removeEventListener";
997
+ if (!a(this, b)) return console.error("No DOM");
998
+ a(this, b)[e]("mousedown", a(this, S).mousedown), document[e]("mousemove", a(this, S).mousemove), document[e]("mouseup", a(this, S).mouseup);
868
999
  }
869
1000
  updateValue() {
870
- const e = {
871
- top: c(this, v),
872
- left: c(this, b),
1001
+ const t = {
1002
+ top: a(this, _),
1003
+ left: a(this, M),
873
1004
  percentage: { top: 0, left: 0 }
874
1005
  };
875
- if (c(this, g)) {
876
- const t = (o) => c(this, g) ? (e[o] - c(this, g).min[o]) / (c(this, g).max[o] - c(this, g).min[o]) : 0;
877
- e.percentage = {
878
- top: t("top") || 0,
879
- left: t("left") || 0
1006
+ if (a(this, x)) {
1007
+ const e = (r) => a(this, x) ? (t[r] - a(this, x).min[r]) / (a(this, x).max[r] - a(this, x).min[r]) : 0;
1008
+ t.percentage = {
1009
+ top: e("top") || 0,
1010
+ left: e("left") || 0
880
1011
  };
881
1012
  }
882
- return e;
1013
+ return t;
883
1014
  }
884
1015
  alterLocation() {
885
- if (!c(this, x)) return console.error("No DOM");
886
- c(this, g) && (m(this, v, Math.min(c(this, v), c(this, g).max.top)), m(this, v, Math.max(c(this, v), c(this, g).min.top)), m(this, b, Math.min(c(this, b), c(this, g).max.left)), m(this, b, Math.max(c(this, b), c(this, g).min.left))), c(this, S) && c(this, S).call(this, this.updateValue()), c(this, x).style.setProperty("--top", c(this, v) + "px"), c(this, x).style.setProperty("--left", c(this, b) + "px");
1016
+ if (!a(this, b)) return console.error("No DOM");
1017
+ a(this, x) && (f(this, _, Math.min(a(this, _), a(this, x).max.top)), f(this, _, Math.max(a(this, _), a(this, x).min.top)), f(this, M, Math.min(a(this, M), a(this, x).max.left)), f(this, M, Math.max(a(this, M), a(this, x).min.left))), a(this, $) && a(this, $).call(this, this.updateValue()), a(this, b).style.setProperty("--top", a(this, _) + "px"), a(this, b).style.setProperty("--left", a(this, M) + "px");
887
1018
  }
888
- mousedown(e) {
889
- if (!c(this, x)) return console.error("No DOM");
890
- document.body.classList.add("no-select"), m(this, j, !0);
891
- const t = c(this, x).getBoundingClientRect();
892
- m(this, I, t.y), m(this, D, t.x);
893
- const { pageX: o, pageY: r } = e;
894
- m(this, v, r - c(this, I)), m(this, b, o - c(this, D)), this.alterLocation();
1019
+ mousedown(t) {
1020
+ if (!a(this, b)) return console.error("No DOM");
1021
+ document.body.classList.add("no-select"), f(this, A, !0);
1022
+ const e = a(this, b).getBoundingClientRect();
1023
+ f(this, Y, e.y), f(this, q, e.x);
1024
+ const { pageX: r, pageY: o } = t;
1025
+ f(this, _, o - a(this, Y)), f(this, M, r - a(this, q)), this.alterLocation();
895
1026
  }
896
- mousemove(e) {
897
- const { pageX: t, pageY: o } = e;
898
- c(this, j) && (m(this, v, o - c(this, I)), m(this, b, t - c(this, D)), this.alterLocation());
1027
+ mousemove(t) {
1028
+ const { pageX: e, pageY: r } = t;
1029
+ a(this, A) && (f(this, _, r - a(this, Y)), f(this, M, e - a(this, q)), this.alterLocation());
899
1030
  }
900
1031
  mouseup() {
901
- c(this, j) && (m(this, j, !1), document.body.classList.remove("no-select"), c(this, O) && c(this, O).call(this, this.updateValue()));
1032
+ a(this, A) && (f(this, A, !1), document.body.classList.remove("no-select"), a(this, X) && a(this, X).call(this, this.updateValue()));
902
1033
  }
903
1034
  }
904
- x = new WeakMap(), j = new WeakMap(), P = new WeakMap(), D = new WeakMap(), I = new WeakMap(), v = new WeakMap(), b = new WeakMap(), g = new WeakMap(), S = new WeakMap(), O = new WeakMap();
905
- function rt(n) {
906
- const e = n || document.documentElement;
907
- if (n) {
908
- if (n.requestFullscreen)
909
- return n.requestFullscreen();
910
- if (e.mozRequestFullScreen)
911
- return e.mozRequestFullScreen();
912
- if (e.webkitRequestFullscreen)
913
- return e.webkitRequestFullscreen();
914
- if (e.msRequestFullscreen)
915
- return e.msRequestFullscreen();
916
- } else return Promise.reject("No DOM");
917
- return Promise.reject("No Fullscreen API");
1035
+ b = new WeakMap(), A = new WeakMap(), S = new WeakMap(), q = new WeakMap(), Y = new WeakMap(), _ = new WeakMap(), M = new WeakMap(), x = new WeakMap(), $ = new WeakMap(), X = new WeakMap();
1036
+ function mt(n) {
1037
+ const t = n || document.documentElement;
1038
+ return t.requestFullscreen ? t.requestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.msRequestFullscreen ? t.msRequestFullscreen() : Promise.reject("No Fullscreen API");
918
1039
  }
919
- function it() {
1040
+ function ft() {
920
1041
  const n = document;
921
1042
  return document.exitFullscreen ? document.exitFullscreen() : n.mozCancelFullScreen ? n.mozCancelFullScreen() : n.webkitExitFullscreen ? n.webkitExitFullscreen() : n.msExitFullscreen ? n.msExitFullscreen() : Promise.reject("No ExitFullscreen API");
922
1043
  }
923
- function st(n) {
924
- n = n || document.documentElement;
925
- const e = document, t = document.fullscreenElement || e.webkitFullscreenElement || e.mozFullScreenElement || e.msFullscreenElement;
926
- return n == t;
1044
+ function dt(n) {
1045
+ const t = document, e = document.fullscreenElement || t.webkitFullscreenElement || t.mozFullScreenElement || t.msFullscreenElement;
1046
+ return n ? n == e : document.documentElement == e || screen.width == window.innerWidth && screen.height == window.innerHeight;
927
1047
  }
928
- function qt(n) {
1048
+ function ne(n) {
929
1049
  return function() {
930
- st(n) ? it() : rt(n);
1050
+ dt(n) ? ft() : mt(n);
931
1051
  };
932
1052
  }
933
- function $t(n, e) {
1053
+ function re(n, t) {
934
1054
  if (typeof n == "number") return n;
935
1055
  if (/px/.test(n)) return Number(n.replace(/px/, "")) || 0;
936
- const t = document.createElement("div");
937
- t.style.width = n, e = e || document.body, e.appendChild(t);
938
- const o = t.getBoundingClientRect().width;
939
- return e.removeChild(t), o;
1056
+ const e = document.createElement("div");
1057
+ e.style.width = n, t = t || document.body, t.appendChild(e);
1058
+ const r = e.getBoundingClientRect().width;
1059
+ return t.removeChild(e), r;
940
1060
  }
941
- function Yt(n, e) {
1061
+ function oe(n, t) {
942
1062
  if (!n) return;
943
- let t, o;
944
- if (typeof e == "string") {
945
- const i = document.querySelector(e);
1063
+ let e, r;
1064
+ if (typeof t == "string") {
1065
+ const i = document.querySelector(t);
946
1066
  if (!i) return;
947
1067
  const s = i.getBoundingClientRect();
948
- t = s.width, o = s.height;
949
- } else if (Array.isArray(e))
950
- t = e[0], o = e[1];
1068
+ e = s.width, r = s.height;
1069
+ } else if (Array.isArray(t))
1070
+ e = t[0], r = t[1];
951
1071
  else {
952
- const i = e.getBoundingClientRect();
953
- t = i.width, o = i.height;
1072
+ const i = t.getBoundingClientRect();
1073
+ e = i.width, r = i.height;
954
1074
  }
955
- const r = t / o;
956
- return r > n ? [n * o, o] : r < n ? [t, t / n] : [t, o];
1075
+ const o = e / r;
1076
+ return o > n ? [n * r, r] : o < n ? [e, e / n] : [e, r];
957
1077
  }
958
- function Bt(n, e = 5e3) {
959
- return new Promise((t, o) => {
960
- const r = new Image();
961
- r.src = n;
1078
+ function ie(n, t = 5e3) {
1079
+ return new Promise((e, r) => {
1080
+ const o = new Image();
1081
+ o.src = n;
962
1082
  const i = setTimeout(() => {
963
- o(new Error("图片加载超时")), r.onload = null, r.onerror = null;
964
- }, e);
965
- r.onload = () => {
1083
+ r(new Error("图片加载超时")), o.onload = null, o.onerror = null;
1084
+ }, t);
1085
+ o.onload = () => {
966
1086
  clearTimeout(i);
967
- const s = r.naturalWidth, a = r.naturalHeight, l = s / a;
968
- t([r, l]);
969
- }, r.onerror = () => {
970
- clearTimeout(i), o(new Error("图片加载失败"));
971
- }, r.crossOrigin = "Anonymous";
1087
+ const s = o.naturalWidth, c = o.naturalHeight, u = s / c;
1088
+ e([o, u]);
1089
+ }, o.onerror = () => {
1090
+ clearTimeout(i), r(new Error("图片加载失败"));
1091
+ }, o.crossOrigin = "Anonymous";
1092
+ });
1093
+ }
1094
+ function se(n) {
1095
+ return new Promise((t, e) => {
1096
+ fetch(n).then((r) => t(r.text())).catch((r) => {
1097
+ console.error("Error fetching :", r), e(r);
1098
+ });
972
1099
  });
973
1100
  }
974
- function Ht(n) {
975
- const e = Date.now();
976
- let t = performance.now();
977
- for (; Date.now() - e < n; ) {
978
- t = Math.sin(t) * 1e6, (t > 1e6 || t < -1e6) && (t = 0);
1101
+ function ht(n, t) {
1102
+ return new Promise((e, r) => {
979
1103
  try {
980
- const o = t.toString().substring(0, 8);
981
- history.replaceState(null, "", `#${o}`);
982
- } catch {
1104
+ t = t || J(n, "downloaded_file"), fetch(n).then((o) => (o.ok || r(`文件下载失败,状态码: ${o.status}`), o.blob())).then((o) => {
1105
+ const i = URL.createObjectURL(o), s = document.createElement("a");
1106
+ s.href = i, s.download = decodeURIComponent(t), document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(i), e(o);
1107
+ }).catch(r);
1108
+ } catch (o) {
1109
+ r(o);
983
1110
  }
1111
+ });
1112
+ }
1113
+ function ce(n, t, e) {
1114
+ if (!e) {
1115
+ let i = t.replace(/^[^.]+./, "");
1116
+ i = i == t ? "text/plain" : "application/" + i, e = { type: i };
984
1117
  }
985
- return Date.now() - e;
1118
+ const r = new Blob(n, e), o = URL.createObjectURL(r);
1119
+ ht(o, t);
986
1120
  }
987
- const ct = Math.PI / 2, N = Math.PI / 180, q = 6378137, at = 85.05112878;
988
- function Xt(n, e) {
989
- const t = Math.max(Math.min(n, 180), -180), o = Math.max(Math.min(e, at), -85.05112878), r = t * N * q, i = o * N, s = Math.log(Math.tan(Math.PI / 4 + i / 2)) * q;
990
- return [r, s];
1121
+ const pt = Math.PI / 2, G = Math.PI / 180, Z = 6378137, gt = 85.05112878;
1122
+ function ae(n, t) {
1123
+ const e = Math.max(Math.min(n, 180), -180), r = Math.max(Math.min(t, gt), -85.05112878), o = e * G * Z, i = r * G, s = Math.log(Math.tan(Math.PI / 4 + i / 2)) * Z;
1124
+ return [o, s];
991
1125
  }
992
- function Wt(n, e) {
993
- const t = n / q / N, o = (2 * Math.atan(Math.exp(e / q)) - ct) / N;
994
- return [t, o];
1126
+ function le(n, t) {
1127
+ const e = n / Z / G, r = (2 * Math.atan(Math.exp(t / Z)) - pt) / G;
1128
+ return [e, r];
995
1129
  }
996
- function Gt(n, e, t) {
997
- const [o, r] = n, [i, s] = e, [a, l] = t, u = (a - i) ** 2 + (l - s) ** 2;
998
- if (u === 0) return Math.sqrt((o - i) ** 2 + (r - s) ** 2);
999
- let d = ((o - i) * (a - i) + (r - s) * (l - s)) / u;
1000
- return d = Math.max(0, Math.min(1, d)), Math.sqrt(
1001
- (o - (i + d * (a - i))) ** 2 + (r - (s + d * (l - s))) ** 2
1130
+ function ue(n, t, e) {
1131
+ const [r, o] = n, [i, s] = t, [c, u] = e, l = (c - i) ** 2 + (u - s) ** 2;
1132
+ if (l === 0) return Math.sqrt((r - i) ** 2 + (o - s) ** 2);
1133
+ let m = ((r - i) * (c - i) + (o - s) * (u - s)) / l;
1134
+ return m = Math.max(0, Math.min(1, m)), Math.sqrt(
1135
+ (r - (i + m * (c - i))) ** 2 + (o - (s + m * (u - s))) ** 2
1002
1136
  );
1003
1137
  }
1004
- function lt(n) {
1005
- return Array.isArray(n) && typeof n[0] == "number" && typeof n[1] == "number" && isFinite(n[0]) && isFinite(n[1]);
1006
- }
1007
- function Vt(n) {
1008
- return Array.isArray(n) && n.every((e) => lt(e));
1138
+ function me(n, t, e, r, o, i = 1, s = 1) {
1139
+ const c = n + e * Math.cos(r) * i, u = t + e * Math.sin(r) * s, l = n + e * Math.cos(o) * i, m = t + e * Math.sin(o) * s;
1140
+ return [
1141
+ [c, u],
1142
+ [l, m]
1143
+ ];
1009
1144
  }
1010
- function Zt(n, e, t = 2) {
1011
- return !Number.isFinite(n) || !Number.isFinite(e) || !Number.isFinite(t) ? (console.error("所有参数必须是有限的数字"), "") : e === 0 ? (console.error("分母不能为零"), "") : t < 0 ? (console.error("小数位数不能为负数"), "") : (n / e * 100).toFixed(t) + "%";
1145
+ function fe(n, t, e, r) {
1146
+ return Math.sqrt(Math.pow(e - n, 2) + Math.pow(r - t, 2));
1012
1147
  }
1013
- function Kt(n, e, t) {
1014
- return Math.abs(n - e) <= t;
1148
+ function de(n, t, e, r) {
1149
+ const o = (n + e) / 2, i = (t + r) / 2;
1150
+ return { x: o, y: i };
1015
1151
  }
1016
- function Jt(n, e = 500) {
1017
- let t, o = !0;
1018
- function r(i) {
1019
- if (!o) return;
1020
- t || (t = i);
1021
- let s = Math.min((i - t) / e, 1);
1022
- n(s), i - t < e && requestAnimationFrame(r);
1152
+ function he(n, t, e, r) {
1153
+ const [o, i] = n, [s, c] = t;
1154
+ let u = 1 / 0;
1155
+ if (s !== 0) {
1156
+ const l = s > 0 ? (e - o) / s : -o / s;
1157
+ l > 0 && (u = Math.min(u, l));
1023
1158
  }
1024
- return requestAnimationFrame(r), () => o = !1;
1025
- }
1026
- function Qt(n) {
1027
- const t = n.toString().split("."), o = t[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
1028
- return t.length > 1 ? o + "." + t[1] : o;
1029
- }
1030
- function te(n, e) {
1031
- const t = {
1032
- join: !0,
1033
- suffix: "",
1034
- decimalPlaces: 2
1035
- }, { join: o, suffix: r, decimalPlaces: i } = {
1036
- ...t,
1037
- ...e || {}
1038
- }, s = Number(n);
1039
- if (isNaN(s)) return o ? `0${r}` : [0, r];
1040
- const a = Math.abs(s), l = s >= 0, u = Math.max(0, Math.floor(Math.log10(a) / 4)), d = Math.pow(1e4, u), p = a / d, L = (l ? 1 : -1) * parseFloat(p.toFixed(Math.max(0, i)));
1041
- return o ? `${L}${V[u]}${r}` : [L, V[u] + r];
1042
- }
1043
- function ee(n, e) {
1044
- let t = !1;
1045
- const { x: o, y: r } = n, i = e.length;
1046
- for (let s = 0, a = i - 1; s < i; a = s++) {
1047
- const l = e[s].x, u = e[s].y, d = e[a].x, p = e[a].y;
1048
- u > r != p > r && o < (d - l) * (r - u) / (p - u) + l && (t = !t);
1159
+ if (c !== 0) {
1160
+ const l = c > 0 ? (r - i) / c : -i / c;
1161
+ l > 0 && (u = Math.min(u, l));
1049
1162
  }
1050
- return t;
1051
- }
1052
- function ne(n) {
1053
- const e = ["B", "KB", "MB", "GB", "TB", "PB"];
1054
- let t = 0;
1055
- for (; n > 1024; )
1056
- n /= 1024, t++;
1057
- return `${Math.round(n * 100) / 100} ${e[t]}`;
1058
- }
1059
- function oe(n, e, t, o) {
1060
- return Math.sqrt(Math.pow(t - n, 2) + Math.pow(o - e, 2));
1061
- }
1062
- function re(n, e, t, o) {
1063
- const r = (n + t) / 2, i = (e + o) / 2;
1064
- return { x: r, y: i };
1163
+ return u === 1 / 0 ? n : [o + s * u, i + c * u];
1065
1164
  }
1066
- class _ {
1067
- constructor(e, t) {
1068
- y(this, "resolve");
1069
- y(this, "reject");
1070
- this.resolve = e, this.reject = t;
1165
+ class D {
1166
+ constructor(t, e) {
1167
+ F(this, "resolve");
1168
+ F(this, "reject");
1169
+ this.resolve = t, this.reject = e;
1071
1170
  }
1072
- run(e) {
1073
- var t, o;
1074
- return e instanceof Promise ? e.then((r) => {
1171
+ run(t) {
1172
+ var e, r;
1173
+ return t instanceof Promise ? t.then((o) => {
1075
1174
  var i;
1076
- return (i = this.resolve) == null || i.call(this), r;
1077
- }).catch((r) => {
1175
+ return (i = this.resolve) == null || i.call(this), o;
1176
+ }).catch((o) => {
1078
1177
  var i;
1079
- return (i = this.reject) == null || i.call(this), Promise.reject(r);
1080
- }) : e ? (t = this.resolve) == null || t.call(this) : (o = this.reject) == null || o.call(this), e;
1178
+ return (i = this.reject) == null || i.call(this), Promise.reject(o);
1179
+ }) : t ? (e = this.resolve) == null || e.call(this) : (r = this.reject) == null || r.call(this), t;
1081
1180
  }
1082
1181
  }
1083
- class ut extends _ {
1084
- constructor(e) {
1085
- super(), this.resolve = e;
1182
+ class xt extends D {
1183
+ constructor(t) {
1184
+ super(), this.resolve = t;
1086
1185
  }
1087
- warning(...e) {
1088
- const t = () => {
1089
- var o, r;
1090
- return (r = (o = z.tips).warning) == null ? void 0 : r.call(o, ...e);
1186
+ warning(...t) {
1187
+ const e = () => {
1188
+ var r, o;
1189
+ return (o = (r = B.tips).warning) == null ? void 0 : o.call(r, ...t);
1091
1190
  };
1092
- return new _(this.resolve, t);
1191
+ return new D(this.resolve, e);
1093
1192
  }
1094
- error(...e) {
1095
- const t = () => {
1096
- var o, r;
1097
- return (r = (o = z.tips).error) == null ? void 0 : r.call(o, ...e);
1193
+ error(...t) {
1194
+ const e = () => {
1195
+ var r, o;
1196
+ return (o = (r = B.tips).error) == null ? void 0 : o.call(r, ...t);
1098
1197
  };
1099
- return new _(this.resolve, t);
1198
+ return new D(this.resolve, e);
1100
1199
  }
1101
1200
  }
1102
- class mt extends _ {
1103
- constructor(e) {
1104
- super(), this.reject = e;
1201
+ class wt extends D {
1202
+ constructor(t) {
1203
+ super(), this.reject = t;
1105
1204
  }
1106
- info(...e) {
1107
- const t = () => {
1108
- var o, r;
1109
- return (r = (o = z.tips).info) == null ? void 0 : r.call(o, ...e);
1205
+ info(...t) {
1206
+ const e = () => {
1207
+ var r, o;
1208
+ return (o = (r = B.tips).info) == null ? void 0 : o.call(r, ...t);
1110
1209
  };
1111
- return new _(t, this.reject);
1210
+ return new D(e, this.reject);
1112
1211
  }
1113
- success(...e) {
1114
- const t = () => {
1115
- var o, r;
1116
- return (r = (o = z.tips).success) == null ? void 0 : r.call(o, ...e);
1212
+ success(...t) {
1213
+ const e = () => {
1214
+ var r, o;
1215
+ return (o = (r = B.tips).success) == null ? void 0 : o.call(r, ...t);
1117
1216
  };
1118
- return new _(t, this.reject);
1217
+ return new D(e, this.reject);
1119
1218
  }
1120
1219
  }
1121
- const h = class h {
1220
+ const p = class p {
1122
1221
  /**
1123
1222
  * 构造函数
1124
1223
  * @throws 如果尝试实例化该类,则抛出错误,因为应该使用静态方法
1125
1224
  */
1126
1225
  constructor() {
1127
- if (new.target === h)
1226
+ if (new.target === p)
1128
1227
  throw new Error("请直接使用静态方法,而不是实例化此类");
1129
1228
  }
1130
- static register(e, t) {
1131
- if (typeof t != "function")
1229
+ static register(t, e) {
1230
+ if (typeof e != "function")
1132
1231
  return console.error("TipHandler must be a function");
1133
- h.tips[e] = t;
1232
+ p.tips[t] = e;
1134
1233
  }
1135
- static resolveTip(e) {
1136
- return function(...t) {
1137
- const o = () => {
1138
- var r, i;
1139
- return (i = (r = h.tips)[e]) == null ? void 0 : i.call(r, ...t);
1234
+ static resolveTip(t) {
1235
+ return function(...e) {
1236
+ const r = () => {
1237
+ var o, i;
1238
+ return (i = (o = p.tips)[t]) == null ? void 0 : i.call(o, ...e);
1140
1239
  };
1141
- return new ut(o);
1240
+ return new xt(r);
1142
1241
  };
1143
1242
  }
1144
- static rejectTip(e) {
1145
- return function(...t) {
1146
- const o = () => {
1147
- var r, i;
1148
- return (i = (r = h.tips)[e]) == null ? void 0 : i.call(r, ...t);
1243
+ static rejectTip(t) {
1244
+ return function(...e) {
1245
+ const r = () => {
1246
+ var o, i;
1247
+ return (i = (o = p.tips)[t]) == null ? void 0 : i.call(o, ...e);
1149
1248
  };
1150
- return new mt(o);
1249
+ return new wt(r);
1151
1250
  };
1152
1251
  }
1153
1252
  };
1154
- y(h, "tips", {
1253
+ F(p, "tips", {
1155
1254
  info: void 0,
1156
1255
  success: void 0,
1157
1256
  warning: void 0,
1158
1257
  error: void 0
1159
- }), y(h, "info", h.resolveTip("info")), y(h, "success", h.resolveTip("success")), y(h, "warning", h.rejectTip("warning")), y(h, "error", h.rejectTip("error"));
1160
- let z = h;
1258
+ }), F(p, "info", p.resolveTip("info")), F(p, "success", p.resolveTip("success")), F(p, "warning", p.rejectTip("warning")), F(p, "error", p.rejectTip("error"));
1259
+ let B = p;
1161
1260
  export {
1162
- Vt as _AreAllArraysValid,
1163
- Yt as _CalculateCanvasSize,
1164
- oe as _CalculateDistance2D,
1165
- xt as _CapitalizeFirstLetter,
1166
- _t as _CheckConnectionWithXHR,
1167
- Ut as _Clone,
1168
- Ot as _CloseOnOutsideClick,
1169
- Mt as _ConvertToCamelCase,
1170
- Zt as _ConvertToPercentage,
1171
- Tt as _CopyToClipboard,
1172
- Ct as _CreateAndDownloadFile,
1173
- Dt as _Danger_ConvertDataToImageUrl,
1174
- Z as _DataType,
1175
- nt as _Debounce,
1176
- yt as _DownloadFile,
1177
- zt as _Drag,
1178
- rt as _EnterFullscreen,
1179
- wt as _ExcludeSubstring,
1180
- pt as _ExecuteWhenIdle,
1181
- it as _ExitFullscreen,
1182
- K as _FileTypeChecker,
1183
- ne as _FormatFileSize,
1184
- Qt as _FormatNumber,
1185
- te as _FormatNumberWithUnit,
1186
- qt as _Fullscreen,
1187
- Ft as _GenerateUUID,
1188
- Et as _GetFrameRate,
1189
- X as _GetHrefName,
1190
- re as _GetMidpoint,
1191
- $t as _GetOtherSizeInPixels,
1192
- jt as _GetTargetByPath,
1193
- Rt as _InitTargetByPath,
1194
- st as _IsFullscreen,
1195
- ht as _IsObject,
1196
- ee as _IsPointInPolygon,
1197
- kt as _IsSecureContext,
1198
- lt as _IsSingleArrayValid,
1199
- Kt as _IsWithinErrorMargin,
1200
- ot as _KeyedWindowManager,
1201
- Xt as _LngLatToPlane,
1202
- Bt as _LoadImage,
1203
- Nt as _LocalDrag,
1204
- H as _MergeObjects,
1205
- ft as _NotNull,
1206
- Wt as _PlaneToLngLat,
1207
- Gt as _PointToLineDistance,
1208
- bt as _ReadFile,
1209
- At as _RotateList,
1210
- Jt as _Schedule,
1211
- St as _ScrollEndListener,
1212
- Ht as _Sleep,
1213
- Lt as _Throttle,
1214
- It as _TimeConsumption,
1215
- vt as _TimeTransition,
1216
- z as _Tip,
1217
- Pt as _UpdateTargetByPath,
1218
- gt as _WaitForCondition
1261
+ bt as _Animate_CreateOscillator,
1262
+ _t as _Animate_NumericTransition,
1263
+ vt as _Animate_Schedule,
1264
+ Mt as _Blob_ConvertDataToImageUrl,
1265
+ Ft as _Browser_CopyToClipboard,
1266
+ Et as _Browser_GetFrameRate,
1267
+ ct as _Browser_KeyedWindowManager,
1268
+ oe as _Element_CalculateCanvasSize,
1269
+ Qt as _Element_CloseOnOutsideClick,
1270
+ te as _Element_Drag,
1271
+ mt as _Element_EnterFullscreen,
1272
+ ft as _Element_ExitFullscreen,
1273
+ ne as _Element_Fullscreen,
1274
+ re as _Element_GetOtherSizeInPixels,
1275
+ dt as _Element_IsFullscreen,
1276
+ ie as _Element_LoadImage,
1277
+ ee as _Element_LocalDrag,
1278
+ Jt as _Element_ScrollEndListener,
1279
+ ce as _File_CreateAndDownload,
1280
+ ht as _File_Download,
1281
+ se as _File_Read,
1282
+ jt as _Format_CamelCase,
1283
+ Ct as _Format_CapitalizeFirstLetter,
1284
+ It as _Format_ExcludeSubstring,
1285
+ Ut as _Format_FileSize,
1286
+ J as _Format_HrefName,
1287
+ Tt as _Format_NumberWithCommas,
1288
+ Pt as _Format_NumberWithUnit,
1289
+ Lt as _Format_Percentage,
1290
+ Rt as _Format_Timestamp,
1291
+ fe as _Math_CalculateDistance2D,
1292
+ me as _Math_GetArcPoints,
1293
+ he as _Math_GetBoundaryIntersection,
1294
+ de as _Math_GetMidpoint,
1295
+ ae as _Math_LngLatToPlane,
1296
+ le as _Math_PlaneToLngLat,
1297
+ ue as _Math_PointToLineDistance,
1298
+ B as _Tip,
1299
+ Gt as _Utility_Clone,
1300
+ ut as _Utility_Debounce,
1301
+ qt as _Utility_ExecuteWhenIdle,
1302
+ $t as _Utility_GenerateUUID,
1303
+ Ht as _Utility_GetTargetByPath,
1304
+ Bt as _Utility_InitTargetByPath,
1305
+ Q as _Utility_MergeObjects,
1306
+ Vt as _Utility_RotateList,
1307
+ Wt as _Utility_SetTargetByPath,
1308
+ Kt as _Utility_Sleep,
1309
+ Xt as _Utility_Throttle,
1310
+ Zt as _Utility_TimeConsumption,
1311
+ Yt as _Utility_WaitForCondition,
1312
+ Nt as _Valid_CheckConnectionWithXHR,
1313
+ rt as _Valid_DataType,
1314
+ zt as _Valid_DoesInfiniteLineIntersectRectangle,
1315
+ ot as _Valid_FileTypeChecker,
1316
+ St as _Valid_Is2DNumberArray,
1317
+ kt as _Valid_IsInMargin,
1318
+ lt as _Valid_IsNumberArray,
1319
+ At as _Valid_IsObject,
1320
+ Dt as _Valid_IsPointInPolygon,
1321
+ Ot as _Valid_IsSecureContext
1219
1322
  };