nhanh-pure-function 4.1.0 → 4.2.0

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,12 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".no-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}._nhanh_canvas{cursor:initial}._nhanh_canvas:active{cursor:pointer}._nhanh_canvas._nhanh_canvas_draggable{cursor:grab}._nhanh_canvas._nhanh_canvas_draggable:active{cursor:grabbing}._nhanh_canvas_hover_overlay{cursor:pointer!important}._nhanh_canvas_hover_overlay:active{cursor:grabbing!important}._nhanh_canvas_hover_overlay_draggable{cursor:pointer!important}._nhanh_canvas_hover_overlay_draggable:active{cursor:move!important}._nhanh_canvas_hover_overlay_draggable_ew{cursor:pointer!important}._nhanh_canvas_hover_overlay_draggable_ew:active{cursor:e-resize!important;cursor:ew-resize!important}._nhanh_canvas_hover_overlay_draggable_ns{cursor:pointer!important}._nhanh_canvas_hover_overlay_draggable_ns:active{cursor:n-resize!important;cursor:ns-resize!important}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- var je = Object.defineProperty;
3
- var ve = (r) => {
2
+ var Ze = Object.defineProperty;
3
+ var we = (r) => {
4
4
  throw TypeError(r);
5
5
  };
6
- var qe = (r, s, t) => s in r ? je(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t;
7
- var d = (r, s, t) => qe(r, typeof s != "symbol" ? s + "" : s, t), ye = (r, s, t) => s.has(r) || ve("Cannot " + t);
8
- var x = (r, s, t) => (ye(r, s, "read from private field"), t ? t.call(r) : s.get(r)), T = (r, s, t) => s.has(r) ? ve("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, t), M = (r, s, t, e) => (ye(r, s, "write to private field"), e ? e.call(r, t) : s.set(r, t), t);
9
- const $e = {
6
+ var Qe = (r, s, t) => s in r ? Ze(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t;
7
+ var d = (r, s, t) => Qe(r, typeof s != "symbol" ? s + "" : s, t), xe = (r, s, t) => s.has(r) || we("Cannot " + t);
8
+ var x = (r, s, t) => (xe(r, s, "read from private field"), t ? t.call(r) : s.get(r)), L = (r, s, t) => s.has(r) ? we("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, t), M = (r, s, t, e) => (xe(r, s, "write to private field"), e ? e.call(r, t) : s.set(r, t), t);
9
+ const Je = {
10
10
  ".mp3": "audio/mpeg",
11
11
  ".mp4": "video/mp4",
12
12
  ".m4a": "audio/mp4",
@@ -68,7 +68,7 @@ const $e = {
68
68
  ".otf": "font/otf",
69
69
  ".eot": "application/vnd.ms-fontobject",
70
70
  ".map": "application/json"
71
- }, ie = {
71
+ }, re = {
72
72
  image: [
73
73
  ".jpg",
74
74
  ".jpeg",
@@ -248,7 +248,7 @@ const $e = {
248
248
  ".awk",
249
249
  ".php"
250
250
  ]
251
- }, we = [
251
+ }, Pe = [
252
252
  "",
253
253
  "万",
254
254
  "亿",
@@ -262,7 +262,7 @@ const $e = {
262
262
  "正",
263
263
  "载",
264
264
  "极"
265
- ], Os = ["_self", "_blank", "_parent", "_top"], Me = {
265
+ ], Ls = ["_self", "_blank", "_parent", "_top"], Re = {
266
266
  // 北美标准尺寸 (毫米)
267
267
  Letter: { width: 215.9, height: 279.4 },
268
268
  // 8.5 × 11 英寸
@@ -315,10 +315,10 @@ const $e = {
315
315
  C6: { width: 114, height: 162 },
316
316
  C7: { width: 81, height: 114 },
317
317
  C8: { width: 57, height: 81 }
318
- }, As = Object.keys(Me).map(
318
+ }, Ts = Object.keys(Re).map(
319
319
  (r) => ({ value: r, label: r })
320
320
  );
321
- function zt(r, s = 500) {
321
+ function Wt(r, s = 500) {
322
322
  let t, e = !0;
323
323
  function i(n) {
324
324
  if (!e) return;
@@ -328,26 +328,26 @@ function zt(r, s = 500) {
328
328
  }
329
329
  return requestAnimationFrame(i), () => e = !1;
330
330
  }
331
- function Ts(r, s, t, e, i = 2) {
331
+ function Is(r, s, t, e, i = 2) {
332
332
  let n = r, o = !1, a = 1, l = r, c = s, h = t;
333
333
  const u = () => {
334
- const b = (c - l) / h;
335
- return Number(b.toFixed(i));
334
+ const P = (c - l) / h;
335
+ return Number(P.toFixed(i));
336
336
  };
337
337
  let f = u();
338
- const m = (b) => Math.min(Math.max(b, l), c), p = (b) => Number(b.toFixed(i)), g = (b, C, E) => {
338
+ const m = (P) => Math.min(Math.max(P, l), c), p = (P) => Number(P.toFixed(i)), g = (P, b, _) => {
339
339
  const A = [];
340
- return b >= C && A.push("最小值必须小于最大值"), E <= 0 ? A.push("分段数必须为正数") : u() == 0 && A.push("数值精度过低,致使动画步长为 0"), A;
341
- }, y = (b, C, E) => {
342
- const A = g(b, C, E);
343
- return A.length > 0 ? (console.error(`参数更新失败: ${A.join("; ")}`), !1) : (l = b, c = C, h = E, f = u(), n = m(n), !0);
340
+ return P >= b && A.push("最小值必须小于最大值"), _ <= 0 ? A.push("分段数必须为正数") : u() == 0 && A.push("数值精度过低,致使动画步长为 0"), A;
341
+ }, y = (P, b, _) => {
342
+ const A = g(P, b, _);
343
+ return A.length > 0 ? (console.error(`参数更新失败: ${A.join("; ")}`), !1) : (l = P, c = b, h = _, f = u(), n = m(n), !0);
344
344
  }, w = () => {
345
345
  o && (a = n >= c ? -1 : n <= l ? 1 : a, n = m(n + f * a), e(p(n)), requestAnimationFrame(w));
346
346
  };
347
347
  return {
348
348
  /** 启动/继续动画 */
349
- play(b = n) {
350
- if (n = m(b), g(l, c, h).length)
349
+ play(P = n) {
350
+ if (n = m(P), g(l, c, h).length)
351
351
  return console.error("配置参数错误", this.getParams());
352
352
  o || (o = !0, w());
353
353
  },
@@ -365,7 +365,7 @@ function Ts(r, s, t, e, i = 2) {
365
365
  getParams: () => ({ min: l, max: c, steps: h, precision: i, stepSize: f })
366
366
  };
367
367
  }
368
- function Ze(r, s, t, e, i = 4) {
368
+ function Ke(r, s, t, e, i = 4) {
369
369
  if (t <= 0) return console.error("动画步数 必须为正数");
370
370
  const n = (u) => Number(u.toFixed(i)), o = s - r, a = n(Math.abs(o) / t);
371
371
  if (a === 0) return console.error("数值精度过低,致使动画步长为 0");
@@ -376,7 +376,7 @@ function Ze(r, s, t, e, i = 4) {
376
376
  };
377
377
  h();
378
378
  }
379
- function Ls(r, s, t, e) {
379
+ function Ns(r, s, t, e) {
380
380
  const i = (l) => 3 * (1 - l) ** 2 * l * r + 3 * (1 - l) * l ** 2 * t + l ** 3, n = (l) => 3 * (1 - l) ** 2 * l * s + 3 * (1 - l) * l ** 2 * e + l ** 3, o = (l) => 3 * r * (1 - l) * (1 - 3 * l) + 3 * t * (2 * l - 3 * l ** 2) + 3 * l ** 2, a = (l) => {
381
381
  if (l <= 0) return 0;
382
382
  if (l >= 1) return 1;
@@ -404,7 +404,7 @@ function Ls(r, s, t, e) {
404
404
  return n(a(c));
405
405
  };
406
406
  }
407
- function Is(r, s = "image/png") {
407
+ function Hs(r, s = "image/png") {
408
408
  try {
409
409
  let t, e = s;
410
410
  if (r instanceof File)
@@ -441,17 +441,17 @@ function Is(r, s = "image/png") {
441
441
  ), null;
442
442
  }
443
443
  }
444
- function Ns(r) {
444
+ function Fs(r) {
445
445
  return r.charAt(0).toUpperCase() + r.slice(1);
446
446
  }
447
- function Hs(r, s, t = 2) {
447
+ function Bs(r, s, t = 2) {
448
448
  return !Number.isFinite(r) || !Number.isFinite(s) || !Number.isFinite(t) ? (console.error("所有参数必须是有限的数字"), "") : s === 0 ? (console.error("分母不能为零"), "") : t < 0 ? (console.error("小数位数不能为负数"), "") : (r / s * 100).toFixed(t) + "%";
449
449
  }
450
- function ne(r) {
450
+ function le(r) {
451
451
  const t = r.toString().split("."), e = t[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
452
452
  return t.length > 1 ? e + "." + t[1] : e;
453
453
  }
454
- function Fs(r, s) {
454
+ function Gs(r, s) {
455
455
  const t = {
456
456
  join: !0,
457
457
  suffix: "",
@@ -462,16 +462,16 @@ function Fs(r, s) {
462
462
  }, o = Number(r);
463
463
  if (isNaN(o)) return e ? `0${i}` : [0, i];
464
464
  const a = Math.abs(o), l = o >= 0, c = Math.max(0, Math.floor(Math.log10(a) / 4)), h = Math.pow(1e4, c), u = a / h, f = (l ? 1 : -1) * parseFloat(u.toFixed(Math.max(0, n)));
465
- return e ? `${f}${we[c]}${i}` : [f, we[c] + i];
465
+ return e ? `${f}${Pe[c]}${i}` : [f, Pe[c] + i];
466
466
  }
467
- function Bs(r) {
467
+ function Us(r) {
468
468
  const s = ["B", "KB", "MB", "GB", "TB", "PB"];
469
469
  let t = 0;
470
470
  for (; r > 1024; )
471
471
  r /= 1024, t++;
472
472
  return `${Math.round(r * 100) / 100} ${s[t]}`;
473
473
  }
474
- function Qe(r, s = "YYYY-MM-DD hh:mm:ss", t = !0) {
474
+ function ti(r, s = "YYYY-MM-DD hh:mm:ss", t = !0) {
475
475
  const e = new Date(r);
476
476
  if (isNaN(e.getTime()))
477
477
  return console.error("Invalid date"), "";
@@ -490,15 +490,15 @@ function Qe(r, s = "YYYY-MM-DD hh:mm:ss", t = !0) {
490
490
  return t ? String(o).padStart(2, "0") : String(o);
491
491
  });
492
492
  }
493
- function re(r, s = "file") {
493
+ function ce(r, s = "file") {
494
494
  if (!r || (r = String(r).trim(), r === "")) return s;
495
495
  const t = r.split("/");
496
496
  return t[t.length - 1].split("?")[0];
497
497
  }
498
- function Us(r, s) {
498
+ function Xs(r, s) {
499
499
  return r = r.replace(/([^a-zA-Z][a-z])/g, (t) => t.toUpperCase()), s ? r.replace(/[^a-zA-Z]+/g, "") : r;
500
500
  }
501
- function Xs(r, s, t = ",") {
501
+ function zs(r, s, t = ",") {
502
502
  const e = new RegExp(
503
503
  `(^|${t})${s}(${t}|$)`,
504
504
  "g"
@@ -507,7 +507,7 @@ function Xs(r, s, t = ",") {
507
507
  return n === o ? t : "";
508
508
  });
509
509
  }
510
- function Gs(r, s = !0) {
510
+ function Ys(r, s = !0) {
511
511
  const t = {
512
512
  "\b": "\\b",
513
513
  " ": "\\t",
@@ -524,7 +524,7 @@ function Gs(r, s = !0) {
524
524
  (i) => t[i]
525
525
  ) : r.replace(/\\[btnvfrs]/g, (i) => e[i] || i);
526
526
  }
527
- const Lt = [
527
+ const It = [
528
528
  ["年", 365 * 24 * 60 * 60 * 1e3],
529
529
  ["月", 30 * 24 * 60 * 60 * 1e3],
530
530
  ["周", 7 * 24 * 60 * 60 * 1e3],
@@ -534,21 +534,21 @@ const Lt = [
534
534
  ["秒", 1e3],
535
535
  ["毫秒", 1]
536
536
  ];
537
- function zs(r, s) {
537
+ function js(r, s) {
538
538
  if (!Number.isFinite(r) || r < 0) return "0毫秒";
539
539
  r = Math.round(r);
540
- const t = s ? Lt.findIndex(([i]) => i === s) : 0, e = t === -1 ? 0 : t;
541
- for (let i = e; i < Lt.length; i++) {
542
- const [n, o] = Lt[i];
540
+ const t = s ? It.findIndex(([i]) => i === s) : 0, e = t === -1 ? 0 : t;
541
+ for (let i = e; i < It.length; i++) {
542
+ const [n, o] = It[i];
543
543
  if (r >= o) {
544
544
  const a = o === 1 ? r : Math.round(r / o * 10) / 10;
545
545
  let l = Number.isInteger(a) ? a : a.toFixed(1).replace(/\.0$/, "");
546
- return n === Lt[e][0] && (l = ne(Number(l))), `${l}${n}`;
546
+ return n === It[e][0] && (l = le(Number(l))), `${l}${n}`;
547
547
  }
548
548
  }
549
549
  return "0毫秒";
550
550
  }
551
- function Ys(r, s) {
551
+ function Ws(r, s) {
552
552
  if (s < 1)
553
553
  return console.error("分割大小必须大于0"), [];
554
554
  const t = [];
@@ -558,24 +558,24 @@ function Ys(r, s) {
558
558
  }
559
559
  return t;
560
560
  }
561
- function ge(r, s = 2) {
561
+ function ve(r, s = 2) {
562
562
  if (Array.isArray(r) && r.length >= s) {
563
563
  for (let e = 0; e < r.length; e++)
564
564
  if (typeof r[e] != "number" || !Number.isFinite(r[e])) return !1;
565
565
  } else return !1;
566
566
  return !0;
567
567
  }
568
- function Yt(r, s = 1, t = 2) {
568
+ function qt(r, s = 1, t = 2) {
569
569
  if (Array.isArray(r) && r.length >= s) {
570
570
  for (let i = 0; i < r.length; i++)
571
- if (!ge(r[i], t)) return !1;
571
+ if (!ve(r[i], t)) return !1;
572
572
  } else return !1;
573
573
  return !0;
574
574
  }
575
- function Ws(r, s, t) {
575
+ function qs(r, s, t) {
576
576
  return Math.abs(r - s) <= t;
577
577
  }
578
- function js(r, s) {
578
+ function $s(r, s) {
579
579
  let t = !1;
580
580
  const { x: e, y: i } = r, n = s.length;
581
581
  for (let o = 0, a = n - 1; o < n; a = o++) {
@@ -584,7 +584,7 @@ function js(r, s) {
584
584
  }
585
585
  return t;
586
586
  }
587
- function qs(r, s, t, e) {
587
+ function Zs(r, s, t, e) {
588
588
  const i = Math.min(r[0], s[0]), n = Math.max(r[0], s[0]), o = Math.min(r[1], s[1]), a = Math.max(r[1], s[1]), l = [
589
589
  [i, o],
590
590
  // 左上
@@ -608,10 +608,10 @@ function qs(r, s, t, e) {
608
608
  }
609
609
  return m && p;
610
610
  }
611
- function oe(r) {
611
+ function he(r) {
612
612
  return Object.prototype.toString.call(r).slice(8, -1).toLowerCase();
613
613
  }
614
- function $s(r) {
614
+ function Qs(r) {
615
615
  return [
616
616
  "https:",
617
617
  // HTTPS协议,用于安全地浏览网页
@@ -635,7 +635,7 @@ function $s(r) {
635
635
  // VPN协议,用于创建安全的网络连接
636
636
  ].some((t) => r.startsWith(t));
637
637
  }
638
- function Zs(r) {
638
+ function Js(r) {
639
639
  return new Promise((s, t) => {
640
640
  if (typeof r != "string" || r.trim() === "" || !r.includes("://")) {
641
641
  t(new Error("Invalid URL: Must be a non-empty string"));
@@ -662,22 +662,22 @@ function Zs(r) {
662
662
  }
663
663
  });
664
664
  }
665
- const tt = class tt {
665
+ const it = class it {
666
666
  constructor() {
667
- if (new.target === tt)
667
+ if (new.target === it)
668
668
  throw new Error("请直接使用静态方法,而不是实例化此类");
669
669
  }
670
670
  static check(s, t) {
671
671
  if (!s || typeof s != "string")
672
672
  return console.error("Invalid URL provided"), t ? !1 : "unknown";
673
- const e = re(s).toLowerCase();
673
+ const e = ce(s).toLowerCase();
674
674
  if (t) {
675
- if (!ie.hasOwnProperty(t))
675
+ if (!re.hasOwnProperty(t))
676
676
  return console.error(`Unknown file type: ${t}`), "unknown";
677
- const i = ie[t];
678
- return tt._checkExtension(e, i);
677
+ const i = re[t];
678
+ return it._checkExtension(e, i);
679
679
  }
680
- return tt._detectFileType(e);
680
+ return it._detectFileType(e);
681
681
  }
682
682
  /**
683
683
  * 静态方法,用于解析地址信息
@@ -689,7 +689,7 @@ const tt = class tt {
689
689
  */
690
690
  static parseAddresses(s) {
691
691
  return !s || typeof s != "string" ? (console.error("Invalid URL provided"), []) : s.split(",").map((t) => {
692
- const e = re(t), i = this.check(t);
692
+ const e = ce(t), i = this.check(t);
693
693
  return { url: t, name: e, type: i };
694
694
  });
695
695
  }
@@ -702,7 +702,7 @@ const tt = class tt {
702
702
  static matchesMimeType(s, t) {
703
703
  if (!t) return !0;
704
704
  if (typeof s != "string" || typeof t != "string") return !1;
705
- const e = tt._normalizeType(s), i = t.split(",").map((a) => tt._normalizeType(a.trim())), [n, o = "*"] = e.split("/");
705
+ const e = it._normalizeType(s), i = t.split(",").map((a) => it._normalizeType(a.trim())), [n, o = "*"] = e.split("/");
706
706
  return i.some((a) => {
707
707
  const [l, c = "*"] = a.split("/");
708
708
  return (l === "*" || n === "*" || l === n) && (c === "*" || o === "*" || c === o);
@@ -717,7 +717,7 @@ const tt = class tt {
717
717
  * @returns {string} 标准化的MIME类型字符串,如果无法识别则返回原始输入
718
718
  */
719
719
  static _normalizeType(s) {
720
- return s.startsWith(".") && !s.includes("/") ? $e[s.toLowerCase()] || s : s.includes("/") ? s : `${s}/*`;
720
+ return s.startsWith(".") && !s.includes("/") ? Je[s.toLowerCase()] || s : s.includes("/") ? s : `${s}/*`;
721
721
  }
722
722
  /**
723
723
  * 检查URL是否具有任何指定的文件扩展名
@@ -734,20 +734,20 @@ const tt = class tt {
734
734
  * @returns {string} - 如果URL与任何已知类型匹配,则返回文件类型,否则返回"unknown"
735
735
  */
736
736
  static _detectFileType(s) {
737
- for (const [t, e] of tt.cachedEntries)
737
+ for (const [t, e] of it.cachedEntries)
738
738
  if (e.some((i) => s.endsWith(i)))
739
739
  return t;
740
740
  return "unknown";
741
741
  }
742
742
  };
743
743
  // 缓存文件扩展名的条目,以提高性能
744
- d(tt, "cachedEntries", Object.entries(ie));
745
- let xe = tt;
746
- const Je = /\w*(?:\[\d+\])+|\w+/g, De = /^\w*(?:\[\d+\])+$/, Re = /\w+|(\[\d+\])/g, ke = /\[(\d+)\]/;
747
- function Ve(r) {
748
- return r ? r.match(Je) || [] : [];
744
+ d(it, "cachedEntries", Object.entries(re));
745
+ let be = it;
746
+ const ei = /\w*(?:\[\d+\])+|\w+/g, ke = /^\w*(?:\[\d+\])+$/, Ve = /\w+|(\[\d+\])/g, Oe = /\[(\d+)\]/;
747
+ function Ae(r) {
748
+ return r ? r.match(ei) || [] : [];
749
749
  }
750
- function Qs(r, s = 3e3) {
750
+ function Ks(r, s = 3e3) {
751
751
  if (typeof r != "function")
752
752
  return console.error("非函数:", r);
753
753
  const t = window.requestIdleCallback, e = function(i) {
@@ -755,7 +755,7 @@ function Qs(r, s = 3e3) {
755
755
  };
756
756
  t ? t(e, { timeout: s }) : requestAnimationFrame(() => r());
757
757
  }
758
- function Ke(r, s) {
758
+ function ii(r, s) {
759
759
  const t = Date.now();
760
760
  return new Promise((e, i) => {
761
761
  const n = () => {
@@ -767,19 +767,19 @@ function Ke(r, s) {
767
767
  n();
768
768
  });
769
769
  }
770
- function pt(r, s, t = [], e = Date.now()) {
770
+ function ct(r, s, t = [], e = Date.now()) {
771
771
  if (e < Date.now() - 50) {
772
772
  console.error("_MergeObjects 合并异常:疑似死循环");
773
773
  return;
774
774
  }
775
- const i = oe(r), n = oe(s);
775
+ const i = he(r), n = he(s);
776
776
  if (i != n) return s;
777
777
  if (i == "object" || i == "array") {
778
778
  if (t.some(([o, a]) => o == r && a == s)) return r;
779
779
  if (t.push([r, s]), i == "object") {
780
780
  for (const o in s)
781
781
  if (Object.prototype.hasOwnProperty.call(s, o)) {
782
- const a = s[o], l = r[o], c = pt(
782
+ const a = s[o], l = r[o], c = ct(
783
783
  l,
784
784
  a,
785
785
  t,
@@ -790,7 +790,7 @@ function pt(r, s, t = [], e = Date.now()) {
790
790
  return r;
791
791
  } else if (i == "array")
792
792
  return s.forEach((o, a) => {
793
- const l = o, c = r[a], h = pt(
793
+ const l = o, c = r[a], h = ct(
794
794
  c,
795
795
  l,
796
796
  t,
@@ -800,13 +800,13 @@ function pt(r, s, t = [], e = Date.now()) {
800
800
  }), r;
801
801
  } else return s;
802
802
  }
803
- function ae(r = "") {
803
+ function ue(r = "") {
804
804
  return r + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(s) {
805
805
  const t = Math.random() * 16 | 0;
806
806
  return (s === "x" ? t : t & 3 | 8).toString(16);
807
807
  });
808
808
  }
809
- function Oe(r, s) {
809
+ function Le(r, s) {
810
810
  let t;
811
811
  return function(...e) {
812
812
  clearTimeout(t), t = setTimeout(() => {
@@ -814,7 +814,7 @@ function Oe(r, s) {
814
814
  }, s);
815
815
  };
816
816
  }
817
- function Js(r, s) {
817
+ function tn(r, s) {
818
818
  let t = -1 / 0;
819
819
  return function(...e) {
820
820
  const i = performance.now();
@@ -828,52 +828,52 @@ function Js(r, s) {
828
828
  }
829
829
  };
830
830
  }
831
- function Ks(r, s) {
831
+ function en(r, s) {
832
832
  if (!r || !s) return r;
833
- const t = Ve(s);
833
+ const t = Ae(s);
834
834
  return t.length ? t.reduce((e, i, n) => {
835
835
  const o = n === t.length - 1;
836
- if (De.test(i)) {
837
- const a = i.match(Re) || [];
836
+ if (ke.test(i)) {
837
+ const a = i.match(Ve) || [];
838
838
  return a.reduce((l, c, h) => {
839
839
  if (/^\w+$/.test(c))
840
840
  return l[c] || (h < a.length - 1 ? [] : {});
841
- const u = c.match(ke), f = u ? parseInt(u[1], 10) : 0, m = h === a.length - 1;
841
+ const u = c.match(Oe), f = u ? parseInt(u[1], 10) : 0, m = h === a.length - 1;
842
842
  return m && o ? l[f] : l[f] || (m ? {} : []);
843
843
  }, e);
844
844
  }
845
845
  return o ? e[i] : e[i] || {};
846
846
  }, r) : r;
847
847
  }
848
- function tn(r, s, t, e) {
848
+ function sn(r, s, t, e) {
849
849
  if (!r || !s) return t;
850
- const i = Ve(s);
850
+ const i = Ae(s);
851
851
  return i.length ? i.reduce((n, o, a) => {
852
852
  const l = a === i.length - 1;
853
- if (De.test(o)) {
854
- const c = o.match(Re) || [];
853
+ if (ke.test(o)) {
854
+ const c = o.match(Ve) || [];
855
855
  return c.reduce((h, u, f) => {
856
856
  const m = f === c.length - 1;
857
857
  if (/^\w+$/.test(u))
858
858
  return h.hasOwnProperty(u) || (h[u] = []), h[u];
859
- const p = u.match(ke), g = p ? parseInt(p[1], 10) : 0, y = m && l;
859
+ const p = u.match(Oe), g = p ? parseInt(p[1], 10) : 0, y = m && l;
860
860
  return h.hasOwnProperty(g) ? y && !e && (h[g] = t) : h[g] = y ? t : m ? {} : [], h[g];
861
861
  }, n);
862
862
  }
863
863
  return l ? ((!e || !n.hasOwnProperty(o)) && (n[o] = t), n[o]) : (n.hasOwnProperty(o) || (n[o] = {}), n[o]);
864
864
  }, r) : t;
865
865
  }
866
- function en(r) {
866
+ function nn(r) {
867
867
  return r.map((s, t) => r.slice(t).concat(r.slice(0, t)));
868
868
  }
869
- function ti(r) {
869
+ function si(r) {
870
870
  const s = window.structuredClone, t = (e, i = /* @__PURE__ */ new WeakMap()) => {
871
871
  const n = e;
872
872
  if (n === null || typeof n != "object")
873
873
  return n;
874
874
  if (i.has(n))
875
875
  return i.get(n);
876
- switch (oe(n)) {
876
+ switch (he(n)) {
877
877
  case "array": {
878
878
  const a = [];
879
879
  i.set(n, a);
@@ -957,7 +957,7 @@ function ti(r) {
957
957
  return console.warn("structuredClone error:", e), s && t(r);
958
958
  }
959
959
  }
960
- function ei(r, s) {
960
+ function ni(r, s) {
961
961
  const t = [
962
962
  [11, "#d03050"],
963
963
  [8, "#f0a020"],
@@ -989,7 +989,7 @@ function ei(r, s) {
989
989
  ), f;
990
990
  };
991
991
  }
992
- function sn(r) {
992
+ function rn(r) {
993
993
  const s = Date.now();
994
994
  let t = performance.now();
995
995
  for (; Date.now() - s < r; ) {
@@ -1003,7 +1003,7 @@ function sn(r) {
1003
1003
  return Date.now() - s;
1004
1004
  }
1005
1005
  var yt = /* @__PURE__ */ ((r) => (r.RESPONSE = "response", r.QUERY = "query", r))(yt || {});
1006
- class nn {
1006
+ class on {
1007
1007
  constructor(s, t) {
1008
1008
  /** 音效资源地址映射(preload 成功后对应项会替换为 blob: URL) */
1009
1009
  d(this, "soundSources");
@@ -1093,11 +1093,11 @@ class nn {
1093
1093
  }), l;
1094
1094
  }
1095
1095
  }
1096
- function Pe(r, s) {
1096
+ function Ce(r, s) {
1097
1097
  for (const t of Object.keys(s))
1098
1098
  s[t] !== void 0 && (r[t] = s[t]);
1099
1099
  }
1100
- class rn {
1100
+ class an {
1101
1101
  constructor(s) {
1102
1102
  /** WebSocket地址 */
1103
1103
  d(this, "url");
@@ -1138,7 +1138,7 @@ class rn {
1138
1138
  });
1139
1139
  if (!s) return;
1140
1140
  const { url: t, ping: e, maxRetryCount: i, retryInterval: n } = s;
1141
- e !== void 0 && (typeof e == "boolean" ? this.pingConfig.enabled = e : Pe(this.pingConfig, e)), Pe(this.retryConfig, {
1141
+ e !== void 0 && (typeof e == "boolean" ? this.pingConfig.enabled = e : Ce(this.pingConfig, e)), Ce(this.retryConfig, {
1142
1142
  maxCount: i,
1143
1143
  interval: n
1144
1144
  }), t && this.start(t);
@@ -1188,7 +1188,7 @@ class rn {
1188
1188
  (s = this.socket) == null || s.close(), this.socket = void 0;
1189
1189
  }
1190
1190
  }
1191
- function on(r, s = 10) {
1191
+ function ln(r, s = 10) {
1192
1192
  let t = 0, e = s;
1193
1193
  function i() {
1194
1194
  if (e > 0)
@@ -1202,7 +1202,7 @@ function on(r, s = 10) {
1202
1202
  t = Date.now(), i();
1203
1203
  });
1204
1204
  }
1205
- function an(r) {
1205
+ function cn(r) {
1206
1206
  const s = () => Promise.resolve(), t = (a) => (console.error(a), Promise.reject(a));
1207
1207
  function e() {
1208
1208
  return navigator.clipboard.writeText(r).then(s).catch(t);
@@ -1229,8 +1229,8 @@ function an(r) {
1229
1229
  }
1230
1230
  return navigator.clipboard ? e().catch(o) : o();
1231
1231
  }
1232
- function ln(r, s) {
1233
- const t = Me[r];
1232
+ function hn(r, s) {
1233
+ const t = Re[r];
1234
1234
  if (!t) return console.error(`未知纸张类型: ${r}`);
1235
1235
  const { width: e, height: i } = t, n = (p) => p / 25.4, a = typeof window < "u" ? window.devicePixelRatio * 96 : 300, l = (p) => Math.round(n(p) * a), c = l(e), h = l(i), u = l(s), f = Math.max(0, c - 2 * u), m = Math.max(0, h - 2 * u);
1236
1236
  return {
@@ -1246,7 +1246,7 @@ function ln(r, s) {
1246
1246
  paperHeightPx: h
1247
1247
  };
1248
1248
  }
1249
- class It {
1249
+ class Nt {
1250
1250
  constructor() {
1251
1251
  }
1252
1252
  /** 初始化标签页管理器 */
@@ -1288,7 +1288,7 @@ class It {
1288
1288
  const o = "请先初始化标签页管理器";
1289
1289
  return console.error(o), Promise.reject(o);
1290
1290
  }
1291
- const t = ae();
1291
+ const t = ue();
1292
1292
  let e = !1;
1293
1293
  const i = this.pendingQueries.get(t) || [];
1294
1294
  i.push(() => e = !0), this.pendingQueries.set(t, i);
@@ -1297,7 +1297,7 @@ class It {
1297
1297
  responseKey: t,
1298
1298
  name: s
1299
1299
  };
1300
- return this.channel.postMessage(n), Ke(() => e, this.timeout).finally(
1300
+ return this.channel.postMessage(n), ii(() => e, this.timeout).finally(
1301
1301
  () => this.pendingQueries.delete(t)
1302
1302
  );
1303
1303
  }
@@ -1319,7 +1319,7 @@ class It {
1319
1319
  const n = "请先初始化标签页管理器";
1320
1320
  return console.error(n), Promise.reject(n);
1321
1321
  }
1322
- const s = ae(), t = [], e = this.pendingQueries.get(s) || [];
1322
+ const s = ue(), t = [], e = this.pendingQueries.get(s) || [];
1323
1323
  e.push((n) => t.push(n)), this.pendingQueries.set(s, e);
1324
1324
  const i = {
1325
1325
  type: yt.QUERY,
@@ -1334,15 +1334,15 @@ class It {
1334
1334
  }
1335
1335
  }
1336
1336
  /** 初始化完成标志 */
1337
- d(It, "initFinish", !1), /** 频道 */
1338
- d(It, "channel", new BroadcastChannel("nhanh-pure-function")), /** 等待回执消息时间上限(上限) */
1339
- d(It, "timeout", 150), /**
1337
+ d(Nt, "initFinish", !1), /** 频道 */
1338
+ d(Nt, "channel", new BroadcastChannel("nhanh-pure-function")), /** 等待回执消息时间上限(上限) */
1339
+ d(Nt, "timeout", 150), /**
1340
1340
  * 待处理查询
1341
1341
  * @param key 回执消息key
1342
1342
  * @param callback 匹配标签页的回调函数
1343
1343
  */
1344
- d(It, "pendingQueries", /* @__PURE__ */ new Map());
1345
- class cn {
1344
+ d(Nt, "pendingQueries", /* @__PURE__ */ new Map());
1345
+ class un {
1346
1346
  constructor() {
1347
1347
  /** 用户状态:active(活跃) / idle(闲置) */
1348
1348
  d(this, "status", "active");
@@ -1391,7 +1391,7 @@ class cn {
1391
1391
  * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
1392
1392
  * MIT Licence
1393
1393
  */
1394
- var le = 9e15, ht = 1e9, ce = "0123456789abcdef", Wt = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", jt = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", he = {
1394
+ var de = 9e15, ut = 1e9, fe = "0123456789abcdef", $t = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", Zt = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", me = {
1395
1395
  // These values must be integers within the stated ranges (inclusive).
1396
1396
  // Most of these values can be changed at run-time using the `Decimal.config` method.
1397
1397
  // The maximum number of significant digits of the result of a calculation or base conversion.
@@ -1444,23 +1444,23 @@ var le = 9e15, ht = 1e9, ce = "0123456789abcdef", Wt = "2.3025850929940456840179
1444
1444
  // -1 to -EXP_LIMIT
1445
1445
  // The maximum exponent value, above which overflow to Infinity occurs.
1446
1446
  // JavaScript numbers: 308 (1.7976931348623157e+308)
1447
- maxE: le,
1447
+ maxE: de,
1448
1448
  // 1 to EXP_LIMIT
1449
1449
  // Whether to use cryptographically-secure random number generation, if available.
1450
1450
  crypto: !1
1451
1451
  // true/false
1452
- }, Ae, nt, _ = !0, Qt = "[DecimalError] ", ct = Qt + "Invalid argument: ", Te = Qt + "Precision limit exceeded", Le = Qt + "crypto unavailable", Ie = "[object Decimal]", F = Math.floor, L = Math.pow, ii = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, si = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, ni = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, Ne = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, $ = 1e7, S = 7, ri = 9007199254740991, oi = Wt.length - 1, ue = jt.length - 1, v = { toStringTag: Ie };
1452
+ }, Te, nt, E = !0, ee = "[DecimalError] ", ht = ee + "Invalid argument: ", Ie = ee + "Precision limit exceeded", Ne = ee + "crypto unavailable", He = "[object Decimal]", F = Math.floor, I = Math.pow, ri = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, oi = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, ai = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, Fe = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, Q = 1e7, S = 7, li = 9007199254740991, ci = $t.length - 1, ge = Zt.length - 1, v = { toStringTag: He };
1453
1453
  v.absoluteValue = v.abs = function() {
1454
1454
  var r = new this.constructor(this);
1455
- return r.s < 0 && (r.s = 1), P(r);
1455
+ return r.s < 0 && (r.s = 1), C(r);
1456
1456
  };
1457
1457
  v.ceil = function() {
1458
- return P(new this.constructor(this), this.e + 1, 2);
1458
+ return C(new this.constructor(this), this.e + 1, 2);
1459
1459
  };
1460
1460
  v.clampedTo = v.clamp = function(r, s) {
1461
1461
  var t, e = this, i = e.constructor;
1462
1462
  if (r = new i(r), s = new i(s), !r.s || !s.s) return new i(NaN);
1463
- if (r.gt(s)) throw Error(ct + s);
1463
+ if (r.gt(s)) throw Error(ht + s);
1464
1464
  return t = e.cmp(r), t < 0 ? r : e.cmp(s) > 0 ? s : new i(e);
1465
1465
  };
1466
1466
  v.comparedTo = v.cmp = function(r) {
@@ -1476,24 +1476,24 @@ v.comparedTo = v.cmp = function(r) {
1476
1476
  };
1477
1477
  v.cosine = v.cos = function() {
1478
1478
  var r, s, t = this, e = t.constructor;
1479
- return t.d ? t.d[0] ? (r = e.precision, s = e.rounding, e.precision = r + Math.max(t.e, t.sd()) + S, e.rounding = 1, t = ai(e, Xe(e, t)), e.precision = r, e.rounding = s, P(nt == 2 || nt == 3 ? t.neg() : t, r, s, !0)) : new e(1) : new e(NaN);
1479
+ return t.d ? t.d[0] ? (r = e.precision, s = e.rounding, e.precision = r + Math.max(t.e, t.sd()) + S, e.rounding = 1, t = hi(e, ze(e, t)), e.precision = r, e.rounding = s, C(nt == 2 || nt == 3 ? t.neg() : t, r, s, !0)) : new e(1) : new e(NaN);
1480
1480
  };
1481
1481
  v.cubeRoot = v.cbrt = function() {
1482
1482
  var r, s, t, e, i, n, o, a, l, c, h = this, u = h.constructor;
1483
1483
  if (!h.isFinite() || h.isZero()) return new u(h);
1484
- for (_ = !1, n = h.s * L(h.s * h, 1 / 3), !n || Math.abs(n) == 1 / 0 ? (t = N(h.d), r = h.e, (n = (r - t.length + 1) % 3) && (t += n == 1 || n == -2 ? "0" : "00"), n = L(t, 1 / 3), r = F((r + 1) / 3) - (r % 3 == (r < 0 ? -1 : 2)), n == 1 / 0 ? t = "5e" + r : (t = n.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + r), e = new u(t), e.s = h.s) : e = new u(n.toString()), o = (r = u.precision) + 3; ; )
1485
- if (a = e, l = a.times(a).times(a), c = l.plus(h), e = k(c.plus(h).times(a), c.plus(l), o + 2, 1), N(a.d).slice(0, o) === (t = N(e.d)).slice(0, o))
1484
+ for (E = !1, n = h.s * I(h.s * h, 1 / 3), !n || Math.abs(n) == 1 / 0 ? (t = N(h.d), r = h.e, (n = (r - t.length + 1) % 3) && (t += n == 1 || n == -2 ? "0" : "00"), n = I(t, 1 / 3), r = F((r + 1) / 3) - (r % 3 == (r < 0 ? -1 : 2)), n == 1 / 0 ? t = "5e" + r : (t = n.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + r), e = new u(t), e.s = h.s) : e = new u(n.toString()), o = (r = u.precision) + 3; ; )
1485
+ if (a = e, l = a.times(a).times(a), c = l.plus(h), e = V(c.plus(h).times(a), c.plus(l), o + 2, 1), N(a.d).slice(0, o) === (t = N(e.d)).slice(0, o))
1486
1486
  if (t = t.slice(o - 3, o + 1), t == "9999" || !i && t == "4999") {
1487
- if (!i && (P(a, r + 1, 0), a.times(a).times(a).eq(h))) {
1487
+ if (!i && (C(a, r + 1, 0), a.times(a).times(a).eq(h))) {
1488
1488
  e = a;
1489
1489
  break;
1490
1490
  }
1491
1491
  o += 4, i = 1;
1492
1492
  } else {
1493
- (!+t || !+t.slice(1) && t.charAt(0) == "5") && (P(e, r + 1, 1), s = !e.times(e).times(e).eq(h));
1493
+ (!+t || !+t.slice(1) && t.charAt(0) == "5") && (C(e, r + 1, 1), s = !e.times(e).times(e).eq(h));
1494
1494
  break;
1495
1495
  }
1496
- return _ = !0, P(e, r, u.rounding, s);
1496
+ return E = !0, C(e, r, u.rounding, s);
1497
1497
  };
1498
1498
  v.decimalPlaces = v.dp = function() {
1499
1499
  var r, s = this.d, t = NaN;
@@ -1504,17 +1504,17 @@ v.decimalPlaces = v.dp = function() {
1504
1504
  return t;
1505
1505
  };
1506
1506
  v.dividedBy = v.div = function(r) {
1507
- return k(this, new this.constructor(r));
1507
+ return V(this, new this.constructor(r));
1508
1508
  };
1509
1509
  v.dividedToIntegerBy = v.divToInt = function(r) {
1510
1510
  var s = this, t = s.constructor;
1511
- return P(k(s, new t(r), 0, 1, 1), t.precision, t.rounding);
1511
+ return C(V(s, new t(r), 0, 1, 1), t.precision, t.rounding);
1512
1512
  };
1513
1513
  v.equals = v.eq = function(r) {
1514
1514
  return this.cmp(r) === 0;
1515
1515
  };
1516
1516
  v.floor = function() {
1517
- return P(new this.constructor(this), this.e + 1, 3);
1517
+ return C(new this.constructor(this), this.e + 1, 3);
1518
1518
  };
1519
1519
  v.greaterThan = v.gt = function(r) {
1520
1520
  return this.cmp(r) > 0;
@@ -1527,10 +1527,10 @@ v.hyperbolicCosine = v.cosh = function() {
1527
1527
  var r, s, t, e, i, n = this, o = n.constructor, a = new o(1);
1528
1528
  if (!n.isFinite()) return new o(n.s ? 1 / 0 : NaN);
1529
1529
  if (n.isZero()) return a;
1530
- t = o.precision, e = o.rounding, o.precision = t + Math.max(n.e, n.sd()) + 4, o.rounding = 1, i = n.d.length, i < 32 ? (r = Math.ceil(i / 3), s = (1 / Kt(4, r)).toString()) : (r = 16, s = "2.3283064365386962890625e-10"), n = Mt(o, 1, n.times(s), new o(1), !0);
1530
+ t = o.precision, e = o.rounding, o.precision = t + Math.max(n.e, n.sd()) + 4, o.rounding = 1, i = n.d.length, i < 32 ? (r = Math.ceil(i / 3), s = (1 / se(4, r)).toString()) : (r = 16, s = "2.3283064365386962890625e-10"), n = Mt(o, 1, n.times(s), new o(1), !0);
1531
1531
  for (var l, c = r, h = new o(8); c--; )
1532
1532
  l = n.times(n), n = a.minus(l.times(h.minus(l.times(h))));
1533
- return P(n, o.precision = t, o.rounding = e, !0);
1533
+ return C(n, o.precision = t, o.rounding = e, !0);
1534
1534
  };
1535
1535
  v.hyperbolicSine = v.sinh = function() {
1536
1536
  var r, s, t, e, i = this, n = i.constructor;
@@ -1538,52 +1538,52 @@ v.hyperbolicSine = v.sinh = function() {
1538
1538
  if (s = n.precision, t = n.rounding, n.precision = s + Math.max(i.e, i.sd()) + 4, n.rounding = 1, e = i.d.length, e < 3)
1539
1539
  i = Mt(n, 2, i, i, !0);
1540
1540
  else {
1541
- r = 1.4 * Math.sqrt(e), r = r > 16 ? 16 : r | 0, i = i.times(1 / Kt(5, r)), i = Mt(n, 2, i, i, !0);
1541
+ r = 1.4 * Math.sqrt(e), r = r > 16 ? 16 : r | 0, i = i.times(1 / se(5, r)), i = Mt(n, 2, i, i, !0);
1542
1542
  for (var o, a = new n(5), l = new n(16), c = new n(20); r--; )
1543
1543
  o = i.times(i), i = i.times(a.plus(o.times(l.times(o).plus(c))));
1544
1544
  }
1545
- return n.precision = s, n.rounding = t, P(i, s, t, !0);
1545
+ return n.precision = s, n.rounding = t, C(i, s, t, !0);
1546
1546
  };
1547
1547
  v.hyperbolicTangent = v.tanh = function() {
1548
1548
  var r, s, t = this, e = t.constructor;
1549
- return t.isFinite() ? t.isZero() ? new e(t) : (r = e.precision, s = e.rounding, e.precision = r + 7, e.rounding = 1, k(t.sinh(), t.cosh(), e.precision = r, e.rounding = s)) : new e(t.s);
1549
+ return t.isFinite() ? t.isZero() ? new e(t) : (r = e.precision, s = e.rounding, e.precision = r + 7, e.rounding = 1, V(t.sinh(), t.cosh(), e.precision = r, e.rounding = s)) : new e(t.s);
1550
1550
  };
1551
1551
  v.inverseCosine = v.acos = function() {
1552
1552
  var r = this, s = r.constructor, t = r.abs().cmp(1), e = s.precision, i = s.rounding;
1553
- return t !== -1 ? t === 0 ? r.isNeg() ? J(s, e, i) : new s(0) : new s(NaN) : r.isZero() ? J(s, e + 4, i).times(0.5) : (s.precision = e + 6, s.rounding = 1, r = new s(1).minus(r).div(r.plus(1)).sqrt().atan(), s.precision = e, s.rounding = i, r.times(2));
1553
+ return t !== -1 ? t === 0 ? r.isNeg() ? tt(s, e, i) : new s(0) : new s(NaN) : r.isZero() ? tt(s, e + 4, i).times(0.5) : (s.precision = e + 6, s.rounding = 1, r = new s(1).minus(r).div(r.plus(1)).sqrt().atan(), s.precision = e, s.rounding = i, r.times(2));
1554
1554
  };
1555
1555
  v.inverseHyperbolicCosine = v.acosh = function() {
1556
1556
  var r, s, t = this, e = t.constructor;
1557
- return t.lte(1) ? new e(t.eq(1) ? 0 : NaN) : t.isFinite() ? (r = e.precision, s = e.rounding, e.precision = r + Math.max(Math.abs(t.e), t.sd()) + 4, e.rounding = 1, _ = !1, t = t.times(t).minus(1).sqrt().plus(t), _ = !0, e.precision = r, e.rounding = s, t.ln()) : new e(t);
1557
+ return t.lte(1) ? new e(t.eq(1) ? 0 : NaN) : t.isFinite() ? (r = e.precision, s = e.rounding, e.precision = r + Math.max(Math.abs(t.e), t.sd()) + 4, e.rounding = 1, E = !1, t = t.times(t).minus(1).sqrt().plus(t), E = !0, e.precision = r, e.rounding = s, t.ln()) : new e(t);
1558
1558
  };
1559
1559
  v.inverseHyperbolicSine = v.asinh = function() {
1560
1560
  var r, s, t = this, e = t.constructor;
1561
- return !t.isFinite() || t.isZero() ? new e(t) : (r = e.precision, s = e.rounding, e.precision = r + 2 * Math.max(Math.abs(t.e), t.sd()) + 6, e.rounding = 1, _ = !1, t = t.times(t).plus(1).sqrt().plus(t), _ = !0, e.precision = r, e.rounding = s, t.ln());
1561
+ return !t.isFinite() || t.isZero() ? new e(t) : (r = e.precision, s = e.rounding, e.precision = r + 2 * Math.max(Math.abs(t.e), t.sd()) + 6, e.rounding = 1, E = !1, t = t.times(t).plus(1).sqrt().plus(t), E = !0, e.precision = r, e.rounding = s, t.ln());
1562
1562
  };
1563
1563
  v.inverseHyperbolicTangent = v.atanh = function() {
1564
1564
  var r, s, t, e, i = this, n = i.constructor;
1565
- return i.isFinite() ? i.e >= 0 ? new n(i.abs().eq(1) ? i.s / 0 : i.isZero() ? i : NaN) : (r = n.precision, s = n.rounding, e = i.sd(), Math.max(e, r) < 2 * -i.e - 1 ? P(new n(i), r, s, !0) : (n.precision = t = e - i.e, i = k(i.plus(1), new n(1).minus(i), t + r, 1), n.precision = r + 4, n.rounding = 1, i = i.ln(), n.precision = r, n.rounding = s, i.times(0.5))) : new n(NaN);
1565
+ return i.isFinite() ? i.e >= 0 ? new n(i.abs().eq(1) ? i.s / 0 : i.isZero() ? i : NaN) : (r = n.precision, s = n.rounding, e = i.sd(), Math.max(e, r) < 2 * -i.e - 1 ? C(new n(i), r, s, !0) : (n.precision = t = e - i.e, i = V(i.plus(1), new n(1).minus(i), t + r, 1), n.precision = r + 4, n.rounding = 1, i = i.ln(), n.precision = r, n.rounding = s, i.times(0.5))) : new n(NaN);
1566
1566
  };
1567
1567
  v.inverseSine = v.asin = function() {
1568
1568
  var r, s, t, e, i = this, n = i.constructor;
1569
- return i.isZero() ? new n(i) : (s = i.abs().cmp(1), t = n.precision, e = n.rounding, s !== -1 ? s === 0 ? (r = J(n, t + 4, e).times(0.5), r.s = i.s, r) : new n(NaN) : (n.precision = t + 6, n.rounding = 1, i = i.div(new n(1).minus(i.times(i)).sqrt().plus(1)).atan(), n.precision = t, n.rounding = e, i.times(2)));
1569
+ return i.isZero() ? new n(i) : (s = i.abs().cmp(1), t = n.precision, e = n.rounding, s !== -1 ? s === 0 ? (r = tt(n, t + 4, e).times(0.5), r.s = i.s, r) : new n(NaN) : (n.precision = t + 6, n.rounding = 1, i = i.div(new n(1).minus(i.times(i)).sqrt().plus(1)).atan(), n.precision = t, n.rounding = e, i.times(2)));
1570
1570
  };
1571
1571
  v.inverseTangent = v.atan = function() {
1572
1572
  var r, s, t, e, i, n, o, a, l, c = this, h = c.constructor, u = h.precision, f = h.rounding;
1573
1573
  if (c.isFinite()) {
1574
1574
  if (c.isZero())
1575
1575
  return new h(c);
1576
- if (c.abs().eq(1) && u + 4 <= ue)
1577
- return o = J(h, u + 4, f).times(0.25), o.s = c.s, o;
1576
+ if (c.abs().eq(1) && u + 4 <= ge)
1577
+ return o = tt(h, u + 4, f).times(0.25), o.s = c.s, o;
1578
1578
  } else {
1579
1579
  if (!c.s) return new h(NaN);
1580
- if (u + 4 <= ue)
1581
- return o = J(h, u + 4, f).times(0.5), o.s = c.s, o;
1580
+ if (u + 4 <= ge)
1581
+ return o = tt(h, u + 4, f).times(0.5), o.s = c.s, o;
1582
1582
  }
1583
1583
  for (h.precision = a = u + 10, h.rounding = 1, t = Math.min(28, a / S + 2 | 0), r = t; r; --r) c = c.div(c.times(c).plus(1).sqrt().plus(1));
1584
- for (_ = !1, s = Math.ceil(a / S), e = 1, l = c.times(c), o = new h(c), i = c; r !== -1; )
1584
+ for (E = !1, s = Math.ceil(a / S), e = 1, l = c.times(c), o = new h(c), i = c; r !== -1; )
1585
1585
  if (i = i.times(l), n = o.minus(i.div(e += 2)), i = i.times(l), o = n.plus(i.div(e += 2)), o.d[s] !== void 0) for (r = s; o.d[r] === n.d[r] && r--; ) ;
1586
- return t && (o = o.times(2 << t - 1)), _ = !0, P(o, h.precision = u, h.rounding = f, !0);
1586
+ return t && (o = o.times(2 << t - 1)), E = !0, C(o, h.precision = u, h.rounding = f, !0);
1587
1587
  };
1588
1588
  v.isFinite = function() {
1589
1589
  return !!this.d;
@@ -1626,14 +1626,14 @@ v.logarithm = v.log = function(r) {
1626
1626
  for (i = t[0]; i % 10 === 0; ) i /= 10;
1627
1627
  n = i !== 1;
1628
1628
  }
1629
- if (_ = !1, a = u + m, o = at(c, a), e = s ? qt(h, a + 10) : at(r, a), l = k(o, e, a, 1), kt(l.d, i = u, f))
1629
+ if (E = !1, a = u + m, o = at(c, a), e = s ? Qt(h, a + 10) : at(r, a), l = V(o, e, a, 1), kt(l.d, i = u, f))
1630
1630
  do
1631
- if (a += 10, o = at(c, a), e = s ? qt(h, a + 10) : at(r, a), l = k(o, e, a, 1), !n) {
1632
- +N(l.d).slice(i + 1, i + 15) + 1 == 1e14 && (l = P(l, u + 1, 0));
1631
+ if (a += 10, o = at(c, a), e = s ? Qt(h, a + 10) : at(r, a), l = V(o, e, a, 1), !n) {
1632
+ +N(l.d).slice(i + 1, i + 15) + 1 == 1e14 && (l = C(l, u + 1, 0));
1633
1633
  break;
1634
1634
  }
1635
1635
  while (kt(l.d, i += 10, f));
1636
- return _ = !0, P(l, u, f);
1636
+ return E = !0, C(l, u, f);
1637
1637
  };
1638
1638
  v.minus = v.sub = function(r) {
1639
1639
  var s, t, e, i, n, o, a, l, c, h, u, f, m = this, p = m.constructor;
@@ -1645,7 +1645,7 @@ v.minus = v.sub = function(r) {
1645
1645
  if (f[0]) r.s = -r.s;
1646
1646
  else if (c[0]) r = new p(m);
1647
1647
  else return new p(l === 3 ? -0 : 0);
1648
- return _ ? P(r, a, l) : r;
1648
+ return E ? C(r, a, l) : r;
1649
1649
  }
1650
1650
  if (t = F(r.e / S), h = F(m.e / S), c = c.slice(), n = h - t, n) {
1651
1651
  for (u = n < 0, u ? (s = c, n = -n, o = f.length) : (s = f, t = h, o = c.length), e = Math.max(Math.ceil(a / S), o) + 2, n > e && (n = e, s.length = 1), s.reverse(), e = n; e--; ) s.push(0);
@@ -1661,28 +1661,28 @@ v.minus = v.sub = function(r) {
1661
1661
  for (u && (s = c, c = f, f = s, r.s = -r.s), o = c.length, e = f.length - o; e > 0; --e) c[o++] = 0;
1662
1662
  for (e = f.length; e > n; ) {
1663
1663
  if (c[--e] < f[e]) {
1664
- for (i = e; i && c[--i] === 0; ) c[i] = $ - 1;
1665
- --c[i], c[e] += $;
1664
+ for (i = e; i && c[--i] === 0; ) c[i] = Q - 1;
1665
+ --c[i], c[e] += Q;
1666
1666
  }
1667
1667
  c[e] -= f[e];
1668
1668
  }
1669
1669
  for (; c[--o] === 0; ) c.pop();
1670
1670
  for (; c[0] === 0; c.shift()) --t;
1671
- return c[0] ? (r.d = c, r.e = Jt(c, t), _ ? P(r, a, l) : r) : new p(l === 3 ? -0 : 0);
1671
+ return c[0] ? (r.d = c, r.e = ie(c, t), E ? C(r, a, l) : r) : new p(l === 3 ? -0 : 0);
1672
1672
  };
1673
1673
  v.modulo = v.mod = function(r) {
1674
1674
  var s, t = this, e = t.constructor;
1675
- return r = new e(r), !t.d || !r.s || r.d && !r.d[0] ? new e(NaN) : !r.d || t.d && !t.d[0] ? P(new e(t), e.precision, e.rounding) : (_ = !1, e.modulo == 9 ? (s = k(t, r.abs(), 0, 3, 1), s.s *= r.s) : s = k(t, r, 0, e.modulo, 1), s = s.times(r), _ = !0, t.minus(s));
1675
+ return r = new e(r), !t.d || !r.s || r.d && !r.d[0] ? new e(NaN) : !r.d || t.d && !t.d[0] ? C(new e(t), e.precision, e.rounding) : (E = !1, e.modulo == 9 ? (s = V(t, r.abs(), 0, 3, 1), s.s *= r.s) : s = V(t, r, 0, e.modulo, 1), s = s.times(r), E = !0, t.minus(s));
1676
1676
  };
1677
1677
  v.naturalExponential = v.exp = function() {
1678
- return de(this);
1678
+ return pe(this);
1679
1679
  };
1680
1680
  v.naturalLogarithm = v.ln = function() {
1681
1681
  return at(this);
1682
1682
  };
1683
1683
  v.negated = v.neg = function() {
1684
1684
  var r = new this.constructor(this);
1685
- return r.s = -r.s, P(r);
1685
+ return r.s = -r.s, C(r);
1686
1686
  };
1687
1687
  v.plus = v.add = function(r) {
1688
1688
  var s, t, e, i, n, o, a, l, c, h, u = this, f = u.constructor;
@@ -1691,50 +1691,50 @@ v.plus = v.add = function(r) {
1691
1691
  if (u.s != r.s)
1692
1692
  return r.s = -r.s, u.minus(r);
1693
1693
  if (c = u.d, h = r.d, a = f.precision, l = f.rounding, !c[0] || !h[0])
1694
- return h[0] || (r = new f(u)), _ ? P(r, a, l) : r;
1694
+ return h[0] || (r = new f(u)), E ? C(r, a, l) : r;
1695
1695
  if (n = F(u.e / S), e = F(r.e / S), c = c.slice(), i = n - e, i) {
1696
1696
  for (i < 0 ? (t = c, i = -i, o = h.length) : (t = h, e = n, o = c.length), n = Math.ceil(a / S), o = n > o ? n + 1 : o + 1, i > o && (i = o, t.length = 1), t.reverse(); i--; ) t.push(0);
1697
1697
  t.reverse();
1698
1698
  }
1699
1699
  for (o = c.length, i = h.length, o - i < 0 && (i = o, t = h, h = c, c = t), s = 0; i; )
1700
- s = (c[--i] = c[i] + h[i] + s) / $ | 0, c[i] %= $;
1700
+ s = (c[--i] = c[i] + h[i] + s) / Q | 0, c[i] %= Q;
1701
1701
  for (s && (c.unshift(s), ++e), o = c.length; c[--o] == 0; ) c.pop();
1702
- return r.d = c, r.e = Jt(c, e), _ ? P(r, a, l) : r;
1702
+ return r.d = c, r.e = ie(c, e), E ? C(r, a, l) : r;
1703
1703
  };
1704
1704
  v.precision = v.sd = function(r) {
1705
1705
  var s, t = this;
1706
- if (r !== void 0 && r !== !!r && r !== 1 && r !== 0) throw Error(ct + r);
1707
- return t.d ? (s = He(t.d), r && t.e + 1 > s && (s = t.e + 1)) : s = NaN, s;
1706
+ if (r !== void 0 && r !== !!r && r !== 1 && r !== 0) throw Error(ht + r);
1707
+ return t.d ? (s = Be(t.d), r && t.e + 1 > s && (s = t.e + 1)) : s = NaN, s;
1708
1708
  };
1709
1709
  v.round = function() {
1710
1710
  var r = this, s = r.constructor;
1711
- return P(new s(r), r.e + 1, s.rounding);
1711
+ return C(new s(r), r.e + 1, s.rounding);
1712
1712
  };
1713
1713
  v.sine = v.sin = function() {
1714
1714
  var r, s, t = this, e = t.constructor;
1715
- return t.isFinite() ? t.isZero() ? new e(t) : (r = e.precision, s = e.rounding, e.precision = r + Math.max(t.e, t.sd()) + S, e.rounding = 1, t = ci(e, Xe(e, t)), e.precision = r, e.rounding = s, P(nt > 2 ? t.neg() : t, r, s, !0)) : new e(NaN);
1715
+ return t.isFinite() ? t.isZero() ? new e(t) : (r = e.precision, s = e.rounding, e.precision = r + Math.max(t.e, t.sd()) + S, e.rounding = 1, t = di(e, ze(e, t)), e.precision = r, e.rounding = s, C(nt > 2 ? t.neg() : t, r, s, !0)) : new e(NaN);
1716
1716
  };
1717
1717
  v.squareRoot = v.sqrt = function() {
1718
1718
  var r, s, t, e, i, n, o = this, a = o.d, l = o.e, c = o.s, h = o.constructor;
1719
1719
  if (c !== 1 || !a || !a[0])
1720
1720
  return new h(!c || c < 0 && (!a || a[0]) ? NaN : a ? o : 1 / 0);
1721
- for (_ = !1, c = Math.sqrt(+o), c == 0 || c == 1 / 0 ? (s = N(a), (s.length + l) % 2 == 0 && (s += "0"), c = Math.sqrt(s), l = F((l + 1) / 2) - (l < 0 || l % 2), c == 1 / 0 ? s = "5e" + l : (s = c.toExponential(), s = s.slice(0, s.indexOf("e") + 1) + l), e = new h(s)) : e = new h(c.toString()), t = (l = h.precision) + 3; ; )
1722
- if (n = e, e = n.plus(k(o, n, t + 2, 1)).times(0.5), N(n.d).slice(0, t) === (s = N(e.d)).slice(0, t))
1721
+ for (E = !1, c = Math.sqrt(+o), c == 0 || c == 1 / 0 ? (s = N(a), (s.length + l) % 2 == 0 && (s += "0"), c = Math.sqrt(s), l = F((l + 1) / 2) - (l < 0 || l % 2), c == 1 / 0 ? s = "5e" + l : (s = c.toExponential(), s = s.slice(0, s.indexOf("e") + 1) + l), e = new h(s)) : e = new h(c.toString()), t = (l = h.precision) + 3; ; )
1722
+ if (n = e, e = n.plus(V(o, n, t + 2, 1)).times(0.5), N(n.d).slice(0, t) === (s = N(e.d)).slice(0, t))
1723
1723
  if (s = s.slice(t - 3, t + 1), s == "9999" || !i && s == "4999") {
1724
- if (!i && (P(n, l + 1, 0), n.times(n).eq(o))) {
1724
+ if (!i && (C(n, l + 1, 0), n.times(n).eq(o))) {
1725
1725
  e = n;
1726
1726
  break;
1727
1727
  }
1728
1728
  t += 4, i = 1;
1729
1729
  } else {
1730
- (!+s || !+s.slice(1) && s.charAt(0) == "5") && (P(e, l + 1, 1), r = !e.times(e).eq(o));
1730
+ (!+s || !+s.slice(1) && s.charAt(0) == "5") && (C(e, l + 1, 1), r = !e.times(e).eq(o));
1731
1731
  break;
1732
1732
  }
1733
- return _ = !0, P(e, l, h.rounding, r);
1733
+ return E = !0, C(e, l, h.rounding, r);
1734
1734
  };
1735
1735
  v.tangent = v.tan = function() {
1736
1736
  var r, s, t = this, e = t.constructor;
1737
- return t.isFinite() ? t.isZero() ? new e(t) : (r = e.precision, s = e.rounding, e.precision = r + 10, e.rounding = 1, t = t.sin(), t.s = 1, t = k(t, new e(1).minus(t.times(t)).sqrt(), r + 10, 0), e.precision = r, e.rounding = s, P(nt == 2 || nt == 4 ? t.neg() : t, r, s, !0)) : new e(NaN);
1737
+ return t.isFinite() ? t.isZero() ? new e(t) : (r = e.precision, s = e.rounding, e.precision = r + 10, e.rounding = 1, t = t.sin(), t.s = 1, t = V(t, new e(1).minus(t.times(t)).sqrt(), r + 10, 0), e.precision = r, e.rounding = s, C(nt == 2 || nt == 4 ? t.neg() : t, r, s, !0)) : new e(NaN);
1738
1738
  };
1739
1739
  v.times = v.mul = function(r) {
1740
1740
  var s, t, e, i, n, o, a, l, c, h = this, u = h.constructor, f = h.d, m = (r = new u(r)).d;
@@ -1743,42 +1743,42 @@ v.times = v.mul = function(r) {
1743
1743
  for (t = F(h.e / S) + F(r.e / S), l = f.length, c = m.length, l < c && (n = f, f = m, m = n, o = l, l = c, c = o), n = [], o = l + c, e = o; e--; ) n.push(0);
1744
1744
  for (e = c; --e >= 0; ) {
1745
1745
  for (s = 0, i = l + e; i > e; )
1746
- a = n[i] + m[e] * f[i - e - 1] + s, n[i--] = a % $ | 0, s = a / $ | 0;
1747
- n[i] = (n[i] + s) % $ | 0;
1746
+ a = n[i] + m[e] * f[i - e - 1] + s, n[i--] = a % Q | 0, s = a / Q | 0;
1747
+ n[i] = (n[i] + s) % Q | 0;
1748
1748
  }
1749
1749
  for (; !n[--o]; ) n.pop();
1750
- return s ? ++t : n.shift(), r.d = n, r.e = Jt(n, t), _ ? P(r, u.precision, u.rounding) : r;
1750
+ return s ? ++t : n.shift(), r.d = n, r.e = ie(n, t), E ? C(r, u.precision, u.rounding) : r;
1751
1751
  };
1752
1752
  v.toBinary = function(r, s) {
1753
- return pe(this, 2, r, s);
1753
+ return ye(this, 2, r, s);
1754
1754
  };
1755
1755
  v.toDecimalPlaces = v.toDP = function(r, s) {
1756
1756
  var t = this, e = t.constructor;
1757
- return t = new e(t), r === void 0 ? t : (X(r, 0, ht), s === void 0 ? s = e.rounding : X(s, 0, 8), P(t, r + t.e + 1, s));
1757
+ return t = new e(t), r === void 0 ? t : (U(r, 0, ut), s === void 0 ? s = e.rounding : U(s, 0, 8), C(t, r + t.e + 1, s));
1758
1758
  };
1759
1759
  v.toExponential = function(r, s) {
1760
1760
  var t, e = this, i = e.constructor;
1761
- return r === void 0 ? t = K(e, !0) : (X(r, 0, ht), s === void 0 ? s = i.rounding : X(s, 0, 8), e = P(new i(e), r + 1, s), t = K(e, !0, r + 1)), e.isNeg() && !e.isZero() ? "-" + t : t;
1761
+ return r === void 0 ? t = et(e, !0) : (U(r, 0, ut), s === void 0 ? s = i.rounding : U(s, 0, 8), e = C(new i(e), r + 1, s), t = et(e, !0, r + 1)), e.isNeg() && !e.isZero() ? "-" + t : t;
1762
1762
  };
1763
1763
  v.toFixed = function(r, s) {
1764
1764
  var t, e, i = this, n = i.constructor;
1765
- return r === void 0 ? t = K(i) : (X(r, 0, ht), s === void 0 ? s = n.rounding : X(s, 0, 8), e = P(new n(i), r + i.e + 1, s), t = K(e, !1, r + e.e + 1)), i.isNeg() && !i.isZero() ? "-" + t : t;
1765
+ return r === void 0 ? t = et(i) : (U(r, 0, ut), s === void 0 ? s = n.rounding : U(s, 0, 8), e = C(new n(i), r + i.e + 1, s), t = et(e, !1, r + e.e + 1)), i.isNeg() && !i.isZero() ? "-" + t : t;
1766
1766
  };
1767
1767
  v.toFraction = function(r) {
1768
1768
  var s, t, e, i, n, o, a, l, c, h, u, f, m = this, p = m.d, g = m.constructor;
1769
1769
  if (!p) return new g(m);
1770
- if (c = t = new g(1), e = l = new g(0), s = new g(e), n = s.e = He(p) - m.e - 1, o = n % S, s.d[0] = L(10, o < 0 ? S + o : o), r == null)
1770
+ if (c = t = new g(1), e = l = new g(0), s = new g(e), n = s.e = Be(p) - m.e - 1, o = n % S, s.d[0] = I(10, o < 0 ? S + o : o), r == null)
1771
1771
  r = n > 0 ? s : c;
1772
1772
  else {
1773
- if (a = new g(r), !a.isInt() || a.lt(c)) throw Error(ct + a);
1773
+ if (a = new g(r), !a.isInt() || a.lt(c)) throw Error(ht + a);
1774
1774
  r = a.gt(s) ? n > 0 ? s : c : a;
1775
1775
  }
1776
- for (_ = !1, a = new g(N(p)), h = g.precision, g.precision = n = p.length * S * 2; u = k(a, s, 0, 1, 1), i = t.plus(u.times(e)), i.cmp(r) != 1; )
1776
+ for (E = !1, a = new g(N(p)), h = g.precision, g.precision = n = p.length * S * 2; u = V(a, s, 0, 1, 1), i = t.plus(u.times(e)), i.cmp(r) != 1; )
1777
1777
  t = e, e = i, i = c, c = l.plus(u.times(i)), l = i, i = s, s = a.minus(u.times(i)), a = i;
1778
- return i = k(r.minus(t), e, 0, 1, 1), l = l.plus(i.times(c)), t = t.plus(i.times(e)), l.s = c.s = m.s, f = k(c, e, n, 1).minus(m).abs().cmp(k(l, t, n, 1).minus(m).abs()) < 1 ? [c, e] : [l, t], g.precision = h, _ = !0, f;
1778
+ return i = V(r.minus(t), e, 0, 1, 1), l = l.plus(i.times(c)), t = t.plus(i.times(e)), l.s = c.s = m.s, f = V(c, e, n, 1).minus(m).abs().cmp(V(l, t, n, 1).minus(m).abs()) < 1 ? [c, e] : [l, t], g.precision = h, E = !0, f;
1779
1779
  };
1780
1780
  v.toHexadecimal = v.toHex = function(r, s) {
1781
- return pe(this, 16, r, s);
1781
+ return ye(this, 16, r, s);
1782
1782
  };
1783
1783
  v.toNearest = function(r, s) {
1784
1784
  var t = this, e = t.constructor;
@@ -1786,49 +1786,49 @@ v.toNearest = function(r, s) {
1786
1786
  if (!t.d) return t;
1787
1787
  r = new e(1), s = e.rounding;
1788
1788
  } else {
1789
- if (r = new e(r), s === void 0 ? s = e.rounding : X(s, 0, 8), !t.d) return r.s ? t : r;
1789
+ if (r = new e(r), s === void 0 ? s = e.rounding : U(s, 0, 8), !t.d) return r.s ? t : r;
1790
1790
  if (!r.d)
1791
1791
  return r.s && (r.s = t.s), r;
1792
1792
  }
1793
- return r.d[0] ? (_ = !1, t = k(t, r, 0, s, 1).times(r), _ = !0, P(t)) : (r.s = t.s, t = r), t;
1793
+ return r.d[0] ? (E = !1, t = V(t, r, 0, s, 1).times(r), E = !0, C(t)) : (r.s = t.s, t = r), t;
1794
1794
  };
1795
1795
  v.toNumber = function() {
1796
1796
  return +this;
1797
1797
  };
1798
1798
  v.toOctal = function(r, s) {
1799
- return pe(this, 8, r, s);
1799
+ return ye(this, 8, r, s);
1800
1800
  };
1801
1801
  v.toPower = v.pow = function(r) {
1802
1802
  var s, t, e, i, n, o, a = this, l = a.constructor, c = +(r = new l(r));
1803
- if (!a.d || !r.d || !a.d[0] || !r.d[0]) return new l(L(+a, c));
1803
+ if (!a.d || !r.d || !a.d[0] || !r.d[0]) return new l(I(+a, c));
1804
1804
  if (a = new l(a), a.eq(1)) return a;
1805
- if (e = l.precision, n = l.rounding, r.eq(1)) return P(a, e, n);
1806
- if (s = F(r.e / S), s >= r.d.length - 1 && (t = c < 0 ? -c : c) <= ri)
1807
- return i = Fe(l, a, t, e), r.s < 0 ? new l(1).div(i) : P(i, e, n);
1805
+ if (e = l.precision, n = l.rounding, r.eq(1)) return C(a, e, n);
1806
+ if (s = F(r.e / S), s >= r.d.length - 1 && (t = c < 0 ? -c : c) <= li)
1807
+ return i = Ge(l, a, t, e), r.s < 0 ? new l(1).div(i) : C(i, e, n);
1808
1808
  if (o = a.s, o < 0) {
1809
1809
  if (s < r.d.length - 1) return new l(NaN);
1810
1810
  if (r.d[s] & 1 || (o = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1)
1811
1811
  return a.s = o, a;
1812
1812
  }
1813
- return t = L(+a, c), s = t == 0 || !isFinite(t) ? F(c * (Math.log("0." + N(a.d)) / Math.LN10 + a.e + 1)) : new l(t + "").e, s > l.maxE + 1 || s < l.minE - 1 ? new l(s > 0 ? o / 0 : 0) : (_ = !1, l.rounding = a.s = 1, t = Math.min(12, (s + "").length), i = de(r.times(at(a, e + t)), e), i.d && (i = P(i, e + 5, 1), kt(i.d, e, n) && (s = e + 10, i = P(de(r.times(at(a, s + t)), s), s + 5, 1), +N(i.d).slice(e + 1, e + 15) + 1 == 1e14 && (i = P(i, e + 1, 0)))), i.s = o, _ = !0, l.rounding = n, P(i, e, n));
1813
+ return t = I(+a, c), s = t == 0 || !isFinite(t) ? F(c * (Math.log("0." + N(a.d)) / Math.LN10 + a.e + 1)) : new l(t + "").e, s > l.maxE + 1 || s < l.minE - 1 ? new l(s > 0 ? o / 0 : 0) : (E = !1, l.rounding = a.s = 1, t = Math.min(12, (s + "").length), i = pe(r.times(at(a, e + t)), e), i.d && (i = C(i, e + 5, 1), kt(i.d, e, n) && (s = e + 10, i = C(pe(r.times(at(a, s + t)), s), s + 5, 1), +N(i.d).slice(e + 1, e + 15) + 1 == 1e14 && (i = C(i, e + 1, 0)))), i.s = o, E = !0, l.rounding = n, C(i, e, n));
1814
1814
  };
1815
1815
  v.toPrecision = function(r, s) {
1816
1816
  var t, e = this, i = e.constructor;
1817
- return r === void 0 ? t = K(e, e.e <= i.toExpNeg || e.e >= i.toExpPos) : (X(r, 1, ht), s === void 0 ? s = i.rounding : X(s, 0, 8), e = P(new i(e), r, s), t = K(e, r <= e.e || e.e <= i.toExpNeg, r)), e.isNeg() && !e.isZero() ? "-" + t : t;
1817
+ return r === void 0 ? t = et(e, e.e <= i.toExpNeg || e.e >= i.toExpPos) : (U(r, 1, ut), s === void 0 ? s = i.rounding : U(s, 0, 8), e = C(new i(e), r, s), t = et(e, r <= e.e || e.e <= i.toExpNeg, r)), e.isNeg() && !e.isZero() ? "-" + t : t;
1818
1818
  };
1819
1819
  v.toSignificantDigits = v.toSD = function(r, s) {
1820
1820
  var t = this, e = t.constructor;
1821
- return r === void 0 ? (r = e.precision, s = e.rounding) : (X(r, 1, ht), s === void 0 ? s = e.rounding : X(s, 0, 8)), P(new e(t), r, s);
1821
+ return r === void 0 ? (r = e.precision, s = e.rounding) : (U(r, 1, ut), s === void 0 ? s = e.rounding : U(s, 0, 8)), C(new e(t), r, s);
1822
1822
  };
1823
1823
  v.toString = function() {
1824
- var r = this, s = r.constructor, t = K(r, r.e <= s.toExpNeg || r.e >= s.toExpPos);
1824
+ var r = this, s = r.constructor, t = et(r, r.e <= s.toExpNeg || r.e >= s.toExpPos);
1825
1825
  return r.isNeg() && !r.isZero() ? "-" + t : t;
1826
1826
  };
1827
1827
  v.truncated = v.trunc = function() {
1828
- return P(new this.constructor(this), this.e + 1, 1);
1828
+ return C(new this.constructor(this), this.e + 1, 1);
1829
1829
  };
1830
1830
  v.valueOf = v.toJSON = function() {
1831
- var r = this, s = r.constructor, t = K(r, r.e <= s.toExpNeg || r.e >= s.toExpPos);
1831
+ var r = this, s = r.constructor, t = et(r, r.e <= s.toExpNeg || r.e >= s.toExpPos);
1832
1832
  return r.isNeg() ? "-" + t : t;
1833
1833
  };
1834
1834
  function N(r) {
@@ -1842,34 +1842,34 @@ function N(r) {
1842
1842
  for (; o % 10 === 0; ) o /= 10;
1843
1843
  return n + o;
1844
1844
  }
1845
- function X(r, s, t) {
1845
+ function U(r, s, t) {
1846
1846
  if (r !== ~~r || r < s || r > t)
1847
- throw Error(ct + r);
1847
+ throw Error(ht + r);
1848
1848
  }
1849
1849
  function kt(r, s, t, e) {
1850
1850
  var i, n, o, a;
1851
1851
  for (n = r[0]; n >= 10; n /= 10) --s;
1852
- return --s < 0 ? (s += S, i = 0) : (i = Math.ceil((s + 1) / S), s %= S), n = L(10, S - s), a = r[i] % n | 0, e == null ? s < 3 ? (s == 0 ? a = a / 100 | 0 : s == 1 && (a = a / 10 | 0), o = t < 4 && a == 99999 || t > 3 && a == 49999 || a == 5e4 || a == 0) : o = (t < 4 && a + 1 == n || t > 3 && a + 1 == n / 2) && (r[i + 1] / n / 100 | 0) == L(10, s - 2) - 1 || (a == n / 2 || a == 0) && (r[i + 1] / n / 100 | 0) == 0 : s < 4 ? (s == 0 ? a = a / 1e3 | 0 : s == 1 ? a = a / 100 | 0 : s == 2 && (a = a / 10 | 0), o = (e || t < 4) && a == 9999 || !e && t > 3 && a == 4999) : o = ((e || t < 4) && a + 1 == n || !e && t > 3 && a + 1 == n / 2) && (r[i + 1] / n / 1e3 | 0) == L(10, s - 3) - 1, o;
1852
+ return --s < 0 ? (s += S, i = 0) : (i = Math.ceil((s + 1) / S), s %= S), n = I(10, S - s), a = r[i] % n | 0, e == null ? s < 3 ? (s == 0 ? a = a / 100 | 0 : s == 1 && (a = a / 10 | 0), o = t < 4 && a == 99999 || t > 3 && a == 49999 || a == 5e4 || a == 0) : o = (t < 4 && a + 1 == n || t > 3 && a + 1 == n / 2) && (r[i + 1] / n / 100 | 0) == I(10, s - 2) - 1 || (a == n / 2 || a == 0) && (r[i + 1] / n / 100 | 0) == 0 : s < 4 ? (s == 0 ? a = a / 1e3 | 0 : s == 1 ? a = a / 100 | 0 : s == 2 && (a = a / 10 | 0), o = (e || t < 4) && a == 9999 || !e && t > 3 && a == 4999) : o = ((e || t < 4) && a + 1 == n || !e && t > 3 && a + 1 == n / 2) && (r[i + 1] / n / 1e3 | 0) == I(10, s - 3) - 1, o;
1853
1853
  }
1854
- function Ht(r, s, t) {
1854
+ function Ft(r, s, t) {
1855
1855
  for (var e, i = [0], n, o = 0, a = r.length; o < a; ) {
1856
1856
  for (n = i.length; n--; ) i[n] *= s;
1857
- for (i[0] += ce.indexOf(r.charAt(o++)), e = 0; e < i.length; e++)
1857
+ for (i[0] += fe.indexOf(r.charAt(o++)), e = 0; e < i.length; e++)
1858
1858
  i[e] > t - 1 && (i[e + 1] === void 0 && (i[e + 1] = 0), i[e + 1] += i[e] / t | 0, i[e] %= t);
1859
1859
  }
1860
1860
  return i.reverse();
1861
1861
  }
1862
- function ai(r, s) {
1862
+ function hi(r, s) {
1863
1863
  var t, e, i;
1864
1864
  if (s.isZero()) return s;
1865
- e = s.d.length, e < 32 ? (t = Math.ceil(e / 3), i = (1 / Kt(4, t)).toString()) : (t = 16, i = "2.3283064365386962890625e-10"), r.precision += t, s = Mt(r, 1, s.times(i), new r(1));
1865
+ e = s.d.length, e < 32 ? (t = Math.ceil(e / 3), i = (1 / se(4, t)).toString()) : (t = 16, i = "2.3283064365386962890625e-10"), r.precision += t, s = Mt(r, 1, s.times(i), new r(1));
1866
1866
  for (var n = t; n--; ) {
1867
1867
  var o = s.times(s);
1868
1868
  s = o.times(o).minus(o).times(8).plus(1);
1869
1869
  }
1870
1870
  return r.precision -= t, s;
1871
1871
  }
1872
- var k = /* @__PURE__ */ function() {
1872
+ var V = /* @__PURE__ */ function() {
1873
1873
  function r(e, i, n) {
1874
1874
  var o, a = 0, l = e.length;
1875
1875
  for (e = e.slice(); l--; )
@@ -1894,49 +1894,49 @@ var k = /* @__PURE__ */ function() {
1894
1894
  for (; !e[0] && e.length > 1; ) e.shift();
1895
1895
  }
1896
1896
  return function(e, i, n, o, a, l) {
1897
- var c, h, u, f, m, p, g, y, w, b, C, E, A, G, Ot, ut, rt, vt, z, At, Tt = e.constructor, ee = e.s == i.s ? 1 : -1, H = e.d, V = i.d;
1898
- if (!H || !H[0] || !V || !V[0])
1897
+ var c, h, u, f, m, p, g, y, w, P, b, _, A, X, At, dt, rt, vt, z, Lt, Tt = e.constructor, ne = e.s == i.s ? 1 : -1, H = e.d, O = i.d;
1898
+ if (!H || !H[0] || !O || !O[0])
1899
1899
  return new Tt(
1900
1900
  // Return NaN if either NaN, or both Infinity or 0.
1901
- !e.s || !i.s || (H ? V && H[0] == V[0] : !V) ? NaN : (
1901
+ !e.s || !i.s || (H ? O && H[0] == O[0] : !O) ? NaN : (
1902
1902
  // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
1903
- H && H[0] == 0 || !V ? ee * 0 : ee / 0
1903
+ H && H[0] == 0 || !O ? ne * 0 : ne / 0
1904
1904
  )
1905
1905
  );
1906
- for (l ? (m = 1, h = e.e - i.e) : (l = $, m = S, h = F(e.e / m) - F(i.e / m)), z = V.length, rt = H.length, w = new Tt(ee), b = w.d = [], u = 0; V[u] == (H[u] || 0); u++) ;
1907
- if (V[u] > (H[u] || 0) && h--, n == null ? (G = n = Tt.precision, o = Tt.rounding) : a ? G = n + (e.e - i.e) + 1 : G = n, G < 0)
1908
- b.push(1), p = !0;
1906
+ for (l ? (m = 1, h = e.e - i.e) : (l = Q, m = S, h = F(e.e / m) - F(i.e / m)), z = O.length, rt = H.length, w = new Tt(ne), P = w.d = [], u = 0; O[u] == (H[u] || 0); u++) ;
1907
+ if (O[u] > (H[u] || 0) && h--, n == null ? (X = n = Tt.precision, o = Tt.rounding) : a ? X = n + (e.e - i.e) + 1 : X = n, X < 0)
1908
+ P.push(1), p = !0;
1909
1909
  else {
1910
- if (G = G / m + 2 | 0, u = 0, z == 1) {
1911
- for (f = 0, V = V[0], G++; (u < rt || f) && G--; u++)
1912
- Ot = f * l + (H[u] || 0), b[u] = Ot / V | 0, f = Ot % V | 0;
1910
+ if (X = X / m + 2 | 0, u = 0, z == 1) {
1911
+ for (f = 0, O = O[0], X++; (u < rt || f) && X--; u++)
1912
+ At = f * l + (H[u] || 0), P[u] = At / O | 0, f = At % O | 0;
1913
1913
  p = f || u < rt;
1914
1914
  } else {
1915
- for (f = l / (V[0] + 1) | 0, f > 1 && (V = r(V, f, l), H = r(H, f, l), z = V.length, rt = H.length), ut = z, C = H.slice(0, z), E = C.length; E < z; ) C[E++] = 0;
1916
- At = V.slice(), At.unshift(0), vt = V[0], V[1] >= l / 2 && ++vt;
1915
+ for (f = l / (O[0] + 1) | 0, f > 1 && (O = r(O, f, l), H = r(H, f, l), z = O.length, rt = H.length), dt = z, b = H.slice(0, z), _ = b.length; _ < z; ) b[_++] = 0;
1916
+ Lt = O.slice(), Lt.unshift(0), vt = O[0], O[1] >= l / 2 && ++vt;
1917
1917
  do
1918
- f = 0, c = s(V, C, z, E), c < 0 ? (A = C[0], z != E && (A = A * l + (C[1] || 0)), f = A / vt | 0, f > 1 ? (f >= l && (f = l - 1), g = r(V, f, l), y = g.length, E = C.length, c = s(g, C, y, E), c == 1 && (f--, t(g, z < y ? At : V, y, l))) : (f == 0 && (c = f = 1), g = V.slice()), y = g.length, y < E && g.unshift(0), t(C, g, E, l), c == -1 && (E = C.length, c = s(V, C, z, E), c < 1 && (f++, t(C, z < E ? At : V, E, l))), E = C.length) : c === 0 && (f++, C = [0]), b[u++] = f, c && C[0] ? C[E++] = H[ut] || 0 : (C = [H[ut]], E = 1);
1919
- while ((ut++ < rt || C[0] !== void 0) && G--);
1920
- p = C[0] !== void 0;
1918
+ f = 0, c = s(O, b, z, _), c < 0 ? (A = b[0], z != _ && (A = A * l + (b[1] || 0)), f = A / vt | 0, f > 1 ? (f >= l && (f = l - 1), g = r(O, f, l), y = g.length, _ = b.length, c = s(g, b, y, _), c == 1 && (f--, t(g, z < y ? Lt : O, y, l))) : (f == 0 && (c = f = 1), g = O.slice()), y = g.length, y < _ && g.unshift(0), t(b, g, _, l), c == -1 && (_ = b.length, c = s(O, b, z, _), c < 1 && (f++, t(b, z < _ ? Lt : O, _, l))), _ = b.length) : c === 0 && (f++, b = [0]), P[u++] = f, c && b[0] ? b[_++] = H[dt] || 0 : (b = [H[dt]], _ = 1);
1919
+ while ((dt++ < rt || b[0] !== void 0) && X--);
1920
+ p = b[0] !== void 0;
1921
1921
  }
1922
- b[0] || b.shift();
1922
+ P[0] || P.shift();
1923
1923
  }
1924
1924
  if (m == 1)
1925
- w.e = h, Ae = p;
1925
+ w.e = h, Te = p;
1926
1926
  else {
1927
- for (u = 1, f = b[0]; f >= 10; f /= 10) u++;
1928
- w.e = u + h * m - 1, P(w, a ? n + w.e + 1 : n, o, p);
1927
+ for (u = 1, f = P[0]; f >= 10; f /= 10) u++;
1928
+ w.e = u + h * m - 1, C(w, a ? n + w.e + 1 : n, o, p);
1929
1929
  }
1930
1930
  return w;
1931
1931
  };
1932
1932
  }();
1933
- function P(r, s, t, e) {
1933
+ function C(r, s, t, e) {
1934
1934
  var i, n, o, a, l, c, h, u, f, m = r.constructor;
1935
1935
  t: if (s != null) {
1936
1936
  if (u = r.d, !u) return r;
1937
1937
  for (i = 1, a = u[0]; a >= 10; a /= 10) i++;
1938
1938
  if (n = s - i, n < 0)
1939
- n += S, o = s, h = u[f = 0], l = h / L(10, i - o - 1) % 10 | 0;
1939
+ n += S, o = s, h = u[f = 0], l = h / I(10, i - o - 1) % 10 | 0;
1940
1940
  else if (f = Math.ceil((n + 1) / S), a = u.length, f >= a)
1941
1941
  if (e) {
1942
1942
  for (; a++ <= f; ) u.push(0);
@@ -1945,46 +1945,46 @@ function P(r, s, t, e) {
1945
1945
  break t;
1946
1946
  else {
1947
1947
  for (h = a = u[f], i = 1; a >= 10; a /= 10) i++;
1948
- n %= S, o = n - S + i, l = o < 0 ? 0 : h / L(10, i - o - 1) % 10 | 0;
1948
+ n %= S, o = n - S + i, l = o < 0 ? 0 : h / I(10, i - o - 1) % 10 | 0;
1949
1949
  }
1950
- if (e = e || s < 0 || u[f + 1] !== void 0 || (o < 0 ? h : h % L(10, i - o - 1)), c = t < 4 ? (l || e) && (t == 0 || t == (r.s < 0 ? 3 : 2)) : l > 5 || l == 5 && (t == 4 || e || t == 6 && // Check whether the digit to the left of the rounding digit is odd.
1951
- (n > 0 ? o > 0 ? h / L(10, i - o) : 0 : u[f - 1]) % 10 & 1 || t == (r.s < 0 ? 8 : 7)), s < 1 || !u[0])
1952
- return u.length = 0, c ? (s -= r.e + 1, u[0] = L(10, (S - s % S) % S), r.e = -s || 0) : u[0] = r.e = 0, r;
1953
- if (n == 0 ? (u.length = f, a = 1, f--) : (u.length = f + 1, a = L(10, S - n), u[f] = o > 0 ? (h / L(10, i - o) % L(10, o) | 0) * a : 0), c)
1950
+ if (e = e || s < 0 || u[f + 1] !== void 0 || (o < 0 ? h : h % I(10, i - o - 1)), c = t < 4 ? (l || e) && (t == 0 || t == (r.s < 0 ? 3 : 2)) : l > 5 || l == 5 && (t == 4 || e || t == 6 && // Check whether the digit to the left of the rounding digit is odd.
1951
+ (n > 0 ? o > 0 ? h / I(10, i - o) : 0 : u[f - 1]) % 10 & 1 || t == (r.s < 0 ? 8 : 7)), s < 1 || !u[0])
1952
+ return u.length = 0, c ? (s -= r.e + 1, u[0] = I(10, (S - s % S) % S), r.e = -s || 0) : u[0] = r.e = 0, r;
1953
+ if (n == 0 ? (u.length = f, a = 1, f--) : (u.length = f + 1, a = I(10, S - n), u[f] = o > 0 ? (h / I(10, i - o) % I(10, o) | 0) * a : 0), c)
1954
1954
  for (; ; )
1955
1955
  if (f == 0) {
1956
1956
  for (n = 1, o = u[0]; o >= 10; o /= 10) n++;
1957
1957
  for (o = u[0] += a, a = 1; o >= 10; o /= 10) a++;
1958
- n != a && (r.e++, u[0] == $ && (u[0] = 1));
1958
+ n != a && (r.e++, u[0] == Q && (u[0] = 1));
1959
1959
  break;
1960
1960
  } else {
1961
- if (u[f] += a, u[f] != $) break;
1961
+ if (u[f] += a, u[f] != Q) break;
1962
1962
  u[f--] = 0, a = 1;
1963
1963
  }
1964
1964
  for (n = u.length; u[--n] === 0; ) u.pop();
1965
1965
  }
1966
- return _ && (r.e > m.maxE ? (r.d = null, r.e = NaN) : r.e < m.minE && (r.e = 0, r.d = [0])), r;
1966
+ return E && (r.e > m.maxE ? (r.d = null, r.e = NaN) : r.e < m.minE && (r.e = 0, r.d = [0])), r;
1967
1967
  }
1968
- function K(r, s, t) {
1969
- if (!r.isFinite()) return Ue(r);
1968
+ function et(r, s, t) {
1969
+ if (!r.isFinite()) return Xe(r);
1970
1970
  var e, i = r.e, n = N(r.d), o = n.length;
1971
1971
  return s ? (t && (e = t - o) > 0 ? n = n.charAt(0) + "." + n.slice(1) + ot(e) : o > 1 && (n = n.charAt(0) + "." + n.slice(1)), n = n + (r.e < 0 ? "e" : "e+") + r.e) : i < 0 ? (n = "0." + ot(-i - 1) + n, t && (e = t - o) > 0 && (n += ot(e))) : i >= o ? (n += ot(i + 1 - o), t && (e = t - i - 1) > 0 && (n = n + "." + ot(e))) : ((e = i + 1) < o && (n = n.slice(0, e) + "." + n.slice(e)), t && (e = t - o) > 0 && (i + 1 === o && (n += "."), n += ot(e))), n;
1972
1972
  }
1973
- function Jt(r, s) {
1973
+ function ie(r, s) {
1974
1974
  var t = r[0];
1975
1975
  for (s *= S; t >= 10; t /= 10) s++;
1976
1976
  return s;
1977
1977
  }
1978
- function qt(r, s, t) {
1979
- if (s > oi)
1980
- throw _ = !0, t && (r.precision = t), Error(Te);
1981
- return P(new r(Wt), s, 1, !0);
1978
+ function Qt(r, s, t) {
1979
+ if (s > ci)
1980
+ throw E = !0, t && (r.precision = t), Error(Ie);
1981
+ return C(new r($t), s, 1, !0);
1982
1982
  }
1983
- function J(r, s, t) {
1984
- if (s > ue) throw Error(Te);
1985
- return P(new r(jt), s, t, !0);
1983
+ function tt(r, s, t) {
1984
+ if (s > ge) throw Error(Ie);
1985
+ return C(new r(Zt), s, t, !0);
1986
1986
  }
1987
- function He(r) {
1987
+ function Be(r) {
1988
1988
  var s = r.length - 1, t = s * S + 1;
1989
1989
  if (s = r[s], s) {
1990
1990
  for (; s % 10 == 0; s /= 10) t--;
@@ -1996,21 +1996,21 @@ function ot(r) {
1996
1996
  for (var s = ""; r--; ) s += "0";
1997
1997
  return s;
1998
1998
  }
1999
- function Fe(r, s, t, e) {
1999
+ function Ge(r, s, t, e) {
2000
2000
  var i, n = new r(1), o = Math.ceil(e / S + 4);
2001
- for (_ = !1; ; ) {
2002
- if (t % 2 && (n = n.times(s), Ce(n.d, o) && (i = !0)), t = F(t / 2), t === 0) {
2001
+ for (E = !1; ; ) {
2002
+ if (t % 2 && (n = n.times(s), Ee(n.d, o) && (i = !0)), t = F(t / 2), t === 0) {
2003
2003
  t = n.d.length - 1, i && n.d[t] === 0 && ++n.d[t];
2004
2004
  break;
2005
2005
  }
2006
- s = s.times(s), Ce(s.d, o);
2006
+ s = s.times(s), Ee(s.d, o);
2007
2007
  }
2008
- return _ = !0, n;
2008
+ return E = !0, n;
2009
2009
  }
2010
- function be(r) {
2010
+ function Se(r) {
2011
2011
  return r.d[r.d.length - 1] & 1;
2012
2012
  }
2013
- function Be(r, s, t) {
2013
+ function Ue(r, s, t) {
2014
2014
  for (var e, i, n = new r(s[0]), o = 0; ++o < s.length; ) {
2015
2015
  if (i = new r(s[o]), !i.s) {
2016
2016
  n = i;
@@ -2020,20 +2020,20 @@ function Be(r, s, t) {
2020
2020
  }
2021
2021
  return n;
2022
2022
  }
2023
- function de(r, s) {
2023
+ function pe(r, s) {
2024
2024
  var t, e, i, n, o, a, l, c = 0, h = 0, u = 0, f = r.constructor, m = f.rounding, p = f.precision;
2025
2025
  if (!r.d || !r.d[0] || r.e > 17)
2026
2026
  return new f(r.d ? r.d[0] ? r.s < 0 ? 0 : 1 / 0 : 1 : r.s ? r.s < 0 ? 0 : r : NaN);
2027
- for (s == null ? (_ = !1, l = p) : l = s, a = new f(0.03125); r.e > -2; )
2027
+ for (s == null ? (E = !1, l = p) : l = s, a = new f(0.03125); r.e > -2; )
2028
2028
  r = r.times(a), u += 5;
2029
- for (e = Math.log(L(2, u)) / Math.LN10 * 2 + 5 | 0, l += e, t = n = o = new f(1), f.precision = l; ; ) {
2030
- if (n = P(n.times(r), l, 1), t = t.times(++h), a = o.plus(k(n, t, l, 1)), N(a.d).slice(0, l) === N(o.d).slice(0, l)) {
2031
- for (i = u; i--; ) o = P(o.times(o), l, 1);
2029
+ for (e = Math.log(I(2, u)) / Math.LN10 * 2 + 5 | 0, l += e, t = n = o = new f(1), f.precision = l; ; ) {
2030
+ if (n = C(n.times(r), l, 1), t = t.times(++h), a = o.plus(V(n, t, l, 1)), N(a.d).slice(0, l) === N(o.d).slice(0, l)) {
2031
+ for (i = u; i--; ) o = C(o.times(o), l, 1);
2032
2032
  if (s == null)
2033
2033
  if (c < 3 && kt(o.d, l - e, m, c))
2034
2034
  f.precision = l += 10, t = n = a = new f(1), h = 0, c++;
2035
2035
  else
2036
- return P(o, f.precision = p, m, _ = !0);
2036
+ return C(o, f.precision = p, m, E = !0);
2037
2037
  else
2038
2038
  return f.precision = p, o;
2039
2039
  }
@@ -2041,31 +2041,31 @@ function de(r, s) {
2041
2041
  }
2042
2042
  }
2043
2043
  function at(r, s) {
2044
- var t, e, i, n, o, a, l, c, h, u, f, m = 1, p = 10, g = r, y = g.d, w = g.constructor, b = w.rounding, C = w.precision;
2044
+ var t, e, i, n, o, a, l, c, h, u, f, m = 1, p = 10, g = r, y = g.d, w = g.constructor, P = w.rounding, b = w.precision;
2045
2045
  if (g.s < 0 || !y || !y[0] || !g.e && y[0] == 1 && y.length == 1)
2046
2046
  return new w(y && !y[0] ? -1 / 0 : g.s != 1 ? NaN : y ? 0 : g);
2047
- if (s == null ? (_ = !1, h = C) : h = s, w.precision = h += p, t = N(y), e = t.charAt(0), Math.abs(n = g.e) < 15e14) {
2047
+ if (s == null ? (E = !1, h = b) : h = s, w.precision = h += p, t = N(y), e = t.charAt(0), Math.abs(n = g.e) < 15e14) {
2048
2048
  for (; e < 7 && e != 1 || e == 1 && t.charAt(1) > 3; )
2049
2049
  g = g.times(r), t = N(g.d), e = t.charAt(0), m++;
2050
2050
  n = g.e, e > 1 ? (g = new w("0." + t), n++) : g = new w(e + "." + t.slice(1));
2051
2051
  } else
2052
- return c = qt(w, h + 2, C).times(n + ""), g = at(new w(e + "." + t.slice(1)), h - p).plus(c), w.precision = C, s == null ? P(g, C, b, _ = !0) : g;
2053
- for (u = g, l = o = g = k(g.minus(1), g.plus(1), h, 1), f = P(g.times(g), h, 1), i = 3; ; ) {
2054
- if (o = P(o.times(f), h, 1), c = l.plus(k(o, new w(i), h, 1)), N(c.d).slice(0, h) === N(l.d).slice(0, h))
2055
- if (l = l.times(2), n !== 0 && (l = l.plus(qt(w, h + 2, C).times(n + ""))), l = k(l, new w(m), h, 1), s == null)
2056
- if (kt(l.d, h - p, b, a))
2057
- w.precision = h += p, c = o = g = k(u.minus(1), u.plus(1), h, 1), f = P(g.times(g), h, 1), i = a = 1;
2052
+ return c = Qt(w, h + 2, b).times(n + ""), g = at(new w(e + "." + t.slice(1)), h - p).plus(c), w.precision = b, s == null ? C(g, b, P, E = !0) : g;
2053
+ for (u = g, l = o = g = V(g.minus(1), g.plus(1), h, 1), f = C(g.times(g), h, 1), i = 3; ; ) {
2054
+ if (o = C(o.times(f), h, 1), c = l.plus(V(o, new w(i), h, 1)), N(c.d).slice(0, h) === N(l.d).slice(0, h))
2055
+ if (l = l.times(2), n !== 0 && (l = l.plus(Qt(w, h + 2, b).times(n + ""))), l = V(l, new w(m), h, 1), s == null)
2056
+ if (kt(l.d, h - p, P, a))
2057
+ w.precision = h += p, c = o = g = V(u.minus(1), u.plus(1), h, 1), f = C(g.times(g), h, 1), i = a = 1;
2058
2058
  else
2059
- return P(l, w.precision = C, b, _ = !0);
2059
+ return C(l, w.precision = b, P, E = !0);
2060
2060
  else
2061
- return w.precision = C, l;
2061
+ return w.precision = b, l;
2062
2062
  l = c, i += 2;
2063
2063
  }
2064
2064
  }
2065
- function Ue(r) {
2065
+ function Xe(r) {
2066
2066
  return String(r.s * r.s / 0);
2067
2067
  }
2068
- function Ft(r, s) {
2068
+ function Bt(r, s) {
2069
2069
  var t, e, i;
2070
2070
  for ((t = s.indexOf(".")) > -1 && (s = s.replace(".", "")), (e = s.search(/e/i)) > 0 ? (t < 0 && (t = e), t += +s.slice(e + 1), s = s.substring(0, e)) : t < 0 && (t = s.length), e = 0; s.charCodeAt(e) === 48; e++) ;
2071
2071
  for (i = s.length; s.charCodeAt(i - 1) === 48; --i) ;
@@ -2076,85 +2076,85 @@ function Ft(r, s) {
2076
2076
  } else
2077
2077
  e -= i;
2078
2078
  for (; e--; ) s += "0";
2079
- r.d.push(+s), _ && (r.e > r.constructor.maxE ? (r.d = null, r.e = NaN) : r.e < r.constructor.minE && (r.e = 0, r.d = [0]));
2079
+ r.d.push(+s), E && (r.e > r.constructor.maxE ? (r.d = null, r.e = NaN) : r.e < r.constructor.minE && (r.e = 0, r.d = [0]));
2080
2080
  } else
2081
2081
  r.e = 0, r.d = [0];
2082
2082
  return r;
2083
2083
  }
2084
- function li(r, s) {
2084
+ function ui(r, s) {
2085
2085
  var t, e, i, n, o, a, l, c, h;
2086
2086
  if (s.indexOf("_") > -1) {
2087
- if (s = s.replace(/(\d)_(?=\d)/g, "$1"), Ne.test(s)) return Ft(r, s);
2087
+ if (s = s.replace(/(\d)_(?=\d)/g, "$1"), Fe.test(s)) return Bt(r, s);
2088
2088
  } else if (s === "Infinity" || s === "NaN")
2089
2089
  return +s || (r.s = NaN), r.e = NaN, r.d = null, r;
2090
- if (si.test(s))
2090
+ if (oi.test(s))
2091
2091
  t = 16, s = s.toLowerCase();
2092
- else if (ii.test(s))
2092
+ else if (ri.test(s))
2093
2093
  t = 2;
2094
- else if (ni.test(s))
2094
+ else if (ai.test(s))
2095
2095
  t = 8;
2096
2096
  else
2097
- throw Error(ct + s);
2098
- for (n = s.search(/p/i), n > 0 ? (l = +s.slice(n + 1), s = s.substring(2, n)) : s = s.slice(2), n = s.indexOf("."), o = n >= 0, e = r.constructor, o && (s = s.replace(".", ""), a = s.length, n = a - n, i = Fe(e, new e(t), n, n * 2)), c = Ht(s, t, $), h = c.length - 1, n = h; c[n] === 0; --n) c.pop();
2099
- return n < 0 ? new e(r.s * 0) : (r.e = Jt(c, h), r.d = c, _ = !1, o && (r = k(r, i, a * 4)), l && (r = r.times(Math.abs(l) < 54 ? L(2, l) : D.pow(2, l))), _ = !0, r);
2097
+ throw Error(ht + s);
2098
+ for (n = s.search(/p/i), n > 0 ? (l = +s.slice(n + 1), s = s.substring(2, n)) : s = s.slice(2), n = s.indexOf("."), o = n >= 0, e = r.constructor, o && (s = s.replace(".", ""), a = s.length, n = a - n, i = Ge(e, new e(t), n, n * 2)), c = Ft(s, t, Q), h = c.length - 1, n = h; c[n] === 0; --n) c.pop();
2099
+ return n < 0 ? new e(r.s * 0) : (r.e = ie(c, h), r.d = c, E = !1, o && (r = V(r, i, a * 4)), l && (r = r.times(Math.abs(l) < 54 ? I(2, l) : R.pow(2, l))), E = !0, r);
2100
2100
  }
2101
- function ci(r, s) {
2101
+ function di(r, s) {
2102
2102
  var t, e = s.d.length;
2103
2103
  if (e < 3)
2104
2104
  return s.isZero() ? s : Mt(r, 2, s, s);
2105
- t = 1.4 * Math.sqrt(e), t = t > 16 ? 16 : t | 0, s = s.times(1 / Kt(5, t)), s = Mt(r, 2, s, s);
2105
+ t = 1.4 * Math.sqrt(e), t = t > 16 ? 16 : t | 0, s = s.times(1 / se(5, t)), s = Mt(r, 2, s, s);
2106
2106
  for (var i, n = new r(5), o = new r(16), a = new r(20); t--; )
2107
2107
  i = s.times(s), s = s.times(n.plus(i.times(o.times(i).minus(a))));
2108
2108
  return s;
2109
2109
  }
2110
2110
  function Mt(r, s, t, e, i) {
2111
2111
  var n, o, a, l, c = r.precision, h = Math.ceil(c / S);
2112
- for (_ = !1, l = t.times(t), a = new r(e); ; ) {
2113
- if (o = k(a.times(l), new r(s++ * s++), c, 1), a = i ? e.plus(o) : e.minus(o), e = k(o.times(l), new r(s++ * s++), c, 1), o = a.plus(e), o.d[h] !== void 0) {
2112
+ for (E = !1, l = t.times(t), a = new r(e); ; ) {
2113
+ if (o = V(a.times(l), new r(s++ * s++), c, 1), a = i ? e.plus(o) : e.minus(o), e = V(o.times(l), new r(s++ * s++), c, 1), o = a.plus(e), o.d[h] !== void 0) {
2114
2114
  for (n = h; o.d[n] === a.d[n] && n--; ) ;
2115
2115
  if (n == -1) break;
2116
2116
  }
2117
2117
  n = a, a = e, e = o, o = n;
2118
2118
  }
2119
- return _ = !0, o.d.length = h + 1, o;
2119
+ return E = !0, o.d.length = h + 1, o;
2120
2120
  }
2121
- function Kt(r, s) {
2121
+ function se(r, s) {
2122
2122
  for (var t = r; --s; ) t *= r;
2123
2123
  return t;
2124
2124
  }
2125
- function Xe(r, s) {
2126
- var t, e = s.s < 0, i = J(r, r.precision, 1), n = i.times(0.5);
2125
+ function ze(r, s) {
2126
+ var t, e = s.s < 0, i = tt(r, r.precision, 1), n = i.times(0.5);
2127
2127
  if (s = s.abs(), s.lte(n))
2128
2128
  return nt = e ? 4 : 1, s;
2129
2129
  if (t = s.divToInt(i), t.isZero())
2130
2130
  nt = e ? 3 : 2;
2131
2131
  else {
2132
2132
  if (s = s.minus(t.times(i)), s.lte(n))
2133
- return nt = be(t) ? e ? 2 : 3 : e ? 4 : 1, s;
2134
- nt = be(t) ? e ? 1 : 4 : e ? 3 : 2;
2133
+ return nt = Se(t) ? e ? 2 : 3 : e ? 4 : 1, s;
2134
+ nt = Se(t) ? e ? 1 : 4 : e ? 3 : 2;
2135
2135
  }
2136
2136
  return s.minus(i).abs();
2137
2137
  }
2138
- function pe(r, s, t, e) {
2138
+ function ye(r, s, t, e) {
2139
2139
  var i, n, o, a, l, c, h, u, f, m = r.constructor, p = t !== void 0;
2140
- if (p ? (X(t, 1, ht), e === void 0 ? e = m.rounding : X(e, 0, 8)) : (t = m.precision, e = m.rounding), !r.isFinite())
2141
- h = Ue(r);
2140
+ if (p ? (U(t, 1, ut), e === void 0 ? e = m.rounding : U(e, 0, 8)) : (t = m.precision, e = m.rounding), !r.isFinite())
2141
+ h = Xe(r);
2142
2142
  else {
2143
- for (h = K(r), o = h.indexOf("."), p ? (i = 2, s == 16 ? t = t * 4 - 3 : s == 8 && (t = t * 3 - 2)) : i = s, o >= 0 && (h = h.replace(".", ""), f = new m(1), f.e = h.length - o, f.d = Ht(K(f), 10, i), f.e = f.d.length), u = Ht(h, 10, i), n = l = u.length; u[--l] == 0; ) u.pop();
2143
+ for (h = et(r), o = h.indexOf("."), p ? (i = 2, s == 16 ? t = t * 4 - 3 : s == 8 && (t = t * 3 - 2)) : i = s, o >= 0 && (h = h.replace(".", ""), f = new m(1), f.e = h.length - o, f.d = Ft(et(f), 10, i), f.e = f.d.length), u = Ft(h, 10, i), n = l = u.length; u[--l] == 0; ) u.pop();
2144
2144
  if (!u[0])
2145
2145
  h = p ? "0p+0" : "0";
2146
2146
  else {
2147
- if (o < 0 ? n-- : (r = new m(r), r.d = u, r.e = n, r = k(r, f, t, e, 0, i), u = r.d, n = r.e, c = Ae), o = u[t], a = i / 2, c = c || u[t + 1] !== void 0, c = e < 4 ? (o !== void 0 || c) && (e === 0 || e === (r.s < 0 ? 3 : 2)) : o > a || o === a && (e === 4 || c || e === 6 && u[t - 1] & 1 || e === (r.s < 0 ? 8 : 7)), u.length = t, c)
2147
+ if (o < 0 ? n-- : (r = new m(r), r.d = u, r.e = n, r = V(r, f, t, e, 0, i), u = r.d, n = r.e, c = Te), o = u[t], a = i / 2, c = c || u[t + 1] !== void 0, c = e < 4 ? (o !== void 0 || c) && (e === 0 || e === (r.s < 0 ? 3 : 2)) : o > a || o === a && (e === 4 || c || e === 6 && u[t - 1] & 1 || e === (r.s < 0 ? 8 : 7)), u.length = t, c)
2148
2148
  for (; ++u[--t] > i - 1; )
2149
2149
  u[t] = 0, t || (++n, u.unshift(1));
2150
2150
  for (l = u.length; !u[l - 1]; --l) ;
2151
- for (o = 0, h = ""; o < l; o++) h += ce.charAt(u[o]);
2151
+ for (o = 0, h = ""; o < l; o++) h += fe.charAt(u[o]);
2152
2152
  if (p) {
2153
2153
  if (l > 1)
2154
2154
  if (s == 16 || s == 8) {
2155
2155
  for (o = s == 16 ? 4 : 3, --l; l % o; l++) h += "0";
2156
- for (u = Ht(h, i, s), l = u.length; !u[l - 1]; --l) ;
2157
- for (o = 1, h = "1."; o < l; o++) h += ce.charAt(u[o]);
2156
+ for (u = Ft(h, i, s), l = u.length; !u[l - 1]; --l) ;
2157
+ for (o = 1, h = "1."; o < l; o++) h += fe.charAt(u[o]);
2158
2158
  } else
2159
2159
  h = h.charAt(0) + "." + h.slice(1);
2160
2160
  h = h + (n < 0 ? "p" : "p+") + n;
@@ -2168,54 +2168,54 @@ function pe(r, s, t, e) {
2168
2168
  }
2169
2169
  return r.s < 0 ? "-" + h : h;
2170
2170
  }
2171
- function Ce(r, s) {
2171
+ function Ee(r, s) {
2172
2172
  if (r.length > s)
2173
2173
  return r.length = s, !0;
2174
2174
  }
2175
- function hi(r) {
2175
+ function fi(r) {
2176
2176
  return new this(r).abs();
2177
2177
  }
2178
- function ui(r) {
2178
+ function mi(r) {
2179
2179
  return new this(r).acos();
2180
2180
  }
2181
- function di(r) {
2181
+ function gi(r) {
2182
2182
  return new this(r).acosh();
2183
2183
  }
2184
- function fi(r, s) {
2184
+ function pi(r, s) {
2185
2185
  return new this(r).plus(s);
2186
2186
  }
2187
- function mi(r) {
2187
+ function vi(r) {
2188
2188
  return new this(r).asin();
2189
2189
  }
2190
- function gi(r) {
2190
+ function yi(r) {
2191
2191
  return new this(r).asinh();
2192
2192
  }
2193
- function pi(r) {
2193
+ function wi(r) {
2194
2194
  return new this(r).atan();
2195
2195
  }
2196
- function vi(r) {
2196
+ function xi(r) {
2197
2197
  return new this(r).atanh();
2198
2198
  }
2199
- function yi(r, s) {
2199
+ function Pi(r, s) {
2200
2200
  r = new this(r), s = new this(s);
2201
2201
  var t, e = this.precision, i = this.rounding, n = e + 4;
2202
- return !r.s || !s.s ? t = new this(NaN) : !r.d && !s.d ? (t = J(this, n, 1).times(s.s > 0 ? 0.25 : 0.75), t.s = r.s) : !s.d || r.isZero() ? (t = s.s < 0 ? J(this, e, i) : new this(0), t.s = r.s) : !r.d || s.isZero() ? (t = J(this, n, 1).times(0.5), t.s = r.s) : s.s < 0 ? (this.precision = n, this.rounding = 1, t = this.atan(k(r, s, n, 1)), s = J(this, n, 1), this.precision = e, this.rounding = i, t = r.s < 0 ? t.minus(s) : t.plus(s)) : t = this.atan(k(r, s, n, 1)), t;
2202
+ return !r.s || !s.s ? t = new this(NaN) : !r.d && !s.d ? (t = tt(this, n, 1).times(s.s > 0 ? 0.25 : 0.75), t.s = r.s) : !s.d || r.isZero() ? (t = s.s < 0 ? tt(this, e, i) : new this(0), t.s = r.s) : !r.d || s.isZero() ? (t = tt(this, n, 1).times(0.5), t.s = r.s) : s.s < 0 ? (this.precision = n, this.rounding = 1, t = this.atan(V(r, s, n, 1)), s = tt(this, n, 1), this.precision = e, this.rounding = i, t = r.s < 0 ? t.minus(s) : t.plus(s)) : t = this.atan(V(r, s, n, 1)), t;
2203
2203
  }
2204
- function wi(r) {
2204
+ function bi(r) {
2205
2205
  return new this(r).cbrt();
2206
2206
  }
2207
- function xi(r) {
2208
- return P(r = new this(r), r.e + 1, 2);
2207
+ function Ci(r) {
2208
+ return C(r = new this(r), r.e + 1, 2);
2209
2209
  }
2210
- function Pi(r, s, t) {
2210
+ function Si(r, s, t) {
2211
2211
  return new this(r).clamp(s, t);
2212
2212
  }
2213
- function bi(r) {
2214
- if (!r || typeof r != "object") throw Error(Qt + "Object expected");
2213
+ function Ei(r) {
2214
+ if (!r || typeof r != "object") throw Error(ee + "Object expected");
2215
2215
  var s, t, e, i = r.defaults === !0, n = [
2216
2216
  "precision",
2217
2217
  1,
2218
- ht,
2218
+ ut,
2219
2219
  "rounding",
2220
2220
  0,
2221
2221
  8,
@@ -2224,10 +2224,10 @@ function bi(r) {
2224
2224
  0,
2225
2225
  "toExpPos",
2226
2226
  0,
2227
- le,
2227
+ de,
2228
2228
  "maxE",
2229
2229
  0,
2230
- le,
2230
+ de,
2231
2231
  "minE",
2232
2232
  -9e15,
2233
2233
  0,
@@ -2236,35 +2236,35 @@ function bi(r) {
2236
2236
  9
2237
2237
  ];
2238
2238
  for (s = 0; s < n.length; s += 3)
2239
- if (t = n[s], i && (this[t] = he[t]), (e = r[t]) !== void 0)
2239
+ if (t = n[s], i && (this[t] = me[t]), (e = r[t]) !== void 0)
2240
2240
  if (F(e) === e && e >= n[s + 1] && e <= n[s + 2]) this[t] = e;
2241
- else throw Error(ct + t + ": " + e);
2242
- if (t = "crypto", i && (this[t] = he[t]), (e = r[t]) !== void 0)
2241
+ else throw Error(ht + t + ": " + e);
2242
+ if (t = "crypto", i && (this[t] = me[t]), (e = r[t]) !== void 0)
2243
2243
  if (e === !0 || e === !1 || e === 0 || e === 1)
2244
2244
  if (e)
2245
2245
  if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
2246
2246
  this[t] = !0;
2247
2247
  else
2248
- throw Error(Le);
2248
+ throw Error(Ne);
2249
2249
  else
2250
2250
  this[t] = !1;
2251
2251
  else
2252
- throw Error(ct + t + ": " + e);
2252
+ throw Error(ht + t + ": " + e);
2253
2253
  return this;
2254
2254
  }
2255
- function Ci(r) {
2255
+ function _i(r) {
2256
2256
  return new this(r).cos();
2257
2257
  }
2258
- function Si(r) {
2258
+ function Mi(r) {
2259
2259
  return new this(r).cosh();
2260
2260
  }
2261
- function Ge(r) {
2261
+ function Ye(r) {
2262
2262
  var s, t, e;
2263
2263
  function i(n) {
2264
2264
  var o, a, l, c = this;
2265
2265
  if (!(c instanceof i)) return new i(n);
2266
- if (c.constructor = i, Se(n)) {
2267
- c.s = n.s, _ ? !n.d || n.e > i.maxE ? (c.e = NaN, c.d = null) : n.e < i.minE ? (c.e = 0, c.d = [0]) : (c.e = n.e, c.d = n.d.slice()) : (c.e = n.e, c.d = n.d ? n.d.slice() : n.d);
2266
+ if (c.constructor = i, _e(n)) {
2267
+ c.s = n.s, E ? !n.d || n.e > i.maxE ? (c.e = NaN, c.d = null) : n.e < i.minE ? (c.e = 0, c.d = [0]) : (c.e = n.e, c.d = n.d.slice()) : (c.e = n.e, c.d = n.d ? n.d.slice() : n.d);
2268
2268
  return;
2269
2269
  }
2270
2270
  if (l = typeof n, l === "number") {
@@ -2274,79 +2274,79 @@ function Ge(r) {
2274
2274
  }
2275
2275
  if (n < 0 ? (n = -n, c.s = -1) : c.s = 1, n === ~~n && n < 1e7) {
2276
2276
  for (o = 0, a = n; a >= 10; a /= 10) o++;
2277
- _ ? o > i.maxE ? (c.e = NaN, c.d = null) : o < i.minE ? (c.e = 0, c.d = [0]) : (c.e = o, c.d = [n]) : (c.e = o, c.d = [n]);
2277
+ E ? o > i.maxE ? (c.e = NaN, c.d = null) : o < i.minE ? (c.e = 0, c.d = [0]) : (c.e = o, c.d = [n]) : (c.e = o, c.d = [n]);
2278
2278
  return;
2279
2279
  }
2280
2280
  if (n * 0 !== 0) {
2281
2281
  n || (c.s = NaN), c.e = NaN, c.d = null;
2282
2282
  return;
2283
2283
  }
2284
- return Ft(c, n.toString());
2284
+ return Bt(c, n.toString());
2285
2285
  }
2286
2286
  if (l === "string")
2287
- return (a = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (a === 43 && (n = n.slice(1)), c.s = 1), Ne.test(n) ? Ft(c, n) : li(c, n);
2287
+ return (a = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (a === 43 && (n = n.slice(1)), c.s = 1), Fe.test(n) ? Bt(c, n) : ui(c, n);
2288
2288
  if (l === "bigint")
2289
- return n < 0 ? (n = -n, c.s = -1) : c.s = 1, Ft(c, n.toString());
2290
- throw Error(ct + n);
2289
+ return n < 0 ? (n = -n, c.s = -1) : c.s = 1, Bt(c, n.toString());
2290
+ throw Error(ht + n);
2291
2291
  }
2292
- if (i.prototype = v, i.ROUND_UP = 0, i.ROUND_DOWN = 1, i.ROUND_CEIL = 2, i.ROUND_FLOOR = 3, i.ROUND_HALF_UP = 4, i.ROUND_HALF_DOWN = 5, i.ROUND_HALF_EVEN = 6, i.ROUND_HALF_CEIL = 7, i.ROUND_HALF_FLOOR = 8, i.EUCLID = 9, i.config = i.set = bi, i.clone = Ge, i.isDecimal = Se, i.abs = hi, i.acos = ui, i.acosh = di, i.add = fi, i.asin = mi, i.asinh = gi, i.atan = pi, i.atanh = vi, i.atan2 = yi, i.cbrt = wi, i.ceil = xi, i.clamp = Pi, i.cos = Ci, i.cosh = Si, i.div = _i, i.exp = Ei, i.floor = Mi, i.hypot = Di, i.ln = Ri, i.log = ki, i.log10 = Oi, i.log2 = Vi, i.max = Ai, i.min = Ti, i.mod = Li, i.mul = Ii, i.pow = Ni, i.random = Hi, i.round = Fi, i.sign = Bi, i.sin = Ui, i.sinh = Xi, i.sqrt = Gi, i.sub = zi, i.sum = Yi, i.tan = Wi, i.tanh = ji, i.trunc = qi, r === void 0 && (r = {}), r && r.defaults !== !0)
2292
+ if (i.prototype = v, i.ROUND_UP = 0, i.ROUND_DOWN = 1, i.ROUND_CEIL = 2, i.ROUND_FLOOR = 3, i.ROUND_HALF_UP = 4, i.ROUND_HALF_DOWN = 5, i.ROUND_HALF_EVEN = 6, i.ROUND_HALF_CEIL = 7, i.ROUND_HALF_FLOOR = 8, i.EUCLID = 9, i.config = i.set = Ei, i.clone = Ye, i.isDecimal = _e, i.abs = fi, i.acos = mi, i.acosh = gi, i.add = pi, i.asin = vi, i.asinh = yi, i.atan = wi, i.atanh = xi, i.atan2 = Pi, i.cbrt = bi, i.ceil = Ci, i.clamp = Si, i.cos = _i, i.cosh = Mi, i.div = Di, i.exp = Ri, i.floor = ki, i.hypot = Vi, i.ln = Oi, i.log = Ai, i.log10 = Ti, i.log2 = Li, i.max = Ii, i.min = Ni, i.mod = Hi, i.mul = Fi, i.pow = Bi, i.random = Gi, i.round = Ui, i.sign = Xi, i.sin = zi, i.sinh = Yi, i.sqrt = ji, i.sub = Wi, i.sum = qi, i.tan = $i, i.tanh = Zi, i.trunc = Qi, r === void 0 && (r = {}), r && r.defaults !== !0)
2293
2293
  for (e = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], s = 0; s < e.length; ) r.hasOwnProperty(t = e[s++]) || (r[t] = this[t]);
2294
2294
  return i.config(r), i;
2295
2295
  }
2296
- function _i(r, s) {
2296
+ function Di(r, s) {
2297
2297
  return new this(r).div(s);
2298
2298
  }
2299
- function Ei(r) {
2299
+ function Ri(r) {
2300
2300
  return new this(r).exp();
2301
2301
  }
2302
- function Mi(r) {
2303
- return P(r = new this(r), r.e + 1, 3);
2302
+ function ki(r) {
2303
+ return C(r = new this(r), r.e + 1, 3);
2304
2304
  }
2305
- function Di() {
2305
+ function Vi() {
2306
2306
  var r, s, t = new this(0);
2307
- for (_ = !1, r = 0; r < arguments.length; )
2307
+ for (E = !1, r = 0; r < arguments.length; )
2308
2308
  if (s = new this(arguments[r++]), s.d)
2309
2309
  t.d && (t = t.plus(s.times(s)));
2310
2310
  else {
2311
2311
  if (s.s)
2312
- return _ = !0, new this(1 / 0);
2312
+ return E = !0, new this(1 / 0);
2313
2313
  t = s;
2314
2314
  }
2315
- return _ = !0, t.sqrt();
2315
+ return E = !0, t.sqrt();
2316
2316
  }
2317
- function Se(r) {
2318
- return r instanceof D || r && r.toStringTag === Ie || !1;
2317
+ function _e(r) {
2318
+ return r instanceof R || r && r.toStringTag === He || !1;
2319
2319
  }
2320
- function Ri(r) {
2320
+ function Oi(r) {
2321
2321
  return new this(r).ln();
2322
2322
  }
2323
- function ki(r, s) {
2323
+ function Ai(r, s) {
2324
2324
  return new this(r).log(s);
2325
2325
  }
2326
- function Vi(r) {
2326
+ function Li(r) {
2327
2327
  return new this(r).log(2);
2328
2328
  }
2329
- function Oi(r) {
2329
+ function Ti(r) {
2330
2330
  return new this(r).log(10);
2331
2331
  }
2332
- function Ai() {
2333
- return Be(this, arguments, -1);
2332
+ function Ii() {
2333
+ return Ue(this, arguments, -1);
2334
2334
  }
2335
- function Ti() {
2336
- return Be(this, arguments, 1);
2335
+ function Ni() {
2336
+ return Ue(this, arguments, 1);
2337
2337
  }
2338
- function Li(r, s) {
2338
+ function Hi(r, s) {
2339
2339
  return new this(r).mod(s);
2340
2340
  }
2341
- function Ii(r, s) {
2341
+ function Fi(r, s) {
2342
2342
  return new this(r).mul(s);
2343
2343
  }
2344
- function Ni(r, s) {
2344
+ function Bi(r, s) {
2345
2345
  return new this(r).pow(s);
2346
2346
  }
2347
- function Hi(r) {
2347
+ function Gi(r) {
2348
2348
  var s, t, e, i, n = 0, o = new this(1), a = [];
2349
- if (r === void 0 ? r = this.precision : X(r, 1, ht), e = Math.ceil(r / S), this.crypto)
2349
+ if (r === void 0 ? r = this.precision : U(r, 1, ut), e = Math.ceil(r / S), this.crypto)
2350
2350
  if (crypto.getRandomValues)
2351
2351
  for (s = crypto.getRandomValues(new Uint32Array(e)); n < e; )
2352
2352
  i = s[n], i >= 429e7 ? s[n] = crypto.getRandomValues(new Uint32Array(1))[0] : a[n++] = i % 1e7;
@@ -2355,9 +2355,9 @@ function Hi(r) {
2355
2355
  i = s[n] + (s[n + 1] << 8) + (s[n + 2] << 16) + ((s[n + 3] & 127) << 24), i >= 214e7 ? crypto.randomBytes(4).copy(s, n) : (a.push(i % 1e7), n += 4);
2356
2356
  n = e / 4;
2357
2357
  } else
2358
- throw Error(Le);
2358
+ throw Error(Ne);
2359
2359
  else for (; n < e; ) a[n++] = Math.random() * 1e7 | 0;
2360
- for (e = a[--n], r %= S, e && r && (i = L(10, S - r), a[n] = (e / i | 0) * i); a[n] === 0; n--) a.pop();
2360
+ for (e = a[--n], r %= S, e && r && (i = I(10, S - r), a[n] = (e / i | 0) * i); a[n] === 0; n--) a.pop();
2361
2361
  if (n < 0)
2362
2362
  t = 0, a = [0];
2363
2363
  else {
@@ -2367,44 +2367,44 @@ function Hi(r) {
2367
2367
  }
2368
2368
  return o.e = t, o.d = a, o;
2369
2369
  }
2370
- function Fi(r) {
2371
- return P(r = new this(r), r.e + 1, this.rounding);
2370
+ function Ui(r) {
2371
+ return C(r = new this(r), r.e + 1, this.rounding);
2372
2372
  }
2373
- function Bi(r) {
2373
+ function Xi(r) {
2374
2374
  return r = new this(r), r.d ? r.d[0] ? r.s : 0 * r.s : r.s || NaN;
2375
2375
  }
2376
- function Ui(r) {
2376
+ function zi(r) {
2377
2377
  return new this(r).sin();
2378
2378
  }
2379
- function Xi(r) {
2379
+ function Yi(r) {
2380
2380
  return new this(r).sinh();
2381
2381
  }
2382
- function Gi(r) {
2382
+ function ji(r) {
2383
2383
  return new this(r).sqrt();
2384
2384
  }
2385
- function zi(r, s) {
2385
+ function Wi(r, s) {
2386
2386
  return new this(r).sub(s);
2387
2387
  }
2388
- function Yi() {
2388
+ function qi() {
2389
2389
  var r = 0, s = arguments, t = new this(s[r]);
2390
- for (_ = !1; t.s && ++r < s.length; ) t = t.plus(s[r]);
2391
- return _ = !0, P(t, this.precision, this.rounding);
2390
+ for (E = !1; t.s && ++r < s.length; ) t = t.plus(s[r]);
2391
+ return E = !0, C(t, this.precision, this.rounding);
2392
2392
  }
2393
- function Wi(r) {
2393
+ function $i(r) {
2394
2394
  return new this(r).tan();
2395
2395
  }
2396
- function ji(r) {
2396
+ function Zi(r) {
2397
2397
  return new this(r).tanh();
2398
2398
  }
2399
- function qi(r) {
2400
- return P(r = new this(r), r.e + 1, 1);
2399
+ function Qi(r) {
2400
+ return C(r = new this(r), r.e + 1, 1);
2401
2401
  }
2402
2402
  v[Symbol.for("nodejs.util.inspect.custom")] = v.toString;
2403
2403
  v[Symbol.toStringTag] = "Decimal";
2404
- var D = v.constructor = Ge(he);
2405
- Wt = new D(Wt);
2406
- jt = new D(jt);
2407
- class $i {
2404
+ var R = v.constructor = Ye(me);
2405
+ $t = new R($t);
2406
+ Zt = new R(Zt);
2407
+ class Ji {
2408
2408
  constructor() {
2409
2409
  /** 父级 */
2410
2410
  d(this, "parent");
@@ -2434,7 +2434,7 @@ class $i {
2434
2434
  this.mainCanvas = s;
2435
2435
  }
2436
2436
  }
2437
- class Zi extends $i {
2437
+ class Ki extends Ji {
2438
2438
  constructor() {
2439
2439
  super(...arguments);
2440
2440
  d(this, "_isVisible", !0);
@@ -2480,12 +2480,12 @@ class Zi extends $i {
2480
2480
  return !0;
2481
2481
  }
2482
2482
  }
2483
- let Qi = class extends Zi {
2483
+ let ts = class extends Ki {
2484
2484
  constructor(s) {
2485
- super(), s.name = s.name || ae("default-name-"), Object.assign(this, { ...s });
2485
+ super(), s.name = s.name || ue("default-name-"), Object.assign(this, { ...s });
2486
2486
  }
2487
2487
  };
2488
- class Ji extends Qi {
2488
+ class es extends ts {
2489
2489
  constructor(t) {
2490
2490
  super(t);
2491
2491
  d(this, "_isInteractive", !0);
@@ -2564,7 +2564,7 @@ class Ji extends Qi {
2564
2564
  return (this.parent ? this.parent[t] : !0) && e && (i ? this.isInteractive : !0);
2565
2565
  }
2566
2566
  }
2567
- class Ki {
2567
+ class is {
2568
2568
  constructor(s) {
2569
2569
  d(this, "propagationStopped", !1);
2570
2570
  this.data = s;
@@ -2576,7 +2576,7 @@ class Ki {
2576
2576
  return !this.propagationStopped;
2577
2577
  }
2578
2578
  }
2579
- class Vt extends Ji {
2579
+ class Vt extends es {
2580
2580
  constructor() {
2581
2581
  super(...arguments);
2582
2582
  //#region 4. 添加事件管理器
@@ -2694,7 +2694,7 @@ class Vt extends Ji {
2694
2694
  var c, h;
2695
2695
  if (!this[n]) return;
2696
2696
  this.updateStates(t, e);
2697
- const o = new Ki(e);
2697
+ const o = new is(e);
2698
2698
  this.listeners[t].forEach((u) => u(o, i));
2699
2699
  const a = "notify" + (t.charAt(0).toUpperCase() + t.slice(1)), l = ["notifyDragg", "notifyWheel"].includes(a) ? e : e.state;
2700
2700
  o.canPropagate && ((c = this.parent) == null || c[a](l, i)), (h = this.sharedControllers[t]) == null || h.forEach(
@@ -2750,7 +2750,7 @@ class Vt extends Ji {
2750
2750
  }
2751
2751
  //#region 6. 添加事件通知方法
2752
2752
  }
2753
- class ts extends Vt {
2753
+ class ss extends Vt {
2754
2754
  constructor(t) {
2755
2755
  super(t);
2756
2756
  /** 画布元素 */
@@ -2873,12 +2873,12 @@ class ts extends Vt {
2873
2873
  }
2874
2874
  }, f = (g, y, w) => {
2875
2875
  if (g !== void 0) {
2876
- const b = u.vertical(g, w);
2877
- if (b !== void 0) return b;
2876
+ const P = u.vertical(g, w);
2877
+ if (P !== void 0) return P;
2878
2878
  }
2879
2879
  if (y !== void 0) {
2880
- const b = u.reverse(y, w);
2881
- if (b !== void 0) return b;
2880
+ const P = u.reverse(y, w);
2881
+ if (P !== void 0) return P;
2882
2882
  }
2883
2883
  return w / 2;
2884
2884
  }, m = f(a, l, o);
@@ -2907,7 +2907,7 @@ class ts extends Vt {
2907
2907
  let l, c;
2908
2908
  t === "center" ? (l = a.left + a.width / 2, c = a.top + a.height / 2) : [l, c] = [t.clientX, t.clientY];
2909
2909
  const h = this.getMousePositionOnAxis({ clientX: l, clientY: c }), u = this.getAxisValueByPoint(h.x, h.y);
2910
- this.scale = new D(this.scale).add(e).toNumber(), this.isScaleUpdated = !0, this.updateSize();
2910
+ this.scale = new R(this.scale).add(e).toNumber(), this.isScaleUpdated = !0, this.updateSize();
2911
2911
  const f = this.getAxisPointByValue(
2912
2912
  u.xV,
2913
2913
  u.yV
@@ -2941,7 +2941,7 @@ class ts extends Vt {
2941
2941
  */
2942
2942
  getGridSize(t) {
2943
2943
  const { cycle: e, delta: i, axisConfig: n } = this;
2944
- let o = new D(t).sub(1).abs().mod(e * i).div(i).toNumber();
2944
+ let o = new R(t).sub(1).abs().mod(e * i).div(i).toNumber();
2945
2945
  return o = t < 1 && o != 0 ? e - o : o, Number(((o / e + 1) * n.min).toFixed(0));
2946
2946
  }
2947
2947
  /**
@@ -2953,11 +2953,11 @@ class ts extends Vt {
2953
2953
  const { axisConfig: e, cycle: i, delta: n } = this, o = e.count, a = i * n;
2954
2954
  if (t === 1) return o;
2955
2955
  if (t > 1) {
2956
- const l = new D(t).sub(1).div(a).floor();
2957
- return new D(o).div(new D(2).pow(l)).toNumber();
2956
+ const l = new R(t).sub(1).div(a).floor();
2957
+ return new R(o).div(new R(2).pow(l)).toNumber();
2958
2958
  } else {
2959
- const l = new D(1).sub(t).div(a).ceil();
2960
- return new D(o).mul(new D(2).pow(l)).toNumber();
2959
+ const l = new R(1).sub(t).div(a).ceil();
2960
+ return new R(o).mul(new R(2).pow(l)).toNumber();
2961
2961
  }
2962
2962
  }
2963
2963
  /** 获取每个网格表示的数字 */
@@ -2980,7 +2980,7 @@ class ts extends Vt {
2980
2980
  xV: t / n.min * n.count,
2981
2981
  yV: e / n.min * n.count
2982
2982
  };
2983
- const o = this.getNowGridCount, a = new D(t).div(n.size).mul(o).toFixed(8), l = new D(e).div(n.size).mul(o).toFixed(8);
2983
+ const o = this.getNowGridCount, a = new R(t).div(n.size).mul(o).toFixed(8), l = new R(e).div(n.size).mul(o).toFixed(8);
2984
2984
  return { xV: Number(a), yV: Number(l) };
2985
2985
  }
2986
2986
  /** 通过坐标轴上的值 获取坐标轴上的点 */
@@ -2991,7 +2991,7 @@ class ts extends Vt {
2991
2991
  x: t / n.count * n.min,
2992
2992
  y: e / n.count * n.min
2993
2993
  };
2994
- const o = this.getNowGridCount, a = new D(t).div(o).mul(n.size).toFixed(3), l = new D(e).div(o).mul(n.size).toFixed(3);
2994
+ const o = this.getNowGridCount, a = new R(t).div(o).mul(n.size).toFixed(3), l = new R(e).div(o).mul(n.size).toFixed(3);
2995
2995
  return { x: Number(a), y: Number(l) };
2996
2996
  }
2997
2997
  /** 获取最大/小的 值 */
@@ -3021,7 +3021,7 @@ class ts extends Vt {
3021
3021
  ) : l(t);
3022
3022
  }
3023
3023
  }
3024
- class es extends ts {
3024
+ class ns extends ss {
3025
3025
  constructor(t) {
3026
3026
  super(t);
3027
3027
  /** 主题 */
@@ -3125,6 +3125,18 @@ class es extends ts {
3125
3125
  width: 14,
3126
3126
  fill: "#036933"
3127
3127
  }
3128
+ },
3129
+ billboard: {
3130
+ stroke: {
3131
+ color: "#d03050",
3132
+ color_hover: "#d03050",
3133
+ width: 4,
3134
+ dash: !1,
3135
+ dashGap: [5, 10],
3136
+ dashOffset: 0,
3137
+ cap: "round",
3138
+ join: "round"
3139
+ }
3128
3140
  }
3129
3141
  },
3130
3142
  dark: {
@@ -3223,6 +3235,18 @@ class es extends ts {
3223
3235
  width: 14,
3224
3236
  fill: "#7efbd1"
3225
3237
  }
3238
+ },
3239
+ billboard: {
3240
+ stroke: {
3241
+ color: "#e88080",
3242
+ color_hover: "#e88080",
3243
+ width: 4,
3244
+ dash: !1,
3245
+ dashGap: [5, 10],
3246
+ dashOffset: 0,
3247
+ cap: "round",
3248
+ join: "round"
3249
+ }
3226
3250
  }
3227
3251
  }
3228
3252
  });
@@ -3245,10 +3269,10 @@ class es extends ts {
3245
3269
  setStyle(t) {
3246
3270
  for (const e in t)
3247
3271
  if (Object.prototype.hasOwnProperty.call(t, e)) {
3248
- const i = ti(
3272
+ const i = si(
3249
3273
  this.style[e] || this.style[this.theme]
3250
3274
  );
3251
- pt(i, t[e]), this.style[e] = i;
3275
+ ct(i, t[e]), this.style[e] = i;
3252
3276
  }
3253
3277
  this.initStyle();
3254
3278
  }
@@ -3257,7 +3281,7 @@ class es extends ts {
3257
3281
  t in this.style && (this.theme = t, this.isThemeUpdated = !0);
3258
3282
  }
3259
3283
  }
3260
- class R extends Vt {
3284
+ class D extends Vt {
3261
3285
  constructor(t) {
3262
3286
  t = { ...t }, t.isDraggable = t.isDraggable ?? !1;
3263
3287
  const { mainCanvas: e, notifyReload: i } = t;
@@ -3523,7 +3547,7 @@ class R extends Vt {
3523
3547
  handleValuePosition(t, e) {
3524
3548
  let { value: i, position: n, mainCanvas: o } = this;
3525
3549
  if (!o) return !1;
3526
- const a = t === "array1D" ? ge : Yt, [l, c] = [
3550
+ const a = t === "array1D" ? ve : qt, [l, c] = [
3527
3551
  a(i) && (!e || i.length >= e),
3528
3552
  a(n) && (!e || n.length >= e)
3529
3553
  ], h = {
@@ -3580,8 +3604,8 @@ class R extends Vt {
3580
3604
  return this.isInteractive ? this.isDraggable ? "_nhanh_canvas_hover_overlay_draggable" : "_nhanh_canvas_hover_overlay" : void 0;
3581
3605
  }
3582
3606
  }
3583
- d(R, "ctx", document.createElement("canvas").getContext("2d"));
3584
- class Bt extends R {
3607
+ d(D, "ctx", document.createElement("canvas").getContext("2d"));
3608
+ class Gt extends D {
3585
3609
  constructor(t) {
3586
3610
  super(t);
3587
3611
  d(this, "_draw");
@@ -3614,13 +3638,13 @@ class Bt extends R {
3614
3638
  n[1],
3615
3639
  !0
3616
3640
  );
3617
- e.push([o.x, o.y]), n[0] != 0 ? i = new D(o.x).div(n[0]).toNumber() : n[1] != 0 && (i = new D(o.y).div(n[1]).toNumber());
3641
+ e.push([o.x, o.y]), n[0] != 0 ? i = new R(o.x).div(n[0]).toNumber() : n[1] != 0 && (i = new R(o.y).div(n[1]).toNumber());
3618
3642
  } else
3619
3643
  e.push([
3620
3644
  // this.mainCanvas!.preservePrecision(scale * item[0]),
3621
3645
  // this.mainCanvas!.preservePrecision(scale * item[1]),
3622
- new D(i).mul(n[0]).toNumber(),
3623
- new D(i).mul(n[1]).toNumber()
3646
+ new R(i).mul(n[0]).toNumber(),
3647
+ new R(i).mul(n[1]).toNumber()
3624
3648
  ]);
3625
3649
  }), e;
3626
3650
  }
@@ -3634,13 +3658,13 @@ class Bt extends R {
3634
3658
  n[1],
3635
3659
  !0
3636
3660
  );
3637
- e.push([a.xV, a.yV]), n[0] != 0 ? i = new D(a.xV).div(n[0]).toNumber() : n[1] != 0 && (i = new D(a.yV).div(n[1]).toNumber());
3661
+ e.push([a.xV, a.yV]), n[0] != 0 ? i = new R(a.xV).div(n[0]).toNumber() : n[1] != 0 && (i = new R(a.yV).div(n[1]).toNumber());
3638
3662
  } else
3639
3663
  e.push([
3640
3664
  // this.mainCanvas!.preservePrecision(scale * item[0]),
3641
3665
  // this.mainCanvas!.preservePrecision(scale * item[1]),
3642
- new D(i).mul(n[0]).toNumber(),
3643
- new D(i).mul(n[1]).toNumber()
3666
+ new R(i).mul(n[0]).toNumber(),
3667
+ new R(i).mul(n[1]).toNumber()
3644
3668
  ]);
3645
3669
  }), e;
3646
3670
  }
@@ -3675,21 +3699,21 @@ class Bt extends R {
3675
3699
  }
3676
3700
  }
3677
3701
  }
3678
- class O {
3702
+ class k {
3679
3703
  static add(s, t) {
3680
- return new D(s).add(t).toNumber();
3704
+ return new R(s).add(t).toNumber();
3681
3705
  }
3682
3706
  static sub(s, t) {
3683
- return new D(s).sub(t).toNumber();
3707
+ return new R(s).sub(t).toNumber();
3684
3708
  }
3685
3709
  static mul(s, t) {
3686
- return new D(s).mul(t).toNumber();
3710
+ return new R(s).mul(t).toNumber();
3687
3711
  }
3688
3712
  static div(s, t) {
3689
- return new D(s).div(t).toNumber();
3713
+ return new R(s).div(t).toNumber();
3690
3714
  }
3691
3715
  }
3692
- class Ut extends R {
3716
+ class Ut extends D {
3693
3717
  constructor(t) {
3694
3718
  super(t);
3695
3719
  /** 文字偏差 */
@@ -3701,16 +3725,16 @@ class Ut extends R {
3701
3725
  this.internalUpdate(
3702
3726
  {
3703
3727
  value: [
3704
- O.add(this.value[0], o.value),
3705
- O.add(this.value[1], a.value)
3728
+ k.add(this.value[0], o.value),
3729
+ k.add(this.value[1], a.value)
3706
3730
  ],
3707
3731
  position: [
3708
- O.add(this.position[0], o.position),
3709
- O.add(this.position[1], a.position)
3732
+ k.add(this.position[0], o.position),
3733
+ k.add(this.position[1], a.position)
3710
3734
  ],
3711
3735
  dynamicPosition: [
3712
- O.add(this.dynamicPosition[0], o.dynamicPosition),
3713
- O.add(this.dynamicPosition[1], a.dynamicPosition)
3736
+ k.add(this.dynamicPosition[0], o.dynamicPosition),
3737
+ k.add(this.dynamicPosition[1], a.dynamicPosition)
3714
3738
  ]
3715
3739
  },
3716
3740
  !0
@@ -3738,7 +3762,7 @@ class Ut extends R {
3738
3762
  });
3739
3763
  }
3740
3764
  isPointInPath(t, e) {
3741
- return this.path ? R.ctx.isPointInPath(this.path, t, e) : !1;
3765
+ return this.path ? D.ctx.isPointInPath(this.path, t, e) : !1;
3742
3766
  }
3743
3767
  isPointInStroke(t, e) {
3744
3768
  return !1;
@@ -3747,7 +3771,7 @@ class Ut extends R {
3747
3771
  if (!this.mainCanvas) return;
3748
3772
  if (!this.text || this.text.length == 0)
3749
3773
  return this.internalUpdate({ dynamicPosition: void 0 });
3750
- const t = R.ctx;
3774
+ const t = D.ctx;
3751
3775
  this.setOverlayStyles(t);
3752
3776
  const e = t.measureText(this.text);
3753
3777
  this.textOffset = {
@@ -3789,7 +3813,7 @@ class Ut extends R {
3789
3813
  }
3790
3814
  }
3791
3815
  }
3792
- class lt extends R {
3816
+ class lt extends D {
3793
3817
  constructor(t) {
3794
3818
  super(t);
3795
3819
  d(this, "angle", 2 * Math.PI);
@@ -3799,16 +3823,16 @@ class lt extends R {
3799
3823
  this.internalUpdate(
3800
3824
  {
3801
3825
  value: [
3802
- O.add(this.value[0], o.value),
3803
- O.add(this.value[1], a.value)
3826
+ k.add(this.value[0], o.value),
3827
+ k.add(this.value[1], a.value)
3804
3828
  ],
3805
3829
  position: [
3806
- O.add(this.position[0], o.position),
3807
- O.add(this.position[1], a.position)
3830
+ k.add(this.position[0], o.position),
3831
+ k.add(this.position[1], a.position)
3808
3832
  ],
3809
3833
  dynamicPosition: [
3810
- O.add(this.dynamicPosition[0], o.dynamicPosition),
3811
- O.add(this.dynamicPosition[1], a.dynamicPosition)
3834
+ k.add(this.dynamicPosition[0], o.dynamicPosition),
3835
+ k.add(this.dynamicPosition[1], a.dynamicPosition)
3812
3836
  ]
3813
3837
  },
3814
3838
  !0
@@ -3834,7 +3858,7 @@ class lt extends R {
3834
3858
  cancelAndRestartAnimation(t, e, i) {
3835
3859
  this.fillProgress.scheduleCallback();
3836
3860
  let n = 0;
3837
- this.fillProgress.scheduleCallback = zt((o) => {
3861
+ this.fillProgress.scheduleCallback = Wt((o) => {
3838
3862
  !this.fillProgress || !o || (this.fillProgress.progress += (o - n) * (t ? 1 : -1), n = o, this.fillProgress.progress = Math.min(
3839
3863
  1,
3840
3864
  Math.max(0, this.fillProgress.progress)
@@ -3846,7 +3870,7 @@ class lt extends R {
3846
3870
  this.fillProgress = {
3847
3871
  lineWidthOffset: 0,
3848
3872
  progress: 0,
3849
- scheduleCallback: zt((i) => {
3873
+ scheduleCallback: Wt((i) => {
3850
3874
  this.fillProgress && (this.fillProgress.progress = i, this.updateLineWidthOffset(t));
3851
3875
  }, e)
3852
3876
  };
@@ -3859,13 +3883,13 @@ class lt extends R {
3859
3883
  e !== this.fillProgress.lineWidthOffset && (this.fillProgress.lineWidthOffset = e, (i = this.notifyReload) == null || i.call(this));
3860
3884
  }
3861
3885
  isPointInPath(t, e) {
3862
- return this.path ? R.ctx.isPointInPath(this.path, t, e) : !1;
3886
+ return this.path ? D.ctx.isPointInPath(this.path, t, e) : !1;
3863
3887
  }
3864
3888
  isPointInStroke(t, e) {
3865
3889
  var i;
3866
3890
  if (this.path && this.mainCanvas) {
3867
- const { width: n } = this.setOverlayStyles(R.ctx);
3868
- return ((i = this.fillProgress) == null ? void 0 : i.lineWidthOffset) == n ? !1 : R.ctx.isPointInStroke(this.path, t, e);
3891
+ const { width: n } = this.setOverlayStyles(D.ctx);
3892
+ return ((i = this.fillProgress) == null ? void 0 : i.lineWidthOffset) == n ? !1 : D.ctx.isPointInStroke(this.path, t, e);
3869
3893
  }
3870
3894
  return !1;
3871
3895
  }
@@ -3905,7 +3929,7 @@ class lt extends R {
3905
3929
  }
3906
3930
  }
3907
3931
  }
3908
- class ze extends R {
3932
+ class je extends D {
3909
3933
  constructor(t) {
3910
3934
  super(t);
3911
3935
  /** 控制点 */
@@ -3948,14 +3972,14 @@ class ze extends R {
3948
3972
  const { offsetX: o, offsetY: a } = t.data, { x: l, y: c } = this.calculateOffset(o, a);
3949
3973
  this.value.forEach((h, u) => {
3950
3974
  this.value[u] = [
3951
- O.add(this.value[u][0], l.value),
3952
- O.add(this.value[u][1], c.value)
3975
+ k.add(this.value[u][0], l.value),
3976
+ k.add(this.value[u][1], c.value)
3953
3977
  ], this.position[u] = [
3954
- O.add(this.position[u][0], l.position),
3955
- O.add(this.position[u][1], c.position)
3978
+ k.add(this.position[u][0], l.position),
3979
+ k.add(this.position[u][1], c.position)
3956
3980
  ], this.dynamicPosition[u] = [
3957
- O.add(this.dynamicPosition[u][0], l.dynamicPosition),
3958
- O.add(this.dynamicPosition[u][1], c.dynamicPosition)
3981
+ k.add(this.dynamicPosition[u][0], l.dynamicPosition),
3982
+ k.add(this.dynamicPosition[u][1], c.dynamicPosition)
3959
3983
  ];
3960
3984
  }), this.handlePoints.forEach((h, u) => {
3961
3985
  h.internalUpdate({
@@ -4001,7 +4025,7 @@ class ze extends R {
4001
4025
  tryCreateNewHandlePoint(t, e) {
4002
4026
  var c;
4003
4027
  if (!this.isPointInStroke(t, e)) return;
4004
- const i = this.getExtendedDynamicPositions(), n = is([t, e], i);
4028
+ const i = this.getExtendedDynamicPositions(), n = rs([t, e], i);
4005
4029
  if (n === -1) return;
4006
4030
  const [o, a] = this.getAdjacentIndices(n), l = this.createNewHandlePoint(o, a);
4007
4031
  this.insertHandlePoint(n, l), this.lockHandlePointCreationTemporarily(), (c = this.notifyReload) == null || c.call(this);
@@ -4022,13 +4046,13 @@ class ze extends R {
4022
4046
  }
4023
4047
  /** 创建新的控制点 */
4024
4048
  createNewHandlePoint(t, e) {
4025
- const i = se(
4049
+ const i = oe(
4026
4050
  this.value[t],
4027
4051
  this.value[e]
4028
- ), n = se(
4052
+ ), n = oe(
4029
4053
  this.position[t],
4030
4054
  this.position[e]
4031
- ), o = se(
4055
+ ), o = oe(
4032
4056
  this.dynamicPosition[t],
4033
4057
  this.dynamicPosition[e]
4034
4058
  );
@@ -4100,12 +4124,12 @@ class ze extends R {
4100
4124
  });
4101
4125
  }
4102
4126
  }
4103
- function is(r, s, t = 10) {
4127
+ function rs(r, s, t = 10) {
4104
4128
  if (s.length === 0) return 0;
4105
4129
  if (s.length === 1) return 1;
4106
4130
  let e = 1 / 0, i = -1;
4107
4131
  for (let n = 0; n < s.length - 1; n++) {
4108
- const o = Ms(
4132
+ const o = Rs(
4109
4133
  r,
4110
4134
  s[n],
4111
4135
  s[n + 1]
@@ -4116,11 +4140,11 @@ function is(r, s, t = 10) {
4116
4140
  }
4117
4141
  return i;
4118
4142
  }
4119
- function se(r, s) {
4120
- const { x: t, y: e } = We(...r, ...s);
4143
+ function oe(r, s) {
4144
+ const { x: t, y: e } = $e(...r, ...s);
4121
4145
  return [t, e];
4122
4146
  }
4123
- class Xt extends ze {
4147
+ class Xt extends je {
4124
4148
  constructor(t) {
4125
4149
  super(t);
4126
4150
  d(this, "_isInfinite");
@@ -4144,7 +4168,7 @@ class Xt extends ze {
4144
4168
  return !1;
4145
4169
  }
4146
4170
  isPointInStroke(t, e) {
4147
- return this.path && this.mainCanvas ? (this.setOverlayStyles(R.ctx), this.isDraggable && (R.ctx.lineWidth = Math.max(R.ctx.lineWidth, 20)), R.ctx.isPointInStroke(this.path, t, e)) : !1;
4171
+ return this.path && this.mainCanvas ? (this.setOverlayStyles(D.ctx), this.isDraggable && (D.ctx.lineWidth = Math.max(D.ctx.lineWidth, 20)), D.ctx.isPointInStroke(this.path, t, e)) : !1;
4148
4172
  }
4149
4173
  isPointInAnywhere(t, e) {
4150
4174
  return ((n) => {
@@ -4161,7 +4185,7 @@ class Xt extends ze {
4161
4185
  if (this.isInfinite) {
4162
4186
  this.isRecalculate && this.updateDynamicPosition();
4163
4187
  const { width: t, height: e } = this.mainCanvas.rect;
4164
- return ss(
4188
+ return os(
4165
4189
  [0, 0],
4166
4190
  [t, e],
4167
4191
  this.finalDynamicPosition[0],
@@ -4182,7 +4206,7 @@ class Xt extends ze {
4182
4206
  var o;
4183
4207
  const e = this.mainCanvas, i = e.style[e.theme].line;
4184
4208
  let n = {};
4185
- return typeof this.style == "string" ? n = ((o = e.style[this.style]) == null ? void 0 : o.line) || i : typeof this.style == "object" ? n = pt(
4209
+ return typeof this.style == "string" ? n = ((o = e.style[this.style]) == null ? void 0 : o.line) || i : typeof this.style == "object" ? n = ct(
4186
4210
  JSON.parse(JSON.stringify(i)),
4187
4211
  this.style
4188
4212
  ) : n = i, t && this.setBaseLineStyle(t, n.stroke), n;
@@ -4211,12 +4235,12 @@ class Xt extends ze {
4211
4235
  const { rect: n } = e, [o, a] = i, l = [a[0] - o[0], a[1] - o[1]];
4212
4236
  if (l[0] === 0 && l[1] === 0)
4213
4237
  return console.error("重合点无法确定方向");
4214
- const c = _e(
4238
+ const c = Me(
4215
4239
  o,
4216
4240
  [-l[0], -l[1]],
4217
4241
  n.width,
4218
4242
  n.height
4219
- ), h = _e(
4243
+ ), h = Me(
4220
4244
  a,
4221
4245
  l,
4222
4246
  n.width,
@@ -4231,7 +4255,7 @@ class Xt extends ze {
4231
4255
  }
4232
4256
  }
4233
4257
  }
4234
- function _e(r, s, t, e) {
4258
+ function Me(r, s, t, e) {
4235
4259
  const [i, n] = r, [o, a] = s;
4236
4260
  let l = 1 / 0;
4237
4261
  if (o !== 0) {
@@ -4244,7 +4268,7 @@ function _e(r, s, t, e) {
4244
4268
  }
4245
4269
  return l === 1 / 0 ? r : [i + o * l, n + a * l];
4246
4270
  }
4247
- function ss(r, s, t, e) {
4271
+ function os(r, s, t, e) {
4248
4272
  const i = Math.min(r[0], s[0]), n = Math.max(r[0], s[0]), o = Math.min(r[1], s[1]), a = Math.max(r[1], s[1]), l = [
4249
4273
  [i, o],
4250
4274
  // 左上
@@ -4268,7 +4292,7 @@ function ss(r, s, t, e) {
4268
4292
  }
4269
4293
  return m && p;
4270
4294
  }
4271
- class Gt extends ze {
4295
+ class zt extends je {
4272
4296
  constructor(t) {
4273
4297
  super(t);
4274
4298
  d(this, "_isRect", !1);
@@ -4310,10 +4334,10 @@ class Gt extends ze {
4310
4334
  this.initValueScope();
4311
4335
  }
4312
4336
  isPointInPath(t, e) {
4313
- return this.path ? R.ctx.isPointInPath(this.path, t, e) : !1;
4337
+ return this.path ? D.ctx.isPointInPath(this.path, t, e) : !1;
4314
4338
  }
4315
4339
  isPointInStroke(t, e) {
4316
- return this.path && this.mainCanvas ? (this.setOverlayStyles(R.ctx), this.isDraggable && (R.ctx.lineWidth = Math.max(R.ctx.lineWidth, 20)), R.ctx.isPointInStroke(this.path, t, e)) : !1;
4340
+ return this.path && this.mainCanvas ? (this.setOverlayStyles(D.ctx), this.isDraggable && (D.ctx.lineWidth = Math.max(D.ctx.lineWidth, 20)), D.ctx.isPointInStroke(this.path, t, e)) : !1;
4317
4341
  }
4318
4342
  isPointInAnywhere(t, e) {
4319
4343
  return ((n) => {
@@ -4363,7 +4387,7 @@ class Gt extends ze {
4363
4387
  var c;
4364
4388
  const e = this.isHover, i = this.mainCanvas, n = i.style[i.theme].polygon;
4365
4389
  let o = {};
4366
- typeof this.style == "string" ? o = ((c = i.style[this.style]) == null ? void 0 : c.polygon) || n : typeof this.style == "object" ? o = pt(
4390
+ typeof this.style == "string" ? o = ((c = i.style[this.style]) == null ? void 0 : c.polygon) || n : typeof this.style == "object" ? o = ct(
4367
4391
  JSON.parse(JSON.stringify(n)),
4368
4392
  this.style
4369
4393
  ) : o = n;
@@ -4405,7 +4429,7 @@ class Gt extends ze {
4405
4429
  }
4406
4430
  }
4407
4431
  }
4408
- class fe extends R {
4432
+ class Yt extends D {
4409
4433
  constructor(t) {
4410
4434
  super(t);
4411
4435
  d(this, "_isFill", !1);
@@ -4437,16 +4461,16 @@ class fe extends R {
4437
4461
  u.internalUpdate(
4438
4462
  {
4439
4463
  value: [
4440
- O.add(u.value[0], a.value),
4441
- O.add(u.value[1], l.value)
4464
+ k.add(u.value[0], a.value),
4465
+ k.add(u.value[1], l.value)
4442
4466
  ],
4443
4467
  position: [
4444
- O.add(u.position[0], a.position),
4445
- O.add(u.position[1], l.position)
4468
+ k.add(u.position[0], a.position),
4469
+ k.add(u.position[1], l.position)
4446
4470
  ],
4447
4471
  dynamicPosition: [
4448
- O.add(u.dynamicPosition[0], a.dynamicPosition),
4449
- O.add(u.dynamicPosition[1], l.dynamicPosition)
4472
+ k.add(u.dynamicPosition[0], a.dynamicPosition),
4473
+ k.add(u.dynamicPosition[1], l.dynamicPosition)
4450
4474
  ]
4451
4475
  },
4452
4476
  !0
@@ -4577,10 +4601,10 @@ class fe extends R {
4577
4601
  }));
4578
4602
  }
4579
4603
  isPointInPath(t, e) {
4580
- return this.isFill && this.path ? R.ctx.isPointInPath(this.path, t, e) : !1;
4604
+ return this.isFill && this.path ? D.ctx.isPointInPath(this.path, t, e) : !1;
4581
4605
  }
4582
4606
  isPointInStroke(t, e) {
4583
- return this.path && this.mainCanvas ? (this.setOverlayStyles(R.ctx), this.isDraggable && (R.ctx.lineWidth = Math.max(R.ctx.lineWidth, 20)), R.ctx.isPointInStroke(this.path, t, e)) : !1;
4607
+ return this.path && this.mainCanvas ? (this.setOverlayStyles(D.ctx), this.isDraggable && (D.ctx.lineWidth = Math.max(D.ctx.lineWidth, 20)), D.ctx.isPointInStroke(this.path, t, e)) : !1;
4584
4608
  }
4585
4609
  isPointInAnywhere(t, e) {
4586
4610
  return ((n) => {
@@ -4599,7 +4623,7 @@ class fe extends R {
4599
4623
  var c;
4600
4624
  const e = this.isHover, i = this.mainCanvas, n = i.style[i.theme].arc;
4601
4625
  let o = {};
4602
- typeof this.style == "string" ? o = ((c = i.style[this.style]) == null ? void 0 : c.arc) || n : typeof this.style == "object" ? o = pt(
4626
+ typeof this.style == "string" ? o = ((c = i.style[this.style]) == null ? void 0 : c.arc) || n : typeof this.style == "object" ? o = ct(
4603
4627
  JSON.parse(JSON.stringify(n)),
4604
4628
  this.style
4605
4629
  ) : o = n;
@@ -4629,7 +4653,7 @@ class fe extends R {
4629
4653
  offset: c
4630
4654
  } = this;
4631
4655
  if (!t || !a || !l) return;
4632
- const [h, u] = ns(
4656
+ const [h, u] = as(
4633
4657
  ...e,
4634
4658
  i,
4635
4659
  n,
@@ -4643,8 +4667,8 @@ class fe extends R {
4643
4667
  isDraggable: !0,
4644
4668
  mainCanvas: this.mainCanvas,
4645
4669
  notifyReload: () => {
4646
- var b;
4647
- return (b = this.notifyReload) == null ? void 0 : b.call(this);
4670
+ var P;
4671
+ return (P = this.notifyReload) == null ? void 0 : P.call(this);
4648
4672
  }
4649
4673
  }), m = this.handlePoints.start || f("start"), p = this.handlePoints.end || f("end"), g = this.handlePoints.radius || f("radius");
4650
4674
  m.value = h, p.value = u;
@@ -4733,14 +4757,14 @@ class fe extends R {
4733
4757
  }
4734
4758
  }
4735
4759
  }
4736
- function ns(r, s, t, e, i, n = 1, o = 1) {
4760
+ function as(r, s, t, e, i, n = 1, o = 1) {
4737
4761
  const a = r + t * Math.cos(e) * n, l = s + t * Math.sin(e) * o, c = r + t * Math.cos(i) * n, h = s + t * Math.sin(i) * o;
4738
4762
  return [
4739
4763
  [a, l],
4740
4764
  [c, h]
4741
4765
  ];
4742
4766
  }
4743
- class me extends R {
4767
+ class jt extends D {
4744
4768
  constructor(t) {
4745
4769
  super(t);
4746
4770
  /** 控制点 */
@@ -4805,7 +4829,7 @@ class me extends R {
4805
4829
  return !1;
4806
4830
  }
4807
4831
  isPointInStroke(t, e) {
4808
- return this.path && this.mainCanvas ? (this.setOverlayStyles(R.ctx), this.isDraggable && (R.ctx.lineWidth = Math.max(R.ctx.lineWidth, 20)), R.ctx.isPointInStroke(this.path, t, e)) : !1;
4832
+ return this.path && this.mainCanvas ? (this.setOverlayStyles(D.ctx), this.isDraggable && (D.ctx.lineWidth = Math.max(D.ctx.lineWidth, 20)), D.ctx.isPointInStroke(this.path, t, e)) : !1;
4809
4833
  }
4810
4834
  isPointInAnywhere(t, e) {
4811
4835
  return ((n) => {
@@ -4825,7 +4849,7 @@ class me extends R {
4825
4849
  var o;
4826
4850
  const e = this.mainCanvas, i = e.style[e.theme].arcTo;
4827
4851
  let n = {};
4828
- return typeof this.style == "string" ? n = ((o = e.style[this.style]) == null ? void 0 : o.arcTo) || i : typeof this.style == "object" ? n = pt(
4852
+ return typeof this.style == "string" ? n = ((o = e.style[this.style]) == null ? void 0 : o.arcTo) || i : typeof this.style == "object" ? n = ct(
4829
4853
  JSON.parse(JSON.stringify(i)),
4830
4854
  this.style
4831
4855
  ) : n = i, t && this.setBaseLineStyle(t, n.stroke), n;
@@ -4864,8 +4888,8 @@ class me extends R {
4864
4888
  if (!this.mainCanvas) return;
4865
4889
  let { value: t, position: e } = this;
4866
4890
  const [i, n] = [
4867
- Yt(t) && t.length > 1,
4868
- Yt(e) && e.length > 1
4891
+ qt(t) && t.length > 1,
4892
+ qt(e) && e.length > 1
4869
4893
  ];
4870
4894
  if (!i && !n)
4871
4895
  return this.handlePoints = void 0, this.internalUpdate({ dynamicPosition: void 0 });
@@ -4907,7 +4931,7 @@ class me extends R {
4907
4931
  }
4908
4932
  }
4909
4933
  }
4910
- class rs extends es {
4934
+ class ls extends ns {
4911
4935
  constructor(t) {
4912
4936
  super(t);
4913
4937
  /** 监听元素大小 */
@@ -4924,7 +4948,7 @@ class rs extends es {
4924
4948
  maxYV: 0
4925
4949
  });
4926
4950
  /** 测量重绘性能 */
4927
- d(this, "measureRedrawPerformance", ei(
4951
+ d(this, "measureRedrawPerformance", ni(
4928
4952
  () => {
4929
4953
  this.isRendering = !0, this.redraw(), this.redrawInNextRenderFrame = !1, this.isRendering = !1;
4930
4954
  },
@@ -4937,7 +4961,7 @@ class rs extends es {
4937
4961
  }
4938
4962
  ));
4939
4963
  this.canvas && (this.resizeObserver = new ResizeObserver(
4940
- Oe(() => {
4964
+ Le(() => {
4941
4965
  [this.canvas.width, this.canvas.height] = [
4942
4966
  this.rect.width,
4943
4967
  this.rect.height
@@ -4984,7 +5008,7 @@ class rs extends es {
4984
5008
  if (a !== h) return h - a;
4985
5009
  if (l !== u)
4986
5010
  return u - l;
4987
- const m = (p) => p instanceof Bt ? 5 : p instanceof Ut ? 4 : p instanceof lt ? 3 : p instanceof Xt || p instanceof fe || p instanceof me ? 2 : p instanceof Gt ? 1 : 0;
5011
+ const m = (p) => p instanceof Gt ? 5 : p instanceof Ut ? 4 : p instanceof lt ? 3 : p instanceof Xt || p instanceof Yt || p instanceof jt ? 2 : p instanceof zt ? 1 : 0;
4988
5012
  return m(f) - m(c);
4989
5013
  }
4990
5014
  ), this.currentDrawOverlays = t.map(
@@ -5019,7 +5043,7 @@ class rs extends es {
5019
5043
  (t = this.resizeObserver) == null || t.disconnect();
5020
5044
  }
5021
5045
  }
5022
- class os extends rs {
5046
+ class cs extends ls {
5023
5047
  constructor(t) {
5024
5048
  super(t);
5025
5049
  /** 鼠标是否在画布内 */
@@ -5122,16 +5146,16 @@ class os extends rs {
5122
5146
  keydown(t) {
5123
5147
  const { mouseInCanvas: e, offset: i, delta: n, axisConfig: o } = this, a = t.key;
5124
5148
  if (!e || !this.isDraggable || this.isAuto) return;
5125
- const l = this.getStep(a), c = this.lastClickedOverlay, u = (c == null ? void 0 : c.isDraggable) && this.currentDrawOverlays.includes(c) && (Yt(c.value) ? "Matrix" : ge(c.value) ? "Single" : !1), f = (y, w) => {
5149
+ const l = this.getStep(a), c = this.lastClickedOverlay, u = (c == null ? void 0 : c.isDraggable) && this.currentDrawOverlays.includes(c) && (qt(c.value) ? "Matrix" : ve(c.value) ? "Single" : !1), f = (y, w) => {
5126
5150
  if (!u)
5127
5151
  return i.x += y * l, i.y += w * l, !0;
5128
- const b = this.getAxisValueByPoint(l, 0).xV, [C, E] = [b * o.x, b * o.y];
5152
+ const P = this.getAxisValueByPoint(l, 0).xV, [b, _] = [P * o.x, P * o.y];
5129
5153
  if (u === "Single") {
5130
5154
  const A = c.value;
5131
- A[0] += y * C, A[1] += w * E;
5155
+ A[0] += y * b, A[1] += w * _;
5132
5156
  } else
5133
5157
  c.value.forEach((A) => {
5134
- A[0] += y * C, A[1] += w * E;
5158
+ A[0] += y * b, A[1] += w * _;
5135
5159
  });
5136
5160
  return c.value = [...c.value], !0;
5137
5161
  }, m = (y) => (this.setScale("center", y * n), !0), g = {
@@ -5243,17 +5267,17 @@ class os extends rs {
5243
5267
  } else if (e.length === 2) {
5244
5268
  const { clientX: h, clientY: u } = e[0], { clientX: f, clientY: m } = e[1];
5245
5269
  if (i.length == 2) {
5246
- const p = Ee(
5270
+ const p = De(
5247
5271
  i[0],
5248
5272
  n[0],
5249
5273
  i[1],
5250
5274
  n[1]
5251
- ), g = Ee(
5275
+ ), g = De(
5252
5276
  h,
5253
5277
  u,
5254
5278
  f,
5255
5279
  m
5256
- ), { x: y, y: w } = We(
5280
+ ), { x: y, y: w } = $e(
5257
5281
  h,
5258
5282
  u,
5259
5283
  f,
@@ -5274,7 +5298,7 @@ class os extends rs {
5274
5298
  super.destroy(), (t = this.unBind) == null || t.call(this);
5275
5299
  }
5276
5300
  }
5277
- class et extends Vt {
5301
+ class Y extends Vt {
5278
5302
  constructor(t) {
5279
5303
  super(t);
5280
5304
  /** 覆盖物集合 */
@@ -5297,7 +5321,7 @@ class et extends Vt {
5297
5321
  );
5298
5322
  }
5299
5323
  /** 添加覆盖物 */
5300
- addOverlays(t) {
5324
+ addOverlay(t) {
5301
5325
  var e;
5302
5326
  [t].flat().forEach((i) => {
5303
5327
  i.setNotifyReload(this.notifyReload), i.setMainCanvas(this.mainCanvas), i.parent = this, this.overlays.add(i);
@@ -5308,14 +5332,14 @@ class et extends Vt {
5308
5332
  return this.overlays.has(t);
5309
5333
  }
5310
5334
  /** 移除覆盖物 */
5311
- removeOverlays(t) {
5335
+ removeOverlay(t) {
5312
5336
  var e;
5313
5337
  [t].flat().forEach((i) => {
5314
5338
  this.overlays.delete(i), i.setNotifyReload(), i.setMainCanvas(), i.parent = void 0;
5315
5339
  }), (e = this.notifyReload) == null || e.call(this);
5316
5340
  }
5317
5341
  /** 清空覆盖物 */
5318
- clearOverlays() {
5342
+ clearOverlay() {
5319
5343
  var t;
5320
5344
  (t = this.notifyReload) == null || t.call(this), this.overlays.forEach((e) => {
5321
5345
  e.setNotifyReload(), e.setMainCanvas(), e.parent = void 0;
@@ -5333,7 +5357,7 @@ class et extends Vt {
5333
5357
  }), t;
5334
5358
  }
5335
5359
  }
5336
- class it extends Vt {
5360
+ class j extends Vt {
5337
5361
  constructor(t) {
5338
5362
  super(t);
5339
5363
  d(this, "_zIndex", 4);
@@ -5379,7 +5403,7 @@ class it extends Vt {
5379
5403
  /** 添加覆盖物组 */
5380
5404
  addGroup(t) {
5381
5405
  [t].flat().forEach((e) => {
5382
- e instanceof et && (this.setGroupNotifyReload(e), e.setMainCanvas(this.mainCanvas), e.parent = this, this.groups.set(e.name, e));
5406
+ e instanceof Y && (this.setGroupNotifyReload(e), e.setMainCanvas(this.mainCanvas), e.parent = this, this.groups.set(e.name, e));
5383
5407
  });
5384
5408
  }
5385
5409
  /** 移除覆盖物组 */
@@ -5387,7 +5411,7 @@ class it extends Vt {
5387
5411
  var i;
5388
5412
  let e = !1;
5389
5413
  [t].flat().forEach((n) => {
5390
- n instanceof et && (this.groups.delete(n.name), n.setNotifyReload(), n.setMainCanvas(), n.parent = void 0, e = !0);
5414
+ n instanceof Y && (this.groups.delete(n.name), n.setNotifyReload(), n.setMainCanvas(), n.parent = void 0, e = !0);
5391
5415
  }), e && ((i = this.notifyReload) == null || i.call(this));
5392
5416
  }
5393
5417
  /** 清空覆盖物 */
@@ -5449,7 +5473,7 @@ class Rt extends Vt {
5449
5473
  /** 添加图层 */
5450
5474
  addLayer(t) {
5451
5475
  [t].flat().forEach((e) => {
5452
- e instanceof it && (e.setNotifyReload(this.notifyReload), e.setMainCanvas(this.mainCanvas), e.parent = this, this.layers.set(e.name, e));
5476
+ e instanceof j && (e.setNotifyReload(this.notifyReload), e.setMainCanvas(this.mainCanvas), e.parent = this, this.layers.set(e.name, e));
5453
5477
  });
5454
5478
  }
5455
5479
  /** 删除图层 */
@@ -5457,11 +5481,11 @@ class Rt extends Vt {
5457
5481
  var i;
5458
5482
  let e = !1;
5459
5483
  [t].flat().forEach((n) => {
5460
- n instanceof it && (this.layers.delete(n.name), n.setNotifyReload(), n.setMainCanvas(), n.parent = void 0, e = !0);
5484
+ n instanceof j && (this.layers.delete(n.name), n.setNotifyReload(), n.setMainCanvas(), n.parent = void 0, e = !0);
5461
5485
  }), e && ((i = this.notifyReload) == null || i.call(this));
5462
5486
  }
5463
5487
  /** 清空图层 */
5464
- clearLayers() {
5488
+ clearLayer() {
5465
5489
  var t;
5466
5490
  this.layers.size && (this.layers.forEach((e) => {
5467
5491
  e.setNotifyReload(), e.setMainCanvas(), e.parent = void 0;
@@ -5482,19 +5506,21 @@ class Rt extends Vt {
5482
5506
  return [];
5483
5507
  }
5484
5508
  }
5485
- class as extends os {
5509
+ class hs extends cs {
5486
5510
  /** 获取默认覆盖物群组 */
5487
5511
  getDefaultOverlayGroup() {
5488
- var a, l, c, h, u;
5512
+ var c, h, u, f, m, p, g;
5489
5513
  const s = this.layerGroups.get("默认图层群组");
5490
5514
  if (!s) return;
5491
- const t = (a = s.getLayer("点位图层")) == null ? void 0 : a.getGroup("点位覆盖物群组"), e = (l = s.getLayer("线段图层")) == null ? void 0 : l.getGroup("线段覆盖物群组"), i = (c = s.getLayer("多边形图层")) == null ? void 0 : c.getGroup("多边形覆盖物群组"), n = (h = s.getLayer("文字图层")) == null ? void 0 : h.getGroup("文字覆盖物群组"), o = (u = s.getLayer("自定义绘制图层")) == null ? void 0 : u.getGroup("自定义绘制覆盖物群组");
5515
+ const t = (c = s.getLayer("点位图层")) == null ? void 0 : c.getGroup("点位覆盖物群组"), e = (h = s.getLayer("线段图层")) == null ? void 0 : h.getGroup("线段覆盖物群组"), i = (u = s.getLayer("多边形图层")) == null ? void 0 : u.getGroup("多边形覆盖物群组"), n = (f = s.getLayer("文字图层")) == null ? void 0 : f.getGroup("文字覆盖物群组"), o = (m = s.getLayer("自定义绘制图层")) == null ? void 0 : m.getGroup("自定义绘制覆盖物群组"), a = (p = s.getLayer("图片图层")) == null ? void 0 : p.getGroup("图片覆盖物群组"), l = (g = s.getLayer("其他图层")) == null ? void 0 : g.getGroup("其他覆盖物群组");
5492
5516
  return {
5493
5517
  overlays_text: n,
5494
5518
  overlays_point: t,
5495
5519
  overlays_line: e,
5496
5520
  overlays_polygon: i,
5497
- overlays_custom: o
5521
+ overlays_custom: o,
5522
+ overlays_billboard: a,
5523
+ overlays_other: l
5498
5524
  };
5499
5525
  }
5500
5526
  /**
@@ -5508,10 +5534,10 @@ class as extends os {
5508
5534
  if (i instanceof Rt) {
5509
5535
  if (!i.isVisible) continue;
5510
5536
  e.push(...i.layers.values());
5511
- } else if (i instanceof it) {
5537
+ } else if (i instanceof j) {
5512
5538
  if (!i.isVisible) continue;
5513
5539
  e.push(...i.groups.values());
5514
- } else if (i instanceof et) {
5540
+ } else if (i instanceof Y) {
5515
5541
  if (!i.isVisible) continue;
5516
5542
  e.push(...i.overlays.values());
5517
5543
  } else
@@ -5520,7 +5546,7 @@ class as extends os {
5520
5546
  return t;
5521
5547
  }
5522
5548
  }
5523
- class ls extends as {
5549
+ class us extends hs {
5524
5550
  /** 缩放画布 */
5525
5551
  zoom(s) {
5526
5552
  const { canvas: t, rect: e } = this;
@@ -5553,7 +5579,7 @@ class ls extends as {
5553
5579
  super.setDefaultCenter(s), this.redrawOnce();
5554
5580
  }
5555
5581
  }
5556
- class cs extends ls {
5582
+ class ds extends us {
5557
5583
  /**
5558
5584
  * 调整视图以适应指定覆盖层
5559
5585
  * @param overlays 目标覆盖层数组,默认使用全部可见覆盖层
@@ -5608,16 +5634,16 @@ class cs extends ls {
5608
5634
  const { cycle: n, delta: o, axisConfig: a, rect: l } = this, { width: c, height: h } = l, u = Math.max(0, c - e[1] - e[3]) || c, f = Math.max(0, h - e[0] - e[2]) || h;
5609
5635
  if (u <= 0 || f <= 0)
5610
5636
  return console.warn("无效的可视区域尺寸,边距设置可能不合理"), this.scale;
5611
- const m = s / u, p = t / f, g = Math.max(m, p), y = a.count, w = y / a.min, b = n * o;
5612
- let C;
5637
+ const m = s / u, p = t / f, g = Math.max(m, p), y = a.count, w = y / a.min, P = n * o;
5638
+ let b;
5613
5639
  if (g > w) {
5614
- const E = Math.ceil(g / w);
5615
- C = 1 - ((y * E / g - a.min) / a.min + (E - 2)) * b;
5640
+ const _ = Math.ceil(g / w);
5641
+ b = 1 - ((y * _ / g - a.min) / a.min + (_ - 2)) * P;
5616
5642
  } else {
5617
- const E = (ut, rt, vt) => ut < rt ? vt - 1 : E(ut / 2, rt, vt + 1), A = E(w, g, 0), G = Math.pow(2, A);
5618
- C = 1 + ((y / G / g - a.min) / a.min + A) * b;
5643
+ const _ = (dt, rt, vt) => dt < rt ? vt - 1 : _(dt / 2, rt, vt + 1), A = _(w, g, 0), X = Math.pow(2, A);
5644
+ b = 1 + ((y / X / g - a.min) / a.min + A) * P;
5619
5645
  }
5620
- return i !== void 0 && (C = Math.min(i, C)), C = new D(C).div(o).round().mul(o).toNumber(), C;
5646
+ return i !== void 0 && (b = Math.min(i, b)), b = new R(b).div(o).round().mul(o).toNumber(), b;
5621
5647
  }
5622
5648
  /** 计算目标位置偏移 */
5623
5649
  calculateOffsetDifference(s, t, e, i, n) {
@@ -5665,13 +5691,13 @@ class cs extends ls {
5665
5691
  animateScale(s, t, e, i) {
5666
5692
  const n = t - s;
5667
5693
  let o = 0;
5668
- zt((a) => {
5694
+ Wt((a) => {
5669
5695
  !this.isAuto || !this.canvas || !this.isInteractive || (this.setScale("center", (a - o) * n), o = a, this.redrawOnce(), a === 1 && i());
5670
5696
  }, e);
5671
5697
  }
5672
5698
  /** 执行偏移动画 */
5673
5699
  animateOffset(s, t, e, i) {
5674
- zt((n) => {
5700
+ Wt((n) => {
5675
5701
  !this.isAuto || !this.canvas || !this.isInteractive || (this.offset = {
5676
5702
  x: Number((s.x + t.x * n).toFixed(0)),
5677
5703
  y: Number((s.y + t.y * n).toFixed(0))
@@ -5696,7 +5722,7 @@ class cs extends ls {
5696
5722
  });
5697
5723
  }
5698
5724
  }
5699
- class hs extends cs {
5725
+ class fs extends ds {
5700
5726
  /** 开关坐标轴 */
5701
5727
  toggleAxis(s) {
5702
5728
  this.drawAxis.toggleAxis(s), this.redrawOnce();
@@ -5721,7 +5747,7 @@ class hs extends cs {
5721
5747
  return this.isInteractive = s ?? !this.isInteractive, this.isInteractive;
5722
5748
  }
5723
5749
  }
5724
- class us extends hs {
5750
+ class ms extends fs {
5725
5751
  /**
5726
5752
  * 清除指定区域的像素点
5727
5753
  * @param ctx - Canvas 2D绘图上下文
@@ -5732,9 +5758,9 @@ class us extends hs {
5732
5758
  s.save(), s.beginPath(), s.clip(t), s.clearRect(0, 0, e, i), s.restore();
5733
5759
  }
5734
5760
  }
5735
- class ds extends us {
5761
+ class gs extends ms {
5736
5762
  }
5737
- class fs {
5763
+ class ps {
5738
5764
  constructor(s) {
5739
5765
  /** 画布 */
5740
5766
  d(this, "canvas");
@@ -5847,35 +5873,39 @@ class fs {
5847
5873
  let g = i.y + f + u;
5848
5874
  g = Math.max(Math.min(g, c - u), u + f);
5849
5875
  const y = i.y > c || i.y < 0;
5850
- let w = i.x > 0 ? i.x % p : i.x < 0 ? p + i.x % p : 0, b = s.getAxisValueByPoint((w - i.x) * n.x, 0).xV;
5876
+ let w = i.x > 0 ? i.x % p : i.x < 0 ? p + i.x % p : 0, P = s.getAxisValueByPoint((w - i.x) * n.x, 0).xV;
5851
5877
  for (; w <= l; ) {
5852
- const C = ne(b), E = h(C);
5853
- b !== 0 && this.drawText(C, w - E / 2, g, y), w += p, b = new D(m).mul(n.x).add(b).toNumber();
5878
+ const b = le(P), _ = h(b);
5879
+ P !== 0 && this.drawText(b, w - _ / 2, g, y), w += p, P = new R(m).mul(n.x).add(P).toNumber();
5854
5880
  }
5855
5881
  }
5856
5882
  {
5857
5883
  const g = i.x > l || i.x < 0;
5858
5884
  let y = i.y > 0 ? i.y % p : i.y < 0 ? p + i.y % p : 0, w = s.getAxisValueByPoint(0, (y - i.y) * n.y).yV;
5859
5885
  for (; y <= c; ) {
5860
- const b = ne(w), C = h(b);
5861
- let E = i.x - C - u;
5862
- E = Math.max(Math.min(E, l - C - u), u), w != 0 && this.drawText(b, E, y + f / 2, g), y += p, w = new D(m).mul(n.y).add(w).toNumber();
5886
+ const P = le(w), b = h(P);
5887
+ let _ = i.x - b - u;
5888
+ _ = Math.max(Math.min(_, l - b - u), u), w != 0 && this.drawText(P, _, y + f / 2, g), y += p, w = new R(m).mul(n.y).add(w).toNumber();
5863
5889
  }
5864
5890
  }
5865
5891
  }
5866
5892
  }
5867
- class ms {
5893
+ class vs {
5868
5894
  constructor(s) {
5869
5895
  /** 绑定的画布实例 */
5870
5896
  d(this, "canvas");
5871
- d(this, "layerGroup", new I.LayerGroup({ name: "创建覆盖物图层群组" }));
5897
+ d(this, "layerGroup", new T.LayerGroup({
5898
+ name: "创建覆盖物图层群组"
5899
+ }));
5872
5900
  /** 创建中覆盖物的绘制层(置顶以保证可见) */
5873
- d(this, "overlayLayer", new I.Layer({
5901
+ d(this, "overlayLayer", new T.Layer({
5874
5902
  name: "creator-layer",
5875
5903
  zIndex: 9999
5876
5904
  }));
5877
5905
  /** 该层内的覆盖物分组,便于统一增删 */
5878
- d(this, "overlayGroup", new I.OverlayGroup({ name: "creator-group" }));
5906
+ d(this, "overlayGroup", new T.OverlayGroup({
5907
+ name: "creator-group"
5908
+ }));
5879
5909
  /** 当前正在创建的覆盖物(多边形或线),其顶点通过 overlay.value 即坐标轴上的值表示 */
5880
5910
  d(this, "overlay");
5881
5911
  /** 已确定的顶点在坐标轴上的值列表 [x, y][],对应 overlay.value */
@@ -5913,7 +5943,7 @@ class ms {
5913
5943
  d(this, "handleContextmenu", (s, t) => {
5914
5944
  var i, n;
5915
5945
  if (!this.overlay) return;
5916
- (((i = this.axisValueList) == null ? void 0 : i.length) ?? 0) >= this.minPointCount ? (this.overlay.value = this.axisValueList, (n = this.finish) == null || n.call(this, this.overlay)) : this.overlayGroup.removeOverlays(this.overlay), this.overlay = void 0, this.axisValueList = void 0, this.restoreLayerGroupsInteractive();
5946
+ (((i = this.axisValueList) == null ? void 0 : i.length) ?? 0) >= this.minPointCount ? (this.overlay.value = this.axisValueList, (n = this.finish) == null || n.call(this, this.overlay)) : this.overlayGroup.removeOverlay(this.overlay), this.overlay = void 0, this.axisValueList = void 0, this.restoreLayerGroupsInteractive();
5917
5947
  });
5918
5948
  this.canvas = s, this.overlayLayer.addGroup(this.overlayGroup), this.layerGroup.addLayer(this.overlayLayer), s.setLayerGroup(this.layerGroup), s.addEventListener("click", this.handleClick), s.addEventListener("contextmenu", this.handleContextmenu), s.canvas.addEventListener("mousemove", this.handleMousemove);
5919
5949
  }
@@ -5938,18 +5968,18 @@ class ms {
5938
5968
  }), this.savedLayerGroupInteractive.clear();
5939
5969
  }
5940
5970
  createLine() {
5941
- return this.disableOtherLayerGroups(), this.overlay && this.overlayGroup.removeOverlays(this.overlay), this.axisValueList = [], this.overlay = new I.Line({}), this.overlayGroup.addOverlays(this.overlay), this.overlay;
5971
+ return this.disableOtherLayerGroups(), this.overlay && this.overlayGroup.removeOverlay(this.overlay), this.axisValueList = [], this.overlay = new T.Line({}), this.overlayGroup.addOverlay(this.overlay), this.overlay;
5942
5972
  }
5943
5973
  createPolygon() {
5944
- return this.disableOtherLayerGroups(), this.overlay && this.overlayGroup.removeOverlays(this.overlay), this.axisValueList = [], this.overlay = new I.Polygon({}), this.overlayGroup.addOverlays(this.overlay), this.overlay;
5974
+ return this.disableOtherLayerGroups(), this.overlay && this.overlayGroup.removeOverlay(this.overlay), this.axisValueList = [], this.overlay = new T.Polygon({}), this.overlayGroup.addOverlay(this.overlay), this.overlay;
5945
5975
  }
5946
5976
  /** 从创建层中移除指定覆盖物,不传则清空该层全部 */
5947
- removeOverlays(s) {
5948
- s ? this.overlayGroup.removeOverlays(s) : this.overlayGroup.clearOverlays();
5977
+ removeOverlay(s) {
5978
+ s ? this.overlayGroup.removeOverlay(s) : this.overlayGroup.clearOverlay();
5949
5979
  }
5950
5980
  /** 清空创建层并重置当前创建状态 */
5951
5981
  clear() {
5952
- this.restoreLayerGroupsInteractive(), this.overlayGroup.clearOverlays(), this.overlay = void 0, this.axisValueList = void 0;
5982
+ this.restoreLayerGroupsInteractive(), this.overlayGroup.clearOverlay(), this.overlay = void 0, this.axisValueList = void 0;
5953
5983
  }
5954
5984
  /** 销毁实例:清空覆盖物并移除所有事件监听 */
5955
5985
  destroy() {
@@ -5957,7 +5987,7 @@ class ms {
5957
5987
  }
5958
5988
  /** 当前类型完成绘制所需的最少顶点数(多边形 3,线 2) */
5959
5989
  get minPointCount() {
5960
- return this.overlay instanceof I.Polygon ? 3 : this.overlay instanceof I.Line ? 2 : 0;
5990
+ return this.overlay instanceof T.Polygon ? 3 : this.overlay instanceof T.Line ? 2 : 0;
5961
5991
  }
5962
5992
  /** 从鼠标事件得到坐标轴上的 [x, y],若设置了限位器则先限位再返回 */
5963
5993
  getAxisValueFromEvent(s) {
@@ -5969,7 +5999,7 @@ class ms {
5969
5999
  }
5970
6000
  }
5971
6001
  }
5972
- class gs {
6002
+ class ys {
5973
6003
  /**
5974
6004
  * 计算默认缩放比例,使图像适配视图容器
5975
6005
  * @param naturalWidth 图像原始宽度
@@ -6004,35 +6034,195 @@ class gs {
6004
6034
  };
6005
6035
  }
6006
6036
  }
6007
- function Nt(r) {
6037
+ class ws extends D {
6038
+ constructor() {
6039
+ super(...arguments);
6040
+ d(this, "_ready", !1);
6041
+ d(this, "image", new Image());
6042
+ d(this, "_url");
6043
+ d(this, "_objectFit", "fill");
6044
+ }
6045
+ get ready() {
6046
+ return this._ready;
6047
+ }
6048
+ set ready(t) {
6049
+ var e;
6050
+ this._ready != t && (this._ready = t, (e = this.notifyReload) == null || e.call(this));
6051
+ }
6052
+ get url() {
6053
+ return this._url;
6054
+ }
6055
+ set url(t) {
6056
+ this._url != t && (this._url = t, this.updateBaseData());
6057
+ }
6058
+ get objectFit() {
6059
+ return this._objectFit;
6060
+ }
6061
+ set objectFit(t) {
6062
+ var e;
6063
+ this._objectFit != t && (this._objectFit = t, (e = this.notifyReload) == null || e.call(this));
6064
+ }
6065
+ /** 当前广告牌绘制矩形(左上角坐标 + 宽高) */
6066
+ get drawRect() {
6067
+ const { mainCanvas: t, finalDynamicPosition: e, value: i, image: n, objectFit: o } = this, [a, l] = e[0];
6068
+ let c = n.naturalWidth, h = n.naturalHeight;
6069
+ if (t && i && i.length > 1) {
6070
+ const P = [
6071
+ i[1][0] - i[0][0],
6072
+ i[1][1] - i[0][1]
6073
+ ], b = t.getAxisPointByValue(
6074
+ P[0],
6075
+ P[1]
6076
+ );
6077
+ c = b.x, h = b.y;
6078
+ }
6079
+ const u = {
6080
+ x: a,
6081
+ y: l,
6082
+ w: c,
6083
+ h
6084
+ }, f = n.naturalWidth, m = n.naturalHeight;
6085
+ if (f <= 0 || m <= 0 || u.w <= 0 || u.h <= 0)
6086
+ return u;
6087
+ const p = u.w / u.h, g = f / m;
6088
+ if (o === "fill") return u;
6089
+ if (o === "contain" || o === "scale-down") {
6090
+ const P = Math.min(u.w / f, u.h / m), b = o === "scale-down" ? Math.min(1, P) : P, _ = f * b, A = m * b;
6091
+ return {
6092
+ x: u.x + (u.w - _) / 2,
6093
+ y: u.y + (u.h - A) / 2,
6094
+ w: _,
6095
+ h: A
6096
+ };
6097
+ }
6098
+ if (g > p) {
6099
+ const P = m * p, b = (f - P) / 2;
6100
+ return {
6101
+ ...u,
6102
+ sx: b,
6103
+ sy: 0,
6104
+ sw: P,
6105
+ sh: m
6106
+ };
6107
+ }
6108
+ const y = f / p, w = (m - y) / 2;
6109
+ return {
6110
+ ...u,
6111
+ sx: 0,
6112
+ sy: w,
6113
+ sw: f,
6114
+ sh: y
6115
+ };
6116
+ }
6117
+ loadImage() {
6118
+ this.ready = !1, this.url && (this.image.onload = () => {
6119
+ this.ready = !0;
6120
+ }, this.image.onerror = () => {
6121
+ this.ready = !1, console.error("图片加载失败");
6122
+ }, this.image.src = this.url);
6123
+ }
6124
+ updateBaseData() {
6125
+ this.mainCanvas && (this.loadImage(), this.handleValuePosition("array2D", 1));
6126
+ }
6127
+ }
6128
+ class ae extends ws {
6129
+ constructor(t) {
6130
+ super(t);
6131
+ d(this, "defaultDragg", (t, e) => {
6132
+ var l;
6133
+ const { offsetX: i, offsetY: n } = t.data, { x: o, y: a } = this.calculateOffset(i, n);
6134
+ this.value.forEach((c, h) => {
6135
+ this.value[h] = [
6136
+ k.add(this.value[h][0], o.value),
6137
+ k.add(this.value[h][1], a.value)
6138
+ ], this.position[h] = [
6139
+ k.add(this.position[h][0], o.position),
6140
+ k.add(this.position[h][1], a.position)
6141
+ ], this.dynamicPosition[h] = [
6142
+ k.add(this.dynamicPosition[h][0], o.dynamicPosition),
6143
+ k.add(this.dynamicPosition[h][1], a.dynamicPosition)
6144
+ ];
6145
+ }), (l = this.notifyReload) == null || l.call(this), this.updateValueScope();
6146
+ });
6147
+ const { url: e, objectFit: i } = t;
6148
+ Object.assign(this, { url: e, objectFit: i }), this.addEventListener("dragg", this.defaultDragg);
6149
+ }
6150
+ updateValueScope() {
6151
+ this.initValueScope();
6152
+ }
6153
+ isPointInPath(t, e) {
6154
+ return this.path ? D.ctx.isPointInPath(this.path, t, e) : !1;
6155
+ }
6156
+ isPointInStroke(t, e) {
6157
+ return !1;
6158
+ }
6159
+ /** 设置样式 */
6160
+ setOverlayStyles(t) {
6161
+ var o;
6162
+ const e = this.mainCanvas, i = e.style[e.theme].billboard;
6163
+ let n = {};
6164
+ return typeof this.style == "string" ? n = ((o = e.style[this.style]) == null ? void 0 : o.billboard) || i : typeof this.style == "object" ? n = ct(
6165
+ JSON.parse(JSON.stringify(i)),
6166
+ this.style
6167
+ ) : n = i, t && this.setBaseLineStyle(t, n.stroke), n;
6168
+ }
6169
+ get computedValueScopeStyles() {
6170
+ return {};
6171
+ }
6172
+ draw(t) {
6173
+ const { mainCanvas: e, ready: i, image: n, isHover: o } = this;
6174
+ if (!e || !i) return;
6175
+ this.setGlobalAlpha(t), this.setOverlayStyles(t);
6176
+ const { x: a, y: l, w: c, h, sx: u, sy: f, sw: m, sh: p } = this.drawRect;
6177
+ typeof u == "number" && typeof f == "number" && typeof m == "number" && typeof p == "number" ? t.drawImage(n, u, f, m, p, a, l, c, h) : t.drawImage(n, a, l, c, h), o && t.strokeRect(a, l, c, h), this.path = new Path2D(), this.path.rect(a, l, c, h);
6178
+ }
6179
+ getDraw() {
6180
+ if (this.isNeedRender) {
6181
+ if (this.isRecalculate) {
6182
+ const { position: t, mainCanvas: e } = this;
6183
+ this.internalUpdate({
6184
+ dynamicPosition: e.transformPosition(t)
6185
+ });
6186
+ }
6187
+ return [this.draw, this];
6188
+ }
6189
+ }
6190
+ }
6191
+ function Ht(r) {
6008
6192
  return [r].flat(1 / 0);
6009
6193
  }
6010
- class I extends ds {
6194
+ class T extends gs {
6011
6195
  constructor(t) {
6012
6196
  super(t);
6013
6197
  /** 按坐标轴值创建覆盖物(多边形/线)的交互管理 */
6014
6198
  d(this, "overlayCreator");
6015
- this.drawAxis = new fs(this), "axisShow" in t && this.toggleAxis(t.axisShow), this.overlayCreator = new ms(this), this.initLayerGroups(), this.updateCenter();
6199
+ this.drawAxis = new ps(this), "axisShow" in t && this.toggleAxis(t.axisShow), this.overlayCreator = new vs(this), this.initLayerGroups(), this.updateCenter();
6016
6200
  }
6017
6201
  initLayerGroups() {
6018
- const t = new it({ name: "多边形图层", zIndex: 1 });
6019
- t.addGroup(new et({ name: "多边形覆盖物群组" }));
6020
- const e = new it({ name: "线段图层", zIndex: 2 });
6021
- e.addGroup(new et({ name: "线段覆盖物群组" }));
6022
- const i = new it({ name: "点位图层", zIndex: 3 });
6023
- i.addGroup(new et({ name: "点位覆盖物群组" }));
6024
- const n = new it({ name: "文字图层", zIndex: 4 });
6025
- n.addGroup(new et({ name: "文字覆盖物群组" }));
6026
- const o = new it({ name: "自定义绘制图层", zIndex: 5 });
6027
- o.addGroup(new et({ name: "自定义绘制覆盖物群组" }));
6028
- const a = new Rt({ name: "默认图层群组" });
6029
- a.addLayer([
6202
+ const t = new j({ name: "其他图层", zIndex: 1 });
6203
+ t.addGroup(new Y({ name: "其他覆盖物群组" }));
6204
+ const e = new j({ name: "图片图层", zIndex: 2 });
6205
+ e.addGroup(new Y({ name: "图片覆盖物群组" }));
6206
+ const i = new j({ name: "多边形图层", zIndex: 3 });
6207
+ i.addGroup(new Y({ name: "多边形覆盖物群组" }));
6208
+ const n = new j({ name: "线段图层", zIndex: 4 });
6209
+ n.addGroup(new Y({ name: "线段覆盖物群组" }));
6210
+ const o = new j({ name: "点位图层", zIndex: 5 });
6211
+ o.addGroup(new Y({ name: "点位覆盖物群组" }));
6212
+ const a = new j({ name: "文字图层", zIndex: 6 });
6213
+ a.addGroup(new Y({ name: "文字覆盖物群组" }));
6214
+ const l = new j({ name: "自定义绘制图层", zIndex: 7 });
6215
+ l.addGroup(new Y({ name: "自定义绘制覆盖物群组" }));
6216
+ const c = new Rt({ name: "默认图层群组" });
6217
+ c.addLayer([
6218
+ a,
6219
+ o,
6030
6220
  n,
6031
6221
  i,
6222
+ l,
6032
6223
  e,
6033
- t,
6034
- o
6035
- ]), this.setLayerGroup(a);
6224
+ t
6225
+ ]), this.setLayerGroup(c);
6036
6226
  }
6037
6227
  /** 获取图层群组 集合 */
6038
6228
  gteLayerGroups(t = "默认图层群组") {
@@ -6049,12 +6239,12 @@ class I extends ds {
6049
6239
  /** 添加图层 */
6050
6240
  addLayer(t) {
6051
6241
  const e = this.layerGroups.get("默认图层群组");
6052
- e && e.addLayer(Nt(t));
6242
+ e && e.addLayer(Ht(t));
6053
6243
  }
6054
6244
  /** 移除图层 */
6055
6245
  removeLayer(t) {
6056
6246
  const e = this.layerGroups.get("默认图层群组");
6057
- e && e.removeLayer(Nt(t));
6247
+ e && e.removeLayer(Ht(t));
6058
6248
  }
6059
6249
  /** 添加覆盖物 */
6060
6250
  addOverlay(t) {
@@ -6063,10 +6253,12 @@ class I extends ds {
6063
6253
  overlays_point: i,
6064
6254
  overlays_line: n,
6065
6255
  overlays_polygon: o,
6066
- overlays_custom: a
6256
+ overlays_custom: a,
6257
+ overlays_billboard: l,
6258
+ overlays_other: c
6067
6259
  } = this.getDefaultOverlayGroup() || {};
6068
- Nt(t).forEach((l) => {
6069
- l instanceof Ut ? e == null || e.addOverlays(l) : l instanceof lt ? i == null || i.addOverlays(l) : l instanceof Xt || l instanceof fe || l instanceof me ? n == null || n.addOverlays(l) : l instanceof Gt ? o == null || o.addOverlays(l) : l instanceof Bt && (a == null || a.addOverlays(l));
6260
+ Ht(t).forEach((h) => {
6261
+ h instanceof Ut ? e == null || e.addOverlay(h) : h instanceof lt ? i == null || i.addOverlay(h) : h instanceof Xt || h instanceof Yt || h instanceof jt ? n == null || n.addOverlay(h) : h instanceof zt ? o == null || o.addOverlay(h) : h instanceof Gt ? a == null || a.addOverlay(h) : h instanceof ae ? l == null || l.addOverlay(h) : c == null || c.addOverlay(h);
6070
6262
  });
6071
6263
  }
6072
6264
  /** 移除覆盖物 */
@@ -6076,10 +6268,12 @@ class I extends ds {
6076
6268
  overlays_point: i,
6077
6269
  overlays_line: n,
6078
6270
  overlays_polygon: o,
6079
- overlays_custom: a
6271
+ overlays_custom: a,
6272
+ overlays_billboard: l,
6273
+ overlays_other: c
6080
6274
  } = this.getDefaultOverlayGroup() || {};
6081
- Nt(t).forEach((l) => {
6082
- l instanceof Ut ? e == null || e.removeOverlays(l) : l instanceof lt ? i == null || i.removeOverlays(l) : l instanceof Xt ? n == null || n.removeOverlays(l) : l instanceof Gt ? o == null || o.removeOverlays(l) : l instanceof Bt && (a == null || a.addOverlays(l));
6275
+ Ht(t).forEach((h) => {
6276
+ h instanceof Ut ? e == null || e.removeOverlay(h) : h instanceof lt ? i == null || i.removeOverlay(h) : h instanceof Xt || h instanceof Yt || h instanceof jt ? n == null || n.removeOverlay(h) : h instanceof zt ? o == null || o.removeOverlay(h) : h instanceof Gt ? a == null || a.addOverlay(h) : h instanceof ae ? l == null || l.removeOverlay(h) : c == null || c.removeOverlay(h);
6083
6277
  });
6084
6278
  }
6085
6279
  /** 销毁 */
@@ -6088,18 +6282,19 @@ class I extends ds {
6088
6282
  }
6089
6283
  }
6090
6284
  /** 视图适配工具:默认缩放、居中计算 */
6091
- d(I, "ViewFit", gs), /** 图层群组 */
6092
- d(I, "LayerGroup", Rt), /** 图层 */
6093
- d(I, "Layer", it), /** 覆盖物群组 */
6094
- d(I, "OverlayGroup", et), /** 文字 */
6095
- d(I, "Text", Ut), /** 点位 */
6096
- d(I, "Point", lt), /** 线段 */
6097
- d(I, "Line", Xt), /** 多边形 */
6098
- d(I, "Polygon", Gt), /** 自定义绘制 */
6099
- d(I, "Custom", Bt), /** 圆弧 */
6100
- d(I, "Arc", fe), /** 圆角 */
6101
- d(I, "ArcTo", me);
6102
- class ps {
6285
+ d(T, "ViewFit", ys), /** 图层群组 */
6286
+ d(T, "LayerGroup", Rt), /** 图层 */
6287
+ d(T, "Layer", j), /** 覆盖物群组 */
6288
+ d(T, "OverlayGroup", Y), /** 文字 */
6289
+ d(T, "Text", Ut), /** 点位 */
6290
+ d(T, "Point", lt), /** 线段 */
6291
+ d(T, "Line", Xt), /** 多边形 */
6292
+ d(T, "Polygon", zt), /** 自定义绘制 */
6293
+ d(T, "Custom", Gt), /** 圆弧 */
6294
+ d(T, "Arc", Yt), /** 圆角 */
6295
+ d(T, "ArcTo", jt), /** 图片 */
6296
+ d(T, "Billboard", ae);
6297
+ class xs {
6103
6298
  /** @param id canvas DOM id(通过 getElementById 定位) */
6104
6299
  constructor(s) {
6105
6300
  /** Canvas DOM id(用于 `document.getElementById` 定位) */
@@ -6153,7 +6348,7 @@ class ps {
6153
6348
  this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = void 0);
6154
6349
  }
6155
6350
  }
6156
- class vs {
6351
+ class Ps {
6157
6352
  /**
6158
6353
  * @param canvas 绑定 mousedown 的 canvas
6159
6354
  * @param onOffsetDelta 拖拽时的 dx 回调(由外部映射到时间偏移)
@@ -6192,7 +6387,7 @@ class vs {
6192
6387
  this.canvas.removeEventListener("mousedown", this.handleMouseDown), window.removeEventListener("mousemove", this.handleMouseMove), window.removeEventListener("mouseup", this.handleMouseUp);
6193
6388
  }
6194
6389
  }
6195
- class ys {
6390
+ class bs {
6196
6391
  /**
6197
6392
  * @param canvas 绑定 wheel 事件的 canvas
6198
6393
  * @param getTimeSpacing 读取当前 timeSpacing 的函数
@@ -6227,7 +6422,7 @@ class ys {
6227
6422
  this.canvas.removeEventListener("wheel", this.handleWheel);
6228
6423
  }
6229
6424
  }
6230
- class ws {
6425
+ class Cs {
6231
6426
  /**
6232
6427
  * 只负责计算鼠标所在 x/y 对应的时间,并把结果通知给 TimeAxis(不直接操作 DOM)。
6233
6428
  */
@@ -6264,10 +6459,10 @@ class ws {
6264
6459
  this.canvas.removeEventListener("mousemove", this.handleMouseMove), this.canvas.removeEventListener("mouseleave", this.handleMouseLeave);
6265
6460
  }
6266
6461
  }
6267
- const xs = {
6462
+ const Ss = {
6268
6463
  easeInOutQuad: (r) => r < 0.5 ? 2 * r * r : 1 - Math.pow(-2 * r + 2, 2) / 2
6269
6464
  };
6270
- class Ps {
6465
+ class Es {
6271
6466
  /**
6272
6467
  * 创建时间轴引擎:会在构造后 `requestAnimationFrame` 初始化并开始渲染。
6273
6468
  * @param id canvas DOM id
@@ -6313,13 +6508,13 @@ class Ps {
6313
6508
  * 可用于叠加额外图形(如指示线、事件点等)
6314
6509
  */
6315
6510
  d(this, "onDrawOverlay");
6316
- this.canvasManager = new ps(s), this.onMouseTimeChange = t, requestAnimationFrame(() => this.init());
6511
+ this.canvasManager = new xs(s), this.onMouseTimeChange = t, requestAnimationFrame(() => this.init());
6317
6512
  }
6318
6513
  /** 初始化交互:拖拽平移、滚轮缩放、鼠标时间通知,并触发首次绘制 */
6319
6514
  init() {
6320
6515
  if (!this.canvasManager.init(() => this.render())) return;
6321
6516
  const t = this.canvasManager.getCanvas();
6322
- t && (this.offsetDrag = new vs(
6517
+ t && (this.offsetDrag = new Ps(
6323
6518
  t,
6324
6519
  (e) => {
6325
6520
  this.currentTime -= Math.round(
@@ -6329,14 +6524,14 @@ class Ps {
6329
6524
  () => {
6330
6525
  this.stopCenterTimeAnimation();
6331
6526
  }
6332
- ), this.wheelZoom = new ys(
6527
+ ), this.wheelZoom = new bs(
6333
6528
  t,
6334
6529
  () => this.timeSpacing,
6335
6530
  (e, i) => {
6336
6531
  const n = this.getTimeAtCanvasX(i);
6337
6532
  this.timeSpacing = e, this.setTimeAtCanvasX(n, i), this.render();
6338
6533
  }
6339
- ), this.centerTime = Date.now(), this.mouseTimeReporter = new ws(
6534
+ ), this.centerTime = Date.now(), this.mouseTimeReporter = new Cs(
6340
6535
  t,
6341
6536
  (e) => this.getTimeAtCanvasX(e),
6342
6537
  (e) => {
@@ -6378,10 +6573,10 @@ class Ps {
6378
6573
  const m = e / o;
6379
6574
  let p = h, g = 0, y = u;
6380
6575
  for (; y <= f; ) {
6381
- const w = g % o === 0, b = w ? a : l;
6382
- if (s.fillRect(y, 0, 1, b), w) {
6383
- const C = Qe(p, "MM-DD hh:mm:ss");
6384
- s.fillText(C, y, c), p += t;
6576
+ const w = g % o === 0, P = w ? a : l;
6577
+ if (s.fillRect(y, 0, 1, P), w) {
6578
+ const b = ti(p, "MM-DD hh:mm:ss");
6579
+ s.fillText(b, y, c), p += t;
6385
6580
  }
6386
6581
  y += m, g++;
6387
6582
  }
@@ -6435,8 +6630,8 @@ class Ps {
6435
6630
  Math.max(0.5, h)
6436
6631
  );
6437
6632
  return Math.max(1, Math.round(u * 60));
6438
- })(), a = (t == null ? void 0 : t.curve) ?? xs.easeInOutQuad;
6439
- Ze(
6633
+ })(), a = (t == null ? void 0 : t.curve) ?? Ss.easeInOutQuad;
6634
+ Ke(
6440
6635
  0,
6441
6636
  1,
6442
6637
  o,
@@ -6457,7 +6652,7 @@ class Ps {
6457
6652
  (s = this.offsetDrag) == null || s.destroy(), (t = this.wheelZoom) == null || t.destroy(), (e = this.mouseTimeReporter) == null || e.destroy(), this.canvasManager.destroy();
6458
6653
  }
6459
6654
  }
6460
- class un extends Ps {
6655
+ class fn extends Es {
6461
6656
  /**
6462
6657
  * 将填充样式解析为 ctx.fillStyle 可用的值(纯色或线性渐变)
6463
6658
  * @param rect 矩形区域,用于计算渐变起止点
@@ -6499,8 +6694,107 @@ class un extends Ps {
6499
6694
  g && (t.fillStyle = g), h && (t.strokeStyle = h), t.lineWidth = u, t.beginPath(), typeof t.roundRect == "function" ? t.roundRect(f, o, p, a + o, l) : t.rect(f, o, p, a + o), c && t.fill(), h && t.stroke();
6500
6695
  }
6501
6696
  }
6502
- function dn(r) {
6503
- const s = Oe(r, 100);
6697
+ function Ot(r) {
6698
+ if (typeof r == "string") {
6699
+ const s = document.querySelector(r);
6700
+ if (s)
6701
+ return s;
6702
+ console.error(`Element "${r}" not found`);
6703
+ } else
6704
+ return r || document.documentElement;
6705
+ }
6706
+ function We(r) {
6707
+ const s = Ot(r);
6708
+ return s ? s.requestFullscreen ? s.requestFullscreen() : s.mozRequestFullScreen ? s.mozRequestFullScreen() : s.webkitRequestFullscreen ? s.webkitRequestFullscreen() : s.msRequestFullscreen ? s.msRequestFullscreen() : Promise.reject("No Fullscreen API") : Promise.reject("No Element");
6709
+ }
6710
+ function qe() {
6711
+ const r = document;
6712
+ return document.exitFullscreen ? document.exitFullscreen() : r.mozCancelFullScreen ? r.mozCancelFullScreen() : r.webkitExitFullscreen ? r.webkitExitFullscreen() : r.msExitFullscreen ? r.msExitFullscreen() : Promise.reject("No ExitFullscreen API");
6713
+ }
6714
+ function Jt(r) {
6715
+ const s = Ot(r), t = document, e = document.fullscreenElement || t.webkitFullscreenElement || t.mozFullScreenElement || t.msFullscreenElement;
6716
+ return s == e || !r && window.innerWidth == screen.width && window.innerHeight == screen.height;
6717
+ }
6718
+ function mn(r) {
6719
+ if (r = Ot(r), !!r)
6720
+ return function() {
6721
+ Jt(r) ? qe() : We(r);
6722
+ };
6723
+ }
6724
+ function gn(r, s) {
6725
+ const t = Ot(s);
6726
+ if (!t) return;
6727
+ const e = () => {
6728
+ r(Jt(t));
6729
+ };
6730
+ return document.addEventListener("fullscreenchange", e), document.addEventListener("webkitfullscreenchange", e), document.addEventListener("mozfullscreenchange", e), document.addEventListener("MSFullscreenChange", e), e(), () => {
6731
+ document.removeEventListener("fullscreenchange", e), document.removeEventListener("webkitfullscreenchange", e), document.removeEventListener("mozfullscreenchange", e), document.removeEventListener("MSFullscreenChange", e);
6732
+ };
6733
+ }
6734
+ class pn {
6735
+ constructor(s, t) {
6736
+ /** 要全屏展示的目标元素 */
6737
+ d(this, "targetElement");
6738
+ /**
6739
+ * 全屏状态变化回调。参数为 `true` 表示当前全屏元素为本实例的目标元素。
6740
+ */
6741
+ d(this, "onFullscreenChange");
6742
+ /** 解除 {@link attachFullscreenChangeListeners} 注册的 document 监听 */
6743
+ d(this, "detachFullscreenListeners");
6744
+ this.init(s), this.onFullscreenChange = t, this.attachFullscreenChangeListeners();
6745
+ }
6746
+ /**
6747
+ * 设置或更新目标元素(`HTMLElement` 或 CSS 选择器;未传时内部会回退到 `document.documentElement`)
6748
+ */
6749
+ init(s) {
6750
+ this.targetElement = Ot(s);
6751
+ }
6752
+ /** 使目标元素进入浏览器全屏 */
6753
+ enter() {
6754
+ this.targetElement && We(this.targetElement);
6755
+ }
6756
+ /** 退出浏览器全屏(不区分由哪个元素进入) */
6757
+ exit() {
6758
+ this.targetElement && qe();
6759
+ }
6760
+ /** 若当前已为该目标全屏则退出,否则进入全屏 */
6761
+ toggle() {
6762
+ this.targetElement && (Jt(this.targetElement) ? this.exit() : this.enter());
6763
+ }
6764
+ attachFullscreenChangeListeners() {
6765
+ const s = () => {
6766
+ !this.targetElement || !this.onFullscreenChange || this.onFullscreenChange(Jt(this.targetElement));
6767
+ };
6768
+ document.addEventListener("fullscreenchange", s), document.addEventListener(
6769
+ "webkitfullscreenchange",
6770
+ s
6771
+ ), document.addEventListener(
6772
+ "mozfullscreenchange",
6773
+ s
6774
+ ), document.addEventListener("MSFullscreenChange", s), s(), this.detachFullscreenListeners = () => {
6775
+ document.removeEventListener(
6776
+ "fullscreenchange",
6777
+ s
6778
+ ), document.removeEventListener(
6779
+ "webkitfullscreenchange",
6780
+ s
6781
+ ), document.removeEventListener(
6782
+ "mozfullscreenchange",
6783
+ s
6784
+ ), document.removeEventListener(
6785
+ "MSFullscreenChange",
6786
+ s
6787
+ );
6788
+ };
6789
+ }
6790
+ /** 移除全屏事件监听,实例不应再使用 */
6791
+ destroy() {
6792
+ var s;
6793
+ (s = this.detachFullscreenListeners) == null || s.call(this), this.detachFullscreenListeners = void 0, this.targetElement = void 0, this.onFullscreenChange = void 0;
6794
+ }
6795
+ }
6796
+ function vn(r) {
6797
+ const s = Le(r, 100);
6504
6798
  let t = 0, e = 0;
6505
6799
  return function(i) {
6506
6800
  const n = i.target;
@@ -6528,7 +6822,7 @@ function dn(r) {
6528
6822
  f(), m();
6529
6823
  };
6530
6824
  }
6531
- function fn(r, s, t) {
6825
+ function yn(r, s, t) {
6532
6826
  const { isClickAllowed: e, uiLibrary: i = ["naiveUI", "ElementPlus", "Element"] } = t || {}, n = function(l) {
6533
6827
  const c = [];
6534
6828
  for (const h in l)
@@ -6560,21 +6854,21 @@ function fn(r, s, t) {
6560
6854
  () => document.addEventListener("mousedown", a)
6561
6855
  );
6562
6856
  }
6563
- var Y, dt, ft, xt, Pt, Z, Q, st, bt;
6564
- class mn {
6857
+ var W, ft, mt, xt, Pt, J, K, st, bt;
6858
+ class wn {
6565
6859
  constructor() {
6566
- T(this, Y);
6567
- T(this, dt, !1);
6568
- T(this, ft, {});
6569
- T(this, xt, 0);
6570
- T(this, Pt, 0);
6571
- T(this, Z, 0);
6572
- T(this, Q, 0);
6573
- T(this, st);
6574
- T(this, bt);
6860
+ L(this, W);
6861
+ L(this, ft, !1);
6862
+ L(this, mt, {});
6863
+ L(this, xt, 0);
6864
+ L(this, Pt, 0);
6865
+ L(this, J, 0);
6866
+ L(this, K, 0);
6867
+ L(this, st);
6868
+ L(this, bt);
6575
6869
  }
6576
6870
  init(s, t) {
6577
- M(this, Y, s), M(this, st, t == null ? void 0 : t.limit), M(this, bt, t == null ? void 0 : t.dragDom), M(this, ft, {
6871
+ M(this, W, s), M(this, st, t == null ? void 0 : t.limit), M(this, bt, t == null ? void 0 : t.dragDom), M(this, mt, {
6578
6872
  mousedown: this.mousedown.bind(this),
6579
6873
  mousemove: this.mousemove.bind(this),
6580
6874
  mouseup: this.mouseup.bind(this)
@@ -6585,45 +6879,45 @@ class mn {
6585
6879
  }
6586
6880
  bindOrUnbindEvent(s) {
6587
6881
  const t = s === "bind" ? "addEventListener" : "removeEventListener";
6588
- if (!x(this, Y)) return console.error("No DOM");
6589
- x(this, Y)[t]("mousedown", x(this, ft).mousedown), document[t]("mousemove", x(this, ft).mousemove), document[t]("mouseup", x(this, ft).mouseup);
6882
+ if (!x(this, W)) return console.error("No DOM");
6883
+ x(this, W)[t]("mousedown", x(this, mt).mousedown), document[t]("mousemove", x(this, mt).mousemove), document[t]("mouseup", x(this, mt).mouseup);
6590
6884
  }
6591
6885
  alterLocation() {
6592
- if (!x(this, Y)) return console.error("No DOM");
6593
- x(this, st) && (M(this, Z, Math.min(x(this, Z), x(this, st).max.top)), M(this, Z, Math.max(x(this, Z), x(this, st).min.top)), M(this, Q, Math.min(x(this, Q), x(this, st).max.left)), M(this, Q, Math.max(x(this, Q), x(this, st).min.left))), x(this, Y).style.setProperty("--top", x(this, Z) + "px"), x(this, Y).style.setProperty("--left", x(this, Q) + "px");
6886
+ if (!x(this, W)) return console.error("No DOM");
6887
+ x(this, st) && (M(this, J, Math.min(x(this, J), x(this, st).max.top)), M(this, J, Math.max(x(this, J), x(this, st).min.top)), M(this, K, Math.min(x(this, K), x(this, st).max.left)), M(this, K, Math.max(x(this, K), x(this, st).min.left))), x(this, W).style.setProperty("--top", x(this, J) + "px"), x(this, W).style.setProperty("--left", x(this, K) + "px");
6594
6888
  }
6595
6889
  mousedown(s) {
6596
- if (!x(this, Y)) return console.error("No DOM");
6890
+ if (!x(this, W)) return console.error("No DOM");
6597
6891
  if (x(this, bt) && s.target != x(this, bt)) return;
6598
- document.body.classList.add("no-select"), M(this, dt, !0);
6599
- const t = x(this, Y).getBoundingClientRect(), { pageX: e, pageY: i } = s;
6600
- M(this, xt, e), M(this, Pt, i), M(this, Z, t.y), M(this, Q, t.x);
6892
+ document.body.classList.add("no-select"), M(this, ft, !0);
6893
+ const t = x(this, W).getBoundingClientRect(), { pageX: e, pageY: i } = s;
6894
+ M(this, xt, e), M(this, Pt, i), M(this, J, t.y), M(this, K, t.x);
6601
6895
  }
6602
6896
  mousemove(s) {
6603
6897
  const { pageX: t, pageY: e } = s;
6604
- x(this, dt) && (M(this, Z, x(this, Z) + (e - x(this, Pt))), M(this, Q, x(this, Q) + (t - x(this, xt))), M(this, xt, t), M(this, Pt, e), this.alterLocation());
6898
+ x(this, ft) && (M(this, J, x(this, J) + (e - x(this, Pt))), M(this, K, x(this, K) + (t - x(this, xt))), M(this, xt, t), M(this, Pt, e), this.alterLocation());
6605
6899
  }
6606
6900
  mouseup() {
6607
- x(this, dt) && (M(this, dt, !1), document.body.classList.remove("no-select"));
6901
+ x(this, ft) && (M(this, ft, !1), document.body.classList.remove("no-select"));
6608
6902
  }
6609
6903
  }
6610
- Y = new WeakMap(), dt = new WeakMap(), ft = new WeakMap(), xt = new WeakMap(), Pt = new WeakMap(), Z = new WeakMap(), Q = new WeakMap(), st = new WeakMap(), bt = new WeakMap();
6611
- var W, mt, gt, Ct, St, j, q, U, _t, Et;
6612
- class gn {
6904
+ W = new WeakMap(), ft = new WeakMap(), mt = new WeakMap(), xt = new WeakMap(), Pt = new WeakMap(), J = new WeakMap(), K = new WeakMap(), st = new WeakMap(), bt = new WeakMap();
6905
+ var q, gt, pt, Ct, St, $, Z, G, Et, _t;
6906
+ class xn {
6613
6907
  constructor() {
6614
- T(this, W);
6615
- T(this, mt, !1);
6616
- T(this, gt, {});
6617
- T(this, Ct, 0);
6618
- T(this, St, 0);
6619
- T(this, j, 0);
6620
- T(this, q, 0);
6621
- T(this, U);
6622
- T(this, _t);
6623
- T(this, Et);
6908
+ L(this, q);
6909
+ L(this, gt, !1);
6910
+ L(this, pt, {});
6911
+ L(this, Ct, 0);
6912
+ L(this, St, 0);
6913
+ L(this, $, 0);
6914
+ L(this, Z, 0);
6915
+ L(this, G);
6916
+ L(this, Et);
6917
+ L(this, _t);
6624
6918
  }
6625
6919
  init(s, t = {}) {
6626
- M(this, W, s), M(this, U, t.limit), M(this, _t, t.update_move), M(this, Et, t.update_up), M(this, gt, {
6920
+ M(this, q, s), M(this, G, t.limit), M(this, Et, t.update_move), M(this, _t, t.update_up), M(this, pt, {
6627
6921
  mousedown: this.mousedown.bind(this),
6628
6922
  mousemove: this.mousemove.bind(this),
6629
6923
  mouseup: this.mouseup.bind(this)
@@ -6634,17 +6928,17 @@ class gn {
6634
6928
  }
6635
6929
  bindOrUnbindEvent(s) {
6636
6930
  const t = s === "bind" ? "addEventListener" : "removeEventListener";
6637
- if (!x(this, W)) return console.error("No DOM");
6638
- x(this, W)[t]("mousedown", x(this, gt).mousedown), document[t]("mousemove", x(this, gt).mousemove), document[t]("mouseup", x(this, gt).mouseup);
6931
+ if (!x(this, q)) return console.error("No DOM");
6932
+ x(this, q)[t]("mousedown", x(this, pt).mousedown), document[t]("mousemove", x(this, pt).mousemove), document[t]("mouseup", x(this, pt).mouseup);
6639
6933
  }
6640
6934
  updateValue() {
6641
6935
  const s = {
6642
- top: x(this, j),
6643
- left: x(this, q),
6936
+ top: x(this, $),
6937
+ left: x(this, Z),
6644
6938
  percentage: { top: 0, left: 0 }
6645
6939
  };
6646
- if (x(this, U)) {
6647
- const t = (e) => x(this, U) ? (s[e] - x(this, U).min[e]) / (x(this, U).max[e] - x(this, U).min[e]) : 0;
6940
+ if (x(this, G)) {
6941
+ const t = (e) => x(this, G) ? (s[e] - x(this, G).min[e]) / (x(this, G).max[e] - x(this, G).min[e]) : 0;
6648
6942
  s.percentage = {
6649
6943
  top: t("top") || 0,
6650
6944
  left: t("left") || 0
@@ -6653,64 +6947,27 @@ class gn {
6653
6947
  return s;
6654
6948
  }
6655
6949
  alterLocation() {
6656
- if (!x(this, W)) return console.error("No DOM");
6657
- x(this, U) && (M(this, j, Math.min(x(this, j), x(this, U).max.top)), M(this, j, Math.max(x(this, j), x(this, U).min.top)), M(this, q, Math.min(x(this, q), x(this, U).max.left)), M(this, q, Math.max(x(this, q), x(this, U).min.left))), x(this, _t) && x(this, _t).call(this, this.updateValue()), x(this, W).style.setProperty("--top", x(this, j) + "px"), x(this, W).style.setProperty("--left", x(this, q) + "px");
6950
+ if (!x(this, q)) return console.error("No DOM");
6951
+ x(this, G) && (M(this, $, Math.min(x(this, $), x(this, G).max.top)), M(this, $, Math.max(x(this, $), x(this, G).min.top)), M(this, Z, Math.min(x(this, Z), x(this, G).max.left)), M(this, Z, Math.max(x(this, Z), x(this, G).min.left))), x(this, Et) && x(this, Et).call(this, this.updateValue()), x(this, q).style.setProperty("--top", x(this, $) + "px"), x(this, q).style.setProperty("--left", x(this, Z) + "px");
6658
6952
  }
6659
6953
  mousedown(s) {
6660
- if (!x(this, W)) return console.error("No DOM");
6661
- document.body.classList.add("no-select"), M(this, mt, !0);
6662
- const t = x(this, W).getBoundingClientRect();
6954
+ if (!x(this, q)) return console.error("No DOM");
6955
+ document.body.classList.add("no-select"), M(this, gt, !0);
6956
+ const t = x(this, q).getBoundingClientRect();
6663
6957
  M(this, St, t.y), M(this, Ct, t.x);
6664
6958
  const { pageX: e, pageY: i } = s;
6665
- M(this, j, i - x(this, St)), M(this, q, e - x(this, Ct)), this.alterLocation();
6959
+ M(this, $, i - x(this, St)), M(this, Z, e - x(this, Ct)), this.alterLocation();
6666
6960
  }
6667
6961
  mousemove(s) {
6668
6962
  const { pageX: t, pageY: e } = s;
6669
- x(this, mt) && (M(this, j, e - x(this, St)), M(this, q, t - x(this, Ct)), this.alterLocation());
6963
+ x(this, gt) && (M(this, $, e - x(this, St)), M(this, Z, t - x(this, Ct)), this.alterLocation());
6670
6964
  }
6671
6965
  mouseup() {
6672
- x(this, mt) && (M(this, mt, !1), document.body.classList.remove("no-select"), x(this, Et) && x(this, Et).call(this, this.updateValue()));
6966
+ x(this, gt) && (M(this, gt, !1), document.body.classList.remove("no-select"), x(this, _t) && x(this, _t).call(this, this.updateValue()));
6673
6967
  }
6674
6968
  }
6675
- W = new WeakMap(), mt = new WeakMap(), gt = new WeakMap(), Ct = new WeakMap(), St = new WeakMap(), j = new WeakMap(), q = new WeakMap(), U = new WeakMap(), _t = new WeakMap(), Et = new WeakMap();
6676
- function te(r) {
6677
- if (typeof r == "string") {
6678
- const s = document.querySelector(r);
6679
- if (s)
6680
- return s;
6681
- console.error(`Element "${r}" not found`);
6682
- } else
6683
- return r || document.documentElement;
6684
- }
6685
- function bs(r) {
6686
- const s = te(r);
6687
- return s ? s.requestFullscreen ? s.requestFullscreen() : s.mozRequestFullScreen ? s.mozRequestFullScreen() : s.webkitRequestFullscreen ? s.webkitRequestFullscreen() : s.msRequestFullscreen ? s.msRequestFullscreen() : Promise.reject("No Fullscreen API") : Promise.reject("No Element");
6688
- }
6689
- function Cs() {
6690
- const r = document;
6691
- return document.exitFullscreen ? document.exitFullscreen() : r.mozCancelFullScreen ? r.mozCancelFullScreen() : r.webkitExitFullscreen ? r.webkitExitFullscreen() : r.msExitFullscreen ? r.msExitFullscreen() : Promise.reject("No ExitFullscreen API");
6692
- }
6693
- function Ye(r) {
6694
- const s = te(r), t = document, e = document.fullscreenElement || t.webkitFullscreenElement || t.mozFullScreenElement || t.msFullscreenElement;
6695
- return s == e || !r && window.innerWidth == screen.width && window.innerHeight == screen.height;
6696
- }
6697
- function pn(r) {
6698
- if (r = te(r), !!r)
6699
- return function() {
6700
- Ye(r) ? Cs() : bs(r);
6701
- };
6702
- }
6703
- function vn(r, s) {
6704
- const t = te(s);
6705
- if (!t) return;
6706
- const e = () => {
6707
- r(Ye(t));
6708
- };
6709
- return document.addEventListener("fullscreenchange", e), document.addEventListener("webkitfullscreenchange", e), document.addEventListener("mozfullscreenchange", e), document.addEventListener("MSFullscreenChange", e), e(), () => {
6710
- document.removeEventListener("fullscreenchange", e), document.removeEventListener("webkitfullscreenchange", e), document.removeEventListener("mozfullscreenchange", e), document.removeEventListener("MSFullscreenChange", e);
6711
- };
6712
- }
6713
- function yn(r, s) {
6969
+ q = new WeakMap(), gt = new WeakMap(), pt = new WeakMap(), Ct = new WeakMap(), St = new WeakMap(), $ = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Et = new WeakMap(), _t = new WeakMap();
6970
+ function Pn(r, s) {
6714
6971
  if (typeof r == "number") return r;
6715
6972
  if (/px/.test(r)) return Number(r.replace(/px/, "")) || 0;
6716
6973
  const t = document.createElement("div");
@@ -6718,7 +6975,7 @@ function yn(r, s) {
6718
6975
  const e = t.getBoundingClientRect().width;
6719
6976
  return s.removeChild(t), e;
6720
6977
  }
6721
- function wn(r, s) {
6978
+ function bn(r, s) {
6722
6979
  if (!r) return;
6723
6980
  let t, e;
6724
6981
  if (typeof s == "string") {
@@ -6735,7 +6992,7 @@ function wn(r, s) {
6735
6992
  const i = t / e;
6736
6993
  return i > r ? [r * e, e] : i < r ? [t, t / r] : [t, e];
6737
6994
  }
6738
- function xn(r, s = 5e3) {
6995
+ function Cn(r, s = 5e3) {
6739
6996
  return new Promise((t, e) => {
6740
6997
  const i = new Image();
6741
6998
  i.src = r;
@@ -6751,7 +7008,7 @@ function xn(r, s = 5e3) {
6751
7008
  }, i.crossOrigin = "Anonymous";
6752
7009
  });
6753
7010
  }
6754
- function Pn(r) {
7011
+ function Sn(r) {
6755
7012
  const t = document.getElementById(r).querySelectorAll("img"), e = t.length, i = [];
6756
7013
  let n = 0;
6757
7014
  return e === 0 ? Promise.resolve({
@@ -6793,14 +7050,14 @@ function Pn(r) {
6793
7050
  });
6794
7051
  });
6795
7052
  }
6796
- function bn(r) {
7053
+ function En(r) {
6797
7054
  return new Promise((s, t) => {
6798
7055
  fetch(r).then((e) => s(e.text())).catch((e) => {
6799
7056
  console.error("Error fetching :", e), t(e);
6800
7057
  });
6801
7058
  });
6802
7059
  }
6803
- function Ss(r) {
7060
+ function _s(r) {
6804
7061
  const {
6805
7062
  href: s,
6806
7063
  fileName: t,
@@ -6809,7 +7066,7 @@ function Ss(r) {
6809
7066
  autoDownload: n = !0
6810
7067
  } = r;
6811
7068
  let o, a = !1, l = null, c;
6812
- const h = t || re(s, "downloaded_file");
7069
+ const h = t || ce(s, "downloaded_file");
6813
7070
  c = decodeURIComponent(h);
6814
7071
  const u = () => {
6815
7072
  if (!l) return;
@@ -6822,8 +7079,8 @@ function Ss(r) {
6822
7079
  a || y(new Error(`请求超时(已超过${i / 1e3}秒)`));
6823
7080
  }, o.addEventListener("progress", (w) => {
6824
7081
  if (w.lengthComputable && !a) {
6825
- const b = w.loaded / w.total * 100;
6826
- e == null || e(Number(b.toFixed(2)));
7082
+ const P = w.loaded / w.total * 100;
7083
+ e == null || e(Number(P.toFixed(2)));
6827
7084
  }
6828
7085
  }), o.addEventListener("load", () => {
6829
7086
  a || (o.status >= 200 && o.status < 300 ? (l = o.response, n && u(), g(o.response)) : y(new Error(`下载失败,状态码: ${o.status}`)));
@@ -6839,24 +7096,24 @@ function Ss(r) {
6839
7096
  !a && l && u();
6840
7097
  } };
6841
7098
  }
6842
- function Cn(r, s, t) {
7099
+ function _n(r, s, t) {
6843
7100
  if (!t) {
6844
7101
  let n = s.replace(/^[^.]+./, "");
6845
7102
  n = n == s ? "text/plain" : "application/" + n, t = { type: n };
6846
7103
  }
6847
7104
  const e = new Blob(r, t), i = URL.createObjectURL(e);
6848
- Ss({ href: i, fileName: s });
7105
+ _s({ href: i, fileName: s });
6849
7106
  }
6850
- const _s = Math.PI / 2, $t = Math.PI / 180, Zt = 6378137, Es = 85.05112878;
6851
- function Sn(r, s) {
6852
- const t = Math.max(Math.min(r, 180), -180), e = Math.max(Math.min(s, Es), -85.05112878), i = t * $t * Zt, n = e * $t, o = Math.log(Math.tan(Math.PI / 4 + n / 2)) * Zt;
7107
+ const Ms = Math.PI / 2, Kt = Math.PI / 180, te = 6378137, Ds = 85.05112878;
7108
+ function Mn(r, s) {
7109
+ const t = Math.max(Math.min(r, 180), -180), e = Math.max(Math.min(s, Ds), -85.05112878), i = t * Kt * te, n = e * Kt, o = Math.log(Math.tan(Math.PI / 4 + n / 2)) * te;
6853
7110
  return [i, o];
6854
7111
  }
6855
- function _n(r, s) {
6856
- const t = r / Zt / $t, e = (2 * Math.atan(Math.exp(s / Zt)) - _s) / $t;
7112
+ function Dn(r, s) {
7113
+ const t = r / te / Kt, e = (2 * Math.atan(Math.exp(s / te)) - Ms) / Kt;
6857
7114
  return [t, e];
6858
7115
  }
6859
- function Ms(r, s, t) {
7116
+ function Rs(r, s, t) {
6860
7117
  const [e, i] = r, [n, o] = s, [a, l] = t, c = (a - n) ** 2 + (l - o) ** 2;
6861
7118
  if (c === 0) return Math.sqrt((e - n) ** 2 + (i - o) ** 2);
6862
7119
  let h = ((e - n) * (a - n) + (i - o) * (l - o)) / c;
@@ -6864,21 +7121,21 @@ function Ms(r, s, t) {
6864
7121
  (e - (n + h * (a - n))) ** 2 + (i - (o + h * (l - o))) ** 2
6865
7122
  );
6866
7123
  }
6867
- function En(r, s, t, e, i, n = 1, o = 1) {
7124
+ function Rn(r, s, t, e, i, n = 1, o = 1) {
6868
7125
  const a = r + t * Math.cos(e) * n, l = s + t * Math.sin(e) * o, c = r + t * Math.cos(i) * n, h = s + t * Math.sin(i) * o;
6869
7126
  return [
6870
7127
  [a, l],
6871
7128
  [c, h]
6872
7129
  ];
6873
7130
  }
6874
- function Ee(r, s, t, e) {
7131
+ function De(r, s, t, e) {
6875
7132
  return Math.hypot(Math.abs(t - r), Math.abs(e - s));
6876
7133
  }
6877
- function We(r, s, t, e) {
7134
+ function $e(r, s, t, e) {
6878
7135
  const i = (r + t) / 2, n = (s + e) / 2;
6879
7136
  return { x: i, y: n };
6880
7137
  }
6881
- function Mn(r, s, t, e) {
7138
+ function kn(r, s, t, e) {
6882
7139
  const [i, n] = r, [o, a] = s;
6883
7140
  let l = 1 / 0;
6884
7141
  if (o !== 0) {
@@ -6891,7 +7148,7 @@ function Mn(r, s, t, e) {
6891
7148
  }
6892
7149
  return l === 1 / 0 ? r : [i + o * l, n + a * l];
6893
7150
  }
6894
- const Ds = /* @__PURE__ */ new Set([
7151
+ const ks = /* @__PURE__ */ new Set([
6895
7152
  "sin",
6896
7153
  "cos",
6897
7154
  "tan",
@@ -6899,9 +7156,9 @@ const Ds = /* @__PURE__ */ new Set([
6899
7156
  "acos",
6900
7157
  "atan",
6901
7158
  "atan2"
6902
- ]), Dn = new Proxy(Math, {
7159
+ ]), Vn = new Proxy(Math, {
6903
7160
  get(r, s) {
6904
- return Ds.has(s) ? function(...t) {
7161
+ return ks.has(s) ? function(...t) {
6905
7162
  const e = t.map((i) => i / 180 * Math.PI);
6906
7163
  return r[s](...e);
6907
7164
  } : r[s];
@@ -6932,7 +7189,7 @@ class wt {
6932
7189
  }) : s ? (t = this.resolve) == null || t.call(this) : (e = this.reject) == null || e.call(this), s;
6933
7190
  }
6934
7191
  }
6935
- class Rs extends wt {
7192
+ class Vs extends wt {
6936
7193
  constructor(s) {
6937
7194
  super(), this.resolve = s;
6938
7195
  }
@@ -6951,7 +7208,7 @@ class Rs extends wt {
6951
7208
  return new wt(this.resolve, t);
6952
7209
  }
6953
7210
  }
6954
- class ks extends wt {
7211
+ class Os extends wt {
6955
7212
  constructor(s) {
6956
7213
  super(), this.reject = s;
6957
7214
  }
@@ -6990,7 +7247,7 @@ const B = class B {
6990
7247
  var i, n;
6991
7248
  return (n = (i = B.tips)[s]) == null ? void 0 : n.call(i, ...t);
6992
7249
  };
6993
- return new Rs(e);
7250
+ return new Vs(e);
6994
7251
  };
6995
7252
  }
6996
7253
  static rejectTip(s) {
@@ -6999,7 +7256,7 @@ const B = class B {
6999
7256
  var i, n;
7000
7257
  return (n = (i = B.tips)[s]) == null ? void 0 : n.call(i, ...t);
7001
7258
  };
7002
- return new ks(e);
7259
+ return new Os(e);
7003
7260
  };
7004
7261
  }
7005
7262
  };
@@ -7011,82 +7268,83 @@ d(B, "tips", {
7011
7268
  }), d(B, "info", B.resolveTip("info")), d(B, "success", B.resolveTip("success")), d(B, "warning", B.rejectTip("warning")), d(B, "error", B.rejectTip("error"));
7012
7269
  let Dt = B;
7013
7270
  export {
7014
- $e as EXTENSION_TO_MIME,
7015
- ie as FILE_EXTENSIONS,
7016
- Me as PAPER_SIZE_DEFINITIONS,
7017
- As as PAPER_SIZE_OPTIONS,
7018
- we as UNIT_LABELS,
7019
- Os as WINDOW_TARGET,
7020
- Ts as _Animate_CreateOscillator,
7021
- Ls as _Animate_CubicBezier,
7022
- Ze as _Animate_NumericTransition,
7023
- zt as _Animate_Schedule,
7024
- Is as _Blob_ConvertDataToImageUrl,
7025
- ln as _Browser_CalculatePrintableArea,
7026
- an as _Browser_CopyToClipboard,
7027
- on as _Browser_GetFrameRate,
7028
- cn as _Browser_IdleDetection,
7029
- It as _Browser_SameOriginTabManager,
7030
- nn as _Browser_SoundEffects,
7031
- rn as _Browser_WebSocketClient,
7032
- I as _Canvas_Axis,
7033
- un as _Canvas_TimeAxis,
7034
- wn as _Element_CalculateCanvasSize,
7035
- Pn as _Element_CheckImagesLoaded,
7036
- fn as _Element_CloseOnOutsideClick,
7037
- mn as _Element_Drag,
7038
- bs as _Element_EnterFullscreen,
7039
- Cs as _Element_ExitFullscreen,
7040
- pn as _Element_Fullscreen,
7041
- vn as _Element_FullscreenObserver,
7042
- yn as _Element_GetOtherSizeInPixels,
7043
- Ye as _Element_IsFullscreen,
7044
- xn as _Element_LoadImage,
7045
- gn as _Element_LocalDrag,
7046
- dn as _Element_ScrollEndListener,
7047
- Cn as _File_CreateAndDownload,
7048
- Ss as _File_Download,
7049
- bn as _File_Read,
7050
- Us as _Format_CamelCase,
7051
- Ns as _Format_CapitalizeFirstLetter,
7052
- Ys as _Format_ChunkArray,
7053
- Xs as _Format_ExcludeSubstring,
7054
- Bs as _Format_FileSize,
7055
- re as _Format_HrefName,
7056
- zs as _Format_MillisecondToReadable,
7057
- ne as _Format_NumberWithCommas,
7058
- Fs as _Format_NumberWithUnit,
7059
- Hs as _Format_Percentage,
7060
- Qe as _Format_Timestamp,
7061
- Gs as _Format_ToggleInvisibleChars,
7062
- Ee as _Math_CalculateDistance2D,
7063
- Dn as _Math_Degree,
7064
- En as _Math_GetArcPoints,
7065
- Mn as _Math_GetBoundaryIntersection,
7066
- We as _Math_GetMidpoint,
7067
- Sn as _Math_LngLatToPlane,
7068
- _n as _Math_PlaneToLngLat,
7069
- Ms as _Math_PointToLineDistance,
7271
+ Je as EXTENSION_TO_MIME,
7272
+ re as FILE_EXTENSIONS,
7273
+ Re as PAPER_SIZE_DEFINITIONS,
7274
+ Ts as PAPER_SIZE_OPTIONS,
7275
+ Pe as UNIT_LABELS,
7276
+ Ls as WINDOW_TARGET,
7277
+ Is as _Animate_CreateOscillator,
7278
+ Ns as _Animate_CubicBezier,
7279
+ Ke as _Animate_NumericTransition,
7280
+ Wt as _Animate_Schedule,
7281
+ Hs as _Blob_ConvertDataToImageUrl,
7282
+ hn as _Browser_CalculatePrintableArea,
7283
+ cn as _Browser_CopyToClipboard,
7284
+ ln as _Browser_GetFrameRate,
7285
+ un as _Browser_IdleDetection,
7286
+ Nt as _Browser_SameOriginTabManager,
7287
+ on as _Browser_SoundEffects,
7288
+ an as _Browser_WebSocketClient,
7289
+ T as _Canvas_Axis,
7290
+ fn as _Canvas_TimeAxis,
7291
+ bn as _Element_CalculateCanvasSize,
7292
+ Sn as _Element_CheckImagesLoaded,
7293
+ yn as _Element_CloseOnOutsideClick,
7294
+ wn as _Element_Drag,
7295
+ We as _Element_EnterFullscreen,
7296
+ qe as _Element_ExitFullscreen,
7297
+ mn as _Element_Fullscreen,
7298
+ pn as _Element_FullscreenController,
7299
+ gn as _Element_FullscreenObserver,
7300
+ Pn as _Element_GetOtherSizeInPixels,
7301
+ Jt as _Element_IsFullscreen,
7302
+ Cn as _Element_LoadImage,
7303
+ xn as _Element_LocalDrag,
7304
+ vn as _Element_ScrollEndListener,
7305
+ _n as _File_CreateAndDownload,
7306
+ _s as _File_Download,
7307
+ En as _File_Read,
7308
+ Xs as _Format_CamelCase,
7309
+ Fs as _Format_CapitalizeFirstLetter,
7310
+ Ws as _Format_ChunkArray,
7311
+ zs as _Format_ExcludeSubstring,
7312
+ Us as _Format_FileSize,
7313
+ ce as _Format_HrefName,
7314
+ js as _Format_MillisecondToReadable,
7315
+ le as _Format_NumberWithCommas,
7316
+ Gs as _Format_NumberWithUnit,
7317
+ Bs as _Format_Percentage,
7318
+ ti as _Format_Timestamp,
7319
+ Ys as _Format_ToggleInvisibleChars,
7320
+ De as _Math_CalculateDistance2D,
7321
+ Vn as _Math_Degree,
7322
+ Rn as _Math_GetArcPoints,
7323
+ kn as _Math_GetBoundaryIntersection,
7324
+ $e as _Math_GetMidpoint,
7325
+ Mn as _Math_LngLatToPlane,
7326
+ Dn as _Math_PlaneToLngLat,
7327
+ Rs as _Math_PointToLineDistance,
7070
7328
  Dt as _Tip,
7071
- ti as _Utility_Clone,
7072
- Oe as _Utility_Debounce,
7073
- Qs as _Utility_ExecuteWhenIdle,
7074
- ae as _Utility_GenerateUUID,
7075
- Ks as _Utility_GetTargetByPath,
7076
- pt as _Utility_MergeObjects,
7077
- en as _Utility_RotateList,
7078
- tn as _Utility_SetTargetByPath,
7079
- sn as _Utility_Sleep,
7080
- Js as _Utility_Throttle,
7081
- ei as _Utility_TimeConsumption,
7082
- Ke as _Utility_WaitForCondition,
7083
- Zs as _Valid_CheckConnectionWithXHR,
7084
- oe as _Valid_DataType,
7085
- qs as _Valid_DoesInfiniteLineIntersectRectangle,
7086
- xe as _Valid_FileTypeChecker,
7087
- Yt as _Valid_Is2DNumberArray,
7088
- Ws as _Valid_IsInMargin,
7089
- ge as _Valid_IsNumberArray,
7090
- js as _Valid_IsPointInPolygon,
7091
- $s as _Valid_IsSecureContext
7329
+ si as _Utility_Clone,
7330
+ Le as _Utility_Debounce,
7331
+ Ks as _Utility_ExecuteWhenIdle,
7332
+ ue as _Utility_GenerateUUID,
7333
+ en as _Utility_GetTargetByPath,
7334
+ ct as _Utility_MergeObjects,
7335
+ nn as _Utility_RotateList,
7336
+ sn as _Utility_SetTargetByPath,
7337
+ rn as _Utility_Sleep,
7338
+ tn as _Utility_Throttle,
7339
+ ni as _Utility_TimeConsumption,
7340
+ ii as _Utility_WaitForCondition,
7341
+ Js as _Valid_CheckConnectionWithXHR,
7342
+ he as _Valid_DataType,
7343
+ Zs as _Valid_DoesInfiniteLineIntersectRectangle,
7344
+ be as _Valid_FileTypeChecker,
7345
+ qt as _Valid_Is2DNumberArray,
7346
+ qs as _Valid_IsInMargin,
7347
+ ve as _Valid_IsNumberArray,
7348
+ $s as _Valid_IsPointInPolygon,
7349
+ Qs as _Valid_IsSecureContext
7092
7350
  };