@fileverse-dev/dsheet 3.0.1-yjs → 3.0.1-yjs-2

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.
@@ -1,11 +1,11 @@
1
- var qu = Object.defineProperty;
2
- var Iu = (e, t, n) => t in e ? qu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Xe = (e, t, n) => Iu(e, typeof t != "symbol" ? t + "" : t, n);
1
+ var Iu = Object.defineProperty;
2
+ var Du = (e, t, n) => t in e ? Iu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var Xe = (e, t, n) => Du(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import h, { isPlainObject as ki } from "lodash";
5
5
  import Ne from "dayjs";
6
6
  import * as jr from "@fileverse-dev/formulajs";
7
- import { F as Du } from "./crypto-constants-CqpCRs86.js";
8
- var Ou = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7
+ import { F as Ou } from "./crypto-constants-CqpCRs86.js";
8
+ var Fu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
9
9
  function ds(e) {
10
10
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
11
11
  }
@@ -29,7 +29,7 @@ function ep(e) {
29
29
  }), n;
30
30
  }
31
31
  const hr = {}, Aa = {
32
- en: () => Promise.resolve().then(() => Xu),
32
+ en: () => Promise.resolve().then(() => Zu),
33
33
  zh: () => import("./zh-BfQYzoDQ.js"),
34
34
  es: () => import("./es-BonrkVxY.js"),
35
35
  hi: () => import("./hi-Ca55EZ4A.js"),
@@ -59,7 +59,7 @@ var ms = { exports: {} };
59
59
  (function(e) {
60
60
  (function(t, n) {
61
61
  e.exports ? e.exports = n() : t.numeral = n();
62
- })(Ou, function() {
62
+ })(Fu, function() {
63
63
  var t, n, r = "2.0.6", a = {}, l = {}, o = {
64
64
  currentLocale: "en",
65
65
  zeroFormat: null,
@@ -466,8 +466,8 @@ var ms = { exports: {} };
466
466
  }(), t;
467
467
  });
468
468
  })(ms);
469
- var Fu = ms.exports;
470
- const rn = /* @__PURE__ */ ds(Fu);
469
+ var Lu = ms.exports;
470
+ const rn = /* @__PURE__ */ ds(Lu);
471
471
  var To = { exports: {} };
472
472
  function $o() {
473
473
  }
@@ -502,8 +502,8 @@ $o.prototype = {
502
502
  };
503
503
  To.exports = $o;
504
504
  To.exports.TinyEmitter = $o;
505
- var Lu = To.exports;
506
- const Bu = /* @__PURE__ */ ds(Lu), Pu = /^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?$/i;
505
+ var Bu = To.exports;
506
+ const Pu = /* @__PURE__ */ ds(Bu), Hu = /^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?$/i;
507
507
  function Qt(e) {
508
508
  if (e == null || e === "")
509
509
  return 0;
@@ -515,7 +515,7 @@ function Qt(e) {
515
515
  const n = e.trim();
516
516
  if (n === "")
517
517
  return 0;
518
- if (!Pu.test(n))
518
+ if (!Hu.test(n))
519
519
  return NaN;
520
520
  const r = Number(n);
521
521
  return Number.isNaN(r) ? NaN : r;
@@ -523,15 +523,15 @@ function Qt(e) {
523
523
  const t = Number(e);
524
524
  return Number.isNaN(t) ? NaN : t;
525
525
  }
526
- function Hu(e) {
526
+ function Uu(e) {
527
527
  return -1 * Qt(e);
528
528
  }
529
- const pr = "ERROR", Co = "DIV/0", Fn = "NAME", Uu = "N/A", hs = "NULL", ps = "NUM", gr = "REF", Cn = "VALUE", gs = "CIRC", yr = {
529
+ const pr = "ERROR", Co = "DIV/0", Fn = "NAME", zu = "N/A", hs = "NULL", ps = "NUM", gr = "REF", Cn = "VALUE", gs = "CIRC", yr = {
530
530
  "Error: lookup_range and result_range are required": "Lookup range and result range are required",
531
531
  [pr]: "Syntax error",
532
532
  [Co]: "#DIV/0!",
533
533
  [Fn]: "Wrong function name or parameter",
534
- [Uu]: "#N/A",
534
+ [zu]: "#N/A",
535
535
  [hs]: "#NULL!",
536
536
  [ps]: "#NUM!",
537
537
  [gr]: "#REF!",
@@ -551,7 +551,7 @@ function Or(e) {
551
551
  let t;
552
552
  return e = (e + "").replace(/#|!|\?/g, ""), yr[e] && (t = yr[e]), t || e;
553
553
  }
554
- function zu(e) {
554
+ function Yu(e) {
555
555
  let t = !1;
556
556
  for (const n in yr)
557
557
  if (Object.prototype.hasOwnProperty.call(yr, n) && yr[n] === e) {
@@ -560,7 +560,7 @@ function zu(e) {
560
560
  }
561
561
  return t;
562
562
  }
563
- const Yu = "+";
563
+ const Vu = "+";
564
564
  function Ya(e, ...t) {
565
565
  const n = t.reduce(
566
566
  (r, a) => r + Qt(a || 0),
@@ -570,13 +570,13 @@ function Ya(e, ...t) {
570
570
  throw Error(Cn);
571
571
  return n;
572
572
  }
573
- Ya.SYMBOL = Yu;
574
- const Vu = "&";
573
+ Ya.SYMBOL = Vu;
574
+ const Wu = "&";
575
575
  function Va(...e) {
576
576
  return e.reduce((t, n) => t + n.toString(), "");
577
577
  }
578
- Va.SYMBOL = Vu;
579
- const Wu = "/";
578
+ Va.SYMBOL = Wu;
579
+ const Gu = "/";
580
580
  function Wa(e, ...t) {
581
581
  const n = t.reduce(
582
582
  (r, a) => r / Qt(a),
@@ -584,13 +584,13 @@ function Wa(e, ...t) {
584
584
  );
585
585
  return n === 1 / 0 ? Co : isNaN(n) ? Cn : n;
586
586
  }
587
- Wa.SYMBOL = Wu;
588
- const Gu = "=";
587
+ Wa.SYMBOL = Gu;
588
+ const ju = "=";
589
589
  function Ga(e, t) {
590
590
  return e === t;
591
591
  }
592
- Ga.SYMBOL = Gu;
593
- const ju = Object.keys(jr), ys = {
592
+ Ga.SYMBOL = ju;
593
+ const Xu = Object.keys(jr), ys = {
594
594
  generalDialog: {
595
595
  partiallyError: "Cannot perform this operation on partially merged cells",
596
596
  readOnlyError: "Cannot perform this operation in read-only mode",
@@ -599,7 +599,7 @@ const ju = Object.keys(jr), ys = {
599
599
  cannotSelectMultiple: "Cannot select multiple selections"
600
600
  },
601
601
  functionlist: [
602
- ...Du,
602
+ ...Ou,
603
603
  {
604
604
  n: "SUMIF",
605
605
  t: 0,
@@ -12342,10 +12342,10 @@ If the value is FALSE, return the accrued interest from the first interest accru
12342
12342
  contact: "Server communication error occurred, please refresh the page and try again, if not, please contact the administrator!",
12343
12343
  support: "The current browser does not support WebSocket"
12344
12344
  }
12345
- }, Xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12345
+ }, Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12346
12346
  __proto__: null,
12347
12347
  default: ys
12348
- }, Symbol.toStringTag, { value: "Module" })), Zu = ju, Si = (ys.functionlist || []).reduce((e, t) => (t != null && t.n && (e[t.n.toUpperCase()] = t), e), /* @__PURE__ */ Object.create(null));
12348
+ }, Symbol.toStringTag, { value: "Module" })), Ku = Xu, Si = (ys.functionlist || []).reduce((e, t) => (t != null && t.n && (e[t.n.toUpperCase()] = t), e), /* @__PURE__ */ Object.create(null));
12349
12349
  function Qr(e) {
12350
12350
  return function(...n) {
12351
12351
  e = e.toUpperCase();
@@ -12369,28 +12369,28 @@ function Qr(e) {
12369
12369
  };
12370
12370
  }
12371
12371
  Qr.isFactory = !0;
12372
- Qr.SYMBOL = Zu;
12373
- const Ku = ">";
12372
+ Qr.SYMBOL = Ku;
12373
+ const Qu = ">";
12374
12374
  function ja(e, t) {
12375
12375
  return e > t;
12376
12376
  }
12377
- ja.SYMBOL = Ku;
12378
- const Qu = ">=";
12377
+ ja.SYMBOL = Qu;
12378
+ const Ju = ">=";
12379
12379
  function Xa(e, t) {
12380
12380
  return e >= t;
12381
12381
  }
12382
- Xa.SYMBOL = Qu;
12383
- const Ju = "<";
12382
+ Xa.SYMBOL = Ju;
12383
+ const ec = "<";
12384
12384
  function Za(e, t) {
12385
12385
  return e < t;
12386
12386
  }
12387
- Za.SYMBOL = Ju;
12388
- const ec = "<=";
12387
+ Za.SYMBOL = ec;
12388
+ const tc = "<=";
12389
12389
  function Ka(e, t) {
12390
12390
  return e <= t;
12391
12391
  }
12392
- Ka.SYMBOL = ec;
12393
- const tc = "-";
12392
+ Ka.SYMBOL = tc;
12393
+ const nc = "-";
12394
12394
  function Qa(e, ...t) {
12395
12395
  const n = t.reduce(
12396
12396
  (r, a) => r - Qt(a),
@@ -12400,8 +12400,8 @@ function Qa(e, ...t) {
12400
12400
  throw Error(Cn);
12401
12401
  return n;
12402
12402
  }
12403
- Qa.SYMBOL = tc;
12404
- const nc = "*";
12403
+ Qa.SYMBOL = nc;
12404
+ const rc = "*";
12405
12405
  function Ja(e, ...t) {
12406
12406
  const n = t.reduce(
12407
12407
  (r, a) => r * Qt(a),
@@ -12411,20 +12411,20 @@ function Ja(e, ...t) {
12411
12411
  throw Error(Cn);
12412
12412
  return n;
12413
12413
  }
12414
- Ja.SYMBOL = nc;
12415
- const rc = "<>";
12414
+ Ja.SYMBOL = rc;
12415
+ const ac = "<>";
12416
12416
  function eo(e, t) {
12417
12417
  return e !== t;
12418
12418
  }
12419
- eo.SYMBOL = rc;
12420
- const ac = "^";
12419
+ eo.SYMBOL = ac;
12420
+ const oc = "^";
12421
12421
  function to(e, t) {
12422
12422
  const n = Math.pow(Qt(e), Qt(t));
12423
12423
  if (isNaN(n))
12424
12424
  throw Error(Cn);
12425
12425
  return n;
12426
12426
  }
12427
- to.SYMBOL = ac;
12427
+ to.SYMBOL = oc;
12428
12428
  const Jr = /* @__PURE__ */ Object.create(null);
12429
12429
  function Ai(e, t = []) {
12430
12430
  if (e = e.toUpperCase(), !Jr[e])
@@ -12449,22 +12449,22 @@ Bt(Ka.SYMBOL, Ka);
12449
12449
  Bt(Ja.SYMBOL, Ja);
12450
12450
  Bt(eo.SYMBOL, eo);
12451
12451
  Bt(Qa.SYMBOL, Qa);
12452
- function oc(e) {
12452
+ function lc(e) {
12453
12453
  if (!e) return null;
12454
12454
  const t = e.match(/^([A-Z]+)(\d+):([A-Z]+)(\d+)$/i);
12455
12455
  if (!t) return null;
12456
12456
  const [, n, r, a, l] = t;
12457
12457
  return n === a && r !== l ? !1 : r === l && n !== a ? !0 : null;
12458
12458
  }
12459
- const lc = "[A-Za-z0-9_À-ʯ]+", ic = "'(?:(?!').|'')*'", da = `(?:${lc}|${ic})!`, sc = new RegExp(
12459
+ const ic = "[A-Za-z0-9_À-ʯ]+", sc = "'(?:(?!').|'')*'", da = `(?:${ic}|${sc})!`, uc = new RegExp(
12460
12460
  `^(?:${da})?(?:[$][A-Za-z]+[$][0-9]+)`
12461
- ), uc = new RegExp(
12462
- `^(?:${da})?(?:[$][A-Za-z]+[0-9]*)`
12463
12461
  ), cc = new RegExp(
12464
- `^(?:${da})?(?:[A-Za-z]*[$][0-9]+)`
12462
+ `^(?:${da})?(?:[$][A-Za-z]+[0-9]*)`
12465
12463
  ), fc = new RegExp(
12464
+ `^(?:${da})?(?:[A-Za-z]*[$][0-9]+)`
12465
+ ), dc = new RegExp(
12466
12466
  `^(?:${da})?(?:(?:[A-Za-z]+[0-9]*)|(?:[A-Za-z]*[0-9]+))(?!\\d)(?!\\.)`
12467
- ), dc = /^(?:[0-9]+$)/;
12467
+ ), mc = /^(?:[0-9]+$)/;
12468
12468
  var Xr, Ue = function(e, t, n, r) {
12469
12469
  for (n = n || {}, r = e.length; r--; n[e[r]] = t) ;
12470
12470
  return n;
@@ -12594,7 +12594,7 @@ var Xr, Ue = function(e, t, n, r) {
12594
12594
  let s;
12595
12595
  if (u.toLowerCase().includes("xlookup")) {
12596
12596
  let w = u.includes("XLOOKUP") ? (p = (d = (m = u == null ? void 0 : u.split("XLOOKUP(")) == null ? void 0 : m[1]) == null ? void 0 : d.split(",")) == null ? void 0 : p[1] : (b = (y = (g = u == null ? void 0 : u.split("xlookup(")) == null ? void 0 : g[1]) == null ? void 0 : y.split(",")) == null ? void 0 : b[1];
12597
- s = oc(w);
12597
+ s = lc(w);
12598
12598
  }
12599
12599
  var c = o.length - 1;
12600
12600
  switch (l) {
@@ -13316,7 +13316,7 @@ Expecting ` + le.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : te =
13316
13316
  }
13317
13317
  return !0;
13318
13318
  }
13319
- }, mc = /* @__PURE__ */ function() {
13319
+ }, hc = /* @__PURE__ */ function() {
13320
13320
  var e = {
13321
13321
  EOF: 1,
13322
13322
  parseError: function(n, r) {
@@ -13454,7 +13454,7 @@ Expecting ` + le.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : te =
13454
13454
  if (r = this._input.match(this.rules[l[o]]), r && (!n || r[0].length > n[0].length)) {
13455
13455
  n = r, a = o;
13456
13456
  const i = Xr.length;
13457
- if (l[o] === 8 && n[0].match(dc) && !(n.input.slice(n[0].length)[0] === ":" || i > 3 && Xr[i - 4] === 25 && Xr[i - 2] === 27)) {
13457
+ if (l[o] === 8 && n[0].match(mc) && !(n.input.slice(n[0].length)[0] === ":" || i > 3 && Xr[i - 4] === 25 && Xr[i - 2] === 27)) {
13458
13458
  n = !1;
13459
13459
  continue;
13460
13460
  }
@@ -13594,10 +13594,10 @@ Expecting ` + le.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : te =
13594
13594
  /^(?:'(\\[']|[^'])*'[^'!])/,
13595
13595
  /^(?:[A-Za-z]{1,}[A-Za-z_0-9\.]+(?=[(]))/,
13596
13596
  /^(?:#[A-Z0-9\/]+(!|\?)?)/,
13597
- sc,
13598
13597
  uc,
13599
13598
  cc,
13600
13599
  fc,
13600
+ dc,
13601
13601
  /^(?:[A-Za-z\.]+(?=[(]))/,
13602
13602
  /^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,
13603
13603
  /^(?:[A-Za-z_]+)/,
@@ -13674,25 +13674,25 @@ Expecting ` + le.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : te =
13674
13674
  };
13675
13675
  return e;
13676
13676
  }();
13677
- No.lexer = mc;
13677
+ No.lexer = hc;
13678
13678
  function ko() {
13679
13679
  this.yy = {};
13680
13680
  }
13681
13681
  ko.prototype = No;
13682
13682
  No.Parser = ko;
13683
- function hc(e, t = 1) {
13683
+ function pc(e, t = 1) {
13684
13684
  return e = e.substring(t, e.length - t), e;
13685
13685
  }
13686
- function pc(e) {
13686
+ function gc(e) {
13687
13687
  let t = parseInt(e, 10);
13688
13688
  return isNaN(t) ? t = -1 : t = Math.max(t - 1, -1), t;
13689
13689
  }
13690
- function gc(e) {
13690
+ function yc(e) {
13691
13691
  let t = "";
13692
13692
  return e >= 0 && (t = `${e + 1}`), t;
13693
13693
  }
13694
13694
  const bs = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", no = bs.length;
13695
- function yc(e) {
13695
+ function bc(e) {
13696
13696
  let t = 0;
13697
13697
  if (typeof e == "string") {
13698
13698
  e = e.toUpperCase();
@@ -13701,14 +13701,14 @@ function yc(e) {
13701
13701
  }
13702
13702
  return --t, t;
13703
13703
  }
13704
- function bc(e) {
13704
+ function wc(e) {
13705
13705
  let t = "";
13706
13706
  for (; e >= 0; )
13707
13707
  t = String.fromCharCode(e % no + 97) + t, e = Math.floor(e / no) - 1;
13708
13708
  return t.toUpperCase();
13709
13709
  }
13710
- const wc = "[A-Za-z0-9_À-ʯ]+", vc = "'(?:(?!').|'')*'", _c = `(${wc}|${vc})!`, Ri = new RegExp(
13711
- `^(?:${_c})?([$])?([A-Za-z]*)([$])?([0-9]*)$`
13710
+ const vc = "[A-Za-z0-9_À-ʯ]+", _c = "'(?:(?!').|'')*'", Tc = `(${vc}|${_c})!`, Ri = new RegExp(
13711
+ `^(?:${Tc})?([$])?([A-Za-z]*)([$])?([0-9]*)$`
13712
13712
  );
13713
13713
  function Ma(e) {
13714
13714
  if (typeof e != "string" || !Ri.test(e))
@@ -13718,12 +13718,12 @@ function Ma(e) {
13718
13718
  const o = t == null ? null : e.slice(0, t.length).replace(/^'|'$/g, "").replace(/''/g, "'");
13719
13719
  return [
13720
13720
  {
13721
- index: pc(l),
13721
+ index: gc(l),
13722
13722
  label: l,
13723
13723
  isAbsolute: a === "$"
13724
13724
  },
13725
13725
  {
13726
- index: yc(r),
13726
+ index: bc(r),
13727
13727
  label: r,
13728
13728
  isAbsolute: n === "$"
13729
13729
  },
@@ -13731,18 +13731,18 @@ function Ma(e) {
13731
13731
  ];
13732
13732
  }
13733
13733
  function xi(e, t) {
13734
- const n = (e.isAbsolute ? "$" : "") + gc(e.index);
13735
- return (t.isAbsolute ? "$" : "") + bc(t.index) + n;
13734
+ const n = (e.isAbsolute ? "$" : "") + yc(e.index);
13735
+ return (t.isAbsolute ? "$" : "") + wc(t.index) + n;
13736
13736
  }
13737
- function Tc(e) {
13737
+ function $c(e) {
13738
13738
  return e.replace(/[\u201C\u201D]/g, '"').replace(/[\u2018\u2019]/g, "'");
13739
13739
  }
13740
- class $c extends Bu {
13740
+ class Cc extends Pu {
13741
13741
  constructor() {
13742
13742
  super(), this.parser = new ko(), this.cryptoDenomination = "", this.cryptoDecimals = 0, this.parser.yy = {
13743
13743
  toNumber: Qt,
13744
- trimEdges: hc,
13745
- invertNumber: Hu,
13744
+ trimEdges: pc,
13745
+ invertNumber: Uu,
13746
13746
  throwError: (t) => this._throwError(t),
13747
13747
  callVariable: (t) => this._callVariable(t),
13748
13748
  evaluateByOperator: Ai,
@@ -13760,7 +13760,7 @@ class $c extends Bu {
13760
13760
  * @return {*} Returns an object with tow properties `error` and `result`.
13761
13761
  */
13762
13762
  parse(t, n) {
13763
- t = Tc(t);
13763
+ t = $c(t);
13764
13764
  let r = null, a = null;
13765
13765
  this.options = n;
13766
13766
  try {
@@ -13901,17 +13901,17 @@ class $c extends Bu {
13901
13901
  * @private
13902
13902
  */
13903
13903
  _throwError(t) {
13904
- throw zu(t) ? Error(t) : Error(pr);
13904
+ throw Yu(t) ? Error(t) : Error(pr);
13905
13905
  }
13906
13906
  }
13907
13907
  let So = "uk";
13908
- function Cc(e) {
13908
+ function Nc(e) {
13909
13909
  return e === "us" ? "us" : "uk";
13910
13910
  }
13911
13911
  function np(e) {
13912
- So = Cc(e);
13912
+ So = Nc(e);
13913
13913
  }
13914
- function Nc() {
13914
+ function kc() {
13915
13915
  return So;
13916
13916
  }
13917
13917
  function Ao() {
@@ -13920,27 +13920,27 @@ function Ao() {
13920
13920
  function ws(e) {
13921
13921
  return Ao() ? e ? "MM/dd/yyyy HH:mm:ss" : "MM/dd/yyyy" : e ? "dd/MM/yyyy HH:mm:ss" : "dd/MM/yyyy";
13922
13922
  }
13923
- function kc(e) {
13923
+ function Sc(e) {
13924
13924
  return e ? ((e.toLowerCase().replace(/"[^"]*"/g, "").replace(/\[[^\]]*]/g, "").split(/(?:am\/pm|h+)/i)[0] || "").match(/[dmy]+/g) || []).map((i) => i[0]).filter((i, u, s) => u === 0 || i !== s[u - 1]) : [];
13925
13925
  }
13926
13926
  function Br(e, t) {
13927
- const n = kc(e);
13927
+ const n = Sc(e);
13928
13928
  if (n.length === 0) return !1;
13929
13929
  const r = n.indexOf(t[0]), a = n.indexOf(t[1]), l = n.indexOf(t[2]);
13930
13930
  return r !== -1 && a !== -1 && l !== -1 && r < a && a < l;
13931
13931
  }
13932
- function Sc(e) {
13932
+ function Ac(e) {
13933
13933
  if (!e) return !1;
13934
13934
  const a = e.toLowerCase().replace(/"[^"]*"/g, "").replace(/\[[^\]]*]/g, "").split(/(?:am\/pm|h+)/i)[0] || "";
13935
13935
  if (!/m{3,}/.test(a)) return !1;
13936
13936
  const o = a.match(/[dmy]+/g) || [], i = o.some((s) => s[0] === "d"), u = o.some((s) => s[0] === "y");
13937
13937
  return i && u;
13938
13938
  }
13939
- function Ac(e) {
13940
- return !e || e === "General" || e === "@" ? !1 : Sc(e) ? !0 : Ao() ? Br(e, ["m", "d", "y"]) || Br(e, ["y", "m", "d"]) : Br(e, ["d", "m", "y"]) || Br(e, ["y", "m", "d"]);
13939
+ function Ec(e) {
13940
+ return !e || e === "General" || e === "@" ? !1 : Ac(e) ? !0 : Ao() ? Br(e, ["m", "d", "y"]) || Br(e, ["y", "m", "d"]) : Br(e, ["d", "m", "y"]) || Br(e, ["y", "m", "d"]);
13941
13941
  }
13942
- function Ec(e, t) {
13943
- return Ac(e) ? e : ws(t);
13942
+ function Mc(e, t) {
13943
+ return Ec(e) ? e : ws(t);
13944
13944
  }
13945
13945
  const Nr = "light", rp = "#EFC703", ro = {
13946
13946
  light: {
@@ -13993,11 +13993,11 @@ const Nr = "light", rp = "#EFC703", ro = {
13993
13993
  secondaryFill: "hsla(120, 6%, 16%, 1)",
13994
13994
  freezeLine: "hsla(120, 8%, 30%, 1)"
13995
13995
  }
13996
- }, Mc = (e) => ro[e ?? Nr] ?? ro[Nr];
13996
+ }, Rc = (e) => ro[e ?? Nr] ?? ro[Nr];
13997
13997
  let sr = ro[Nr], qi = Nr;
13998
13998
  const ap = (e) => {
13999
13999
  const t = e ?? Nr;
14000
- return t === qi ? !1 : (qi = t, sr = Mc(t), !0);
14000
+ return t === qi ? !1 : (qi = t, sr = Rc(t), !0);
14001
14001
  };
14002
14002
  function op(e) {
14003
14003
  if (document.createRange)
@@ -14019,7 +14019,7 @@ function op(e) {
14019
14019
  function vs(e) {
14020
14020
  return e === document.body ? !1 : document.body.contains(e);
14021
14021
  }
14022
- function Rc(e) {
14022
+ function xc(e) {
14023
14023
  var t, n;
14024
14024
  if (window.getSelection) {
14025
14025
  const r = document.createRange(), a = e.firstChild;
@@ -14129,7 +14129,7 @@ const Ii = {
14129
14129
  fc: "color",
14130
14130
  cl: "text-decoration",
14131
14131
  un: "border-bottom"
14132
- }, xc = {
14132
+ }, qc = {
14133
14133
  bl: 1,
14134
14134
  it: 1,
14135
14135
  ff: 1,
@@ -14167,7 +14167,7 @@ function ip(e, t, n) {
14167
14167
  }
14168
14168
  return "";
14169
14169
  }
14170
- function qc(e, t) {
14170
+ function Ic(e, t) {
14171
14171
  if (h.isEmpty(e))
14172
14172
  return {};
14173
14173
  const n = e.split(";"), r = {
@@ -14206,22 +14206,22 @@ function Bn(e) {
14206
14206
  }
14207
14207
  return t;
14208
14208
  }
14209
- function Ic(e) {
14209
+ function Dc(e) {
14210
14210
  return e.trim().toLowerCase().replace(/\s+/g, "");
14211
14211
  }
14212
- function Dc(e) {
14213
- const t = Ic(e);
14212
+ function Oc(e) {
14213
+ const t = Dc(e);
14214
14214
  return t === "rgb(0,0,255)" || t === "#0000ff" || t === "#00f" || t === "blue";
14215
14215
  }
14216
14216
  function Cs(e) {
14217
- typeof e.fc == "string" && Dc(e.fc) && delete e.fc, e.un === 1 && delete e.un;
14217
+ typeof e.fc == "string" && Oc(e.fc) && delete e.fc, e.un === 1 && delete e.un;
14218
14218
  }
14219
14219
  function Ns(e, t) {
14220
14220
  var l, o, i, u;
14221
14221
  const n = [];
14222
14222
  let r = null, a = null;
14223
14223
  for (let s = 0; s < e.length; s += 1) {
14224
- const c = e[s], f = qc(
14224
+ const c = e[s], f = Ic(
14225
14225
  c.style.cssText,
14226
14226
  t
14227
14227
  );
@@ -14242,7 +14242,7 @@ function Ns(e, t) {
14242
14242
  }
14243
14243
  return n;
14244
14244
  }
14245
- function Oc(e, t, n) {
14245
+ function Fc(e, t, n) {
14246
14246
  if (h.isNil(e.ct))
14247
14247
  return;
14248
14248
  const { s: r } = e.ct;
@@ -14266,7 +14266,7 @@ function Oi(e, t) {
14266
14266
  }
14267
14267
  return "";
14268
14268
  }
14269
- function Fc(e, t, n) {
14269
+ function Lc(e, t, n) {
14270
14270
  const r = e.split(";");
14271
14271
  let a = "";
14272
14272
  if (t == null || t.length === 0)
@@ -14281,7 +14281,7 @@ function Fc(e, t, n) {
14281
14281
  else t.length > 0 && (e += `${t}:${n};`, a = e);
14282
14282
  return a;
14283
14283
  }
14284
- function Lc(e, t) {
14284
+ function Bc(e, t) {
14285
14285
  const n = e.split(";");
14286
14286
  let r = "";
14287
14287
  const a = t;
@@ -14307,10 +14307,10 @@ function pn(e, t, n) {
14307
14307
  u === "" && (u = "11"), r._fontSize = Number(u), r._color = i;
14308
14308
  }
14309
14309
  const a = Vo(r, void 0, void 0, !1);
14310
- if (e = Lc(e, t), h.isEmpty(a))
14310
+ if (e = Bc(e, t), h.isEmpty(a))
14311
14311
  return e;
14312
14312
  const l = h.kebabCase(Object.keys(a)[0]), o = Object.values(a)[0];
14313
- return e = Fc(e, l, o), e;
14313
+ return e = Lc(e, l, o), e;
14314
14314
  }
14315
14315
  function Dn(e, t, n = !0) {
14316
14316
  const r = e.split(";"), a = t.split(";");
@@ -14347,7 +14347,7 @@ function Dn(e, t, n = !0) {
14347
14347
  function et(e) {
14348
14348
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
14349
14349
  }
14350
- function Bc(e, t, n, r) {
14350
+ function Pc(e, t, n, r) {
14351
14351
  var d, p, g;
14352
14352
  const a = window.getSelection();
14353
14353
  if (!a || a.rangeCount === 0) return;
@@ -14448,7 +14448,7 @@ function Bc(e, t, n, r) {
14448
14448
  }
14449
14449
  ((d = c.parentElement) == null ? void 0 : d.tagName) === "SPAN" ? (b = h.indexOf(o.querySelectorAll("span"), y), y.outerHTML = K) : (b = 0, y.innerHTML = K);
14450
14450
  let le = 0;
14451
- M === 0 ? le = b : le = b + 1, Rc(
14451
+ M === 0 ? le = b : le = b + 1, xc(
14452
14452
  o.querySelectorAll("span")[le]
14453
14453
  );
14454
14454
  }
@@ -14520,7 +14520,7 @@ function xa(e) {
14520
14520
  const l = document.createRange();
14521
14521
  l.setStart(a, ((u = a.textContent) == null ? void 0 : u.length) || 0), l.collapse(!0), t.removeAllRanges(), t.addRange(l);
14522
14522
  }
14523
- function Pc(e) {
14523
+ function Hc(e) {
14524
14524
  var n, r;
14525
14525
  const t = e.querySelectorAll("span");
14526
14526
  for (let a = t.length - 1; a >= 0; a -= 1) {
@@ -14529,14 +14529,14 @@ function Pc(e) {
14529
14529
  }
14530
14530
  return null;
14531
14531
  }
14532
- function Hc(e) {
14532
+ function Uc(e) {
14533
14533
  var n, r;
14534
14534
  const t = e.nextElementSibling;
14535
14535
  return t instanceof HTMLElement && t.tagName === "SPAN" && !((n = t.dataset) != null && n.linkType) && !((r = t.dataset) != null && r.linkAddress);
14536
14536
  }
14537
14537
  function qa(e) {
14538
- const t = Pc(e);
14539
- if (!t || Hc(t)) return;
14538
+ const t = Hc(e);
14539
+ if (!t || Uc(t)) return;
14540
14540
  const n = document.createElement("span");
14541
14541
  n.className = "luckysheet-input-span", n.setAttribute("data-no-link-anchor", "1"), n.textContent = " ", t.insertAdjacentElement("afterend", n);
14542
14542
  }
@@ -14551,7 +14551,7 @@ function Pr(e, t, n) {
14551
14551
  }
14552
14552
  return r + n;
14553
14553
  }
14554
- function Uc(e, t, n) {
14554
+ function zc(e, t, n) {
14555
14555
  var d, p, g, y, b, w;
14556
14556
  const r = window.getSelection();
14557
14557
  if (!r || r.rangeCount === 0) return;
@@ -14710,9 +14710,9 @@ function Fi(e) {
14710
14710
  function Ss(e) {
14711
14711
  return !!/[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi.exec(e);
14712
14712
  }
14713
- const zc = 200, Yc = 5e3, In = {};
14713
+ const Yc = 200, Vc = 5e3, In = {};
14714
14714
  let Zr = 0, yn = {}, Kr = 0, As = {};
14715
- function Vc(e) {
14715
+ function Wc(e) {
14716
14716
  if (!e)
14717
14717
  return null;
14718
14718
  const t = e.match(/_\("([^"]*)"\*/);
@@ -14721,10 +14721,10 @@ function Vc(e) {
14721
14721
  const n = e.match(/"([^"]*)"\*/);
14722
14722
  return (n == null ? void 0 : n[1]) || null;
14723
14723
  }
14724
- function Wc(e, t, n, r, a) {
14724
+ function Gc(e, t, n, r, a) {
14725
14725
  if (!t || !t.includes("*") || !n || n <= 0)
14726
14726
  return e;
14727
- const l = Vc(t);
14727
+ const l = Wc(t);
14728
14728
  if (!l)
14729
14729
  return e;
14730
14730
  const o = e.trim(), i = o.indexOf(l);
@@ -14741,19 +14741,19 @@ function Es() {
14741
14741
  for (const e in In) delete In[e];
14742
14742
  Zr = 0;
14743
14743
  }
14744
- function Gc(e, t) {
14744
+ function jc(e, t) {
14745
14745
  if (t in In)
14746
14746
  return In[t];
14747
14747
  const n = document.createElement("span");
14748
14748
  n.style.float = "left", n.style.whiteSpace = "nowrap", n.style.visibility = "hidden", n.style.margin = "0", n.style.padding = "0", n.innerHTML = e, document.body.append(n);
14749
14749
  const r = Math.max(n.scrollWidth, n.offsetWidth, n.clientWidth), a = Math.max(n.scrollHeight, n.offsetHeight, n.clientHeight);
14750
- if (Zr >= zc) {
14750
+ if (Zr >= Yc) {
14751
14751
  for (const l in In) delete In[l];
14752
14752
  Zr = 0;
14753
14753
  }
14754
14754
  return In[t] = [r, a], Zr += 1, n.remove(), [r, a];
14755
14755
  }
14756
- function jc(e) {
14756
+ function Xc(e) {
14757
14757
  return `normal normal normal ${e}pt "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif`;
14758
14758
  }
14759
14759
  function Li(e, t, n) {
@@ -14772,7 +14772,7 @@ function Li(e, t, n) {
14772
14772
  }
14773
14773
  return `${r.join(" ")} ${a}`;
14774
14774
  }
14775
- return jc(t);
14775
+ return Xc(t);
14776
14776
  }
14777
14777
  function En(e, t, n, r) {
14778
14778
  let a = yn[`${e}_${t.font}`];
@@ -14783,7 +14783,7 @@ function En(e, t, n, r) {
14783
14783
  if (o.width = l.width, r && (t.font = r), o.actualBoundingBoxDescent = l.actualBoundingBoxDescent, o.actualBoundingBoxAscent = l.actualBoundingBoxAscent, o.actualBoundingBoxDescent == null || o.actualBoundingBoxAscent == null || Number.isNaN(o.actualBoundingBoxDescent) || Number.isNaN(o.actualBoundingBoxAscent)) {
14784
14784
  let i = "M";
14785
14785
  Ss(e) && (i = "田");
14786
- const u = Gc(i, t.font)[1] * 0.8;
14786
+ const u = jc(i, t.font)[1] * 0.8;
14787
14787
  t.textBaseline === "top" ? (o.actualBoundingBoxDescent = u, o.actualBoundingBoxAscent = 0) : t.textBaseline === "middle" ? (o.actualBoundingBoxDescent = u / 2, o.actualBoundingBoxAscent = u / 2) : (o.actualBoundingBoxDescent = 0, o.actualBoundingBoxAscent = u);
14788
14788
  }
14789
14789
  if (t.textBaseline === "alphabetic") {
@@ -14793,9 +14793,9 @@ function En(e, t, n, r) {
14793
14793
  let c = yn[`${u}_${t.font}`];
14794
14794
  r && (c = yn[`${u}_${r}`]), s == null && (s = t.measureText(i)), c == null && (c = t.measureText(u)), o.actualBoundingBoxDescent <= c.actualBoundingBoxDescent && (o.actualBoundingBoxDescent = s.actualBoundingBoxDescent, o.actualBoundingBoxDescent || (o.actualBoundingBoxDescent = 0));
14795
14795
  }
14796
- return o.width *= n.zoomRatio, o.actualBoundingBoxDescent *= n.zoomRatio, o.actualBoundingBoxAscent *= n.zoomRatio, Kr >= Yc && (yn = {}, Kr = 0), yn[`${e}_${n.zoomRatio}_${t.font}`] = o, Kr += 1, o;
14796
+ return o.width *= n.zoomRatio, o.actualBoundingBoxDescent *= n.zoomRatio, o.actualBoundingBoxAscent *= n.zoomRatio, Kr >= Vc && (yn = {}, Kr = 0), yn[`${e}_${n.zoomRatio}_${t.font}`] = o, Kr += 1, o;
14797
14797
  }
14798
- function Xc(e) {
14798
+ function Zc(e) {
14799
14799
  const t = e.measureText("田");
14800
14800
  return !h.isNil(t.actualBoundingBoxAscent);
14801
14801
  }
@@ -14910,7 +14910,7 @@ function Ms(e, t, n, r, a) {
14910
14910
  if (_ = Li(e, n.defaultFontSize, a), t.font = _, v = Rt(e, "cl"), T = Rt(e, "un"), C = Rt(e, "fs"), e instanceof Object ? (k = e.m, h.isNil(k) && (k = e.v)) : k = e, h.isEmpty(k))
14911
14911
  return null;
14912
14912
  const K = (z = e == null ? void 0 : e.ct) == null ? void 0 : z.fa;
14913
- if (h.isString(k) && h.isString(K) && (k = Wc(
14913
+ if (h.isString(k) && h.isString(K) && (k = Gc(
14914
14914
  k,
14915
14915
  K,
14916
14916
  l,
@@ -15011,7 +15011,7 @@ function Ms(e, t, n, r, a) {
15011
15011
  $e += Z;
15012
15012
  }
15013
15013
  } else {
15014
- const K = Xc(t);
15014
+ const K = Zc(t);
15015
15015
  if (K ? t.textBaseline = "alphabetic" : t.textBaseline = "bottom", p === "2" || $) {
15016
15016
  let le = 0, F = 0, te = 0, G = 0;
15017
15017
  const Y = {};
@@ -15434,7 +15434,7 @@ const Kn = {
15434
15434
  // 数组范围有其它值
15435
15435
  circ: "#CIRC!"
15436
15436
  // 循环引用
15437
- }, Zc = {
15437
+ }, Kc = {
15438
15438
  [Co]: "Invalid calculation: the divisor (second value) cannot be zero",
15439
15439
  [Fn]: "Wrong function name or parameter",
15440
15440
  [hs]: "Formula returned null",
@@ -15444,21 +15444,21 @@ const Kn = {
15444
15444
  [pr]: "Unknown error",
15445
15445
  [gs]: "Circular dependency."
15446
15446
  };
15447
- function Kc(e) {
15448
- return Zc[e];
15447
+ function Qc(e) {
15448
+ return Kc[e];
15449
15449
  }
15450
- const Qc = Object.values(Kn);
15450
+ const Jc = Object.values(Kn);
15451
15451
  function lo(e) {
15452
- return Qc.includes(e);
15452
+ return Jc.includes(e);
15453
15453
  }
15454
15454
  function ot(e) {
15455
15455
  return h.isNil(e) || e.toString().replace(/\s/g, "") === "";
15456
15456
  }
15457
- function Jc(e) {
15457
+ function ef(e) {
15458
15458
  return /^0x[a-fA-F0-9]+$/i.test(e);
15459
15459
  }
15460
15460
  function Ge(e) {
15461
- return Jc(e == null ? void 0 : e.toString()) || h.isNil(e) || e.toString().replace(/\s/g, "") === "" || typeof e == "boolean" ? !1 : !Number.isNaN(Number(e));
15461
+ return ef(e == null ? void 0 : e.toString()) || h.isNil(e) || e.toString().replace(/\s/g, "") === "" || typeof e == "boolean" ? !1 : !Number.isNaN(Number(e));
15462
15462
  }
15463
15463
  function tn(e) {
15464
15464
  var t;
@@ -16028,11 +16028,11 @@ function ma(e) {
16028
16028
  }
16029
16029
  return null;
16030
16030
  }
16031
- function ef(e) {
16031
+ function tf(e) {
16032
16032
  return ma(e) !== null;
16033
16033
  }
16034
16034
  function Qn(e) {
16035
- return e === null || e.toString().length < 5 ? !1 : !!ef(e);
16035
+ return e === null || e.toString().length < 5 ? !1 : !!tf(e);
16036
16036
  }
16037
16037
  function Vt(e, t) {
16038
16038
  return Ne(e).diff(Ne(t));
@@ -16065,7 +16065,7 @@ function un(e, t, n, r, a, l) {
16065
16065
  }), o;
16066
16066
  }
16067
16067
  var Ot = {};
16068
- const tf = function(t) {
16068
+ const nf = function(t) {
16069
16069
  t.version = "0.11.2";
16070
16070
  function n(I) {
16071
16071
  for (var A = "", P = I.length - 1; P >= 0; ) A += I.charAt(P--);
@@ -17168,10 +17168,10 @@ const tf = function(t) {
17168
17168
  A[P] !== void 0 && we(A[P], P);
17169
17169
  }, t.init_table = p, t.format = ge;
17170
17170
  };
17171
- tf(Ot);
17172
- const nf = new Date(1900, 2, 1, 0, 0, 0), rf = 999999999999997, Eo = 1e15;
17171
+ nf(Ot);
17172
+ const rf = new Date(1900, 2, 1, 0, 0, 0), af = 999999999999997, Eo = 1e15;
17173
17173
  function Mo(e) {
17174
- return Number.isFinite(e) && e > rf && e < Eo;
17174
+ return Number.isFinite(e) && e > af && e < Eo;
17175
17175
  }
17176
17176
  function xs(e) {
17177
17177
  if (typeof e != "string") return !1;
@@ -17198,13 +17198,13 @@ function ur(e) {
17198
17198
  useGrouping: !1
17199
17199
  });
17200
17200
  }
17201
- function af(e) {
17202
- return !Number.isFinite(e) || e === 0 ? 1 : e.toExponential().split("e")[0].replace("-", "").replace(".", "").replace(/^0+/, "").replace(/0+$/, "").length || 1;
17203
- }
17204
17201
  function of(e) {
17205
- return Number.isFinite(e) ? Number.isInteger(e) && Math.abs(e) > Number.MAX_SAFE_INTEGER ? !0 : af(e) > 15 : !1;
17202
+ return !Number.isFinite(e) || e === 0 ? 1 : e.toExponential().split("e")[0].replace("-", "").replace(".", "").replace(/^0+/, "").replace(/0+$/, "").length || 1;
17206
17203
  }
17207
17204
  function lf(e) {
17205
+ return Number.isFinite(e) ? Number.isInteger(e) && Math.abs(e) > Number.MAX_SAFE_INTEGER ? !0 : of(e) > 15 : !1;
17206
+ }
17207
+ function sf(e) {
17208
17208
  const t = e.toExponential().split("e")[0];
17209
17209
  let n = 0;
17210
17210
  return t.includes(".") && (n = (t.split(".")[1] || "").length), Ro(e, Math.min(5, Math.max(0, n)));
@@ -17214,7 +17214,7 @@ function Ro(e, t = 5) {
17214
17214
  const n = e.toExponential(Math.max(0, Math.min(20, t))), [r, a = "0"] = n.split("e"), l = r.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, "").replace(/\.$/, ""), o = Number(a), i = o >= 0 ? "+" : "-", u = Math.abs(o).toString().padStart(2, "0");
17215
17215
  return `${l}E${i}${u}`;
17216
17216
  }
17217
- function sf(e) {
17217
+ function uf(e) {
17218
17218
  if (!Number.isFinite(e) || Number.isInteger(e)) return null;
17219
17219
  const t = Math.abs(e);
17220
17220
  if (Mo(t)) return null;
@@ -17232,7 +17232,7 @@ function Rr(e, t) {
17232
17232
  e.getSeconds()
17233
17233
  );
17234
17234
  const r = Date.UTC(1899, 11, 31, 0, 0, 0);
17235
- return t ? n -= 1461 * 24 * 60 * 60 * 1e3 : e >= nf && (n += 24 * 60 * 60 * 1e3), (n - r) / (24 * 60 * 60 * 1e3);
17235
+ return t ? n -= 1461 * 24 * 60 * 60 * 1e3 : e >= rf && (n += 24 * 60 * 60 * 1e3), (n - r) / (24 * 60 * 60 * 1e3);
17236
17236
  }
17237
17237
  function Qe(e) {
17238
17238
  let t = null, n = {}, r = e;
@@ -17409,7 +17409,7 @@ function Qe(e) {
17409
17409
  "dy dd/MM/yyyy": "ddd dd/mm/yyyy",
17410
17410
  "dy MM/dd/yyyy": "ddd mm/dd/yyyy"
17411
17411
  };
17412
- n.fa = o[a.formatType] || (Nc() === "us" ? "MM/dd/yyyy" : "dd/MM/yyyy"), t = Ot.format(n.fa, r);
17412
+ n.fa = o[a.formatType] || (kc() === "us" ? "MM/dd/yyyy" : "dd/MM/yyyy"), t = Ot.format(n.fa, r);
17413
17413
  } else
17414
17414
  t = String(e), n.fa = "General", n.t = "g";
17415
17415
  } else
@@ -17429,7 +17429,7 @@ function xo(e) {
17429
17429
  (r, a) => a.length - r.length || (n.get(r) ?? 0) - (n.get(a) ?? 0)
17430
17430
  );
17431
17431
  }
17432
- function uf(e, t) {
17432
+ function cf(e, t) {
17433
17433
  if (!e) return !1;
17434
17434
  for (const n of qs)
17435
17435
  if (e.includes(`"${n}"`)) return !0;
@@ -17437,10 +17437,10 @@ function uf(e, t) {
17437
17437
  (n) => (e.startsWith(n) || e.startsWith(Is(n))) && /#,##0/.test(e)
17438
17438
  );
17439
17439
  }
17440
- function cf(e, t) {
17441
- return !e || e === "General" || e === "@" ? !1 : !!(uf(e, t) || e.includes('_("') && /#,?#+0/.test(e) || /#,##0/.test(e) && !e.includes("%") && xo(t).some((r) => e.includes(r)));
17442
- }
17443
17440
  function ff(e, t) {
17441
+ return !e || e === "General" || e === "@" ? !1 : !!(cf(e, t) || e.includes('_("') && /#,?#+0/.test(e) || /#,##0/.test(e) && !e.includes("%") && xo(t).some((r) => e.includes(r)));
17442
+ }
17443
+ function df(e, t) {
17444
17444
  if (typeof e != "string" || e.trim() === "") return null;
17445
17445
  let n = e.trim();
17446
17446
  if (n.startsWith("=") || n.startsWith("'")) return null;
@@ -17474,7 +17474,7 @@ function ff(e, t) {
17474
17474
  return null;
17475
17475
  }
17476
17476
  function zr(e, t, n) {
17477
- const r = ff(e, n);
17477
+ const r = df(e, n);
17478
17478
  return r || Qe(t);
17479
17479
  }
17480
17480
  function Is(e) {
@@ -17512,7 +17512,7 @@ function br(e) {
17512
17512
  e.m = r.toFixed(o);
17513
17513
  return;
17514
17514
  }
17515
- const a = sf(r);
17515
+ const a = uf(r);
17516
17516
  if (a != null) {
17517
17517
  e.m = a;
17518
17518
  return;
@@ -17523,7 +17523,7 @@ function br(e) {
17523
17523
  function ha(e, t) {
17524
17524
  return Ot.is_date(e, t);
17525
17525
  }
17526
- function df(e) {
17526
+ function mf(e) {
17527
17527
  let t = Number(e);
17528
17528
  if (typeof e == "number")
17529
17529
  return e;
@@ -17534,7 +17534,7 @@ function df(e) {
17534
17534
  function up(e, t, n) {
17535
17535
  var a, l, o, i, u, s;
17536
17536
  let r = at(e, t, n, "m");
17537
- return r == null ? r = at(e, t, n, "v") : Number.isNaN(df(r)) ? ((o = (l = (a = n[e]) == null ? void 0 : a[t]) == null ? void 0 : l.ct) == null ? void 0 : o.t) === "d" || ((s = (u = (i = n[e]) == null ? void 0 : i[t]) == null ? void 0 : u.ct) == null ? void 0 : s.t) === "b" || (r = at(e, t, n, "v")) : h.isString(r) && r.indexOf("%") > -1 || (r = at(e, t, n, "v")), r;
17537
+ return r == null ? r = at(e, t, n, "v") : Number.isNaN(mf(r)) ? ((o = (l = (a = n[e]) == null ? void 0 : a[t]) == null ? void 0 : l.ct) == null ? void 0 : o.t) === "d" || ((s = (u = (i = n[e]) == null ? void 0 : i[t]) == null ? void 0 : u.ct) == null ? void 0 : s.t) === "b" || (r = at(e, t, n, "v")) : h.isString(r) && r.indexOf("%") > -1 || (r = at(e, t, n, "v")), r;
17538
17538
  }
17539
17539
  const pa = [
17540
17540
  "#c1232b",
@@ -17588,11 +17588,11 @@ function zn(e, t) {
17588
17588
  let n = h.sortedIndex(t, e);
17589
17589
  return n >= t.length && e > 0 ? n = t.length - 1 : n === -1 && e <= 0 && (n = 0), so(n, t);
17590
17590
  }
17591
- const mf = 15, hf = 50, cp = 100, fp = 300, dp = 3e4, pf = "fortune-formula-execution-debug";
17591
+ const hf = 15, pf = 50, cp = 100, fp = 300, dp = 3e4, gf = "fortune-formula-execution-debug";
17592
17592
  function mp() {
17593
17593
  if (typeof window > "u") return !1;
17594
17594
  try {
17595
- return localStorage.getItem(pf) === "true";
17595
+ return localStorage.getItem(gf) === "true";
17596
17596
  } catch {
17597
17597
  return !1;
17598
17598
  }
@@ -17600,33 +17600,33 @@ function mp() {
17600
17600
  function uo(e) {
17601
17601
  return !!(e.isFormulaCalculating && e.formulaAsyncEval);
17602
17602
  }
17603
- const gf = /\b(SEQUENCE|FILTER|SORT|SORTBY|UNIQUE|TRANSPOSE|ARRAYFORMULA|INDIRECT|OFFSET|INDEX|SPARKLINE)\s*\(/i;
17603
+ const yf = /\b(SEQUENCE|FILTER|SORT|SORTBY|UNIQUE|TRANSPOSE|ARRAYFORMULA|INDIRECT|OFFSET|INDEX|SPARKLINE)\s*\(/i;
17604
17604
  function hp(e) {
17605
- return gf.test(e);
17605
+ return yf.test(e);
17606
17606
  }
17607
- var Yr, yf = new Uint8Array(16);
17608
- function bf() {
17607
+ var Yr, bf = new Uint8Array(16);
17608
+ function wf() {
17609
17609
  if (!Yr && (Yr = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !Yr))
17610
17610
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
17611
- return Yr(yf);
17611
+ return Yr(bf);
17612
17612
  }
17613
- const wf = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
17614
- function vf(e) {
17615
- return typeof e == "string" && wf.test(e);
17613
+ const vf = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
17614
+ function _f(e) {
17615
+ return typeof e == "string" && vf.test(e);
17616
17616
  }
17617
17617
  var Ct = [];
17618
17618
  for (var Da = 0; Da < 256; ++Da)
17619
17619
  Ct.push((Da + 256).toString(16).substr(1));
17620
- function _f(e) {
17620
+ function Tf(e) {
17621
17621
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = (Ct[e[t + 0]] + Ct[e[t + 1]] + Ct[e[t + 2]] + Ct[e[t + 3]] + "-" + Ct[e[t + 4]] + Ct[e[t + 5]] + "-" + Ct[e[t + 6]] + Ct[e[t + 7]] + "-" + Ct[e[t + 8]] + Ct[e[t + 9]] + "-" + Ct[e[t + 10]] + Ct[e[t + 11]] + Ct[e[t + 12]] + Ct[e[t + 13]] + Ct[e[t + 14]] + Ct[e[t + 15]]).toLowerCase();
17622
- if (!vf(n))
17622
+ if (!_f(n))
17623
17623
  throw TypeError("Stringified UUID is invalid");
17624
17624
  return n;
17625
17625
  }
17626
17626
  function Ls(e, t, n) {
17627
17627
  e = e || {};
17628
- var r = e.random || (e.rng || bf)();
17629
- return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, _f(r);
17628
+ var r = e.random || (e.rng || wf)();
17629
+ return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Tf(r);
17630
17630
  }
17631
17631
  function qo(e) {
17632
17632
  var r;
@@ -17653,7 +17653,7 @@ function pp(e, t) {
17653
17653
  const n = e, r = t;
17654
17654
  return n.r === r.r && n.c === r.c && h.isEqual(n.v, r.v);
17655
17655
  }
17656
- const Tf = [
17656
+ const $f = [
17657
17657
  "tb",
17658
17658
  "ht",
17659
17659
  "vt",
@@ -17667,7 +17667,7 @@ const Tf = [
17667
17667
  "cl",
17668
17668
  "bg"
17669
17669
  ];
17670
- function $f(e) {
17670
+ function Cf(e) {
17671
17671
  return JSON.stringify(h.omit(e, ["row", "column"]));
17672
17672
  }
17673
17673
  function Bs(e) {
@@ -17678,7 +17678,7 @@ function gp(e, t) {
17678
17678
  return h.isEqual(e ?? [], t ?? []);
17679
17679
  }
17680
17680
  function Ps(e, t) {
17681
- for (const n of Tf) {
17681
+ for (const n of $f) {
17682
17682
  const r = t[n];
17683
17683
  r != null && (e[n] = r);
17684
17684
  }
@@ -17688,11 +17688,11 @@ function Oa(e) {
17688
17688
  const t = {};
17689
17689
  return Ps(t, e), t;
17690
17690
  }
17691
- function Cf(e, t) {
17691
+ function Nf(e, t) {
17692
17692
  const [n, r] = e.row, [a, l] = e.column, [o, i] = t.row, [u, s] = t.column, c = r + 1 >= o && i + 1 >= n, f = l + 1 >= u && s + 1 >= a;
17693
17693
  return c && f;
17694
17694
  }
17695
- function Nf(e, t) {
17695
+ function kf(e, t) {
17696
17696
  return {
17697
17697
  ...e,
17698
17698
  row: [Math.min(e.row[0], t.row[0]), Math.max(e.row[1], t.row[1])],
@@ -17706,7 +17706,7 @@ function jn(e) {
17706
17706
  if (!(e != null && e.length)) return [];
17707
17707
  const t = e.filter(Bs), n = /* @__PURE__ */ new Map();
17708
17708
  t.forEach((a) => {
17709
- const l = $f(a), o = n.get(l) ?? [];
17709
+ const l = Cf(a), o = n.get(l) ?? [];
17710
17710
  o.push(a), n.set(l, o);
17711
17711
  });
17712
17712
  const r = [];
@@ -17715,7 +17715,7 @@ function jn(e) {
17715
17715
  for (; l.length > 0; ) {
17716
17716
  let o = l.shift(), i = !0;
17717
17717
  for (; i; )
17718
- i = !1, l = l.filter((u) => Cf(o, u) ? (o = Nf(o, u), i = !0, !1) : !0);
17718
+ i = !1, l = l.filter((u) => Nf(o, u) ? (o = kf(o, u), i = !0, !1) : !0);
17719
17719
  r.push(o);
17720
17720
  }
17721
17721
  }), r;
@@ -17727,7 +17727,7 @@ function Io(e) {
17727
17727
  t = Math.max(t, r.row[1]), n = Math.max(n, r.column[1]);
17728
17728
  }), { maxRow: t, maxCol: n };
17729
17729
  }
17730
- function kf(e, t, n, r, a, l) {
17730
+ function Sf(e, t, n, r, a, l) {
17731
17731
  const o = [...e ?? []], i = o.findIndex(
17732
17732
  (s) => s.row[0] === t && s.row[1] === n && s.column[0] === r && s.column[1] === a
17733
17733
  );
@@ -17747,7 +17747,7 @@ function kf(e, t, n, r, a, l) {
17747
17747
  ...l
17748
17748
  }), u = jn(o), { ranges: u, changed: !0 };
17749
17749
  }
17750
- function Sf(e, t, n) {
17750
+ function Af(e, t, n) {
17751
17751
  if (!(e != null && e.length)) return [];
17752
17752
  const r = [];
17753
17753
  return e.forEach((a) => {
@@ -17763,7 +17763,7 @@ function Do(e, t, n, r, a) {
17763
17763
  let l = e ?? [];
17764
17764
  for (let o = t; o <= n; o += 1)
17765
17765
  for (let i = r; i <= a; i += 1)
17766
- l = Sf(l, o, i);
17766
+ l = Af(l, o, i);
17767
17767
  return l;
17768
17768
  }
17769
17769
  function Bi(e, t, n, r, a) {
@@ -17774,7 +17774,7 @@ function Bi(e, t, n, r, a) {
17774
17774
  }).filter((o) => o != null);
17775
17775
  return jn(l);
17776
17776
  }
17777
- function Af(e, t, n, r, a) {
17777
+ function Ef(e, t, n, r, a) {
17778
17778
  let [l, o] = t === "row" ? e.row : e.column;
17779
17779
  if (o < n) return [e];
17780
17780
  if (l > r) {
@@ -17791,11 +17791,11 @@ function Af(e, t, n, r, a) {
17791
17791
  t === "row" ? { ...e, row: [n, o - a] } : { ...e, column: [n, o - a] }
17792
17792
  ), i.filter(Bs);
17793
17793
  }
17794
- function Ef(e, t, n, r) {
17794
+ function Mf(e, t, n, r) {
17795
17795
  if (!(e != null && e.length)) return [];
17796
17796
  const a = r - n + 1, l = [];
17797
17797
  return e.forEach((o) => {
17798
- l.push(...Af(o, t, n, r, a));
17798
+ l.push(...Ef(o, t, n, r, a));
17799
17799
  }), jn(l);
17800
17800
  }
17801
17801
  function Oo(e, t) {
@@ -17837,7 +17837,7 @@ function yp(e) {
17837
17837
  u[c.r][c.c] = c.v;
17838
17838
  }), Oo(u, n), u;
17839
17839
  }
17840
- function Mf(e, t) {
17840
+ function Rf(e, t) {
17841
17841
  function n(c) {
17842
17842
  let f = 0;
17843
17843
  for (let m = 0; m < c.length; m += 1)
@@ -17886,7 +17886,7 @@ function Hs(e, t, n) {
17886
17886
  }
17887
17887
  return null;
17888
17888
  }
17889
- function Rf(e, t = {}) {
17889
+ function Us(e, t = {}) {
17890
17890
  var a;
17891
17891
  const n = t.index ?? Ee(e, t.id ?? e.currentSheetId);
17892
17892
  if (n == null) return null;
@@ -17988,7 +17988,7 @@ function Tp(e, t) {
17988
17988
  const c = { f: u[2], v: u[1] };
17989
17989
  Ta(e, o, i, c, ke(e));
17990
17990
  } else
17991
- Au(e, o, i, u[1], null);
17991
+ Eu(e, o, i, u[1], null);
17992
17992
  On(e, o, i, t);
17993
17993
  }
17994
17994
  }
@@ -18001,7 +18001,7 @@ function $p(e, t, n) {
18001
18001
  let f = !1;
18002
18002
  if (n && ((a = e.luckysheetfile[r].data[s][c]) != null && a.f) && !((l = e.luckysheetfile[r].data[s][c]) != null && l.isDataBlockFormula) && (f = n.some((p) => {
18003
18003
  var g;
18004
- return Mf(
18004
+ return Rf(
18005
18005
  (g = e.luckysheetfile[r].data[s][c]) == null ? void 0 : g.f,
18006
18006
  p
18007
18007
  );
@@ -18018,7 +18018,7 @@ function $p(e, t, n) {
18018
18018
  const p = { f: m[2], v: m[1] };
18019
18019
  Ta(e, s, c, p, ke(e));
18020
18020
  } else
18021
- Au(e, s, c, m[1], null);
18021
+ Eu(e, s, c, m[1], null);
18022
18022
  On(e, s, c, t);
18023
18023
  }
18024
18024
  }
@@ -18051,7 +18051,7 @@ function Fa(e, t, n, r, a) {
18051
18051
  function Df(e) {
18052
18052
  e.rangeValuePassCache = /* @__PURE__ */ new Map(), e.rangeValuePassCacheStats = { hits: 0, misses: 0 };
18053
18053
  }
18054
- function Us(e) {
18054
+ function zs(e) {
18055
18055
  e.rangeValuePassCache = void 0, e.rangeValuePassCacheStats = void 0;
18056
18056
  }
18057
18057
  function Of(e, t) {
@@ -18112,7 +18112,7 @@ function jf(e, t) {
18112
18112
  return r = r.replace(/\s+/g, ""), !(!r.includes("X") || !/^[0X+\-*/().]+$/.test(r));
18113
18113
  }
18114
18114
  const Mt = "#CIRC!", vr = "Circular Dependency";
18115
- function zs(e, t) {
18115
+ function Ys(e, t) {
18116
18116
  const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), a = [], l = /* @__PURE__ */ new Map(), o = (i) => {
18117
18117
  const u = r.get(i) ?? 0;
18118
18118
  if (u === 1) {
@@ -18219,7 +18219,7 @@ class Kf {
18219
18219
  const t = this, n = (a, l, o) => `${a}:${l}:${o}`, r = (a) => {
18220
18220
  t.activeDepCollection && t.activeDepCollection.deps.add(a);
18221
18221
  };
18222
- this.data_parm_index = 0, this.selectingRangeIndex = -1, this.rangeSelectionActive = null, this.formulaEditorOwner = null, this.functionlistMap = {}, this.execFunctionGlobalData = {}, this.cellTextToIndexList = {}, this.depsByCell = /* @__PURE__ */ new Map(), this.revDepsByCell = /* @__PURE__ */ new Map(), this.formulasWithWideRangeDeps = /* @__PURE__ */ new Set(), this.activeDepCollection = null, this.parser = new $c(), this.parser.on(
18222
+ this.data_parm_index = 0, this.selectingRangeIndex = -1, this.rangeSelectionActive = null, this.formulaEditorOwner = null, this.functionlistMap = {}, this.execFunctionGlobalData = {}, this.cellTextToIndexList = {}, this.depsByCell = /* @__PURE__ */ new Map(), this.revDepsByCell = /* @__PURE__ */ new Map(), this.formulasWithWideRangeDeps = /* @__PURE__ */ new Set(), this.activeDepCollection = null, this.parser = new Cc(), this.parser.on(
18223
18223
  "callCellValue",
18224
18224
  (a, l, o) => {
18225
18225
  var d, p;
@@ -18354,7 +18354,7 @@ class Kf {
18354
18354
  return String(t == null ? void 0 : t.m).includes("%") ? t == null ? void 0 : t.m : t == null ? void 0 : t.v;
18355
18355
  }
18356
18356
  }
18357
- function Ys(e) {
18357
+ function Vs(e) {
18358
18358
  return new DOMParser().parseFromString(e, "text/html").body.childNodes[0];
18359
18359
  }
18360
18360
  function Dt(e) {
@@ -18392,7 +18392,7 @@ function Hn(e, t, n) {
18392
18392
  const [, p, g, y, b] = d;
18393
18393
  if (y != null && p !== y)
18394
18394
  return null;
18395
- l = b ? `${g}:${b}` : g, a = p.replace(/^'|'$/g, "").replace(/\\'/g, "'").replace(/''/g, "'"), h.forEach(u, (w) => a === w.name ? (o = w.id, i = w.data ?? null, !1) : !0), o != null && h.isNil(i) && (i = Rf(e, { id: o }));
18395
+ l = b ? `${g}:${b}` : g, a = p.replace(/^'|'$/g, "").replace(/\\'/g, "'").replace(/''/g, "'"), h.forEach(u, (w) => a === w.name ? (o = w.id, i = w.data ?? null, !1) : !0), o != null && h.isNil(i) && (i = Us(e, { id: o }));
18396
18396
  } else {
18397
18397
  let d = n;
18398
18398
  if (h.isNil(d) && (d = e.currentSheetId), `${t}_${d}` in e.formulaCache.cellTextToIndexList)
@@ -18725,7 +18725,7 @@ function Lt(e, t, n, r, a, l, o, i) {
18725
18725
  if (g.has(N)) return;
18726
18726
  const M = e.formulaCache.revDepsByCell.get(N) ?? /* @__PURE__ */ new Set();
18727
18727
  M.add(c), e.formulaCache.revDepsByCell.set(N, M);
18728
- }), zs(c, e.formulaCache.depsByCell).has(c) ? (d.error = Mt, d.result = Mt, Er(e, n, r, {
18728
+ }), Ys(c, e.formulaCache.depsByCell).has(c) ? (d.error = Mt, d.result = Mt, Er(e, n, r, {
18729
18729
  row_column: `${n}_${r}`,
18730
18730
  title: vr,
18731
18731
  message: "Circular dependency."
@@ -18762,7 +18762,7 @@ function Lt(e, t, n, r, a, l, o, i) {
18762
18762
  e.formulaCache.parser.cryptoDenomination && e.formulaCache.parser.cryptoDenomination !== "" && (typeof w == "number" || typeof w == "string") && (_ = `${Number(w).toFixed(
18763
18763
  e.formulaCache.parser.cryptoDecimals
18764
18764
  )} ${e.formulaCache.parser.cryptoDenomination}`);
18765
- const v = !h.isNil(b), T = Kc(_ == null ? void 0 : _.toString());
18765
+ const v = !h.isNil(b), T = Qc(_ == null ? void 0 : _.toString());
18766
18766
  return v || T ? Er(e, n, r, {
18767
18767
  row_column: `${n}_${r}`,
18768
18768
  title: b === Mt ? vr : "Error",
@@ -18802,8 +18802,9 @@ function ad(e) {
18802
18802
  for (let o = 0; o < e.groupValuesRefreshData.length; o += 1) {
18803
18803
  const i = e.groupValuesRefreshData[o], u = Ee(e, i.id);
18804
18804
  if (u == null) continue;
18805
- const s = t[u], { data: c } = s;
18806
- if (h.isNil(c))
18805
+ const s = t[u];
18806
+ let { data: c } = s;
18807
+ if (h.isNil(c) && (c = Us(e, { id: i.id }) ?? void 0), h.isNil(c))
18807
18808
  continue;
18808
18809
  const f = {};
18809
18810
  h.isNil(i.spe) || (i.spe.type === "sparklines" ? f.spl = i.spe.data : i.spe.type === "dynamicArrayItem" && (s.dynamicArray = rd(e, i.spe.data))), f.v = i.v, f.f = i.f, qt(e, i.r, i.c, c, f);
@@ -18971,7 +18972,7 @@ function Cp(e, t, n, r, a = [], l) {
18971
18972
  });
18972
18973
  }
18973
18974
  }
18974
- function Np(e, t, n = hf) {
18975
+ function Np(e, t, n = pf) {
18975
18976
  ga(e);
18976
18977
  const r = new Set(t.calcChainKeys), a = new Set(t.impactedByCircular), l = new Set(t.cycleNodes), o = ke(e), i = Math.min(t.nextIndex + n, t.formulaRunList.length);
18977
18978
  for (let s = t.nextIndex; s < i; s += 1) {
@@ -18987,11 +18988,11 @@ function Np(e, t, n = hf) {
18987
18988
  }
18988
18989
  t.nextIndex = i;
18989
18990
  const u = i >= t.formulaRunList.length;
18990
- return u && (e.formulaCache.execFunctionExist = void 0, Us(e.formulaCache), e.formulaCache.execFunctionGlobalData = null), u;
18991
+ return u && (e.formulaCache.execFunctionExist = void 0, zs(e.formulaCache), e.formulaCache.execFunctionGlobalData = null), u;
18991
18992
  }
18992
18993
  function ln(e, t, n, r, a, l, o = !1) {
18993
18994
  h.isNil(l) && (l = ke(e)), h.isNil(a) && (a = e.currentSheetId), e.formulaCache.execFunctionGlobalData = {}, Df(e.formulaCache);
18994
- const i = `${a}:${t}:${n}`, u = zs(i, e.formulaCache.depsByCell), s = u.size ? Xf(u, e.formulaCache.revDepsByCell) : /* @__PURE__ */ new Set();
18995
+ const i = `${a}:${t}:${n}`, u = Ys(i, e.formulaCache.depsByCell), s = u.size ? Xf(u, e.formulaCache.revDepsByCell) : /* @__PURE__ */ new Set();
18995
18996
  if (!h.isNil(r)) {
18996
18997
  const $ = [[{ v: void 0 }]];
18997
18998
  qt(e, 0, 0, $, r), [
@@ -19146,7 +19147,7 @@ function ln(e, t, n, r, a, l, o = !1) {
19146
19147
  const C = /* @__PURE__ */ new Set();
19147
19148
  if (c.forEach(($) => {
19148
19149
  C.add(`${$.r}_${$.c}_${$.id}`);
19149
- }), _.length >= mf) {
19150
+ }), _.length >= hf) {
19150
19151
  e.formulaAsyncEval = {
19151
19152
  formulaRunList: _.map(($) => ({
19152
19153
  r: $.r,
@@ -19188,7 +19189,7 @@ function ln(e, t, n, r, a, l, o = !1) {
19188
19189
  u
19189
19190
  );
19190
19191
  }
19191
- e.formulaCache.execFunctionExist = void 0, Us(e.formulaCache);
19192
+ e.formulaCache.execFunctionExist = void 0, zs(e.formulaCache);
19192
19193
  }
19193
19194
  function ld(e, t, n) {
19194
19195
  const r = /<span.*?>/g, a = t.replace(r, "").split("</span>"), l = n.replace(r, "").split("</span>");
@@ -19277,7 +19278,7 @@ function id(e, t) {
19277
19278
  e.formulaRangeSelect = t;
19278
19279
  }
19279
19280
  function sd(e, t, n = -1) {
19280
- const r = Ys(`<div>${t}</div>`), a = [];
19281
+ const r = Vs(`<div>${t}</div>`), a = [];
19281
19282
  r.querySelectorAll("span.fortune-formula-functionrange-cell").forEach((l) => {
19282
19283
  const o = parseInt(l.getAttribute("rangeindex") || "0", 10);
19283
19284
  if (o === n) return;
@@ -19298,7 +19299,7 @@ function sd(e, t, n = -1) {
19298
19299
  }
19299
19300
  }), e.formulaRangeHighlight = a;
19300
19301
  }
19301
- function Vs(e) {
19302
+ function Ws(e) {
19302
19303
  if (!e || !(e instanceof Node)) return;
19303
19304
  e.focus();
19304
19305
  const t = document.createRange(), n = window.getSelection();
@@ -19352,7 +19353,7 @@ function kr(e, t, n, r, a) {
19352
19353
  ) : c.setStart(s, Math.min(Math.max(r, 0), s.childNodes.length));
19353
19354
  c.collapse(!0), f == null || f.removeAllRanges(), f == null || f.addRange(c), s.focus();
19354
19355
  } catch {
19355
- a && a instanceof HTMLElement && Vs(a);
19356
+ a && a instanceof HTMLElement && Ws(a);
19356
19357
  }
19357
19358
  }
19358
19359
  function ud(e, t, n, r) {
@@ -19586,7 +19587,7 @@ function ta(e) {
19586
19587
  return n.includes(`
19587
19588
  `) && (n = n.replace(/\n/g, "<br>")), n;
19588
19589
  }
19589
- function Ws(e) {
19590
+ function Gs(e) {
19590
19591
  const t = [];
19591
19592
  return e.querySelectorAll("span.fortune-formula-functionrange-cell").forEach((n) => {
19592
19593
  const r = n.getAttribute("rangeindex");
@@ -19663,7 +19664,7 @@ function Lo(e) {
19663
19664
  const t = e.formulaCache.formulaEditorOwner;
19664
19665
  return t === "cell" || t === "fx" ? t : ((n = document.activeElement) == null ? void 0 : n.id) === "luckysheet-functionbox-cell" ? "fx" : ((r = document.activeElement) == null ? void 0 : r.id) === "luckysheet-rich-text-editor" ? "cell" : null;
19665
19666
  }
19666
- function Gs(e) {
19667
+ function js(e) {
19667
19668
  var l;
19668
19669
  const t = document.getElementById(
19669
19670
  "luckysheet-rich-text-editor"
@@ -19810,7 +19811,7 @@ function Td(e, t, n, r, a, l = !0) {
19810
19811
  let b = g(n);
19811
19812
  if ((r === 8 || r === 46) && (b = b.replace(/\n{2,}$/, `
19812
19813
  `)), b = xh(b), b.length > 0 && b.substring(0, 1) === "=" && (r !== 229 || b.length === 1)) {
19813
- if (l || (wr = Ws(n)), b = ta(b), !l && wn < wr.length && (l = !0), p = ta(y), wr = [], window.getSelection) {
19814
+ if (l || (wr = Gs(n)), b = ta(b), !l && wn < wr.length && (l = !0), p = ta(y), wr = [], window.getSelection) {
19814
19815
  const w = window.getSelection();
19815
19816
  if (!w) return;
19816
19817
  if (((o = w.anchorNode) == null ? void 0 : o.nodeName.toLowerCase()) === "div") {
@@ -19836,7 +19837,7 @@ function Td(e, t, n, r, a, l = !0) {
19836
19837
  const w = document.selection.createRange();
19837
19838
  e.formulaCache.functionRangeIndex = w, e.formulaCache.functionRangeGlobalOffset = null;
19838
19839
  }
19839
- n.innerHTML = b, t && (t.innerHTML = b), ud(e, n, b, p), l && (au(e), sd(e, b), e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1, dd(e, n));
19840
+ n.innerHTML = b, t && (t.innerHTML = b), ud(e, n, b, p), l && (ou(e), sd(e, b), e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1, dd(e, n));
19840
19841
  } else if (h.startsWith(y, "=") && !h.startsWith(b, "="))
19841
19842
  t && (t.innerHTML = b), n.innerHTML = Cr(b);
19842
19843
  else if (!h.startsWith(y, "=")) {
@@ -20050,13 +20051,13 @@ function xr(e, t) {
20050
20051
  return !1;
20051
20052
  }
20052
20053
  function Rp(e) {
20053
- const t = Gs(e), n = ((t == null ? void 0 : t.innerText) || "").trim(), r = !!e.formulaCache.rangestart || !!e.formulaCache.rangedrag_column_start || !!e.formulaCache.rangedrag_row_start, a = !!t && Bo(t), l = r || e.formulaCache.rangeSelectionActive === !0;
20054
+ const t = js(e), n = ((t == null ? void 0 : t.innerText) || "").trim(), r = !!e.formulaCache.rangestart || !!e.formulaCache.rangedrag_column_start || !!e.formulaCache.rangedrag_row_start, a = !!t && Bo(t), l = r || e.formulaCache.rangeSelectionActive === !0;
20054
20055
  return n.startsWith("=") ? e.formulaCache.rangeSelectionActive === !0 && t && ya(t) !== null ? !0 : /^=\s*[A-Za-z_][A-Za-z0-9_]*$/.test(n) || e.formulaCache.rangeSelectionActive === !1 ? !1 : l ? r ? !0 : a : a ? !0 : xr(e) : !1;
20055
20056
  }
20056
20057
  function xp(e) {
20057
20058
  if (e.formulaCache.rangeSelectionActive !== !1)
20058
20059
  return !1;
20059
- const t = Gs(e);
20060
+ const t = js(e);
20060
20061
  if (!t)
20061
20062
  return !1;
20062
20063
  const n = (t.innerText || "").trim(), r = ya(t), a = Bo(t), l = xr(e);
@@ -20167,7 +20168,7 @@ function ba(e, t, n, r) {
20167
20168
  if (p && g)
20168
20169
  g.innerHTML = f, kr(e, g, 0, f.length, s);
20169
20170
  else {
20170
- const T = Ws(s), C = T.length > 0 ? Math.max(...T) + 1 : wn, $ = `<span class="fortune-formula-functionrange-cell" rangeindex="${C}" dir="auto" style="color:${pa[C]};">${f}</span>`, k = Ys($);
20171
+ const T = Gs(s), C = T.length > 0 ? Math.max(...T) + 1 : wn, $ = `<span class="fortune-formula-functionrange-cell" rangeindex="${C}" dir="auto" style="color:${pa[C]};">${f}</span>`, k = Vs($);
20171
20172
  let N = e.formulaCache.rangeSetValueTo;
20172
20173
  if (N && !N.parentNode && (xr(e), N = e.formulaCache.rangeSetValueTo), N && N.parentNode) {
20173
20174
  const z = (b = document.getElementsByClassName(
@@ -20180,7 +20181,7 @@ function ba(e, t, n, r) {
20180
20181
  s.appendChild(k);
20181
20182
  e.formulaCache.rangechangeindex = C, wn = Math.max(wn, C + 1);
20182
20183
  const M = k != null && k.parentNode ? k : null;
20183
- M ? kr(e, M, 0, f.length, s) : Vs(s);
20184
+ M ? kr(e, M, 0, f.length, s) : Ws(s);
20184
20185
  }
20185
20186
  c && (c.innerHTML = s.innerHTML);
20186
20187
  }
@@ -20357,7 +20358,7 @@ function on(e, t, n, r) {
20357
20358
  }
20358
20359
  return i = i.replace(/NaN/g, ""), i;
20359
20360
  }
20360
- function js(e) {
20361
+ function Xs(e) {
20361
20362
  return e.startsWith("'") && e.endsWith("'") ? e.slice(1, -1).replace(/''/g, "'") : e;
20362
20363
  }
20363
20364
  const Ed = /((?:'(?:[^']|'')+'|[A-Za-z_][A-Za-z0-9_.]*)!)?(\$?)([A-Za-z]+)(\$?)(\d+)(?::(\$?)([A-Za-z]+)(\$?)(\d+))?/g;
@@ -20366,7 +20367,7 @@ function Md(e, t, n, r) {
20366
20367
  return e && e.replace(
20367
20368
  Ed,
20368
20369
  (o, i, u, s, c, f, m, d, p, g) => {
20369
- if ((i ? js(i.slice(0, -1)) : t) !== n) return o;
20370
+ if ((i ? Xs(i.slice(0, -1)) : t) !== n) return o;
20370
20371
  const b = (v, T) => {
20371
20372
  const C = It(v), $ = parseInt(T, 10) - 1, k = !Number.isNaN(C) && !h.isNil(l == null ? void 0 : l[C]) ? rt(l[C]) : v, N = !Number.isNaN($) && !h.isNil(a == null ? void 0 : a[$]) ? String(a[$] + 1) : T;
20372
20373
  return { nextCol: k, nextRow: N };
@@ -20421,7 +20422,7 @@ function qd(e, t, n, r) {
20421
20422
  function Id(e, t, n, r, a, l) {
20422
20423
  const o = e.lastIndexOf("!");
20423
20424
  let i = "", u = e, s = t;
20424
- if (o > -1 && (i = e.slice(0, o + 1), u = e.slice(o + 1), s = js(i.slice(0, -1))), s !== n) return e;
20425
+ if (o > -1 && (i = e.slice(0, o + 1), u = e.slice(o + 1), s = Xs(i.slice(0, -1))), s !== n) return e;
20425
20426
  const c = qd(
20426
20427
  u,
20427
20428
  r,
@@ -20514,7 +20515,7 @@ function or(e, t, n, r, a, l) {
20514
20515
  }
20515
20516
  return s;
20516
20517
  }
20517
- function Xs(e, t, n, r) {
20518
+ function Zs(e, t, n, r) {
20518
20519
  var s, c;
20519
20520
  const a = Sa(e, r);
20520
20521
  if (h.isNil(a))
@@ -20598,7 +20599,7 @@ const na = "DD/MM/YYYY";
20598
20599
  function ra(e) {
20599
20600
  return e < 10 ? `0${e}` : String(e);
20600
20601
  }
20601
- function Zs() {
20602
+ function Ks() {
20602
20603
  const e = /* @__PURE__ */ new Date();
20603
20604
  return new Date(e.getFullYear(), e.getMonth(), e.getDate());
20604
20605
  }
@@ -20665,11 +20666,11 @@ function ji(e) {
20665
20666
  }
20666
20667
  return typeof t == "number" && Number.isFinite(t) && ((a = e.ct) != null && a.fa) && ha(e.ct.fa) ? Math.floor(t) : null;
20667
20668
  }
20668
- function Ks() {
20669
- return Math.floor(Rr(Zs(), 0));
20669
+ function Qs() {
20670
+ return Math.floor(Rr(Ks(), 0));
20670
20671
  }
20671
20672
  function co(e) {
20672
- const t = Zs();
20673
+ const t = Ks();
20673
20674
  switch (e) {
20674
20675
  case "today":
20675
20676
  return Wn(t);
@@ -20734,7 +20735,7 @@ function Pd(e, t, n) {
20734
20735
  const c = Math.floor(s);
20735
20736
  return t === "dateIs" ? a === c : a < c;
20736
20737
  }
20737
- const i = Ks();
20738
+ const i = Qs();
20738
20739
  if (l === "pastWeek" || l === "pastMonth" || l === "pastYear") {
20739
20740
  let s = 6;
20740
20741
  l === "pastMonth" && (s = 29), l === "pastYear" && (s = 364);
@@ -20791,7 +20792,7 @@ function Ud(e, t) {
20791
20792
  }
20792
20793
  if (!_a.has(a))
20793
20794
  return !1;
20794
- const o = Ks();
20795
+ const o = Qs();
20795
20796
  let i;
20796
20797
  if (a === "today") i = o;
20797
20798
  else if (a === "tomorrow") i = o + 1;
@@ -21447,7 +21448,7 @@ function Vd(e) {
21447
21448
  const n = e.rulesType;
21448
21449
  return n === "occurrenceDate" ? [e.dateValue || ""] : (n === "between" || n === "notBetween") && e.betweenValue ? [e.betweenValue.value1, e.betweenValue.value2] : [e.rulesValue || ""];
21449
21450
  }
21450
- function Qs(e) {
21451
+ function Js(e) {
21451
21452
  var i, u, s, c, f, m, d, p, g, y, b, w, _, v;
21452
21453
  const t = Ee(e, e.currentSheetId), n = (i = e.luckysheetfile[t]) != null && i.luckysheet_conditionformat_save ? [...(u = e.luckysheetfile[t]) == null ? void 0 : u.luckysheet_conditionformat_save] : [], { data: r } = e.luckysheetfile[t];
21453
21454
  if (h.isNil(r)) return null;
@@ -21471,7 +21472,7 @@ function Qs(e) {
21471
21472
  function Wd(e, t, n) {
21472
21473
  return !h.isNil(n) && `${e}_${t}` in n ? n[`${e}_${t}`] : null;
21473
21474
  }
21474
- function Js(e, t, n, r) {
21475
+ function eu(e, t, n, r) {
21475
21476
  let a = [];
21476
21477
  const l = n.row[0] - t.row[0], o = n.column[0] - t.column[0], i = e.row[0], u = e.row[1], s = e.column[0], c = e.column[1];
21477
21478
  return i >= t.row[0] && u <= t.row[1] && s >= t.column[0] && c <= t.column[1] ? r === "allPart" ? a = [
@@ -21769,7 +21770,7 @@ function jd(e, t) {
21769
21770
  return !1;
21770
21771
  return !1;
21771
21772
  }
21772
- function eu(e, t, n) {
21773
+ function tu(e, t, n) {
21773
21774
  let { value1: r, value2: a } = t;
21774
21775
  const { type: l, type2: o } = t;
21775
21776
  if (l === "dropdown") {
@@ -21826,7 +21827,7 @@ function Xd(e, t, n) {
21826
21827
  }
21827
21828
  ]);
21828
21829
  }
21829
- function tu(e, t) {
21830
+ function nu(e, t) {
21830
21831
  var u, s, c, f, m;
21831
21832
  let n = "";
21832
21833
  const { lang: r } = e, { type: a, type2: l, value1: o, value2: i } = t;
@@ -21870,7 +21871,7 @@ function Zd(e, t) {
21870
21871
  return n;
21871
21872
  }
21872
21873
  function Hp(e, t, n, r) {
21873
- const a = ct(e), l = Nu(e);
21874
+ const a = ct(e), l = ku(e);
21874
21875
  if (!a || l) return;
21875
21876
  const o = document.getElementById(
21876
21877
  "luckysheet-dataVerification-showHintBox"
@@ -21896,10 +21897,10 @@ function Hp(e, t, n, r) {
21896
21897
  const _ = at(t, n, b);
21897
21898
  if (ot(_))
21898
21899
  return;
21899
- if (!eu(e, c, _)) {
21900
+ if (!tu(e, c, _)) {
21900
21901
  let T = "";
21901
21902
  const { lang: C } = e, $ = '<div style="color:#F4874A;font-weight:500;font-size:14px;margin-bottom:4px;">Invalid</div>';
21902
- C === "en" ? T = '<span style="color:#f72626;">Failure: </span>' : C === "zh" || C === "zh-CN" || C === "zh-TW" ? T = '<span style="color:#f72626;">失效:</span>' : C === "es" ? T = '<span style="color:#f72626;">Caducidad: </span>' : C === "hi" && (T = '<span style="color:#f72626;">असफलता: </span>'), T = $ + T + tu(e, c), o.innerHTML = T, o.style.display = "block", o.style.left = `${y}px`, o.style.top = `${d}px`;
21903
+ C === "en" ? T = '<span style="color:#f72626;">Failure: </span>' : C === "zh" || C === "zh-CN" || C === "zh-TW" ? T = '<span style="color:#f72626;">失效:</span>' : C === "es" ? T = '<span style="color:#f72626;">Caducidad: </span>' : C === "hi" && (T = '<span style="color:#f72626;">असफलता: </span>'), T = $ + T + nu(e, c), o.innerHTML = T, o.style.display = "block", o.style.left = `${y}px`, o.style.top = `${d}px`;
21903
21904
  }
21904
21905
  }
21905
21906
  function Up(e, t, n) {
@@ -22045,7 +22046,7 @@ function Qd(e, t, n) {
22045
22046
  i[u.originalIndex] = s;
22046
22047
  }), { sortedData: o, rowMap: i };
22047
22048
  }
22048
- function nu(e, t, n, r, a, l, o, i, u) {
22049
+ function ru(e, t, n, r, a, l, o, i, u) {
22049
22050
  var g, y;
22050
22051
  const { sortedData: s, rowMap: c } = Qd(a, r, n);
22051
22052
  for (let b = l; b <= o; b += 1)
@@ -22126,7 +22127,7 @@ function Jd(e, t, n = 0) {
22126
22127
  }
22127
22128
  m.push(g);
22128
22129
  }
22129
- f || nu(e, a, m, n, t, s, c, i, u);
22130
+ f || ru(e, a, m, n, t, s, c, i, u);
22130
22131
  }
22131
22132
  }
22132
22133
  function Yp(e, t) {
@@ -22160,7 +22161,7 @@ function Yp(e, t) {
22160
22161
  if (s) break;
22161
22162
  c.push(g);
22162
22163
  }
22163
- s || nu(
22164
+ s || ru(
22164
22165
  e,
22165
22166
  n,
22166
22167
  c,
@@ -22291,7 +22292,7 @@ function Rt(e, t, n = 10) {
22291
22292
  } else t === "fs" ? a || (a = n.toString()) : (t === "tb" || t === "tr") && (a || (a = "0"));
22292
22293
  return a;
22293
22294
  }
22294
- function ru(e, t, n, r) {
22295
+ function au(e, t, n, r) {
22295
22296
  if (!e || !e[t])
22296
22297
  return null;
22297
22298
  const a = e[t][n];
@@ -22393,7 +22394,7 @@ function at(e, t, n, r) {
22393
22394
  if (((s = m == null ? void 0 : m.ct) == null ? void 0 : s.t) === "d" && !h.isNil(m.v)) {
22394
22395
  const d = String(((c = m == null ? void 0 : m.ct) == null ? void 0 : c.fa) || ""), p = /\b(h|hh|H|HH|s|ss)\b/.test(d) || /AM\/PM/i.test(d);
22395
22396
  l = ut(
22396
- Ec(d, p),
22397
+ Mc(d, p),
22397
22398
  m.v
22398
22399
  );
22399
22400
  } else
@@ -22454,15 +22455,15 @@ function qt(e, t, n, r, a) {
22454
22455
  m
22455
22456
  )) {
22456
22457
  if (l.v = i, h.isNil(l.ct) ? l.ct = { fa: "General", t: "g" } : ((l.ct.fa == null || l.ct.fa === "") && (l.ct = { ...l.ct, fa: "General" }), (l.ct.t == null || l.ct.t === "") && (l.ct = { ...l.ct, t: "g" })), Ge(i) && /^[\d.,]+$/.test(m.replace(/\s/g, "")) && h.isNil(l.qp) && ((C = l.ct) == null ? void 0 : C.fa) !== "@") {
22457
- const Z = ke(e), V = ($ = ku(l == null ? void 0 : l.f)) == null ? void 0 : $.split(","), ge = V == null ? void 0 : V.map((I) => I.trim().toUpperCase()), we = Su(ge, r, Z);
22458
+ const Z = ke(e), V = ($ = Su(l == null ? void 0 : l.f)) == null ? void 0 : $.split(","), ge = V == null ? void 0 : V.map((I) => I.trim().toUpperCase()), we = Au(ge, r, Z);
22458
22459
  we && (l.ct.fa = we, ha(we) ? l.ct.t = "d" : l.ct.t = "n");
22459
22460
  }
22460
22461
  if (l.v === 1 / 0 || l.v === -1 / 0)
22461
22462
  l.m = l.v.toString();
22462
22463
  else {
22463
22464
  const Z = Math.round(l.v * 1e9) / 1e9;
22464
- if (of(Z))
22465
- l.m = lf(Z);
22465
+ if (lf(Z))
22466
+ l.m = sf(Z);
22466
22467
  else if (l.v.toString().toLowerCase().indexOf("e") > -1)
22467
22468
  l.m = ur(l.v);
22468
22469
  else if (h.isNil(l.ct)) {
@@ -22539,7 +22540,7 @@ function qt(e, t, n, r, a) {
22539
22540
  }
22540
22541
  } else
22541
22542
  a.m ? l.m = a.m : l.m = I.toString(), l.v = i;
22542
- } else if (cf(j, Et(e).currencyDetail) && typeof i == "string" && !m.startsWith("=") && !Ge(i))
22543
+ } else if (ff(j, Et(e).currencyDetail) && typeof i == "string" && !m.startsWith("=") && !Ge(i))
22543
22544
  l.v = m, l.m = m, l.ct = { fa: j, t: "s" };
22544
22545
  else {
22545
22546
  const I = ut(j, i);
@@ -22668,11 +22669,11 @@ function Ar(e, t, n, r, a, l, o, i) {
22668
22669
  }
22669
22670
  return [t, n, a, l, o, i];
22670
22671
  }
22671
- function au(e) {
22672
+ function ou(e) {
22672
22673
  e.formulaCache.selectingRangeIndex === -1 && (e.formulaRangeSelect = void 0);
22673
22674
  }
22674
22675
  function hn(e) {
22675
- au(e), e.luckysheetCellUpdate = [], e.formulaRangeHighlight = [], e.functionHint = null, e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1, e.formulaCache.rangeSelectionActive = null, e.formulaCache.keyboardRangeSelectionLock = !1, e.formulaCache.formulaEditorOwner = null;
22676
+ ou(e), e.luckysheetCellUpdate = [], e.formulaRangeHighlight = [], e.functionHint = null, e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1, e.formulaCache.rangeSelectionActive = null, e.formulaCache.keyboardRangeSelectionLock = !1, e.formulaCache.formulaEditorOwner = null;
22676
22677
  }
22677
22678
  function om(e) {
22678
22679
  return typeof e == "number" ? Number.isFinite(e) : typeof e != "string" ? !1 : /^[\d.,]+$/.test(e.replace(/\s/g, ""));
@@ -22709,8 +22710,8 @@ function mo(e, t, n, r, a, l) {
22709
22710
  const ue = Ee(e, e.currentSheetId), { dataVerification: E } = e.luckysheetfile[ue], W = e.luckysheetfile[ue];
22710
22711
  if (!h.isNil(E)) {
22711
22712
  const re = E[`${t}_${n}`];
22712
- if (!h.isNil(re) && re.prohibitInput && !eu(e, re, we)) {
22713
- const be = tu(e, re);
22713
+ if (!h.isNil(re) && re.prohibitInput && !tu(e, re, we)) {
22714
+ const be = nu(e, re);
22714
22715
  hn(e), e.warnDialog = be;
22715
22716
  return;
22716
22717
  }
@@ -22836,7 +22837,7 @@ function mo(e, t, n, r, a, l) {
22836
22837
  fs: a.fs || 10
22837
22838
  }
22838
22839
  ], Z(a)) : (v = a.ct) == null || delete v.s, om(a.v)) {
22839
- const be = (T = ku(a == null ? void 0 : a.f)) == null ? void 0 : T.split(","), xe = be == null ? void 0 : be.map((qe) => qe.trim().toUpperCase()), We = Su(xe, Me, B);
22840
+ const be = (T = Su(a == null ? void 0 : a.f)) == null ? void 0 : T.split(","), xe = be == null ? void 0 : be.map((qe) => qe.trim().toUpperCase()), We = Au(xe, Me, B);
22840
22841
  if (We) {
22841
22842
  const qe = typeof a.v == "number" ? a.v : Number(String(a.v).replace(/,/g, ""));
22842
22843
  a.m = Number.isFinite(qe) ? String(ut(We, qe)) : String(a.v), a.ct = {
@@ -23073,7 +23074,7 @@ function Vo(e, t, n, r = !0) {
23073
23074
  function ho(e, t, n, r, a) {
23074
23075
  var c;
23075
23076
  let l = {};
23076
- const o = [], i = a ?? Qs(e), u = Wd(n, r, i), s = (c = t == null ? void 0 : t[n]) == null ? void 0 : c[r];
23077
+ const o = [], i = a ?? Js(e), u = Wd(n, r, i), s = (c = t == null ? void 0 : t[n]) == null ? void 0 : c[r];
23077
23078
  if (!s) {
23078
23079
  if (!u)
23079
23080
  return {};
@@ -23114,7 +23115,7 @@ function mm(e, t) {
23114
23115
  return a.length > 0 && (o += `<span style='${t}'>${a}</span>`), l < r.length - 1 && (o += `<span style='${t}'><br></span>`), o;
23115
23116
  }).join("");
23116
23117
  }
23117
- function ou(e, t, n, r) {
23118
+ function lu(e, t, n, r) {
23118
23119
  const a = at(e, t, n, "ct");
23119
23120
  if ($n(a)) {
23120
23121
  const l = a.s;
@@ -23744,7 +23745,7 @@ function lg(e, t) {
23744
23745
  const V = O[Z].cellrange;
23745
23746
  let ge = [];
23746
23747
  for (let we = 0; we < V.length; we += 1) {
23747
- const I = Js(
23748
+ const I = eu(
23748
23749
  V[we],
23749
23750
  { row: [l, o], column: [i, u] },
23750
23751
  { row: [f, m], column: [d, p] },
@@ -23772,7 +23773,7 @@ function lg(e, t) {
23772
23773
  }
23773
23774
  ym(e);
23774
23775
  }
23775
- function lu(e, t) {
23776
+ function iu(e, t) {
23776
23777
  e == null && (e = t.luckysheet_selection_range), e = JSON.parse(JSON.stringify(e));
23777
23778
  }
23778
23779
  function Wt(e, t, n, r) {
@@ -24171,7 +24172,7 @@ function zt(e, t) {
24171
24172
  }
24172
24173
  function Tm(e, t, n, r) {
24173
24174
  var w, _;
24174
- const a = (r == null ? void 0 : r.includeCellMetadata) ?? !1, l = (r == null ? void 0 : r.preferRichText) ?? !1, o = (r == null ? void 0 : r.respectFilterHiddenRows) ?? !1, i = Qs(e), u = /* @__PURE__ */ new Set();
24175
+ const a = (r == null ? void 0 : r.includeCellMetadata) ?? !1, l = (r == null ? void 0 : r.preferRichText) ?? !1, o = (r == null ? void 0 : r.respectFilterHiddenRows) ?? !1, i = Js(e), u = /* @__PURE__ */ new Set();
24175
24176
  o && t === e.currentSheetId && !h.isNil(e.luckysheet_filter_save) && !h.isEmpty(e.filter) && Object.values(e.filter || {}).forEach((v) => {
24176
24177
  const T = v == null ? void 0 : v.rowhidden;
24177
24178
  T && Object.keys(T).forEach((C) => {
@@ -24303,7 +24304,7 @@ function Tm(e, t, n, r) {
24303
24304
  const F = a ? encodeURIComponent(
24304
24305
  JSON.stringify({ ...N, _srcRow: T, _srcCol: $ })
24305
24306
  ) : "";
24306
- k = os(k, { style: M, span: z, cellData: F }), h.isNil(K) && (K = at(T, $, g)), h.isNil(K) && (K = ""), l && sn(N) ? k += ou(T, $, g, {
24307
+ k = os(k, { style: M, span: z, cellData: F }), h.isNil(K) && (K = at(T, $, g)), h.isNil(K) && (K = ""), l && sn(N) ? k += lu(T, $, g, {
24307
24308
  useSemanticMarkup: !0,
24308
24309
  inheritedStyle: le,
24309
24310
  isRichTextCopy: !0
@@ -24395,7 +24396,7 @@ function ug(e) {
24395
24396
  "textDecorationSkipInk"
24396
24397
  ]), Q = h.toPairs(M).filter(
24397
24398
  ([F, te]) => !h.isNil(te) && te !== "" && te !== "undefined" && !(k && z.has(F))
24398
- ).map(([F, te]) => `${h.kebabCase(F)}:${h.isNumber(te) ? `${te}px` : te};`).join(" "), K = k ? ou(_, v, t, {
24399
+ ).map(([F, te]) => `${h.kebabCase(F)}:${h.isNumber(te) ? `${te}px` : te};`).join(" "), K = k ? lu(_, v, t, {
24399
24400
  useSemanticMarkup: !0,
24400
24401
  inheritedStyle: M,
24401
24402
  isRichTextCopy: !0
@@ -26117,7 +26118,7 @@ function jt(e) {
26117
26118
  {}
26118
26119
  );
26119
26120
  }
26120
- function iu(e) {
26121
+ function su(e) {
26121
26122
  return jt(e.filter);
26122
26123
  }
26123
26124
  function qr(e) {
@@ -26129,7 +26130,7 @@ function qr(e) {
26129
26130
  e.config.rowhidden_manual = r.rowhidden_manual;
26130
26131
  return;
26131
26132
  }
26132
- const a = ((u = e.config) == null ? void 0 : u.rowhidden) || {}, l = e.currentSheetId === n.id && !h.isNil(e.luckysheet_filter_save) && !h.isEmpty(e.filter), o = l ? iu(e) : {}, i = l ? h.omit(a, h.keys(o)) : { ...a };
26133
+ const a = ((u = e.config) == null ? void 0 : u.rowhidden) || {}, l = e.currentSheetId === n.id && !h.isNil(e.luckysheet_filter_save) && !h.isEmpty(e.filter), o = l ? su(e) : {}, i = l ? h.omit(a, h.keys(o)) : { ...a };
26133
26134
  r.rowhidden_manual = i, n.config = r, e.config.rowhidden_manual = i;
26134
26135
  }
26135
26136
  function $a(e) {
@@ -26137,7 +26138,7 @@ function $a(e) {
26137
26138
  const t = Ee(e, e.currentSheetId);
26138
26139
  if (t == null) return;
26139
26140
  qr(e);
26140
- const n = e.luckysheetfile[t], r = n.config || {}, a = e.config.rowhidden_manual || {}, l = iu(e), i = e.viewerFilterVisible !== !1 ? l : {}, u = h.assign({}, a, i);
26141
+ const n = e.luckysheetfile[t], r = n.config || {}, a = e.config.rowhidden_manual || {}, l = su(e), i = e.viewerFilterVisible !== !1 ? l : {}, u = h.assign({}, a, i);
26141
26142
  if (e.config.rowhidden_filter = l, r.rowhidden_filter = l, e.config.rowhidden = u, r.rowhidden = u, r.rowhidden_manual = a, n.config = r, typeof process < "u" && ((s = process.env) == null ? void 0 : s.NODE_ENV) !== "production") {
26142
26143
  const c = e.config.rowhidden || {}, f = h.assign({}, a, i);
26143
26144
  h.size(f) === h.size(c) && h.every(f, (d, p) => c[p] === d) || console.warn("[rowVisibility] ctx.config.rowhidden diverged from union", {
@@ -26156,14 +26157,14 @@ function Nm(e, t) {
26156
26157
  const n = e, r = t;
26157
26158
  return n.v !== r.v || n.f !== r.f || n.m !== r.m ? !1 : h.isEqual(e, t);
26158
26159
  }
26159
- function su(e, t, n, r, a) {
26160
+ function uu(e, t, n, r, a) {
26160
26161
  var s;
26161
26162
  if (!(e != null && e.length)) return null;
26162
26163
  const l = Math.min(n, e.length - 1), o = Math.min(a, (((s = e[0]) == null ? void 0 : s.length) ?? 0) - 1), i = Math.max(0, t), u = Math.max(0, r);
26163
26164
  return i > l || u > o ? null : { rowStart: i, rowEnd: l, colStart: u, colEnd: o };
26164
26165
  }
26165
- function uu(e, t, n, r, a, l) {
26166
- const o = /* @__PURE__ */ new Map(), i = su(e, t, n, r, a);
26166
+ function cu(e, t, n, r, a, l) {
26167
+ const o = /* @__PURE__ */ new Map(), i = uu(e, t, n, r, a);
26167
26168
  if (!i) return o;
26168
26169
  const { rowStart: u, rowEnd: s, colStart: c, colEnd: f } = i;
26169
26170
  if (l != null && l.length) {
@@ -26208,7 +26209,7 @@ function km(e, t, n, r, a, l) {
26208
26209
  });
26209
26210
  }
26210
26211
  function Sm(e, t, n, r, a, l, o) {
26211
- const i = su(t, n, r, a, l);
26212
+ const i = uu(t, n, r, a, l);
26212
26213
  if (!i) return [];
26213
26214
  const { rowStart: u, rowEnd: s, colStart: c, colEnd: f } = i, m = [];
26214
26215
  for (let d = u; d <= s; d += 1) {
@@ -26260,7 +26261,7 @@ function Mm(e, t, n, r, a) {
26260
26261
  const i = a ? Math.min(t, a.minC) : t;
26261
26262
  return { r1: 0, r2: l, c1: Math.max(0, i), c2: o };
26262
26263
  }
26263
- const cu = (e, t) => {
26264
+ const fu = (e, t) => {
26264
26265
  Object.entries(e).forEach(([, n]) => {
26265
26266
  var i, u, s, c;
26266
26267
  const { r, c: a, rs: l, cs: o } = n;
@@ -26343,7 +26344,7 @@ const la = (e) => {
26343
26344
  ]);
26344
26345
  }, fr = (e) => {
26345
26346
  e.v = "#REF!", e.m = "#REF!", e.error = { title: "#REF!", message: "Reference is not valid." }, e.ct ? e.ct.t = "e" : e.ct = { fa: "General", t: "e" };
26346
- }, fu = (e, t, n, r, a, l, o) => {
26347
+ }, du = (e, t, n, r, a, l, o) => {
26347
26348
  const i = e.data;
26348
26349
  if (!i) return;
26349
26350
  const u = /* @__PURE__ */ new Set();
@@ -26404,7 +26405,7 @@ function qm(e, t, n = !0) {
26404
26405
  m.length,
26405
26406
  ((A = m[0]) == null ? void 0 : A.length) ?? 1,
26406
26407
  la(d.merge)
26407
- ), v = uu(
26408
+ ), v = cu(
26408
26409
  m,
26409
26410
  _.r1,
26410
26411
  _.r2,
@@ -26494,7 +26495,7 @@ function qm(e, t, n = !0) {
26494
26495
  ((ne = (D = X[re]) == null ? void 0 : D[be]) == null ? void 0 : ne.f) === We && (X[re][be].f = qe);
26495
26496
  }
26496
26497
  }
26497
- fu(
26498
+ du(
26498
26499
  e.luckysheetfile[U],
26499
26500
  x,
26500
26501
  "add",
@@ -26846,7 +26847,7 @@ function qm(e, t, n = !0) {
26846
26847
  { row: [o, o + r - 1], column: [0, m[0].length - 1] }
26847
26848
  ] : j = [
26848
26849
  { row: [o + 1, o + r], column: [0, m[0].length - 1] }
26849
- ], f.row = f.data.length) : (i === "lefttop" ? j = [{ row: [0, m.length - 1], column: [o, o + r - 1] }] : j = [{ row: [0, m.length - 1], column: [o + 1, o + r] }], f.column = (q = f.data[0]) == null ? void 0 : q.length), n && (f.luckysheet_select_save = j, f.id === e.currentSheetId && (e.luckysheet_select_save = j)), cu($, f);
26850
+ ], f.row = f.data.length) : (i === "lefttop" ? j = [{ row: [0, m.length - 1], column: [o, o + r - 1] }] : j = [{ row: [0, m.length - 1], column: [o + 1, o + r] }], f.column = (q = f.data[0]) == null ? void 0 : q.length), n && (f.luckysheet_select_save = j, f.id === e.currentSheetId && (e.luckysheet_select_save = j)), fu($, f);
26850
26851
  const Z = la(d.merge);
26851
26852
  if (l === "row") {
26852
26853
  const U = i === "lefttop" ? o : o + 1, x = Z ? Math.min(U, Z.minR) : U;
@@ -26874,7 +26875,7 @@ function qm(e, t, n = !0) {
26874
26875
  );
26875
26876
  }
26876
26877
  }
26877
- function du(e, t) {
26878
+ function mu(e, t) {
26878
26879
  var F, te, G, Y, O, $e, ae, j, Z, V, ge, we, I, A, P, Ce, B;
26879
26880
  const { type: n } = t;
26880
26881
  let { start: r, end: a, id: l } = t;
@@ -26918,7 +26919,7 @@ function du(e, t) {
26918
26919
  E.push({ start: W, end: D });
26919
26920
  for (let ne = E.length - 1; ne >= 0; ne -= 1) {
26920
26921
  const J = E[ne];
26921
- du(e, {
26922
+ mu(e, {
26922
26923
  type: "row",
26923
26924
  start: J.start,
26924
26925
  end: J.end,
@@ -26934,7 +26935,7 @@ function du(e, t) {
26934
26935
  c.length,
26935
26936
  ((Y = c[0]) == null ? void 0 : Y.length) ?? 1,
26936
26937
  la(u.merge)
26937
- ), d = uu(
26938
+ ), d = cu(
26938
26939
  c,
26939
26940
  m.r1,
26940
26941
  m.r2,
@@ -27011,7 +27012,7 @@ function du(e, t) {
27011
27012
  ((we = (ge = W[J]) == null ? void 0 : ge[H]) == null ? void 0 : we.f) === _e && (W[J][H].f = me, me === "=#REF!" && fr(W[J][H]));
27012
27013
  }
27013
27014
  }
27014
- fu(
27015
+ du(
27015
27016
  e.luckysheetfile[ue],
27016
27017
  E,
27017
27018
  "del",
@@ -27219,9 +27220,9 @@ function du(e, t) {
27219
27220
  c[D].splice(r, f);
27220
27221
  i.column = (P = c[0]) == null ? void 0 : P.length;
27221
27222
  }
27222
- e.luckysheet_select_save = void 0, i.data = c, i.config = u, i.calcChain = g, w != null && (i.filter = w.filter, i.filter_select = w.filter_select), i.luckysheet_conditionformat_save = T, i.luckysheet_alternateformat_save = $, i.dataVerification = M, i.hyperlink = Q, cu(p, i);
27223
+ e.luckysheet_select_save = void 0, i.data = c, i.config = u, i.calcChain = g, w != null && (i.filter = w.filter, i.filter_select = w.filter_select), i.luckysheet_conditionformat_save = T, i.luckysheet_alternateformat_save = $, i.dataVerification = M, i.hyperlink = Q, fu(p, i);
27223
27224
  const K = u.cellFormatRanges;
27224
- u.cellFormatRanges = Ef(
27225
+ u.cellFormatRanges = Mf(
27225
27226
  u.cellFormatRanges,
27226
27227
  n,
27227
27228
  r,
@@ -27671,7 +27672,7 @@ function Pm(e, t, n, r) {
27671
27672
  }
27672
27673
  u.length > 0 && ((m = e == null ? void 0 : e.hooks) != null && m.updateCellYdoc) && e.hooks.updateCellYdoc(u), l.config = o, l.id === e.currentSheetId && (e.config = o);
27673
27674
  }
27674
- function mu(e) {
27675
+ function hu(e) {
27675
27676
  const t = String(e ?? "").trim();
27676
27677
  if (!t) return !1;
27677
27678
  const n = t.replace(/^mailto:/i, "");
@@ -27700,7 +27701,7 @@ function jo(e) {
27700
27701
  function _n(e, t) {
27701
27702
  return e.linkType === t.linkType && e.linkAddress === t.linkAddress;
27702
27703
  }
27703
- function hu(e) {
27704
+ function pu(e) {
27704
27705
  var r;
27705
27706
  if (((r = e == null ? void 0 : e.ct) == null ? void 0 : r.t) !== "inlineStr" || !Array.isArray(e.ct.s)) return [];
27706
27707
  const t = [];
@@ -27880,7 +27881,7 @@ function sa(e, t, n) {
27880
27881
  e.linkCard = void 0;
27881
27882
  return;
27882
27883
  }
27883
- const l = (c = (s = ke(e)) == null ? void 0 : s[t]) == null ? void 0 : c[n], o = hu(l ?? void 0);
27884
+ const l = (c = (s = ke(e)) == null ? void 0 : s[t]) == null ? void 0 : c[n], o = pu(l ?? void 0);
27884
27885
  e.linkCard.links = o.length > 0 ? o : a, e.linkCard.editingLinkIndex = void 0, e.linkCard.isEditing = !1;
27885
27886
  const i = (o.length > 0 ? o : a)[0];
27886
27887
  e.linkCard.originType = i.linkType, e.linkCard.originAddress = i.linkAddress, e.linkCard.originText = (l == null ? void 0 : l.v) != null && !Array.isArray(l.v) ? `${l.v}` : "";
@@ -27922,7 +27923,7 @@ function Pg(e, t, n, r, a, l, o) {
27922
27923
  Ra(g, w.start, w.end);
27923
27924
  } else
27924
27925
  g.focus({ preventScroll: !0 });
27925
- Uc(g, a, l);
27926
+ zc(g, a, l);
27926
27927
  const _ = p.fs || 10;
27927
27928
  p.ct || (p.ct = { fa: "General", tb: "1" }), p.ct.t = "inlineStr", p.ct.s = Ns(
27928
27929
  o.cellInput.querySelectorAll("span"),
@@ -28063,7 +28064,7 @@ function Xm(e, t, n, r, a = !1, l = !1) {
28063
28064
  const o = (((p = e.luckysheetCellUpdate) == null ? void 0 : p.length) ?? 0) === 2 && e.luckysheetCellUpdate[0] === t && e.luckysheetCellUpdate[1] === n, i = r == null ? void 0 : r.caretViewLink;
28064
28065
  if (o && !a && !i || (g = e.linkCard) != null && g.selectingCellRange && !a || `${t}_${n}` === ((y = e.linkCard) == null ? void 0 : y.rc) && !(r != null && r.applyToSelection) && !l && !a && !i)
28065
28066
  return;
28066
- const u = Ir(e, t, n), s = u[0], c = (w = (b = ke(e)) == null ? void 0 : b[t]) == null ? void 0 : w[n], f = hu(c ?? void 0), m = f.length > 0 ? f : u, d = !!(r != null && r.applyToSelection);
28067
+ const u = Ir(e, t, n), s = u[0], c = (w = (b = ke(e)) == null ? void 0 : b[t]) == null ? void 0 : w[n], f = pu(c ?? void 0), m = f.length > 0 ? f : u, d = !!(r != null && r.applyToSelection);
28067
28068
  if (!a && s == null && !i && (l || !((_ = e.linkCard) != null && _.isEditing) || e.linkCard.sheetId !== e.currentSheetId)) {
28068
28069
  e.linkCard = void 0;
28069
28070
  return;
@@ -28103,7 +28104,7 @@ function zg(e, t, n, r, a, l, o) {
28103
28104
  if (r === "webpage") {
28104
28105
  const u = String(a ?? "").trim();
28105
28106
  if (!u) return;
28106
- if (mu(u)) {
28107
+ if (hu(u)) {
28107
28108
  const s = u.replace(/^mailto:/i, "");
28108
28109
  window.open(`mailto:${s}`);
28109
28110
  } else {
@@ -28127,7 +28128,7 @@ function zg(e, t, n, r, a, l, o) {
28127
28128
  function Yg(e, t, n) {
28128
28129
  if (!n) return { isValid: !1, tooltip: "" };
28129
28130
  const { insertLink: r } = Et(e), a = String(n ?? "").trim();
28130
- return mu(a) ? { isValid: !0, tooltip: "" } : (/^https?:\/\//i.test(n) || (n = `https://${n}`), /^(https?):\/\/[^\s$.?#].[^\s]*$/i.test(n) ? t === "cellrange" && !Dt(n) ? { isValid: !1, tooltip: r.invalidCellRangeTip } : { isValid: !0, tooltip: "" } : { isValid: !1, tooltip: r.tooltipInfo1 });
28131
+ return hu(a) ? { isValid: !0, tooltip: "" } : (/^https?:\/\//i.test(n) || (n = `https://${n}`), /^(https?):\/\/[^\s$.?#].[^\s]*$/i.test(n) ? t === "cellrange" && !Dt(n) ? { isValid: !1, tooltip: r.invalidCellRangeTip } : { isValid: !0, tooltip: "" } : { isValid: !1, tooltip: r.tooltipInfo1 });
28131
28132
  }
28132
28133
  function Vg(e, t) {
28133
28134
  var u;
@@ -28427,7 +28428,7 @@ function Km(e, t, n, r, a) {
28427
28428
  }
28428
28429
  return l.filter((o) => o.borderType !== "border-none");
28429
28430
  }
28430
- function pu(e, t) {
28431
+ function gu(e, t) {
28431
28432
  let n = e ?? [];
28432
28433
  return t.forEach((r) => {
28433
28434
  n = Km(
@@ -28450,7 +28451,7 @@ function yo(e, t) {
28450
28451
  }
28451
28452
  ]);
28452
28453
  }
28453
- function gu(e, t, n, r) {
28454
+ function yu(e, t, n, r) {
28454
28455
  var l, o, i;
28455
28456
  Es();
28456
28457
  const a = (l = r[t]) == null ? void 0 : l[n];
@@ -28467,7 +28468,7 @@ function gu(e, t, n, r) {
28467
28468
  function Ji(e, t, n, r, a, l, o, i) {
28468
28469
  var f;
28469
28470
  (f = t.luckysheetfile[n]).config || (f.config = {});
28470
- const u = t.luckysheetfile[n].config, { ranges: s, changed: c } = kf(
28471
+ const u = t.luckysheetfile[n].config, { ranges: s, changed: c } = Sf(
28471
28472
  u.cellFormatRanges,
28472
28473
  r,
28473
28474
  a,
@@ -28482,7 +28483,7 @@ function Ji(e, t, n, r, a, l, o, i) {
28482
28483
  type: "update"
28483
28484
  }));
28484
28485
  }
28485
- function yu(e, t, n, r, a, l, o, i, u) {
28486
+ function bu(e, t, n, r, a, l, o, i, u) {
28486
28487
  var s, c, f, m, d, p, g, y, b, w, _, v, T, C, $, k, N, M, z, Q, K, le, F, te, G, Y, O, $e, ae, j, Z, V, ge, we, I, A, P, Ce, B, ue, E, W, D, ne, J;
28487
28488
  if (!(h.isNil(t) || h.isNil(n)))
28488
28489
  if (n === "ct") {
@@ -28569,7 +28570,7 @@ function yu(e, t, n, r, a, l, o, i, u) {
28569
28570
  for (let ve = o; ve <= i; ve += 1) {
28570
28571
  const ce = t[me][ve];
28571
28572
  if (ce && h.isPlainObject(ce)) {
28572
- Oc(ce, n, r), ce[n] = r, (A = e.luckysheetfile[H]).config || (A.config = {});
28573
+ Fc(ce, n, r), ce[n] = r, (A = e.luckysheetfile[H]).config || (A.config = {});
28573
28574
  const ee = e.luckysheetfile[H].config, Oe = ((P = ee.columnlen) == null ? void 0 : P[ve]) || e.luckysheetfile[H].defaultColWidth;
28574
28575
  if (n === "fs" && u) {
28575
28576
  const Me = Ms(t[me][ve], u, e, {
@@ -28630,14 +28631,14 @@ function yu(e, t, n, r, a, l, o, i, u) {
28630
28631
  function Xt(e, t, n, r, a, l) {
28631
28632
  var u, s;
28632
28633
  if (!ct(e)) return;
28633
- if (r in xc && e.luckysheetCellUpdate.length > 0 && t.innerText.substring(0, 1) !== "=") {
28634
- Bc(e, r, a, t);
28634
+ if (r in qc && e.luckysheetCellUpdate.length > 0 && t.innerText.substring(0, 1) !== "=") {
28635
+ Pc(e, r, a, t);
28635
28636
  return;
28636
28637
  }
28637
28638
  const i = h.cloneDeep(e.config);
28638
28639
  if (h.isNil(i.rowlen) && (i.rowlen = {}), h.forEach(e.luckysheet_select_save, (c) => {
28639
28640
  const [f, m] = c.row, [d, p] = c.column;
28640
- yu(
28641
+ bu(
28641
28642
  e,
28642
28643
  n,
28643
28644
  r,
@@ -29008,7 +29009,7 @@ function eh(e) {
29008
29009
  var t;
29009
29010
  if (e.luckysheet_copy_save !== null) {
29010
29011
  if (((t = e.luckysheet_copy_save) == null ? void 0 : t.dataSheetId) === e.currentSheetId)
29011
- e.luckysheet_selection_range = [], lu(e.luckysheet_selection_range, e);
29012
+ e.luckysheet_selection_range = [], iu(e.luckysheet_selection_range, e);
29012
29013
  else {
29013
29014
  if (!e.luckysheet_copy_save) return;
29014
29015
  const n = Ee(e, e.luckysheet_copy_save.dataSheetId);
@@ -29045,7 +29046,7 @@ function rh(e, t) {
29045
29046
  if (!n || !e.luckysheet_select_save) return;
29046
29047
  const r = e.luckysheet_select_save[0].row_focus, a = e.luckysheet_select_save[0].column_focus;
29047
29048
  if (r === void 0 || a === void 0) return;
29048
- let l = ru(n, r, a, "ct");
29049
+ let l = au(n, r, a, "ct");
29049
29050
  const o = n[r][a], i = (o == null ? void 0 : o.v) ?? (o == null ? void 0 : o.m);
29050
29051
  if (l == null && o != null && Ge(i) && (l = { fa: "General", t: "g" }), l == null || l.t !== "n" && !(l.t === "g" && Ge(i)))
29051
29052
  return;
@@ -29053,7 +29054,7 @@ function rh(e, t) {
29053
29054
  if (!o || !h.isPlainObject(o)) return;
29054
29055
  const g = o.v ?? o.m;
29055
29056
  if (g == null || !Ge(g) || !((p = o.ct) != null && p.dp) || o.ct.dp < 1) return;
29056
- o.ct.dp <= 1 ? delete o.ct.dp : o.ct.dp -= 1, br(o), gu(e, r, a, n);
29057
+ o.ct.dp <= 1 ? delete o.ct.dp : o.ct.dp -= 1, br(o), yu(e, r, a, n);
29057
29058
  return;
29058
29059
  }
29059
29060
  if (/^(w|W)((0?)|(0\.0+))$/.test(l.fa)) {
@@ -29100,7 +29101,7 @@ function ah(e, t) {
29100
29101
  if (!n || !e.luckysheet_select_save) return;
29101
29102
  const r = e.luckysheet_select_save[0].row_focus, a = e.luckysheet_select_save[0].column_focus;
29102
29103
  if (r === void 0 || a === void 0) return;
29103
- let l = ru(n, r, a, "ct");
29104
+ let l = au(n, r, a, "ct");
29104
29105
  const o = n[r][a], i = (o == null ? void 0 : o.v) ?? (o == null ? void 0 : o.m);
29105
29106
  if (l == null && o != null && Ge(i) && (l = { fa: "General", t: "g" }), l == null || l.t !== "n" && !(l.t === "g" && Ge(i)))
29106
29107
  return;
@@ -29110,7 +29111,7 @@ function ah(e, t) {
29110
29111
  if (p == null || !Ge(p)) return;
29111
29112
  o.ct || (o.ct = {});
29112
29113
  const g = Math.min(Os, (o.ct.dp ?? 0) + 1);
29113
- o.ct.fa = "General", o.ct.t = "g", o.ct.dp = g, br(o), gu(e, r, a, n);
29114
+ o.ct.fa = "General", o.ct.t = "g", o.ct.dp = g, br(o), yu(e, r, a, n);
29114
29115
  return;
29115
29116
  }
29116
29117
  if (/^(w|W)((0?)|(0\.0+))$/.test(l.fa)) {
@@ -29167,7 +29168,7 @@ function uh(e) {
29167
29168
  row: e.luckysheet_select_save[0].row,
29168
29169
  column: e.luckysheet_select_save[0].column
29169
29170
  }
29170
- ], lu(e.luckysheet_selection_range, e);
29171
+ ], iu(e.luckysheet_selection_range, e);
29171
29172
  let i = !1, u = !1;
29172
29173
  for (let s = e.luckysheet_select_save[0].row[0]; s <= e.luckysheet_select_save[0].row[1]; s += 1)
29173
29174
  if (!(e.config.rowhidden != null && e.config.rowhidden[s] != null)) {
@@ -29221,7 +29222,7 @@ function ch(e) {
29221
29222
  const c = ((i = e.luckysheet_select_save) == null ? void 0 : i.map((m) => ({
29222
29223
  row: m.row,
29223
29224
  column: m.column
29224
- }))) ?? [], f = pu(
29225
+ }))) ?? [], f = gu(
29225
29226
  e.config.borderInfo,
29226
29227
  c
29227
29228
  );
@@ -29247,7 +29248,7 @@ function fh(e, t, n, r) {
29247
29248
  row: f.row,
29248
29249
  column: f.column
29249
29250
  }))) ?? [];
29250
- if (i.borderInfo = pu(i.borderInfo, u), t === "border-none") {
29251
+ if (i.borderInfo = gu(i.borderInfo, u), t === "border-none") {
29251
29252
  const f = Ee(e, e.currentSheetId);
29252
29253
  if (f == null) return;
29253
29254
  e.luckysheetfile[f].config = e.config, yo(e, i.borderInfo);
@@ -29323,7 +29324,7 @@ function Qg(e, t, n, r) {
29323
29324
  function Jg(e, t, n, r) {
29324
29325
  Jm(e, t, n, "SUM", r);
29325
29326
  }
29326
- function bu(e) {
29327
+ function wu(e) {
29327
29328
  return e.replace(/\r\n/g, `
29328
29329
  `).replace(/\r/g, `
29329
29330
  `);
@@ -29359,7 +29360,7 @@ function e1(e, t, n) {
29359
29360
  delete n.linkEditorOpenSnapshot;
29360
29361
  return;
29361
29362
  }
29362
- const o = bu(l), i = $s(t), u = Ts(t);
29363
+ const o = wu(l), i = $s(t), u = Ts(t);
29363
29364
  if (u == null && i == null) {
29364
29365
  delete n.linkEditorOpenSnapshot;
29365
29366
  return;
@@ -29420,7 +29421,7 @@ function gh(e, t, n) {
29420
29421
  const _ = (() => {
29421
29422
  var k, N;
29422
29423
  return ((k = p == null ? void 0 : p.ct) == null ? void 0 : k.t) === "inlineStr" && Array.isArray((N = p.ct) == null ? void 0 : N.s) ? p.ct.s.map((M) => (M == null ? void 0 : M.v) ?? "").join("") : (p == null ? void 0 : p.v) == null || Array.isArray(p == null ? void 0 : p.v) ? "" : `${p.v}`;
29423
- })(), v = bu(_), T = v.length;
29424
+ })(), v = wu(_), T = v.length;
29424
29425
  s = !0;
29425
29426
  const $ = Ir(e, o, i)[0];
29426
29427
  T > 0 ? (f = { start: 0, end: T }, c = v, m = T) : (f = { start: 0, end: 0 }, c = "", m = 0), $ && (d = $), e.luckysheetCellUpdate = [o, i];
@@ -29537,7 +29538,7 @@ function vh(e) {
29537
29538
  }
29538
29539
  return n;
29539
29540
  }
29540
- function wu(e) {
29541
+ function vu(e) {
29541
29542
  typeof e == "number" && (e = `${e}`);
29542
29543
  let t = !0;
29543
29544
  if (e == null)
@@ -29567,11 +29568,11 @@ function ca(e) {
29567
29568
  }
29568
29569
  return [n];
29569
29570
  }
29570
- function vu(e) {
29571
+ function _u(e) {
29571
29572
  let t = !1;
29572
29573
  return typeof e == "number" && (e = `${e}`), e !== void 0 && e.length === 2 && (e === "周一" || e === "周二" || e === "周三" || e === "周四" || e === "周五" || e === "周六" || e === "周日") && (t = !0), t;
29573
29574
  }
29574
- function _u(e) {
29575
+ function Tu(e) {
29575
29576
  typeof e == "number" && (e = `${e}`);
29576
29577
  let t = !1;
29577
29578
  return e !== void 0 && e.length === 3 && (e === "星期一" || e === "星期二" || e === "星期三" || e === "星期四" || e === "星期五" || e === "星期六" || e === "星期日") && (t = !0), t;
@@ -29634,7 +29635,7 @@ function ir(e) {
29634
29635
  l
29635
29636
  ];
29636
29637
  }
29637
- function Tu({ width: e, height: t, top: n, left: r }, a) {
29638
+ function $u({ width: e, height: t, top: n, left: r }, a) {
29638
29639
  const l = a.querySelector(
29639
29640
  ".fortune-cell-selected-extend"
29640
29641
  );
@@ -29649,7 +29650,7 @@ function $h(e) {
29649
29650
  function r1(e, t, n) {
29650
29651
  e.luckysheet_cell_selected_extend = !0, e.luckysheet_scroll_status = !0;
29651
29652
  const { scrollLeft: r, scrollTop: a } = e, l = n.getBoundingClientRect(), o = t.pageX - l.left - e.rowHeaderWidth + r, i = t.pageY - l.top - e.columnHeaderHeight + a, u = Un(i, e.visibledatarow), s = u[0], c = u[1], f = u[2], m = zn(o, e.visibledatacolumn), d = m[0], p = m[1], g = m[2];
29652
- e.luckysheet_cell_selected_extend_index = [f, g], Tu(
29653
+ e.luckysheet_cell_selected_extend_index = [f, g], $u(
29653
29654
  {
29654
29655
  left: d,
29655
29656
  width: p - d - 1,
@@ -29663,7 +29664,7 @@ function a1(e, t, n, r, a) {
29663
29664
  const { scrollLeft: l } = n, { scrollTop: o } = r, i = a.getBoundingClientRect(), u = t.pageX - i.left - e.rowHeaderWidth + l, s = t.pageY - i.top - e.columnHeaderHeight + o, c = Un(s, e.visibledatarow), f = c[1], m = c[0], d = c[2], p = zn(u, e.visibledatacolumn), g = p[1], y = p[0], b = p[2], w = e.luckysheet_cell_selected_extend_index[0], _ = e.luckysheet_cell_selected_extend_index[1];
29664
29665
  if (!e.luckysheet_select_save) return;
29665
29666
  let v = e.luckysheet_select_save[0].row[0], T = e.luckysheet_select_save[0].row[1], C = e.luckysheet_select_save[0].column[0], $ = e.luckysheet_select_save[0].column[1], k = e.luckysheet_select_save[0].top_move, N = e.luckysheet_select_save[0].height_move, M = e.luckysheet_select_save[0].left_move, z = e.luckysheet_select_save[0].width_move;
29666
- k == null || N == null || M == null || z == null || (Math.abs(w - d) > Math.abs(_ - b) ? d >= v && d <= T || (k >= m ? (N += k - m, k = m) : N = f - k - 1) : b >= C && b <= $ || (M >= y ? (z += M - y, M = y) : z = g - M - 1), s < 0 && (v = 0, [T] = e.luckysheet_select_save[0].row), u < 0 && (C = 0, [$] = e.luckysheet_select_save[0].column), Tu({ left: M, width: z, top: k, height: N }, a));
29667
+ k == null || N == null || M == null || z == null || (Math.abs(w - d) > Math.abs(_ - b) ? d >= v && d <= T || (k >= m ? (N += k - m, k = m) : N = f - k - 1) : b >= C && b <= $ || (M >= y ? (z += M - y, M = y) : z = g - M - 1), s < 0 && (v = 0, [T] = e.luckysheet_select_save[0].row), u < 0 && (C = 0, [$] = e.luckysheet_select_save[0].column), $u({ left: M, width: z, top: k, height: N }, a));
29667
29668
  }
29668
29669
  function Yt(e, t) {
29669
29670
  const n = [];
@@ -29822,7 +29823,7 @@ function ns(e, t, n) {
29822
29823
  }
29823
29824
  return r;
29824
29825
  }
29825
- function $u(e) {
29826
+ function Cu(e) {
29826
29827
  const { copyRange: t } = Ke, n = t.row[0], r = t.row[1], a = t.column[0], l = t.column[1];
29827
29828
  let o = !1, i = !1, u = !1, s = !1, c = !1, f = !1, m = !1;
29828
29829
  const d = ke(e);
@@ -29831,7 +29832,7 @@ function $u(e) {
29831
29832
  for (let g = a; g <= l; g += 1)
29832
29833
  if (d[p][g]) {
29833
29834
  const y = d[p][g];
29834
- y !== null && y.v != null && y.f == null && (y.ct != null && tn(y) ? o = !0 : y.ct != null && y.ct.t === "d" ? u = !0 : ca(y.m)[0] ? i = !0 : wu(y.m) && y.m !== "日" ? s = !0 : y.m != null && y.m === "日" ? c = !0 : vu(y.m) ? f = !0 : _u(y.m) && (m = !0));
29835
+ y !== null && y.v != null && y.f == null && (y.ct != null && tn(y) ? o = !0 : y.ct != null && y.ct.t === "d" ? u = !0 : ca(y.m)[0] ? i = !0 : vu(y.m) && y.m !== "日" ? s = !0 : y.m != null && y.m === "日" ? c = !0 : _u(y.m) ? f = !0 : Tu(y.m) && (m = !0));
29835
29836
  }
29836
29837
  return [
29837
29838
  o,
@@ -30175,7 +30176,7 @@ function Eh(e, t, n, r, a, l) {
30175
30176
  T = "extendNumber";
30176
30177
  const C = ca(v.m);
30177
30178
  y == null || b == null ? (w = !0, [, , y, b] = C) : C[2] !== y || C[3] !== b ? (w = !1, [, , y, b] = C) : w = !0;
30178
- } else wu(v.m) ? (T = "chnNumber", y = null, b = null) : vu(v.m) ? (T = "chnWeek2", y = null, b = null) : _u(v.m) ? (T = "chnWeek3", y = null, b = null) : (T = "other", y = null, b = null);
30179
+ } else vu(v.m) ? (T = "chnNumber", y = null, b = null) : _u(v.m) ? (T = "chnWeek2", y = null, b = null) : Tu(v.m) ? (T = "chnWeek3", y = null, b = null) : (T = "other", y = null, b = null);
30179
30180
  else
30180
30181
  T = "other", y = null, b = null;
30181
30182
  T === "extendNumber" ? _ === s ? s === c ? (g = T, d.push(v), p.push(_ - s + 1), m[g] = [], m[g].push({ data: d, index: p })) : (g = T, d.push(v), p.push(_ - s + 1)) : _ === c ? g === T && w ? (d.push(v), p.push(_ - s + 1), g in m ? m[g].push({ data: d, index: p }) : (m[g] = [], m[g].push({ data: d, index: p }))) : (g in m ? m[g].push({ data: d, index: p }) : (m[g] = [], m[g].push({ data: d, index: p })), g = T, d = [], d.push(v), p = [], p.push(_ - s + 1), g in m ? m[g].push({ data: d, index: p }) : (m[g] = [], m[g].push({ data: d, index: p }))) : g === T && w ? (d.push(v), p.push(_ - s + 1)) : (g in m ? m[g].push({ data: d, index: p }) : (m[g] = [], m[g].push({ data: d, index: p })), g = T, d = [], d.push(v), p = [], p.push(_ - s + 1)) : _ === s ? s === c ? (g = T, d.push(v), p.push(_ - s + 1), m[g] = [], m[g].push({ data: d, index: p })) : (g = T, d.push(v), p.push(_ - s + 1)) : _ === c ? g === T ? (d.push(v), p.push(_ - s + 1), g in m ? m[g].push({ data: d, index: p }) : (m[g] = [], m[g].push({ data: d, index: p }))) : (g in m ? m[g].push({ data: d, index: p }) : (m[g] = [], m[g].push({ data: d, index: p })), g = T, d = [], d.push(v), p = [], p.push(_ - s + 1), g in m ? m[g].push({ data: d, index: p }) : (m[g] = [], m[g].push({ data: d, index: p }))) : g === T ? (d.push(v), p.push(_ - s + 1)) : (g in m ? m[g].push({ data: d, index: p }) : (m[g] = [], m[g].push({ data: d, index: p })), g = T, d = [], d.push(v), p = [], p.push(_ - s + 1));
@@ -30323,9 +30324,9 @@ function rs(e, t, n) {
30323
30324
  }
30324
30325
  return r;
30325
30326
  }
30326
- function Cu(e) {
30327
+ function Nu(e) {
30327
30328
  var M, z, Q, K;
30328
- const t = ke(e), n = ct(e), r = Nu(e);
30329
+ const t = ke(e), n = ct(e), r = ku(e);
30329
30330
  if (n === !1 || t == null || r)
30330
30331
  return;
30331
30332
  const a = Ee(e, e.currentSheetId);
@@ -30681,7 +30682,7 @@ function Cu(e) {
30681
30682
  const F = N[le].cellrange;
30682
30683
  let te = [];
30683
30684
  for (let G = 0; G < F.length; G += 1) {
30684
- const Y = Js(
30685
+ const Y = eu(
30685
30686
  F[G],
30686
30687
  { row: m.row, column: m.column },
30687
30688
  { row: _.row, column: _.column },
@@ -30700,7 +30701,7 @@ function o1(e, t, n) {
30700
30701
  if (y && y.top != null && y.left != null && y.height != null && y.width != null && y.row_focus != null && y.column_focus != null) {
30701
30702
  let v = y.row[0], T = y.row[1], C = y.column[0], $ = y.column[1];
30702
30703
  Ke.copyRange = h.cloneDeep(h.pick(y, ["row", "column"]));
30703
- const k = $u(e);
30704
+ const k = Cu(e);
30704
30705
  if (!k[0] && !k[1] && !k[2] && !k[3] && !k[4] && !k[5] && !k[6] ? Ke.applyType = "0" : Ke.applyType = "1", e.luckysheet_select_save == null) return;
30705
30706
  const { top_move: N, left_move: M } = e.luckysheet_select_save[0];
30706
30707
  if (Math.abs(p - c) > Math.abs(g - d))
@@ -30757,7 +30758,7 @@ function o1(e, t, n) {
30757
30758
  }
30758
30759
  ]);
30759
30760
  try {
30760
- Cu(e);
30761
+ Nu(e);
30761
30762
  } catch (K) {
30762
30763
  console.error(K);
30763
30764
  }
@@ -30858,12 +30859,12 @@ function ct(e, t) {
30858
30859
  return !1;
30859
30860
  for (let i = a.row[0]; i <= a.row[1]; i += 1)
30860
30861
  for (let u = a.column[0]; u <= a.column[1]; u += 1)
30861
- if (Xs(e, i, u, e.currentSheetId))
30862
+ if (Zs(e, i, u, e.currentSheetId))
30862
30863
  return !1;
30863
30864
  return !0;
30864
30865
  }) && (h.isUndefined(e.allowEdit) ? !0 : e.allowEdit) && !e.isFlvReadOnly;
30865
30866
  }
30866
- function Nu(e, t) {
30867
+ function ku(e, t) {
30867
30868
  const n = e.config, r = h.isUndefined(t) ? e.luckysheet_select_save : t;
30868
30869
  return h.every(r, (a) => {
30869
30870
  var l, o;
@@ -30875,7 +30876,7 @@ function Nu(e, t) {
30875
30876
  return !1;
30876
30877
  for (let i = a.row[0]; i <= a.row[1]; i += 1)
30877
30878
  for (let u = a.column[0]; u <= a.column[1]; u += 1)
30878
- if (Xs(e, i, u, e.currentSheetId))
30879
+ if (Zs(e, i, u, e.currentSheetId))
30879
30880
  return !1;
30880
30881
  return !0;
30881
30882
  }) && (h.isUndefined(e.isFlvReadOnly) ? !0 : e.isFlvReadOnly);
@@ -30889,14 +30890,14 @@ function Ih(e) {
30889
30890
  const n = t.querySelectorAll("span");
30890
30891
  return n.length > 0 && n[n.length - 1].remove(), t.innerHTML;
30891
30892
  }
30892
- function ku(e) {
30893
+ function Su(e) {
30893
30894
  if (!e) return null;
30894
30895
  const t = e.match(/\(([^)]+)\)/);
30895
30896
  if (t) return t[1];
30896
30897
  const n = e.match(/^=([\w\d:+\-*/]+)$/);
30897
30898
  return n ? n[1].split(/[\+\-\*\/]/).map((a) => a.trim()).filter(Boolean).join(",") : null;
30898
30899
  }
30899
- function Su(e, t, n) {
30900
+ function Au(e, t, n) {
30900
30901
  function r(c) {
30901
30902
  return /^[A-Za-z]+\d+$/.test(c);
30902
30903
  }
@@ -31011,7 +31012,7 @@ function f1(e, t, n, r = {}) {
31011
31012
  ""
31012
31013
  ))), u === void 0 && (u = null), u;
31013
31014
  }
31014
- function Au(e, t, n, r, a, l = {}, o) {
31015
+ function Eu(e, t, n, r, a, l = {}, o) {
31015
31016
  var c, f, m, d, p;
31016
31017
  if (!h.isNumber(t) || !h.isNumber(n))
31017
31018
  throw new Error("row or column cannot be null or undefined");
@@ -31060,7 +31061,7 @@ function Au(e, t, n, r, a, l = {}, o) {
31060
31061
  ((c = u == null ? void 0 : u[t]) == null ? void 0 : c[n]) == null && (u[t][n] = {});
31061
31062
  const y = u[t][n];
31062
31063
  r.f != null && r.v == null ? (g.f = r.f, r.ct != null && (g.ct = r.ct), mo(e, t, n, a, g)) : (r.ct != null && (g.ct = r.ct), r.f != null && (g.f = r.f), r.v != null ? g.v = r.v : g.v = y.v, r.m != null && (g.m = r.m), Ft(e, t, n), qt(e, t, n, u, g)), h.forEach(r, (b, w) => {
31063
- w in s && o ? yu(
31064
+ w in s && o ? bu(
31064
31065
  e,
31065
31066
  u,
31066
31067
  w,
@@ -31159,8 +31160,8 @@ function h1(e, t, n, r, a, l = {}) {
31159
31160
  }
31160
31161
  function p1(e, t, n, r) {
31161
31162
  Ke.copyRange = t, Ke.applyRange = n, Ke.direction = r;
31162
- const a = $u(e);
31163
- !a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5] && !a[6] ? Ke.applyType = "0" : Ke.applyType = "1", Cu(e);
31163
+ const a = Cu(e);
31164
+ !a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5] && !a[6] ? Ke.applyType = "0" : Ke.applyType = "1", Nu(e);
31164
31165
  }
31165
31166
  function g1(e, t, n, r = {}) {
31166
31167
  const a = At(e, r), o = {
@@ -31197,7 +31198,7 @@ function b1(e, t, n, r, a = {}) {
31197
31198
  if (!["row", "column"].includes(t) || !h.isNumber(n) || !h.isNumber(r))
31198
31199
  throw Zt;
31199
31200
  const l = At(e, a);
31200
- du(e, { type: t, start: n, end: r, id: l.id });
31201
+ mu(e, { type: t, start: n, end: r, id: l.id });
31201
31202
  }
31202
31203
  function w1(e, t, n) {
31203
31204
  if (!["row", "column"].includes(n))
@@ -31353,10 +31354,10 @@ function Uh(e) {
31353
31354
  return /^0x?[a-fA-F0-9]+$/.test(e);
31354
31355
  }
31355
31356
  const ls = "#f3f3f3", is = 5;
31356
- function Eu(e) {
31357
+ function Mu(e) {
31357
31358
  return typeof e != "string" ? !1 : ["price", "fully_diluted_value"].includes(e) || e.toLowerCase().includes("usd") || e.toLowerCase().includes("price_in");
31358
31359
  }
31359
- const Mu = `$#,##0.${"0".repeat(2)}`, zh = (e, t, n, r) => {
31360
+ const Ru = `$#,##0.${"0".repeat(2)}`, zh = (e, t, n, r) => {
31360
31361
  var l;
31361
31362
  if (!n.length) return e;
31362
31363
  const a = n.map((o) => {
@@ -31506,7 +31507,7 @@ const Mu = `$#,##0.${"0".repeat(2)}`, zh = (e, t, n, r) => {
31506
31507
  t + le,
31507
31508
  a
31508
31509
  ), { m: G, ct: Y, ...O } = te || {}, $e = vo(F), ae = {};
31509
- $e && Eu(K) && !l ? (ae.m = ut(Mu, F), ae.ht = 2) : F && (ae.m = String(F)), Q.push({
31510
+ $e && Mu(K) && !l ? (ae.m = ut(Ru, F), ae.ht = 2) : F && (ae.m = String(F)), Q.push({
31510
31511
  ...O,
31511
31512
  ...ss(te, $e),
31512
31513
  // move color from styles to cell-level 'fc' when becoming numeric
@@ -31522,17 +31523,17 @@ const Mu = `$#,##0.${"0".repeat(2)}`, zh = (e, t, n, r) => {
31522
31523
  var l, o, i;
31523
31524
  const r = (o = (l = n.current) == null ? void 0 : l.getSheet()) == null ? void 0 : o.data, a = (i = r == null ? void 0 : r[e]) == null ? void 0 : i[t];
31524
31525
  return a == null ? {} : typeof a == "object" ? { ...a } : { v: a };
31525
- }, vo = (e) => Hh(e) && !Uh(e), Ru = (e) => Array.isArray(e) ? e.map((t) => ({ ...t })) : e, mr = (e, t, n) => {
31526
+ }, vo = (e) => Hh(e) && !Uh(e), xu = (e) => Array.isArray(e) ? e.map((t) => ({ ...t })) : e, mr = (e, t, n) => {
31526
31527
  const r = vo(e);
31527
- if (n && r && Eu(n)) {
31528
+ if (n && r && Mu(n)) {
31528
31529
  const { s: i, ...u } = t || {};
31529
- return { ...u, t: "n", fa: Mu, ht: 2 };
31530
+ return { ...u, t: "n", fa: Ru, ht: 2 };
31530
31531
  }
31531
31532
  if (!t)
31532
31533
  return r ? { t: "n", fa: "General" } : { t: "s", fa: "@" };
31533
31534
  if (!r) {
31534
31535
  const i = t.t === "s" && t.fa ? t.fa : "@";
31535
- return { ...t, t: "s", fa: i, s: Ru(t.s) };
31536
+ return { ...t, t: "s", fa: i, s: xu(t.s) };
31536
31537
  }
31537
31538
  const a = tn({ ct: t, v: e }) && t.fa ? t.fa : "General", { s: l, ...o } = t || {};
31538
31539
  return { ...o, t: "n", fa: a };
@@ -31546,7 +31547,7 @@ const Mu = `$#,##0.${"0".repeat(2)}`, zh = (e, t, n, r) => {
31546
31547
  }, us = (e) => {
31547
31548
  if (!e || typeof e != "object") return e ?? {};
31548
31549
  const t = e.ct;
31549
- return !t || !Array.isArray(t.s) ? { ...e } : { ...e, ct: { ...t, s: Ru(t.s) } };
31550
+ return !t || !Array.isArray(t.s) ? { ...e } : { ...e, ct: { ...t, s: xu(t.s) } };
31550
31551
  }, Vh = ({
31551
31552
  row: e,
31552
31553
  column: t,
@@ -31613,7 +31614,7 @@ const Mu = `$#,##0.${"0".repeat(2)}`, zh = (e, t, n, r) => {
31613
31614
  if (!i)
31614
31615
  throw new Error(`Invalid function call format: ${e}`);
31615
31616
  const u = i[1].toUpperCase(), s = i[2], f = jh(s).map((m) => {
31616
- if (xu(m)) {
31617
+ if (qu(m)) {
31617
31618
  const d = Xh(m);
31618
31619
  return d == null ? void 0 : d.map(
31619
31620
  (g) => cs(t, g == null ? void 0 : g.row, g == null ? void 0 : g.column)
@@ -31693,7 +31694,7 @@ function fs(e) {
31693
31694
  function fa(e) {
31694
31695
  return !e || typeof e != "string" ? !1 : /^[A-Z]+\d+$/.test(e);
31695
31696
  }
31696
- function xu(e) {
31697
+ function qu(e) {
31697
31698
  if (!e || typeof e != "string" || !e.includes(":"))
31698
31699
  return !1;
31699
31700
  const t = e.split(":");
@@ -31717,7 +31718,7 @@ function _o(e) {
31717
31718
  };
31718
31719
  }
31719
31720
  function Xh(e) {
31720
- if (!xu(e))
31721
+ if (!qu(e))
31721
31722
  return null;
31722
31723
  const t = e.split(":"), n = _o(t[0]), r = _o(t[1]);
31723
31724
  if (!n || !r)
@@ -31753,13 +31754,13 @@ export {
31753
31754
  $a as U,
31754
31755
  Rh as V,
31755
31756
  ut as W,
31756
- nu as X,
31757
+ ru as X,
31757
31758
  Fs as Y,
31758
31759
  hm as Z,
31759
31760
  Go as _,
31760
31761
  Ee as a,
31761
31762
  pg as a$,
31762
- Js as a0,
31763
+ eu as a0,
31763
31764
  or as a1,
31764
31765
  Ag as a2,
31765
31766
  zn as a3,
@@ -31796,10 +31797,10 @@ export {
31796
31797
  gh as aY,
31797
31798
  yg as aZ,
31798
31799
  gg as a_,
31799
- Au as aa,
31800
+ Eu as aa,
31800
31801
  Pm as ab,
31801
31802
  wo as ac,
31802
- Rf as ad,
31803
+ Us as ad,
31803
31804
  as as ae,
31804
31805
  N1 as af,
31805
31806
  Bh as ag,
@@ -31831,7 +31832,7 @@ export {
31831
31832
  mo as b4,
31832
31833
  ig as b5,
31833
31834
  qg as b6,
31834
- Nu as b7,
31835
+ ku as b7,
31835
31836
  wd as b8,
31836
31837
  Lo as b9,
31837
31838
  jp as bA,
@@ -31839,7 +31840,7 @@ export {
31839
31840
  Hp as bC,
31840
31841
  Ar as bD,
31841
31842
  ta as bE,
31842
- au as bF,
31843
+ ou as bF,
31843
31844
  sd as bG,
31844
31845
  dd as bH,
31845
31846
  ba as bI,
@@ -31887,30 +31888,30 @@ export {
31887
31888
  Ns as bx,
31888
31889
  Gp as by,
31889
31890
  xr as bz,
31890
- Ou as c,
31891
+ Fu as c,
31891
31892
  Zg as c$,
31892
31893
  gm as c0,
31893
31894
  na as c1,
31894
- hf as c2,
31895
- mf as c3,
31895
+ pf as c2,
31896
+ hf as c3,
31896
31897
  fp as c4,
31897
31898
  cp as c5,
31898
31899
  Kf as c6,
31899
31900
  Om as c7,
31900
- Uc as c8,
31901
+ zc as c8,
31901
31902
  Cp as c9,
31902
31903
  Fg as cA,
31903
- Nc as cB,
31904
- Ec as cC,
31904
+ kc as cB,
31905
+ Mc as cC,
31905
31906
  Gd as cD,
31906
- iu as cE,
31907
+ su as cE,
31907
31908
  jt as cF,
31908
31909
  Ap as cG,
31909
31910
  sp as cH,
31910
31911
  Hm as cI,
31911
31912
  Bn as cJ,
31912
31913
  Bg as cK,
31913
- ou as cL,
31914
+ lu as cL,
31914
31915
  ip as cM,
31915
31916
  lp as cN,
31916
31917
  ho as cO,
@@ -31937,7 +31938,7 @@ export {
31937
31938
  r1 as ci,
31938
31939
  Ng as cj,
31939
31940
  rg as ck,
31940
- du as cl,
31941
+ mu as cl,
31941
31942
  Fm as cm,
31942
31943
  ma as cn,
31943
31944
  Vt as co,
@@ -31960,14 +31961,14 @@ export {
31960
31961
  Sg as d3,
31961
31962
  qm as d4,
31962
31963
  On as d5,
31963
- cf as d6,
31964
+ ff as d6,
31964
31965
  uo as d7,
31965
31966
  ph as d8,
31966
31967
  Yg as d9,
31967
31968
  np as dA,
31968
31969
  Up as dB,
31969
31970
  tg as dC,
31970
- Ac as dD,
31971
+ Ec as dD,
31971
31972
  Rg as dE,
31972
31973
  ng as dF,
31973
31974
  Jd as dG,
@@ -31978,21 +31979,21 @@ export {
31978
31979
  Eg as dL,
31979
31980
  Ug as dM,
31980
31981
  dp as dN,
31981
- uu as dO,
31982
+ cu as dO,
31982
31983
  Am as dP,
31983
31984
  Io as dQ,
31984
31985
  Oo as dR,
31985
31986
  ap as dS,
31986
31987
  mp as dT,
31987
31988
  hp as dU,
31988
- Us as dV,
31989
+ zs as dV,
31989
31990
  ep as dW,
31990
- Sf as dX,
31991
+ Af as dX,
31991
31992
  gp as dY,
31992
31993
  pp as dZ,
31993
31994
  Uh as d_,
31994
31995
  xg as da,
31995
- uf as db,
31996
+ cf as db,
31996
31997
  Ao as dc,
31997
31998
  Wp as dd,
31998
31999
  ha as de,
@@ -32001,7 +32002,7 @@ export {
32001
32002
  Qn as dh,
32002
32003
  tp as di,
32003
32004
  Og as dj,
32004
- Cc as dk,
32005
+ Nc as dk,
32005
32006
  Rt as dl,
32006
32007
  Bp as dm,
32007
32008
  Sr as dn,
@@ -32017,30 +32018,30 @@ export {
32017
32018
  kr as dy,
32018
32019
  Pp as dz,
32019
32020
  A1 as e,
32020
- xu as e0,
32021
+ qu as e0,
32021
32022
  Xh as e1,
32022
32023
  fa as e2,
32023
32024
  _o as e3,
32024
32025
  Wh as e4,
32025
32026
  Gh as e5,
32026
- Mu as e6,
32027
+ Ru as e6,
32027
32028
  Yh as f,
32028
32029
  ds as g,
32029
- jc as h,
32030
+ Xc as h,
32030
32031
  sr as i,
32031
32032
  En as j,
32032
32033
  rt as k,
32033
32034
  ke as l,
32034
- Qs as m,
32035
+ Js as m,
32035
32036
  Vp as n,
32036
32037
  Cm as o,
32037
- ru as p,
32038
+ au as p,
32038
32039
  Ms as q,
32039
32040
  io as r,
32040
32041
  Wd as s,
32041
32042
  T1 as t,
32042
32043
  tn as u,
32043
- eu as v,
32044
+ tu as v,
32044
32045
  Li as w,
32045
32046
  sn as x,
32046
32047
  Es as y,