@univerjs/engine-formula 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  var Di = Object.defineProperty;
2
2
  var Ci = (n, r, e) => r in n ? Di(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
3
  var D = (n, r, e) => (Ci(n, typeof r != "symbol" ? r + "" : r, e), e);
4
- import { ObjectMatrix as ae, CommandType as Ae, LRUMap as bi, hashAlgorithm as Si, Tools as Qe, AbsoluteRefType as _e, RANGE_TYPE as et, Disposable as ue, moveRangeByOffset as xs, isValidRange as Ai, isRealNum as pn, DEFAULT_EMPTY_DOCUMENT_VALUE as Li, isNullCell as mr, CellValueType as Ne, BooleanNumber as wi, isFormulaString as Ot, isFormulaId as Ft, UniverInstanceType as Gt, IUniverInstanceService as Rn, sortRules as xi, OnLifecycle as He, LifecycleStages as Ie, requestImmediateMacroTask as Pi, IConfigService as Vi, ICommandService as ht, Plugin as vi, Rectangle as es } from "@univerjs/core";
4
+ import { ObjectMatrix as ae, CommandType as Ae, LRUMap as bi, hashAlgorithm as Si, Tools as Qe, AbsoluteRefType as _e, RANGE_TYPE as et, Disposable as ue, moveRangeByOffset as xs, isValidRange as Ai, isRealNum as pn, DEFAULT_EMPTY_DOCUMENT_VALUE as Li, isNullCell as gr, CellValueType as Ne, BooleanNumber as wi, isFormulaString as St, isFormulaId as Ft, UniverInstanceType as Gt, IUniverInstanceService as Rn, toDisposable as xi, sortRules as Pi, OnLifecycle as He, LifecycleStages as Ie, requestImmediateMacroTask as Vi, IConfigService as vi, ICommandService as ht, Plugin as Ui, Rectangle as es } from "@univerjs/core";
5
5
  import { Inject as le, createIdentifier as st, Injector as Tt } from "@wendellhu/redi";
6
- import { Subject as Ut } from "rxjs";
7
- function Ui(n, r, e, t, s) {
6
+ import { Subject as Bt } from "rxjs";
7
+ function Bi(n, r, e, t, s) {
8
8
  for (let i = 0, a = n.length; i < a; i++) {
9
9
  const o = n[i];
10
10
  if (r !== o.unitId || e !== o.sheetId)
@@ -17,8 +17,8 @@ function Ui(n, r, e, t, s) {
17
17
  }
18
18
  var f = /* @__PURE__ */ ((n) => (n.DIV_BY_ZERO = "#DIV/0!", n.NAME = "#NAME?", n.VALUE = "#VALUE!", n.NUM = "#NUM!", n.NA = "#N/A", n.CYCLE = "#CYCLE!", n.REF = "#REF!", n.SPILL = "#SPILL!", n.CALC = "#CALC!", n.ERROR = "#ERROR!", n.CONNECT = "#GETTING_DATA", n.NULL = "#NULL!", n))(f || {});
19
19
  const rr = new Set(Object.values(f));
20
- var Bi = /* @__PURE__ */ ((n) => (n[n.Financial = 0] = "Financial", n[n.Date = 1] = "Date", n[n.Math = 2] = "Math", n[n.Statistical = 3] = "Statistical", n[n.Lookup = 4] = "Lookup", n[n.Database = 5] = "Database", n[n.Text = 6] = "Text", n[n.Logical = 7] = "Logical", n[n.Information = 8] = "Information", n[n.Engineering = 9] = "Engineering", n[n.Cube = 10] = "Cube", n[n.Compatibility = 11] = "Compatibility", n[n.Web = 12] = "Web", n[n.Array = 13] = "Array", n[n.Univer = 14] = "Univer", n[n.User = 15] = "User", n[n.DefinedName = 16] = "DefinedName", n))(Bi || {}), me = /* @__PURE__ */ ((n) => (n.PLUS = "+", n.MINUS = "-", n.MULTIPLY = "*", n.DIVIDED = "/", n.CONCATENATE = "&", n.POWER = "^", n.EQUALS = "=", n.NOT_EQUAL = "<>", n.GREATER_THAN = ">", n.GREATER_THAN_OR_EQUAL = ">=", n.LESS_THAN = "<", n.LESS_THAN_OR_EQUAL = "<=", n))(me || {}), B = /* @__PURE__ */ ((n) => (n.EQUALS = "=", n.NOT_EQUAL = "<>", n.GREATER_THAN = ">", n.GREATER_THAN_OR_EQUAL = ">=", n.LESS_THAN = "<", n.LESS_THAN_OR_EQUAL = "<=", n))(B || {});
21
- const gr = /* @__PURE__ */ new Map([
20
+ var Oi = /* @__PURE__ */ ((n) => (n[n.Financial = 0] = "Financial", n[n.Date = 1] = "Date", n[n.Math = 2] = "Math", n[n.Statistical = 3] = "Statistical", n[n.Lookup = 4] = "Lookup", n[n.Database = 5] = "Database", n[n.Text = 6] = "Text", n[n.Logical = 7] = "Logical", n[n.Information = 8] = "Information", n[n.Engineering = 9] = "Engineering", n[n.Cube = 10] = "Cube", n[n.Compatibility = 11] = "Compatibility", n[n.Web = 12] = "Web", n[n.Array = 13] = "Array", n[n.Univer = 14] = "Univer", n[n.User = 15] = "User", n[n.DefinedName = 16] = "DefinedName", n))(Oi || {}), me = /* @__PURE__ */ ((n) => (n.PLUS = "+", n.MINUS = "-", n.MULTIPLY = "*", n.DIVIDED = "/", n.CONCATENATE = "&", n.POWER = "^", n.EQUALS = "=", n.NOT_EQUAL = "<>", n.GREATER_THAN = ">", n.GREATER_THAN_OR_EQUAL = ">=", n.LESS_THAN = "<", n.LESS_THAN_OR_EQUAL = "<=", n))(me || {}), B = /* @__PURE__ */ ((n) => (n.EQUALS = "=", n.NOT_EQUAL = "<>", n.GREATER_THAN = ">", n.GREATER_THAN_OR_EQUAL = ">=", n.LESS_THAN = "<", n.LESS_THAN_OR_EQUAL = "<=", n))(B || {});
21
+ const pr = /* @__PURE__ */ new Map([
22
22
  ["<>", 3],
23
23
  ["<", 3],
24
24
  [">=", 3],
@@ -31,7 +31,7 @@ const gr = /* @__PURE__ */ new Map([
31
31
  ["/", 1],
32
32
  ["*", 1],
33
33
  ["^", 0]
34
- ]), _t = new Set(gr.keys()), Oi = /* @__PURE__ */ new Set([
34
+ ]), _t = new Set(pr.keys()), Fi = /* @__PURE__ */ new Set([
35
35
  "=",
36
36
  "<>",
37
37
  ">",
@@ -41,35 +41,35 @@ const gr = /* @__PURE__ */ new Map([
41
41
  /* LESS_THAN_OR_EQUAL */
42
42
  ]);
43
43
  var I = /* @__PURE__ */ ((n) => (n.OPEN_BRACKET = "(", n.CLOSE_BRACKET = ")", n.COMMA = ",", n.SINGLE_QUOTATION = "'", n.DOUBLE_QUOTATION = '"', n.OPEN_BRACES = "{", n.CLOSE_BRACES = "}", n.COLON = ":", n.OPEN_SQUARE_BRACKET = "[", n.CLOSE_SQUARE_BRACKET = "]", n))(I || {}), rt = /* @__PURE__ */ ((n) => (n.PERCENTAGE = "%", n.POUND = "#", n))(rt || {});
44
- const Fi = /* @__PURE__ */ new Set([
44
+ const Mi = /* @__PURE__ */ new Set([
45
45
  "%",
46
46
  "#"
47
47
  /* POUND */
48
48
  ]);
49
49
  var ye = /* @__PURE__ */ ((n) => (n.AT = "@", n.MINUS = "-", n))(ye || {});
50
- const Mi = " ", Ps = [
50
+ const ki = " ", Ps = [
51
51
  ...Object.values(B),
52
52
  ...Object.values(me),
53
53
  ...Object.values(I),
54
54
  ...Object.values(rt),
55
55
  ...Object.values(ye)
56
56
  ];
57
- function pr(n) {
57
+ function Rr(n) {
58
58
  return Ps.includes(n);
59
59
  }
60
- function ki(n) {
60
+ function $i(n) {
61
61
  for (const r of Ps)
62
62
  if (n.indexOf(r) > -1)
63
63
  return !0;
64
64
  return !1;
65
65
  }
66
- function Dl(n) {
66
+ function Cl(n) {
67
67
  return n[0] === "'" && n[n.length - 1] === "'" ? n.substring(1, n.length - 1) : n;
68
68
  }
69
- function Cl(n) {
70
- return pr(n) && n !== I.CLOSE_BRACES && n !== I.CLOSE_BRACKET && n !== I.SINGLE_QUOTATION && n !== I.DOUBLE_QUOTATION || n === " ";
69
+ function bl(n) {
70
+ return Rr(n) && n !== I.CLOSE_BRACES && n !== I.CLOSE_BRACKET && n !== I.SINGLE_QUOTATION && n !== I.DOUBLE_QUOTATION || n === " ";
71
71
  }
72
- function $i(n) {
72
+ function Ti(n) {
73
73
  const r = {};
74
74
  return Object.keys(n).forEach((e) => {
75
75
  const t = n[e];
@@ -81,7 +81,7 @@ function $i(n) {
81
81
  });
82
82
  }), r;
83
83
  }
84
- function Ti(n) {
84
+ function ji(n) {
85
85
  const r = {};
86
86
  return Object.keys(n).forEach((e) => {
87
87
  const t = n[e];
@@ -145,11 +145,11 @@ const Vs = {
145
145
  id: "formula.mutation.remove-other-formula",
146
146
  type: Ae.MUTATION,
147
147
  handler: () => !0
148
- }, ji = {
148
+ }, Yi = {
149
149
  id: "formula.mutation.set-super-table",
150
150
  type: Ae.MUTATION,
151
151
  handler: () => !0
152
- }, Yi = {
152
+ }, Qi = {
153
153
  id: "formula.mutation.remove-super-table",
154
154
  type: Ae.MUTATION,
155
155
  handler: () => !0
@@ -161,7 +161,7 @@ const Vs = {
161
161
  id: "formula.mutation.unregister-function",
162
162
  type: Ae.MUTATION,
163
163
  handler: () => !0
164
- }, Ze = "P_1", ct = "R_1", Mt = "L_1", nr = "LR_1", Ms = "LO_1", Qi = "LET", Jt = "LAMBDA", zi = "CUBE";
164
+ }, Ze = "P_1", ct = "R_1", Mt = "L_1", nr = "LR_1", Ms = "LO_1", zi = "LET", Jt = "LAMBDA", Hi = "CUBE";
165
165
  class K {
166
166
  constructor() {
167
167
  D(this, "_parent");
@@ -269,7 +269,7 @@ class K {
269
269
  return s;
270
270
  }
271
271
  }
272
- class wt {
272
+ class xt {
273
273
  constructor(r) {
274
274
  D(this, "_cache");
275
275
  this._cache = new bi(r);
@@ -289,9 +289,9 @@ class wt {
289
289
  return Si(r);
290
290
  }
291
291
  }
292
- const un = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Hi = "((?![\\[\\]\\/?*\\\\]).)*!", lt = "$", An = "\\s*?:\\s*?", jt = `'?(${un})?(${Hi})?'?`, cn = `\\${lt}?[A-Za-z]+\\${lt}?[0-9]+`, Ii = `^(${ye.AT})?${jt}${cn}${An}${cn}$`, sr = `^${jt}\\s*?${cn}(${rt.POUND})?$`, ks = `^${jt}\\${lt}?[0-9]+${An}\\${lt}?[0-9]+$`, $s = `^${jt}\\${lt}?[A-Za-z]+${An}\\${lt}?[A-Za-z]+$`, Ts = `^${jt}\\s*?\\${lt}?[0-9]+$`, js = `^${jt}\\s*?\\${lt}?[A-Za-z]+$`, Ys = "[.*?]", Wi = "{.*?}";
293
- function Xi(n) {
294
- return new RegExp(sr).test(n) || new RegExp(Ii).test(n) || new RegExp(ks).test(n) || new RegExp($s).test(n);
292
+ const un = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ii = "((?![\\[\\]\\/?*\\\\]).)*!", lt = "$", An = "\\s*?:\\s*?", jt = `'?(${un})?(${Ii})?'?`, cn = `\\${lt}?[A-Za-z]+\\${lt}?[0-9]+`, Wi = `^(${ye.AT})?${jt}${cn}${An}${cn}$`, sr = `^${jt}\\s*?${cn}(${rt.POUND})?$`, ks = `^${jt}\\${lt}?[0-9]+${An}\\${lt}?[0-9]+$`, $s = `^${jt}\\${lt}?[A-Za-z]+${An}\\${lt}?[A-Za-z]+$`, Ts = `^${jt}\\s*?\\${lt}?[0-9]+$`, js = `^${jt}\\s*?\\${lt}?[A-Za-z]+$`, Ys = "[.*?]", Xi = "{.*?}";
293
+ function Gi(n) {
294
+ return new RegExp(sr).test(n) || new RegExp(Wi).test(n) || new RegExp(ks).test(n) || new RegExp($s).test(n);
295
295
  }
296
296
  var Ve = /* @__PURE__ */ ((n) => (n[n.NORMAL = 0] = "NORMAL", n[n.NUMBER = 1] = "NUMBER", n[n.STRING = 2] = "STRING", n[n.FUNCTION = 3] = "FUNCTION", n[n.REFERENCE = 4] = "REFERENCE", n[n.ARRAY = 5] = "ARRAY", n[n.DEFINED_NAME = 6] = "DEFINED_NAME", n))(Ve || {});
297
297
  function ln(n) {
@@ -300,21 +300,21 @@ function ln(n) {
300
300
  typeof e == "string" ? r += e : r += e.token;
301
301
  return r;
302
302
  }
303
- const Gi = /[^0-9]/g, Ki = /[^A-Za-z]/g;
304
- function Rr(n) {
303
+ const Ki = /[^0-9]/g, qi = /[^A-Za-z]/g;
304
+ function _r(n) {
305
305
  let r = n[0] === "$";
306
306
  const e = n.substring(1);
307
307
  let t = e.indexOf("$") > -1;
308
308
  return Qe.isStringNumber(e) && r && !t && (r = !1, t = !0), r && t ? _e.ALL : r ? _e.COLUMN : t ? _e.ROW : _e.NONE;
309
309
  }
310
- function bl(n) {
310
+ function Sl(n) {
311
311
  const r = n.split("!");
312
312
  r.length > 1 && (n = r[r.length - 1]);
313
313
  const e = n.split(":");
314
314
  return e.length > 1 ? {
315
- startAbsoluteRefType: Rr(e[0]),
316
- endAbsoluteRefType: Rr(e[1])
317
- } : { startAbsoluteRefType: Rr(e[0]) };
315
+ startAbsoluteRefType: _r(e[0]),
316
+ endAbsoluteRefType: _r(e[1])
317
+ } : { startAbsoluteRefType: _r(e[0]) };
318
318
  }
319
319
  function ts(n = _e.NONE) {
320
320
  let r = "", e = "";
@@ -344,18 +344,18 @@ function ft(n) {
344
344
  const l = `${u.columnAbsoluteString}${Qe.chatAtABC(r)}${u.rowAbsoluteString}${e + 1}`, d = `${c.columnAbsoluteString}${Qe.chatAtABC(t)}${c.rowAbsoluteString}${s + 1}`;
345
345
  return l === d ? l : `${l}:${d}`;
346
346
  }
347
- function qi(n, r) {
348
- return Ar(n) ? `'${n}'!${ft(r)}` : `${n}!${ft(r)}`;
347
+ function Zi(n, r) {
348
+ return Lr(n) ? `'${n}'!${ft(r)}` : `${n}!${ft(r)}`;
349
349
  }
350
- function Zi(n, r, e) {
351
- return Ar(n) || Ar(r) ? `'[${n}]${r}'!${ft(e)}` : `[${n}]${r}!${ft(e)}`;
350
+ function Ji(n, r, e) {
351
+ return Lr(n) || Lr(r) ? `'[${n}]${r}'!${ft(e)}` : `[${n}]${r}!${ft(e)}`;
352
352
  }
353
- function Bt(n) {
353
+ function Ot(n) {
354
354
  const { unitId: r, sheetName: e, range: t } = n;
355
- return r != null && r.length > 0 && e != null && e.length > 0 ? Zi(r, e, t) : e != null && e.length > 0 ? qi(e, t) : ft(t);
355
+ return r != null && r.length > 0 && e != null && e.length > 0 ? Ji(r, e, t) : e != null && e.length > 0 ? Zi(e, t) : ft(t);
356
356
  }
357
- function Xr(n) {
358
- const r = Number.parseInt(n.replace(Gi, "")) - 1, e = Qe.ABCatNum(n.replace(Ki, "")), t = Rr(n);
357
+ function Gr(n) {
358
+ const r = Number.parseInt(n.replace(Ki, "")) - 1, e = Qe.ABCatNum(n.replace(qi, "")), t = _r(n);
359
359
  return {
360
360
  row: r,
361
361
  column: e,
@@ -377,21 +377,21 @@ function Qs(n) {
377
377
  function nt(n) {
378
378
  const { refBody: r, sheetName: e, unitId: t } = Qs(n), s = r.indexOf(":");
379
379
  if (s === -1) {
380
- const C = Xr(r), y = C.row, S = C.column, L = C.absoluteRefType;
380
+ const C = Gr(r), E = C.row, S = C.column, L = C.absoluteRefType;
381
381
  return {
382
382
  unitId: t,
383
383
  sheetName: e,
384
384
  range: {
385
- startRow: y,
385
+ startRow: E,
386
386
  startColumn: S,
387
- endRow: y,
387
+ endRow: E,
388
388
  endColumn: S,
389
389
  startAbsoluteRefType: L,
390
390
  endAbsoluteRefType: L
391
391
  }
392
392
  };
393
393
  }
394
- const i = r.substring(0, s), a = r.substring(s + 1), o = Xr(i), u = Xr(a), c = o.row, l = o.column, d = u.row, m = u.column;
394
+ const i = r.substring(0, s), a = r.substring(s + 1), o = Gr(i), u = Gr(a), c = o.row, l = o.column, d = u.row, m = u.column;
395
395
  let _ = et.NORMAL;
396
396
  return Number.isNaN(c) && Number.isNaN(d) ? _ = et.COLUMN : Number.isNaN(l) && Number.isNaN(m) && (_ = et.ROW), {
397
397
  unitId: t,
@@ -408,14 +408,14 @@ function nt(n) {
408
408
  };
409
409
  }
410
410
  function fn(n) {
411
- if (!Xi(n))
411
+ if (!Gi(n))
412
412
  return !1;
413
413
  const { range: r } = nt(n);
414
414
  return !(r.endColumn >= 16384);
415
415
  }
416
- function Sl(n, r) {
416
+ function Al(n, r) {
417
417
  const e = (n == null ? void 0 : n.split(",")) || [];
418
- return n === "" || e.length === 0 ? [] : Ji(n) ? e.map((i) => {
418
+ return n === "" || e.length === 0 ? [] : Ni(n) ? e.map((i) => {
419
419
  const a = nt(i);
420
420
  return {
421
421
  unitId: a.unitId,
@@ -425,23 +425,23 @@ function Sl(n, r) {
425
425
  };
426
426
  }) : [];
427
427
  }
428
- function Ji(n) {
428
+ function Ni(n) {
429
429
  return ((n == null ? void 0 : n.split(",")) || []).every((e) => fn(e.trim()));
430
430
  }
431
- function Ar(n) {
432
- return n.length === 0 ? !1 : !!(ki(n) || Ni(n) || ea(n) || ta(n) || /[\s!$%^&*()+\-=\[\]{};':"\\|,.<>\/?]/.test(n));
431
+ function Lr(n) {
432
+ return n.length === 0 ? !1 : !!($i(n) || ea(n) || ta(n) || ra(n) || /[\s!$%^&*()+\-=\[\]{};':"\\|,.<>\/?]/.test(n));
433
433
  }
434
- function Ni(n) {
434
+ function ea(n) {
435
435
  const r = n.match(/[1-9][0-9]{0,6}/);
436
436
  return /^[A-Z]+[1-9][0-9]{0,6}$/.test(n) && r !== null;
437
437
  }
438
- function ea(n) {
438
+ function ta(n) {
439
439
  return /^(R(-?[0-9]+)?C(-?[0-9]+)?|C(-?[0-9]+)?|R(-?[0-9]+)?)$/.test(n);
440
440
  }
441
- function ta(n) {
441
+ function ra(n) {
442
442
  return !new RegExp("^\\p{Letter}", "u").test(n.charAt(0));
443
443
  }
444
- const zs = 1e5, Gr = new wt(zs), Kr = new wt(zs);
444
+ const zs = 1e5, Kr = new xt(zs), qr = new xt(zs);
445
445
  class Ln extends ue {
446
446
  constructor() {
447
447
  super(...arguments);
@@ -465,7 +465,7 @@ class Ln extends ue {
465
465
  }
466
466
  // Table3[[#All],[Column1]:[Column2]]
467
467
  dispose() {
468
- this._resetTemp(), this._currentLexerNode.dispose(), Gr.clear(), Kr.clear();
468
+ this._resetTemp(), this._currentLexerNode.dispose(), Kr.clear(), qr.clear();
469
469
  }
470
470
  getUpLevel() {
471
471
  return this._upLevel;
@@ -510,7 +510,7 @@ class Ln extends ue {
510
510
  let a = i.getParent(), o = i;
511
511
  for (; a; ) {
512
512
  const u = a.getToken();
513
- if (u !== Ze && !pr(u) && a.getStartIndex() !== -1) {
513
+ if (u !== Ze && !Rr(u) && a.getStartIndex() !== -1) {
514
514
  const c = a.getChildren().indexOf(o);
515
515
  return {
516
516
  functionName: u,
@@ -542,14 +542,14 @@ class Ln extends ue {
542
542
  return c;
543
543
  }
544
544
  sequenceNodesBuilder(e) {
545
- const t = Kr.get(e);
545
+ const t = qr.get(e);
546
546
  if (t)
547
547
  return [...t];
548
548
  const s = this._getSequenceArray(e);
549
549
  if (s.length === 0)
550
550
  return;
551
551
  const i = this.getSequenceNode(s);
552
- return Kr.set(e, [...i]), i;
552
+ return qr.set(e, [...i]), i;
553
553
  }
554
554
  convertRefersToAbsolute(e, t, s) {
555
555
  const i = this.sequenceNodesBuilder(e);
@@ -563,13 +563,13 @@ class Ln extends ue {
563
563
  const { token: l, endIndex: d } = c, m = nt(l);
564
564
  if (m == null)
565
565
  continue;
566
- const { range: _, sheetName: C, unitId: y } = m, S = {
566
+ const { range: _, sheetName: C, unitId: E } = m, S = {
567
567
  ..._,
568
568
  startAbsoluteRefType: t,
569
569
  endAbsoluteRefType: s
570
- }, L = Bt({
570
+ }, L = Ot({
571
571
  range: S,
572
- unitId: y,
572
+ unitId: E,
573
573
  sheetName: C
574
574
  }), V = L.length - l.length;
575
575
  i[o] = {
@@ -597,15 +597,15 @@ class Ln extends ue {
597
597
  continue;
598
598
  }
599
599
  const { token: d } = l, m = nt(d), { sheetName: _, unitId: C } = m;
600
- let y = m.range;
601
- if (!i && y.startAbsoluteRefType === _e.ALL && y.endAbsoluteRefType === _e.ALL) {
600
+ let E = m.range;
601
+ if (!i && E.startAbsoluteRefType === _e.ALL && E.endAbsoluteRefType === _e.ALL) {
602
602
  o.push(l);
603
603
  continue;
604
604
  } else
605
- y = xs(y, t, s, i);
605
+ E = xs(E, t, s, i);
606
606
  let S = "";
607
- Ai(y) ? S = Bt({
608
- range: y,
607
+ Ai(E) ? S = Ot({
608
+ range: E,
609
609
  unitId: C,
610
610
  sheetName: _
611
611
  }) : S = f.REF, o.push({
@@ -625,21 +625,21 @@ class Ln extends ue {
625
625
  continue;
626
626
  }
627
627
  let d = (u == null ? void 0 : u.segment) || "", m = i - d.length, _ = i - 1, C = i - 1;
628
- if (i === a - 1 && this._isLastMergeString(l) && (d += l, _ += 1), d === "" || gr.has(d)) {
628
+ if (i === a - 1 && this._isLastMergeString(l) && (d += l, _ += 1), d === "" || pr.has(d)) {
629
629
  t.push(l);
630
630
  continue;
631
631
  }
632
- const y = d.trim(), S = this._replacePrefixString(y);
633
- if (s === !0 && y[y.length - 1] === I.DOUBLE_QUOTATION)
632
+ const E = d.trim(), S = this._replacePrefixString(E);
633
+ if (s === !0 && E[E.length - 1] === I.DOUBLE_QUOTATION)
634
634
  s = !1, this._processPushSequenceNode(t, Ve.STRING, d, m, _, C);
635
635
  else if (new RegExp(sr).test(S) && fn(S)) {
636
- if (S.length !== y.length) {
637
- const L = y.length - S.length;
636
+ if (S.length !== E.length) {
637
+ const L = E.length - S.length;
638
638
  C += L, m += L, d = this._replacePrefixString(d);
639
639
  }
640
640
  this._processPushSequenceNode(t, Ve.REFERENCE, d, m, _, C);
641
641
  } else
642
- Qe.isStringNumber(y) ? this._processPushSequenceNode(t, Ve.NUMBER, d, m, _, C) : y.length > 0 && this._processPushSequenceNode(t, Ve.FUNCTION, d, m, _, C);
642
+ Qe.isStringNumber(E) ? this._processPushSequenceNode(t, Ve.NUMBER, d, m, _, C) : E.length > 0 && this._processPushSequenceNode(t, Ve.FUNCTION, d, m, _, C);
643
643
  (i !== a - 1 || !this._isLastMergeString(l)) && t.push(l);
644
644
  }
645
645
  return this._mergeSequenceNodeReference(t);
@@ -660,7 +660,7 @@ class Ln extends ue {
660
660
  return this._nodeMaker(e, void 0, t);
661
661
  }
662
662
  _isLastMergeString(e) {
663
- return e === I.DOUBLE_QUOTATION || Qe.isStringNumber(e) || !pr(e);
663
+ return e === I.DOUBLE_QUOTATION || Qe.isStringNumber(e) || !Rr(e);
664
664
  }
665
665
  /**
666
666
  * Merge array and handle ref operations
@@ -695,7 +695,7 @@ class Ln extends ue {
695
695
  let s = !1;
696
696
  for (let i = 0, a = e.length; i < a; i++) {
697
697
  const o = e[i];
698
- if (o === Mi && !s)
698
+ if (o === ki && !s)
699
699
  t.push(o);
700
700
  else {
701
701
  if (!s && (o === ye.AT || o === ye.MINUS))
@@ -710,7 +710,7 @@ class Ln extends ue {
710
710
  }
711
711
  treeBuilder(e, t = !0, s, i) {
712
712
  if (t === !0) {
713
- const m = Gr.get(e), _ = i == null ? void 0 : i(e);
713
+ const m = Kr.get(e), _ = i == null ? void 0 : i(e);
714
714
  if (m && !_)
715
715
  return m;
716
716
  }
@@ -730,7 +730,7 @@ class Ln extends ue {
730
730
  if (d && (this._currentLexerNode = d), t) {
731
731
  if (!this._suffixExpressionHandler(this._currentLexerNode))
732
732
  return f.VALUE;
733
- Gr.set(e, this._currentLexerNode);
733
+ Kr.set(e, this._currentLexerNode);
734
734
  }
735
735
  return u && this._currentLexerNode.setDefinedNames(l), this._currentLexerNode;
736
736
  }
@@ -757,7 +757,7 @@ class Ln extends ue {
757
757
  const d = (o = a[a.length - 1]) == null ? void 0 : o.trim();
758
758
  if (!d || d === I.OPEN_BRACKET)
759
759
  break;
760
- const m = gr.get(d), _ = gr.get(l);
760
+ const m = pr.get(d), _ = pr.get(l);
761
761
  if (!m || !_)
762
762
  break;
763
763
  if (_ >= m)
@@ -981,7 +981,7 @@ class Ln extends ue {
981
981
  let i = s[++t];
982
982
  for (; i === " "; )
983
983
  i = s[++t];
984
- return !!pr(i);
984
+ return !!Rr(i);
985
985
  }
986
986
  // eslint-disable-next-line max-lines-per-function, complexity
987
987
  _nodeMaker(e, t, s) {
@@ -1061,7 +1061,7 @@ class Ln extends ue {
1061
1061
  this._newAndPushCurrentLexerNode(Ze, u);
1062
1062
  } else {
1063
1063
  const d = new K();
1064
- d.setToken(zi);
1064
+ d.setToken(Hi);
1065
1065
  const m = new K();
1066
1066
  m.setToken(Ze), m.changeToParent(d);
1067
1067
  const _ = this._currentLexerNode.getParent();
@@ -1086,24 +1086,24 @@ class Ln extends ue {
1086
1086
  m.setToken(Ze), m.setParent(l), l.getChildren().push(d, m);
1087
1087
  let _ = l, C = 0;
1088
1088
  if (this._segmentCount() > 0) {
1089
- let y, S, L = 0;
1089
+ let E, S, L = 0;
1090
1090
  const V = this._segment.trim(), M = V[0], H = V[1];
1091
- if (M === ye.MINUS && (y = new K(), y.setToken(ye.MINUS), L++), (M === ye.AT || H === ye.AT) && (S = new K(), S.setToken(ye.AT), y && (y.addChildren(S), S.setParent(y)), L++), L > 0 && (this._segment = V.slice(L)), C = L, S)
1091
+ if (M === ye.MINUS && (E = new K(), E.setToken(ye.MINUS), L++), (M === ye.AT || H === ye.AT) && (S = new K(), S.setToken(ye.AT), E && (E.addChildren(S), S.setParent(E)), L++), L > 0 && (this._segment = V.slice(L)), C = L, S)
1092
1092
  if (S.addChildren(l), l.setParent(S), S.getParent()) {
1093
1093
  const ge = S.getParent();
1094
1094
  ge && (_ = ge);
1095
1095
  } else
1096
1096
  _ = S;
1097
1097
  else
1098
- y && (_ = y, y.addChildren(l), l.setParent(y));
1098
+ E && (_ = E, E.addChildren(l), l.setParent(E));
1099
1099
  const de = new K();
1100
1100
  de.setToken(this._segment), de.setParent(d), d.getChildren().push(de), this._resetSegment();
1101
1101
  } else {
1102
- const y = this._getLastChildCurrentLexerNode();
1103
- y && y.changeToParent(d);
1102
+ const E = this._getLastChildCurrentLexerNode();
1103
+ E && E.changeToParent(d);
1104
1104
  }
1105
1105
  this._setCurrentLexerNode(_), this._currentLexerNode = m, this._openColon(C);
1106
- } else if (Fi.has(c) && this._checkSimilarErrorToken(c, u, a) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose()) {
1106
+ } else if (Mi.has(c) && this._checkSimilarErrorToken(c, u, a) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose()) {
1107
1107
  this._pushNodeToChildren(this._segment);
1108
1108
  const l = new K();
1109
1109
  l.setToken(c);
@@ -1153,7 +1153,7 @@ class Ln extends ue {
1153
1153
  });
1154
1154
  }
1155
1155
  }
1156
- class Mr extends ue {
1156
+ class kr extends ue {
1157
1157
  constructor() {
1158
1158
  super(...arguments);
1159
1159
  D(this, "pattern", "");
@@ -1190,8 +1190,8 @@ class Mr extends ue {
1190
1190
  return !1;
1191
1191
  }
1192
1192
  }
1193
- var St = /* @__PURE__ */ ((n) => (n.FALSE = "FALSE", n.TRUE = "TRUE", n))(St || {}), bt = /* @__PURE__ */ ((n) => (n[n.SUCCESS = 0] = "SUCCESS", n[n.ERROR = 1] = "ERROR", n))(bt || {}), Et = /* @__PURE__ */ ((n) => (n.ALL = "#All", n.DATA = "#Data", n.HEADERS = "#Headers", n.TOTALS = "#Totals", n))(Et || {}), je = /* @__PURE__ */ ((n) => (n[n.FRONT = 0] = "FRONT", n[n.BACK = 1] = "BACK", n))(je || {});
1194
- class ra {
1193
+ var At = /* @__PURE__ */ ((n) => (n.FALSE = "FALSE", n.TRUE = "TRUE", n))(At || {}), bt = /* @__PURE__ */ ((n) => (n[n.SUCCESS = 0] = "SUCCESS", n[n.ERROR = 1] = "ERROR", n))(bt || {}), Et = /* @__PURE__ */ ((n) => (n.ALL = "#All", n.DATA = "#Data", n.HEADERS = "#Headers", n.TOTALS = "#Totals", n))(Et || {}), je = /* @__PURE__ */ ((n) => (n[n.FRONT = 0] = "FRONT", n[n.BACK = 1] = "BACK", n))(je || {});
1194
+ class na {
1195
1195
  constructor() {
1196
1196
  /**
1197
1197
  * {
@@ -1270,22 +1270,22 @@ class ra {
1270
1270
  this._cache.clear(), this._continueBuildingCache.clear();
1271
1271
  }
1272
1272
  }
1273
- const ut = new ra();
1273
+ const ut = new na();
1274
1274
  var tt = /* @__PURE__ */ ((n) => (n[n.MIN = 0] = "MIN", n[n.MAX = 1] = "MAX", n))(tt || {}), Pe = /* @__PURE__ */ ((n) => (n[n.NORMAL = 0] = "NORMAL", n[n.MIN = 1] = "MIN", n[n.MAX = 2] = "MAX", n))(Pe || {});
1275
1275
  function rs() {
1276
1276
  return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (n, r) => n.localeCompare(r);
1277
1277
  }
1278
- function na(n) {
1278
+ function sa(n) {
1279
1279
  return n.indexOf("*") > -1 || n.indexOf("?") > -1;
1280
1280
  }
1281
1281
  function ns(n, r) {
1282
- const e = ia(r).replace(/~?[*?]/g, (s) => s.startsWith("~") ? `\\${s.substring(1)}` : s === "*" ? ".*" : s === "?" ? "." : s);
1282
+ const e = aa(r).replace(/~?[*?]/g, (s) => s.startsWith("~") ? `\\${s.substring(1)}` : s === "*" ? ".*" : s === "?" ? "." : s);
1283
1283
  return new RegExp(`^${e}$`).test(n);
1284
1284
  }
1285
1285
  function ss(n) {
1286
1286
  return n.replace(/~?[*?]/g, (r) => r.startsWith("~") ? r.substring(1) : " ");
1287
1287
  }
1288
- function sa(n, r, e) {
1288
+ function ia(n, r, e) {
1289
1289
  let t = !1;
1290
1290
  switch (e) {
1291
1291
  case B.EQUALS:
@@ -1302,10 +1302,10 @@ function sa(n, r, e) {
1302
1302
  }
1303
1303
  return t;
1304
1304
  }
1305
- function ia(n) {
1305
+ function aa(n) {
1306
1306
  return n.replace(/[.+^${}()|[\]\\]/g, "\\$&");
1307
1307
  }
1308
- class dt extends Mr {
1308
+ class dt extends kr {
1309
1309
  constructor(r) {
1310
1310
  super(), this._rawValue = r;
1311
1311
  }
@@ -1586,7 +1586,7 @@ class dt extends Mr {
1586
1586
  return h.create(f.VALUE);
1587
1587
  }
1588
1588
  }
1589
- const aa = 1e3, is = new wt(aa);
1589
+ const oa = 1e3, is = new xt(oa);
1590
1590
  class h extends dt {
1591
1591
  constructor(r, e = "") {
1592
1592
  super(r), this._errorType = r, this._errorContent = e;
@@ -1614,7 +1614,7 @@ class h extends dt {
1614
1614
  return !0;
1615
1615
  }
1616
1616
  }
1617
- var oa = 20, ua = 1, At = 1e6, as = 1e6, ca = -7, la = 21, fa = !1, ir = "[big.js] ", xt = ir + "Invalid ", kr = xt + "decimal places", ha = xt + "rounding mode", Hs = ir + "Division by zero", fe = {}, ze = void 0, da = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
1617
+ var ua = 20, ca = 1, Lt = 1e6, as = 1e6, la = -7, fa = 21, ha = !1, ir = "[big.js] ", Pt = ir + "Invalid ", $r = Pt + "decimal places", da = Pt + "rounding mode", Hs = ir + "Division by zero", fe = {}, ze = void 0, ma = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
1618
1618
  function Is() {
1619
1619
  function n(r) {
1620
1620
  var e = this;
@@ -1625,19 +1625,19 @@ function Is() {
1625
1625
  else {
1626
1626
  if (typeof r != "string") {
1627
1627
  if (n.strict === !0 && typeof r != "bigint")
1628
- throw TypeError(xt + "value");
1628
+ throw TypeError(Pt + "value");
1629
1629
  r = r === 0 && 1 / r < 0 ? "-0" : String(r);
1630
1630
  }
1631
- ma(e, r);
1631
+ ga(e, r);
1632
1632
  }
1633
1633
  e.constructor = n;
1634
1634
  }
1635
- return n.prototype = fe, n.DP = oa, n.RM = ua, n.NE = ca, n.PE = la, n.strict = fa, n.roundDown = 0, n.roundHalfUp = 1, n.roundHalfEven = 2, n.roundUp = 3, n;
1635
+ return n.prototype = fe, n.DP = ua, n.RM = ca, n.NE = la, n.PE = fa, n.strict = ha, n.roundDown = 0, n.roundHalfUp = 1, n.roundHalfEven = 2, n.roundUp = 3, n;
1636
1636
  }
1637
- function ma(n, r) {
1637
+ function ga(n, r) {
1638
1638
  var e, t, s;
1639
- if (!da.test(r))
1640
- throw Error(xt + "number");
1639
+ if (!ma.test(r))
1640
+ throw Error(Pt + "number");
1641
1641
  for (n.s = r.charAt(0) == "-" ? (r = r.slice(1), -1) : 1, (e = r.indexOf(".")) > -1 && (r = r.replace(".", "")), (t = r.search(/e/i)) > 0 ? (e < 0 && (e = t), e += +r.slice(t + 1), r = r.substring(0, t)) : e < 0 && (e = r.length), s = r.length, t = 0; t < s && r.charAt(t) == "0"; )
1642
1642
  ++t;
1643
1643
  if (t == s)
@@ -1650,10 +1650,10 @@ function ma(n, r) {
1650
1650
  }
1651
1651
  return n;
1652
1652
  }
1653
- function Pt(n, r, e, t) {
1653
+ function Vt(n, r, e, t) {
1654
1654
  var s = n.c;
1655
1655
  if (e === ze && (e = n.constructor.RM), e !== 0 && e !== 1 && e !== 2 && e !== 3)
1656
- throw Error(ha);
1656
+ throw Error(da);
1657
1657
  if (r < 1)
1658
1658
  t = e === 3 && (t || !!s[0]) || r === 0 && (e === 1 && s[0] >= 5 || e === 2 && (s[0] > 5 || s[0] === 5 && (t || s[1] !== ze))), s.length = 1, t ? (n.e = n.e - r + 1, s[0] = 1) : s[0] = n.e = 0;
1659
1659
  else if (r < s.length) {
@@ -1706,42 +1706,42 @@ fe.cmp = function(n) {
1706
1706
  };
1707
1707
  fe.div = function(n) {
1708
1708
  var r = this, e = r.constructor, t = r.c, s = (n = new e(n)).c, i = r.s == n.s ? 1 : -1, a = e.DP;
1709
- if (a !== ~~a || a < 0 || a > At)
1710
- throw Error(kr);
1709
+ if (a !== ~~a || a < 0 || a > Lt)
1710
+ throw Error($r);
1711
1711
  if (!s[0])
1712
1712
  throw Error(Hs);
1713
1713
  if (!t[0])
1714
1714
  return n.s = i, n.c = [n.e = 0], n;
1715
- var o, u, c, l, d, m = s.slice(), _ = o = s.length, C = t.length, y = t.slice(0, o), S = y.length, L = n, V = L.c = [], M = 0, H = a + (L.e = r.e - n.e) + 1;
1715
+ var o, u, c, l, d, m = s.slice(), _ = o = s.length, C = t.length, E = t.slice(0, o), S = E.length, L = n, V = L.c = [], M = 0, H = a + (L.e = r.e - n.e) + 1;
1716
1716
  for (L.s = i, i = H < 0 ? 0 : H, m.unshift(0); S++ < o; )
1717
- y.push(0);
1717
+ E.push(0);
1718
1718
  do {
1719
1719
  for (c = 0; c < 10; c++) {
1720
- if (o != (S = y.length))
1720
+ if (o != (S = E.length))
1721
1721
  l = o > S ? 1 : -1;
1722
1722
  else
1723
1723
  for (d = -1, l = 0; ++d < o; )
1724
- if (s[d] != y[d]) {
1725
- l = s[d] > y[d] ? 1 : -1;
1724
+ if (s[d] != E[d]) {
1725
+ l = s[d] > E[d] ? 1 : -1;
1726
1726
  break;
1727
1727
  }
1728
1728
  if (l < 0) {
1729
1729
  for (u = S == o ? s : m; S; ) {
1730
- if (y[--S] < u[S]) {
1731
- for (d = S; d && !y[--d]; )
1732
- y[d] = 9;
1733
- --y[d], y[S] += 10;
1730
+ if (E[--S] < u[S]) {
1731
+ for (d = S; d && !E[--d]; )
1732
+ E[d] = 9;
1733
+ --E[d], E[S] += 10;
1734
1734
  }
1735
- y[S] -= u[S];
1735
+ E[S] -= u[S];
1736
1736
  }
1737
- for (; !y[0]; )
1738
- y.shift();
1737
+ for (; !E[0]; )
1738
+ E.shift();
1739
1739
  } else
1740
1740
  break;
1741
1741
  }
1742
- V[M++] = l ? c : ++c, y[0] && l ? y[S] = t[_] || 0 : y = [t[_]];
1743
- } while ((_++ < C || y[0] !== ze) && i--);
1744
- return !V[0] && M != 1 && (V.shift(), L.e--, H--), M > H && Pt(L, H, e.RM, y[0] !== ze), L;
1742
+ V[M++] = l ? c : ++c, E[0] && l ? E[S] = t[_] || 0 : E = [t[_]];
1743
+ } while ((_++ < C || E[0] !== ze) && i--);
1744
+ return !V[0] && M != 1 && (V.shift(), L.e--, H--), M > H && Vt(L, H, e.RM, E[0] !== ze), L;
1745
1745
  };
1746
1746
  fe.eq = function(n) {
1747
1747
  return this.cmp(n) === 0;
@@ -1823,22 +1823,22 @@ fe.plus = fe.add = function(n) {
1823
1823
  fe.pow = function(n) {
1824
1824
  var r = this, e = new r.constructor("1"), t = e, s = n < 0;
1825
1825
  if (n !== ~~n || n < -as || n > as)
1826
- throw Error(xt + "exponent");
1826
+ throw Error(Pt + "exponent");
1827
1827
  for (s && (n = -n); n & 1 && (t = t.times(r)), n >>= 1, !!n; )
1828
1828
  r = r.times(r);
1829
1829
  return s ? e.div(t) : t;
1830
1830
  };
1831
1831
  fe.prec = function(n, r) {
1832
- if (n !== ~~n || n < 1 || n > At)
1833
- throw Error(xt + "precision");
1834
- return Pt(new this.constructor(this), n, r);
1832
+ if (n !== ~~n || n < 1 || n > Lt)
1833
+ throw Error(Pt + "precision");
1834
+ return Vt(new this.constructor(this), n, r);
1835
1835
  };
1836
1836
  fe.round = function(n, r) {
1837
1837
  if (n === ze)
1838
1838
  n = 0;
1839
- else if (n !== ~~n || n < -At || n > At)
1840
- throw Error(kr);
1841
- return Pt(new this.constructor(this), n + this.e + 1, r);
1839
+ else if (n !== ~~n || n < -Lt || n > Lt)
1840
+ throw Error($r);
1841
+ return Vt(new this.constructor(this), n + this.e + 1, r);
1842
1842
  };
1843
1843
  fe.sqrt = function() {
1844
1844
  var n, r, e, t = this, s = t.constructor, i = t.s, a = t.e, o = new s("0.5");
@@ -1850,7 +1850,7 @@ fe.sqrt = function() {
1850
1850
  do
1851
1851
  e = n, n = o.times(e.plus(t.div(e)));
1852
1852
  while (e.c.slice(0, a).join("") !== n.c.slice(0, a).join(""));
1853
- return Pt(n, (s.DP -= 4) + n.e + 1, s.RM);
1853
+ return Vt(n, (s.DP -= 4) + n.e + 1, s.RM);
1854
1854
  };
1855
1855
  fe.times = fe.mul = function(n) {
1856
1856
  var r, e = this, t = e.constructor, s = e.c, i = (n = new t(n)).c, a = s.length, o = i.length, u = e.e, c = n.e;
@@ -1870,9 +1870,9 @@ fe.times = fe.mul = function(n) {
1870
1870
  fe.toExponential = function(n, r) {
1871
1871
  var e = this, t = e.c[0];
1872
1872
  if (n !== ze) {
1873
- if (n !== ~~n || n < 0 || n > At)
1874
- throw Error(kr);
1875
- for (e = Pt(new e.constructor(e), ++n, r); e.c.length < n; )
1873
+ if (n !== ~~n || n < 0 || n > Lt)
1874
+ throw Error($r);
1875
+ for (e = Vt(new e.constructor(e), ++n, r); e.c.length < n; )
1876
1876
  e.c.push(0);
1877
1877
  }
1878
1878
  return Yt(e, !0, !!t);
@@ -1880,9 +1880,9 @@ fe.toExponential = function(n, r) {
1880
1880
  fe.toFixed = function(n, r) {
1881
1881
  var e = this, t = e.c[0];
1882
1882
  if (n !== ze) {
1883
- if (n !== ~~n || n < 0 || n > At)
1884
- throw Error(kr);
1885
- for (e = Pt(new e.constructor(e), n + e.e + 1, r), n = n + e.e + 1; e.c.length < n; )
1883
+ if (n !== ~~n || n < 0 || n > Lt)
1884
+ throw Error($r);
1885
+ for (e = Vt(new e.constructor(e), n + e.e + 1, r), n = n + e.e + 1; e.c.length < n; )
1886
1886
  e.c.push(0);
1887
1887
  }
1888
1888
  return Yt(e, !1, !!t);
@@ -1900,9 +1900,9 @@ fe.toNumber = function() {
1900
1900
  fe.toPrecision = function(n, r) {
1901
1901
  var e = this, t = e.constructor, s = e.c[0];
1902
1902
  if (n !== ze) {
1903
- if (n !== ~~n || n < 1 || n > At)
1904
- throw Error(xt + "precision");
1905
- for (e = Pt(new t(e), n, r); e.c.length < n; )
1903
+ if (n !== ~~n || n < 1 || n > Lt)
1904
+ throw Error(Pt + "precision");
1905
+ for (e = Vt(new t(e), n, r); e.c.length < n; )
1906
1906
  e.c.push(0);
1907
1907
  }
1908
1908
  return Yt(e, n <= e.e || e.e <= t.NE || e.e >= t.PE, !!s);
@@ -1960,9 +1960,9 @@ function ls(n, r) {
1960
1960
  function fs(n, r) {
1961
1961
  return n ** r;
1962
1962
  }
1963
- const Fr = class Fr extends dt {
1963
+ const Mr = class Mr extends dt {
1964
1964
  static create() {
1965
- return this._instance = this._instance || new Fr(0), this._instance;
1965
+ return this._instance = this._instance || new Mr(0), this._instance;
1966
1966
  }
1967
1967
  isNull() {
1968
1968
  return !0;
@@ -2076,16 +2076,16 @@ const Fr = class Fr extends dt {
2076
2076
  return Y.create(!1);
2077
2077
  }
2078
2078
  };
2079
- D(Fr, "_instance");
2080
- let oe = Fr;
2081
- const vt = class vt extends dt {
2079
+ D(Mr, "_instance");
2080
+ let oe = Mr;
2081
+ const Ut = class Ut extends dt {
2082
2082
  constructor(e) {
2083
2083
  super(e);
2084
2084
  D(this, "_value", !1);
2085
2085
  this._value = e;
2086
2086
  }
2087
2087
  static create(e) {
2088
- return e ? (this._instanceTrue = this._instanceTrue || new vt(!0), this._instanceTrue) : (this._instanceFalse = this._instanceFalse || new vt(!1), this._instanceFalse);
2088
+ return e ? (this._instanceTrue = this._instanceTrue || new Ut(!0), this._instanceTrue) : (this._instanceFalse = this._instanceFalse || new Ut(!1), this._instanceFalse);
2089
2089
  }
2090
2090
  getValue() {
2091
2091
  return this._value;
@@ -2194,27 +2194,27 @@ const vt = class vt extends dt {
2194
2194
  return this._convertTonNumber().ceil(e);
2195
2195
  }
2196
2196
  convertToNumberObjectValue() {
2197
- return Tr(this.getValue());
2197
+ return jr(this.getValue());
2198
2198
  }
2199
2199
  convertToBooleanObjectValue() {
2200
2200
  return this;
2201
2201
  }
2202
2202
  };
2203
- D(vt, "_instanceTrue"), D(vt, "_instanceFalse");
2204
- let Y = vt;
2205
- const ga = 2e5, hs = new wt(ga);
2203
+ D(Ut, "_instanceTrue"), D(Ut, "_instanceFalse");
2204
+ let Y = Ut;
2205
+ const pa = 2e5, hs = new xt(pa);
2206
2206
  class b extends dt {
2207
2207
  constructor(e) {
2208
2208
  super(e);
2209
2209
  D(this, "_value", 0);
2210
2210
  this._value = Number(e);
2211
2211
  }
2212
- static create(e, t = "") {
2213
- const s = `${e}-${t}`, i = hs.get(s);
2214
- if (i)
2215
- return i;
2216
- const a = new b(e);
2217
- return a.setPattern(t), hs.set(s, a), a;
2212
+ static create(e) {
2213
+ const t = `${e}`, s = hs.get(t);
2214
+ if (s)
2215
+ return s.setPattern(""), s;
2216
+ const i = new b(e);
2217
+ return hs.set(t, i), i;
2218
2218
  }
2219
2219
  getValue() {
2220
2220
  return this._value;
@@ -2590,7 +2590,7 @@ class b extends dt {
2590
2590
  return this;
2591
2591
  }
2592
2592
  convertToBooleanObjectValue() {
2593
- return $r(!0);
2593
+ return Tr(!0);
2594
2594
  }
2595
2595
  _compareInfinity(e, t, s) {
2596
2596
  let i = !1;
@@ -2617,7 +2617,7 @@ class b extends dt {
2617
2617
  return i;
2618
2618
  }
2619
2619
  }
2620
- const pa = 2e5, ds = new wt(pa);
2620
+ const Ra = 2e5, ds = new xt(Ra);
2621
2621
  class Ee extends dt {
2622
2622
  constructor(e) {
2623
2623
  super(e);
@@ -2650,7 +2650,7 @@ class Ee extends dt {
2650
2650
  const s = this.getValue();
2651
2651
  let i = !1;
2652
2652
  if (typeof e == "string") {
2653
- if (na(e))
2653
+ if (sa(e))
2654
2654
  return this._checkWildcard(e, t);
2655
2655
  switch (t) {
2656
2656
  case B.EQUALS:
@@ -2701,23 +2701,23 @@ class Ee extends dt {
2701
2701
  return Y.create(i);
2702
2702
  }
2703
2703
  convertToNumberObjectValue() {
2704
- return Tr(this.getValue());
2704
+ return jr(this.getValue());
2705
2705
  }
2706
2706
  convertToBooleanObjectValue() {
2707
2707
  return Y.create(!0);
2708
2708
  }
2709
2709
  _checkWildcard(e, t) {
2710
- const s = this.getValue().toLocaleLowerCase(), i = sa(s, e, t);
2710
+ const s = this.getValue().toLocaleLowerCase(), i = ia(s, e, t);
2711
2711
  return Y.create(i);
2712
2712
  }
2713
2713
  }
2714
- function $r(n) {
2714
+ function Tr(n) {
2715
2715
  if (typeof n == "boolean")
2716
2716
  return Y.create(n);
2717
2717
  let r = !1;
2718
2718
  if (typeof n == "string") {
2719
2719
  const e = n.toLocaleUpperCase();
2720
- e === St.TRUE ? r = !0 : e === St.FALSE && (r = !1);
2720
+ e === At.TRUE ? r = !0 : e === At.FALSE && (r = !1);
2721
2721
  } else
2722
2722
  n === 1 ? r = !0 : r = !1;
2723
2723
  return Y.create(r);
@@ -2726,7 +2726,7 @@ function xn(n) {
2726
2726
  let r = n.toString();
2727
2727
  return r.charAt(0) === '"' && r.charAt(r.length - 1) === '"' && (r = r.slice(1, -1), r = r.replace(/""/g, '"')), Ee.create(r);
2728
2728
  }
2729
- function Tr(n) {
2729
+ function jr(n) {
2730
2730
  if (typeof n == "boolean") {
2731
2731
  let r = 0;
2732
2732
  return n && (r = 1), b.create(r);
@@ -2738,22 +2738,22 @@ function Tr(n) {
2738
2738
  }
2739
2739
  return h.create(f.VALUE);
2740
2740
  }
2741
- function Ra(n) {
2741
+ function _a(n) {
2742
2742
  return "";
2743
2743
  }
2744
- function _a(n = []) {
2744
+ function Ea(n = []) {
2745
2745
  const r = [];
2746
2746
  for (let e = 0; e < n.length; e++) {
2747
2747
  const t = n[e];
2748
2748
  r[e] == null && (r[e] = []);
2749
2749
  for (let s = 0; s < t.length; s++) {
2750
2750
  const i = t[s];
2751
- r[e][s] = Lt.create(i);
2751
+ r[e][s] = wt.create(i);
2752
2752
  }
2753
2753
  }
2754
2754
  return r;
2755
2755
  }
2756
- function Ea(n = []) {
2756
+ function ya(n = []) {
2757
2757
  const r = [];
2758
2758
  for (let e = 0; e < n.length; e++) {
2759
2759
  const t = n[e];
@@ -2767,7 +2767,7 @@ function Ea(n = []) {
2767
2767
  }
2768
2768
  class Se extends dt {
2769
2769
  constructor(e) {
2770
- super(typeof e == "string" ? e : Ra());
2770
+ super(typeof e == "string" ? e : _a());
2771
2771
  D(this, "_values", []);
2772
2772
  D(this, "_rowCount", -1);
2773
2773
  D(this, "_columnCount", -1);
@@ -2996,14 +2996,14 @@ class Se extends dt {
2996
2996
  if (d != null)
2997
2997
  return d;
2998
2998
  const m = [], _ = this._values;
2999
- let C = 0, y = 0;
2999
+ let C = 0, E = 0;
3000
3000
  for (let M = s; M < i; M += a) {
3001
- y = 0, m[C] == null && (m[C] = []);
3001
+ E = 0, m[C] == null && (m[C] = []);
3002
3002
  for (let H = o; H < u; H += c) {
3003
3003
  if (!_[M])
3004
3004
  return;
3005
3005
  let de = _[M][H] || this._defaultValue;
3006
- de == null && (de = oe.create()), m[C][y] = de, y++;
3006
+ de == null && (de = oe.create()), m[C][E] = de, E++;
3007
3007
  }
3008
3008
  C++;
3009
3009
  }
@@ -3045,8 +3045,8 @@ class Se extends dt {
3045
3045
  const m = this._values[0].length;
3046
3046
  for (let _ = d - 1; _ >= 0; _--)
3047
3047
  for (let C = m - 1; C >= 0; C--) {
3048
- const y = this._values[_][C];
3049
- l(y, _, C);
3048
+ const E = this._values[_][C];
3049
+ l(E, _, C);
3050
3050
  }
3051
3051
  } else
3052
3052
  this.iterator((d, m, _) => {
@@ -3393,7 +3393,7 @@ class Se extends dt {
3393
3393
  return this.map((t) => t.isError() ? t : e.ceil(t));
3394
3394
  }
3395
3395
  toValue() {
3396
- return Ea(this._values);
3396
+ return ya(this._values);
3397
3397
  }
3398
3398
  _clearCache() {
3399
3399
  this._flattenCache = null, this._sliceCache.clear();
@@ -3456,23 +3456,23 @@ class Se extends dt {
3456
3456
  d + o - 1
3457
3457
  ), u === !0)) {
3458
3458
  if (a === B.EQUALS) {
3459
- const y = ut.getCellPositions(
3459
+ const E = ut.getCellPositions(
3460
3460
  c,
3461
3461
  l,
3462
3462
  t + m,
3463
3463
  e.getValue()
3464
3464
  );
3465
- y != null && y.forEach((S) => {
3465
+ E != null && E.forEach((S) => {
3466
3466
  const L = S - d;
3467
3467
  s[L] == null && (s[L] = []), s[L][t] = Y.create(!0);
3468
3468
  });
3469
3469
  } else {
3470
- const y = ut.getCellValuePositions(
3470
+ const E = ut.getCellValuePositions(
3471
3471
  c,
3472
3472
  l,
3473
3473
  t + m
3474
3474
  );
3475
- y != null && y.forEach((S, L) => {
3475
+ E != null && E.forEach((S, L) => {
3476
3476
  let V = oe.create();
3477
3477
  typeof L == "string" ? V = Ee.create(L) : typeof L == "number" ? V = b.create(L) : typeof L == "boolean" && (V = Y.create(L)), V.compare(e, a).getValue() === !0 && S.forEach((H) => {
3478
3478
  H >= d && H <= d + o - 1 && (s[H - d] == null && (s[H - d] = []), s[H - d][t] = Y.create(!0));
@@ -3481,69 +3481,69 @@ class Se extends dt {
3481
3481
  }
3482
3482
  return;
3483
3483
  }
3484
- for (let y = 0; y < o; y++) {
3485
- const S = (C = (_ = this._values) == null ? void 0 : _[y]) == null ? void 0 : C[t];
3486
- if (s[y] == null && (s[y] = []), S && e)
3484
+ for (let E = 0; E < o; E++) {
3485
+ const S = (C = (_ = this._values) == null ? void 0 : _[E]) == null ? void 0 : C[t];
3486
+ if (s[E] == null && (s[E] = []), S && e)
3487
3487
  if (S.isError())
3488
- s[y][t] = S;
3488
+ s[E][t] = S;
3489
3489
  else if (e.isError())
3490
- s[y][t] = e;
3490
+ s[E][t] = e;
3491
3491
  else
3492
3492
  switch (i) {
3493
3493
  case 1:
3494
- s[y][t] = S.plus(e);
3494
+ s[E][t] = S.plus(e);
3495
3495
  break;
3496
3496
  case 0:
3497
- s[y][t] = S.minus(e);
3497
+ s[E][t] = S.minus(e);
3498
3498
  break;
3499
3499
  case 2:
3500
- s[y][t] = S.multiply(e);
3500
+ s[E][t] = S.multiply(e);
3501
3501
  break;
3502
3502
  case 3:
3503
- s[y][t] = S.divided(e);
3503
+ s[E][t] = S.divided(e);
3504
3504
  break;
3505
3505
  case 4:
3506
- s[y][t] = S.mod(e);
3506
+ s[E][t] = S.mod(e);
3507
3507
  break;
3508
3508
  case 5:
3509
- a ? s[y][t] = S.compare(e, a) : s[y][t] = h.create(f.VALUE);
3509
+ a ? s[E][t] = S.compare(e, a) : s[E][t] = h.create(f.VALUE);
3510
3510
  break;
3511
3511
  case 6:
3512
- s[y][t] = S.concatenateFront(e);
3512
+ s[E][t] = S.concatenateFront(e);
3513
3513
  break;
3514
3514
  case 7:
3515
- s[y][t] = S.concatenateBack(e);
3515
+ s[E][t] = S.concatenateBack(e);
3516
3516
  break;
3517
3517
  case 8:
3518
- s[y][t] = S.pow(e);
3518
+ s[E][t] = S.pow(e);
3519
3519
  break;
3520
3520
  case 9:
3521
- s[y][t] = S.round(e);
3521
+ s[E][t] = S.round(e);
3522
3522
  break;
3523
3523
  case 10:
3524
- s[y][t] = S.floor(e);
3524
+ s[E][t] = S.floor(e);
3525
3525
  break;
3526
3526
  case 12:
3527
- s[y][t] = S.atan2(e);
3527
+ s[E][t] = S.atan2(e);
3528
3528
  break;
3529
3529
  case 11:
3530
- s[y][t] = S.ceil(e);
3530
+ s[E][t] = S.ceil(e);
3531
3531
  break;
3532
3532
  }
3533
3533
  else
3534
- s[y][t] = h.create(f.NA);
3534
+ s[E][t] = h.create(f.NA);
3535
3535
  S != null && (S.isError() ? ut.set(
3536
3536
  c,
3537
3537
  l,
3538
3538
  t + m,
3539
3539
  S.getErrorType(),
3540
- y + d
3541
- ) : S.isNull() ? ut.set(c, l, t + m, null, y + d) : ut.set(
3540
+ E + d
3541
+ ) : S.isNull() ? ut.set(c, l, t + m, null, E + d) : ut.set(
3542
3542
  c,
3543
3543
  l,
3544
3544
  t + m,
3545
3545
  S.getValue(),
3546
- y + d
3546
+ E + d
3547
3547
  ));
3548
3548
  }
3549
3549
  ut.setContinueBuildingCache(
@@ -3555,7 +3555,7 @@ class Se extends dt {
3555
3555
  );
3556
3556
  }
3557
3557
  _batchOperatorArray(e, t, s) {
3558
- var d, m, _, C, y, S, L, V, M, H, de, ge;
3558
+ var d, m, _, C, E, S, L, V, M, H, de, ge;
3559
3559
  let i = e.getRowCount(), a = e.getColumnCount();
3560
3560
  i < this._rowCount && (i = this._rowCount), a < this._columnCount && (a = this._columnCount);
3561
3561
  const o = [], u = e.getArrayValue(), c = this._checkArrayCalculateType(this), l = this._checkArrayCalculateType(e);
@@ -3563,7 +3563,7 @@ class Se extends dt {
3563
3563
  const ee = [];
3564
3564
  for (let Z = 0; Z < a; Z++) {
3565
3565
  let se;
3566
- c === 3 ? se = (m = (d = this._values) == null ? void 0 : d[0]) == null ? void 0 : m[0] : c === 1 ? se = (C = (_ = this._values) == null ? void 0 : _[0]) == null ? void 0 : C[Z] : c === 2 ? se = (S = (y = this._values) == null ? void 0 : y[pe]) == null ? void 0 : S[0] : se = (V = (L = this._values) == null ? void 0 : L[pe]) == null ? void 0 : V[Z];
3566
+ c === 3 ? se = (m = (d = this._values) == null ? void 0 : d[0]) == null ? void 0 : m[0] : c === 1 ? se = (C = (_ = this._values) == null ? void 0 : _[0]) == null ? void 0 : C[Z] : c === 2 ? se = (S = (E = this._values) == null ? void 0 : E[pe]) == null ? void 0 : S[0] : se = (V = (L = this._values) == null ? void 0 : L[pe]) == null ? void 0 : V[Z];
3567
3567
  let G;
3568
3568
  if (l === 3 ? G = (M = u == null ? void 0 : u[0]) == null ? void 0 : M[0] : l === 1 ? G = (H = u == null ? void 0 : u[0]) == null ? void 0 : H[Z] : l === 2 ? G = (de = u == null ? void 0 : u[pe]) == null ? void 0 : de[0] : G = (ge = u == null ? void 0 : u[pe]) == null ? void 0 : ge[Z], se && G)
3569
3569
  if (se.isError())
@@ -3634,7 +3634,7 @@ class Se extends dt {
3634
3634
  const d = [];
3635
3635
  for (let m = 0; m < l; m++) {
3636
3636
  const _ = c[m].trim();
3637
- d.push(Lt.create(_));
3637
+ d.push(wt.create(_));
3638
3638
  }
3639
3639
  i.push(d);
3640
3640
  }
@@ -3654,7 +3654,7 @@ class Se extends dt {
3654
3654
  return Se.create(o);
3655
3655
  }
3656
3656
  }
3657
- class Lt {
3657
+ class wt {
3658
3658
  static create(r) {
3659
3659
  if (r == null)
3660
3660
  return oe.create();
@@ -3662,12 +3662,12 @@ class Lt {
3662
3662
  return Y.create(r);
3663
3663
  if (typeof r == "string") {
3664
3664
  const e = r.toLocaleUpperCase().trim();
3665
- return rr.has(e) ? h.create(e) : e === St.TRUE || e === St.FALSE ? $r(r) : pn(r) ? b.create(Number(r)) : new RegExp(Wi, "g").test(r.replace(/\n/g, "").replace(/\r/g, "")) ? Se.create(r.replace(/\n/g, "").replace(/\r/g, "")) : xn(r);
3665
+ return rr.has(e) ? h.create(e) : e === At.TRUE || e === At.FALSE ? Tr(r) : pn(r) ? b.create(Number(r)) : new RegExp(Xi, "g").test(r.replace(/\n/g, "").replace(/\r/g, "")) ? Se.create(r.replace(/\n/g, "").replace(/\r/g, "")) : xn(r);
3666
3666
  }
3667
- return typeof r == "number" ? Tr(r) : h.create(f.VALUE);
3667
+ return typeof r == "number" ? jr(r) : h.create(f.VALUE);
3668
3668
  }
3669
3669
  }
3670
- function ya(n) {
3670
+ function Da(n) {
3671
3671
  if (n === null)
3672
3672
  return 0;
3673
3673
  if (n != null && n.p) {
@@ -3679,8 +3679,8 @@ function ya(n) {
3679
3679
  }
3680
3680
  return (n == null ? void 0 : n.v) || 0;
3681
3681
  }
3682
- const Da = 1e5, hn = new wt(Da);
3683
- class ar extends Mr {
3682
+ const Ca = 1e5, hn = new xt(Ca);
3683
+ class ar extends kr {
3684
3684
  constructor(e) {
3685
3685
  super();
3686
3686
  D(this, "_forcedSheetId", "");
@@ -3749,7 +3749,7 @@ class ar extends Mr {
3749
3749
  return e(h.create(f.REF), c, l);
3750
3750
  const d = this.getCellData(c, l);
3751
3751
  let m = !1;
3752
- if (mr(d)) {
3752
+ if (gr(d)) {
3753
3753
  m = e(null, c, l);
3754
3754
  continue;
3755
3755
  }
@@ -3900,8 +3900,8 @@ class ar extends Mr {
3900
3900
  };
3901
3901
  }
3902
3902
  getCellValueObject(e) {
3903
- const t = ya(e);
3904
- return rr.has(t) ? h.create(t) : e.t === Ne.NUMBER ? Tr(t) : e.t === Ne.STRING || e.t === Ne.FORCE_STRING ? xn(t) : e.t === Ne.BOOLEAN ? $r(t) : Lt.create(t);
3903
+ const t = Da(e);
3904
+ return rr.has(t) ? h.create(t) : e.t === Ne.NUMBER ? jr(t) : e.t === Ne.STRING || e.t === Ne.FORCE_STRING ? xn(t) : e.t === Ne.BOOLEAN ? Tr(t) : wt.create(t);
3905
3905
  }
3906
3906
  getCellByRow(e) {
3907
3907
  return this.getCellByPosition(e);
@@ -3977,9 +3977,9 @@ class ar extends Mr {
3977
3977
  if (c < 0 || l < 0)
3978
3978
  return this._getBlankArrayValueObject();
3979
3979
  const d = new Array(c);
3980
- this.iterator((y, S, L) => {
3980
+ this.iterator((E, S, L) => {
3981
3981
  const V = S - t, M = L - i;
3982
- d[V] || (d[V] = new Array(l)), y == null && (y = oe.create()), d[V][M] = y;
3982
+ d[V] || (d[V] = new Array(l)), E == null && (E = oe.create()), d[V][M] = E;
3983
3983
  });
3984
3984
  const m = {
3985
3985
  calculateValueList: d,
@@ -4015,7 +4015,7 @@ class ar extends Mr {
4015
4015
  return Se.create(e);
4016
4016
  }
4017
4017
  }
4018
- class Ca extends Mr {
4018
+ class ba extends kr {
4019
4019
  constructor(r) {
4020
4020
  super(), this._promise = r;
4021
4021
  }
@@ -4026,7 +4026,7 @@ class Ca extends Mr {
4026
4026
  return this._promise;
4027
4027
  }
4028
4028
  }
4029
- class ba extends Mr {
4029
+ class Sa extends kr {
4030
4030
  constructor(r) {
4031
4031
  super(), this._promiseList = r;
4032
4032
  }
@@ -4056,7 +4056,7 @@ class ba extends Mr {
4056
4056
  return Se.create(e);
4057
4057
  }
4058
4058
  }
4059
- class Lr extends ar {
4059
+ class wr extends ar {
4060
4060
  constructor(r, e, t) {
4061
4061
  super(""), this.setRangeData(r), e && this.setForcedSheetIdDirect(e), t && this.setForcedUnitIdDirect(t);
4062
4062
  }
@@ -4072,7 +4072,7 @@ function gs(n, r) {
4072
4072
  }
4073
4073
  return Number(n) - 1;
4074
4074
  }
4075
- function qr(n, r = 0, e = 0) {
4075
+ function Zr(n, r = 0, e = 0) {
4076
4076
  n = n.toLocaleUpperCase();
4077
4077
  const t = n.split(/[RC]/), s = t[1], i = t[2], a = gs(s, r), o = gs(i, e);
4078
4078
  return {
@@ -4081,10 +4081,10 @@ function qr(n, r = 0, e = 0) {
4081
4081
  absoluteRefType: _e.NONE
4082
4082
  };
4083
4083
  }
4084
- function Sa(n, r = 0, e = 0) {
4084
+ function Aa(n, r = 0, e = 0) {
4085
4085
  const { refBody: t, sheetName: s, unitId: i } = Qs(n), a = t.indexOf(":");
4086
4086
  if (a === -1) {
4087
- const y = qr(t, r, e), S = y.row, L = y.column, V = y.absoluteRefType;
4087
+ const E = Zr(t, r, e), S = E.row, L = E.column, V = E.absoluteRefType;
4088
4088
  return {
4089
4089
  unitId: i,
4090
4090
  sheetName: s,
@@ -4098,7 +4098,7 @@ function Sa(n, r = 0, e = 0) {
4098
4098
  }
4099
4099
  };
4100
4100
  }
4101
- const o = t.substring(0, a), u = t.substring(a + 1), c = qr(o, r, e), l = qr(u, r, e), d = c.row, m = c.column, _ = l.row, C = l.column;
4101
+ const o = t.substring(0, a), u = t.substring(a + 1), c = Zr(o, r, e), l = Zr(u, r, e), d = c.row, m = c.column, _ = l.row, C = l.column;
4102
4102
  return {
4103
4103
  unitId: i,
4104
4104
  sheetName: s,
@@ -4112,7 +4112,7 @@ function Sa(n, r = 0, e = 0) {
4112
4112
  }
4113
4113
  };
4114
4114
  }
4115
- function Aa(n) {
4115
+ function La(n) {
4116
4116
  const r = lr(n.startRow, n.startAbsoluteRefType, !0), e = lr(n.startColumn, n.startAbsoluteRefType, !1), t = lr(n.endRow, n.endAbsoluteRefType, !0), s = lr(n.endColumn, n.endAbsoluteRefType, !1);
4117
4117
  return r === t && e === s ? `R${r}C${e}` : `R${r}C${e}:R${t}C${s}`;
4118
4118
  }
@@ -4128,9 +4128,9 @@ function lr(n, r = _e.ALL, e) {
4128
4128
  return `[${n}]`;
4129
4129
  }
4130
4130
  }
4131
- const La = [];
4132
- var wa = /* @__PURE__ */ ((n) => n)(wa || {});
4133
- function xa(n) {
4131
+ const wa = [];
4132
+ var xa = /* @__PURE__ */ ((n) => n)(xa || {});
4133
+ function Pa(n) {
4134
4134
  const r = n.getValue();
4135
4135
  let e = 0;
4136
4136
  return r && (e = 1), b.create(e);
@@ -4267,7 +4267,7 @@ class Pn extends ar {
4267
4267
  return t > i ? (o.startRow = i, o.endRow = t) : (o.startRow = t, o.endRow = i), s > a ? (o.startColumn = a, o.endColumn = s) : (o.startColumn = s, o.endColumn = a), r.startAbsoluteRefType && (o.startAbsoluteRefType = r.startAbsoluteRefType), e.startAbsoluteRefType && (o.endAbsoluteRefType = e.startAbsoluteRefType), o;
4268
4268
  }
4269
4269
  _createRange(r) {
4270
- const e = new Lr(
4270
+ const e = new wr(
4271
4271
  r,
4272
4272
  this.getForcedSheetId(),
4273
4273
  this.getForcedUnitId()
@@ -4349,6 +4349,14 @@ class k extends ue {
4349
4349
  * Whether the function needs to pass in reference object
4350
4350
  */
4351
4351
  D(this, "needsReferenceObject", !1);
4352
+ /**
4353
+ * Minimum number of parameters
4354
+ */
4355
+ D(this, "minParams", -1);
4356
+ /**
4357
+ * Maximum number of parameters
4358
+ */
4359
+ D(this, "maxParams", -1);
4352
4360
  this._name = e;
4353
4361
  }
4354
4362
  get name() {
@@ -4532,20 +4540,20 @@ class k extends ue {
4532
4540
  return Nt(s, 1, s[0].length);
4533
4541
  }
4534
4542
  _includingLogicalValuesAndText(e) {
4535
- if (e.isBoolean() && (e = xa(e)), e.isString()) {
4543
+ if (e.isBoolean() && (e = Pa(e)), e.isString()) {
4536
4544
  const t = Number(e.getValue());
4537
4545
  e = b.create(Number.isNaN(t) ? 0 : t);
4538
4546
  }
4539
4547
  return e;
4540
4548
  }
4541
4549
  createReferenceObject(e, t) {
4542
- const s = e.getForcedUnitId(), i = e.getForcedSheetId() || "", a = e.getForcedSheetName(), u = Bt({
4550
+ const s = e.getForcedUnitId(), i = e.getForcedSheetId() || "", a = e.getForcedSheetName(), u = Ot({
4543
4551
  unitId: s,
4544
4552
  sheetName: a,
4545
4553
  range: t
4546
4554
  });
4547
4555
  let c;
4548
- return new RegExp(sr).test(u) ? c = new Pn(u) : new RegExp(Ts).test(u) ? c = new Vn(u) : new RegExp(js).test(u) ? c = new vn(u) : c = new Lr(t, i, s), this._setReferenceDefault(e, c);
4556
+ return new RegExp(sr).test(u) ? c = new Pn(u) : new RegExp(Ts).test(u) ? c = new Vn(u) : new RegExp(js).test(u) ? c = new vn(u) : c = new wr(t, i, s), this._setReferenceDefault(e, c);
4549
4557
  }
4550
4558
  _setReferenceDefault(e, t) {
4551
4559
  return this.unitId == null || this.subUnitId == null ? h.create(f.REF) : (t.setDefaultUnitId(this.unitId), t.setDefaultSheetId(this.subUnitId), t.setUnitData(e.getUnitData()), t.setRuntimeData(e.getRuntimeData()), t.setArrayFormulaCellData(e.getArrayFormulaCellData()), t.setRuntimeArrayFormulaCellData(e.getRuntimeArrayFormulaCellData()), t);
@@ -4584,22 +4592,22 @@ class qs extends k {
4584
4592
  }
4585
4593
  }
4586
4594
  var Wt = /* @__PURE__ */ ((n) => (n.BETADIST = "BETADIST", n.BETAINV = "BETAINV", n.BINOMDIST = "BINOMDIST", n.CHIDIST = "CHIDIST", n.CHIINV = "CHIINV", n.CHITEST = "CHITEST", n.CONFIDENCE = "CONFIDENCE", n.COVAR = "COVAR", n.CRITBINOM = "CRITBINOM", n.EXPONDIST = "EXPONDIST", n.FDIST = "FDIST", n.FINV = "FINV", n.FTEST = "FTEST", n.GAMMADIST = "GAMMADIST", n.GAMMAINV = "GAMMAINV", n.HYPGEOMDIST = "HYPGEOMDIST", n.LOGINV = "LOGINV", n.LOGNORMDIST = "LOGNORMDIST", n.MODE = "MODE", n.NEGBINOMDIST = "NEGBINOMDIST", n.NORMDIST = "NORMDIST", n.NORMINV = "NORMINV", n.NORMSDIST = "NORMSDIST", n.NORMSINV = "NORMSINV", n.PERCENTILE = "PERCENTILE", n.PERCENTRANK = "PERCENTRANK", n.POISSON = "POISSON", n.QUARTILE = "QUARTILE", n.RANK = "RANK", n.STDEV = "STDEV", n.STDEVP = "STDEVP", n.TDIST = "TDIST", n.TINV = "TINV", n.TTEST = "TTEST", n.VAR = "VAR", n.VARP = "VARP", n.WEIBULL = "WEIBULL", n.ZTEST = "ZTEST", n))(Wt || {});
4587
- const Pa = [
4595
+ const Va = [
4588
4596
  [Gs, Wt.STDEV],
4589
4597
  [Xs, Wt.STDEVP],
4590
4598
  [qs, Wt.VAR],
4591
4599
  [Ks, Wt.VARP]
4592
- ], Va = [];
4593
- var va = /* @__PURE__ */ ((n) => (n.CUBEKPIMEMBER = "CUBEKPIMEMBER", n.CUBEMEMBER = "CUBEMEMBER", n.CUBEMEMBERPROPERTY = "CUBEMEMBERPROPERTY", n.CUBERANKEDMEMBER = "CUBERANKEDMEMBER", n.CUBESET = "CUBESET", n.CUBESETCOUNT = "CUBESETCOUNT", n.CUBEVALUE = "CUBEVALUE", n))(va || {});
4594
- const Ua = [];
4595
- var Ba = /* @__PURE__ */ ((n) => (n.DAVERAGE = "DAVERAGE", n.DCOUNT = "DCOUNT", n.DCOUNTA = "DCOUNTA", n.DGET = "DGET", n.DMAX = "DMAX", n.DMIN = "DMIN", n.DPRODUCT = "DPRODUCT", n.DSTDEV = "DSTDEV", n.DSTDEVP = "DSTDEVP", n.DSUM = "DSUM", n.DVAR = "DVAR", n.DVARP = "DVARP", n))(Ba || {});
4600
+ ], va = [];
4601
+ var Ua = /* @__PURE__ */ ((n) => (n.CUBEKPIMEMBER = "CUBEKPIMEMBER", n.CUBEMEMBER = "CUBEMEMBER", n.CUBEMEMBERPROPERTY = "CUBEMEMBERPROPERTY", n.CUBERANKEDMEMBER = "CUBERANKEDMEMBER", n.CUBESET = "CUBESET", n.CUBESETCOUNT = "CUBESETCOUNT", n.CUBEVALUE = "CUBEVALUE", n))(Ua || {});
4602
+ const Ba = [];
4603
+ var Oa = /* @__PURE__ */ ((n) => (n.DAVERAGE = "DAVERAGE", n.DCOUNT = "DCOUNT", n.DCOUNTA = "DCOUNTA", n.DGET = "DGET", n.DMAX = "DMAX", n.DMIN = "DMIN", n.DPRODUCT = "DPRODUCT", n.DSTDEV = "DSTDEV", n.DSTDEVP = "DSTDEVP", n.DSUM = "DSUM", n.DVAR = "DVAR", n.DVARP = "DVARP", n))(Oa || {});
4596
4604
  const Un = "yyyy/mm/dd;@";
4597
4605
  function Bn(n) {
4598
4606
  const r = new Date(Date.UTC(1900, 0, 1)), e = new Date(Date.UTC(1900, 1, 28)), t = Date.UTC(n.getFullYear(), n.getMonth(), n.getDate());
4599
4607
  let s = (t - r.getTime()) / (1e3 * 3600 * 24);
4600
4608
  return t > e.getTime() && (s += 1), Math.floor(s) + 1;
4601
4609
  }
4602
- function jr(n) {
4610
+ function Yr(n) {
4603
4611
  const r = new Date(Date.UTC(1900, 0, 1)), e = new Date(Date.UTC(1900, 1, 28));
4604
4612
  let t = Math.floor(n) - 1;
4605
4613
  return t > (e.getTime() - r.getTime()) / (1e3 * 3600 * 24) && (t -= 1), new Date(r.getTime() + t * (1e3 * 3600 * 24));
@@ -4613,7 +4621,7 @@ function On(n) {
4613
4621
  const s = t.getFullYear(), i = (t.getMonth() + 1).toString().padStart(2, "0"), a = t.getDate().toString().padStart(2, "0"), o = `${s}-${i}-${a}`;
4614
4622
  return n.replace(/\//g, "-").split("-").map((c) => c.padStart(2, "0")).join("-") === o;
4615
4623
  }
4616
- class Oa extends k {
4624
+ class Fa extends k {
4617
4625
  calculate(r, e, t) {
4618
4626
  if (r == null || e == null || t == null)
4619
4627
  return h.create(f.NA);
@@ -4643,11 +4651,11 @@ class Oa extends k {
4643
4651
  if (c.isString() || m.isString() || _.isString())
4644
4652
  return h.create(f.VALUE);
4645
4653
  let C = +c.getValue();
4646
- const y = Math.floor(+m.getValue()), S = +_.getValue();
4654
+ const E = Math.floor(+m.getValue()), S = +_.getValue();
4647
4655
  if (C < 0 || C > 9999)
4648
4656
  return h.create(f.NUM);
4649
4657
  C >= 0 && C < 1899 && (C += 1900);
4650
- const L = new Date(C, y - 1, S), V = Bn(L);
4658
+ const L = new Date(C, E - 1, S), V = Bn(L);
4651
4659
  if (V < 0)
4652
4660
  return h.create(f.NUM);
4653
4661
  const M = b.create(V);
@@ -4655,7 +4663,7 @@ class Oa extends k {
4655
4663
  });
4656
4664
  }
4657
4665
  }
4658
- class Fa extends k {
4666
+ class Ma extends k {
4659
4667
  calculate(r) {
4660
4668
  return r == null ? h.create(f.NA) : r.isArray() ? r.map((e) => this._handleSingleObject(e)) : this._handleSingleObject(r);
4661
4669
  }
@@ -4674,13 +4682,13 @@ class Fa extends k {
4674
4682
  return h.create(f.NUM);
4675
4683
  if (a === 0)
4676
4684
  return b.create(0);
4677
- e = jr(a);
4685
+ e = Yr(a);
4678
4686
  }
4679
4687
  const s = e.getDate();
4680
4688
  return b.create(s);
4681
4689
  }
4682
4690
  }
4683
- class Ma extends k {
4691
+ class ka extends k {
4684
4692
  calculate(r, e) {
4685
4693
  if (r == null || e == null)
4686
4694
  return h.create(f.NA);
@@ -4706,13 +4714,13 @@ class Ma extends k {
4706
4714
  const d = +o.getValue();
4707
4715
  if (d < 0)
4708
4716
  return h.create(f.NUM);
4709
- const m = Math.floor(+l.getValue()), _ = jr(d), C = _.getUTCFullYear(), y = _.getUTCMonth() + m, S = _.getUTCDate(), L = new Date(Date.UTC(C, y, S)), V = Bn(L), M = b.create(V);
4717
+ const m = Math.floor(+l.getValue()), _ = Yr(d), C = _.getUTCFullYear(), E = _.getUTCMonth() + m, S = _.getUTCDate(), L = new Date(Date.UTC(C, E, S)), V = Bn(L), M = b.create(V);
4710
4718
  return M.setPattern(Un), M;
4711
4719
  });
4712
4720
  }
4713
4721
  }
4714
4722
  var yt = /* @__PURE__ */ ((n) => (n.DATE = "DATE", n.DATEDIF = "DATEDIF", n.DATEVALUE = "DATEVALUE", n.DAY = "DAY", n.DAYS = "DAYS", n.DAYS360 = "DAYS360", n.EDATE = "EDATE", n.EOMONTH = "EOMONTH", n.HOUR = "HOUR", n.ISOWEEKNUM = "ISOWEEKNUM", n.MINUTE = "MINUTE", n.MONTH = "MONTH", n.NETWORKDAYS = "NETWORKDAYS", n.NETWORKDAYS_INTL = "NETWORKDAYS.INTL", n.NOW = "NOW", n.SECOND = "SECOND", n.TIME = "TIME", n.TIMEVALUE = "TIMEVALUE", n.TODAY = "TODAY", n.WEEKDAY = "WEEKDAY", n.WEEKNUM = "WEEKNUM", n.WORKDAY = "WORKDAY", n.WORKDAY_INTL = "WORKDAY.INTL", n.YEAR = "YEAR", n.YEARFRAC = "YEARFRAC", n))(yt || {});
4715
- class ka extends k {
4723
+ class $a extends k {
4716
4724
  calculate(r) {
4717
4725
  return r == null ? h.create(f.NA) : r.isArray() ? r.map((e) => this._handleSingleObject(e)) : this._handleSingleObject(r);
4718
4726
  }
@@ -4731,13 +4739,13 @@ class ka extends k {
4731
4739
  return h.create(f.NUM);
4732
4740
  if (a === 0)
4733
4741
  return b.create(1);
4734
- e = jr(a);
4742
+ e = Yr(a);
4735
4743
  }
4736
4744
  const s = e.getUTCMonth() + 1;
4737
4745
  return b.create(s);
4738
4746
  }
4739
4747
  }
4740
- class $a extends k {
4748
+ class Ta extends k {
4741
4749
  calculate(r) {
4742
4750
  if (r)
4743
4751
  return h.create(f.NA);
@@ -4745,7 +4753,7 @@ class $a extends k {
4745
4753
  return t.setPattern(Un), t;
4746
4754
  }
4747
4755
  }
4748
- class Ta extends k {
4756
+ class ja extends k {
4749
4757
  calculate(r) {
4750
4758
  return r == null ? h.create(f.NA) : r.isArray() ? r.map((e) => this._handleSingleObject(e)) : this._handleSingleObject(r);
4751
4759
  }
@@ -4764,39 +4772,39 @@ class Ta extends k {
4764
4772
  return h.create(f.NUM);
4765
4773
  if (a === 0)
4766
4774
  return b.create(1900);
4767
- e = jr(a);
4775
+ e = Yr(a);
4768
4776
  }
4769
4777
  const s = e.getUTCFullYear();
4770
4778
  return b.create(s);
4771
4779
  }
4772
4780
  }
4773
- const ja = [
4774
- [Oa, yt.DATE],
4775
- [Fa, yt.DAY],
4776
- [Ma, yt.EDATE],
4777
- [ka, yt.MONTH],
4778
- [$a, yt.TODAY],
4779
- [Ta, yt.YEAR]
4780
- ], Ya = [];
4781
- var Qa = /* @__PURE__ */ ((n) => (n.BESSELI = "BESSELI", n.BESSELJ = "BESSELJ", n.BESSELK = "BESSELK", n.BESSELY = "BESSELY", n.BIN2DEC = "BIN2DEC", n.BIN2HEX = "BIN2HEX", n.BIN2OCT = "BIN2OCT", n.BITAND = "BITAND", n.BITLSHIFT = "BITLSHIFT", n.BITOR = "BITOR", n.BITRSHIFT = "BITRSHIFT", n.BITXOR = "BITXOR", n.COMPLEX = "COMPLEX", n.CONVERT = "CONVERT", n.DEC2BIN = "DEC2BIN", n.DEC2HEX = "DEC2HEX", n.DEC2OCT = "DEC2OCT", n.DELTA = "DELTA", n.ERF = "ERF", n.ERF_PRECISE = "ERF.PRECISE", n.ERFC = "ERFC", n.ERFC_PRECISE = "ERFC.PRECISE", n.GESTEP = "GESTEP", n.HEX2BIN = "HEX2BIN", n.HEX2DEC = "HEX2DEC", n.HEX2OCT = "HEX2OCT", n.IMABS = "IMABS", n.IMAGINARY = "IMAGINARY", n.IMARGUMENT = "IMARGUMENT", n.IMCONJUGATE = "IMCONJUGATE", n.IMCOS = "IMCOS", n.IMCOSH = "IMCOSH", n.IMCOT = "IMCOT", n.IMCSC = "IMCSC", n.IMCSCH = "IMCSCH", n.IMDIV = "IMDIV", n.IMEXP = "IMEXP", n.IMLN = "IMLN", n.IMLOG10 = "IMLOG10", n.IMLOG2 = "IMLOG2", n.IMPOWER = "IMPOWER", n.IMPRODUCT = "IMPRODUCT", n.IMREAL = "IMREAL", n.IMSEC = "IMSEC", n.IMSECH = "IMSECH", n.IMSIN = "IMSIN", n.IMSINH = "IMSINH", n.IMSQRT = "IMSQRT", n.IMSUB = "IMSUB", n.IMSUM = "IMSUM", n.IMTAN = "IMTAN", n.OCT2BIN = "OCT2BIN", n.OCT2DEC = "OCT2DEC", n.OCT2HEX = "OCT2HEX", n))(Qa || {});
4782
- const za = [];
4783
- var Ha = /* @__PURE__ */ ((n) => (n.ACCRINT = "ACCRINT", n.ACCRINTM = "ACCRINTM", n.AMORDEGRC = "AMORDEGRC", n.AMORLINC = "AMORLINC", n.COUPDAYBS = "COUPDAYBS", n.COUPDAYS = "COUPDAYS", n.COUPDAYSNC = "COUPDAYSNC", n.COUPNCD = "COUPNCD", n.COUPNUM = "COUPNUM", n.COUPPCD = "COUPPCD", n.CUMIPMT = "CUMIPMT", n.CUMPRINC = "CUMPRINC", n.DB = "DB", n.DDB = "DDB", n.DISC = "DISC", n.DOLLARDE = "DOLLARDE", n.DOLLARFR = "DOLLARFR", n.DURATION = "DURATION", n.EFFECT = "EFFECT", n.FV = "FV", n.FVSCHEDULE = "FVSCHEDULE", n.INTRATE = "INTRATE", n.IPMT = "IPMT", n.IRR = "IRR", n.ISPMT = "ISPMT", n.MDURATION = "MDURATION", n.MIRR = "MIRR", n.NOMINAL = "NOMINAL", n.NPER = "NPER", n.NPV = "NPV", n.ODDFPRICE = "ODDFPRICE", n.ODDFYIELD = "ODDFYIELD", n.ODDLPRICE = "ODDLPRICE", n.ODDLYIELD = "ODDLYIELD", n.PDURATION = "PDURATION", n.PMT = "PMT", n.PPMT = "PPMT", n.PRICE = "PRICE", n.PRICEDISC = "PRICEDISC", n.PRICEMAT = "PRICEMAT", n.PV = "PV", n.RATE = "RATE", n.RECEIVED = "RECEIVED", n.RRI = "RRI", n.SLN = "SLN", n.SYD = "SYD", n.TBILLEQ = "TBILLEQ", n.TBILLPRICE = "TBILLPRICE", n.TBILLYIELD = "TBILLYIELD", n.VDB = "VDB", n.XIRR = "XIRR", n.XNPV = "XNPV", n.YIELD = "YIELD", n.YIELDDISC = "YIELDDISC", n.YIELDMAT = "YIELDMAT", n))(Ha || {}), Fe = /* @__PURE__ */ ((n) => (n.CELL = "CELL", n.ERROR_TYPE = "ERROR.TYPE", n.INFO = "INFO", n.ISBLANK = "ISBLANK", n.ISERR = "ISERR", n.ISERROR = "ISERROR", n.ISEVEN = "ISEVEN", n.ISFORMULA = "ISFORMULA", n.ISLOGICAL = "ISLOGICAL", n.ISNA = "ISNA", n.ISNONTEXT = "ISNONTEXT", n.ISNUMBER = "ISNUMBER", n.ISODD = "ISODD", n.ISOMITTED = "ISOMITTED", n.ISREF = "ISREF", n.ISTEXT = "ISTEXT", n.N = "N", n.NA = "NA", n.SHEET = "SHEET", n.SHEETS = "SHEETS", n.TYPE = "TYPE", n))(Fe || {});
4784
- class Ia extends k {
4781
+ const Ya = [
4782
+ [Fa, yt.DATE],
4783
+ [Ma, yt.DAY],
4784
+ [ka, yt.EDATE],
4785
+ [$a, yt.MONTH],
4786
+ [Ta, yt.TODAY],
4787
+ [ja, yt.YEAR]
4788
+ ], Qa = [];
4789
+ var za = /* @__PURE__ */ ((n) => (n.BESSELI = "BESSELI", n.BESSELJ = "BESSELJ", n.BESSELK = "BESSELK", n.BESSELY = "BESSELY", n.BIN2DEC = "BIN2DEC", n.BIN2HEX = "BIN2HEX", n.BIN2OCT = "BIN2OCT", n.BITAND = "BITAND", n.BITLSHIFT = "BITLSHIFT", n.BITOR = "BITOR", n.BITRSHIFT = "BITRSHIFT", n.BITXOR = "BITXOR", n.COMPLEX = "COMPLEX", n.CONVERT = "CONVERT", n.DEC2BIN = "DEC2BIN", n.DEC2HEX = "DEC2HEX", n.DEC2OCT = "DEC2OCT", n.DELTA = "DELTA", n.ERF = "ERF", n.ERF_PRECISE = "ERF.PRECISE", n.ERFC = "ERFC", n.ERFC_PRECISE = "ERFC.PRECISE", n.GESTEP = "GESTEP", n.HEX2BIN = "HEX2BIN", n.HEX2DEC = "HEX2DEC", n.HEX2OCT = "HEX2OCT", n.IMABS = "IMABS", n.IMAGINARY = "IMAGINARY", n.IMARGUMENT = "IMARGUMENT", n.IMCONJUGATE = "IMCONJUGATE", n.IMCOS = "IMCOS", n.IMCOSH = "IMCOSH", n.IMCOT = "IMCOT", n.IMCSC = "IMCSC", n.IMCSCH = "IMCSCH", n.IMDIV = "IMDIV", n.IMEXP = "IMEXP", n.IMLN = "IMLN", n.IMLOG10 = "IMLOG10", n.IMLOG2 = "IMLOG2", n.IMPOWER = "IMPOWER", n.IMPRODUCT = "IMPRODUCT", n.IMREAL = "IMREAL", n.IMSEC = "IMSEC", n.IMSECH = "IMSECH", n.IMSIN = "IMSIN", n.IMSINH = "IMSINH", n.IMSQRT = "IMSQRT", n.IMSUB = "IMSUB", n.IMSUM = "IMSUM", n.IMTAN = "IMTAN", n.OCT2BIN = "OCT2BIN", n.OCT2DEC = "OCT2DEC", n.OCT2HEX = "OCT2HEX", n))(za || {});
4790
+ const Ha = [];
4791
+ var Ia = /* @__PURE__ */ ((n) => (n.ACCRINT = "ACCRINT", n.ACCRINTM = "ACCRINTM", n.AMORDEGRC = "AMORDEGRC", n.AMORLINC = "AMORLINC", n.COUPDAYBS = "COUPDAYBS", n.COUPDAYS = "COUPDAYS", n.COUPDAYSNC = "COUPDAYSNC", n.COUPNCD = "COUPNCD", n.COUPNUM = "COUPNUM", n.COUPPCD = "COUPPCD", n.CUMIPMT = "CUMIPMT", n.CUMPRINC = "CUMPRINC", n.DB = "DB", n.DDB = "DDB", n.DISC = "DISC", n.DOLLARDE = "DOLLARDE", n.DOLLARFR = "DOLLARFR", n.DURATION = "DURATION", n.EFFECT = "EFFECT", n.FV = "FV", n.FVSCHEDULE = "FVSCHEDULE", n.INTRATE = "INTRATE", n.IPMT = "IPMT", n.IRR = "IRR", n.ISPMT = "ISPMT", n.MDURATION = "MDURATION", n.MIRR = "MIRR", n.NOMINAL = "NOMINAL", n.NPER = "NPER", n.NPV = "NPV", n.ODDFPRICE = "ODDFPRICE", n.ODDFYIELD = "ODDFYIELD", n.ODDLPRICE = "ODDLPRICE", n.ODDLYIELD = "ODDLYIELD", n.PDURATION = "PDURATION", n.PMT = "PMT", n.PPMT = "PPMT", n.PRICE = "PRICE", n.PRICEDISC = "PRICEDISC", n.PRICEMAT = "PRICEMAT", n.PV = "PV", n.RATE = "RATE", n.RECEIVED = "RECEIVED", n.RRI = "RRI", n.SLN = "SLN", n.SYD = "SYD", n.TBILLEQ = "TBILLEQ", n.TBILLPRICE = "TBILLPRICE", n.TBILLYIELD = "TBILLYIELD", n.VDB = "VDB", n.XIRR = "XIRR", n.XNPV = "XNPV", n.YIELD = "YIELD", n.YIELDDISC = "YIELDDISC", n.YIELDMAT = "YIELDMAT", n))(Ia || {}), Fe = /* @__PURE__ */ ((n) => (n.CELL = "CELL", n.ERROR_TYPE = "ERROR.TYPE", n.INFO = "INFO", n.ISBLANK = "ISBLANK", n.ISERR = "ISERR", n.ISERROR = "ISERROR", n.ISEVEN = "ISEVEN", n.ISFORMULA = "ISFORMULA", n.ISLOGICAL = "ISLOGICAL", n.ISNA = "ISNA", n.ISNONTEXT = "ISNONTEXT", n.ISNUMBER = "ISNUMBER", n.ISODD = "ISODD", n.ISOMITTED = "ISOMITTED", n.ISREF = "ISREF", n.ISTEXT = "ISTEXT", n.N = "N", n.NA = "NA", n.SHEET = "SHEET", n.SHEETS = "SHEETS", n.TYPE = "TYPE", n))(Fe || {});
4792
+ class Wa extends k {
4785
4793
  calculate(r) {
4786
4794
  return r == null ? h.create(f.NA) : r.isNull() ? Y.create(!0) : r.isArray() ? r.mapValue((e) => e.isNull() ? Y.create(!0) : Y.create(!1)) : Y.create(!1);
4787
4795
  }
4788
4796
  }
4789
- class Wa extends k {
4797
+ class Xa extends k {
4790
4798
  calculate(r) {
4791
4799
  return r == null ? h.create(f.NA) : r.getValue() === f.NA ? Y.create(!1) : r.isError() ? Y.create(!0) : r.isArray() ? r.mapValue((e) => e.getValue() === f.NA ? Y.create(!1) : e.isError() ? Y.create(!0) : Y.create(!1)) : Y.create(!1);
4792
4800
  }
4793
4801
  }
4794
- class Xa extends k {
4802
+ class Ga extends k {
4795
4803
  calculate(r) {
4796
4804
  return r == null ? h.create(f.NA) : r.isError() ? Y.create(!0) : r.isArray() ? r.mapValue((e) => e.isError() ? Y.create(!0) : Y.create(!1)) : Y.create(!1);
4797
4805
  }
4798
4806
  }
4799
- class Ga extends k {
4807
+ class Ka extends k {
4800
4808
  calculate(r) {
4801
4809
  if (r == null)
4802
4810
  return h.create(f.NA);
@@ -4806,27 +4814,27 @@ class Ga extends k {
4806
4814
  return Y.create(t % 2 === 0);
4807
4815
  }
4808
4816
  }
4809
- class Ka extends k {
4817
+ class qa extends k {
4810
4818
  calculate(r) {
4811
4819
  return r == null ? h.create(f.NA) : r.isBoolean() ? Y.create(!0) : r.isArray() ? r.mapValue((e) => e.isBoolean() ? Y.create(!0) : Y.create(!1)) : Y.create(!1);
4812
4820
  }
4813
4821
  }
4814
- class qa extends k {
4822
+ class Za extends k {
4815
4823
  calculate(r) {
4816
4824
  return r == null ? h.create(f.NA) : r.getValue() === f.NA ? Y.create(!0) : r.isArray() ? r.mapValue((e) => e.getValue() === f.NA ? Y.create(!0) : Y.create(!1)) : Y.create(!1);
4817
4825
  }
4818
4826
  }
4819
- class Za extends k {
4827
+ class Ja extends k {
4820
4828
  calculate(r) {
4821
4829
  return r == null ? h.create(f.NA) : !r.isArray() && !r.isString() ? Y.create(!0) : r.isArray() ? r.mapValue((e) => e.isString() ? Y.create(!1) : Y.create(!0)) : Y.create(!1);
4822
4830
  }
4823
4831
  }
4824
- class Ja extends k {
4832
+ class Na extends k {
4825
4833
  calculate(r) {
4826
4834
  return r == null ? h.create(f.NA) : r.isNumber() ? Y.create(!0) : r.isArray() ? r.mapValue((e) => e.isNumber() ? Y.create(!0) : Y.create(!1)) : Y.create(!1);
4827
4835
  }
4828
4836
  }
4829
- class Na extends k {
4837
+ class eo extends k {
4830
4838
  calculate(r) {
4831
4839
  if (r == null)
4832
4840
  return h.create(f.NA);
@@ -4836,7 +4844,7 @@ class Na extends k {
4836
4844
  return Y.create(t % 2 !== 0);
4837
4845
  }
4838
4846
  }
4839
- class eo extends k {
4847
+ class to extends k {
4840
4848
  constructor() {
4841
4849
  super(...arguments);
4842
4850
  D(this, "needsReferenceObject", !0);
@@ -4845,25 +4853,25 @@ class eo extends k {
4845
4853
  return e == null ? h.create(f.NA) : e.isReferenceObject() ? Y.create(!0) : Y.create(!1);
4846
4854
  }
4847
4855
  }
4848
- class to extends k {
4856
+ class ro extends k {
4849
4857
  calculate(r) {
4850
4858
  return r == null ? h.create(f.NA) : r.isString() ? Y.create(!0) : r.isArray() ? r.mapValue((e) => e.isString() ? Y.create(!0) : Y.create(!1)) : Y.create(!1);
4851
4859
  }
4852
4860
  }
4853
- const ro = [
4854
- [Ia, Fe.ISBLANK],
4855
- [Wa, Fe.ISERR],
4856
- [Ga, Fe.ISEVEN],
4857
- [Na, Fe.ISODD],
4858
- [Xa, Fe.ISERROR],
4859
- [Ka, Fe.ISLOGICAL],
4860
- [qa, Fe.ISNA],
4861
- [Za, Fe.ISNONTEXT],
4862
- [Ja, Fe.ISNUMBER],
4863
- [eo, Fe.ISREF],
4864
- [to, Fe.ISTEXT]
4861
+ const no = [
4862
+ [Wa, Fe.ISBLANK],
4863
+ [Xa, Fe.ISERR],
4864
+ [Ka, Fe.ISEVEN],
4865
+ [eo, Fe.ISODD],
4866
+ [Ga, Fe.ISERROR],
4867
+ [qa, Fe.ISLOGICAL],
4868
+ [Za, Fe.ISNA],
4869
+ [Ja, Fe.ISNONTEXT],
4870
+ [Na, Fe.ISNUMBER],
4871
+ [to, Fe.ISREF],
4872
+ [ro, Fe.ISTEXT]
4865
4873
  ];
4866
- class no extends k {
4874
+ class so extends k {
4867
4875
  calculate(...r) {
4868
4876
  if (r.length === 0)
4869
4877
  return h.create(f.NA);
@@ -4885,7 +4893,7 @@ class no extends k {
4885
4893
  }
4886
4894
  }
4887
4895
  var Dt = /* @__PURE__ */ ((n) => (n.AND = "AND", n.BYCOL = "BYCOL", n.BYROW = "BYROW", n.FALSE = "FALSE", n.IF = "IF", n.IFERROR = "IFERROR", n.IFNA = "IFNA", n.IFS = "IFS", n.LAMBDA = "LAMBDA", n.LET = "LET", n.MAKEARRAY = "MAKEARRAY", n.MAP = "MAP", n.NOT = "NOT", n.OR = "OR", n.REDUCE = "REDUCE", n.SCAN = "SCAN", n.SWITCH = "SWITCH", n.TRUE = "TRUE", n.XOR = "XOR", n))(Dt || {});
4888
- class so extends k {
4896
+ class io extends k {
4889
4897
  calculate(r, e, t = Y.create(!1)) {
4890
4898
  if (r == null || e == null)
4891
4899
  return h.create(f.NA);
@@ -4920,7 +4928,7 @@ class so extends k {
4920
4928
  return r.isNull() ? h.create(f.NA) : r.getValue() ? e.isNull() ? h.create(f.NA) : e : t.isNull() ? h.create(f.NA) : t;
4921
4929
  }
4922
4930
  }
4923
- class io extends k {
4931
+ class ao extends k {
4924
4932
  calculate(r, e) {
4925
4933
  if (r == null || e == null)
4926
4934
  return h.create(f.NA);
@@ -4942,12 +4950,12 @@ class io extends k {
4942
4950
  }), i;
4943
4951
  }
4944
4952
  }
4945
- class ao extends k {
4953
+ class oo extends k {
4946
4954
  calculate(...r) {
4947
4955
  return h.create(f.VALUE);
4948
4956
  }
4949
4957
  }
4950
- class oo extends k {
4958
+ class uo extends k {
4951
4959
  calculate(...r) {
4952
4960
  if (r.length !== 3)
4953
4961
  return h.create(f.VALUE);
@@ -4967,13 +4975,13 @@ class oo extends k {
4967
4975
  i[a][o] = u;
4968
4976
  }
4969
4977
  }
4970
- return new ba(i);
4978
+ return new Sa(i);
4971
4979
  }
4972
4980
  isAsync() {
4973
4981
  return !0;
4974
4982
  }
4975
4983
  }
4976
- class uo extends k {
4984
+ class co extends k {
4977
4985
  calculate(...r) {
4978
4986
  if (r.length === 0)
4979
4987
  return new h(f.NA);
@@ -4994,15 +5002,15 @@ class uo extends k {
4994
5002
  return t ? new h(f.VALUE) : new Y(e);
4995
5003
  }
4996
5004
  }
4997
- const co = [
4998
- [no, Dt.AND],
4999
- [so, Dt.IF],
5000
- [ao, Dt.LAMBDA],
5001
- [oo, Dt.MAKEARRAY],
5002
- [uo, Dt.OR],
5003
- [io, Dt.IFERROR]
5005
+ const lo = [
5006
+ [so, Dt.AND],
5007
+ [io, Dt.IF],
5008
+ [oo, Dt.LAMBDA],
5009
+ [uo, Dt.MAKEARRAY],
5010
+ [co, Dt.OR],
5011
+ [ao, Dt.IFERROR]
5004
5012
  ];
5005
- class lo extends k {
5013
+ class fo extends k {
5006
5014
  calculate(r, e, t, s, i) {
5007
5015
  if (r == null || e == null)
5008
5016
  return h.create(f.NA);
@@ -5019,18 +5027,18 @@ class lo extends k {
5019
5027
  const a = Number(r.getValue()) - 1, o = Number(e.getValue()) - 1;
5020
5028
  if (Number.isNaN(a) || Number.isNaN(o))
5021
5029
  return h.create(f.VALUE);
5022
- const u = t ? fo(t.getValue()) : _e.ALL, c = this.getZeroOrOneByOneDefault(s), l = i ? `${i.getValue()}` : "", d = Ar(l) ? `'${l}'` : l, m = {
5030
+ const u = t ? ho(t.getValue()) : _e.ALL, c = this.getZeroOrOneByOneDefault(s), l = i ? `${i.getValue()}` : "", d = Lr(l) ? `'${l}'` : l, m = {
5023
5031
  startRow: a,
5024
5032
  startColumn: o,
5025
5033
  endRow: a,
5026
5034
  endColumn: o,
5027
5035
  startAbsoluteRefType: u,
5028
5036
  endAbsoluteRefType: u
5029
- }, _ = s && !c ? Aa(m) : ft(m);
5037
+ }, _ = s && !c ? La(m) : ft(m);
5030
5038
  return Ee.create(d !== "" ? `${d}!${_}` : _);
5031
5039
  }
5032
5040
  }
5033
- function fo(n) {
5041
+ function ho(n) {
5034
5042
  switch (n) {
5035
5043
  case 1:
5036
5044
  return _e.ALL;
@@ -5044,7 +5052,7 @@ function fo(n) {
5044
5052
  return _e.ALL;
5045
5053
  }
5046
5054
  }
5047
- class ho extends k {
5055
+ class mo extends k {
5048
5056
  calculate(r) {
5049
5057
  if (r == null)
5050
5058
  return b.create(this.column + 1);
@@ -5067,7 +5075,7 @@ class ho extends k {
5067
5075
  return Se.create(i);
5068
5076
  }
5069
5077
  }
5070
- class mo extends k {
5078
+ class go extends k {
5071
5079
  calculate(r) {
5072
5080
  if (r == null)
5073
5081
  return h.create(f.NA);
@@ -5082,7 +5090,7 @@ class mo extends k {
5082
5090
  }
5083
5091
  }
5084
5092
  var xe = /* @__PURE__ */ ((n) => (n.ADDRESS = "ADDRESS", n.AREAS = "AREAS", n.CHOOSE = "CHOOSE", n.CHOOSECOLS = "CHOOSECOLS", n.CHOOSEROWS = "CHOOSEROWS", n.COLUMN = "COLUMN", n.COLUMNS = "COLUMNS", n.DROP = "DROP", n.EXPAND = "EXPAND", n.FILTER = "FILTER", n.FORMULATEXT = "FORMULATEXT", n.GETPIVOTDATA = "GETPIVOTDATA", n.HLOOKUP = "HLOOKUP", n.HSTACK = "HSTACK", n.HYPERLINK = "HYPERLINK", n.IMAGE = "IMAGE", n.INDEX = "INDEX", n.INDIRECT = "INDIRECT", n.LOOKUP = "LOOKUP", n.MATCH = "MATCH", n.OFFSET = "OFFSET", n.ROW = "ROW", n.ROWS = "ROWS", n.RTD = "RTD", n.SORT = "SORT", n.SORTBY = "SORTBY", n.TAKE = "TAKE", n.TOCOL = "TOCOL", n.TOROW = "TOROW", n.TRANSPOSE = "TRANSPOSE", n.UNIQUE = "UNIQUE", n.VLOOKUP = "VLOOKUP", n.VSTACK = "VSTACK", n.WRAPCOLS = "WRAPCOLS", n.WRAPROWS = "WRAPROWS", n.XLOOKUP = "XLOOKUP", n.XMATCH = "XMATCH", n))(xe || {});
5085
- class go extends k {
5093
+ class po extends k {
5086
5094
  calculate(r, e, t, s) {
5087
5095
  if (r == null || e == null || t == null)
5088
5096
  return h.create(f.NA);
@@ -5105,7 +5113,7 @@ class go extends k {
5105
5113
  return s === 0 ? this.equalSearch(r, e, t) : this.binarySearch(r, e, t);
5106
5114
  }
5107
5115
  }
5108
- class po extends k {
5116
+ class Ro extends k {
5109
5117
  isAddress() {
5110
5118
  return !0;
5111
5119
  }
@@ -5126,7 +5134,7 @@ class po extends k {
5126
5134
  return h.create(f.REF);
5127
5135
  const s = this._convertToDefinedName(r.getValue());
5128
5136
  if (t === 0) {
5129
- const l = Sa(s), { range: d, sheetName: m, unitId: _ } = l, C = new Lr(d);
5137
+ const l = Aa(s), { range: d, sheetName: m, unitId: _ } = l, C = new wr(d);
5130
5138
  return C.setForcedUnitIdDirect(_), C.setForcedSheetName(m), this._setDefault(C);
5131
5139
  }
5132
5140
  if (new RegExp(sr).test(s))
@@ -5135,7 +5143,7 @@ class po extends k {
5135
5143
  return this._setDefault(new Vn(s));
5136
5144
  if (new RegExp($s).test(s))
5137
5145
  return this._setDefault(new vn(s));
5138
- const i = nt(s), { range: a, sheetName: o, unitId: u } = i, c = new Lr(a);
5146
+ const i = nt(s), { range: a, sheetName: o, unitId: u } = i, c = new wr(a);
5139
5147
  return c.setForcedUnitIdDirect(u), c.setForcedSheetName(o), this._setDefault(c);
5140
5148
  }
5141
5149
  _setDefault(r) {
@@ -5155,7 +5163,7 @@ class po extends k {
5155
5163
  return t == null ? r : t.startsWith(me.EQUALS) ? t.slice(1) : t;
5156
5164
  }
5157
5165
  }
5158
- class Ro extends k {
5166
+ class _o extends k {
5159
5167
  constructor() {
5160
5168
  super(...arguments);
5161
5169
  D(this, "needsExpandParams", !0);
@@ -5176,7 +5184,7 @@ class Ro extends k {
5176
5184
  return i > s ? (a = t.slice([0, 1]), o = t.slice([s - 1, s])) : (a = t.slice(void 0, [0, 1]), o = t.slice(void 0, [i - 1, i])), a == null || o == null ? h.create(f.VALUE) : e.isArray() ? e.map((u) => this.binarySearch(u, a, o)) : this.binarySearch(e, a, o);
5177
5185
  }
5178
5186
  }
5179
- class _o extends k {
5187
+ class Eo extends k {
5180
5188
  calculate(r, e, t) {
5181
5189
  if (r == null || e == null)
5182
5190
  return h.create(f.NA);
@@ -5220,7 +5228,7 @@ class _o extends k {
5220
5228
  }
5221
5229
  }
5222
5230
  }
5223
- class Eo extends k {
5231
+ class yo extends k {
5224
5232
  constructor() {
5225
5233
  super(...arguments);
5226
5234
  D(this, "needsReferenceObject", !0);
@@ -5257,9 +5265,9 @@ class Eo extends k {
5257
5265
  if (t = t, s = s, i = i, a = a, c === 1 && l === 1)
5258
5266
  return this._handleSingleObject(e, t, s, i, a);
5259
5267
  const d = he(c, l, t, h.create(f.NA)), m = he(c, l, s, h.create(f.NA)), _ = he(c, l, i, h.create(f.NA)), C = he(c, l, a, h.create(f.NA));
5260
- return d.mapValue((y, S, L) => {
5268
+ return d.mapValue((E, S, L) => {
5261
5269
  const V = m.get(S, L), M = _.get(S, L), H = C.get(S, L);
5262
- return y.isError() ? y : V.isError() ? V : M.isError() ? M : H.isError() ? H : this._handleSingleObject(e, y, V, M, H, !0);
5270
+ return E.isError() ? E : V.isError() ? V : M.isError() ? M : H.isError() ? H : this._handleSingleObject(e, E, V, M, H, !0);
5263
5271
  });
5264
5272
  }
5265
5273
  _handleSingleObject(e, t, s, i, a, o = !1) {
@@ -5269,12 +5277,12 @@ class Eo extends k {
5269
5277
  const m = u + l, _ = c + d;
5270
5278
  if (m < 0 || _ < 0)
5271
5279
  return h.create(f.REF);
5272
- const C = this.getIndexNumValue(i), y = this.getIndexNumValue(a);
5273
- if (typeof C != "number" || typeof y != "number")
5280
+ const C = this.getIndexNumValue(i), E = this.getIndexNumValue(a);
5281
+ if (typeof C != "number" || typeof E != "number")
5274
5282
  return h.create(f.VALUE);
5275
- if (C === 0 || y === 0)
5283
+ if (C === 0 || E === 0)
5276
5284
  return h.create(f.REF);
5277
- const S = C > 0 ? m + C - 1 : m + C + 1, L = y > 0 ? _ + y - 1 : _ + y + 1;
5285
+ const S = C > 0 ? m + C - 1 : m + C + 1, L = E > 0 ? _ + E - 1 : _ + E + 1;
5278
5286
  if (S < 0 || L < 0)
5279
5287
  return h.create(f.REF);
5280
5288
  if (o)
@@ -5288,7 +5296,7 @@ class Eo extends k {
5288
5296
  return this.createReferenceObject(e, ge);
5289
5297
  }
5290
5298
  }
5291
- class yo extends k {
5299
+ class Do extends k {
5292
5300
  calculate(r) {
5293
5301
  if (r == null)
5294
5302
  return b.create(this.row + 1);
@@ -5311,7 +5319,7 @@ class yo extends k {
5311
5319
  return Se.create(i);
5312
5320
  }
5313
5321
  }
5314
- class Do extends k {
5322
+ class Co extends k {
5315
5323
  calculate(r) {
5316
5324
  if (r == null)
5317
5325
  return h.create(f.NA);
@@ -5325,7 +5333,7 @@ class Do extends k {
5325
5333
  return b.create(e);
5326
5334
  }
5327
5335
  }
5328
- class Co extends k {
5336
+ class bo extends k {
5329
5337
  calculate(r, e, t, s) {
5330
5338
  if (r == null || e == null || t == null)
5331
5339
  return h.create(f.NA);
@@ -5347,10 +5355,10 @@ class Co extends k {
5347
5355
  return t.iterator((m, _, C) => {
5348
5356
  if (m == null)
5349
5357
  return l = h.create(f.VALUE), !1;
5350
- const y = this._handleTableArray(r, e, m, c);
5351
- if (y.isError())
5352
- return l = y, !1;
5353
- d[_] === void 0 && (d[_] = []), d[_][C] = y;
5358
+ const E = this._handleTableArray(r, e, m, c);
5359
+ if (E.isError())
5360
+ return l = E, !1;
5361
+ d[_] === void 0 && (d[_] = []), d[_][C] = E;
5354
5362
  }), l || Nt(d, d.length, d[0].length, this.unitId || "", this.subUnitId || "");
5355
5363
  }
5356
5364
  const i = Math.max(
@@ -5386,7 +5394,7 @@ class Co extends k {
5386
5394
  return s === 0 ? this.equalSearch(r, e, t) : this.binarySearch(r, e, t);
5387
5395
  }
5388
5396
  }
5389
- class bo extends k {
5397
+ class So extends k {
5390
5398
  calculate(r, e, t, s, i, a) {
5391
5399
  if (r == null || e == null || t == null)
5392
5400
  return h.create(f.NA);
@@ -5416,12 +5424,12 @@ class bo extends k {
5416
5424
  if (m instanceof h)
5417
5425
  return m;
5418
5426
  if (r.isArray()) {
5419
- let y;
5420
- return o === 1 ? y = t.slice([0, 1]) : y = t.slice(void 0, [0, 1]), y == null ? h.create(f.NA) : r.map((S) => {
5427
+ let E;
5428
+ return o === 1 ? E = t.slice([0, 1]) : E = t.slice(void 0, [0, 1]), E == null ? h.create(f.NA) : r.map((S) => {
5421
5429
  const L = this._handleSingleObject(
5422
5430
  S,
5423
5431
  e,
5424
- y,
5432
+ E,
5425
5433
  d,
5426
5434
  m
5427
5435
  );
@@ -5429,14 +5437,14 @@ class bo extends k {
5429
5437
  });
5430
5438
  }
5431
5439
  if (u === l && o === c) {
5432
- const y = this._handleSingleObject(
5440
+ const E = this._handleSingleObject(
5433
5441
  r,
5434
5442
  e,
5435
5443
  t,
5436
5444
  d,
5437
5445
  m
5438
5446
  );
5439
- return y.isError() ? s : y;
5447
+ return E.isError() ? s : E;
5440
5448
  }
5441
5449
  let _ = 0;
5442
5450
  u === l && (_ = 1);
@@ -5479,7 +5487,7 @@ class bo extends k {
5479
5487
  return r === -2 ? tt.MAX : tt.MIN;
5480
5488
  }
5481
5489
  }
5482
- class So extends k {
5490
+ class Ao extends k {
5483
5491
  calculate(r, e, t, s) {
5484
5492
  if (r == null || e == null)
5485
5493
  return h.create(f.NA);
@@ -5541,7 +5549,7 @@ class So extends k {
5541
5549
  return r === -2 ? tt.MAX : tt.MIN;
5542
5550
  }
5543
5551
  }
5544
- class Ao extends k {
5552
+ class Lo extends k {
5545
5553
  constructor() {
5546
5554
  super(...arguments);
5547
5555
  D(this, "needsReferenceObject", !0);
@@ -5579,8 +5587,8 @@ class Ao extends k {
5579
5587
  return this._calculateSingleCell(e, t, s, i);
5580
5588
  {
5581
5589
  const l = he(u, c, t, h.create(f.NA)), d = he(u, c, s, h.create(f.NA)), m = he(u, c, i, h.create(f.NA));
5582
- return l.map((_, C, y) => {
5583
- const S = d.get(C, y) || oe.create(), L = m.get(C, y) || oe.create(), V = this._calculateSingleCell(e, _, S, L);
5590
+ return l.map((_, C, E) => {
5591
+ const S = d.get(C, E) || oe.create(), L = m.get(C, E) || oe.create(), V = this._calculateSingleCell(e, _, S, L);
5584
5592
  return V.isReferenceObject() ? V.toArrayValueObject().getFirstCell() : V;
5585
5593
  });
5586
5594
  }
@@ -5641,38 +5649,38 @@ class Ao extends k {
5641
5649
  return this.createReferenceObject(e, C);
5642
5650
  }
5643
5651
  }
5644
- const Lo = [
5645
- [lo, xe.ADDRESS],
5646
- [ho, xe.COLUMN],
5647
- [mo, xe.COLUMNS],
5648
- [Ao, xe.INDEX],
5649
- [po, xe.INDIRECT],
5650
- [Eo, xe.OFFSET],
5651
- [yo, xe.ROW],
5652
- [Do, xe.ROWS],
5653
- [Co, xe.VLOOKUP],
5654
- [Ro, xe.LOOKUP],
5655
- [_o, xe.MATCH],
5656
- [go, xe.HLOOKUP],
5657
- [bo, xe.XLOOKUP],
5658
- [So, xe.XMATCH]
5652
+ const wo = [
5653
+ [fo, xe.ADDRESS],
5654
+ [mo, xe.COLUMN],
5655
+ [go, xe.COLUMNS],
5656
+ [Lo, xe.INDEX],
5657
+ [Ro, xe.INDIRECT],
5658
+ [yo, xe.OFFSET],
5659
+ [Do, xe.ROW],
5660
+ [Co, xe.ROWS],
5661
+ [bo, xe.VLOOKUP],
5662
+ [_o, xe.LOOKUP],
5663
+ [Eo, xe.MATCH],
5664
+ [po, xe.HLOOKUP],
5665
+ [So, xe.XLOOKUP],
5666
+ [Ao, xe.XMATCH]
5659
5667
  ];
5660
- class wo extends k {
5668
+ class xo extends k {
5661
5669
  calculate(r) {
5662
5670
  return r == null ? h.create(f.NA) : (r.isString() && (r = r.convertToNumberObjectValue()), r.isError() ? h.create(f.VALUE) : r.abs());
5663
5671
  }
5664
5672
  }
5665
- class xo extends k {
5673
+ class Po extends k {
5666
5674
  calculate(r) {
5667
5675
  return r == null ? h.create(f.NA) : (r.isString() && (r = r.convertToNumberObjectValue()), r.isError() ? new h(f.VALUE) : r.acos());
5668
5676
  }
5669
5677
  }
5670
- class Po extends k {
5678
+ class Vo extends k {
5671
5679
  calculate(r) {
5672
5680
  return r == null ? h.create(f.NA) : (r.isString() && (r = r.convertToNumberObjectValue()), r.isError() ? h.create(f.VALUE) : r.acosh());
5673
5681
  }
5674
5682
  }
5675
- class Vo extends k {
5683
+ class vo extends k {
5676
5684
  calculate(r) {
5677
5685
  return r == null ? h.create(f.NA) : (r.isString() && (r = r.convertToNumberObjectValue()), r.isError() ? r : r.isArray() ? r.map((e) => e.isError() ? e : Rs(e)) : Rs(r));
5678
5686
  }
@@ -5685,17 +5693,17 @@ function Rs(n) {
5685
5693
  return Number.isNaN(e) ? h.create(f.VALUE) : b.create(e);
5686
5694
  }
5687
5695
  var Ue = /* @__PURE__ */ ((n) => (n.ABS = "ABS", n.ACOS = "ACOS", n.ACOSH = "ACOSH", n.ACOT = "ACOT", n.ACOTH = "ACOTH", n.AGGREGATE = "AGGREGATE", n.ARABIC = "ARABIC", n.ASIN = "ASIN", n.ASINH = "ASINH", n.ATAN = "ATAN", n.ATAN2 = "ATAN2", n.ATANH = "ATANH", n.BASE = "BASE", n.CEILING = "CEILING", n.CEILING_MATH = "CEILING.MATH", n.CEILING_PRECISE = "CEILING.PRECISE", n.COMBIN = "COMBIN", n.COMBINA = "COMBINA", n.COS = "COS", n.COSH = "COSH", n.COT = "COT", n.COTH = "COTH", n.CSC = "CSC", n.CSCH = "CSCH", n.DECIMAL = "DECIMAL", n.DEGREES = "DEGREES", n.EVEN = "EVEN", n.EXP = "EXP", n.FACT = "FACT", n.FACTDOUBLE = "FACTDOUBLE", n.FLOOR = "FLOOR", n.FLOOR_MATH = "FLOOR.MATH", n.FLOOR_PRECISE = "FLOOR.PRECISE", n.GCD = "GCD", n.INT = "INT", n.ISO_CEILING = "ISO.CEILING", n.LCM = "LCM", n.LET = "LET", n.LN = "LN", n.LOG = "LOG", n.LOG10 = "LOG10", n.MDETERM = "MDETERM", n.MINVERSE = "MINVERSE", n.MMULT = "MMULT", n.MOD = "MOD", n.MROUND = "MROUND", n.MULTINOMIAL = "MULTINOMIAL", n.MUNIT = "MUNIT", n.ODD = "ODD", n.PI = "PI", n.POWER = "POWER", n.PRODUCT = "PRODUCT", n.QUOTIENT = "QUOTIENT", n.RADIANS = "RADIANS", n.RAND = "RAND", n.RANDARRAY = "RANDARRAY", n.RANDBETWEEN = "RANDBETWEEN", n.ROMAN = "ROMAN", n.ROUND = "ROUND", n.ROUNDDOWN = "ROUNDDOWN", n.ROUNDUP = "ROUNDUP", n.SEC = "SEC", n.SECH = "SECH", n.SERIESSUM = "SERIESSUM", n.SEQUENCE = "SEQUENCE", n.SIGN = "SIGN", n.SIN = "SIN", n.SINH = "SINH", n.SQRT = "SQRT", n.SQRTPI = "SQRTPI", n.SUBTOTAL = "SUBTOTAL", n.SUM = "SUM", n.SUMIF = "SUMIF", n.SUMIFS = "SUMIFS", n.SUMPRODUCT = "SUMPRODUCT", n.SUMSQ = "SUMSQ", n.SUMX2MY2 = "SUMX2MY2", n.SUMX2PY2 = "SUMX2PY2", n.SUMXMY2 = "SUMXMY2", n.TAN = "TAN", n.TANH = "TANH", n.TRUNC = "TRUNC", n))(Ue || {});
5688
- class vo extends k {
5696
+ class Uo extends k {
5689
5697
  calculate(r, e) {
5690
5698
  return r == null || e == null ? h.create(f.NA) : (r.isString() && (r = r.convertToNumberObjectValue()), r.isError() ? r : (e.isString() && (e = e.convertToNumberObjectValue()), e.isError() ? e : r.mod(e)));
5691
5699
  }
5692
5700
  }
5693
- class Uo extends k {
5701
+ class Bo extends k {
5694
5702
  calculate(r, e) {
5695
5703
  return r == null || e == null ? h.create(f.NA) : (r.isString() && (r = r.convertToNumberObjectValue()), r.isError() ? r : (e.isString() && (e = e.convertToNumberObjectValue()), e.isError() ? e : r.pow(e)));
5696
5704
  }
5697
5705
  }
5698
- class Bo extends k {
5706
+ class Oo extends k {
5699
5707
  calculate(...r) {
5700
5708
  if (r.length === 0)
5701
5709
  return h.create(f.NA);
@@ -5724,7 +5732,7 @@ class Bo extends k {
5724
5732
  }), e;
5725
5733
  }
5726
5734
  }
5727
- class Oo extends k {
5735
+ class Fo extends k {
5728
5736
  constructor() {
5729
5737
  super(...arguments);
5730
5738
  D(this, "needsReferenceObject", !0);
@@ -5925,7 +5933,7 @@ class Oo extends k {
5925
5933
  return e.getArrayValue()[0].length === 0;
5926
5934
  }
5927
5935
  }
5928
- class Fo extends k {
5936
+ class Mo extends k {
5929
5937
  calculate(...r) {
5930
5938
  if (r.length === 0)
5931
5939
  return h.create(f.NA);
@@ -5940,7 +5948,7 @@ class Fo extends k {
5940
5948
  return e;
5941
5949
  }
5942
5950
  }
5943
- function Mo(n) {
5951
+ function ko(n) {
5944
5952
  const r = [
5945
5953
  B.EQUALS,
5946
5954
  B.NOT_EQUAL,
@@ -5952,14 +5960,14 @@ function Mo(n) {
5952
5960
  for (const e of r)
5953
5961
  if (n.startsWith(e)) {
5954
5962
  const t = n.substring(e.length);
5955
- return [e, Lt.create(t)];
5963
+ return [e, wt.create(t)];
5956
5964
  }
5957
- return [B.EQUALS, Lt.create(n)];
5965
+ return [B.EQUALS, wt.create(n)];
5958
5966
  }
5959
5967
  function Fn(n, r, e) {
5960
5968
  if (!e)
5961
5969
  if (r.isString()) {
5962
- const t = `${r.getValue()}`, [s, i] = Mo(t);
5970
+ const t = `${r.getValue()}`, [s, i] = ko(t);
5963
5971
  e = s, r = i;
5964
5972
  } else
5965
5973
  e = B.EQUALS;
@@ -5969,22 +5977,27 @@ function Zs(n, r) {
5969
5977
  const e = Math.max(n.isArray() ? n.getRowCount() : 1, r.isArray() ? r.getRowCount() : 1), t = Math.max(n.isArray() ? n.getColumnCount() : 1, r.isArray() ? r.getColumnCount() : 1), s = he(e, t, n), i = he(e, t, r);
5970
5978
  return s.mapValue((a, o, u) => {
5971
5979
  const c = i.get(o, u);
5972
- return a != null && a.isError() ? a : c != null && c.isError() ? c : a != null && a.isBoolean() && (c != null && c.isBoolean()) ? $r(a.getValue() && c.getValue()) : Y.create(!1);
5980
+ return a != null && a.isError() ? a : c != null && c.isError() ? c : a != null && a.isBoolean() && (c != null && c.isBoolean()) ? Tr(a.getValue() && c.getValue()) : Y.create(!1);
5973
5981
  });
5974
5982
  }
5975
- class ko extends k {
5976
- calculate(r, e, t) {
5977
- return r == null || e == null || r.isError() || e.isError() || t != null && t.isError() ? h.create(f.NA) : !r.isArray() || t && !t.isArray() ? h.create(f.VALUE) : e.isArray() ? e.map((s) => this._handleSingleObject(r, s, t)) : this._handleSingleObject(r, e, t);
5983
+ class $o extends k {
5984
+ constructor() {
5985
+ super(...arguments);
5986
+ D(this, "minParams", 2);
5987
+ D(this, "maxParams", 3);
5978
5988
  }
5979
- _handleSingleObject(r, e, t) {
5980
- const s = Fn(r, e), i = t ? t.slice(
5981
- [0, r.getRowCount()],
5982
- [0, r.getColumnCount()]
5983
- ) : r;
5984
- return i ? i.pick(s).sum() : h.create(f.VALUE);
5989
+ calculate(e, t, s) {
5990
+ return e.isError() || t.isError() || s != null && s.isError() ? h.create(f.NA) : !e.isArray() || s && !s.isArray() ? h.create(f.VALUE) : t.isArray() ? t.map((i) => this._handleSingleObject(e, i, s)) : this._handleSingleObject(e, t, s);
5991
+ }
5992
+ _handleSingleObject(e, t, s) {
5993
+ const i = Fn(e, t), a = s ? s.slice(
5994
+ [0, e.getRowCount()],
5995
+ [0, e.getColumnCount()]
5996
+ ) : e;
5997
+ return a ? a.pick(i).sum() : h.create(f.VALUE);
5985
5998
  }
5986
5999
  }
5987
- class $o extends k {
6000
+ class To extends k {
5988
6001
  calculate(r, ...e) {
5989
6002
  if (r == null || e.length < 2 || r.isError())
5990
6003
  return h.create(f.NA);
@@ -6031,20 +6044,20 @@ class $o extends k {
6031
6044
  return Se.create(c);
6032
6045
  }
6033
6046
  }
6034
- const To = [
6035
- [wo, Ue.ABS],
6036
- [xo, Ue.ACOS],
6037
- [Po, Ue.ACOSH],
6038
- [Vo, Ue.ACOT],
6039
- [vo, Ue.MOD],
6040
- [Oo, Ue.SUBTOTAL],
6041
- [Fo, Ue.SUM],
6042
- [ko, Ue.SUMIF],
6043
- [$o, Ue.SUMIFS],
6044
- [Uo, Ue.POWER],
6045
- [Bo, Ue.PRODUCT]
6047
+ const jo = [
6048
+ [xo, Ue.ABS],
6049
+ [Po, Ue.ACOS],
6050
+ [Vo, Ue.ACOSH],
6051
+ [vo, Ue.ACOT],
6052
+ [Uo, Ue.MOD],
6053
+ [Fo, Ue.SUBTOTAL],
6054
+ [Mo, Ue.SUM],
6055
+ [$o, Ue.SUMIF],
6056
+ [To, Ue.SUMIFS],
6057
+ [Bo, Ue.POWER],
6058
+ [Oo, Ue.PRODUCT]
6046
6059
  ];
6047
- class jo extends k {
6060
+ class Yo extends k {
6048
6061
  constructor() {
6049
6062
  super(...arguments);
6050
6063
  D(this, "_compareType", B.EQUALS);
@@ -6107,7 +6120,7 @@ class Mn extends dt {
6107
6120
  }), e;
6108
6121
  }
6109
6122
  }
6110
- class Yo extends k {
6123
+ class Qo extends k {
6111
6124
  calculate(...r) {
6112
6125
  if (r.length === 0)
6113
6126
  return h.create(f.VALUE);
@@ -6123,36 +6136,36 @@ class Yo extends k {
6123
6136
  return Mn.create(e);
6124
6137
  }
6125
6138
  }
6126
- class Qo extends k {
6139
+ class zo extends k {
6127
6140
  calculate(r, e) {
6128
6141
  return r.isError() ? r : e.isError() ? e : !e.isArray() && e.getValue() === 0 ? h.create(f.DIV_BY_ZERO) : r.divided(e);
6129
6142
  }
6130
6143
  }
6131
6144
  var we = /* @__PURE__ */ ((n) => (n.COMPARE = "COMPARE", n.DIVIDED = "DIVIDED", n.MINUS = "MINUS", n.MULTIPLY = "MULTIPLY", n.PLUS = "PLUS", n.UNION = "UNION", n.CUBE = "CUBE", n))(we || {});
6132
- class zo extends k {
6145
+ class Ho extends k {
6133
6146
  calculate(r, e) {
6134
6147
  return r.isError() ? r : e.isError() ? e : r.minus(e);
6135
6148
  }
6136
6149
  }
6137
- class Ho extends k {
6150
+ class Io extends k {
6138
6151
  calculate(r, e) {
6139
6152
  return r.isError() ? r : e.isError() ? e : r.multiply(e);
6140
6153
  }
6141
6154
  }
6142
- class Io extends k {
6155
+ class Wo extends k {
6143
6156
  calculate(r, e) {
6144
6157
  return r.isError() ? r : e.isError() ? e : r.plus(e);
6145
6158
  }
6146
6159
  }
6147
- const Wo = [
6148
- [jo, we.COMPARE],
6149
- [Qo, we.DIVIDED],
6150
- [zo, we.MINUS],
6151
- [Ho, we.MULTIPLY],
6152
- [Io, we.PLUS],
6153
- [Yo, we.CUBE]
6160
+ const Xo = [
6161
+ [Yo, we.COMPARE],
6162
+ [zo, we.DIVIDED],
6163
+ [Ho, we.MINUS],
6164
+ [Io, we.MULTIPLY],
6165
+ [Wo, we.PLUS],
6166
+ [Qo, we.CUBE]
6154
6167
  ];
6155
- class Xo extends k {
6168
+ class Go extends k {
6156
6169
  calculate(...r) {
6157
6170
  if (r.length === 0)
6158
6171
  return h.create(f.NA);
@@ -6171,7 +6184,7 @@ class Xo extends k {
6171
6184
  return e.divided(t);
6172
6185
  }
6173
6186
  }
6174
- class Go extends k {
6187
+ class Ko extends k {
6175
6188
  calculate(...r) {
6176
6189
  if (r.length === 0)
6177
6190
  return h.create(f.NA);
@@ -6183,7 +6196,7 @@ class Go extends k {
6183
6196
  return e;
6184
6197
  }
6185
6198
  }
6186
- class Ko extends k {
6199
+ class qo extends k {
6187
6200
  calculate(...r) {
6188
6201
  if (r.length === 0)
6189
6202
  return h.create(f.NA);
@@ -6200,7 +6213,7 @@ class Ko extends k {
6200
6213
  }
6201
6214
  }
6202
6215
  var Le = /* @__PURE__ */ ((n) => (n.AVEDEV = "AVEDEV", n.AVERAGE = "AVERAGE", n.AVERAGEA = "AVERAGEA", n.AVERAGEIF = "AVERAGEIF", n.AVERAGEIFS = "AVERAGEIFS", n.BETA_DIST = "BETA.DIST", n.BETA_INV = "BETA.INV", n.BINOM_DIST = "BINOM.DIST", n.BINOM_DIST_RANGE = "BINOM.DIST.RANGE", n.BINOM_INV = "BINOM.INV", n.CHISQ_DIST = "CHISQ.DIST", n.CHISQ_DIST_RT = "CHISQ.DIST.RT", n.CHISQ_INV = "CHISQ.INV", n.CHISQ_INV_RT = "CHISQ.INV.RT", n.CHISQ_TEST = "CHISQ.TEST", n.CONFIDENCE_NORM = "CONFIDENCE.NORM", n.CONFIDENCE_T = "CONFIDENCE.T", n.CORREL = "CORREL", n.COUNT = "COUNT", n.COUNTA = "COUNTA", n.COUNTBLANK = "COUNTBLANK", n.COUNTIF = "COUNTIF", n.COUNTIFS = "COUNTIFS", n.COVARIANCE_P = "COVARIANCE.P", n.COVARIANCE_S = "COVARIANCE.S", n.DEVSQ = "DEVSQ", n.EXPON_DIST = "EXPON.DIST", n.F_DIST = "F.DIST", n.F_DIST_RT = "F.DIST.RT", n.F_INV = "F.INV", n.F_INV_RT = "F.INV.RT", n.F_TEST = "F.TEST", n.FISHER = "FISHER", n.FISHERINV = "FISHERINV", n.FORECAST = "FORECAST", n.FORECAST_ETS = "FORECAST.ETS", n.FORECAST_ETS_CONFINT = "FORECAST.ETS.CONFINT", n.FORECAST_ETS_SEASONALITY = "FORECAST.ETS.SEASONALITY", n.FORECAST_ETS_STAT = "FORECAST.ETS.STAT", n.FORECAST_LINEAR = "FORECAST.LINEAR", n.FREQUENCY = "FREQUENCY", n.GAMMA = "GAMMA", n.GAMMA_DIST = "GAMMA.DIST", n.GAMMA_INV = "GAMMA.INV", n.GAMMALN = "GAMMALN", n.GAMMALN_PRECISE = "GAMMALN.PRECISE", n.GAUSS = "GAUSS", n.GEOMEAN = "GEOMEAN", n.GROWTH = "GROWTH", n.HARMEAN = "HARMEAN", n.HYPGEOM_DIST = "HYPGEOM.DIST", n.INTERCEPT = "INTERCEPT", n.KURT = "KURT", n.LARGE = "LARGE", n.LINEST = "LINEST", n.LOGEST = "LOGEST", n.LOGNORM_DIST = "LOGNORM.DIST", n.LOGNORM_INV = "LOGNORM.INV", n.MAX = "MAX", n.MAXA = "MAXA", n.MAXIFS = "MAXIFS", n.MEDIAN = "MEDIAN", n.MIN = "MIN", n.MINA = "MINA", n.MINIFS = "MINIFS", n.MODE_MULT = "MODE.MULT", n.MODE_SNGL = "MODE.SNGL", n.NEGBINOM_DIST = "NEGBINOM.DIST", n.NORM_DIST = "NORM.DIST", n.NORM_INV = "NORM.INV", n.NORM_S_DIST = "NORM.S.DIST", n.NORM_S_INV = "NORM.S.INV", n.PEARSON = "PEARSON", n.PERCENTILE_EXC = "PERCENTILE.EXC", n.PERCENTILE_INC = "PERCENTILE.INC", n.PERCENTRANK_EXC = "PERCENTRANK.EXC", n.PERCENTRANK_INC = "PERCENTRANK.INC", n.PERMUT = "PERMUT", n.PERMUTATIONA = "PERMUTATIONA", n.PHI = "PHI", n.POISSON_DIST = "POISSON.DIST", n.PROB = "PROB", n.QUARTILE_EXC = "QUARTILE.EXC", n.QUARTILE_INC = "QUARTILE.INC", n.RANK_AVG = "RANK.AVG", n.RANK_EQ = "RANK.EQ", n.RSQ = "RSQ", n.SKEW = "SKEW", n.SKEW_P = "SKEW.P", n.SLOPE = "SLOPE", n.SMALL = "SMALL", n.STANDARDIZE = "STANDARDIZE", n.STDEV_P = "STDEV.P", n.STDEV_S = "STDEV.S", n.STDEVA = "STDEVA", n.STDEVPA = "STDEVPA", n.STEYX = "STEYX", n.T_DIST = "T.DIST", n.T_DIST_2T = "T.DIST.2T", n.T_DIST_RT = "T.DIST.RT", n.T_INV = "T.INV", n.T_INV_2T = "T.INV.2T", n.T_TEST = "T.TEST", n.TREND = "TREND", n.TRIMMEAN = "TRIMMEAN", n.VAR_P = "VAR.P", n.VAR_S = "VAR.S", n.VARA = "VARA", n.VARPA = "VARPA", n.WEIBULL_DIST = "WEIBULL.DIST", n.Z_TEST = "Z.TEST", n))(Le || {});
6203
- class qo extends k {
6216
+ class Zo extends k {
6204
6217
  calculate(...r) {
6205
6218
  if (r.length === 0)
6206
6219
  return h.create(f.NA);
@@ -6236,7 +6249,7 @@ class _s extends k {
6236
6249
  return r.isGreaterThan(e).getValue() && (r = e), r;
6237
6250
  }
6238
6251
  }
6239
- class Zo extends k {
6252
+ class Jo extends k {
6240
6253
  calculate(...r) {
6241
6254
  if (r.length === 0)
6242
6255
  return h.create(f.NA);
@@ -6244,7 +6257,7 @@ class Zo extends k {
6244
6257
  return e.isError() ? e : e.std(1);
6245
6258
  }
6246
6259
  }
6247
- class Jo extends k {
6260
+ class No extends k {
6248
6261
  calculate(...r) {
6249
6262
  if (r.length === 0)
6250
6263
  return h.create(f.NA);
@@ -6252,7 +6265,7 @@ class Jo extends k {
6252
6265
  return e.isError() ? e : e.std();
6253
6266
  }
6254
6267
  }
6255
- class No extends k {
6268
+ class eu extends k {
6256
6269
  calculate(...r) {
6257
6270
  if (r.length === 0)
6258
6271
  return h.create(f.NA);
@@ -6260,7 +6273,7 @@ class No extends k {
6260
6273
  return e.isError() ? e : e.var(1);
6261
6274
  }
6262
6275
  }
6263
- class eu extends k {
6276
+ class tu extends k {
6264
6277
  calculate(...r) {
6265
6278
  if (r.length === 0)
6266
6279
  return h.create(f.NA);
@@ -6268,7 +6281,7 @@ class eu extends k {
6268
6281
  return e.isError() ? e : e.var();
6269
6282
  }
6270
6283
  }
6271
- class tu extends k {
6284
+ class ru extends k {
6272
6285
  calculate(r, ...e) {
6273
6286
  if (r === null || e.length < 2 || r.isError())
6274
6287
  return h.create(f.NA);
@@ -6314,24 +6327,24 @@ class tu extends k {
6314
6327
  return Se.create(c);
6315
6328
  }
6316
6329
  }
6317
- const ru = [
6318
- [Xo, Le.AVERAGE],
6319
- [Go, Le.COUNT],
6320
- [qo, Le.MAX],
6330
+ const nu = [
6331
+ [Go, Le.AVERAGE],
6332
+ [Ko, Le.COUNT],
6333
+ [Zo, Le.MAX],
6321
6334
  [_s, Le.MIN],
6322
6335
  [_s, Le.MIN],
6323
- [Ko, Le.COUNTA],
6336
+ [qo, Le.COUNTA],
6324
6337
  [Xs, Le.STDEV_P],
6325
6338
  [Gs, Le.STDEV_S],
6326
- [Zo, Le.STDEVA],
6327
- [Jo, Le.STDEVPA],
6339
+ [Jo, Le.STDEVA],
6340
+ [No, Le.STDEVPA],
6328
6341
  [Ks, Le.VAR_P],
6329
6342
  [qs, Le.VAR_S],
6330
- [No, Le.VARA],
6331
- [eu, Le.VARPA],
6332
- [tu, Le.MAXIFS]
6343
+ [eu, Le.VARA],
6344
+ [tu, Le.VARPA],
6345
+ [ru, Le.MAXIFS]
6333
6346
  ];
6334
- class nu extends k {
6347
+ class su extends k {
6335
6348
  calculate(...r) {
6336
6349
  if (r.length === 0)
6337
6350
  return h.create(f.NA);
@@ -6359,7 +6372,7 @@ class nu extends k {
6359
6372
  }
6360
6373
  }
6361
6374
  var Ct = /* @__PURE__ */ ((n) => (n.ASC = "ASC", n.ARRAYTOTEXT = "ARRAYTOTEXT", n.BAHTTEXT = "BAHTTEXT", n.CHAR = "CHAR", n.CLEAN = "CLEAN", n.CODE = "CODE", n.CONCAT = "CONCAT", n.CONCATENATE = "CONCATENATE", n.DBCS = "DBCS", n.DOLLAR = "DOLLAR", n.EXACT = "EXACT", n.FIND = "FIND", n.FINDB = "FINDB", n.FIXED = "FIXED", n.LEFT = "LEFT", n.LEFTB = "LEFTB", n.LEN = "LEN", n.LENB = "LENB", n.LOWER = "LOWER", n.MID = "MID", n.MIDB = "MIDB", n.NUMBERVALUE = "NUMBERVALUE", n.PHONETIC = "PHONETIC", n.PROPER = "PROPER", n.REPLACE = "REPLACE", n.REPLACEB = "REPLACEB", n.REPT = "REPT", n.RIGHT = "RIGHT", n.RIGHTB = "RIGHTB", n.SEARCH = "SEARCH", n.SEARCHB = "SEARCHB", n.SUBSTITUTE = "SUBSTITUTE", n.T = "T", n.TEXT = "TEXT", n.TEXTAFTER = "TEXTAFTER", n.TEXTBEFORE = "TEXTBEFORE", n.TEXTJOIN = "TEXTJOIN", n.TEXTSPLIT = "TEXTSPLIT", n.TRIM = "TRIM", n.UNICHAR = "UNICHAR", n.UNICODE = "UNICODE", n.UPPER = "UPPER", n.VALUE = "VALUE", n.VALUETOTEXT = "VALUETOTEXT", n.CALL = "CALL", n.EUROCONVERT = "EUROCONVERT", n.REGISTER_ID = "REGISTER.ID", n))(Ct || {});
6362
- class su extends k {
6375
+ class iu extends k {
6363
6376
  calculate(r) {
6364
6377
  return r == null ? h.create(f.NA) : r.isError() ? r : r.isArray() ? r.mapValue((e) => this._handleSingleText(e)) : this._handleSingleText(r);
6365
6378
  }
@@ -6375,7 +6388,7 @@ class su extends k {
6375
6388
  return h.create(f.VALUE);
6376
6389
  }
6377
6390
  }
6378
- function iu(n) {
6391
+ function au(n) {
6379
6392
  let r = 0;
6380
6393
  for (let e = 0; e < n.length; e++) {
6381
6394
  const t = n.charCodeAt(e);
@@ -6385,7 +6398,7 @@ function iu(n) {
6385
6398
  }
6386
6399
  return r;
6387
6400
  }
6388
- class au extends k {
6401
+ class ou extends k {
6389
6402
  calculate(r) {
6390
6403
  return r == null ? h.create(f.NA) : r.isError() ? r : r.isArray() ? r.mapValue((e) => this._handleSingleText(e)) : this._handleSingleText(r);
6391
6404
  }
@@ -6395,21 +6408,21 @@ class au extends k {
6395
6408
  if (r.isNull())
6396
6409
  return b.create(0);
6397
6410
  if (r.isString() || r.isBoolean() || r.isNumber()) {
6398
- const e = r.getValue().toString(), t = iu(e);
6411
+ const e = r.getValue().toString(), t = au(e);
6399
6412
  return b.create(t);
6400
6413
  }
6401
6414
  return h.create(f.VALUE);
6402
6415
  }
6403
6416
  }
6404
- var ou = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6405
- function uu(n) {
6417
+ var uu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6418
+ function cu(n) {
6406
6419
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
6407
6420
  }
6408
6421
  var Js = { exports: {} };
6409
6422
  (function(n, r) {
6410
6423
  (function(e, t) {
6411
6424
  n.exports = t();
6412
- })(typeof self < "u" ? self : ou, function() {
6425
+ })(typeof self < "u" ? self : uu, function() {
6413
6426
  return function() {
6414
6427
  var e = { d: function(p, g) {
6415
6428
  for (var R in g)
@@ -6463,10 +6476,10 @@ var Js = { exports: {} };
6463
6476
  return Math.round(p);
6464
6477
  }
6465
6478
  _.isDefault = !0, m({ group: ",", ampm: ["上午", "下午"], mmmm: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], mmm: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], dddd: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], ddd: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"] }, "zh_CN"), m({ group: ",", nan: "非數值", ampm: ["上午", "下午"], mmmm: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], mmm: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], dddd: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], ddd: ["週日", "週一", "週二", "週三", "週四", "週五", "週六"] }, "zh_TW"), m({ group: ",", ampm: ["午前", "午後"], mmmm: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], mmm: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], dddd: ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"], ddd: ["日", "月", "火", "水", "木", "金", "土"] }, "ja"), m({ group: ",", ampm: ["오전", "오후"], mmmm: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], mmm: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], dddd: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], ddd: ["일", "월", "화", "수", "목", "금", "토"] }, "ko"), m({ group: ",", ampm: ["ก่อนเที่ยง", "หลังเที่ยง"], mmmm: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"], mmm: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."], dddd: ["วันอาทิตย์", "วันจันทร์", "วันอังคาร", "วันพุธ", "วันพฤหัสบดี", "วันศุกร์", "วันเสาร์"], ddd: ["อา.", "จ.", "อ.", "พ.", "พฤ.", "ศ.", "ส."] }, "th"), m({ decimal: ",", ampm: ["dop.", "odp."], mmmm: ["ledna", "února", "března", "dubna", "května", "června", "července", "srpna", "září", "října", "listopadu", "prosince"], mmm: ["led", "úno", "bře", "dub", "kvě", "čvn", "čvc", "srp", "zář", "říj", "lis", "pro"], dddd: ["neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota"], ddd: ["ne", "po", "út", "st", "čt", "pá", "so"] }, "cs"), m({ group: ".", decimal: ",", mmmm: ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"], mmm: ["jan.", "feb.", "mar.", "apr.", "maj", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."], dddd: ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"], ddd: ["søn.", "man.", "tir.", "ons.", "tor.", "fre.", "lør."] }, "da"), m({ group: ".", decimal: ",", ampm: ["a.m.", "p.m."], mmmm: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], mmm: ["jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."], dddd: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], ddd: ["zo", "ma", "di", "wo", "do", "vr", "za"] }, "nl"), m({ group: "," }, "en"), m({ decimal: ",", nan: "epäluku", ampm: ["ap.", "ip."], mmmm: ["tammikuuta", "helmikuuta", "maaliskuuta", "huhtikuuta", "toukokuuta", "kesäkuuta", "heinäkuuta", "elokuuta", "syyskuuta", "lokakuuta", "marraskuuta", "joulukuuta"], mmm: ["tammik.", "helmik.", "maalisk.", "huhtik.", "toukok.", "kesäk.", "heinäk.", "elok.", "syysk.", "lokak.", "marrask.", "jouluk."], dddd: ["sunnuntaina", "maanantaina", "tiistaina", "keskiviikkona", "torstaina", "perjantaina", "lauantaina"], ddd: ["su", "ma", "ti", "ke", "to", "pe", "la"] }, "fi"), m({ group: " ", decimal: ",", mmmm: ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], mmm: ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."], dddd: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], ddd: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."] }, "fr"), m({ group: ".", decimal: ",", mmmm: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], mmm: ["Jan.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sept.", "Okt.", "Nov.", "Dez."], dddd: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], ddd: ["So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."] }, "de"), m({ group: ".", decimal: ",", ampm: ["π.μ.", "μ.μ."], mmmm: ["Ιανουαρίου", "Φεβρουαρίου", "Μαρτίου", "Απριλίου", "Μαΐου", "Ιουνίου", "Ιουλίου", "Αυγούστου", "Σεπτεμβρίου", "Οκτωβρίου", "Νοεμβρίου", "Δεκεμβρίου"], mmm: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μαΐ", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"], dddd: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"], ddd: ["Κυρ", "Δευ", "Τρί", "Τετ", "Πέμ", "Παρ", "Σάβ"] }, "el"), m({ decimal: ",", ampm: ["de.", "du."], mmmm: ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"], mmm: ["jan.", "febr.", "márc.", "ápr.", "máj.", "jún.", "júl.", "aug.", "szept.", "okt.", "nov.", "dec."], dddd: ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"], ddd: ["V", "H", "K", "Sze", "Cs", "P", "Szo"] }, "hu"), m({ group: ".", decimal: ",", ampm: ["f.h.", "e.h."], mmmm: ["janúar", "febrúar", "mars", "apríl", "maí", "júní", "júlí", "ágúst", "september", "október", "nóvember", "desember"], mmm: ["jan.", "feb.", "mar.", "apr.", "maí", "jún.", "júl.", "ágú.", "sep.", "okt.", "nóv.", "des."], dddd: ["sunnudagur", "mánudagur", "þriðjudagur", "miðvikudagur", "fimmtudagur", "föstudagur", "laugardagur"], ddd: ["sun.", "mán.", "þri.", "mið.", "fim.", "fös.", "lau."] }, "is"), m({ group: ".", decimal: ",", mmmm: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], mmm: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agu", "Sep", "Okt", "Nov", "Des"], dddd: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"], ddd: ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"] }, "id"), m({ group: ".", decimal: ",", mmmm: ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"], mmm: ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"], dddd: ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"], ddd: ["dom", "lun", "mar", "mer", "gio", "ven", "sab"] }, "it"), m({ decimal: ",", ampm: ["a.m.", "p.m."], mmmm: ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"], mmm: ["jan.", "feb.", "mar.", "apr.", "mai", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "des."], dddd: ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"], ddd: ["søn.", "man.", "tir.", "ons.", "tor.", "fre.", "lør."] }, "nb"), m({ decimal: ",", mmmm: ["stycznia", "lutego", "marca", "kwietnia", "maja", "czerwca", "lipca", "sierpnia", "września", "października", "listopada", "grudnia"], mmm: ["sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paź", "lis", "gru"], dddd: ["niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"], ddd: ["niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."] }, "pl"), m({ group: ".", decimal: ",", mmmm: ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"], mmm: ["jan.", "fev.", "mar.", "abr.", "mai.", "jun.", "jul.", "ago.", "set.", "out.", "nov.", "dez."], dddd: ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"], ddd: ["dom.", "seg.", "ter.", "qua.", "qui.", "sex.", "sáb."] }, "pt"), m({ decimal: ",", nan: "не число", mmmm: ["января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"], mmm: ["янв.", "февр.", "мар.", "апр.", "мая", "июн.", "июл.", "авг.", "сент.", "окт.", "нояб.", "дек."], dddd: ["воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"], ddd: ["вс", "пн", "вт", "ср", "чт", "пт", "сб"] }, "ru"), m({ decimal: ",", mmmm: ["januára", "februára", "marca", "apríla", "mája", "júna", "júla", "augusta", "septembra", "októbra", "novembra", "decembra"], mmm: ["jan", "feb", "mar", "apr", "máj", "jún", "júl", "aug", "sep", "okt", "nov", "dec"], dddd: ["nedeľa", "pondelok", "utorok", "streda", "štvrtok", "piatok", "sobota"], ddd: ["ne", "po", "ut", "st", "št", "pi", "so"] }, "sk"), m({ group: ".", decimal: ",", ampm: ["a. m.", "p. m."], mmmm: ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], mmm: ["ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."], dddd: ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], ddd: ["dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."] }, "es"), m({ decimal: ",", ampm: ["fm", "em"], mmmm: ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"], mmm: ["jan.", "feb.", "mars", "apr.", "maj", "juni", "juli", "aug.", "sep.", "okt.", "nov.", "dec."], dddd: ["söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"], ddd: ["sön", "mån", "tis", "ons", "tors", "fre", "lör"] }, "sv"), m({ group: ".", decimal: ",", ampm: ["ÖÖ", "ÖS"], mmmm: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], mmm: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], dddd: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"], ddd: ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"] }, "tr");
6466
- function y(p, g, R) {
6479
+ function E(p, g, R) {
6467
6480
  const A = p < 0 ? -1 : 1, x = 10 ** (g || 2), O = 10 ** (R || 2);
6468
- let P, w, E = Math.abs(p), $ = 0, Q = 0, v = 0, z = 1;
6469
- if ((p = E) % 1 == 0)
6481
+ let P, w, y = Math.abs(p), $ = 0, Q = 0, v = 0, z = 1;
6482
+ if ((p = y) % 1 == 0)
6470
6483
  w = [p * A, 1];
6471
6484
  else if (p < 1e-19)
6472
6485
  w = [A, 1e19];
@@ -6474,9 +6487,9 @@ var Js = { exports: {} };
6474
6487
  w = [1e19 * A, 1];
6475
6488
  else {
6476
6489
  do
6477
- if (E = 1 / (E - Math.floor(E)), P = z, z = z * Math.floor(E) + $, $ = P, Q = v, v = Math.floor(p * z + 0.5), v >= x || z >= O)
6490
+ if (y = 1 / (y - Math.floor(y)), P = z, z = z * Math.floor(y) + $, $ = P, Q = v, v = Math.floor(p * z + 0.5), v >= x || z >= O)
6478
6491
  return [A * Q, $];
6479
- while (Math.abs(p - v / z) >= 1e-10 && E !== Math.floor(E));
6492
+ while (Math.abs(p - v / z) >= 1e-10 && y !== Math.floor(y));
6480
6493
  w = [A * v, z];
6481
6494
  }
6482
6495
  return w;
@@ -6515,35 +6528,35 @@ var Js = { exports: {} };
6515
6528
  const g = [], R = { scale: 1, percent: !1, text: !1, date: 0, date_eval: !1, date_system: 1, sec_decimals: 0, general: !1, clock: 24, int_pattern: [], frac_pattern: [], man_pattern: [], den_pattern: [], num_pattern: [], tokens: g };
6516
6529
  let A = p + "", x = "int", O = !1, P = null;
6517
6530
  const w = [];
6518
- let E, $, Q = !1;
6531
+ let y, $, Q = !1;
6519
6532
  for (; A && !O; ) {
6520
- if (E = /^General/i.exec(A))
6533
+ if (y = /^General/i.exec(A))
6521
6534
  R.general = !0, G({ type: "general" }, g);
6522
- else if (x === "int" && (E = /^[#?0]+(?:,[#?0]+)*/.exec(A)) || x === "den" && (E = /^[#?\d]+/.exec(A)) || (E = /^[#?0]+/.exec(A)))
6523
- R[x + "_pattern"].push(E[0]), P = { type: x, num: E[0] }, G(P, g);
6524
- else if ((E = /^\//.exec(A)) && R[x + "_pattern"].length) {
6535
+ else if (x === "int" && (y = /^[#?0]+(?:,[#?0]+)*/.exec(A)) || x === "den" && (y = /^[#?\d]+/.exec(A)) || (y = /^[#?0]+/.exec(A)))
6536
+ R[x + "_pattern"].push(y[0]), P = { type: x, num: y[0] }, G(P, g);
6537
+ else if ((y = /^\//.exec(A)) && R[x + "_pattern"].length) {
6525
6538
  if (!P)
6526
6539
  throw new SyntaxError("Missing a numerator in pattern ".concat(p));
6527
6540
  R.fractions = !0, R.num_pattern.push(R[x + "_pattern"].pop()), P.type = "num", x = "den", G({ type: "div" }, g);
6528
- } else if (E = /^,+/.exec(A)) {
6541
+ } else if (y = /^,+/.exec(A)) {
6529
6542
  const U = A.charAt(1) in M;
6530
- $.slice(-1) in M && (E[0].length > 1 || !U) ? R.scale = 1e-3 ** E[0].length : R.dec_fractions || G(E[0], g);
6543
+ $.slice(-1) in M && (y[0].length > 1 || !U) ? R.scale = 1e-3 ** y[0].length : R.dec_fractions || G(y[0], g);
6531
6544
  } else {
6532
- if (E = /^;/.exec(A)) {
6545
+ if (y = /^;/.exec(A)) {
6533
6546
  O = !0;
6534
6547
  break;
6535
6548
  }
6536
- if (E = /^[@+-]/.exec(A))
6537
- E[0] === "@" && (R.text = !0), G({ type: H[E[0]] }, g);
6538
- else if (E = /^(?:\[(h+|m+|s+)\])/i.exec(A)) {
6539
- const U = E[1].toLowerCase(), j = U[0], X = { type: "", size: 0, date: 1, raw: E[0], pad: U.length };
6549
+ if (y = /^[@+-]/.exec(A))
6550
+ y[0] === "@" && (R.text = !0), G({ type: H[y[0]] }, g);
6551
+ else if (y = /^(?:\[(h+|m+|s+)\])/i.exec(A)) {
6552
+ const U = y[1].toLowerCase(), j = U[0], X = { type: "", size: 0, date: 1, raw: y[0], pad: U.length };
6540
6553
  j === "h" ? (X.size = 16, X.type = "hour-elap") : j === "m" ? (X.size = 32, X.type = "min-elap") : (X.size = 64, X.type = "sec-elap"), R.date = R.date | X.size, w.push(X), G(X, g);
6541
- } else if (E = /^(?:B2)/i.exec(A))
6554
+ } else if (y = /^(?:B2)/i.exec(A))
6542
6555
  Q || (R.date_system = 6);
6543
- else if (E = /^(?:B1)/i.exec(A))
6556
+ else if (y = /^(?:B1)/i.exec(A))
6544
6557
  Q || (R.date_system = 1);
6545
- else if (E = /^(?:([hHmMsSyYbBdDegG])\1*)/.exec(A)) {
6546
- const U = { type: "", size: 0, date: 1, raw: E[0] }, j = E[0].toLowerCase(), X = j[0];
6558
+ else if (y = /^(?:([hHmMsSyYbBdDegG])\1*)/.exec(A)) {
6559
+ const U = { type: "", size: 0, date: 1, raw: y[0] }, j = y[0].toLowerCase(), X = j[0];
6547
6560
  if (j === "y" || j === "yy")
6548
6561
  U.size = 2, U.type = "year-short";
6549
6562
  else if (X === "y" || X === "e")
@@ -6570,41 +6583,41 @@ var Js = { exports: {} };
6570
6583
  N && 32 & N.size ? U.used = !0 : N && N.indeterminate && (delete N.indeterminate, N.size = 32, N.type = "min", U.used = !0);
6571
6584
  }
6572
6585
  R.date = R.date | U.size, R.date_eval = !0, w.push(U), G(U, g);
6573
- } else if (E = /^(?:AM\/PM|am\/pm|A\/P)/.exec(A))
6574
- R.clock = 12, R.date = 16 | R.date, R.date_eval = !0, G({ type: "am", short: E[0] === "A/P" }, g);
6575
- else if (R.date && (E = /^\.0{1,3}/i.exec(A))) {
6576
- const U = E[0].length - 1, j = [64, 128, 256, 512][U];
6577
- R.date = R.date | j, R.date_eval = !0, R.sec_decimals = Math.max(R.sec_decimals, U), G({ type: "subsec", size: j, decimals: U, date: 1, raw: E[0] }, g);
6578
- } else if ((E = /^\\(.)/.exec(A)) || (E = /^"([^"]*?)"/.exec(A)))
6579
- G(E[1], g);
6580
- else if (E = /^\[(<[=>]?|>=?|=)\s*(-?[.\d]+)\]/.exec(A))
6581
- R.condition = [E[1], parseFloat(E[2], 10)];
6582
- else if (E = /^\[\$([^\]]+)\]/.exec(A)) {
6583
- const U = E[1].split("-"), j = U.length < 2 ? "" : U[U.length - 1], X = U[0];
6586
+ } else if (y = /^(?:AM\/PM|am\/pm|A\/P)/.exec(A))
6587
+ R.clock = 12, R.date = 16 | R.date, R.date_eval = !0, G({ type: "am", short: y[0] === "A/P" }, g);
6588
+ else if (R.date && (y = /^\.0{1,3}/i.exec(A))) {
6589
+ const U = y[0].length - 1, j = [64, 128, 256, 512][U];
6590
+ R.date = R.date | j, R.date_eval = !0, R.sec_decimals = Math.max(R.sec_decimals, U), G({ type: "subsec", size: j, decimals: U, date: 1, raw: y[0] }, g);
6591
+ } else if ((y = /^\\(.)/.exec(A)) || (y = /^"([^"]*?)"/.exec(A)))
6592
+ G(y[1], g);
6593
+ else if (y = /^\[(<[=>]?|>=?|=)\s*(-?[.\d]+)\]/.exec(A))
6594
+ R.condition = [y[1], parseFloat(y[2], 10)];
6595
+ else if (y = /^\[\$([^\]]+)\]/.exec(A)) {
6596
+ const U = y[1].split("-"), j = U.length < 2 ? "" : U[U.length - 1], X = U[0];
6584
6597
  X && G(X, g);
6585
6598
  const N = c(j);
6586
6599
  N && (R.locale = N);
6587
6600
  const ne = parseInt(j, 16);
6588
6601
  isFinite(ne) && 16711680 & ne && (ne >> 16 & 255) === 6 && (R.date_system = 6), Q = !0;
6589
- } else if (E = /^\[(black|blue|cyan|green|magenta|red|white|yellow|color\s*(\d+))\]/i.exec(A))
6590
- R.color = E[2] ? de[parseInt(E[2], 10)] || "#000" : E[1].toLowerCase();
6591
- else if (!(E = /^\[(DBNum1|ENG|HIJ|JPN|TWN)\]/i.exec(A))) {
6592
- if (E = /^%/.exec(A))
6602
+ } else if (y = /^\[(black|blue|cyan|green|magenta|red|white|yellow|color\s*(\d+))\]/i.exec(A))
6603
+ R.color = y[2] ? de[parseInt(y[2], 10)] || "#000" : y[1].toLowerCase();
6604
+ else if (!(y = /^\[(DBNum1|ENG|HIJ|JPN|TWN)\]/i.exec(A))) {
6605
+ if (y = /^%/.exec(A))
6593
6606
  R.scale = 100, R.percent = !0, G("%", g);
6594
- else if (E = /^_(\\.|.)/.exec(A))
6607
+ else if (y = /^_(\\.|.)/.exec(A))
6595
6608
  G(" ", g);
6596
- else if (E = /^\./.exec(A))
6597
- G({ type: "point", value: E[0] }, g), R.dec_fractions = !0, x = "frac";
6598
- else if (E = /^[Ee]([+-]?|(?=[0#?]))/.exec(A))
6599
- R.exponential = !0, R.exp_plus = E[1] === "+", x = "man", G({ type: "exp", plus: E[1] === "+" }, g);
6600
- else if (!(E = /^\*(\\.|.)/.exec(A))) {
6601
- if (E = /^[BENn[]/.exec(A))
6609
+ else if (y = /^\./.exec(A))
6610
+ G({ type: "point", value: y[0] }, g), R.dec_fractions = !0, x = "frac";
6611
+ else if (y = /^[Ee]([+-]?|(?=[0#?]))/.exec(A))
6612
+ R.exponential = !0, R.exp_plus = y[1] === "+", x = "man", G({ type: "exp", plus: y[1] === "+" }, g);
6613
+ else if (!(y = /^\*(\\.|.)/.exec(A))) {
6614
+ if (y = /^[BENn[]/.exec(A))
6602
6615
  throw new SyntaxError("Unexpected char ".concat(A.charAt(0), " in pattern ").concat(p));
6603
- A[0] === "(" && (R.parens = !0), E = [A[0]], G(E[0], g);
6616
+ A[0] === "(" && (R.parens = !0), y = [A[0]], G(y[0], g);
6604
6617
  }
6605
6618
  }
6606
6619
  }
6607
- $ = E[0], A = A.slice(E ? E[0].length : 1);
6620
+ $ = y[0], A = A.slice(y ? y[0].length : 1);
6608
6621
  }
6609
6622
  if (R.pattern = p.slice(0, p.length - A.length), /^((?:\[[^\]]+\])+)(;|$)/.test(R.pattern) && !/^\[(?:h+|m+|s+)\]/.test(R.pattern) && G({ type: "text" }, g), R.fractions && R.dec_fractions || R.fractions && R.exponential)
6610
6623
  throw new SyntaxError("Invalid pattern: ".concat(R.pattern));
@@ -6622,13 +6635,13 @@ var Js = { exports: {} };
6622
6635
  U.type === "string" && X && (X.type === "num" ? U.rule = "num+int" : X.type === "div" ? U.rule = "num" : X.type === "den" && (U.rule = "den"));
6623
6636
  }), R;
6624
6637
  }
6625
- const Hr = (p) => {
6638
+ const Ir = (p) => {
6626
6639
  const g = p.condition;
6627
6640
  g && g[1] < 0 && (g[0] === "<" || g[0] === "<=" || g[0] === "=") || p.tokens.unshift({ type: "minus", volatile: !0 });
6628
6641
  };
6629
6642
  function jn(p) {
6630
6643
  const g = [];
6631
- let R, A = !1, x = null, O = p, P = 0, w = !1, E = 0, $ = 0;
6644
+ let R, A = !1, x = null, O = p, P = 0, w = !1, y = 0, $ = 0;
6632
6645
  do {
6633
6646
  if (w = Me(O), (w.date || w.general) && (w.int_pattern.length || w.frac_pattern.length || w.scale !== 1 || w.text))
6634
6647
  throw new Error("Illegal format");
@@ -6637,8 +6650,8 @@ var Js = { exports: {} };
6637
6650
  throw new Error("Unexpected partition");
6638
6651
  x = w;
6639
6652
  }
6640
- w.locale && (R = c(w.locale)), g.push(w), P = O.charAt(w.pattern.length) === ";" ? 1 : 0, O = O.slice(w.pattern.length + P), E++;
6641
- } while (P && E < 4 && $ < 3);
6653
+ w.locale && (R = c(w.locale)), g.push(w), P = O.charAt(w.pattern.length) === ";" ? 1 : 0, O = O.slice(w.pattern.length + P), y++;
6654
+ } while (P && y < 4 && $ < 3);
6642
6655
  if (P)
6643
6656
  throw new Error("Unexpected partition");
6644
6657
  if ($ > 2)
@@ -6650,14 +6663,14 @@ var Js = { exports: {} };
6650
6663
  const v = g.length;
6651
6664
  if (v === 1 && (g[1] = Me("General"), g[1].generated = !0), v < 3) {
6652
6665
  const z = g[0], q = g[1];
6653
- if (Hr(z), q.condition)
6654
- Hr(q);
6666
+ if (Ir(z), q.condition)
6667
+ Ir(q);
6655
6668
  else {
6656
6669
  const W = z.condition;
6657
6670
  (W[0] === "=" || W[1] >= 0 && (W[0] === ">" || W[0] === ">=")) && q.tokens.unshift({ type: "minus", volatile: !0 });
6658
6671
  }
6659
6672
  } else
6660
- g.forEach(Hr);
6673
+ g.forEach(Ir);
6661
6674
  } else {
6662
6675
  if (g.length < 4 && x)
6663
6676
  for (let v = 0, z = g.length; v < z; v++)
@@ -6725,12 +6738,12 @@ var Js = { exports: {} };
6725
6738
  const A = ve(p);
6726
6739
  return g === 6 ? ui(A) : g === -1 ? oi(A) : Yn(A, R);
6727
6740
  }
6728
- const or = Math.floor, Ir = 86400;
6741
+ const or = Math.floor, Wr = 86400;
6729
6742
  function ur(p, g) {
6730
6743
  let R = null;
6731
6744
  if (Array.isArray(p)) {
6732
- const [A, x, O, P, w, E] = p;
6733
- R = Date.UTC(A, x == null ? 0 : x - 1, O != null ? O : 1, P || 0, w || 0, E || 0);
6745
+ const [A, x, O, P, w, y] = p;
6746
+ R = Date.UTC(A, x == null ? 0 : x - 1, O != null ? O : 1, P || 0, w || 0, y || 0);
6734
6747
  } else if (p instanceof Date && (R = 1 * p, !g || !g.ignoreTimezone)) {
6735
6748
  const A = /* @__PURE__ */ new Date();
6736
6749
  A.setUTCFullYear(p.getFullYear(), p.getMonth(), p.getDate()), A.setUTCHours(p.getHours(), p.getMinutes(), p.getSeconds(), p.getMilliseconds()), R = 1 * A;
@@ -6743,15 +6756,15 @@ var Js = { exports: {} };
6743
6756
  }
6744
6757
  function zn(p, g) {
6745
6758
  let R = 0 | p;
6746
- const A = Ir * (p - R);
6759
+ const A = Wr * (p - R);
6747
6760
  let x = or(A);
6748
- A - x > 0.9999 && (x += 1, x === Ir && (x = 0, R += 1));
6749
- const O = x < 0 ? Ir + x : x, [P, w, E] = Qn(p, 0, g && g.leap1900), $ = or(O / 60 / 60) % 60, Q = or(O / 60) % 60, v = or(O) % 60;
6761
+ A - x > 0.9999 && (x += 1, x === Wr && (x = 0, R += 1));
6762
+ const O = x < 0 ? Wr + x : x, [P, w, y] = Qn(p, 0, g && g.leap1900), $ = or(O / 60 / 60) % 60, Q = or(O / 60) % 60, v = or(O) % 60;
6750
6763
  if (g && g.nativeDate) {
6751
6764
  const z = /* @__PURE__ */ new Date(0);
6752
- return z.setUTCFullYear(P, w - 1, E), z.setUTCHours($, Q, v), z;
6765
+ return z.setUTCFullYear(P, w - 1, y), z.setUTCHours($, Q, v), z;
6753
6766
  }
6754
- return [P, w, E, $, Q, v];
6767
+ return [P, w, y, $, Q, v];
6755
6768
  }
6756
6769
  function ci(p) {
6757
6770
  return !!(p[0] && p[0].percent || p[1] && p[1].percent || p[2] && p[2].percent || p[3] && p[3].percent);
@@ -6774,7 +6787,7 @@ var Js = { exports: {} };
6774
6787
  const O = Math.abs(R);
6775
6788
  let P = O ? Math.floor(Math.log10(O)) : 0, w = P < 0 ? O * 10 ** -P : O / 10 ** P;
6776
6789
  w === 10 && (w = 1, P++);
6777
- const E = function(Q) {
6790
+ const y = function(Q) {
6778
6791
  let v = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
6779
6792
  const z = Math.abs(Q);
6780
6793
  if (!z)
@@ -6807,13 +6820,13 @@ var Js = { exports: {} };
6807
6820
  const Q = O.toFixed(10).slice(0, 12).replace(/\.$/, "");
6808
6821
  p.push(Qt(Q, A));
6809
6822
  } else if (Math.abs(P) <= 9)
6810
- if (E.total <= 11) {
6811
- const Q = C(O, 9).toFixed(E.frac);
6823
+ if (y.total <= 11) {
6824
+ const Q = C(O, 9).toFixed(y.frac);
6812
6825
  p.push(Qt(Q, A));
6813
6826
  } else
6814
6827
  P === 9 ? p.push(Math.floor(O)) : P >= 0 && P < 9 ? p.push(C(O, 9 - P)) : $();
6815
6828
  else
6816
- E.total >= 12 ? $() : Math.floor(O) === O ? p.push(Math.floor(O)) : p.push(Qt(C(O, 9).toFixed(E.frac), A));
6829
+ y.total >= 12 ? $() : Math.floor(O) === O ? p.push(Math.floor(O)) : p.push(Qt(C(O, 9).toFixed(y.frac), A));
6817
6830
  }
6818
6831
  return p;
6819
6832
  }
@@ -6823,7 +6836,7 @@ var Js = { exports: {} };
6823
6836
  return g > 1 ? Math.floor(R / g) * g : R;
6824
6837
  };
6825
6838
  function Xn(p, g, R, A) {
6826
- let x = "", O = "", P = "", w = "", E = "", $ = 0, Q = 0 | p, v = 0, z = 0, q = 1, W = 0, U = 0, j = 0, X = 0, N = 0, ne = 0;
6839
+ let x = "", O = "", P = "", w = "", y = "", $ = 0, Q = 0 | p, v = 0, z = 0, q = 1, W = 0, U = 0, j = 0, X = 0, N = 0, ne = 0;
6827
6840
  const re = A || _;
6828
6841
  if (!g.text && isFinite(g.scale) && g.scale !== 1 && (p = function(te) {
6829
6842
  if (te === 0)
@@ -6840,13 +6853,13 @@ var Js = { exports: {} };
6840
6853
  }
6841
6854
  if (g.integer) {
6842
6855
  const te = Math.abs(C(p, g.fractions ? 1 : g.frac_max));
6843
- E += te < 1 ? "" : Math.floor(te);
6856
+ y += te < 1 ? "" : Math.floor(te);
6844
6857
  }
6845
6858
  if (g.grouping) {
6846
- let te = "", ie = E.length;
6847
- for (ie > g.group_pri && (ie -= g.group_pri, te = re.group + E.slice(ie, ie + g.group_pri) + te); ie > g.group_sec; )
6848
- ie -= g.group_sec, te = re.group + E.slice(ie, ie + g.group_sec) + te;
6849
- E = ie ? E.slice(0, ie) + te : te;
6859
+ let te = "", ie = y.length;
6860
+ for (ie > g.group_pri && (ie -= g.group_pri, te = re.group + y.slice(ie, ie + g.group_pri) + te); ie > g.group_sec; )
6861
+ ie -= g.group_sec, te = re.group + y.slice(ie, ie + g.group_sec) + te;
6862
+ y = ie ? y.slice(0, ie) + te : te;
6850
6863
  }
6851
6864
  g.dec_fractions && (w = String(C(p, g.frac_max)).split(".")[1] || "");
6852
6865
  let De = !1;
@@ -6854,10 +6867,10 @@ var Js = { exports: {} };
6854
6867
  const te = Math.abs(g.integer ? p % 1 : p);
6855
6868
  if (te)
6856
6869
  if (De = !0, isFinite(g.denominator))
6857
- P += g.denominator, O += C(te * g.denominator), O === "0" && (O = "", P = "", De = !1, E || (E = "0"));
6870
+ P += g.denominator, O += C(te * g.denominator), O === "0" && (O = "", P = "", De = !1, y || (y = "0"));
6858
6871
  else {
6859
- const ie = y(te, g.integer ? g.num_max : 1 / 0, g.den_max);
6860
- O += ie[0], P += ie[1], g.integer && O === "0" && (E || (E = "0"), O = "", P = "", De = !1);
6872
+ const ie = E(te, g.integer ? g.num_max : 1 / 0, g.den_max);
6873
+ O += ie[0], P += ie[1], g.integer && O === "0" && (y || (y = "0"), O = "", P = "", De = !1);
6861
6874
  }
6862
6875
  }
6863
6876
  if (g.date) {
@@ -6882,7 +6895,7 @@ var Js = { exports: {} };
6882
6895
  }
6883
6896
  }
6884
6897
  var qe, gt;
6885
- if (g.int_padding && (E = g.int_padding.length === 1 ? E || g.int_padding : g.int_padding.substring(0, g.int_padding.length - E.length) + E), g.num_padding && (O = g.num_padding.length === 1 ? O || g.num_padding : g.num_padding.substring(0, g.num_padding.length - O.length) + O), g.den_padding && (P = g.den_padding.length === 1 ? P || g.den_padding : P + g.den_padding.slice(P.length)), g.man_padding) {
6898
+ if (g.int_padding && (y = g.int_padding.length === 1 ? y || g.int_padding : g.int_padding.substring(0, g.int_padding.length - y.length) + y), g.num_padding && (O = g.num_padding.length === 1 ? O || g.num_padding : g.num_padding.substring(0, g.num_padding.length - O.length) + O), g.den_padding && (P = g.den_padding.length === 1 ? P || g.den_padding : P + g.den_padding.slice(P.length)), g.man_padding) {
6886
6899
  const te = g.exp_plus ? "+" : "";
6887
6900
  x = g.man_padding.length === 1 ? ($ < 0 ? "-" : te) + (x || g.man_padding) : ($ < 0 ? "-" : te) + g.man_padding.slice(0, g.man_padding.length - x.length) + x;
6888
6901
  }
@@ -6892,7 +6905,7 @@ var Js = { exports: {} };
6892
6905
  for (let te = 0, ie = g.tokens.length; te < ie; te++) {
6893
6906
  const F = g.tokens[te], cr = F.num ? F.num.length : 0;
6894
6907
  if (F.type === "string")
6895
- F.rule ? F.rule === "num" ? De ? T.push(F.value) : (g.num_min > 0 || g.den_min > 0) && T.push(F.value.replace(/./g, M["?"])) : F.rule === "num+int" ? De && E ? T.push(F.value) : g.den_min > 0 && (E || g.num_min) && T.push(F.value.replace(/./g, M["?"])) : F.rule === "den" && (De ? T.push(F.value) : (g.den_min > 0 || g.den_min > 0) && T.push(F.value.replace(/./g, M["?"]))) : T.push(F.value);
6908
+ F.rule ? F.rule === "num" ? De ? T.push(F.value) : (g.num_min > 0 || g.den_min > 0) && T.push(F.value.replace(/./g, M["?"])) : F.rule === "num+int" ? De && y ? T.push(F.value) : g.den_min > 0 && (y || g.num_min) && T.push(F.value.replace(/./g, M["?"])) : F.rule === "den" && (De ? T.push(F.value) : (g.den_min > 0 || g.den_min > 0) && T.push(F.value.replace(/./g, M["?"]))) : T.push(F.value);
6896
6909
  else if (F.type === "error")
6897
6910
  T.push(R.invalid);
6898
6911
  else if (F.type === "point")
@@ -6902,7 +6915,7 @@ var Js = { exports: {} };
6902
6915
  else if (F.type === "exp")
6903
6916
  T.push(re.exponent);
6904
6917
  else if (F.type === "minus")
6905
- F.volatile && g.date || F.volatile && (p >= 0 || typeof p != "number") || (F.volatile && !g.fractions && (g.integer || g.dec_fractions) ? (p < 0 && E && E !== "0" || w) && T.push(re.negative) : T.push(re.negative));
6918
+ F.volatile && g.date || F.volatile && (p >= 0 || typeof p != "number") || (F.volatile && !g.fractions && (g.integer || g.dec_fractions) ? (p < 0 && y && y !== "0" || w) && T.push(re.negative) : T.push(re.negative));
6906
6919
  else if (F.type === "plus")
6907
6920
  T.push(re.positive);
6908
6921
  else if (F.type === "text")
@@ -6911,18 +6924,18 @@ var Js = { exports: {} };
6911
6924
  De ? T.push("/") : g.num_min > 0 || g.den_min > 0 ? T.push(M["?"]) : T.push(M["#"]);
6912
6925
  else if (F.type === "int")
6913
6926
  if (g.int_pattern.length === 1)
6914
- T.push(E);
6927
+ T.push(y);
6915
6928
  else {
6916
- const Re = Oe ? g.int_pattern.join("").length - at.int : 1 / 0, Vt = Oe === g.int_pattern.length - 1 ? 0 : g.int_pattern.join("").length - (at.int + F.num.length);
6917
- T.push(E.substring(E.length - Re, E.length - Vt)), Oe++, at.int += F.num.length;
6929
+ const Re = Oe ? g.int_pattern.join("").length - at.int : 1 / 0, vt = Oe === g.int_pattern.length - 1 ? 0 : g.int_pattern.join("").length - (at.int + F.num.length);
6930
+ T.push(y.substring(y.length - Re, y.length - vt)), Oe++, at.int += F.num.length;
6918
6931
  }
6919
6932
  else if (F.type === "frac") {
6920
6933
  const Re = at.frac;
6921
- for (let Vt = 0; Vt < cr; Vt++)
6922
- T.push(w[Vt + Re] || M[F.num[Vt]]);
6934
+ for (let vt = 0; vt < cr; vt++)
6935
+ T.push(w[vt + Re] || M[F.num[vt]]);
6923
6936
  at.frac += cr;
6924
6937
  } else if (F.type in In)
6925
- g[F.type + "_pattern"].length === 1 ? (F.type === "int" && T.push(E), F.type === "frac" && T.push(w), F.type === "man" && T.push(x), F.type === "num" && T.push(O), F.type === "den" && T.push(P)) : (T.push(In[F.type].slice(at[F.type], at[F.type] + cr)), at[F.type] += cr);
6938
+ g[F.type + "_pattern"].length === 1 ? (F.type === "int" && T.push(y), F.type === "frac" && T.push(w), F.type === "man" && T.push(x), F.type === "num" && T.push(O), F.type === "den" && T.push(P)) : (T.push(In[F.type].slice(at[F.type], at[F.type] + cr)), at[F.type] += cr);
6926
6939
  else if (F.type === "year")
6927
6940
  z < 0 && T.push(re.negative), T.push(String(Math.abs(z)).padStart(4, "0"));
6928
6941
  else if (F.type === "year-short") {
@@ -7008,7 +7021,7 @@ var Js = { exports: {} };
7008
7021
  const g = new RegExp("^([\\s+%" + ge.join("") + "(-]*)(((?:(?:\\d[\\d,]*)(?:\\.\\d*)?|(?:\\.\\d+)))([eE][+-]?\\d+)?)([\\s%" + ge.join("") + ")]*)$").exec(p);
7009
7022
  if (g) {
7010
7023
  const [, R, A, x, O, P] = g;
7011
- let w = 1, E = "", $ = !1, Q = !1, v = !1, z = !1, q = !1, W = null, U = !1, j = parseFloat(A.replace(/,/g, ""));
7024
+ let w = 1, y = "", $ = !1, Q = !1, v = !1, z = !1, q = !1, W = null, U = !1, j = parseFloat(A.replace(/,/g, ""));
7012
7025
  if (!isFinite(j))
7013
7026
  return null;
7014
7027
  for (let N = 0; N < R.length; N++) {
@@ -7050,18 +7063,18 @@ var Js = { exports: {} };
7050
7063
  if (O) {
7051
7064
  if (z || q)
7052
7065
  return null;
7053
- E = "0.00E+00";
7066
+ y = "0.00E+00";
7054
7067
  } else if (z) {
7055
7068
  if (q)
7056
7069
  return null;
7057
- E = x.includes(".") ? "0.00%" : "0%", j *= 0.01;
7070
+ y = x.includes(".") ? "0.00%" : "0%", j *= 0.01;
7058
7071
  } else if (q) {
7059
7072
  const N = x.includes(".") ? "#,##0.00" : "#,##0";
7060
- E = U ? N + W : W + N;
7073
+ y = U ? N + W : W + N;
7061
7074
  } else
7062
- x.includes(",") && (E = x.includes(".") ? "#,##0.00" : "#,##0");
7075
+ x.includes(",") && (y = x.includes(".") ? "#,##0.00" : "#,##0");
7063
7076
  const X = { v: j * w };
7064
- return E && (X.z = E), X;
7077
+ return y && (X.z = y), X;
7065
7078
  }
7066
7079
  }
7067
7080
  const Ye = (p, g, R) => {
@@ -7073,47 +7086,47 @@ var Js = { exports: {} };
7073
7086
  if (w === "$" || w === "€")
7074
7087
  p || (P = R);
7075
7088
  else if (w === "-") {
7076
- const E = /^(\s*([./-]|,\s)\s*|\s+)/.exec(p);
7077
- if (E) {
7078
- const $ = E[1] === "-" || E[1] === "/" || E[1] === "." ? E[1] : " ";
7089
+ const y = /^(\s*([./-]|,\s)\s*|\s+)/.exec(p);
7090
+ if (y) {
7091
+ const $ = y[1] === "-" || y[1] === "/" || y[1] === "." ? y[1] : " ";
7079
7092
  if (!R.sep || R.sep === $) {
7080
- const Q = E[0].replace(/\s+/g, " ");
7081
- P = Ye(p.slice(E[0].length), g[w], { ...R, sep: $, path: A + Q });
7093
+ const Q = y[0].replace(/\s+/g, " ");
7094
+ P = Ye(p.slice(y[0].length), g[w], { ...R, sep: $, path: A + Q });
7082
7095
  }
7083
7096
  }
7084
7097
  } else if (w === " ") {
7085
- const E = /^[,.]?\s+/.exec(p);
7086
- if (E) {
7087
- const $ = E[0].replace(/\s+/g, " ");
7088
- P = Ye(p.slice(E[0].length), g[w], { ...R, path: A + $ });
7098
+ const y = /^[,.]?\s+/.exec(p);
7099
+ if (y) {
7100
+ const $ = y[0].replace(/\s+/g, " ");
7101
+ P = Ye(p.slice(y[0].length), g[w], { ...R, path: A + $ });
7089
7102
  }
7090
7103
  } else if (w === "j" || w === "d") {
7091
- const E = /^(0?[1-9]|1\d|2\d|3[01])\b/.exec(p);
7092
- E && (P = Ye(p.slice(E[0].length), g[w], { ...R, day: E[0], path: A + w }));
7104
+ const y = /^(0?[1-9]|1\d|2\d|3[01])\b/.exec(p);
7105
+ y && (P = Ye(p.slice(y[0].length), g[w], { ...R, day: y[0], path: A + w }));
7093
7106
  } else if (w === "n" || w === "m") {
7094
- const E = /^(0?[1-9]|1[012])\b/.exec(p);
7095
- E && (P = Ye(p.slice(E[0].length), g[w], { ...R, month: +E[0], _mon: E[0], path: A + w }));
7107
+ const y = /^(0?[1-9]|1[012])\b/.exec(p);
7108
+ y && (P = Ye(p.slice(y[0].length), g[w], { ...R, month: +y[0], _mon: y[0], path: A + w }));
7096
7109
  } else if (w === "F" || w === "M") {
7097
- const E = /^([a-z]{3,9})\b/i.exec(p), $ = E && (w === "F" ? pi : gi)[E[0].toLowerCase()];
7098
- $ && (P = Ye(p.slice(E[0].length), g[w], { ...R, month: $, _mon: E[0], path: A + w }));
7110
+ const y = /^([a-z]{3,9})\b/i.exec(p), $ = y && (w === "F" ? pi : gi)[y[0].toLowerCase()];
7111
+ $ && (P = Ye(p.slice(y[0].length), g[w], { ...R, month: $, _mon: y[0], path: A + w }));
7099
7112
  } else if (w === "l" || w === "D") {
7100
- const E = /^([a-z]{3,9})\b/i.exec(p);
7101
- (E && Ri[E[0].toLowerCase()]) === w && (P = Ye(p.slice(E[0].length), g[w], { ...R, path: A + w }));
7113
+ const y = /^([a-z]{3,9})\b/i.exec(p);
7114
+ (y && Ri[y[0].toLowerCase()]) === w && (P = Ye(p.slice(y[0].length), g[w], { ...R, path: A + w }));
7102
7115
  } else if (w === "y") {
7103
- const E = /^\d\d\b/.exec(p);
7104
- if (E) {
7105
- const $ = +E[0] >= 30 ? +E[0] + 1900 : +E[0] + 2e3;
7106
- P = Ye(p.slice(E[0].length), g[w], { ...R, year: $, path: A + w });
7116
+ const y = /^\d\d\b/.exec(p);
7117
+ if (y) {
7118
+ const $ = +y[0] >= 30 ? +y[0] + 1900 : +y[0] + 2e3;
7119
+ P = Ye(p.slice(y[0].length), g[w], { ...R, year: $, path: A + w });
7107
7120
  }
7108
7121
  } else if (w === "Y") {
7109
- const E = /^\d\d\d\d\b/.exec(p);
7110
- E && (P = Ye(p.slice(E[0].length), g[w], { ...R, year: +E[0], path: A + w }));
7122
+ const y = /^\d\d\d\d\b/.exec(p);
7123
+ y && (P = Ye(p.slice(y[0].length), g[w], { ...R, year: +y[0], path: A + w }));
7111
7124
  } else {
7112
7125
  if (w !== "x")
7113
7126
  throw new Error('Unknown date token "'.concat(w, '"'));
7114
7127
  {
7115
- const E = Wr(p);
7116
- E && (P = Ye("", g[w], { ...R, time: E.v, tf: E.z, path: A + w }));
7128
+ const y = Xr(p);
7129
+ y && (P = Ye("", g[w], { ...R, time: y.v, tf: y.z, path: A + w }));
7117
7130
  }
7118
7131
  }
7119
7132
  if (P)
@@ -7128,13 +7141,13 @@ var Js = { exports: {} };
7128
7141
  if (R.sep === "." && R.path.length === 3)
7129
7142
  return null;
7130
7143
  const x = +((A = R.year) !== null && A !== void 0 ? A : _i);
7131
- if (R.day || (R.day = 1), !function(w, E, $) {
7132
- if ($ < 1 || E < 1 || E > 12)
7144
+ if (R.day || (R.day = 1), !function(w, y, $) {
7145
+ if ($ < 1 || y < 1 || y > 12)
7133
7146
  return !1;
7134
- if (E === 2) {
7147
+ if (y === 2) {
7135
7148
  if ($ > (w % 4 == 0 && w % 100 != 0 || w % 400 == 0 || w === 1900 ? 29 : 28))
7136
7149
  return !1;
7137
- } else if ((E === 4 || E === 6 || E === 9 || E === 11) && $ > 30 || (E === 1 || E === 3 || E === 5 || E === 7 || E === 8 || E === 10 || E === 12) && $ > 31)
7150
+ } else if ((y === 4 || y === 6 || y === 9 || y === 11) && $ > 30 || (y === 1 || y === 3 || y === 5 || y === 7 || y === 8 || y === 10 || y === 12) && $ > 31)
7138
7151
  return !1;
7139
7152
  return !0;
7140
7153
  }(x, R.month, R.day))
@@ -7145,13 +7158,13 @@ var Js = { exports: {} };
7145
7158
  x <= 1900 && R.month <= 2 ? O = 25568 : x < 1e4 && (O = 25569);
7146
7159
  const P = Date.UTC(x, R.month - 1, R.day) / 864e5 + O + (R.time || 0);
7147
7160
  if (P >= 0 && P <= 2958465) {
7148
- const w = R._mon[0] === "0" || R.day[0] === "0" || R._mon.length === 2 && R.day.length === 2, E = R.path.replace(/[jdlDnmMFyYx-]/g, ($) => $ === "j" || $ === "d" ? w ? "dd" : "d" : $ === "D" ? "ddd" : $ === "l" ? "dddd" : $ === "n" || $ === "m" ? w ? "mm" : "m" : $ === "M" ? "mmm" : $ === "F" ? "mmmm" : $ === "y" ? "yy" : $ === "x" ? R.tf || "" : $ === "Y" ? "yyyy" : $);
7149
- return g && g.nativeDate ? { v: zn(P, g), z: E } : { v: P, z: E };
7161
+ const w = R._mon[0] === "0" || R.day[0] === "0" || R._mon.length === 2 && R.day.length === 2, y = R.path.replace(/[jdlDnmMFyYx-]/g, ($) => $ === "j" || $ === "d" ? w ? "dd" : "d" : $ === "D" ? "ddd" : $ === "l" ? "dddd" : $ === "n" || $ === "m" ? w ? "mm" : "m" : $ === "M" ? "mmm" : $ === "F" ? "mmmm" : $ === "y" ? "yy" : $ === "x" ? R.tf || "" : $ === "Y" ? "yyyy" : $);
7162
+ return g && g.nativeDate ? { v: zn(P, g), z: y } : { v: P, z: y };
7150
7163
  }
7151
7164
  }
7152
7165
  return null;
7153
7166
  }
7154
- function Wr(p) {
7167
+ function Xr(p) {
7155
7168
  const g = /^\s*([10]?\d|2[0-4])(?::([0-5]\d|\d))?(?::([0-5]\d|\d))?(\.\d{1,10})?(?:\s*([AP])M?)?\s*$/i.exec(p);
7156
7169
  if (g) {
7157
7170
  const [, R, A, x, O, P] = g;
@@ -7172,10 +7185,10 @@ var Js = { exports: {} };
7172
7185
  }
7173
7186
  const Ht = {};
7174
7187
  function Ei(p, g) {
7175
- const { pattern: R, partitions: A, locale: x } = p, O = (E) => {
7176
- const $ = Object.assign({}, V(), g, E);
7188
+ const { pattern: R, partitions: A, locale: x } = p, O = (y) => {
7189
+ const $ = Object.assign({}, V(), g, y);
7177
7190
  return x && ($.locale = x), $;
7178
- }, P = (E, $) => {
7191
+ }, P = (y, $) => {
7179
7192
  const Q = O($);
7180
7193
  return function(v, z, q) {
7181
7194
  const W = l(q.locale), U = z[3] ? z[3] : Kn;
@@ -7189,18 +7202,18 @@ var Js = { exports: {} };
7189
7202
  }
7190
7203
  const j = Gn(v, z);
7191
7204
  return j ? Xn(v, j, q, W) : q.overflow;
7192
- }(ur(E, Q), A, Q);
7205
+ }(ur(y, Q), A, Q);
7193
7206
  };
7194
- P.color = (E, $) => function(Q, v) {
7207
+ P.color = (y, $) => function(Q, v) {
7195
7208
  if (typeof Q != "number" || !isFinite(Q))
7196
7209
  return (v[3] ? v[3].color : Kn.color) || qn;
7197
7210
  const z = Gn(Q, v);
7198
7211
  return z && z.color || qn;
7199
- }(ur(E, O($)), A);
7200
- const w = function(E) {
7212
+ }(ur(y, O($)), A);
7213
+ const w = function(y) {
7201
7214
  var $;
7202
7215
  let Q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
7203
- const [v, z] = E, q = v.frac_max, W = { type: "general", isDate: li(E), isText: fi(E), isPercent: ci(E), maxDecimals: v.general ? 9 : q, scale: ($ = v.scale) !== null && $ !== void 0 ? $ : 1, color: 0, parentheses: 0, grouped: v.grouping ? 1 : 0, _partitions: E }, U = !W.isDate && !W.isText && !v.error && v.tokens.some((re) => re.type === "string" && (Q ? re.value === Q : pe.test(re.value)));
7216
+ const [v, z] = y, q = v.frac_max, W = { type: "general", isDate: li(y), isText: fi(y), isPercent: ci(y), maxDecimals: v.general ? 9 : q, scale: ($ = v.scale) !== null && $ !== void 0 ? $ : 1, color: 0, parentheses: 0, grouped: v.grouping ? 1 : 0, _partitions: y }, U = !W.isDate && !W.isText && !v.error && v.tokens.some((re) => re.type === "string" && (Q ? re.value === Q : pe.test(re.value)));
7204
7217
  let j = "G", X = q >= 0 ? Math.min(15, q) : "", N = "", ne = "";
7205
7218
  if (z && z.color && (ne = "-", W.color = 1), v.parens && (N = "()", W.parentheses = 1), U)
7206
7219
  j = "C", W.type = "currency";
@@ -7218,8 +7231,8 @@ var Js = { exports: {} };
7218
7231
  W.isText ? (j = "G", W.type = "text", X = "", W.maxDecimals = 0) : v.general ? (j = "G", W.type = "general", X = "") : v.fractions ? (j = "G", W.type = "fraction", X = "") : v.exponential ? (j = "S", W.type = "scientific") : W.isPercent ? (j = "P", W.type = "percent") : v.grouping ? (j = ",", W.type = "grouped") : (v.int_max || q) && (j = "F", W.type = "number");
7219
7232
  return W.code = j + X + ne + N, W.level = hi[W.type], Object.freeze(W);
7220
7233
  }(A, (g || {}).currency) || new SyntaxError();
7221
- return P.info = w, P.dateInfo = function(E) {
7222
- const [$] = E;
7234
+ return P.info = w, P.dateInfo = function(y) {
7235
+ const [$] = y;
7223
7236
  return { year: !!(2 & $.date), month: !!(4 & $.date), day: !!(8 & $.date), hours: !!(16 & $.date), minutes: !!(32 & $.date), seconds: !!(64 & $.date), clockType: $.clock === 12 ? 12 : 24 };
7224
7237
  }(A), P.isPercent = () => !!w.isPercent, P.isDate = () => !!w.isDate, P.isText = () => !!w.isText, P.pattern = R, p.error && (P.error = p.error), P.options = O, P.locale = x || g && g.locale || "", Object.freeze(P);
7225
7238
  }
@@ -7235,25 +7248,25 @@ var Js = { exports: {} };
7235
7248
  }
7236
7249
  }(p), R.error || (Ht[p] = R)), Ei(R, g);
7237
7250
  }
7238
- ce.isDate = (p) => ce(p, { throws: !1 }).isDate(), ce.isPercent = (p) => ce(p, { throws: !1 }).isPercent(), ce.isText = (p) => ce(p, { throws: !1 }).isText(), ce.getInfo = (p, g) => ce(p, { ...g, throws: !1 }).info, ce.getDateInfo = (p, g) => ce(p, { ...g, throws: !1 }).dateInfo, ce.dateToSerial = ur, ce.dateFromSerial = zn, ce.options = V, ce.dec2frac = y, ce.round = C, ce.codeToLocale = s, ce.parseLocale = u, ce.getLocale = l, ce.addLocale = (p, g) => {
7251
+ ce.isDate = (p) => ce(p, { throws: !1 }).isDate(), ce.isPercent = (p) => ce(p, { throws: !1 }).isPercent(), ce.isText = (p) => ce(p, { throws: !1 }).isText(), ce.getInfo = (p, g) => ce(p, { ...g, throws: !1 }).info, ce.getDateInfo = (p, g) => ce(p, { ...g, throws: !1 }).dateInfo, ce.dateToSerial = ur, ce.dateFromSerial = zn, ce.options = V, ce.dec2frac = E, ce.round = C, ce.codeToLocale = s, ce.parseLocale = u, ce.getLocale = l, ce.addLocale = (p, g) => {
7239
7252
  const R = u(g);
7240
7253
  return delete Ht[R.lang], delete Ht[R.language], m(p, R);
7241
7254
  }, ce.format = function(p, g, R) {
7242
7255
  let A = arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
7243
7256
  const x = R && typeof R == "object" ? R : { locale: R, throws: !A };
7244
7257
  return ce(p, x)(ur(g, x), x);
7245
- }, ce.is_date = ce.isDate, ce.parseNumber = Zn, ce.parseDate = Jn, ce.parseTime = Wr, ce.parseBool = Nn, ce.parseValue = function(p, g) {
7258
+ }, ce.is_date = ce.isDate, ce.parseNumber = Zn, ce.parseDate = Jn, ce.parseTime = Xr, ce.parseBool = Nn, ce.parseValue = function(p, g) {
7246
7259
  var R, A, x;
7247
- return (R = (A = (x = Zn(p)) !== null && x !== void 0 ? x : Jn(p, g)) !== null && A !== void 0 ? A : Wr(p)) !== null && R !== void 0 ? R : Nn(p);
7260
+ return (R = (A = (x = Zn(p)) !== null && x !== void 0 ? x : Jn(p, g)) !== null && A !== void 0 ? A : Xr(p)) !== null && R !== void 0 ? R : Nn(p);
7248
7261
  };
7249
7262
  var yi = ce;
7250
7263
  return t = t.default;
7251
7264
  }();
7252
7265
  });
7253
7266
  })(Js);
7254
- var cu = Js.exports, lu = cu;
7255
- const fu = /* @__PURE__ */ uu(lu), hu = (n, r) => fu.format(n, r);
7256
- class du extends k {
7267
+ var lu = Js.exports, fu = lu;
7268
+ const hu = /* @__PURE__ */ cu(fu), du = (n, r) => hu.format(n, r);
7269
+ class mu extends k {
7257
7270
  calculate(r, e) {
7258
7271
  if (r == null || e == null)
7259
7272
  return h.create(f.NA);
@@ -7279,12 +7292,12 @@ class du extends k {
7279
7292
  l.isNull() && (l = Ee.create(" "));
7280
7293
  const d = `${l.getValue()}`;
7281
7294
  o.isNull() && (o = b.create(0));
7282
- const m = o.getValue(), _ = hu(d, m);
7295
+ const m = o.getValue(), _ = du(d, m);
7283
7296
  return Ee.create(_);
7284
7297
  });
7285
7298
  }
7286
7299
  }
7287
- class mu extends k {
7300
+ class gu extends k {
7288
7301
  calculate(r) {
7289
7302
  return r == null ? h.create(f.NA) : r.isError() ? r : r.isArray() ? r.mapValue((e) => this._handleSingleText(e)) : this._handleSingleText(r);
7290
7303
  }
@@ -7300,18 +7313,18 @@ class mu extends k {
7300
7313
  return h.create(f.VALUE);
7301
7314
  }
7302
7315
  }
7303
- const gu = [
7304
- [nu, Ct.CONCATENATE],
7305
- [su, Ct.LEN],
7306
- [au, Ct.LENB],
7307
- [du, Ct.TEXT],
7308
- [mu, Ct.LOWER]
7309
- ], pu = [];
7310
- var Ru = /* @__PURE__ */ ((n) => n)(Ru || {});
7311
- const _u = [];
7312
- var Eu = /* @__PURE__ */ ((n) => (n.ENCODEURL = "ENCODEURL", n.FILTERXML = "FILTERXML", n.WEBSERVICE = "WEBSERVICE", n))(Eu || {});
7313
- function yu(n, r, e, t, s, i, a) {
7314
- const o = (a == null ? void 0 : a.f) || "", u = (a == null ? void 0 : a.si) || "", c = Ot(o), l = Ft(u);
7316
+ const pu = [
7317
+ [su, Ct.CONCATENATE],
7318
+ [iu, Ct.LEN],
7319
+ [ou, Ct.LENB],
7320
+ [mu, Ct.TEXT],
7321
+ [gu, Ct.LOWER]
7322
+ ], Ru = [];
7323
+ var _u = /* @__PURE__ */ ((n) => n)(_u || {});
7324
+ const Eu = [];
7325
+ var yu = /* @__PURE__ */ ((n) => (n.ENCODEURL = "ENCODEURL", n.FILTERXML = "FILTERXML", n.WEBSERVICE = "WEBSERVICE", n))(yu || {});
7326
+ function Du(n, r, e, t, s, i, a) {
7327
+ const o = (a == null ? void 0 : a.f) || "", u = (a == null ? void 0 : a.si) || "", c = St(o), l = Ft(u);
7315
7328
  if (c && l)
7316
7329
  n.setValue(s, i, {
7317
7330
  f: o,
@@ -7333,10 +7346,10 @@ function yu(n, r, e, t, s, i, a) {
7333
7346
  });
7334
7347
  else if (!c && !l && n.getValue(s, i)) {
7335
7348
  const d = n.getValue(s, i), m = (d == null ? void 0 : d.f) || "", _ = (d == null ? void 0 : d.si) || "";
7336
- Ot(m) && Ft(_) && t.set(_, m), n.realDeleteValue(s, i), r.setValue(s, i, null);
7349
+ St(m) && Ft(_) && t.set(_, m), n.realDeleteValue(s, i), r.setValue(s, i, null);
7337
7350
  }
7338
7351
  }
7339
- function Du(n, r, e, t) {
7352
+ function Cu(n, r, e, t) {
7340
7353
  const s = n == null ? void 0 : n.getValue(e, t);
7341
7354
  if (s == null)
7342
7355
  return !0;
@@ -7345,10 +7358,10 @@ function Du(n, r, e, t) {
7345
7358
  for (let l = a; l <= u; l++)
7346
7359
  r.realDeleteValue(c, l);
7347
7360
  }
7348
- var Cu = Object.defineProperty, bu = Object.getOwnPropertyDescriptor, Su = (n, r, e, t) => {
7349
- for (var s = t > 1 ? void 0 : t ? bu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
7361
+ var bu = Object.defineProperty, Su = Object.getOwnPropertyDescriptor, Au = (n, r, e, t) => {
7362
+ for (var s = t > 1 ? void 0 : t ? Su(r, e) : r, i = n.length - 1, a; i >= 0; i--)
7350
7363
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
7351
- return t && s && Cu(r, e, s), s;
7364
+ return t && s && bu(r, e, s), s;
7352
7365
  }, Es = (n, r) => (e, t) => r(e, t, n);
7353
7366
  let er = class extends ue {
7354
7367
  constructor(r, e) {
@@ -7356,7 +7369,7 @@ let er = class extends ue {
7356
7369
  D(this, "_formulaData", {});
7357
7370
  D(this, "_arrayFormulaRange", {});
7358
7371
  D(this, "_arrayFormulaCellData", {});
7359
- this._univerInstanceService = r, this._lexerTreeBuilder = e;
7372
+ this._univerInstanceService = r, this._lexerTreeBuilder = e, this.initFormulaData();
7360
7373
  }
7361
7374
  clearPreviousArrayFormulaCellData(r) {
7362
7375
  Object.keys(r).forEach((e) => {
@@ -7376,8 +7389,8 @@ let er = class extends ue {
7376
7389
  const C = (M = a == null ? void 0 : a[m]) == null ? void 0 : M[_];
7377
7390
  if (C == null)
7378
7391
  return !0;
7379
- const { startRow: y, startColumn: S, endRow: L, endColumn: V } = C;
7380
- for (let H = y; H <= L; H++)
7392
+ const { startRow: E, startColumn: S, endRow: L, endColumn: V } = C;
7393
+ for (let H = E; H <= L; H++)
7381
7394
  for (let de = S; de <= V; de++)
7382
7395
  o.setValue(H, de, null);
7383
7396
  }), this._arrayFormulaCellData[e] && (this._arrayFormulaCellData[e][s] = o.getData());
@@ -7396,8 +7409,8 @@ let er = class extends ue {
7396
7409
  const m = a == null ? void 0 : a.getValue(l, d);
7397
7410
  if (m == null)
7398
7411
  return !0;
7399
- const { startRow: _, startColumn: C, endRow: y, endColumn: S } = m;
7400
- for (let L = _; L <= y; L++)
7412
+ const { startRow: _, startColumn: C, endRow: E, endColumn: S } = m;
7413
+ for (let L = _; L <= E; L++)
7401
7414
  for (let V = C; V <= S; V++)
7402
7415
  o.setValue(L, V, null);
7403
7416
  }), i.forValue((l, d, m) => {
@@ -7471,13 +7484,17 @@ let er = class extends ue {
7471
7484
  const a = new ae(i);
7472
7485
  a.getValue(t, s) && (a.realDeleteValue(t, s), this._arrayFormulaRange[r] && (this._arrayFormulaRange[r][e] = a.getData()));
7473
7486
  }
7487
+ /**
7488
+ * Cache all formulas on the snapshot to the formula model
7489
+ * @returns
7490
+ */
7474
7491
  initFormulaData() {
7475
7492
  if (this._univerInstanceService.getAllUnitsForType(Gt.UNIVER_SHEET).length === 0)
7476
7493
  return;
7477
7494
  const e = this._univerInstanceService.getCurrentUnitForType(Gt.UNIVER_SHEET), t = e.getUnitId();
7478
7495
  this._formulaData[t] = {}, e.getSheets().forEach((i) => {
7479
7496
  const a = i.getCellMatrix(), o = i.getSheetId();
7480
- Au(this._formulaData, t, o, a);
7497
+ Lu(this._formulaData, t, o, a);
7481
7498
  });
7482
7499
  }
7483
7500
  getCalculateData() {
@@ -7508,31 +7525,31 @@ let er = class extends ue {
7508
7525
  u[e] == null && (u[e] = {});
7509
7526
  const c = new ae(u[e] || {}), l = new ae();
7510
7527
  return s.forValue((d, m, _) => {
7511
- yu(c, l, i, a, d, m, _);
7528
+ Du(c, l, i, a, d, m, _);
7512
7529
  }), c.forValue((d, m, _) => {
7513
- const C = (_ == null ? void 0 : _.f) || "", y = (_ == null ? void 0 : _.si) || "";
7514
- if (Ft(y)) {
7515
- const S = i.get(y), L = a.get(y);
7516
- if (S && !Ot(C)) {
7530
+ const C = (_ == null ? void 0 : _.f) || "", E = (_ == null ? void 0 : _.si) || "";
7531
+ if (Ft(E)) {
7532
+ const S = i.get(E), L = a.get(E);
7533
+ if (S && !St(C)) {
7517
7534
  const V = S.f, M = m - S.c, H = d - S.r;
7518
- c.setValue(d, m, { f: V, si: y, x: M, y: H }), l.setValue(d, m, { f: V, si: y, x: M, y: H });
7535
+ c.setValue(d, m, { f: V, si: E, x: M, y: H }), l.setValue(d, m, { f: V, si: E, x: M, y: H });
7519
7536
  } else if (typeof L == "string") {
7520
7537
  const V = (_ == null ? void 0 : _.x) || 0, M = (_ == null ? void 0 : _.y) || 0, H = this._lexerTreeBuilder.moveFormulaRefOffset(L, V, M);
7521
- a.set(y, {
7538
+ a.set(E, {
7522
7539
  r: d,
7523
7540
  c: m,
7524
7541
  f: H
7525
- }), c.setValue(d, m, { f: H, si: y }), l.setValue(d, m, { f: H, si: y });
7542
+ }), c.setValue(d, m, { f: H, si: E }), l.setValue(d, m, { f: H, si: E });
7526
7543
  } else if (typeof L == "object") {
7527
7544
  const V = m - L.c, M = d - L.r;
7528
7545
  c.setValue(d, m, {
7529
7546
  f: L.f,
7530
- si: y,
7547
+ si: E,
7531
7548
  x: V,
7532
7549
  y: M
7533
7550
  }), l.setValue(d, m, {
7534
7551
  f: L.f,
7535
- si: y,
7552
+ si: E,
7536
7553
  x: V,
7537
7554
  y: M
7538
7555
  });
@@ -7560,7 +7577,7 @@ let er = class extends ue {
7560
7577
  return;
7561
7578
  const o = new ae(a);
7562
7579
  new ae(t).forValue((d, m, _) => {
7563
- Du(i, o, d, m);
7580
+ Cu(i, o, d, m);
7564
7581
  });
7565
7582
  }
7566
7583
  getFormulaItemBySId(r, e, t) {
@@ -7591,18 +7608,45 @@ let er = class extends ue {
7591
7608
  const i = s[r];
7592
7609
  return (i == null ? void 0 : i[e]) == null || new ae(i[e] || {}).forValue((o, u, c) => {
7593
7610
  const l = (c == null ? void 0 : c.f) || "", d = (c == null ? void 0 : c.si) || "", m = (c == null ? void 0 : c.x) || 0, _ = (c == null ? void 0 : c.y) || 0;
7594
- Ot(l) && Ft(d) && m === 0 && _ === 0 && t.set(d, { f: l, r: o, c: u });
7611
+ St(l) && Ft(d) && m === 0 && _ === 0 && t.set(d, { f: l, r: o, c: u });
7595
7612
  }), t;
7596
7613
  }
7614
+ getFormulaStringByCell(r, e, t, s) {
7615
+ const i = this.getFormulaDataItem(r, e, t, s);
7616
+ if (i == null)
7617
+ return null;
7618
+ const { f: a, si: o, x: u = 0, y: c = 0 } = i;
7619
+ if (o != null && (u !== 0 || c !== 0)) {
7620
+ let l = "";
7621
+ if (a.length > 0)
7622
+ l = a;
7623
+ else {
7624
+ const d = this.getFormulaItemBySId(
7625
+ o,
7626
+ t,
7627
+ s
7628
+ );
7629
+ if (d == null || d.f.length === 0)
7630
+ return null;
7631
+ l = d.f;
7632
+ }
7633
+ return l = this._lexerTreeBuilder.moveFormulaRefOffset(
7634
+ l,
7635
+ u,
7636
+ c
7637
+ ), l;
7638
+ }
7639
+ return St(a) ? a : null;
7640
+ }
7597
7641
  };
7598
- er = Su([
7642
+ er = Au([
7599
7643
  Es(0, Rn),
7600
7644
  Es(1, le(Ln))
7601
7645
  ], er);
7602
- function Au(n, r, e, t) {
7646
+ function Lu(n, r, e, t) {
7603
7647
  const s = /* @__PURE__ */ new Map(), i = new ae();
7604
7648
  t.forValue((o, u, c) => {
7605
- const l = (c == null ? void 0 : c.f) || "", d = (c == null ? void 0 : c.si) || "", m = Ot(l), _ = Ft(d);
7649
+ const l = (c == null ? void 0 : c.f) || "", d = (c == null ? void 0 : c.si) || "", m = St(l), _ = Ft(d);
7606
7650
  m && _ ? (i.setValue(o, u, {
7607
7651
  f: l,
7608
7652
  si: d
@@ -7614,11 +7658,11 @@ function Au(n, r, e, t) {
7614
7658
  });
7615
7659
  }), i.forValue((o, u, c) => {
7616
7660
  const l = (c == null ? void 0 : c.f) || "", d = (c == null ? void 0 : c.si) || "";
7617
- if (Ft(d) && !Ot(l)) {
7661
+ if (Ft(d) && !St(l)) {
7618
7662
  const m = s.get(d);
7619
7663
  if (m) {
7620
- const _ = m.f, C = u - m.c, y = o - m.r;
7621
- i.setValue(o, u, { f: _, si: d, x: C, y });
7664
+ const _ = m.f, C = u - m.c, E = o - m.r;
7665
+ i.setValue(o, u, { f: _, si: d, x: C, y: E });
7622
7666
  }
7623
7667
  }
7624
7668
  }), n[r] || (n[r] = {});
@@ -7629,12 +7673,12 @@ function Au(n, r, e, t) {
7629
7673
  }
7630
7674
  };
7631
7675
  }
7632
- class Lu extends ue {
7676
+ class wu extends ue {
7633
7677
  constructor() {
7634
7678
  super();
7635
7679
  // 18.2.6 definedNames (Defined Names)
7636
7680
  D(this, "_definedNameMap", {});
7637
- D(this, "_update$", new Ut());
7681
+ D(this, "_update$", new Bt());
7638
7682
  D(this, "update$", this._update$.asObservable());
7639
7683
  D(this, "_currentRange", {
7640
7684
  unitId: "",
@@ -7646,9 +7690,9 @@ class Lu extends ue {
7646
7690
  endColumn: 0
7647
7691
  }
7648
7692
  });
7649
- D(this, "_currentRange$", new Ut());
7693
+ D(this, "_currentRange$", new Bt());
7650
7694
  D(this, "currentRange$", this._currentRange$.asObservable());
7651
- D(this, "_focusRange$", new Ut());
7695
+ D(this, "_focusRange$", new Bt());
7652
7696
  D(this, "focusRange$", this._focusRange$.asObservable());
7653
7697
  }
7654
7698
  dispose() {
@@ -7699,12 +7743,12 @@ class Lu extends ue {
7699
7743
  this._update$.next(null);
7700
7744
  }
7701
7745
  }
7702
- const Yr = st("univer.formula.defined-names.service");
7703
- var wu = Object.defineProperty, xu = Object.getOwnPropertyDescriptor, Pu = (n, r, e, t) => {
7704
- for (var s = t > 1 ? void 0 : t ? xu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
7746
+ const Qr = st("univer.formula.defined-names.service");
7747
+ var xu = Object.defineProperty, Pu = Object.getOwnPropertyDescriptor, Vu = (n, r, e, t) => {
7748
+ for (var s = t > 1 ? void 0 : t ? Pu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
7705
7749
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
7706
- return t && s && wu(r, e, s), s;
7707
- }, Vu = (n, r) => (e, t) => r(e, t, n);
7750
+ return t && s && xu(r, e, s), s;
7751
+ }, vu = (n, r) => (e, t) => r(e, t, n);
7708
7752
  let dn = class extends ue {
7709
7753
  constructor(r) {
7710
7754
  super();
@@ -7786,7 +7830,7 @@ let dn = class extends ue {
7786
7830
  const { allUnitData: e, unitSheetNameMap: t, unitStylesData: s } = this._loadSheetData();
7787
7831
  this._unitData = e, this._unitStylesData = s, this._sheetNameMap = t;
7788
7832
  }
7789
- this._formulaData = r.formulaData, this._arrayFormulaCellData = $i(r.arrayFormulaCellData), this._forceCalculate = r.forceCalculate, this._dirtyRanges = r.dirtyRanges, this._dirtyNameMap = r.dirtyNameMap, this._dirtyDefinedNameMap = r.dirtyDefinedNameMap, this._dirtyUnitFeatureMap = r.dirtyUnitFeatureMap, this._dirtyUnitOtherFormulaMap = r.dirtyUnitOtherFormulaMap, this._excludedCell = r.excludedCell, this._mergeNameMap(this._sheetNameMap, this._dirtyNameMap);
7833
+ this._formulaData = r.formulaData, this._arrayFormulaCellData = Ti(r.arrayFormulaCellData), this._forceCalculate = r.forceCalculate, this._dirtyRanges = r.dirtyRanges, this._dirtyNameMap = r.dirtyNameMap, this._dirtyDefinedNameMap = r.dirtyDefinedNameMap, this._dirtyUnitFeatureMap = r.dirtyUnitFeatureMap, this._dirtyUnitOtherFormulaMap = r.dirtyUnitOtherFormulaMap, this._excludedCell = r.excludedCell, this._mergeNameMap(this._sheetNameMap, this._dirtyNameMap);
7790
7834
  }
7791
7835
  loadDirtyRangesAndExcludedCell(r, e) {
7792
7836
  this._dirtyRanges = r, this._excludedCell = e, this._dirtyNameMap = {};
@@ -7890,17 +7934,17 @@ let dn = class extends ue {
7890
7934
  };
7891
7935
  }
7892
7936
  };
7893
- dn = Pu([
7894
- Vu(0, Rn)
7937
+ dn = Vu([
7938
+ vu(0, Rn)
7895
7939
  ], dn);
7896
7940
  const mt = st(
7897
7941
  "univer.formula.current-data.service"
7898
7942
  );
7899
- var vu = Object.defineProperty, Uu = Object.getOwnPropertyDescriptor, Bu = (n, r, e, t) => {
7900
- for (var s = t > 1 ? void 0 : t ? Uu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
7943
+ var Uu = Object.defineProperty, Bu = Object.getOwnPropertyDescriptor, Ou = (n, r, e, t) => {
7944
+ for (var s = t > 1 ? void 0 : t ? Bu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
7901
7945
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
7902
- return t && s && vu(r, e, s), s;
7903
- }, Zr = (n, r) => (e, t) => r(e, t, n);
7946
+ return t && s && Uu(r, e, s), s;
7947
+ }, Jr = (n, r) => (e, t) => r(e, t, n);
7904
7948
  let kt = class extends ue {
7905
7949
  constructor(n, r, e) {
7906
7950
  super(), this._definedNamesService = n, this._lexerTreeBuilder = r, this._formulaCurrentConfigService = e;
@@ -7965,16 +8009,16 @@ let kt = class extends ue {
7965
8009
  };
7966
8010
  }
7967
8011
  };
7968
- kt = Bu([
7969
- Zr(0, Yr),
7970
- Zr(1, le(Ln)),
7971
- Zr(2, mt)
8012
+ kt = Ou([
8013
+ Jr(0, Qr),
8014
+ Jr(1, le(Ln)),
8015
+ Jr(2, mt)
7972
8016
  ], kt);
7973
- var Ou = Object.defineProperty, Fu = Object.getOwnPropertyDescriptor, Mu = (n, r, e, t) => {
7974
- for (var s = t > 1 ? void 0 : t ? Fu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8017
+ var Fu = Object.defineProperty, Mu = Object.getOwnPropertyDescriptor, ku = (n, r, e, t) => {
8018
+ for (var s = t > 1 ? void 0 : t ? Mu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
7975
8019
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
7976
- return t && s && Ou(r, e, s), s;
7977
- }, ku = (n, r) => (e, t) => r(e, t, n), Je = /* @__PURE__ */ ((n) => (n[n.IDLE = 0] = "IDLE", n[n.START_DEPENDENCY = 1] = "START_DEPENDENCY", n[n.START_CALCULATION = 2] = "START_CALCULATION", n[n.CURRENTLY_CALCULATING = 3] = "CURRENTLY_CALCULATING", n[n.START_DEPENDENCY_ARRAY_FORMULA = 4] = "START_DEPENDENCY_ARRAY_FORMULA", n[n.START_CALCULATION_ARRAY_FORMULA = 5] = "START_CALCULATION_ARRAY_FORMULA", n[n.CURRENTLY_CALCULATING_ARRAY_FORMULA = 6] = "CURRENTLY_CALCULATING_ARRAY_FORMULA", n[n.CALCULATION_COMPLETED = 7] = "CALCULATION_COMPLETED", n))(Je || {}), Xt = /* @__PURE__ */ ((n) => (n[n.INITIAL = 0] = "INITIAL", n[n.STOP_EXECUTION = 1] = "STOP_EXECUTION", n[n.NOT_EXECUTED = 2] = "NOT_EXECUTED", n[n.SUCCESS = 3] = "SUCCESS", n))(Xt || {});
8020
+ return t && s && Fu(r, e, s), s;
8021
+ }, $u = (n, r) => (e, t) => r(e, t, n), Je = /* @__PURE__ */ ((n) => (n[n.IDLE = 0] = "IDLE", n[n.START_DEPENDENCY = 1] = "START_DEPENDENCY", n[n.START_CALCULATION = 2] = "START_CALCULATION", n[n.CURRENTLY_CALCULATING = 3] = "CURRENTLY_CALCULATING", n[n.START_DEPENDENCY_ARRAY_FORMULA = 4] = "START_DEPENDENCY_ARRAY_FORMULA", n[n.START_CALCULATION_ARRAY_FORMULA = 5] = "START_CALCULATION_ARRAY_FORMULA", n[n.CURRENTLY_CALCULATING_ARRAY_FORMULA = 6] = "CURRENTLY_CALCULATING_ARRAY_FORMULA", n[n.CALCULATION_COMPLETED = 7] = "CALCULATION_COMPLETED", n))(Je || {}), Xt = /* @__PURE__ */ ((n) => (n[n.INITIAL = 0] = "INITIAL", n[n.STOP_EXECUTION = 1] = "STOP_EXECUTION", n[n.NOT_EXECUTED = 2] = "NOT_EXECUTED", n[n.SUCCESS = 3] = "SUCCESS", n))(Xt || {});
7978
8022
  let mn = class extends ue {
7979
8023
  constructor(r) {
7980
8024
  super();
@@ -8110,8 +8154,8 @@ let mn = class extends ue {
8110
8154
  if (e.isReferenceObject() || e.isValueObject() && e.isArray()) {
8111
8155
  const u = e, { startRow: c, startColumn: l } = u.getRangePosition();
8112
8156
  u.iterator((d, m, _) => {
8113
- const C = pt(d), y = m - c, S = _ - l;
8114
- o[y] == null && (o[y] = []), o[y][S] = C;
8157
+ const C = pt(d), E = m - c, S = _ - l;
8158
+ o[E] == null && (o[E] = []), o[E][S] = C;
8115
8159
  });
8116
8160
  } else
8117
8161
  o = [[pt(e)]];
@@ -8129,12 +8173,12 @@ let mn = class extends ue {
8129
8173
  d[a] == null && (d[a] = new ae()), this._runtimeClearArrayFormulaCellData[o] === void 0 && (this._runtimeClearArrayFormulaCellData[o] = {});
8130
8174
  const m = this._runtimeClearArrayFormulaCellData[o];
8131
8175
  m[a] == null && (m[a] = new ae());
8132
- const _ = u[a], C = d[a], y = m[a];
8176
+ const _ = u[a], C = d[a], E = m[a];
8133
8177
  if (r.isReferenceObject() || r.isValueObject() && r.isArray()) {
8134
8178
  const S = r, { startRow: L, startColumn: V, endRow: M, endColumn: H } = S.getRangePosition();
8135
8179
  if (L === M && V === H) {
8136
8180
  const ge = S.getFirstCell(), pe = pt(ge);
8137
- _.setValue(e, t, pe), y.setValue(e, t, pe);
8181
+ _.setValue(e, t, pe), E.setValue(e, t, pe);
8138
8182
  return;
8139
8183
  }
8140
8184
  const de = {
@@ -8145,14 +8189,14 @@ let mn = class extends ue {
8145
8189
  };
8146
8190
  if (l.setValue(e, t, de), c[a] = l.getData(), this._checkIfArrayFormulaRangeHasData(o, a, e, t, de) || this._checkIfArrayFormulaExceeded(s, i, de)) {
8147
8191
  const ge = pt(h.create(f.SPILL));
8148
- _.setValue(e, t, ge), y.setValue(e, t, ge);
8192
+ _.setValue(e, t, ge), E.setValue(e, t, ge);
8149
8193
  } else {
8150
8194
  const ge = h.create(f.SPILL);
8151
8195
  S.iterator((pe, ee, Z) => {
8152
8196
  const se = pt(pe);
8153
8197
  if (ee === L && Z === V) {
8154
8198
  if (pe != null && pe.isError() && pe.isEqualType(ge))
8155
- return y.setValue(e, t, {}), _.setValue(e, t, { ...pt(ge) }), !1;
8199
+ return E.setValue(e, t, {}), _.setValue(e, t, { ...pt(ge) }), !1;
8156
8200
  _.setValue(e, t, { ...se });
8157
8201
  }
8158
8202
  const G = ee - L + e, Me = Z - V + t;
@@ -8161,7 +8205,7 @@ let mn = class extends ue {
8161
8205
  }
8162
8206
  } else {
8163
8207
  const S = pt(r);
8164
- _.setValue(e, t, S), y.setValue(e, t, S);
8208
+ _.setValue(e, t, S), E.setValue(e, t, S);
8165
8209
  }
8166
8210
  }
8167
8211
  getUnitData() {
@@ -8213,17 +8257,17 @@ let mn = class extends ue {
8213
8257
  };
8214
8258
  }
8215
8259
  _checkIfArrayFormulaRangeHasData(r, e, t, s, i) {
8216
- var m, _, C, y, S, L, V, M, H, de, ge, pe;
8260
+ var m, _, C, E, S, L, V, M, H, de, ge, pe;
8217
8261
  const { startRow: a, startColumn: o, endRow: u, endColumn: c } = i, l = this._currentConfigService.getUnitData(), d = (C = (_ = (m = this._unitArrayFormulaRange[r]) == null ? void 0 : m[e]) == null ? void 0 : _[t]) == null ? void 0 : C[s];
8218
8262
  for (let ee = a; ee <= u; ee++)
8219
8263
  for (let Z = o; Z <= c; Z++) {
8220
8264
  if (ee === t && s === Z)
8221
8265
  continue;
8222
- const se = (L = (S = (y = this._runtimeData) == null ? void 0 : y[r]) == null ? void 0 : S[e]) == null ? void 0 : L.getValue(ee, Z), G = (H = (M = (V = this._runtimeArrayFormulaCellData) == null ? void 0 : V[r]) == null ? void 0 : M[e]) == null ? void 0 : H.getValue(
8266
+ const se = (L = (S = (E = this._runtimeData) == null ? void 0 : E[r]) == null ? void 0 : S[e]) == null ? void 0 : L.getValue(ee, Z), G = (H = (M = (V = this._runtimeArrayFormulaCellData) == null ? void 0 : V[r]) == null ? void 0 : M[e]) == null ? void 0 : H.getValue(
8223
8267
  ee,
8224
8268
  Z
8225
8269
  ), Me = (pe = (ge = (de = l == null ? void 0 : l[r]) == null ? void 0 : de[e]) == null ? void 0 : ge.cellData) == null ? void 0 : pe.getValue(ee, Z);
8226
- if (!mr(se) || !mr(G) && !this._isInArrayFormulaRange(d, ee, Z) || !mr(Me))
8270
+ if (!gr(se) || !gr(G) && !this._isInArrayFormulaRange(d, ee, Z) || !gr(Me))
8227
8271
  return !0;
8228
8272
  }
8229
8273
  return !1;
@@ -8239,11 +8283,11 @@ let mn = class extends ue {
8239
8283
  }
8240
8284
  _isInDirtyRange(r, e, t, s) {
8241
8285
  const i = this._currentConfigService.getDirtyRanges();
8242
- return i.length === 0 ? !0 : Ui(i, r, e, t, s);
8286
+ return i.length === 0 ? !0 : Bi(i, r, e, t, s);
8243
8287
  }
8244
8288
  };
8245
- mn = Mu([
8246
- ku(0, mt)
8289
+ mn = ku([
8290
+ $u(0, mt)
8247
8291
  ], mn);
8248
8292
  const We = st("univer.formula.runtime.service");
8249
8293
  var J = /* @__PURE__ */ ((n) => (n.REFERENCE = "ReferenceNode", n.VALUE = "ValueNode", n.OPERATOR = "OperatorNode", n.FUNCTION = "FunctionNode", n.LAMBDA = "LambdaNode", n.LAMBDA_PARAMETER = "LambdaNodeParameter", n.ERROR = "ErrorNode", n.BASE = "Base", n.ROOT = "Root", n.UNION = "UnionNode", n.PREFIX = "PrefixNode", n.SUFFIX = "SuffixNode", n.NULL = "NullNode", n))(J || {});
@@ -8404,7 +8448,7 @@ class Ns extends Ke {
8404
8448
  return new gn(ct);
8405
8449
  }
8406
8450
  }
8407
- class $u extends ue {
8451
+ class Tu extends ue {
8408
8452
  constructor() {
8409
8453
  super(...arguments);
8410
8454
  D(this, "_functionExecutors", /* @__PURE__ */ new Map());
@@ -8439,6 +8483,12 @@ class $u extends ue {
8439
8483
  const s = e[t];
8440
8484
  this._functionDescriptions.set(s.functionName, s);
8441
8485
  }
8486
+ return xi(() => {
8487
+ for (let t = 0; t < e.length; t++) {
8488
+ const s = e[t];
8489
+ this._functionDescriptions.delete(s.functionName);
8490
+ }
8491
+ });
8442
8492
  }
8443
8493
  getDescriptions() {
8444
8494
  return this._functionDescriptions;
@@ -8457,12 +8507,12 @@ class $u extends ue {
8457
8507
  }
8458
8508
  }
8459
8509
  const it = st("univer.formula.function.service");
8460
- var Tu = Object.defineProperty, ju = Object.getOwnPropertyDescriptor, Yu = (n, r, e, t) => {
8461
- for (var s = t > 1 ? void 0 : t ? ju(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8510
+ var ju = Object.defineProperty, Yu = Object.getOwnPropertyDescriptor, Qu = (n, r, e, t) => {
8511
+ for (var s = t > 1 ? void 0 : t ? Yu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8462
8512
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
8463
- return t && s && Tu(r, e, s), s;
8513
+ return t && s && ju(r, e, s), s;
8464
8514
  }, ys = (n, r) => (e, t) => r(e, t, n);
8465
- class wr extends Be {
8515
+ class xr extends Be {
8466
8516
  constructor(r, e, t) {
8467
8517
  super(e), this._accessor = r, this._operatorString = e, this._functionExecutor = t;
8468
8518
  }
@@ -8488,7 +8538,7 @@ class wr extends Be {
8488
8538
  return e.isRow() ? e.getCellByColumn(i) : e.isColumn() ? e.getCellByRow(s) : e.isRange() || e.isTable() ? e.getCellByPosition() : h.create(f.VALUE);
8489
8539
  }
8490
8540
  }
8491
- let xr = class extends Ke {
8541
+ let Pr = class extends Ke {
8492
8542
  constructor(n, r) {
8493
8543
  super(), this._functionService = n, this._injector = r;
8494
8544
  }
@@ -8505,31 +8555,31 @@ let xr = class extends Ke {
8505
8555
  if (e === ye.MINUS)
8506
8556
  t = we.MINUS;
8507
8557
  else
8508
- return e === ye.AT ? new wr(this._injector, e) : void 0;
8558
+ return e === ye.AT ? new xr(this._injector, e) : void 0;
8509
8559
  const s = this._functionService.getExecutor(t);
8510
- return s ? new wr(this._injector, e, s) : (console.error(`No function ${r}`), be.create(f.NAME));
8560
+ return s ? new xr(this._injector, e, s) : (console.error(`No function ${r}`), be.create(f.NAME));
8511
8561
  }
8512
8562
  };
8513
- xr = Yu([
8563
+ Pr = Qu([
8514
8564
  ys(0, it),
8515
8565
  ys(1, le(Tt))
8516
- ], xr);
8566
+ ], Pr);
8517
8567
  function ei(n, r, e) {
8518
8568
  let t, s;
8519
8569
  const i = n.slice(0, 2);
8520
8570
  let a = 0;
8521
8571
  if (new RegExp(ye.MINUS, "g").test(i)) {
8522
8572
  const o = r.getExecutor(we.MINUS);
8523
- t = new wr(e, ye.MINUS, o), a++;
8573
+ t = new xr(e, ye.MINUS, o), a++;
8524
8574
  }
8525
- return new RegExp(ye.AT, "g").test(i) && (s = new wr(e, ye.AT), t && s.setParent(t), a++), a > 0 && (n = n.slice(a)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: s };
8575
+ return new RegExp(ye.AT, "g").test(i) && (s = new xr(e, ye.AT), t && s.setParent(t), a++), a > 0 && (n = n.slice(a)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: s };
8526
8576
  }
8527
- var Qu = Object.defineProperty, zu = Object.getOwnPropertyDescriptor, Hu = (n, r, e, t) => {
8528
- for (var s = t > 1 ? void 0 : t ? zu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8577
+ var zu = Object.defineProperty, Hu = Object.getOwnPropertyDescriptor, Iu = (n, r, e, t) => {
8578
+ for (var s = t > 1 ? void 0 : t ? Hu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8529
8579
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
8530
- return t && s && Qu(r, e, s), s;
8580
+ return t && s && zu(r, e, s), s;
8531
8581
  }, It = (n, r) => (e, t) => r(e, t, n);
8532
- class Iu extends Be {
8582
+ class Wu extends Be {
8533
8583
  constructor(r, e, t, s, i) {
8534
8584
  super(r), this._functionExecutor = e, this._currentConfigService = t, this._runtimeService = s, this._definedNamesService = i, this._functionExecutor.isAsync() && this.setAsync(), this._functionExecutor.isAddress() && this.setAddress();
8535
8585
  }
@@ -8577,24 +8627,27 @@ class Iu extends Be {
8577
8627
  const t = r[1].getValue(), s = r[2].getValue();
8578
8628
  if (!(t != null && t.isReferenceObject()) && !(s != null && s.isReferenceObject()))
8579
8629
  return;
8580
- const i = t.getRangeData(), a = s.getRangeData(), { startRow: o, startColumn: u, endRow: c, endColumn: l } = i, d = c - o + 1, m = l - u + 1, { startRow: _, startColumn: C, endRow: y, endColumn: S } = a, L = y - _ + 1, V = S - C + 1;
8630
+ const i = t.getRangeData(), a = s.getRangeData(), { startRow: o, startColumn: u, endRow: c, endColumn: l } = i, d = c - o + 1, m = l - u + 1, { startRow: _, startColumn: C, endRow: E, endColumn: S } = a, L = E - _ + 1, V = S - C + 1;
8581
8631
  d !== L && (a.endRow += d - L), m !== V && (a.endColumn += m - V);
8582
8632
  }
8583
8633
  _calculate(r) {
8584
- var t;
8585
- let e;
8634
+ var i;
8635
+ const { minParams: e, maxParams: t } = this._functionExecutor;
8636
+ if (e !== -1 && t !== -1 && (r.length < e || r.length > t))
8637
+ return h.create(f.NA);
8638
+ let s;
8586
8639
  if (this._setRefInfo(), this._functionExecutor.isCustom()) {
8587
- const s = this._functionExecutor.calculateCustom(
8588
- ...r.map((i) => i.isArray() ? i.toValue() : i.getValue())
8640
+ const a = this._functionExecutor.calculateCustom(
8641
+ ...r.map((o) => o.isArray() ? o.toValue() : o.getValue())
8589
8642
  );
8590
- if (typeof s != "object" || s == null)
8591
- e = Lt.create(s);
8643
+ if (typeof a != "object" || a == null)
8644
+ s = wt.create(a);
8592
8645
  else {
8593
- const i = _a(s);
8594
- e = Se.create({
8595
- calculateValueList: i,
8596
- rowCount: i.length,
8597
- columnCount: ((t = i[0]) == null ? void 0 : t.length) || 0,
8646
+ const o = Ea(a);
8647
+ s = Se.create({
8648
+ calculateValueList: o,
8649
+ rowCount: o.length,
8650
+ columnCount: ((i = o[0]) == null ? void 0 : i.length) || 0,
8598
8651
  unitId: "",
8599
8652
  sheetId: "",
8600
8653
  row: -1,
@@ -8602,8 +8655,8 @@ class Iu extends Be {
8602
8655
  });
8603
8656
  }
8604
8657
  } else
8605
- this._functionExecutor.isAddress() && this._setDefinedNamesForFunction(), e = this._functionExecutor.calculate(...r);
8606
- return e;
8658
+ this._functionExecutor.isAddress() && this._setDefinedNamesForFunction(), s = this._functionExecutor.calculate(...r);
8659
+ return s;
8607
8660
  }
8608
8661
  _setDefinedNamesForFunction() {
8609
8662
  const r = this._currentConfigService.getExecuteUnitId();
@@ -8623,7 +8676,7 @@ class Iu extends Be {
8623
8676
  e.setForcedSheetId(this._currentConfigService.getSheetNameMap()), e.setUnitData(this._currentConfigService.getUnitData()), e.setArrayFormulaCellData(this._currentConfigService.getArrayFormulaCellData()), e.setRuntimeData(this._runtimeService.getUnitData()), e.setRuntimeArrayFormulaCellData(this._runtimeService.getRuntimeArrayFormulaCellData()), e.setRuntimeFeatureCellData(this._runtimeService.getRuntimeFeatureCellData());
8624
8677
  }
8625
8678
  }
8626
- let Pr = class extends Ke {
8679
+ let Vr = class extends Ke {
8627
8680
  constructor(n, r, e, t, s) {
8628
8681
  super(), this._functionService = n, this._currentConfigService = r, this._runtimeService = e, this._definedNamesService = t, this._injector = s;
8629
8682
  }
@@ -8632,7 +8685,7 @@ let Pr = class extends Ke {
8632
8685
  }
8633
8686
  create(n) {
8634
8687
  const r = this._functionService.getExecutor(n);
8635
- return r ? new Iu(n, r, this._currentConfigService, this._runtimeService, this._definedNamesService) : (console.error(`No function ${n}`), be.create(f.NAME));
8688
+ return r ? new Wu(n, r, this._currentConfigService, this._runtimeService, this._definedNamesService) : (console.error(`No function ${n}`), be.create(f.NAME));
8636
8689
  }
8637
8690
  checkAndCreateNodeType(n) {
8638
8691
  if (typeof n == "string")
@@ -8647,18 +8700,18 @@ let Pr = class extends Ke {
8647
8700
  }
8648
8701
  }
8649
8702
  };
8650
- Pr = Hu([
8703
+ Vr = Iu([
8651
8704
  It(0, it),
8652
8705
  It(1, mt),
8653
8706
  It(2, We),
8654
- It(3, Yr),
8707
+ It(3, Qr),
8655
8708
  It(4, le(Tt))
8656
- ], Pr);
8657
- var Wu = Object.defineProperty, Xu = Object.getOwnPropertyDescriptor, Gu = (n, r, e, t) => {
8658
- for (var s = t > 1 ? void 0 : t ? Xu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8709
+ ], Vr);
8710
+ var Xu = Object.defineProperty, Gu = Object.getOwnPropertyDescriptor, Ku = (n, r, e, t) => {
8711
+ for (var s = t > 1 ? void 0 : t ? Gu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8659
8712
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
8660
- return t && s && Wu(r, e, s), s;
8661
- }, Ku = (n, r) => (e, t) => r(e, t, n);
8713
+ return t && s && Xu(r, e, s), s;
8714
+ }, qu = (n, r) => (e, t) => r(e, t, n);
8662
8715
  let $t = class extends ue {
8663
8716
  constructor(n) {
8664
8717
  super(), this._runtimeService = n;
@@ -8730,13 +8783,13 @@ let $t = class extends ue {
8730
8783
  return n.execute(), bt.SUCCESS;
8731
8784
  }
8732
8785
  };
8733
- $t = Gu([
8734
- Ku(0, We)
8786
+ $t = Ku([
8787
+ qu(0, We)
8735
8788
  ], $t);
8736
8789
  function ti(n) {
8737
8790
  return n instanceof K ? n.getToken() === Mt : !1;
8738
8791
  }
8739
- function qu(n) {
8792
+ function Zu(n) {
8740
8793
  return n instanceof K ? n.getToken() === Ms : !1;
8741
8794
  }
8742
8795
  function ri(n) {
@@ -8769,7 +8822,7 @@ class kn extends dt {
8769
8822
  this._setLambdaPrivacyValueMap(e), this._setLambdaNodeValue(this._lambdaNode), this._lambdaNode.setNotEmpty(!1);
8770
8823
  let s;
8771
8824
  if (this._interpreter.checkAsyncNode(this._lambdaNode))
8772
- s = new Ca(this._interpreter.executeAsync(this._lambdaNode));
8825
+ s = new ba(this._interpreter.executeAsync(this._lambdaNode));
8773
8826
  else {
8774
8827
  const i = this._interpreter.execute(this._lambdaNode);
8775
8828
  i.isReferenceObject() ? s = i.toArrayValueObject() : s = i;
@@ -8800,12 +8853,12 @@ class kn extends dt {
8800
8853
  }
8801
8854
  }
8802
8855
  }
8803
- var Zu = Object.defineProperty, Ju = Object.getOwnPropertyDescriptor, Nu = (n, r, e, t) => {
8804
- for (var s = t > 1 ? void 0 : t ? Ju(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8856
+ var Ju = Object.defineProperty, Nu = Object.getOwnPropertyDescriptor, ec = (n, r, e, t) => {
8857
+ for (var s = t > 1 ? void 0 : t ? Nu(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8805
8858
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
8806
- return t && s && Zu(r, e, s), s;
8859
+ return t && s && Ju(r, e, s), s;
8807
8860
  }, Ds = (n, r) => (e, t) => r(e, t, n);
8808
- class ec extends Be {
8861
+ class tc extends Be {
8809
8862
  constructor(e, t, s, i) {
8810
8863
  super(e);
8811
8864
  D(this, "_isNotEmpty", !0);
@@ -8845,7 +8898,7 @@ class ec extends Be {
8845
8898
  // return Promise.resolve(AstNodePromiseType.SUCCESS);
8846
8899
  // }
8847
8900
  }
8848
- let Vr = class extends Ke {
8901
+ let vr = class extends Ke {
8849
8902
  constructor(n, r) {
8850
8903
  super(), this._runtimeService = n, this._interpreter = r;
8851
8904
  }
@@ -8873,7 +8926,7 @@ let Vr = class extends Ke {
8873
8926
  } else
8874
8927
  return be.create(f.VALUE);
8875
8928
  }
8876
- return this._runtimeService.registerFunctionDefinitionPrivacyVar(i, a), this._updateLambdaStatement(s, i, a), new ec(n.getToken(), i, this._interpreter, [...a.keys()]);
8929
+ return this._runtimeService.registerFunctionDefinitionPrivacyVar(i, a), this._updateLambdaStatement(s, i, a), new tc(n.getToken(), i, this._interpreter, [...a.keys()]);
8877
8930
  }
8878
8931
  checkAndCreateNodeType(n) {
8879
8932
  if (!(!(n instanceof K) || n.getToken().trim().toUpperCase() !== Jt))
@@ -8899,10 +8952,10 @@ let Vr = class extends Ke {
8899
8952
  }
8900
8953
  }
8901
8954
  };
8902
- Vr = Nu([
8955
+ vr = ec([
8903
8956
  Ds(0, We),
8904
8957
  Ds(1, le($t))
8905
- ], Vr);
8958
+ ], vr);
8906
8959
  function ni(n) {
8907
8960
  if (!n)
8908
8961
  return;
@@ -8912,7 +8965,7 @@ function ni(n) {
8912
8965
  if (e)
8913
8966
  return ni(e.get(t));
8914
8967
  }
8915
- class tc extends Be {
8968
+ class rc extends Be {
8916
8969
  constructor(r, e, t) {
8917
8970
  super(r), this._lambdaParameter = e, this._currentLambdaPrivacyVar = t;
8918
8971
  }
@@ -8941,14 +8994,14 @@ class si extends Ke {
8941
8994
  }
8942
8995
  create(r) {
8943
8996
  const e = r.getFunctionDefinitionPrivacyVar(), t = r.getLambdaParameter();
8944
- return e ? new tc(r.getToken(), t, e) : new be(f.SPILL);
8997
+ return e ? new rc(r.getToken(), t, e) : new be(f.SPILL);
8945
8998
  }
8946
8999
  checkAndCreateNodeType(r) {
8947
9000
  if (!(!(r instanceof K) || r.getToken().trim() !== nr))
8948
9001
  return this.create(r);
8949
9002
  }
8950
9003
  }
8951
- class rc extends Be {
9004
+ class nc extends Be {
8952
9005
  constructor(r) {
8953
9006
  super(r), this._operatorString = r;
8954
9007
  }
@@ -8959,12 +9012,12 @@ class rc extends Be {
8959
9012
  this.setValue(oe.create());
8960
9013
  }
8961
9014
  }
8962
- var nc = Object.defineProperty, sc = Object.getOwnPropertyDescriptor, ic = (n, r, e, t) => {
8963
- for (var s = t > 1 ? void 0 : t ? sc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9015
+ var sc = Object.defineProperty, ic = Object.getOwnPropertyDescriptor, ac = (n, r, e, t) => {
9016
+ for (var s = t > 1 ? void 0 : t ? ic(r, e) : r, i = n.length - 1, a; i >= 0; i--)
8964
9017
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
8965
- return t && s && nc(r, e, s), s;
8966
- }, ac = (n, r) => (e, t) => r(e, t, n);
8967
- class oc extends Be {
9018
+ return t && s && sc(r, e, s), s;
9019
+ }, oc = (n, r) => (e, t) => r(e, t, n);
9020
+ class uc extends Be {
8968
9021
  constructor(r, e) {
8969
9022
  super(r), this._operatorString = r, this._functionExecutor = e;
8970
9023
  }
@@ -8989,7 +9042,7 @@ class oc extends Be {
8989
9042
  );
8990
9043
  }
8991
9044
  }
8992
- let vr = class extends Ke {
9045
+ let Ur = class extends Ke {
8993
9046
  constructor(n) {
8994
9047
  super(), this._functionService = n;
8995
9048
  }
@@ -8999,9 +9052,9 @@ let vr = class extends Ke {
8999
9052
  create(n) {
9000
9053
  let r = "";
9001
9054
  const e = n;
9002
- e === me.PLUS ? r = we.PLUS : e === me.MINUS ? r = we.MINUS : e === me.MULTIPLY ? r = we.MULTIPLY : e === me.DIVIDED ? r = we.DIVIDED : e === me.CONCATENATE ? r = Ct.CONCATENATE : e === me.POWER ? r = Ue.POWER : Oi.has(e) && (r = we.COMPARE);
9055
+ e === me.PLUS ? r = we.PLUS : e === me.MINUS ? r = we.MINUS : e === me.MULTIPLY ? r = we.MULTIPLY : e === me.DIVIDED ? r = we.DIVIDED : e === me.CONCATENATE ? r = Ct.CONCATENATE : e === me.POWER ? r = Ue.POWER : Fi.has(e) && (r = we.COMPARE);
9003
9056
  const t = this._functionService.getExecutor(r);
9004
- return t ? new oc(e, t) : (console.error(`No function ${n}`), be.create(f.NAME));
9057
+ return t ? new uc(e, t) : (console.error(`No function ${n}`), be.create(f.NAME));
9005
9058
  }
9006
9059
  checkAndCreateNodeType(n) {
9007
9060
  if (n instanceof K)
@@ -9011,10 +9064,10 @@ let vr = class extends Ke {
9011
9064
  return this.create(r);
9012
9065
  }
9013
9066
  };
9014
- vr = ic([
9015
- ac(0, it)
9016
- ], vr);
9017
- class uc extends ue {
9067
+ Ur = ac([
9068
+ oc(0, it)
9069
+ ], Ur);
9070
+ class cc extends ue {
9018
9071
  constructor() {
9019
9072
  super(...arguments);
9020
9073
  // 18.5.1.2 table (Table)
@@ -9044,15 +9097,15 @@ class uc extends ue {
9044
9097
  }
9045
9098
  }
9046
9099
  const $n = st("univer.formula.super-table.service");
9047
- class cc extends ar {
9100
+ class lc extends ar {
9048
9101
  constructor(r, e, t, s) {
9049
9102
  super(r), this._tableData = e, this._columnDataString = t;
9050
9103
  const i = this._tableData.sheetId, a = this._tableData.range, o = this._tableData.titleMap;
9051
9104
  this.setForcedSheetIdDirect(i);
9052
9105
  const u = this._stringToColumnData(this._columnDataString, o, s), c = u.startColumn, l = u.endColumn, d = u.type;
9053
9106
  let m = -1, _ = -1;
9054
- const C = a.startRow, y = a.startColumn;
9055
- d === Et.ALL ? (m = C, _ = y) : d === Et.DATA ? (m = C + 1, _ = y) : d === Et.HEADERS ? (m = C, _ = C) : d === Et.TOTALS && (m = y, _ = y), this.setRangeData({
9107
+ const C = a.startRow, E = a.startColumn;
9108
+ d === Et.ALL ? (m = C, _ = E) : d === Et.DATA ? (m = C + 1, _ = E) : d === Et.HEADERS ? (m = C, _ = C) : d === Et.TOTALS && (m = E, _ = E), this.setRangeData({
9056
9109
  startColumn: c,
9057
9110
  endColumn: l,
9058
9111
  startRow: m,
@@ -9094,10 +9147,10 @@ class cc extends ar {
9094
9147
  };
9095
9148
  }
9096
9149
  }
9097
- var lc = Object.defineProperty, fc = Object.getOwnPropertyDescriptor, hc = (n, r, e, t) => {
9098
- for (var s = t > 1 ? void 0 : t ? fc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9150
+ var fc = Object.defineProperty, hc = Object.getOwnPropertyDescriptor, dc = (n, r, e, t) => {
9151
+ for (var s = t > 1 ? void 0 : t ? hc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9099
9152
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
9100
- return t && s && lc(r, e, s), s;
9153
+ return t && s && fc(r, e, s), s;
9101
9154
  }, fr = (n, r) => (e, t) => r(e, t, n);
9102
9155
  class hr extends Be {
9103
9156
  constructor(r, e, t, s = !1) {
@@ -9113,7 +9166,7 @@ class hr extends Be {
9113
9166
  this._referenceObject.setRefOffset(t, s), !this._isPrepareMerge && this._referenceObject.isExceedRange() ? this.setValue(h.create(f.NAME)) : this.setValue(this._referenceObject);
9114
9167
  }
9115
9168
  }
9116
- let Ur = class extends Ke {
9169
+ let Br = class extends Ke {
9117
9170
  constructor(n, r, e, t) {
9118
9171
  super(), this._superTableService = n, this._formulaRuntimeService = r, this._functionService = e, this._injector = t;
9119
9172
  }
@@ -9136,13 +9189,13 @@ let Ur = class extends Ke {
9136
9189
  const l = this._formulaRuntimeService.currentUnitId, d = this._superTableService.getTableMap(l), m = new RegExp(Ys, "g"), _ = s.replace(m, "");
9137
9190
  if (!r && (d != null && d.has(_))) {
9138
9191
  const C = m.exec(s);
9139
- let y = "";
9140
- C && (y = C[0]);
9192
+ let E = "";
9193
+ C && (E = C[0]);
9141
9194
  const S = d.get(_), L = this._superTableService.getTableOptionMap();
9142
9195
  o = new hr(
9143
9196
  this._injector,
9144
9197
  s,
9145
- new cc(s, S, y, L)
9198
+ new lc(s, S, E, L)
9146
9199
  );
9147
9200
  }
9148
9201
  }
@@ -9154,16 +9207,16 @@ let Ur = class extends Ke {
9154
9207
  return ((e = (r = n.getParent()) == null ? void 0 : r.getParent()) == null ? void 0 : e.getToken().trim()) === I.COLON;
9155
9208
  }
9156
9209
  };
9157
- Ur = hc([
9210
+ Br = dc([
9158
9211
  fr(0, $n),
9159
9212
  fr(1, We),
9160
9213
  fr(2, it),
9161
9214
  fr(3, le(Tt))
9162
- ], Ur);
9163
- var dc = Object.defineProperty, mc = Object.getOwnPropertyDescriptor, gc = (n, r, e, t) => {
9164
- for (var s = t > 1 ? void 0 : t ? mc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9215
+ ], Br);
9216
+ var mc = Object.defineProperty, gc = Object.getOwnPropertyDescriptor, pc = (n, r, e, t) => {
9217
+ for (var s = t > 1 ? void 0 : t ? gc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9165
9218
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
9166
- return t && s && dc(r, e, s), s;
9219
+ return t && s && mc(r, e, s), s;
9167
9220
  }, Cs = (n, r) => (e, t) => r(e, t, n);
9168
9221
  class bs extends Be {
9169
9222
  constructor(r, e, t) {
@@ -9189,7 +9242,7 @@ class bs extends Be {
9189
9242
  return c && t.treeBuilder(c), h.create(f.VALUE);
9190
9243
  }
9191
9244
  }
9192
- let Br = class extends Ke {
9245
+ let Or = class extends Ke {
9193
9246
  constructor(n, r) {
9194
9247
  super(), this._functionService = n, this._injector = r;
9195
9248
  }
@@ -9211,16 +9264,16 @@ let Br = class extends Ke {
9211
9264
  return t ? new bs(this._injector, r, t) : (console.error(`No function ${n}`), be.create(f.NAME));
9212
9265
  }
9213
9266
  };
9214
- Br = gc([
9267
+ Or = pc([
9215
9268
  Cs(0, it),
9216
9269
  Cs(1, le(Tt))
9217
- ], Br);
9218
- var pc = Object.defineProperty, Rc = Object.getOwnPropertyDescriptor, _c = (n, r, e, t) => {
9219
- for (var s = t > 1 ? void 0 : t ? Rc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9270
+ ], Or);
9271
+ var Rc = Object.defineProperty, _c = Object.getOwnPropertyDescriptor, Ec = (n, r, e, t) => {
9272
+ for (var s = t > 1 ? void 0 : t ? _c(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9220
9273
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
9221
- return t && s && pc(r, e, s), s;
9222
- }, Ec = (n, r) => (e, t) => r(e, t, n);
9223
- class yc extends Be {
9274
+ return t && s && Rc(r, e, s), s;
9275
+ }, yc = (n, r) => (e, t) => r(e, t, n);
9276
+ class Dc extends Be {
9224
9277
  constructor(r) {
9225
9278
  super(r), this._operatorString = r;
9226
9279
  }
@@ -9238,7 +9291,7 @@ class yc extends Be {
9238
9291
  return r.isError() || e.isError() || !r.isReferenceObject() || !e.isReferenceObject() ? h.create(f.REF) : (r = r, e = e, r.isCell() && e.isCell() || r.isRow() && e.isRow() || r.isColumn() && e.isColumn() ? r.unionBy(e) : h.create(f.REF));
9239
9292
  }
9240
9293
  }
9241
- let Or = class extends Ke {
9294
+ let Fr = class extends Ke {
9242
9295
  constructor(n) {
9243
9296
  super(), this._functionService = n;
9244
9297
  }
@@ -9246,7 +9299,7 @@ let Or = class extends Ke {
9246
9299
  return Xe.get(J.UNION) || Ge;
9247
9300
  }
9248
9301
  create(n) {
9249
- return new yc(n);
9302
+ return new Dc(n);
9250
9303
  }
9251
9304
  checkAndCreateNodeType(n) {
9252
9305
  if (!(n instanceof K))
@@ -9256,10 +9309,10 @@ let Or = class extends Ke {
9256
9309
  return this.create(e);
9257
9310
  }
9258
9311
  };
9259
- Or = _c([
9260
- Ec(0, it)
9261
- ], Or);
9262
- class Dc extends Be {
9312
+ Fr = Ec([
9313
+ yc(0, it)
9314
+ ], Fr);
9315
+ class Cc extends Be {
9263
9316
  constructor(r) {
9264
9317
  super(r), this._operatorString = r;
9265
9318
  }
@@ -9267,7 +9320,7 @@ class Dc extends Be {
9267
9320
  return J.VALUE;
9268
9321
  }
9269
9322
  execute() {
9270
- this.setValue(Lt.create(this._operatorString));
9323
+ this.setValue(wt.create(this._operatorString));
9271
9324
  }
9272
9325
  }
9273
9326
  class ii extends Ke {
@@ -9284,29 +9337,29 @@ class ii extends Ke {
9284
9337
  if (t === "{" && s === "}")
9285
9338
  return this.create(e);
9286
9339
  const i = e.toUpperCase();
9287
- if (i === St.TRUE || i === St.FALSE)
9340
+ if (i === At.TRUE || i === At.FALSE)
9288
9341
  return this.create(i);
9289
9342
  } else
9290
9343
  return this.create(r);
9291
9344
  }
9292
9345
  create(r) {
9293
- return new Dc(r);
9346
+ return new Cc(r);
9294
9347
  }
9295
9348
  checkAndCreateNodeType(r) {
9296
9349
  if (!(r instanceof K))
9297
9350
  return this._checkValueNode(r);
9298
9351
  }
9299
9352
  }
9300
- function Cc(n) {
9353
+ function bc(n) {
9301
9354
  let r = n;
9302
9355
  for (; r != null && r.getParent(); )
9303
9356
  r = r.getParent();
9304
9357
  return r;
9305
9358
  }
9306
- var bc = Object.defineProperty, Sc = Object.getOwnPropertyDescriptor, Ac = (n, r, e, t) => {
9307
- for (var s = t > 1 ? void 0 : t ? Sc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9359
+ var Sc = Object.defineProperty, Ac = Object.getOwnPropertyDescriptor, Lc = (n, r, e, t) => {
9360
+ for (var s = t > 1 ? void 0 : t ? Ac(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9308
9361
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
9309
- return t && s && bc(r, e, s), s;
9362
+ return t && s && Sc(r, e, s), s;
9310
9363
  }, Te = (n, r) => (e, t) => r(e, t, n);
9311
9364
  let tr = class extends ue {
9312
9365
  constructor(r, e, t, s, i, a, o, u, c, l, d) {
@@ -9372,13 +9425,13 @@ let tr = class extends ue {
9372
9425
  const t = r.getChildren(), s = t.length, i = [];
9373
9426
  let a = null;
9374
9427
  const o = r.getToken().trim().toUpperCase();
9375
- if (o === Qi) {
9428
+ if (o === zi) {
9376
9429
  const l = this._changeLetToLambda(r);
9377
9430
  return l != null ? this._parse(l, e) : be.create(f.ERROR);
9378
9431
  }
9379
9432
  if (o === Ze) {
9380
9433
  if (a = e, s === 0)
9381
- return new rc(ct).setParent(e), a;
9434
+ return new nc(ct).setParent(e), a;
9382
9435
  } else {
9383
9436
  if (o === Mt) {
9384
9437
  let l = this._lambdaParameterHandler(r, e);
@@ -9393,7 +9446,7 @@ let tr = class extends ue {
9393
9446
  if (ti(u)) {
9394
9447
  if (l !== 0 && l !== s - 1)
9395
9448
  continue;
9396
- } else if (qu(d) && l !== s - 1)
9449
+ } else if (Zu(d) && l !== s - 1)
9397
9450
  continue;
9398
9451
  let m = null;
9399
9452
  if (d instanceof K) {
@@ -9403,7 +9456,7 @@ let tr = class extends ue {
9403
9456
  m = this._checkAstNode(d);
9404
9457
  if (m == null)
9405
9458
  return be.create(f.NAME);
9406
- if (m = Cc(m), m == null)
9459
+ if (m = bc(m), m == null)
9407
9460
  return;
9408
9461
  switch (m.nodeType) {
9409
9462
  case J.ERROR:
@@ -9466,23 +9519,23 @@ let tr = class extends ue {
9466
9519
  this._suffixNodeFactory,
9467
9520
  this._unionNodeFactory,
9468
9521
  this._valueNodeFactory
9469
- ].sort(xi);
9522
+ ].sort(Pi);
9470
9523
  }
9471
9524
  };
9472
- tr = Ac([
9525
+ tr = Lc([
9473
9526
  Te(0, We),
9474
9527
  Te(1, le(Ns)),
9475
- Te(2, le(Pr)),
9476
- Te(3, le(Vr)),
9528
+ Te(2, le(Vr)),
9529
+ Te(3, le(vr)),
9477
9530
  Te(4, le(si)),
9478
- Te(5, le(vr)),
9479
- Te(6, le(xr)),
9480
- Te(7, le(Ur)),
9481
- Te(8, le(Br)),
9482
- Te(9, le(Or)),
9531
+ Te(5, le(Ur)),
9532
+ Te(6, le(Pr)),
9533
+ Te(7, le(Br)),
9534
+ Te(8, le(Or)),
9535
+ Te(9, le(Fr)),
9483
9536
  Te(10, le(ii))
9484
9537
  ], tr);
9485
- class Lc extends ue {
9538
+ class wc extends ue {
9486
9539
  constructor() {
9487
9540
  super(...arguments);
9488
9541
  D(this, "_referenceExecutorMap", /* @__PURE__ */ new Map());
@@ -9506,10 +9559,10 @@ class Lc extends ue {
9506
9559
  return this._referenceExecutorMap;
9507
9560
  }
9508
9561
  }
9509
- const Qr = st(
9562
+ const zr = st(
9510
9563
  "univer.formula.feature-calculation-manager.service"
9511
9564
  );
9512
- class wc extends ue {
9565
+ class xc extends ue {
9513
9566
  constructor() {
9514
9567
  super(...arguments);
9515
9568
  D(this, "_otherFormulaData", {});
@@ -9585,7 +9638,7 @@ class wc extends ue {
9585
9638
  const Tn = st(
9586
9639
  "univer.formula.other-formula-manager.service"
9587
9640
  );
9588
- class Jr extends ue {
9641
+ class Nr extends ue {
9589
9642
  constructor() {
9590
9643
  super(...arguments);
9591
9644
  D(this, "node");
@@ -9647,14 +9700,14 @@ class Jr extends ue {
9647
9700
  const _ = e.get(l);
9648
9701
  if (!_.has(d))
9649
9702
  continue;
9650
- const C = _.get(d), y = (a = s == null ? void 0 : s[l]) == null ? void 0 : a[d];
9703
+ const C = _.get(d), E = (a = s == null ? void 0 : s[l]) == null ? void 0 : a[d];
9651
9704
  let { startRow: S, endRow: L, startColumn: V, endColumn: M } = m;
9652
9705
  Number.isNaN(S) && (S = 0), Number.isNaN(V) && (V = 0), Number.isNaN(L) && (L = Number.POSITIVE_INFINITY), Number.isNaN(M) && (M = Number.POSITIVE_INFINITY);
9653
9706
  for (const H of C) {
9654
9707
  const { startRow: de, startColumn: ge, endRow: pe, endColumn: ee } = H;
9655
9708
  if (!(S > pe || L < de || V > ee || M < ge)) {
9656
9709
  let Z = !0;
9657
- if (y == null || y.forValue((se, G) => {
9710
+ if (E == null || E.forValue((se, G) => {
9658
9711
  if (se >= S && se <= L && G >= V && G <= M)
9659
9712
  return Z = !1, !1;
9660
9713
  }), Z)
@@ -9744,7 +9797,7 @@ class ai extends ue {
9744
9797
  });
9745
9798
  }
9746
9799
  }
9747
- class xc extends ue {
9800
+ class Pc extends ue {
9748
9801
  constructor() {
9749
9802
  super(...arguments);
9750
9803
  D(this, "_otherFormulaData", {});
@@ -9850,15 +9903,15 @@ class xc extends ue {
9850
9903
  return ((o = (a = this._formulaData[e]) == null ? void 0 : a[t]) == null ? void 0 : o.getValue(s, i)) != null;
9851
9904
  }
9852
9905
  }
9853
- const zr = st(
9906
+ const Hr = st(
9854
9907
  "univer.formula.dependency-manager.service"
9855
9908
  );
9856
- var Pc = Object.defineProperty, Vc = Object.getOwnPropertyDescriptor, vc = (n, r, e, t) => {
9857
- for (var s = t > 1 ? void 0 : t ? Vc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9909
+ var Vc = Object.defineProperty, vc = Object.getOwnPropertyDescriptor, Uc = (n, r, e, t) => {
9910
+ for (var s = t > 1 ? void 0 : t ? vc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
9858
9911
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
9859
- return t && s && Pc(r, e, s), s;
9912
+ return t && s && Vc(r, e, s), s;
9860
9913
  }, ot = (n, r) => (e, t) => r(e, t, n);
9861
- const Uc = 1e5, Nr = new wt(Uc);
9914
+ const Bc = 1e5, dr = new xt(Bc);
9862
9915
  let Kt = class extends ue {
9863
9916
  constructor(r, e, t, s, i, a, o, u) {
9864
9917
  super();
@@ -9867,7 +9920,7 @@ let Kt = class extends ue {
9867
9920
  this._currentConfigService = r, this._runtimeService = e, this._otherFormulaManagerService = t, this._featureCalculationManagerService = s, this._interpreter = i, this._astTreeBuilder = a, this._lexer = o, this._dependencyManagerService = u;
9868
9921
  }
9869
9922
  dispose() {
9870
- this._updateRangeFlattenCache.clear(), Nr.clear(), this._dirtyUnitSheetNameMap = {};
9923
+ this._updateRangeFlattenCache.clear(), dr.clear(), this._dirtyUnitSheetNameMap = {};
9871
9924
  }
9872
9925
  async generate() {
9873
9926
  this._updateRangeFlatten();
@@ -9900,36 +9953,36 @@ let Kt = class extends ue {
9900
9953
  */
9901
9954
  async _generateTreeList(r, e, t) {
9902
9955
  const s = Object.keys(r), i = Object.keys(e), a = [];
9903
- this._registerFormulas(s, r, t, a), this._registerOtherFormulas(e, i, a), this._registerFeatureFormulas(a);
9904
- const o = new ai();
9905
- for (let u = 0, c = a.length; u < c; u++) {
9906
- const l = a[u];
9956
+ this._currentConfigService.isForceCalculate() && (this._dependencyManagerService.reset(), dr.clear()), this._registerFormulas(s, r, t, a), this._registerOtherFormulas(e, i, a), this._registerFeatureFormulas(a);
9957
+ const u = new ai();
9958
+ for (let c = 0, l = a.length; c < l; c++) {
9959
+ const d = a[c];
9907
9960
  if (this._runtimeService.setCurrent(
9908
- l.row,
9909
- l.column,
9910
- l.rowCount,
9911
- l.columnCount,
9912
- l.subUnitId,
9913
- l.unitId
9914
- ), l.node == null)
9961
+ d.row,
9962
+ d.column,
9963
+ d.rowCount,
9964
+ d.columnCount,
9965
+ d.subUnitId,
9966
+ d.unitId
9967
+ ), d.node == null)
9915
9968
  continue;
9916
- const d = await this._getRangeListByNode(l.node);
9917
- for (let m = 0, _ = d.length; m < _; m++) {
9918
- const C = d[m];
9919
- l.pushRangeList(C), o.add(C, l);
9969
+ const m = await this._getRangeListByNode(d.node);
9970
+ for (let _ = 0, C = m.length; _ < C; _++) {
9971
+ const E = m[_];
9972
+ d.pushRangeList(E), u.add(E, d);
9920
9973
  }
9921
9974
  }
9922
- return { treeList: a, dependencyTreeCache: o };
9975
+ return { treeList: a, dependencyTreeCache: u };
9923
9976
  }
9924
9977
  _registerFeatureFormulas(r) {
9925
9978
  this._featureCalculationManagerService.getReferenceExecutorMap().forEach((e, t) => {
9926
9979
  const { unitId: s, subUnitId: i, dependencyRanges: a, getDirtyData: o } = e;
9927
9980
  if (this._dependencyManagerService.hasFeatureFormulaDependency(s, i, t))
9928
9981
  return !0;
9929
- const u = new Jr();
9982
+ const u = new Nr();
9930
9983
  u.unitId = s, u.subUnitId = i, u.getDirtyData = o, u.featureId = t, u.rangeList = a.map((c) => ({
9931
9984
  gridRange: c,
9932
- token: Bt({ ...c, sheetName: this._currentConfigService.getSheetName(c.unitId, c.sheetId) })
9985
+ token: Ot({ ...c, sheetName: this._currentConfigService.getSheetName(c.unitId, c.sheetId) })
9933
9986
  })), this._dependencyManagerService.addFeatureFormulaDependency(t, u), r.push(u);
9934
9987
  });
9935
9988
  }
@@ -9947,7 +10000,7 @@ let Kt = class extends ue {
9947
10000
  for (const l of c) {
9948
10001
  if (this._dependencyManagerService.hasOtherFormulaDependency(s, o, l))
9949
10002
  continue;
9950
- const d = u[l], { f: m } = d, _ = this._generateAstNode(m), C = new Jr();
10003
+ const d = u[l], { f: m } = d, _ = this._generateAstNode(m), C = new Nr();
9951
10004
  C.node = _, C.formula = m, C.unitId = s, C.subUnitId = o, C.formulaId = l, this._dependencyManagerService.addOtherFormulaDependency(s, o, l, C), t.push(C);
9952
10005
  }
9953
10006
  }
@@ -9963,10 +10016,10 @@ let Kt = class extends ue {
9963
10016
  new ae(a[u] || {}).forValue((l, d, m) => {
9964
10017
  if (m == null)
9965
10018
  return !0;
9966
- const { f: _, x: C, y } = m;
10019
+ const { f: _, x: C, y: E } = m;
9967
10020
  if (this._dependencyManagerService.hasFormulaDependency(i, u, l, d))
9968
10021
  return !0;
9969
- const S = this._generateAstNode(_, C, y), L = new Jr(), V = t[i][u];
10022
+ const S = this._generateAstNode(_, C, E), L = new Nr(), V = t[i][u];
9970
10023
  L.node = S, L.formula = _, L.unitId = i, L.subUnitId = u, L.row = l, L.column = d, L.rowCount = V.rowCount, L.columnCount = V.columnCount, this._dependencyManagerService.addFormulaDependency(i, u, l, d, L), s.push(L);
9971
10024
  });
9972
10025
  }
@@ -9986,7 +10039,7 @@ let Kt = class extends ue {
9986
10039
  }
9987
10040
  }
9988
10041
  _generateAstNode(r, e = 0, t = 0) {
9989
- let s = Nr.get(`${r}##${e}${t}`);
10042
+ let s = dr.get(`${r}##${e}${t}`);
9990
10043
  if (s && !this._isDirtyDefinedForNode(s))
9991
10044
  return s;
9992
10045
  const i = this._lexer.treeBuilder(r);
@@ -9994,7 +10047,7 @@ let Kt = class extends ue {
9994
10047
  return be.create(i);
9995
10048
  if (s = this._astTreeBuilder.parse(i, e, t), s == null)
9996
10049
  throw new Error("astNode is null");
9997
- return Nr.set(`${r}##${e}${t}`, s), s;
10050
+ return dr.set(`${r}##${e}${t}`, s), s;
9998
10051
  }
9999
10052
  _addFlattenCache(r, e, t) {
10000
10053
  let s = this._updateRangeFlattenCache.get(r);
@@ -10042,11 +10095,11 @@ let Kt = class extends ue {
10042
10095
  this._nodeTraversalRef(r, e), this._nodeTraversalReferenceFunction(r, t);
10043
10096
  const s = [];
10044
10097
  for (let i = 0, a = e.length; i < a; i++) {
10045
- const o = e[i], c = (await this._executeNode(o)).toUnitRange(), l = Bt({ ...c, sheetName: this._currentConfigService.getSheetName(c.unitId, c.sheetId) });
10098
+ const o = e[i], c = (await this._executeNode(o)).toUnitRange(), l = Ot({ ...c, sheetName: this._currentConfigService.getSheetName(c.unitId, c.sheetId) });
10046
10099
  s.push({ gridRange: c, token: l });
10047
10100
  }
10048
10101
  for (let i = 0, a = t.length; i < a; i++) {
10049
- const o = t[i], c = (await this._executeNode(o)).toUnitRange(), l = Bt({ ...c, sheetName: this._currentConfigService.getSheetName(c.unitId, c.sheetId) });
10102
+ const o = t[i], c = (await this._executeNode(o)).toUnitRange(), l = Ot({ ...c, sheetName: this._currentConfigService.getSheetName(c.unitId, c.sheetId) });
10050
10103
  s.push({ gridRange: c, token: l });
10051
10104
  }
10052
10105
  return s;
@@ -10160,31 +10213,31 @@ let Kt = class extends ue {
10160
10213
  return t.reverse();
10161
10214
  }
10162
10215
  };
10163
- Kt = vc([
10216
+ Kt = Uc([
10164
10217
  He(Ie.Rendered, Kt),
10165
10218
  ot(0, mt),
10166
10219
  ot(1, We),
10167
10220
  ot(2, Tn),
10168
- ot(3, Qr),
10221
+ ot(3, zr),
10169
10222
  ot(4, le($t)),
10170
10223
  ot(5, le(tr)),
10171
10224
  ot(6, le(kt)),
10172
- ot(7, zr)
10225
+ ot(7, Hr)
10173
10226
  ], Kt);
10174
- var Bc = Object.defineProperty, Oc = Object.getOwnPropertyDescriptor, Fc = (n, r, e, t) => {
10175
- for (var s = t > 1 ? void 0 : t ? Oc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10227
+ var Oc = Object.defineProperty, Fc = Object.getOwnPropertyDescriptor, Mc = (n, r, e, t) => {
10228
+ for (var s = t > 1 ? void 0 : t ? Fc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10176
10229
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10177
- return t && s && Bc(r, e, s), s;
10230
+ return t && s && Oc(r, e, s), s;
10178
10231
  }, Rt = (n, r) => (e, t) => r(e, t, n);
10179
- const Mc = 1;
10232
+ const kc = 1;
10180
10233
  let qt = class extends ue {
10181
10234
  constructor(r, e, t, s, i, a, o) {
10182
10235
  super();
10183
- D(this, "_executionStartListener$", new Ut());
10236
+ D(this, "_executionStartListener$", new Bt());
10184
10237
  D(this, "executionStartListener$", this._executionStartListener$.asObservable());
10185
- D(this, "_executionCompleteListener$", new Ut());
10238
+ D(this, "_executionCompleteListener$", new Bt());
10186
10239
  D(this, "executionCompleteListener$", this._executionCompleteListener$.asObservable());
10187
- D(this, "_executionInProgressListener$", new Ut());
10240
+ D(this, "_executionInProgressListener$", new Bt());
10188
10241
  D(this, "executionInProgressListener$", this._executionInProgressListener$.asObservable());
10189
10242
  this._configService = r, this._lexer = e, this._currentConfigService = t, this._runtimeService = s, this._formulaDependencyGenerator = i, this._interpreter = a, this._astTreeBuilder = o;
10190
10243
  }
@@ -10211,7 +10264,7 @@ let qt = class extends ue {
10211
10264
  }
10212
10265
  async execute(r) {
10213
10266
  this._executionStartListener$.next(!0), this._currentConfigService.load(r), this._runtimeService.reset();
10214
- const e = this._configService.getConfig("CYCLE_REFERENCE_COUNT") || Mc;
10267
+ const e = this._configService.getConfig("CYCLE_REFERENCE_COUNT") || kc;
10215
10268
  for (let t = 0; t < e && (await this._execute(), !!this._runtimeService.isCycleDependency()); t++)
10216
10269
  ;
10217
10270
  this._runtimeService.setFormulaExecuteStage(Je.CALCULATION_COMPLETED), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._executionCompleteListener$.next(this._runtimeService.getAllRuntimeData()), hn.clear(), ut.clear();
@@ -10263,7 +10316,7 @@ let qt = class extends ue {
10263
10316
  r ? (this._runtimeService.setFormulaExecuteStage(Je.START_CALCULATION_ARRAY_FORMULA), this._runtimeService.setTotalArrayFormulasToCalculate(e.length)) : (this._runtimeService.setFormulaExecuteStage(Je.START_CALCULATION), this._runtimeService.setTotalFormulasToCalculate(e.length)), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState());
10264
10317
  for (let s = 0, i = e.length; s < i; s++) {
10265
10318
  if (await new Promise((l) => {
10266
- Pi(l);
10319
+ Vi(l);
10267
10320
  }), this._runtimeService.isStopExecution()) {
10268
10321
  this._runtimeService.setFormulaExecuteStage(Je.IDLE), this._runtimeService.markedAsStopFunctionsExecuted(), this._executionCompleteListener$.next(this._runtimeService.getAllRuntimeData());
10269
10322
  return;
@@ -10298,9 +10351,9 @@ let qt = class extends ue {
10298
10351
  s == null || s.serialize();
10299
10352
  }
10300
10353
  };
10301
- qt = Fc([
10354
+ qt = Mc([
10302
10355
  He(Ie.Rendered, qt),
10303
- Rt(0, Vi),
10356
+ Rt(0, vi),
10304
10357
  Rt(1, le(kt)),
10305
10358
  Rt(2, mt),
10306
10359
  Rt(3, We),
@@ -10308,12 +10361,12 @@ qt = Fc([
10308
10361
  Rt(5, le($t)),
10309
10362
  Rt(6, le(tr))
10310
10363
  ], qt);
10311
- var kc = Object.defineProperty, $c = Object.getOwnPropertyDescriptor, Tc = (n, r, e, t) => {
10312
- for (var s = t > 1 ? void 0 : t ? $c(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10364
+ var $c = Object.defineProperty, Tc = Object.getOwnPropertyDescriptor, jc = (n, r, e, t) => {
10365
+ for (var s = t > 1 ? void 0 : t ? Tc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10313
10366
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10314
- return t && s && kc(r, e, s), s;
10315
- }, dr = (n, r) => (e, t) => r(e, t, n);
10316
- let _r = class extends ue {
10367
+ return t && s && $c(r, e, s), s;
10368
+ }, mr = (n, r) => (e, t) => r(e, t, n);
10369
+ let Er = class extends ue {
10317
10370
  constructor(n, r, e, t) {
10318
10371
  super(), this._commandService = n, this._calculateFormulaService = r, this._univerInstanceService = e, this._formulaDataModel = t, this._initialize();
10319
10372
  }
@@ -10418,7 +10471,7 @@ let _r = class extends ue {
10418
10471
  )), this._commandService.executeCommand(
10419
10472
  Bs.id,
10420
10473
  {
10421
- unitData: Ti(r),
10474
+ unitData: ji(r),
10422
10475
  unitOtherData: e
10423
10476
  },
10424
10477
  {
@@ -10427,17 +10480,17 @@ let _r = class extends ue {
10427
10480
  );
10428
10481
  }
10429
10482
  };
10430
- _r = Tc([
10431
- He(Ie.Ready, _r),
10432
- dr(0, ht),
10433
- dr(1, le(qt)),
10434
- dr(2, Rn),
10435
- dr(3, le(er))
10436
- ], _r);
10437
- var jc = Object.defineProperty, Yc = Object.getOwnPropertyDescriptor, Qc = (n, r, e, t) => {
10438
- for (var s = t > 1 ? void 0 : t ? Yc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10483
+ Er = jc([
10484
+ He(Ie.Ready, Er),
10485
+ mr(0, ht),
10486
+ mr(1, le(qt)),
10487
+ mr(2, Rn),
10488
+ mr(3, le(er))
10489
+ ], Er);
10490
+ var Yc = Object.defineProperty, Qc = Object.getOwnPropertyDescriptor, zc = (n, r, e, t) => {
10491
+ for (var s = t > 1 ? void 0 : t ? Qc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10439
10492
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10440
- return t && s && jc(r, e, s), s;
10493
+ return t && s && Yc(r, e, s), s;
10441
10494
  }, en = (n, r) => (e, t) => r(e, t, n);
10442
10495
  let Zt = class extends ue {
10443
10496
  constructor(n = [], r, e, t) {
@@ -10460,8 +10513,8 @@ let Zt = class extends ue {
10460
10513
  Dn,
10461
10514
  bn,
10462
10515
  Sn,
10463
- ji,
10464
10516
  Yi,
10517
+ Qi,
10465
10518
  Os,
10466
10519
  Vs,
10467
10520
  Fs
@@ -10469,22 +10522,22 @@ let Zt = class extends ue {
10469
10522
  }
10470
10523
  _registerFunctions() {
10471
10524
  const n = [
10472
- ...La,
10473
- ...Pa,
10525
+ ...wa,
10474
10526
  ...Va,
10475
- ...Ua,
10476
- ...ja,
10527
+ ...va,
10528
+ ...Ba,
10477
10529
  ...Ya,
10478
- ...za,
10479
- ...ro,
10480
- ...co,
10481
- ...Lo,
10482
- ...To,
10483
- ...Wo,
10484
- ...ru,
10485
- ...gu,
10530
+ ...Qa,
10531
+ ...Ha,
10532
+ ...no,
10533
+ ...lo,
10534
+ ...wo,
10535
+ ...jo,
10536
+ ...Xo,
10537
+ ...nu,
10486
10538
  ...pu,
10487
- ..._u
10539
+ ...Ru,
10540
+ ...Eu
10488
10541
  ].concat(this._function).map((r) => {
10489
10542
  const e = r[0], t = r[1];
10490
10543
  return new e(t);
@@ -10492,18 +10545,18 @@ let Zt = class extends ue {
10492
10545
  this._functionService.registerExecutors(...n);
10493
10546
  }
10494
10547
  };
10495
- Zt = Qc([
10548
+ Zt = zc([
10496
10549
  He(Ie.Ready, Zt),
10497
10550
  en(1, ht),
10498
10551
  en(2, le(Tt)),
10499
10552
  en(3, it)
10500
10553
  ], Zt);
10501
- var zc = Object.defineProperty, Hc = Object.getOwnPropertyDescriptor, Ic = (n, r, e, t) => {
10502
- for (var s = t > 1 ? void 0 : t ? Hc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10554
+ var Hc = Object.defineProperty, Ic = Object.getOwnPropertyDescriptor, Wc = (n, r, e, t) => {
10555
+ for (var s = t > 1 ? void 0 : t ? Ic(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10503
10556
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10504
- return t && s && zc(r, e, s), s;
10557
+ return t && s && Hc(r, e, s), s;
10505
10558
  }, tn = (n, r) => (e, t) => r(e, t, n);
10506
- let Er = class extends ue {
10559
+ let yr = class extends ue {
10507
10560
  constructor(n, r, e) {
10508
10561
  super(), this._commandService = n, this._formulaDataModel = r, this._functionService = e, this._initialize();
10509
10562
  }
@@ -10519,7 +10572,7 @@ let Er = class extends ue {
10519
10572
  return;
10520
10573
  const { functions: t } = e, s = t.map((i) => {
10521
10574
  const a = i[0], o = i[1];
10522
- return Xc(a, o);
10575
+ return Gc(a, o);
10523
10576
  });
10524
10577
  this._functionService.registerExecutors(...s);
10525
10578
  } else if (n.id === Fs.id) {
@@ -10533,27 +10586,27 @@ let Er = class extends ue {
10533
10586
  );
10534
10587
  }
10535
10588
  };
10536
- Er = Ic([
10537
- He(Ie.Ready, Er),
10589
+ yr = Wc([
10590
+ He(Ie.Ready, yr),
10538
10591
  tn(0, ht),
10539
10592
  tn(1, le(er)),
10540
10593
  tn(2, it)
10541
- ], Er);
10542
- class Wc extends k {
10594
+ ], yr);
10595
+ class Xc extends k {
10543
10596
  isCustom() {
10544
10597
  return !0;
10545
10598
  }
10546
10599
  }
10547
- function Xc(n, r) {
10548
- const e = new Wc(r), t = new Function(`return ${n}`)();
10600
+ function Gc(n, r) {
10601
+ const e = new Xc(r), t = new Function(`return ${n}`)();
10549
10602
  return e.calculateCustom = t, e;
10550
10603
  }
10551
- var Gc = Object.defineProperty, Kc = Object.getOwnPropertyDescriptor, qc = (n, r, e, t) => {
10552
- for (var s = t > 1 ? void 0 : t ? Kc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10604
+ var Kc = Object.defineProperty, qc = Object.getOwnPropertyDescriptor, Zc = (n, r, e, t) => {
10605
+ for (var s = t > 1 ? void 0 : t ? qc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10553
10606
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10554
- return t && s && Gc(r, e, s), s;
10607
+ return t && s && Kc(r, e, s), s;
10555
10608
  }, Ss = (n, r) => (e, t) => r(e, t, n);
10556
- let yr = class extends ue {
10609
+ let Dr = class extends ue {
10557
10610
  constructor(n, r) {
10558
10611
  super(), this._commandService = n, this._definedNamesService = r, this._initialize();
10559
10612
  }
@@ -10587,17 +10640,17 @@ let yr = class extends ue {
10587
10640
  );
10588
10641
  }
10589
10642
  };
10590
- yr = qc([
10591
- He(Ie.Ready, yr),
10643
+ Dr = Zc([
10644
+ He(Ie.Ready, Dr),
10592
10645
  Ss(0, ht),
10593
- Ss(1, Yr)
10594
- ], yr);
10595
- var Zc = Object.defineProperty, Jc = Object.getOwnPropertyDescriptor, Nc = (n, r, e, t) => {
10596
- for (var s = t > 1 ? void 0 : t ? Jc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10646
+ Ss(1, Qr)
10647
+ ], Dr);
10648
+ var Jc = Object.defineProperty, Nc = Object.getOwnPropertyDescriptor, el = (n, r, e, t) => {
10649
+ for (var s = t > 1 ? void 0 : t ? Nc(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10597
10650
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10598
- return t && s && Zc(r, e, s), s;
10651
+ return t && s && Jc(r, e, s), s;
10599
10652
  }, As = (n, r) => (e, t) => r(e, t, n);
10600
- let Dr = class extends ue {
10653
+ let Cr = class extends ue {
10601
10654
  constructor(n, r) {
10602
10655
  super(), this._commandService = n, this._featureCalculationManagerService = r, this._initialize();
10603
10656
  }
@@ -10624,17 +10677,17 @@ let Dr = class extends ue {
10624
10677
  );
10625
10678
  }
10626
10679
  };
10627
- Dr = Nc([
10628
- He(Ie.Ready, Dr),
10680
+ Cr = el([
10681
+ He(Ie.Ready, Cr),
10629
10682
  As(0, ht),
10630
- As(1, Qr)
10631
- ], Dr);
10632
- var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, rl = (n, r, e, t) => {
10633
- for (var s = t > 1 ? void 0 : t ? tl(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10683
+ As(1, zr)
10684
+ ], Cr);
10685
+ var tl = Object.defineProperty, rl = Object.getOwnPropertyDescriptor, nl = (n, r, e, t) => {
10686
+ for (var s = t > 1 ? void 0 : t ? rl(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10634
10687
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10635
- return t && s && el(r, e, s), s;
10688
+ return t && s && tl(r, e, s), s;
10636
10689
  }, rn = (n, r) => (e, t) => r(e, t, n);
10637
- let Cr = class extends ue {
10690
+ let br = class extends ue {
10638
10691
  constructor(n, r, e) {
10639
10692
  super(), this._commandService = n, this._otherFormulaManagerService = r, this._dependencyManagerService = e, this._initialize();
10640
10693
  }
@@ -10663,18 +10716,18 @@ let Cr = class extends ue {
10663
10716
  );
10664
10717
  }
10665
10718
  };
10666
- Cr = rl([
10667
- He(Ie.Ready, Cr),
10719
+ br = nl([
10720
+ He(Ie.Ready, br),
10668
10721
  rn(0, ht),
10669
10722
  rn(1, Tn),
10670
- rn(2, zr)
10671
- ], Cr);
10672
- var nl = Object.defineProperty, sl = Object.getOwnPropertyDescriptor, il = (n, r, e, t) => {
10673
- for (var s = t > 1 ? void 0 : t ? sl(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10723
+ rn(2, Hr)
10724
+ ], br);
10725
+ var sl = Object.defineProperty, il = Object.getOwnPropertyDescriptor, al = (n, r, e, t) => {
10726
+ for (var s = t > 1 ? void 0 : t ? il(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10674
10727
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10675
- return t && s && nl(r, e, s), s;
10728
+ return t && s && sl(r, e, s), s;
10676
10729
  }, Ls = (n, r) => (e, t) => r(e, t, n);
10677
- let br = class extends ue {
10730
+ let Sr = class extends ue {
10678
10731
  constructor(n, r) {
10679
10732
  super(), this._commandService = n, this._superTableService = r, this._initialize();
10680
10733
  }
@@ -10707,12 +10760,12 @@ let br = class extends ue {
10707
10760
  );
10708
10761
  }
10709
10762
  };
10710
- br = il([
10711
- He(Ie.Ready, br),
10763
+ Sr = al([
10764
+ He(Ie.Ready, Sr),
10712
10765
  Ls(0, ht),
10713
10766
  Ls(1, $n)
10714
- ], br);
10715
- class al extends ue {
10767
+ ], Sr);
10768
+ class ol extends ue {
10716
10769
  constructor() {
10717
10770
  super(...arguments);
10718
10771
  D(this, "_dirtyConversionMap", /* @__PURE__ */ new Map());
@@ -10736,15 +10789,15 @@ class al extends ue {
10736
10789
  return this._dirtyConversionMap;
10737
10790
  }
10738
10791
  }
10739
- const ol = st(
10792
+ const ul = st(
10740
10793
  "univer.formula.active-dirty-manager.service"
10741
10794
  );
10742
- var ul = Object.defineProperty, cl = Object.getOwnPropertyDescriptor, ll = (n, r, e, t) => {
10743
- for (var s = t > 1 ? void 0 : t ? cl(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10795
+ var cl = Object.defineProperty, ll = Object.getOwnPropertyDescriptor, fl = (n, r, e, t) => {
10796
+ for (var s = t > 1 ? void 0 : t ? ll(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10744
10797
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10745
- return t && s && ul(r, e, s), s;
10798
+ return t && s && cl(r, e, s), s;
10746
10799
  }, nn = (n, r) => (e, t) => r(e, t, n);
10747
- let Sr = class extends ue {
10800
+ let Ar = class extends ue {
10748
10801
  constructor(n, r) {
10749
10802
  super(), this._commandService = n, this._dependencyManagerService = r, this._initialize();
10750
10803
  }
@@ -10792,20 +10845,20 @@ let Sr = class extends ue {
10792
10845
  );
10793
10846
  }
10794
10847
  };
10795
- Sr = ll([
10796
- He(Ie.Ready, Sr),
10848
+ Ar = fl([
10849
+ He(Ie.Ready, Ar),
10797
10850
  nn(0, ht),
10798
- nn(1, Qr),
10799
- nn(1, zr)
10800
- ], Sr);
10801
- var fl = Object.defineProperty, hl = Object.getOwnPropertyDescriptor, dl = (n, r, e, t) => {
10802
- for (var s = t > 1 ? void 0 : t ? hl(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10851
+ nn(1, zr),
10852
+ nn(1, Hr)
10853
+ ], Ar);
10854
+ var hl = Object.defineProperty, dl = Object.getOwnPropertyDescriptor, ml = (n, r, e, t) => {
10855
+ for (var s = t > 1 ? void 0 : t ? dl(r, e) : r, i = n.length - 1, a; i >= 0; i--)
10803
10856
  (a = n[i]) && (s = (t ? a(r, e, s) : a(s)) || s);
10804
- return t && s && fl(r, e, s), s;
10805
- }, ml = (n, r) => (e, t) => r(e, t, n);
10806
- const gl = "base-formula-engine";
10857
+ return t && s && hl(r, e, s), s;
10858
+ }, gl = (n, r) => (e, t) => r(e, t, n);
10859
+ const pl = "base-formula-engine";
10807
10860
  var sn;
10808
- let ws = (sn = class extends vi {
10861
+ let ws = (sn = class extends Ui {
10809
10862
  constructor(n, r) {
10810
10863
  super(), this._config = n, this._injector = r;
10811
10864
  }
@@ -10816,11 +10869,11 @@ let ws = (sn = class extends vi {
10816
10869
  var r;
10817
10870
  const n = [
10818
10871
  // Services
10819
- [it, { useClass: $u }],
10820
- [Qr, { useClass: Lc }],
10821
- [Yr, { useClass: Lu }],
10822
- [ol, { useClass: al }],
10823
- [$n, { useClass: uc }],
10872
+ [it, { useClass: Tu }],
10873
+ [zr, { useClass: wc }],
10874
+ [Qr, { useClass: wu }],
10875
+ [ul, { useClass: ol }],
10876
+ [$n, { useClass: cc }],
10824
10877
  // Models
10825
10878
  [er],
10826
10879
  // Engine
@@ -10835,22 +10888,22 @@ let ws = (sn = class extends vi {
10835
10888
  }
10836
10889
  }
10837
10890
  ],
10891
+ [Cr],
10838
10892
  [Dr],
10839
- [yr],
10840
- [br]
10893
+ [Sr]
10841
10894
  ];
10842
10895
  (r = this._config) != null && r.notExecuteFormula || n.push(
10843
10896
  // Services
10844
10897
  [qt],
10845
- [Tn, { useClass: wc }],
10898
+ [Tn, { useClass: xc }],
10846
10899
  [We, { useClass: mn }],
10847
10900
  [mt, { useClass: dn }],
10848
- [zr, { useClass: xc }],
10901
+ [Hr, { useClass: Pc }],
10849
10902
  //Controller
10850
- [_r],
10851
- [Cr],
10852
10903
  [Er],
10853
- [Sr],
10904
+ [br],
10905
+ [yr],
10906
+ [Ar],
10854
10907
  // Calculation engine
10855
10908
  [Kt],
10856
10909
  [$t],
@@ -10858,31 +10911,31 @@ let ws = (sn = class extends vi {
10858
10911
  [kt],
10859
10912
  // AstNode factory
10860
10913
  [Ns],
10861
- [Pr],
10862
10914
  [Vr],
10863
- [si],
10864
10915
  [vr],
10865
- [xr],
10916
+ [si],
10866
10917
  [Ur],
10918
+ [Pr],
10867
10919
  [Br],
10868
10920
  [Or],
10921
+ [Fr],
10869
10922
  [ii]
10870
10923
  ), n.forEach((e) => this._injector.add(e));
10871
10924
  }
10872
- }, D(sn, "pluginName", gl), sn);
10873
- ws = dl([
10874
- ml(1, le(Tt))
10925
+ }, D(sn, "pluginName", pl), sn);
10926
+ ws = ml([
10927
+ gl(1, le(Tt))
10875
10928
  ], ws);
10876
- function pl(n, r) {
10929
+ function Rl(n, r) {
10877
10930
  const e = n.sequenceNodesBuilder(r);
10878
10931
  return !(!e || e.every((t) => typeof t == "string" || t.nodeType !== Ve.REFERENCE));
10879
10932
  }
10880
- function Al(n, r, e, t, s, i) {
10881
- if (!pl(n, r))
10933
+ function Ll(n, r, e, t, s, i) {
10934
+ if (!Rl(n, r))
10882
10935
  return r;
10883
10936
  const a = n.sequenceNodesBuilder(r), o = (_, C) => ({ startRow: _, endRow: _, startColumn: C, endColumn: C }), u = o(e, t), c = es.getRelativeRange(o(s, i), u), l = Qe.deepClone(a), d = Array.isArray(l) ? l.map((_) => {
10884
10937
  if (typeof _ == "object" && _.nodeType === Ve.REFERENCE) {
10885
- const C = nt(_.token), y = es.getPositionRange(c, C.range), S = ft(y);
10938
+ const C = nt(_.token), E = es.getPositionRange(c, C.range), S = ft(E);
10886
10939
  return {
10887
10940
  ..._,
10888
10941
  token: S
@@ -10897,39 +10950,39 @@ export {
10897
10950
  k as BaseFunction,
10898
10951
  ar as BaseReferenceObject,
10899
10952
  dt as BaseValueObject,
10900
- St as BooleanValue,
10953
+ At as BooleanValue,
10901
10954
  Y as BooleanValueObject,
10902
10955
  qt as CalculateFormulaService,
10903
- Lu as DefinedNamesService,
10956
+ wu as DefinedNamesService,
10904
10957
  rr as ERROR_TYPE_SET,
10905
10958
  f as ErrorType,
10906
10959
  h as ErrorValueObject,
10907
- wa as FUNCTION_NAMES_ARRAY,
10960
+ xa as FUNCTION_NAMES_ARRAY,
10908
10961
  Wt as FUNCTION_NAMES_COMPATIBILITY,
10909
- va as FUNCTION_NAMES_CUBE,
10910
- Ba as FUNCTION_NAMES_DATABASE,
10962
+ Ua as FUNCTION_NAMES_CUBE,
10963
+ Oa as FUNCTION_NAMES_DATABASE,
10911
10964
  yt as FUNCTION_NAMES_DATE,
10912
- Qa as FUNCTION_NAMES_ENGINEERING,
10913
- Ha as FUNCTION_NAMES_FINANCIAL,
10965
+ za as FUNCTION_NAMES_ENGINEERING,
10966
+ Ia as FUNCTION_NAMES_FINANCIAL,
10914
10967
  Fe as FUNCTION_NAMES_INFORMATION,
10915
10968
  Dt as FUNCTION_NAMES_LOGICAL,
10916
10969
  xe as FUNCTION_NAMES_LOOKUP,
10917
10970
  Ue as FUNCTION_NAMES_MATH,
10918
10971
  Le as FUNCTION_NAMES_STATISTICAL,
10919
10972
  Ct as FUNCTION_NAMES_TEXT,
10920
- Ru as FUNCTION_NAMES_UNIVER,
10921
- Eu as FUNCTION_NAMES_WEB,
10922
- Lc as FeatureCalculationManagerService,
10973
+ _u as FUNCTION_NAMES_UNIVER,
10974
+ yu as FUNCTION_NAMES_WEB,
10975
+ wc as FeatureCalculationManagerService,
10923
10976
  dn as FormulaCurrentConfigService,
10924
10977
  er as FormulaDataModel,
10925
10978
  Je as FormulaExecuteStageType,
10926
10979
  Xt as FormulaExecutedStateType,
10927
10980
  mn as FormulaRuntimeService,
10928
- $u as FunctionService,
10929
- Bi as FunctionType,
10930
- ol as IActiveDirtyManagerService,
10931
- Yr as IDefinedNamesService,
10932
- Qr as IFeatureCalculationManagerService,
10981
+ Tu as FunctionService,
10982
+ Oi as FunctionType,
10983
+ ul as IActiveDirtyManagerService,
10984
+ Qr as IDefinedNamesService,
10985
+ zr as IFeatureCalculationManagerService,
10933
10986
  mt as IFormulaCurrentConfigService,
10934
10987
  We as IFormulaRuntimeService,
10935
10988
  it as IFunctionService,
@@ -10937,13 +10990,13 @@ export {
10937
10990
  K as LexerNode,
10938
10991
  Ln as LexerTreeBuilder,
10939
10992
  b as NumberValueObject,
10940
- wc as OtherFormulaManagerService,
10941
- Lr as RangeReferenceObject,
10993
+ xc as OtherFormulaManagerService,
10994
+ wr as RangeReferenceObject,
10942
10995
  Vs as RegisterFunctionMutation,
10943
10996
  En as RemoveDefinedNameMutation,
10944
10997
  Dn as RemoveFeatureCalculationMutation,
10945
10998
  Sn as RemoveOtherFormulaMutation,
10946
- Yi as RemoveSuperTableMutation,
10999
+ Qi as RemoveSuperTableMutation,
10947
11000
  an as SetArrayFormulaDataMutation,
10948
11001
  _n as SetDefinedNameMutation,
10949
11002
  yn as SetFeatureCalculationMutation,
@@ -10953,52 +11006,52 @@ export {
10953
11006
  Us as SetFormulaCalculationStopMutation,
10954
11007
  Cn as SetFormulaDataMutation,
10955
11008
  bn as SetOtherFormulaMutation,
10956
- ji as SetSuperTableMutation,
11009
+ Yi as SetSuperTableMutation,
10957
11010
  Os as SetSuperTableOptionMutation,
10958
11011
  Ee as StringValueObject,
10959
11012
  ws as UniverFormulaEnginePlugin,
10960
11013
  Fs as UnregisterFunctionMutation,
10961
- Lt as ValueObjectFactory,
11014
+ wt as ValueObjectFactory,
10962
11015
  B as compareToken,
10963
- $i as convertUnitDataToRuntime,
10964
- Sa as deserializeRangeForR1C1,
11016
+ Ti as convertUnitDataToRuntime,
11017
+ Aa as deserializeRangeForR1C1,
10965
11018
  nt as deserializeRangeWithSheet,
10966
- La as functionArray,
10967
- Pa as functionCompatibility,
10968
- Va as functionCube,
10969
- Ua as functionDatabase,
10970
- ja as functionDate,
10971
- Ya as functionEngineering,
10972
- za as functionFinancial,
10973
- ro as functionInformation,
10974
- co as functionLogical,
10975
- Lo as functionLookup,
10976
- To as functionMath,
10977
- Wo as functionMeta,
10978
- ru as functionStatistical,
10979
- gu as functionText,
10980
- pu as functionUniver,
10981
- _u as functionWeb,
11019
+ wa as functionArray,
11020
+ Va as functionCompatibility,
11021
+ va as functionCube,
11022
+ Ba as functionDatabase,
11023
+ Ya as functionDate,
11024
+ Qa as functionEngineering,
11025
+ Ha as functionFinancial,
11026
+ no as functionInformation,
11027
+ lo as functionLogical,
11028
+ wo as functionLookup,
11029
+ jo as functionMath,
11030
+ Xo as functionMeta,
11031
+ nu as functionStatistical,
11032
+ pu as functionText,
11033
+ Ru as functionUniver,
11034
+ Eu as functionWeb,
10982
11035
  ln as generateStringWithSequence,
10983
- bl as getAbsoluteRefTypeWitString,
10984
- Rr as getAbsoluteRefTypeWithSingleString,
10985
- Sl as getRangeWithRefsString,
10986
- ki as includeFormulaLexerToken,
10987
- Au as initSheetFormulaData,
10988
- pr as isFormulaLexerToken,
10989
- pl as isFormulaTransformable,
10990
- Ui as isInDirtyRange,
10991
- Xi as isReferenceString,
11036
+ Sl as getAbsoluteRefTypeWitString,
11037
+ _r as getAbsoluteRefTypeWithSingleString,
11038
+ Al as getRangeWithRefsString,
11039
+ $i as includeFormulaLexerToken,
11040
+ Lu as initSheetFormulaData,
11041
+ Rr as isFormulaLexerToken,
11042
+ Rl as isFormulaTransformable,
11043
+ Bi as isInDirtyRange,
11044
+ Gi as isReferenceString,
10992
11045
  fn as isReferenceStringWithEffectiveColumn,
10993
- Ji as isReferenceStrings,
10994
- Cl as matchRefDrawToken,
11046
+ Ni as isReferenceStrings,
11047
+ bl as matchRefDrawToken,
10995
11048
  I as matchToken,
10996
- Dl as normalizeSheetName,
11049
+ Cl as normalizeSheetName,
10997
11050
  me as operatorToken,
10998
11051
  Ve as sequenceNodeType,
10999
11052
  ft as serializeRange,
11000
- Bt as serializeRangeToRefString,
11001
- qi as serializeRangeWithSheet,
11002
- Zi as serializeRangeWithSpreadsheet,
11003
- Al as transformFormula
11053
+ Ot as serializeRangeToRefString,
11054
+ Zi as serializeRangeWithSheet,
11055
+ Ji as serializeRangeWithSpreadsheet,
11056
+ Ll as transformFormula
11004
11057
  };