@univerjs/engine-formula 0.6.2-nightly.202503031606 → 0.6.3

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,7 +1,7 @@
1
1
  var Yu = Object.defineProperty;
2
2
  var Hu = (i, a, e) => a in i ? Yu(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
3
3
  var A = (i, a, e) => Hu(i, typeof a != "symbol" ? a + "" : a, e);
4
- import { ObjectMatrix as Ce, CommandType as Ie, RANGE_TYPE as Ze, AbsoluteRefType as Se, Tools as ze, createIdentifier as lt, Disposable as Oe, IUniverInstanceService as sa, LRUMap as Gu, hashAlgorithm as Qu, moveRangeByOffset as aa, isValidRange as Wu, isFormulaString as yt, isFormulaId as Pt, Rectangle as Ka, cellToRange as qu, Inject as Ve, UniverInstanceType as Dr, LocaleService as Ku, LocaleType as Mr, numfmt as gt, BuildTextUtils as Xu, isRealNum as Q, CellValueType as Rt, toDisposable as Zu, Injector as Gi, sortRules as zu, RTree as ps, IConfigService as ia, requestImmediateMacroTask as Ju, ICommandService as ar, BooleanNumber as ec, DataStreamTreeTokenType as ve, DisposableCollection as tc, Optional as rc, Plugin as nc, merge as sc, touchDependencies as is } from "@univerjs/core";
4
+ import { ObjectMatrix as Ce, CommandType as Ie, RANGE_TYPE as Ze, AbsoluteRefType as Se, Tools as ze, createIdentifier as ft, Disposable as Oe, IUniverInstanceService as sa, LRUMap as Gu, hashAlgorithm as Qu, moveRangeByOffset as aa, isValidRange as Wu, isFormulaString as yt, isFormulaId as Pt, Rectangle as Ka, cellToRange as qu, Inject as Ve, UniverInstanceType as Dr, LocaleService as Ku, LocaleType as Mr, numfmt as gt, BuildTextUtils as Xu, isRealNum as Q, CellValueType as Rt, toDisposable as Zu, Injector as Gi, sortRules as zu, RTree as Rs, IConfigService as ia, requestImmediateMacroTask as Ju, ICommandService as ar, BooleanNumber as ec, DataStreamTreeTokenType as ve, DisposableCollection as tc, Optional as rc, Plugin as nc, merge as sc, touchDependencies as as } from "@univerjs/core";
5
5
  import { Subject as cr, BehaviorSubject as Qi, distinctUntilChanged as Wi, combineLatest as ac, map as ic, Observable as oc, shareReplay as uc } from "rxjs";
6
6
  import { isTextFormat as cc } from "@univerjs/engine-numfmt";
7
7
  import { DataSyncPrimaryController as lc } from "@univerjs/rpc";
@@ -59,7 +59,7 @@ const tn = /* @__PURE__ */ new Map([
59
59
  /* LESS_THAN_OR_EQUAL */
60
60
  ]);
61
61
  var K = /* @__PURE__ */ ((i) => (i.OPEN_BRACKET = "(", i.CLOSE_BRACKET = ")", i.COMMA = ",", i.SINGLE_QUOTATION = "'", i.DOUBLE_QUOTATION = '"', i.OPEN_BRACES = "{", i.CLOSE_BRACES = "}", i.COLON = ":", i.OPEN_SQUARE_BRACKET = "[", i.CLOSE_SQUARE_BRACKET = "]", i))(K || {}), Je = /* @__PURE__ */ ((i) => (i.PERCENTAGE = "%", i.POUND = "#", i))(Je || {});
62
- const os = /* @__PURE__ */ new Set([
62
+ const is = /* @__PURE__ */ new Set([
63
63
  "%",
64
64
  "#"
65
65
  /* POUND */
@@ -161,7 +161,7 @@ function Rc(i) {
161
161
  }
162
162
  return a;
163
163
  }
164
- const Ki = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', za = new RegExp(Ki), pc = "((?![\\[\\]\\/?*\\\\]).)*!", Tt = "$", oa = "\\s*?:\\s*?", hn = "[A-Za-z]+", mn = "[1-9][0-9]*", Rr = `'?(${Ki})?(${pc})?'?`, Vs = `\\${Tt}?${hn}\\${Tt}?${mn}`, Vc = `^(${Me.AT})?${Rr}${Vs}${oa}${Vs}$`, Ja = new RegExp(Vc), Nc = `^${Rr}\\s*?${Vs}(${Je.POUND})?$`, ei = new RegExp(Nc), Oc = `^${Rr}\\${Tt}?${mn}${oa}\\${Tt}?${mn}$`, ti = new RegExp(Oc), Mc = `^${Rr}\\${Tt}?${hn}${oa}\\${Tt}?${hn}$`, ri = new RegExp(Mc), Sc = `^${Rr}\\s*?\\${Tt}?${mn}$`, ni = new RegExp(Sc), wc = `^${Rr}\\s*?\\${Tt}?${hn}$`, si = new RegExp(wc), Dc = "{.*?}", ai = new RegExp(Dc, "g");
164
+ const Ki = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', za = new RegExp(Ki), pc = "((?![\\[\\]\\/?*\\\\]).)*!", Tt = "$", oa = "\\s*?:\\s*?", fn = "[A-Za-z]+", hn = "[1-9][0-9]*", Rr = `'?(${Ki})?(${pc})?'?`, ps = `\\${Tt}?${fn}\\${Tt}?${hn}`, Vc = `^(${Me.AT})?${Rr}${ps}${oa}${ps}$`, Ja = new RegExp(Vc), Nc = `^${Rr}\\s*?${ps}(${Je.POUND})?$`, ei = new RegExp(Nc), Oc = `^${Rr}\\${Tt}?${hn}${oa}\\${Tt}?${hn}$`, ti = new RegExp(Oc), Mc = `^${Rr}\\${Tt}?${fn}${oa}\\${Tt}?${fn}$`, ri = new RegExp(Mc), Sc = `^${Rr}\\s*?\\${Tt}?${hn}$`, ni = new RegExp(Sc), wc = `^${Rr}\\s*?\\${Tt}?${fn}$`, si = new RegExp(wc), Dc = "{.*?}", ai = new RegExp(Dc, "g");
165
165
  function Tr(i) {
166
166
  return ei.lastIndex = 0, ei.test(i);
167
167
  }
@@ -190,7 +190,7 @@ const jc = {
190
190
  id: "formula.mutation.register-function",
191
191
  type: Ie.MUTATION,
192
192
  handler: () => !0
193
- }, Ns = {
193
+ }, Vs = {
194
194
  id: "formula.mutation.set-array-formula-data",
195
195
  type: Ie.MUTATION,
196
196
  handler: (i, a) => !0
@@ -242,13 +242,13 @@ function Tc(i, a) {
242
242
  return `${to(i)}!${hr(a)}`;
243
243
  }
244
244
  function Bc(i, a, e) {
245
- return Ms(i) || Ms(a) ? `'[${Ss(i)}]${Ss(a)}'!${hr(e)}` : `[${i}]${a}!${hr(e)}`;
245
+ return Os(i) || Os(a) ? `'[${Ms(i)}]${Ms(a)}'!${hr(e)}` : `[${i}]${a}!${hr(e)}`;
246
246
  }
247
- function Os(i) {
247
+ function Ns(i) {
248
248
  const { unitId: a, sheetName: e, range: t } = i;
249
249
  return a != null && a.length > 0 && e != null && e.length > 0 ? Bc(a, e, t) : e != null && e.length > 0 ? Tc(e, t) : hr(t);
250
250
  }
251
- function us(i) {
251
+ function os(i) {
252
252
  const a = Number.parseInt(i.replace(Uc, "")) - 1, e = ze.ABCatNum(i.replace(vc, "")), t = nn(i);
253
253
  return {
254
254
  row: a,
@@ -268,10 +268,10 @@ function ua(i) {
268
268
  unitId: e
269
269
  };
270
270
  }
271
- function gn(i) {
271
+ function mn(i) {
272
272
  const { refBody: a, sheetName: e, unitId: t } = ua(i), r = a.indexOf(":");
273
273
  if (r === -1) {
274
- const _ = us(a), C = _.row, E = _.column, b = _.absoluteRefType;
274
+ const _ = os(a), C = _.row, E = _.column, b = _.absoluteRefType;
275
275
  return {
276
276
  unitId: t,
277
277
  sheetName: e,
@@ -285,7 +285,7 @@ function gn(i) {
285
285
  }
286
286
  };
287
287
  }
288
- const n = a.substring(0, r), s = a.substring(r + 1), o = us(n), u = us(s), c = o.row > u.row ? u.row : o.row, l = o.column > u.column ? u.column : o.column, f = o.row > u.row ? o.row : u.row, h = o.column > u.column ? o.column : u.column;
288
+ const n = a.substring(0, r), s = a.substring(r + 1), o = os(n), u = os(s), c = o.row > u.row ? u.row : o.row, l = o.column > u.column ? u.column : o.column, f = o.row > u.row ? o.row : u.row, h = o.column > u.column ? o.column : u.column;
289
289
  let d = Ze.NORMAL;
290
290
  return Number.isNaN(c) && Number.isNaN(f) ? d = Ze.COLUMN : Number.isNaN(l) && Number.isNaN(h) && (d = Ze.ROW), {
291
291
  unitId: t,
@@ -306,7 +306,7 @@ function sn(i) {
306
306
  const a = eo(i);
307
307
  if (!xc(a) || Ic.includes(a.toUpperCase().trim()))
308
308
  return !1;
309
- const { range: e } = gn(a);
309
+ const { range: e } = mn(a);
310
310
  return !(e.endColumn >= 16384);
311
311
  }
312
312
  function eo(i) {
@@ -327,7 +327,7 @@ function eo(i) {
327
327
  function Fb(i, a) {
328
328
  const e = (i == null ? void 0 : i.split(",")) || [];
329
329
  return i === "" || e.length === 0 ? [] : Fc(i) ? e.map((n) => {
330
- const s = gn(n);
330
+ const s = mn(n);
331
331
  return {
332
332
  unitId: s.unitId,
333
333
  sheetId: a(s.sheetName),
@@ -339,13 +339,13 @@ function Fb(i, a) {
339
339
  function Fc(i) {
340
340
  return ((i == null ? void 0 : i.split(",")) || []).every((e) => sn(e.trim()));
341
341
  }
342
- function Ms(i) {
342
+ function Os(i) {
343
343
  return i.length === 0 ? !1 : !!(Cc(i) || kc(i) || $c(i) || Yc(i) || /[\s!$%^&*()+\-=\[\]{};':"\\|,.<>\/?()]/.test(i));
344
344
  }
345
345
  function to(i) {
346
- return Ms(i) ? `'${Ss(i)}'` : i;
346
+ return Os(i) ? `'${Ms(i)}'` : i;
347
347
  }
348
- function Ss(i) {
348
+ function Ms(i) {
349
349
  return i.replace(/'/g, "''");
350
350
  }
351
351
  function oi(i) {
@@ -366,7 +366,7 @@ var Hc = Object.getOwnPropertyDescriptor, Gc = (i, a, e, t) => {
366
366
  (s = i[n]) && (r = s(r) || r);
367
367
  return r;
368
368
  }, Qc = (i, a) => (e, t) => a(e, t, i);
369
- let ws = class extends Oe {
369
+ let Ss = class extends Oe {
370
370
  constructor(a) {
371
371
  super();
372
372
  // 18.2.6 definedNames (Defined Names)
@@ -464,10 +464,10 @@ let ws = class extends Oe {
464
464
  this._nameCacheMap[a][t.name] = t;
465
465
  }
466
466
  };
467
- ws = Gc([
467
+ Ss = Gc([
468
468
  Qc(0, sa)
469
- ], ws);
470
- const pr = lt("univer.formula.defined-names.service"), kb = (i, a) => {
469
+ ], Ss);
470
+ const pr = ft("univer.formula.defined-names.service"), kb = (i, a) => {
471
471
  const { unitId: e, id: t } = a;
472
472
  return {
473
473
  ...i.get(pr).getValueById(e, t),
@@ -514,7 +514,7 @@ const pr = lt("univer.formula.defined-names.service"), kb = (i, a) => {
514
514
  id: "formula.mutation.set-formula-calculation-stop",
515
515
  type: Ie.MUTATION,
516
516
  handler: () => !0
517
- }, dn = {
517
+ }, gn = {
518
518
  id: "formula.mutation.set-formula-calculation-notification",
519
519
  type: Ie.MUTATION,
520
520
  handler: () => !0
@@ -567,16 +567,16 @@ class Nt {
567
567
  return a.length <= 64 ? a : Qu(a).toString();
568
568
  }
569
569
  }
570
- const ft = "P_1", Ut = "R_1", mr = "L_1", Br = "LR_1", uo = "LO_1", Kc = "LET", Lr = "LAMBDA", Xc = "CUBE", Zc = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), Ds = new Nt(1e5);
570
+ const ht = "P_1", Ut = "R_1", mr = "L_1", Br = "LR_1", uo = "LO_1", Kc = "LET", Lr = "LAMBDA", Xc = "CUBE", Zc = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), ws = new Nt(1e5);
571
571
  function gr(i) {
572
- const a = Ds.get(i);
572
+ const a = ws.get(i);
573
573
  if (a)
574
574
  return a;
575
- const e = gn(i);
576
- return Ds.set(i, e), gn(i);
575
+ const e = mn(i);
576
+ return ws.set(i, e), mn(i);
577
577
  }
578
578
  function zc() {
579
- Ds.clear();
579
+ ws.clear();
580
580
  }
581
581
  var $e = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.NUMBER = 1] = "NUMBER", i[i.STRING = 2] = "STRING", i[i.FUNCTION = 3] = "FUNCTION", i[i.REFERENCE = 4] = "REFERENCE", i[i.ARRAY = 5] = "ARRAY", i[i.DEFINED_NAME = 6] = "DEFINED_NAME", i))($e || {});
582
582
  function ui(i) {
@@ -692,7 +692,7 @@ class ae {
692
692
  return r;
693
693
  }
694
694
  }
695
- const co = 2e3, cs = new Nt(co), ls = new Nt(co);
695
+ const co = 2e3, us = new Nt(co), cs = new Nt(co);
696
696
  class ga extends Oe {
697
697
  constructor() {
698
698
  super(...arguments);
@@ -717,7 +717,7 @@ class ga extends Oe {
717
717
  }
718
718
  // Table3[[#All],[Column1]:[Column2]]
719
719
  dispose() {
720
- this._resetTemp(), this._currentLexerNode.dispose(), cs.clear(), ls.clear();
720
+ this._resetTemp(), this._currentLexerNode.dispose(), us.clear(), cs.clear();
721
721
  }
722
722
  getUpLevel() {
723
723
  return this._upLevel;
@@ -762,7 +762,7 @@ class ga extends Oe {
762
762
  let s = n.getParent(), o = n;
763
763
  for (; s; ) {
764
764
  const u = s.getToken();
765
- if (u !== ft && !rn(u) && s.getStartIndex() !== -1) {
765
+ if (u !== ht && !rn(u) && s.getStartIndex() !== -1) {
766
766
  const c = s.getChildren().indexOf(o);
767
767
  return {
768
768
  functionName: u,
@@ -789,19 +789,19 @@ class ga extends Oe {
789
789
  let u = o.getParent(), c = 0;
790
790
  for (s[1] === K.OPEN_BRACKET && c++; u; ) {
791
791
  const l = u.getToken();
792
- l !== ft && l !== K.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== Lr && (t === 0 ? c += 1 : t--), u = u.getParent();
792
+ l !== ht && l !== K.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== Lr && (t === 0 ? c += 1 : t--), u = u.getParent();
793
793
  }
794
794
  return c;
795
795
  }
796
796
  sequenceNodesBuilder(e) {
797
- const t = ls.get(e);
797
+ const t = cs.get(e);
798
798
  if (t)
799
799
  return [...t];
800
800
  const r = this._getSequenceArray(e);
801
801
  if (r.length === 0)
802
802
  return;
803
803
  const n = this.getSequenceNode(r);
804
- return ls.set(e, [...n]), n;
804
+ return cs.set(e, [...n]), n;
805
805
  }
806
806
  convertRefersToAbsolute(e, t, r, n = "") {
807
807
  const s = this.sequenceNodesBuilder(e);
@@ -819,7 +819,7 @@ class ga extends Oe {
819
819
  ..._,
820
820
  startAbsoluteRefType: t,
821
821
  endAbsoluteRefType: r
822
- }, R = Os({
822
+ }, R = Ns({
823
823
  range: b,
824
824
  unitId: E,
825
825
  sheetName: C || n
@@ -856,7 +856,7 @@ class ga extends Oe {
856
856
  } else
857
857
  C = aa(C, t, r, n);
858
858
  let E = "";
859
- Wu(C) ? E = Os({
859
+ Wu(C) ? E = Ns({
860
860
  range: C,
861
861
  unitId: _,
862
862
  sheetName: d
@@ -875,7 +875,7 @@ class ga extends Oe {
875
875
  if (this._currentLexerNode.getChildren().length === 0)
876
876
  return !0;
877
877
  const e = this._currentLexerNode.getChildren()[0];
878
- return !!(e instanceof ae || Dt.has(e) || os.has(e) || e === Me.AT || e === K.COMMA || e === K.COLON || e === K.OPEN_BRACKET);
878
+ return !!(e instanceof ae || Dt.has(e) || is.has(e) || e === Me.AT || e === K.COMMA || e === K.COLON || e === K.OPEN_BRACKET);
879
879
  }
880
880
  // eslint-disable-next-line complexity
881
881
  getSequenceNode(e) {
@@ -983,7 +983,7 @@ class ga extends Oe {
983
983
  }
984
984
  treeBuilder(e, t = !0, r, n) {
985
985
  if (t === !0) {
986
- const h = cs.get(e), d = n == null ? void 0 : n(e);
986
+ const h = us.get(e), d = n == null ? void 0 : n(e);
987
987
  if (h && !d)
988
988
  return h;
989
989
  }
@@ -1003,7 +1003,7 @@ class ga extends Oe {
1003
1003
  if (f && (this._currentLexerNode = f), t) {
1004
1004
  if (!this._suffixExpressionHandler(this._currentLexerNode))
1005
1005
  return m.VALUE;
1006
- cs.set(e, this._currentLexerNode);
1006
+ us.set(e, this._currentLexerNode);
1007
1007
  }
1008
1008
  return u && this._currentLexerNode.setDefinedNames(l), this._currentLexerNode;
1009
1009
  }
@@ -1249,7 +1249,7 @@ class ga extends Oe {
1249
1249
  const r = this._findPreviousToken(e, t) || "", n = e.length - 1 === t;
1250
1250
  if (!n && this._isOperatorToken(r) || n && Ac(r))
1251
1251
  return !0;
1252
- if (os.has(r)) {
1252
+ if (is.has(r)) {
1253
1253
  const s = this._findSecondLastNonSpaceToken(e, t);
1254
1254
  if (s == null || bc(s))
1255
1255
  return !0;
@@ -1358,7 +1358,7 @@ class ga extends Oe {
1358
1358
  return m.VALUE;
1359
1359
  this._addSequenceArray(t, c, u), u++, this._addSequenceArray(t, l, u), u++, this._closeBracket();
1360
1360
  continue;
1361
- } else l && this._newAndPushCurrentLexerNode(ft, u);
1361
+ } else l && this._newAndPushCurrentLexerNode(ht, u);
1362
1362
  } else
1363
1363
  this._pushNodeToChildren(c), this._openBracket(
1364
1364
  0
@@ -1415,12 +1415,12 @@ class ga extends Oe {
1415
1415
  if (l === 1 || l == null) {
1416
1416
  if (this._pushNodeToChildren(this._segment), this._resetSegment(), !this._setParentCurrentLexerNode() && u !== o - 1 && l != null)
1417
1417
  return m.VALUE;
1418
- this._newAndPushCurrentLexerNode(ft, u);
1418
+ this._newAndPushCurrentLexerNode(ht, u);
1419
1419
  } else {
1420
1420
  const f = new ae();
1421
1421
  f.setToken(Xc);
1422
1422
  const h = new ae();
1423
- h.setToken(ft), h.changeToParent(f);
1423
+ h.setToken(ht), h.changeToParent(f);
1424
1424
  const d = this._currentLexerNode.getParent();
1425
1425
  if (d && d.getToken() === K.COLON) {
1426
1426
  const _ = d.getParent();
@@ -1432,15 +1432,15 @@ class ga extends Oe {
1432
1432
  this._changeCurrentBracket(
1433
1433
  1
1434
1434
  /* FUNCTION */
1435
- ), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(ft, u);
1435
+ ), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(ht, u);
1436
1436
  }
1437
1437
  } else if (c === K.COLON && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isBracesClose() && this.isSquareBracketClose()) {
1438
1438
  const l = new ae();
1439
1439
  l.setToken(c);
1440
1440
  const f = new ae();
1441
- f.setToken(ft), f.setParent(l);
1441
+ f.setToken(ht), f.setParent(l);
1442
1442
  const h = new ae();
1443
- h.setToken(ft), h.setParent(l), l.getChildren().push(f, h);
1443
+ h.setToken(ht), h.setParent(l), l.getChildren().push(f, h);
1444
1444
  let d = l, _ = 0;
1445
1445
  if (this._segmentCount() > 0) {
1446
1446
  let C, E, b = 0;
@@ -1459,7 +1459,7 @@ class ga extends Oe {
1459
1459
  C && C.changeToParent(f);
1460
1460
  }
1461
1461
  this._setCurrentLexerNode(d), this._currentLexerNode = h, this._openColon(_);
1462
- } else if (os.has(c) && this._checkSimilarErrorToken(c, u, s) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose() && this.isBracesClose()) {
1462
+ } else if (is.has(c) && this._checkSimilarErrorToken(c, u, s) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose() && this.isBracesClose()) {
1463
1463
  this._pushNodeToChildren(this._segment);
1464
1464
  const l = new ae();
1465
1465
  l.setToken(c);
@@ -1874,7 +1874,7 @@ function li(i, a, e, t) {
1874
1874
  }
1875
1875
  };
1876
1876
  }
1877
- const nl = class Ls {
1877
+ const nl = class Ds {
1878
1878
  /**
1879
1879
  * Accept two comparable values and creates new instance of interval
1880
1880
  * Predicate Interval.comparable_less(low, high) supposed to return true on these values
@@ -1889,7 +1889,7 @@ const nl = class Ls {
1889
1889
  * @returns {Interval}
1890
1890
  */
1891
1891
  clone() {
1892
- return new Ls(this.low, this.high);
1892
+ return new Ds(this.low, this.high);
1893
1893
  }
1894
1894
  /**
1895
1895
  * Propery max returns clone of this interval
@@ -1936,7 +1936,7 @@ const nl = class Ls {
1936
1936
  * @returns {Interval}
1937
1937
  */
1938
1938
  merge(a) {
1939
- return new Ls(
1939
+ return new Ds(
1940
1940
  this.low === void 0 ? a.low : this.low < a.low ? this.low : a.low,
1941
1941
  this.high === void 0 ? a.high : this.high > a.high ? this.high : a.high
1942
1942
  );
@@ -2383,7 +2383,7 @@ var al = Object.getOwnPropertyDescriptor, il = (i, a, e, t) => {
2383
2383
  (s = i[n]) && (r = s(r) || r);
2384
2384
  return r;
2385
2385
  }, hi = (i, a) => (e, t) => a(e, t, i);
2386
- let Ps = class extends Oe {
2386
+ let Ls = class extends Oe {
2387
2387
  constructor(a, e) {
2388
2388
  super();
2389
2389
  A(this, "_unitData", {});
@@ -2606,18 +2606,18 @@ let Ps = class extends Oe {
2606
2606
  };
2607
2607
  }
2608
2608
  };
2609
- Ps = il([
2609
+ Ls = il([
2610
2610
  hi(0, sa),
2611
2611
  hi(1, Ve(Ku))
2612
- ], Ps);
2613
- const Ft = lt(
2612
+ ], Ls);
2613
+ const Ft = ft(
2614
2614
  "univer.formula.current-data.service"
2615
2615
  );
2616
2616
  var ol = Object.getOwnPropertyDescriptor, ul = (i, a, e, t) => {
2617
2617
  for (var r = t > 1 ? void 0 : t ? ol(a, e) : a, n = i.length - 1, s; n >= 0; n--)
2618
2618
  (s = i[n]) && (r = s(r) || r);
2619
2619
  return r;
2620
- }, fs = (i, a) => (e, t) => a(e, t, i);
2620
+ }, ls = (i, a) => (e, t) => a(e, t, i);
2621
2621
  let dr = class extends Oe {
2622
2622
  constructor(i, a, e) {
2623
2623
  super(), this._definedNamesService = i, this._lexerTreeBuilder = a, this._formulaCurrentConfigService = e;
@@ -2682,9 +2682,9 @@ let dr = class extends Oe {
2682
2682
  }
2683
2683
  };
2684
2684
  dr = ul([
2685
- fs(0, pr),
2686
- fs(1, Ve(ga)),
2687
- fs(2, Ft)
2685
+ ls(0, pr),
2686
+ ls(1, Ve(ga)),
2687
+ ls(2, Ft)
2688
2688
  ], dr);
2689
2689
  function an(i) {
2690
2690
  if (i == null)
@@ -2761,16 +2761,16 @@ function Yb(i, a, e) {
2761
2761
  const o = n || s;
2762
2762
  return r.n.pattern = o, a;
2763
2763
  }
2764
- const xs = new Nt(1e5);
2764
+ const Ps = new Nt(1e5);
2765
2765
  function mi(i) {
2766
- const a = xs.get(i);
2766
+ const a = Ps.get(i);
2767
2767
  if (a !== void 0)
2768
2768
  return a;
2769
2769
  const e = hl(i);
2770
- return xs.set(i, e), e;
2770
+ return Ps.set(i, e), e;
2771
2771
  }
2772
2772
  function fl() {
2773
- xs.clear();
2773
+ Ps.clear();
2774
2774
  }
2775
2775
  function hl(i) {
2776
2776
  if (ml(i))
@@ -2822,16 +2822,16 @@ function Cl(i) {
2822
2822
  };
2823
2823
  const t = gt.parseNumber(a);
2824
2824
  if (t && t.z)
2825
- return hs(a, t.v, t.z);
2825
+ return fs(a, t.v, t.z);
2826
2826
  const r = gt.parseDate(a);
2827
2827
  if (r && r.z)
2828
- return hs(a, r.v, r.z);
2828
+ return fs(a, r.v, r.z);
2829
2829
  const n = gt.parseTime(a);
2830
- return n && n.z ? hs(a, n.v, n.z) : {
2830
+ return n && n.z ? fs(a, n.v, n.z) : {
2831
2831
  isNumberPattern: !1
2832
2832
  };
2833
2833
  }
2834
- function hs(i, a, e) {
2834
+ function fs(i, a, e) {
2835
2835
  return _a.set(i, {
2836
2836
  value: a,
2837
2837
  pattern: e
@@ -2844,7 +2844,7 @@ function hs(i, a, e) {
2844
2844
  function _l() {
2845
2845
  _a.clear();
2846
2846
  }
2847
- class In {
2847
+ class Bn {
2848
2848
  constructor() {
2849
2849
  A(this, "pattern", "");
2850
2850
  }
@@ -2882,7 +2882,7 @@ class In {
2882
2882
  return !1;
2883
2883
  }
2884
2884
  }
2885
- class kt extends In {
2885
+ class kt extends Bn {
2886
2886
  constructor(e) {
2887
2887
  super();
2888
2888
  A(this, "_customData");
@@ -3177,17 +3177,17 @@ class kt extends In {
3177
3177
  return g.create(m.VALUE);
3178
3178
  }
3179
3179
  }
3180
- const Al = 1e3, js = new Nt(Al);
3180
+ const Al = 1e3, xs = new Nt(Al);
3181
3181
  class g extends kt {
3182
3182
  constructor(a, e = "") {
3183
3183
  super(a), this._errorType = a, this._errorContent = e;
3184
3184
  }
3185
3185
  static create(a, e = "") {
3186
- const t = `${a}-${e}`, r = js.get(t);
3186
+ const t = `${a}-${e}`, r = xs.get(t);
3187
3187
  if (r)
3188
3188
  return r;
3189
3189
  const n = new g(a, e);
3190
- return js.set(t, n), n;
3190
+ return xs.set(t, n), n;
3191
3191
  }
3192
3192
  getValue() {
3193
3193
  return this._errorType;
@@ -3218,13 +3218,13 @@ function El(i) {
3218
3218
  return (i == null ? void 0 : i.v) || 0;
3219
3219
  }
3220
3220
  var Wt = /* @__PURE__ */ ((i) => (i[i.MIN = 0] = "MIN", i[i.MAX = 1] = "MAX", i))(Wt || {}), Le = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.MIN = 1] = "MIN", i[i.MAX = 2] = "MAX", i))(Le || {});
3221
- function Cn() {
3221
+ function dn() {
3222
3222
  return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
3223
3223
  }
3224
3224
  function bl(i) {
3225
3225
  return i.indexOf("*") > -1 || i.indexOf("?") > -1;
3226
3226
  }
3227
- function ms(i, a) {
3227
+ function hs(i, a) {
3228
3228
  const e = Rl(a).replace(/~?[*?]/g, (r) => r.startsWith("~") ? `\\${r.substring(1)}` : r === "*" ? ".*" : r === "?" ? "." : r);
3229
3229
  return new RegExp(`^${e}$`).test(i);
3230
3230
  }
@@ -3235,14 +3235,14 @@ function yl(i, a, e) {
3235
3235
  let t = !1;
3236
3236
  switch (e) {
3237
3237
  case $.EQUALS:
3238
- t = ms(i, a);
3238
+ t = hs(i, a);
3239
3239
  break;
3240
3240
  case $.NOT_EQUAL:
3241
- t = !ms(i, a);
3241
+ t = !hs(i, a);
3242
3242
  break;
3243
3243
  case $.GREATER_THAN:
3244
3244
  case $.GREATER_THAN_OR_EQUAL:
3245
- t = ms(i, a) || i > di(a);
3245
+ t = hs(i, a) || i > di(a);
3246
3246
  break;
3247
3247
  case $.LESS_THAN:
3248
3248
  case $.LESS_THAN_OR_EQUAL:
@@ -3254,7 +3254,7 @@ function yl(i, a, e) {
3254
3254
  function Rl(i) {
3255
3255
  return i.replace(/[.+^${}()|[\]\\]/g, "\\$&");
3256
3256
  }
3257
- function Us(i) {
3257
+ function js(i) {
3258
3258
  switch (i) {
3259
3259
  case 1:
3260
3260
  return 2;
@@ -3266,7 +3266,7 @@ function Us(i) {
3266
3266
  return 0;
3267
3267
  }
3268
3268
  }
3269
- function vs(i) {
3269
+ function Us(i) {
3270
3270
  return i === -2 ? 1 : 0;
3271
3271
  }
3272
3272
  function Aa(i) {
@@ -3294,13 +3294,13 @@ function Aa(i) {
3294
3294
  return a;
3295
3295
  }
3296
3296
  /*!
3297
- * decimal.js v10.5.0
3297
+ * decimal.js v10.4.3
3298
3298
  * An arbitrary-precision Decimal type for JavaScript.
3299
3299
  * https://github.com/MikeMcl/decimal.js
3300
- * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
3300
+ * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
3301
3301
  * MIT Licence
3302
3302
  */
3303
- var Ts = 9e15, $t = 1e9, Bs = "0123456789abcdef", _n = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", An = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", Is = {
3303
+ var vs = 9e15, $t = 1e9, Ts = "0123456789abcdef", Cn = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", _n = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", Bs = {
3304
3304
  // These values must be integers within the stated ranges (inclusive).
3305
3305
  // Most of these values can be changed at run-time using the `Decimal.config` method.
3306
3306
  // The maximum number of significant digits of the result of a calculation or base conversion.
@@ -3353,12 +3353,12 @@ var Ts = 9e15, $t = 1e9, Bs = "0123456789abcdef", _n = "2.3025850929940456840179
3353
3353
  // -1 to -EXP_LIMIT
3354
3354
  // The maximum exponent value, above which overflow to Infinity occurs.
3355
3355
  // JavaScript numbers: 308 (1.7976931348623157e+308)
3356
- maxE: Ts,
3356
+ maxE: vs,
3357
3357
  // 1 to EXP_LIMIT
3358
3358
  // Whether to use cryptographically-secure random number generation, if available.
3359
3359
  crypto: !1
3360
3360
  // true/false
3361
- }, ho, pt, ue = !0, Fn = "[DecimalError] ", Bt = Fn + "Invalid argument: ", mo = Fn + "Precision limit exceeded", go = Fn + "crypto unavailable", Co = "[object Decimal]", Be = Math.floor, Pe = Math.pow, pl = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Vl = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Nl = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, _o = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ut = 1e7, te = 7, Ol = 9007199254740991, Ml = _n.length - 1, Fs = An.length - 1, B = { toStringTag: Co };
3361
+ }, ho, pt, ue = !0, In = "[DecimalError] ", Bt = In + "Invalid argument: ", mo = In + "Precision limit exceeded", go = In + "crypto unavailable", Co = "[object Decimal]", Be = Math.floor, Pe = Math.pow, pl = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Vl = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Nl = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, _o = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ct = 1e7, te = 7, Ol = 9007199254740991, Ml = Cn.length - 1, Is = _n.length - 1, B = { toStringTag: Co };
3362
3362
  B.absoluteValue = B.abs = function() {
3363
3363
  var i = new this.constructor(this);
3364
3364
  return i.s < 0 && (i.s = 1), J(i);
@@ -3436,7 +3436,7 @@ B.hyperbolicCosine = B.cosh = function() {
3436
3436
  var i, a, e, t, r, n = this, s = n.constructor, o = new s(1);
3437
3437
  if (!n.isFinite()) return new s(n.s ? 1 / 0 : NaN);
3438
3438
  if (n.isZero()) return o;
3439
- e = s.precision, t = s.rounding, s.precision = e + Math.max(n.e, n.sd()) + 4, s.rounding = 1, r = n.d.length, r < 32 ? (i = Math.ceil(r / 3), a = (1 / $n(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n = Cr(s, 1, n.times(a), new s(1), !0);
3439
+ e = s.precision, t = s.rounding, s.precision = e + Math.max(n.e, n.sd()) + 4, s.rounding = 1, r = n.d.length, r < 32 ? (i = Math.ceil(r / 3), a = (1 / kn(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n = Cr(s, 1, n.times(a), new s(1), !0);
3440
3440
  for (var u, c = i, l = new s(8); c--; )
3441
3441
  u = n.times(n), n = o.minus(u.times(l.minus(u.times(l))));
3442
3442
  return J(n, s.precision = e, s.rounding = t, !0);
@@ -3447,7 +3447,7 @@ B.hyperbolicSine = B.sinh = function() {
3447
3447
  if (a = n.precision, e = n.rounding, n.precision = a + Math.max(r.e, r.sd()) + 4, n.rounding = 1, t = r.d.length, t < 3)
3448
3448
  r = Cr(n, 2, r, r, !0);
3449
3449
  else {
3450
- i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / $n(5, i)), r = Cr(n, 2, r, r, !0);
3450
+ i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / kn(5, i)), r = Cr(n, 2, r, r, !0);
3451
3451
  for (var s, o = new n(5), u = new n(16), c = new n(20); i--; )
3452
3452
  s = r.times(r), r = r.times(o.plus(s.times(u.times(s).plus(c))));
3453
3453
  }
@@ -3458,8 +3458,8 @@ B.hyperbolicTangent = B.tanh = function() {
3458
3458
  return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + 7, t.rounding = 1, pe(e.sinh(), e.cosh(), t.precision = i, t.rounding = a)) : new t(e.s);
3459
3459
  };
3460
3460
  B.inverseCosine = B.acos = function() {
3461
- var i = this, a = i.constructor, e = i.abs().cmp(1), t = a.precision, r = a.rounding;
3462
- return e !== -1 ? e === 0 ? i.isNeg() ? mt(a, t, r) : new a(0) : new a(NaN) : i.isZero() ? mt(a, t + 4, r).times(0.5) : (a.precision = t + 6, a.rounding = 1, i = new a(1).minus(i).div(i.plus(1)).sqrt().atan(), a.precision = t, a.rounding = r, i.times(2));
3461
+ var i, a = this, e = a.constructor, t = a.abs().cmp(1), r = e.precision, n = e.rounding;
3462
+ return t !== -1 ? t === 0 ? a.isNeg() ? ut(e, r, n) : new e(0) : new e(NaN) : a.isZero() ? ut(e, r + 4, n).times(0.5) : (e.precision = r + 6, e.rounding = 1, a = a.asin(), i = ut(e, r + 4, n).times(0.5), e.precision = r, e.rounding = n, i.minus(a));
3463
3463
  };
3464
3464
  B.inverseHyperbolicCosine = B.acosh = function() {
3465
3465
  var i, a, e = this, t = e.constructor;
@@ -3475,19 +3475,19 @@ B.inverseHyperbolicTangent = B.atanh = function() {
3475
3475
  };
3476
3476
  B.inverseSine = B.asin = function() {
3477
3477
  var i, a, e, t, r = this, n = r.constructor;
3478
- return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = mt(n, e + 4, t).times(0.5), i.s = r.s, i) : new n(NaN) : (n.precision = e + 6, n.rounding = 1, r = r.div(new n(1).minus(r.times(r)).sqrt().plus(1)).atan(), n.precision = e, n.rounding = t, r.times(2)));
3478
+ return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = ut(n, e + 4, t).times(0.5), i.s = r.s, i) : new n(NaN) : (n.precision = e + 6, n.rounding = 1, r = r.div(new n(1).minus(r.times(r)).sqrt().plus(1)).atan(), n.precision = e, n.rounding = t, r.times(2)));
3479
3479
  };
3480
3480
  B.inverseTangent = B.atan = function() {
3481
3481
  var i, a, e, t, r, n, s, o, u, c = this, l = c.constructor, f = l.precision, h = l.rounding;
3482
3482
  if (c.isFinite()) {
3483
3483
  if (c.isZero())
3484
3484
  return new l(c);
3485
- if (c.abs().eq(1) && f + 4 <= Fs)
3486
- return s = mt(l, f + 4, h).times(0.25), s.s = c.s, s;
3485
+ if (c.abs().eq(1) && f + 4 <= Is)
3486
+ return s = ut(l, f + 4, h).times(0.25), s.s = c.s, s;
3487
3487
  } else {
3488
3488
  if (!c.s) return new l(NaN);
3489
- if (f + 4 <= Fs)
3490
- return s = mt(l, f + 4, h).times(0.5), s.s = c.s, s;
3489
+ if (f + 4 <= Is)
3490
+ return s = ut(l, f + 4, h).times(0.5), s.s = c.s, s;
3491
3491
  }
3492
3492
  for (l.precision = o = f + 10, l.rounding = 1, e = Math.min(28, o / te + 2 | 0), i = e; i; --i) c = c.div(c.times(c).plus(1).sqrt().plus(1));
3493
3493
  for (ue = !1, a = Math.ceil(o / te), t = 1, u = c.times(c), s = new l(c), r = c; i !== -1; )
@@ -3535,9 +3535,9 @@ B.logarithm = B.log = function(i) {
3535
3535
  for (r = e[0]; r % 10 === 0; ) r /= 10;
3536
3536
  n = r !== 1;
3537
3537
  }
3538
- if (ue = !1, o = f + d, s = jt(c, o), t = a ? En(l, o + 10) : jt(i, o), u = pe(s, t, o, 1), xr(u.d, r = f, h))
3538
+ if (ue = !1, o = f + d, s = jt(c, o), t = a ? An(l, o + 10) : jt(i, o), u = pe(s, t, o, 1), xr(u.d, r = f, h))
3539
3539
  do
3540
- if (o += 10, s = jt(c, o), t = a ? En(l, o + 10) : jt(i, o), u = pe(s, t, o, 1), !n) {
3540
+ if (o += 10, s = jt(c, o), t = a ? An(l, o + 10) : jt(i, o), u = pe(s, t, o, 1), !n) {
3541
3541
  +Ue(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = J(u, f + 1, 0));
3542
3542
  break;
3543
3543
  }
@@ -3570,21 +3570,21 @@ B.minus = B.sub = function(i) {
3570
3570
  for (f && (a = c, c = h, h = a, i.s = -i.s), s = c.length, t = h.length - s; t > 0; --t) c[s++] = 0;
3571
3571
  for (t = h.length; t > n; ) {
3572
3572
  if (c[--t] < h[t]) {
3573
- for (r = t; r && c[--r] === 0; ) c[r] = ut - 1;
3574
- --c[r], c[t] += ut;
3573
+ for (r = t; r && c[--r] === 0; ) c[r] = ct - 1;
3574
+ --c[r], c[t] += ct;
3575
3575
  }
3576
3576
  c[t] -= h[t];
3577
3577
  }
3578
3578
  for (; c[--s] === 0; ) c.pop();
3579
3579
  for (; c[0] === 0; c.shift()) --e;
3580
- return c[0] ? (i.d = c, i.e = kn(c, e), ue ? J(i, o, u) : i) : new _(u === 3 ? -0 : 0);
3580
+ return c[0] ? (i.d = c, i.e = Fn(c, e), ue ? J(i, o, u) : i) : new _(u === 3 ? -0 : 0);
3581
3581
  };
3582
3582
  B.modulo = B.mod = function(i) {
3583
3583
  var a, e = this, t = e.constructor;
3584
3584
  return i = new t(i), !e.d || !i.s || i.d && !i.d[0] ? new t(NaN) : !i.d || e.d && !e.d[0] ? J(new t(e), t.precision, t.rounding) : (ue = !1, t.modulo == 9 ? (a = pe(e, i.abs(), 0, 3, 1), a.s *= i.s) : a = pe(e, i, 0, t.modulo, 1), a = a.times(i), ue = !0, e.minus(a));
3585
3585
  };
3586
3586
  B.naturalExponential = B.exp = function() {
3587
- return ks(this);
3587
+ return Fs(this);
3588
3588
  };
3589
3589
  B.naturalLogarithm = B.ln = function() {
3590
3590
  return jt(this);
@@ -3606,9 +3606,9 @@ B.plus = B.add = function(i) {
3606
3606
  e.reverse();
3607
3607
  }
3608
3608
  for (s = c.length, r = l.length, s - r < 0 && (r = s, e = l, l = c, c = e), a = 0; r; )
3609
- a = (c[--r] = c[r] + l[r] + a) / ut | 0, c[r] %= ut;
3609
+ a = (c[--r] = c[r] + l[r] + a) / ct | 0, c[r] %= ct;
3610
3610
  for (a && (c.unshift(a), ++t), s = c.length; c[--s] == 0; ) c.pop();
3611
- return i.d = c, i.e = kn(c, t), ue ? J(i, o, u) : i;
3611
+ return i.d = c, i.e = Fn(c, t), ue ? J(i, o, u) : i;
3612
3612
  };
3613
3613
  B.precision = B.sd = function(i) {
3614
3614
  var a, e = this;
@@ -3652,11 +3652,11 @@ B.times = B.mul = function(i) {
3652
3652
  for (e = Be(l.e / te) + Be(i.e / te), u = h.length, c = d.length, u < c && (n = h, h = d, d = n, s = u, u = c, c = s), n = [], s = u + c, t = s; t--; ) n.push(0);
3653
3653
  for (t = c; --t >= 0; ) {
3654
3654
  for (a = 0, r = u + t; r > t; )
3655
- o = n[r] + d[t] * h[r - t - 1] + a, n[r--] = o % ut | 0, a = o / ut | 0;
3656
- n[r] = (n[r] + a) % ut | 0;
3655
+ o = n[r] + d[t] * h[r - t - 1] + a, n[r--] = o % ct | 0, a = o / ct | 0;
3656
+ n[r] = (n[r] + a) % ct | 0;
3657
3657
  }
3658
3658
  for (; !n[--s]; ) n.pop();
3659
- return a ? ++e : n.shift(), i.d = n, i.e = kn(n, e), ue ? J(i, f.precision, f.rounding) : i;
3659
+ return a ? ++e : n.shift(), i.d = n, i.e = Fn(n, e), ue ? J(i, f.precision, f.rounding) : i;
3660
3660
  };
3661
3661
  B.toBinary = function(i, a) {
3662
3662
  return Ea(this, 2, i, a);
@@ -3719,7 +3719,7 @@ B.toPower = B.pow = function(i) {
3719
3719
  if ((i.d[a] & 1) == 0 && (s = 1), o.e == 0 && o.d[0] == 1 && o.d.length == 1)
3720
3720
  return o.s = s, o;
3721
3721
  }
3722
- return e = Pe(+o, c), a = e == 0 || !isFinite(e) ? Be(c * (Math.log("0." + Ue(o.d)) / Math.LN10 + o.e + 1)) : new u(e + "").e, a > u.maxE + 1 || a < u.minE - 1 ? new u(a > 0 ? s / 0 : 0) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = ks(i.times(jt(o, t + e)), t), r.d && (r = J(r, t + 5, 1), xr(r.d, t, n) && (a = t + 10, r = J(ks(i.times(jt(o, a + e)), a), a + 5, 1), +Ue(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = J(r, t + 1, 0)))), r.s = s, ue = !0, u.rounding = n, J(r, t, n));
3722
+ return e = Pe(+o, c), a = e == 0 || !isFinite(e) ? Be(c * (Math.log("0." + Ue(o.d)) / Math.LN10 + o.e + 1)) : new u(e + "").e, a > u.maxE + 1 || a < u.minE - 1 ? new u(a > 0 ? s / 0 : 0) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = Fs(i.times(jt(o, t + e)), t), r.d && (r = J(r, t + 5, 1), xr(r.d, t, n) && (a = t + 10, r = J(Fs(i.times(jt(o, a + e)), a), a + 5, 1), +Ue(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = J(r, t + 1, 0)))), r.s = s, ue = !0, u.rounding = n, J(r, t, n));
3723
3723
  };
3724
3724
  B.toPrecision = function(i, a) {
3725
3725
  var e, t = this, r = t.constructor;
@@ -3763,7 +3763,7 @@ function xr(i, a, e, t) {
3763
3763
  function on(i, a, e) {
3764
3764
  for (var t, r = [0], n, s = 0, o = i.length; s < o; ) {
3765
3765
  for (n = r.length; n--; ) r[n] *= a;
3766
- for (r[0] += Bs.indexOf(i.charAt(s++)), t = 0; t < r.length; t++)
3766
+ for (r[0] += Ts.indexOf(i.charAt(s++)), t = 0; t < r.length; t++)
3767
3767
  r[t] > e - 1 && (r[t + 1] === void 0 && (r[t + 1] = 0), r[t + 1] += r[t] / e | 0, r[t] %= e);
3768
3768
  }
3769
3769
  return r.reverse();
@@ -3771,7 +3771,7 @@ function on(i, a, e) {
3771
3771
  function Sl(i, a) {
3772
3772
  var e, t, r;
3773
3773
  if (a.isZero()) return a;
3774
- t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / $n(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = Cr(i, 1, a.times(r), new i(1));
3774
+ t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / kn(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = Cr(i, 1, a.times(r), new i(1));
3775
3775
  for (var n = e; n--; ) {
3776
3776
  var s = a.times(a);
3777
3777
  a = s.times(s).minus(s).times(8).plus(1);
@@ -3812,7 +3812,7 @@ var pe = /* @__PURE__ */ function() {
3812
3812
  z && z[0] == 0 || !G ? ne * 0 : ne / 0
3813
3813
  )
3814
3814
  );
3815
- for (u ? (d = 1, l = t.e - r.e) : (u = ut, d = te, l = Be(t.e / d) - Be(r.e / d)), x = G.length, L = z.length, b = new W(ne), R = b.d = [], f = 0; G[f] == (z[f] || 0); f++) ;
3815
+ for (u ? (d = 1, l = t.e - r.e) : (u = ct, d = te, l = Be(t.e / d) - Be(r.e / d)), x = G.length, L = z.length, b = new W(ne), R = b.d = [], f = 0; G[f] == (z[f] || 0); f++) ;
3816
3816
  if (G[f] > (z[f] || 0) && l--, n == null ? (S = n = W.precision, s = W.rounding) : o ? S = n + (t.e - r.e) + 1 : S = n, S < 0)
3817
3817
  R.push(1), _ = !0;
3818
3818
  else {
@@ -3864,10 +3864,10 @@ function J(i, a, e, t) {
3864
3864
  if (h == 0) {
3865
3865
  for (n = 1, s = f[0]; s >= 10; s /= 10) n++;
3866
3866
  for (s = f[0] += o, o = 1; s >= 10; s /= 10) o++;
3867
- n != o && (i.e++, f[0] == ut && (f[0] = 1));
3867
+ n != o && (i.e++, f[0] == ct && (f[0] = 1));
3868
3868
  break;
3869
3869
  } else {
3870
- if (f[h] += o, f[h] != ut) break;
3870
+ if (f[h] += o, f[h] != ct) break;
3871
3871
  f[h--] = 0, o = 1;
3872
3872
  }
3873
3873
  for (n = f.length; f[--n] === 0; ) f.pop();
@@ -3879,19 +3879,19 @@ function Ct(i, a, e) {
3879
3879
  var t, r = i.e, n = Ue(i.d), s = n.length;
3880
3880
  return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) + Lt(t) : s > 1 && (n = n.charAt(0) + "." + n.slice(1)), n = n + (i.e < 0 ? "e" : "e+") + i.e) : r < 0 ? (n = "0." + Lt(-r - 1) + n, e && (t = e - s) > 0 && (n += Lt(t))) : r >= s ? (n += Lt(r + 1 - s), e && (t = e - r - 1) > 0 && (n = n + "." + Lt(t))) : ((t = r + 1) < s && (n = n.slice(0, t) + "." + n.slice(t)), e && (t = e - s) > 0 && (r + 1 === s && (n += "."), n += Lt(t))), n;
3881
3881
  }
3882
- function kn(i, a) {
3882
+ function Fn(i, a) {
3883
3883
  var e = i[0];
3884
3884
  for (a *= te; e >= 10; e /= 10) a++;
3885
3885
  return a;
3886
3886
  }
3887
- function En(i, a, e) {
3887
+ function An(i, a, e) {
3888
3888
  if (a > Ml)
3889
3889
  throw ue = !0, e && (i.precision = e), Error(mo);
3890
- return J(new i(_n), a, 1, !0);
3890
+ return J(new i(Cn), a, 1, !0);
3891
3891
  }
3892
- function mt(i, a, e) {
3893
- if (a > Fs) throw Error(mo);
3894
- return J(new i(An), a, e, !0);
3892
+ function ut(i, a, e) {
3893
+ if (a > Is) throw Error(mo);
3894
+ return J(new i(_n), a, e, !0);
3895
3895
  }
3896
3896
  function Ao(i) {
3897
3897
  var a = i.length - 1, e = a * te + 1;
@@ -3920,16 +3920,16 @@ function Ci(i) {
3920
3920
  return i.d[i.d.length - 1] & 1;
3921
3921
  }
3922
3922
  function bo(i, a, e) {
3923
- for (var t, r, n = new i(a[0]), s = 0; ++s < a.length; ) {
3924
- if (r = new i(a[s]), !r.s) {
3925
- n = r;
3923
+ for (var t, r = new i(a[0]), n = 0; ++n < a.length; )
3924
+ if (t = new i(a[n]), t.s)
3925
+ r[e](t) && (r = t);
3926
+ else {
3927
+ r = t;
3926
3928
  break;
3927
3929
  }
3928
- t = n.cmp(r), (t === e || t === 0 && n.s === e) && (n = r);
3929
- }
3930
- return n;
3930
+ return r;
3931
3931
  }
3932
- function ks(i, a) {
3932
+ function Fs(i, a) {
3933
3933
  var e, t, r, n, s, o, u, c = 0, l = 0, f = 0, h = i.constructor, d = h.rounding, _ = h.precision;
3934
3934
  if (!i.d || !i.d[0] || i.e > 17)
3935
3935
  return new h(i.d ? i.d[0] ? i.s < 0 ? 0 : 1 / 0 : 1 : i.s ? i.s < 0 ? 0 : i : NaN);
@@ -3958,10 +3958,10 @@ function jt(i, a) {
3958
3958
  C = C.times(i), e = Ue(C.d), t = e.charAt(0), d++;
3959
3959
  n = C.e, t > 1 ? (C = new b("0." + e), n++) : C = new b(t + "." + e.slice(1));
3960
3960
  } else
3961
- return c = En(b, l + 2, p).times(n + ""), C = jt(new b(t + "." + e.slice(1)), l - _).plus(c), b.precision = p, a == null ? J(C, p, R, ue = !0) : C;
3961
+ return c = An(b, l + 2, p).times(n + ""), C = jt(new b(t + "." + e.slice(1)), l - _).plus(c), b.precision = p, a == null ? J(C, p, R, ue = !0) : C;
3962
3962
  for (f = C, u = s = C = pe(C.minus(1), C.plus(1), l, 1), h = J(C.times(C), l, 1), r = 3; ; ) {
3963
3963
  if (s = J(s.times(h), l, 1), c = u.plus(pe(s, new b(r), l, 1)), Ue(c.d).slice(0, l) === Ue(u.d).slice(0, l))
3964
- if (u = u.times(2), n !== 0 && (u = u.plus(En(b, l + 2, p).times(n + ""))), u = pe(u, new b(d), l, 1), a == null)
3964
+ if (u = u.times(2), n !== 0 && (u = u.plus(An(b, l + 2, p).times(n + ""))), u = pe(u, new b(d), l, 1), a == null)
3965
3965
  if (xr(u.d, l - _, R, o))
3966
3966
  b.precision = l += _, c = s = C = pe(f.minus(1), f.plus(1), l, 1), h = J(C.times(C), l, 1), r = o = 1;
3967
3967
  else
@@ -3974,7 +3974,7 @@ function jt(i, a) {
3974
3974
  function yo(i) {
3975
3975
  return String(i.s * i.s / 0);
3976
3976
  }
3977
- function un(i, a) {
3977
+ function ks(i, a) {
3978
3978
  var e, t, r;
3979
3979
  for ((e = a.indexOf(".")) > -1 && (a = a.replace(".", "")), (t = a.search(/e/i)) > 0 ? (e < 0 && (e = t), e += +a.slice(t + 1), a = a.substring(0, t)) : e < 0 && (e = a.length), t = 0; a.charCodeAt(t) === 48; t++) ;
3980
3980
  for (r = a.length; a.charCodeAt(r - 1) === 48; --r) ;
@@ -3993,7 +3993,7 @@ function un(i, a) {
3993
3993
  function wl(i, a) {
3994
3994
  var e, t, r, n, s, o, u, c, l;
3995
3995
  if (a.indexOf("_") > -1) {
3996
- if (a = a.replace(/(\d)_(?=\d)/g, "$1"), _o.test(a)) return un(i, a);
3996
+ if (a = a.replace(/(\d)_(?=\d)/g, "$1"), _o.test(a)) return ks(i, a);
3997
3997
  } else if (a === "Infinity" || a === "NaN")
3998
3998
  return +a || (i.s = NaN), i.e = NaN, i.d = null, i;
3999
3999
  if (Vl.test(a))
@@ -4004,14 +4004,14 @@ function wl(i, a) {
4004
4004
  e = 8;
4005
4005
  else
4006
4006
  throw Error(Bt + a);
4007
- for (n = a.search(/p/i), n > 0 ? (u = +a.slice(n + 1), a = a.substring(2, n)) : a = a.slice(2), n = a.indexOf("."), s = n >= 0, t = i.constructor, s && (a = a.replace(".", ""), o = a.length, n = o - n, r = Eo(t, new t(e), n, n * 2)), c = on(a, e, ut), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
4008
- return n < 0 ? new t(i.s * 0) : (i.e = kn(c, l), i.d = c, ue = !1, s && (i = pe(i, r, o * 4)), u && (i = i.times(Math.abs(u) < 54 ? Pe(2, u) : P.pow(2, u))), ue = !0, i);
4007
+ for (n = a.search(/p/i), n > 0 ? (u = +a.slice(n + 1), a = a.substring(2, n)) : a = a.slice(2), n = a.indexOf("."), s = n >= 0, t = i.constructor, s && (a = a.replace(".", ""), o = a.length, n = o - n, r = Eo(t, new t(e), n, n * 2)), c = on(a, e, ct), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
4008
+ return n < 0 ? new t(i.s * 0) : (i.e = Fn(c, l), i.d = c, ue = !1, s && (i = pe(i, r, o * 4)), u && (i = i.times(Math.abs(u) < 54 ? Pe(2, u) : P.pow(2, u))), ue = !0, i);
4009
4009
  }
4010
4010
  function Dl(i, a) {
4011
4011
  var e, t = a.d.length;
4012
4012
  if (t < 3)
4013
4013
  return a.isZero() ? a : Cr(i, 2, a, a);
4014
- e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / $n(5, e)), a = Cr(i, 2, a, a);
4014
+ e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / kn(5, e)), a = Cr(i, 2, a, a);
4015
4015
  for (var r, n = new i(5), s = new i(16), o = new i(20); e--; )
4016
4016
  r = a.times(a), a = a.times(n.plus(r.times(s.times(r).minus(o))));
4017
4017
  return a;
@@ -4027,12 +4027,12 @@ function Cr(i, a, e, t, r) {
4027
4027
  }
4028
4028
  return ue = !0, s.d.length = l + 1, s;
4029
4029
  }
4030
- function $n(i, a) {
4030
+ function kn(i, a) {
4031
4031
  for (var e = i; --a; ) e *= i;
4032
4032
  return e;
4033
4033
  }
4034
4034
  function Ro(i, a) {
4035
- var e, t = a.s < 0, r = mt(i, i.precision, 1), n = r.times(0.5);
4035
+ var e, t = a.s < 0, r = ut(i, i.precision, 1), n = r.times(0.5);
4036
4036
  if (a = a.abs(), a.lte(n))
4037
4037
  return pt = t ? 4 : 1, a;
4038
4038
  if (e = a.divToInt(r), e.isZero())
@@ -4057,13 +4057,13 @@ function Ea(i, a, e, t) {
4057
4057
  for (; ++f[--e] > r - 1; )
4058
4058
  f[e] = 0, e || (++n, f.unshift(1));
4059
4059
  for (u = f.length; !f[u - 1]; --u) ;
4060
- for (s = 0, l = ""; s < u; s++) l += Bs.charAt(f[s]);
4060
+ for (s = 0, l = ""; s < u; s++) l += Ts.charAt(f[s]);
4061
4061
  if (_) {
4062
4062
  if (u > 1)
4063
4063
  if (a == 16 || a == 8) {
4064
4064
  for (s = a == 16 ? 4 : 3, --u; u % s; u++) l += "0";
4065
4065
  for (f = on(l, r, a), u = f.length; !f[u - 1]; --u) ;
4066
- for (s = 1, l = "1."; s < u; s++) l += Bs.charAt(f[s]);
4066
+ for (s = 1, l = "1."; s < u; s++) l += Ts.charAt(f[s]);
4067
4067
  } else
4068
4068
  l = l.charAt(0) + "." + l.slice(1);
4069
4069
  l = l + (n < 0 ? "p" : "p+") + n;
@@ -4108,7 +4108,7 @@ function Bl(i) {
4108
4108
  function Il(i, a) {
4109
4109
  i = new this(i), a = new this(a);
4110
4110
  var e, t = this.precision, r = this.rounding, n = t + 4;
4111
- return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = mt(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? mt(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = mt(this, n, 1).times(0.5), e.s = i.s) : a.s < 0 ? (this.precision = n, this.rounding = 1, e = this.atan(pe(i, a, n, 1)), a = mt(this, n, 1), this.precision = t, this.rounding = r, e = i.s < 0 ? e.minus(a) : e.plus(a)) : e = this.atan(pe(i, a, n, 1)), e;
4111
+ return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = ut(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? ut(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = ut(this, n, 1).times(0.5), e.s = i.s) : a.s < 0 ? (this.precision = n, this.rounding = 1, e = this.atan(pe(i, a, n, 1)), a = ut(this, n, 1), this.precision = t, this.rounding = r, e = i.s < 0 ? e.minus(a) : e.plus(a)) : e = this.atan(pe(i, a, n, 1)), e;
4112
4112
  }
4113
4113
  function Fl(i) {
4114
4114
  return new this(i).cbrt();
@@ -4120,7 +4120,7 @@ function $l(i, a, e) {
4120
4120
  return new this(i).clamp(a, e);
4121
4121
  }
4122
4122
  function Yl(i) {
4123
- if (!i || typeof i != "object") throw Error(Fn + "Object expected");
4123
+ if (!i || typeof i != "object") throw Error(In + "Object expected");
4124
4124
  var a, e, t, r = i.defaults === !0, n = [
4125
4125
  "precision",
4126
4126
  1,
@@ -4133,10 +4133,10 @@ function Yl(i) {
4133
4133
  0,
4134
4134
  "toExpPos",
4135
4135
  0,
4136
- Ts,
4136
+ vs,
4137
4137
  "maxE",
4138
4138
  0,
4139
- Ts,
4139
+ vs,
4140
4140
  "minE",
4141
4141
  -9e15,
4142
4142
  0,
@@ -4145,10 +4145,10 @@ function Yl(i) {
4145
4145
  9
4146
4146
  ];
4147
4147
  for (a = 0; a < n.length; a += 3)
4148
- if (e = n[a], r && (this[e] = Is[e]), (t = i[e]) !== void 0)
4148
+ if (e = n[a], r && (this[e] = Bs[e]), (t = i[e]) !== void 0)
4149
4149
  if (Be(t) === t && t >= n[a + 1] && t <= n[a + 2]) this[e] = t;
4150
4150
  else throw Error(Bt + e + ": " + t);
4151
- if (e = "crypto", r && (this[e] = Is[e]), (t = i[e]) !== void 0)
4151
+ if (e = "crypto", r && (this[e] = Bs[e]), (t = i[e]) !== void 0)
4152
4152
  if (t === !0 || t === !1 || t === 0 || t === 1)
4153
4153
  if (t)
4154
4154
  if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
@@ -4185,18 +4185,14 @@ function po(i) {
4185
4185
  for (s = 0, o = n; o >= 10; o /= 10) s++;
4186
4186
  ue ? s > r.maxE ? (c.e = NaN, c.d = null) : s < r.minE ? (c.e = 0, c.d = [0]) : (c.e = s, c.d = [n]) : (c.e = s, c.d = [n]);
4187
4187
  return;
4188
- }
4189
- if (n * 0 !== 0) {
4188
+ } else if (n * 0 !== 0) {
4190
4189
  n || (c.s = NaN), c.e = NaN, c.d = null;
4191
4190
  return;
4192
4191
  }
4193
- return un(c, n.toString());
4194
- }
4195
- if (u === "string")
4196
- return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), _o.test(n) ? un(c, n) : wl(c, n);
4197
- if (u === "bigint")
4198
- return n < 0 ? (n = -n, c.s = -1) : c.s = 1, un(c, n.toString());
4199
- throw Error(Bt + n);
4192
+ return ks(c, n.toString());
4193
+ } else if (u !== "string")
4194
+ throw Error(Bt + n);
4195
+ return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), _o.test(n) ? ks(c, n) : wl(c, n);
4200
4196
  }
4201
4197
  if (r.prototype = B, r.ROUND_UP = 0, r.ROUND_DOWN = 1, r.ROUND_CEIL = 2, r.ROUND_FLOOR = 3, r.ROUND_HALF_UP = 4, r.ROUND_HALF_DOWN = 5, r.ROUND_HALF_EVEN = 6, r.ROUND_HALF_CEIL = 7, r.ROUND_HALF_FLOOR = 8, r.EUCLID = 9, r.config = r.set = Yl, r.clone = po, r.isDecimal = Ai, r.abs = Ll, r.acos = Pl, r.acosh = xl, r.add = jl, r.asin = Ul, r.asinh = vl, r.atan = Tl, r.atanh = Bl, r.atan2 = Il, r.cbrt = Fl, r.ceil = kl, r.clamp = $l, r.cos = Hl, r.cosh = Gl, r.div = Ql, r.exp = Wl, r.floor = ql, r.hypot = Kl, r.ln = Xl, r.log = Zl, r.log10 = Jl, r.log2 = zl, r.max = ef, r.min = tf, r.mod = rf, r.mul = nf, r.pow = sf, r.random = af, r.round = of, r.sign = uf, r.sin = cf, r.sinh = lf, r.sqrt = ff, r.sub = hf, r.sum = mf, r.tan = gf, r.tanh = df, r.trunc = Cf, i === void 0 && (i = {}), i && i.defaults !== !0)
4202
4198
  for (t = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], a = 0; a < t.length; ) i.hasOwnProperty(e = t[a++]) || (i[e] = this[e]);
@@ -4239,10 +4235,10 @@ function Jl(i) {
4239
4235
  return new this(i).log(10);
4240
4236
  }
4241
4237
  function ef() {
4242
- return bo(this, arguments, -1);
4238
+ return bo(this, arguments, "lt");
4243
4239
  }
4244
4240
  function tf() {
4245
- return bo(this, arguments, 1);
4241
+ return bo(this, arguments, "gt");
4246
4242
  }
4247
4243
  function rf(i, a) {
4248
4244
  return new this(i).mod(a);
@@ -4310,9 +4306,9 @@ function Cf(i) {
4310
4306
  }
4311
4307
  B[Symbol.for("nodejs.util.inspect.custom")] = B.toString;
4312
4308
  B[Symbol.toStringTag] = "Decimal";
4313
- var P = B.constructor = po(Is);
4309
+ var P = B.constructor = po(Bs);
4310
+ Cn = new P(Cn);
4314
4311
  _n = new P(_n);
4315
- An = new P(An);
4316
4312
  function _f(i, a) {
4317
4313
  const e = i + a;
4318
4314
  return Number.isSafeInteger(e) ? e : new P(i).add(a).toNumber();
@@ -4330,18 +4326,18 @@ function Ef(i, a) {
4330
4326
  return Number.isSafeInteger(e) ? e : new P(i).div(a).toNumber();
4331
4327
  }
4332
4328
  function vt(i, a) {
4333
- const e = 10 ** Math.trunc(a), t = Yn(i, e);
4329
+ const e = 10 ** Math.trunc(a), t = $n(i, e);
4334
4330
  return Math.round(Vr(i, e) + t) / e;
4335
4331
  }
4336
4332
  function We(i, a) {
4337
- const e = 10 ** Math.trunc(a), t = Yn(i, e);
4333
+ const e = 10 ** Math.trunc(a), t = $n(i, e);
4338
4334
  return Math.floor(Vr(i, e) + t) / e;
4339
4335
  }
4340
4336
  function Ye(i, a) {
4341
- const e = 10 ** Math.trunc(a), t = Yn(i, e);
4337
+ const e = 10 ** Math.trunc(a), t = $n(i, e);
4342
4338
  return Math.ceil(Vr(i, e) - t) / e;
4343
4339
  }
4344
- function Yn(i, a) {
4340
+ function $n(i, a) {
4345
4341
  return Number.EPSILON * Math.max(1, Math.abs(Vr(i, a)));
4346
4342
  }
4347
4343
  function Ei(i, a) {
@@ -4381,9 +4377,9 @@ function Mf(i, a = 12, e = 1e-10) {
4381
4377
  function Sf(i) {
4382
4378
  return i - Math.trunc(i);
4383
4379
  }
4384
- const Bn = class Bn extends kt {
4380
+ const Tn = class Tn extends kt {
4385
4381
  static create() {
4386
- return this._instance = this._instance || new Bn(0), this._instance;
4382
+ return this._instance = this._instance || new Tn(0), this._instance;
4387
4383
  }
4388
4384
  isNull() {
4389
4385
  return !0;
@@ -4503,8 +4499,8 @@ const Bn = class Bn extends kt {
4503
4499
  return T.create(!1);
4504
4500
  }
4505
4501
  };
4506
- A(Bn, "_instance");
4507
- let ie = Bn;
4502
+ A(Tn, "_instance");
4503
+ let ie = Tn;
4508
4504
  const qt = class qt extends kt {
4509
4505
  constructor(e) {
4510
4506
  super(e);
@@ -4649,7 +4645,7 @@ const qt = class qt extends kt {
4649
4645
  return this._convertToNumber().ceil(e);
4650
4646
  }
4651
4647
  convertToNumberObjectValue() {
4652
- return Gn(this.getValue());
4648
+ return Hn(this.getValue());
4653
4649
  }
4654
4650
  convertToBooleanObjectValue() {
4655
4651
  return this;
@@ -5049,7 +5045,7 @@ class y extends kt {
5049
5045
  return this;
5050
5046
  }
5051
5047
  convertToBooleanObjectValue() {
5052
- return Hn(!0);
5048
+ return Yn(!0);
5053
5049
  }
5054
5050
  _compareInfinity(e, t, r) {
5055
5051
  let n = !1;
@@ -5168,7 +5164,7 @@ class j extends kt {
5168
5164
  }
5169
5165
  }
5170
5166
  convertToNumberObjectValue() {
5171
- return Gn(this.getValue());
5167
+ return Hn(this.getValue());
5172
5168
  }
5173
5169
  convertToBooleanObjectValue() {
5174
5170
  return T.create(!0);
@@ -5178,7 +5174,7 @@ class j extends kt {
5178
5174
  return T.create(n);
5179
5175
  }
5180
5176
  }
5181
- function Hn(i) {
5177
+ function Yn(i) {
5182
5178
  if (typeof i == "boolean")
5183
5179
  return T.create(i);
5184
5180
  let a = !1;
@@ -5193,7 +5189,7 @@ function Df(i) {
5193
5189
  let a = i.toString();
5194
5190
  return a.charAt(0) === '"' && a.charAt(a.length - 1) === '"' && (a = a.slice(1, -1), a = a.replace(/""/g, '"')), j.create(a);
5195
5191
  }
5196
- function Gn(i, a = "") {
5192
+ function Hn(i, a = "") {
5197
5193
  if (typeof i == "boolean") {
5198
5194
  let e = 0;
5199
5195
  return i && (e = 1), y.create(e, a);
@@ -5549,7 +5545,7 @@ class q extends kt {
5549
5545
  * @returns
5550
5546
  */
5551
5547
  _binarySearch(e, t, r, n = Wt.MIN, s = Le.MIN) {
5552
- const o = Cn(), u = Number(e.getValue()), c = !Number.isNaN(u);
5548
+ const o = dn(), u = Number(e.getValue()), c = !Number.isNaN(u);
5553
5549
  let l = 0, f = t.length - 1, h = -1, d = -1, _ = -1;
5554
5550
  for (; l <= f; ) {
5555
5551
  const C = Math.floor((l + f) / 2), E = t[C];
@@ -5898,7 +5894,7 @@ class q extends kt {
5898
5894
  this._flattenCache = null, this._sliceCache.clear();
5899
5895
  }
5900
5896
  _sort(e) {
5901
- const t = Cn();
5897
+ const t = dn();
5902
5898
  return (r, n) => {
5903
5899
  const s = r[e], o = n[e];
5904
5900
  return s == null ? 1 : o == null ? -1 : s.isError() && s.isError() ? 0 : s.isError() ? 1 : o.isError() ? -1 : t(
@@ -6210,7 +6206,7 @@ class Vt {
6210
6206
  if (yr.has(e))
6211
6207
  return g.create(e);
6212
6208
  if (e === er.TRUE || e === er.FALSE)
6213
- return Hn(a);
6209
+ return Yn(a);
6214
6210
  if (Q(a))
6215
6211
  return y.create(Number(a));
6216
6212
  const { isNumberPattern: t, value: r, pattern: n } = Cl(a);
@@ -6219,15 +6215,15 @@ class Vt {
6219
6215
  const s = a.replace(/\n/g, "").replace(/\r/g, "");
6220
6216
  return !xf(s) && Pc(s) ? q.create(s) : Df(a);
6221
6217
  }
6222
- return typeof a == "number" ? Gn(a) : g.create(m.VALUE);
6218
+ return typeof a == "number" ? Hn(a) : g.create(m.VALUE);
6223
6219
  }
6224
6220
  }
6225
6221
  function xf(i) {
6226
6222
  const a = i.trim();
6227
6223
  return a.startsWith('"') && a.endsWith('"');
6228
6224
  }
6229
- const jf = 1e4, bn = new Nt(jf);
6230
- class Qn extends In {
6225
+ const jf = 1e4, En = new Nt(jf);
6226
+ class Gn extends Bn {
6231
6227
  constructor(e) {
6232
6228
  super();
6233
6229
  A(this, "_forcedSheetId", "");
@@ -6461,9 +6457,9 @@ class Qn extends In {
6461
6457
  return g.create(t);
6462
6458
  if (e.t === Rt.NUMBER) {
6463
6459
  const r = this._getPatternByCell(e);
6464
- return cc(r) ? j.create(t.toString()) : Gn(t, r);
6460
+ return cc(r) ? j.create(t.toString()) : Hn(t, r);
6465
6461
  }
6466
- return e.t === Rt.STRING || e.t === Rt.FORCE_STRING ? j.create(t.toString()) : e.t === Rt.BOOLEAN ? Hn(t) : Vt.create(t);
6462
+ return e.t === Rt.STRING || e.t === Rt.FORCE_STRING ? j.create(t.toString()) : e.t === Rt.BOOLEAN ? Yn(t) : Vt.create(t);
6467
6463
  }
6468
6464
  _getPatternByCell(e) {
6469
6465
  var n;
@@ -6531,7 +6527,7 @@ class Qn extends In {
6531
6527
  }
6532
6528
  toArrayValueObject(e = !0) {
6533
6529
  var _;
6534
- const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u = bn.get(o);
6530
+ const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u = En.get(o);
6535
6531
  if (u && e)
6536
6532
  return u;
6537
6533
  const c = r - t + 1, l = s - n + 1;
@@ -6551,7 +6547,7 @@ class Qn extends In {
6551
6547
  row: t,
6552
6548
  column: n
6553
6549
  }, d = q.create(h);
6554
- return e && bn.set(o, d), d;
6550
+ return e && En.set(o, d), d;
6555
6551
  }
6556
6552
  toUnitRange() {
6557
6553
  return {
@@ -6576,7 +6572,7 @@ class Qn extends In {
6576
6572
  return q.create(e);
6577
6573
  }
6578
6574
  }
6579
- class Uf extends In {
6575
+ class Uf extends Bn {
6580
6576
  constructor(a) {
6581
6577
  super(), this._promise = a;
6582
6578
  }
@@ -6587,7 +6583,7 @@ class Uf extends In {
6587
6583
  return this._promise;
6588
6584
  }
6589
6585
  }
6590
- class vf extends In {
6586
+ class vf extends Bn {
6591
6587
  constructor(a) {
6592
6588
  super(), this._promiseList = a;
6593
6589
  }
@@ -6617,7 +6613,7 @@ class vf extends In {
6617
6613
  return q.create(e);
6618
6614
  }
6619
6615
  }
6620
- class yn extends Qn {
6616
+ class bn extends Gn {
6621
6617
  constructor(a, e, t) {
6622
6618
  super(""), this.setRangeData(a), e && this.setForcedSheetIdDirect(e), t && this.setForcedUnitIdDirect(t);
6623
6619
  }
@@ -6625,7 +6621,7 @@ class yn extends Qn {
6625
6621
  return !0;
6626
6622
  }
6627
6623
  }
6628
- class ba extends Qn {
6624
+ class ba extends Gn {
6629
6625
  constructor(a) {
6630
6626
  super(a);
6631
6627
  const e = gr(a);
@@ -6650,7 +6646,7 @@ class ba extends Qn {
6650
6646
  return t > n ? (o.startRow = n, o.endRow = t) : (o.startRow = t, o.endRow = n), r > s ? (o.startColumn = s, o.endColumn = r) : (o.startColumn = r, o.endColumn = s), a.startAbsoluteRefType && (o.startAbsoluteRefType = a.startAbsoluteRefType), e.startAbsoluteRefType && (o.endAbsoluteRefType = e.startAbsoluteRefType), o;
6651
6647
  }
6652
6648
  _createRange(a) {
6653
- const e = new yn(
6649
+ const e = new bn(
6654
6650
  a,
6655
6651
  this.getForcedSheetId(),
6656
6652
  this.getForcedUnitId()
@@ -6664,7 +6660,7 @@ class ba extends Qn {
6664
6660
  return s && e.setForcedUnitIdDirect(s), e;
6665
6661
  }
6666
6662
  }
6667
- class ya extends Qn {
6663
+ class ya extends Gn {
6668
6664
  constructor(a) {
6669
6665
  super(a);
6670
6666
  const e = gr(a);
@@ -6695,7 +6691,7 @@ class ya extends Qn {
6695
6691
  return n > s ? t.endColumn = n : (t.startColumn = n, t.endColumn = s), r.startAbsoluteRefType && (t.endAbsoluteRefType = r.startAbsoluteRefType), t.rangeType = Ze.COLUMN, this.setToken(`${this.getToken()}${K.COLON}${e.getToken()}`), this;
6696
6692
  }
6697
6693
  }
6698
- class Ra extends Qn {
6694
+ class Ra extends Gn {
6699
6695
  constructor(a) {
6700
6696
  super(a);
6701
6697
  const e = gr(a);
@@ -6785,7 +6781,7 @@ function pa(i) {
6785
6781
  }
6786
6782
  return [$.EQUALS, Vt.create(i)];
6787
6783
  }
6788
- function Wn(i, a, e, t) {
6784
+ function Qn(i, a, e, t) {
6789
6785
  if (!e)
6790
6786
  if (a.isString()) {
6791
6787
  const r = `${a.getValue()}`, [n, s] = pa(r);
@@ -6798,7 +6794,7 @@ function Tf(i, a) {
6798
6794
  const e = Math.max(i.isArray() ? i.getRowCount() : 1, a.isArray() ? a.getRowCount() : 1), t = Math.max(i.isArray() ? i.getColumnCount() : 1, a.isArray() ? a.getColumnCount() : 1), r = O(e, t, i), n = O(e, t, a);
6799
6795
  return r.mapValue((s, o, u) => {
6800
6796
  const c = n.get(o, u);
6801
- return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ? Hn(s.getValue() && c.getValue()) : T.create(!1);
6797
+ return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ? Yn(s.getValue() && c.getValue()) : T.create(!1);
6802
6798
  });
6803
6799
  }
6804
6800
  function Bf(i) {
@@ -6890,8 +6886,8 @@ function Fr(i, a, e, t = !1) {
6890
6886
  O(a, e, o, g.create(m.NA)).iterator((c, l, f) => {
6891
6887
  if (!c)
6892
6888
  return;
6893
- let h = Wn(s, c);
6894
- if (t && (h = qn(h, s, c)), r[l] === void 0 && (r[l] = []), r[l][f] === void 0) {
6889
+ let h = Qn(s, c);
6890
+ if (t && (h = Wn(h, s, c)), r[l] === void 0 && (r[l] = []), r[l][f] === void 0) {
6895
6891
  r[l][f] = h;
6896
6892
  return;
6897
6893
  }
@@ -6900,7 +6896,7 @@ function Fr(i, a, e, t = !1) {
6900
6896
  }
6901
6897
  return r;
6902
6898
  }
6903
- function qn(i, a, e) {
6899
+ function Wn(i, a, e) {
6904
6900
  const [t, r] = pa(`${e.getValue()}`);
6905
6901
  return i.mapValue((n, s, o) => {
6906
6902
  const u = a.get(s, o);
@@ -6929,7 +6925,7 @@ function If(i, a) {
6929
6925
  const e = i.isString() && i.getValue() === "", t = a.isString() && a.getValue() === "";
6930
6926
  return !!((e || i.isNull()) && (t || a.isNull()) || i.isString() && !e && a.isString() && !t);
6931
6927
  }
6932
- var cn = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(cn || {});
6928
+ var un = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(un || {});
6933
6929
  function Ff(i, a) {
6934
6930
  let e;
6935
6931
  switch (a) {
@@ -7287,7 +7283,7 @@ let Ys = class extends Oe {
7287
7283
  Ys = Yf([
7288
7284
  Hf(0, Ft)
7289
7285
  ], Ys);
7290
- const Ot = lt("univer.formula.runtime.service");
7286
+ const Ot = ft("univer.formula.runtime.service");
7291
7287
  var oe = /* @__PURE__ */ ((i) => (i[i.REFERENCE = 1] = "REFERENCE", i[i.VALUE = 2] = "VALUE", i[i.OPERATOR = 3] = "OPERATOR", i[i.FUNCTION = 4] = "FUNCTION", i[i.LAMBDA = 5] = "LAMBDA", i[i.LAMBDA_PARAMETER = 6] = "LAMBDA_PARAMETER", i[i.ERROR = 7] = "ERROR", i[i.BASE = 8] = "BASE", i[i.ROOT = 9] = "ROOT", i[i.UNION = 10] = "UNION", i[i.PREFIX = 11] = "PREFIX", i[i.SUFFIX = 12] = "SUFFIX", i[i.NULL = 13] = "NULL", i))(oe || {});
7292
7288
  const _t = /* @__PURE__ */ new Map([
7293
7289
  [1, 7],
@@ -7450,7 +7446,7 @@ class No extends Et {
7450
7446
  return new Hs(Ut);
7451
7447
  }
7452
7448
  }
7453
- const Yt = lt("univer.formula-function.service");
7449
+ const Yt = ft("univer.formula-function.service");
7454
7450
  class Gf extends Oe {
7455
7451
  constructor() {
7456
7452
  super(...arguments);
@@ -7514,7 +7510,7 @@ var Te = /* @__PURE__ */ ((i) => (i.COMPARE = "COMPARE", i.DIVIDED = "DIVIDED",
7514
7510
  (s = i[n]) && (r = s(r) || r);
7515
7511
  return r;
7516
7512
  }, pi = (i, a) => (e, t) => a(e, t, i);
7517
- class Rn extends Ge {
7513
+ class yn extends Ge {
7518
7514
  constructor(a, e, t) {
7519
7515
  super(e), this._runtimeService = a, this._operatorString = e, this._functionExecutor = t;
7520
7516
  }
@@ -7540,7 +7536,7 @@ class Rn extends Ge {
7540
7536
  return l !== u && c !== o || o === c && u === l ? g.create(m.VALUE) : c === o && n >= u && n <= l ? e.getCellByColumn(n) : u === l && r >= o && r <= c ? e.getCellByRow(r) : e.isTable() ? e.getCellByPosition(r) : g.create(m.VALUE);
7541
7537
  }
7542
7538
  }
7543
- let pn = class extends Et {
7539
+ let Rn = class extends Et {
7544
7540
  constructor(i, a) {
7545
7541
  super(), this._functionService = i, this._runtimeService = a;
7546
7542
  }
@@ -7556,15 +7552,15 @@ let pn = class extends Et {
7556
7552
  let t = "";
7557
7553
  if (e === Me.MINUS)
7558
7554
  t = Te.MINUS;
7559
- else return e === Me.AT ? new Rn(this._runtimeService, e) : void 0;
7555
+ else return e === Me.AT ? new yn(this._runtimeService, e) : void 0;
7560
7556
  const r = this._functionService.getExecutor(t);
7561
- return r ? new Rn(this._runtimeService, e, r) : (console.error(`No function ${a}`), xe.create(m.NAME));
7557
+ return r ? new yn(this._runtimeService, e, r) : (console.error(`No function ${a}`), xe.create(m.NAME));
7562
7558
  }
7563
7559
  };
7564
- pn = Wf([
7560
+ Rn = Wf([
7565
7561
  pi(0, Yt),
7566
7562
  pi(1, Ot)
7567
- ], pn);
7563
+ ], Rn);
7568
7564
  new RegExp(Me.MINUS, "g");
7569
7565
  new RegExp(Me.AT, "g");
7570
7566
  function Oo(i, a, e) {
@@ -7573,9 +7569,9 @@ function Oo(i, a, e) {
7573
7569
  let o = 0;
7574
7570
  if (s[0] === Me.MINUS) {
7575
7571
  const u = a.getExecutor(Te.MINUS);
7576
- t = new Rn(e, Me.MINUS, u), o++;
7572
+ t = new yn(e, Me.MINUS, u), o++;
7577
7573
  }
7578
- return s[0] === Me.AT && (r = new Rn(e, Me.AT), t && r.setParent(t), o++), o > 0 && (n = n.slice(o)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: r };
7574
+ return s[0] === Me.AT && (r = new yn(e, Me.AT), t && r.setParent(t), o++), o > 0 && (n = n.slice(o)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: r };
7579
7575
  }
7580
7576
  var qf = Object.getOwnPropertyDescriptor, Kf = (i, a, e, t) => {
7581
7577
  for (var r = t > 1 ? void 0 : t ? qf(a, e) : a, n = i.length - 1, s; n >= 0; n--)
@@ -7732,7 +7728,7 @@ class Zf extends Ge {
7732
7728
  this.setValue(g.create(m.NAME));
7733
7729
  }
7734
7730
  }
7735
- let Vn = class extends Et {
7731
+ let pn = class extends Et {
7736
7732
  constructor(i, a, e, t, r, n) {
7737
7733
  super(), this._functionService = i, this._currentConfigService = a, this._runtimeService = e, this._definedNamesService = t, this._injector = r, this._formulaDataModel = n;
7738
7734
  }
@@ -7767,14 +7763,14 @@ let Vn = class extends Et {
7767
7763
  return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken()) === K.COLON;
7768
7764
  }
7769
7765
  };
7770
- Vn = Kf([
7766
+ pn = Kf([
7771
7767
  or(0, Yt),
7772
7768
  or(1, Ft),
7773
7769
  or(2, Ot),
7774
7770
  or(3, pr),
7775
7771
  or(4, Ve(Gi)),
7776
7772
  or(5, Ve(Pr))
7777
- ], Vn);
7773
+ ], pn);
7778
7774
  var zf = Object.getOwnPropertyDescriptor, Jf = (i, a, e, t) => {
7779
7775
  for (var r = t > 1 ? void 0 : t ? zf(a, e) : a, n = i.length - 1, s; n >= 0; n--)
7780
7776
  (s = i[n]) && (r = s(r) || r);
@@ -7996,7 +7992,7 @@ class sh extends Ge {
7996
7992
  // return Promise.resolve(AstNodePromiseType.SUCCESS);
7997
7993
  // }
7998
7994
  }
7999
- let Nn = class extends Et {
7995
+ let Vn = class extends Et {
8000
7996
  constructor(i, a) {
8001
7997
  super(), this._runtimeService = i, this._interpreter = a;
8002
7998
  }
@@ -8034,10 +8030,10 @@ let Nn = class extends Et {
8034
8030
  Va(i, a, e);
8035
8031
  }
8036
8032
  };
8037
- Nn = nh([
8033
+ Vn = nh([
8038
8034
  Vi(0, Ot),
8039
8035
  Vi(1, Ve(_r))
8040
- ], Nn);
8036
+ ], Vn);
8041
8037
  function wo(i) {
8042
8038
  if (!i)
8043
8039
  return;
@@ -8124,7 +8120,7 @@ class lh extends Ge {
8124
8120
  );
8125
8121
  }
8126
8122
  }
8127
- let On = class extends Et {
8123
+ let Nn = class extends Et {
8128
8124
  constructor(i) {
8129
8125
  super(), this._functionService = i;
8130
8126
  }
@@ -8146,15 +8142,15 @@ let On = class extends Et {
8146
8142
  return this.create(a);
8147
8143
  }
8148
8144
  };
8149
- On = uh([
8145
+ Nn = uh([
8150
8146
  ch(0, Yt)
8151
- ], On);
8147
+ ], Nn);
8152
8148
  var fh = Object.getOwnPropertyDescriptor, hh = (i, a, e, t) => {
8153
8149
  for (var r = t > 1 ? void 0 : t ? fh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
8154
8150
  (s = i[n]) && (r = s(r) || r);
8155
8151
  return r;
8156
- }, gs = (i, a) => (e, t) => a(e, t, i);
8157
- class ds extends Ge {
8152
+ }, ms = (i, a) => (e, t) => a(e, t, i);
8153
+ class gs extends Ge {
8158
8154
  constructor(e, t, r, n, s = !1) {
8159
8155
  super(r);
8160
8156
  A(this, "_refOffsetX", 0);
@@ -8180,7 +8176,7 @@ class ds extends Ge {
8180
8176
  };
8181
8177
  }
8182
8178
  }
8183
- let Mn = class extends Et {
8179
+ let On = class extends Et {
8184
8180
  constructor(i, a, e) {
8185
8181
  super(), this._currentConfigService = i, this._formulaRuntimeService = a, this._functionService = e;
8186
8182
  }
@@ -8195,7 +8191,7 @@ let Mn = class extends Et {
8195
8191
  if (!a && s.charAt(0) === '"' && s.charAt(s.length - 1) === '"')
8196
8192
  return;
8197
8193
  let c;
8198
- if (Tr(s) ? c = new ds(r, n, s, cn.CELL, t) : a && this._checkParentIsUnionOperator(i) && (zi(s) ? c = new ds(r, n, s, cn.ROW, t) : Ji(s) && (c = new ds(r, n, s, cn.COLUMN, t))), c)
8194
+ if (Tr(s) ? c = new gs(r, n, s, un.CELL, t) : a && this._checkParentIsUnionOperator(i) && (zi(s) ? c = new gs(r, n, s, un.ROW, t) : Ji(s) && (c = new gs(r, n, s, un.COLUMN, t))), c)
8199
8195
  return u ? c.setParent(u) : o && c.setParent(o), c;
8200
8196
  }
8201
8197
  _checkParentIsUnionOperator(i) {
@@ -8203,16 +8199,16 @@ let Mn = class extends Et {
8203
8199
  return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken().trim()) === K.COLON;
8204
8200
  }
8205
8201
  };
8206
- Mn = hh([
8207
- gs(0, Ft),
8208
- gs(1, Ot),
8209
- gs(2, Yt)
8210
- ], Mn);
8202
+ On = hh([
8203
+ ms(0, Ft),
8204
+ ms(1, Ot),
8205
+ ms(2, Yt)
8206
+ ], On);
8211
8207
  var mh = Object.getOwnPropertyDescriptor, gh = (i, a, e, t) => {
8212
8208
  for (var r = t > 1 ? void 0 : t ? mh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
8213
8209
  (s = i[n]) && (r = s(r) || r);
8214
8210
  return r;
8215
- }, Cs = (i, a) => (e, t) => a(e, t, i);
8211
+ }, ds = (i, a) => (e, t) => a(e, t, i);
8216
8212
  class Ni extends Ge {
8217
8213
  constructor(a, e, t, r) {
8218
8214
  super(t), this._currentConfigService = a, this._lexer = e, this._operatorString = t, this._functionExecutor = r;
@@ -8243,7 +8239,7 @@ class Ni extends Ge {
8243
8239
  return o && this._lexer.treeBuilder(o), g.create(m.VALUE);
8244
8240
  }
8245
8241
  }
8246
- let Sn = class extends Et {
8242
+ let Mn = class extends Et {
8247
8243
  constructor(i, a, e) {
8248
8244
  super(), this._functionService = i, this._lexer = a, this._currentConfigService = e;
8249
8245
  }
@@ -8264,11 +8260,11 @@ let Sn = class extends Et {
8264
8260
  return t ? new Ni(this._currentConfigService, this._lexer, a, t) : (console.error(`No function ${i}`), xe.create(m.NAME));
8265
8261
  }
8266
8262
  };
8267
- Sn = gh([
8268
- Cs(0, Yt),
8269
- Cs(1, Ve(dr)),
8270
- Cs(2, Ft)
8271
- ], Sn);
8263
+ Mn = gh([
8264
+ ds(0, Yt),
8265
+ ds(1, Ve(dr)),
8266
+ ds(2, Ft)
8267
+ ], Mn);
8272
8268
  var dh = Object.getOwnPropertyDescriptor, Ch = (i, a, e, t) => {
8273
8269
  for (var r = t > 1 ? void 0 : t ? dh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
8274
8270
  (s = i[n]) && (r = s(r) || r);
@@ -8292,7 +8288,7 @@ class Ah extends Ge {
8292
8288
  return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(m.REF) : (a = a, e = e, kf(a, e));
8293
8289
  }
8294
8290
  }
8295
- let wn = class extends Et {
8291
+ let Sn = class extends Et {
8296
8292
  constructor(i) {
8297
8293
  super(), this._functionService = i;
8298
8294
  }
@@ -8310,9 +8306,9 @@ let wn = class extends Et {
8310
8306
  return this.create(e);
8311
8307
  }
8312
8308
  };
8313
- wn = Ch([
8309
+ Sn = Ch([
8314
8310
  _h(0, Yt)
8315
- ], wn);
8311
+ ], Sn);
8316
8312
  class Eh extends Ge {
8317
8313
  constructor(a) {
8318
8314
  super(a);
@@ -8418,7 +8414,7 @@ let jr = class extends Oe {
8418
8414
  const f = this._changeLetToLambda(a);
8419
8415
  return f != null ? this._parse(f, e) : xe.create(m.ERROR);
8420
8416
  }
8421
- if (o === ft) {
8417
+ if (o === ht) {
8422
8418
  if (s = e, r === 0)
8423
8419
  return new ih(Ut).setParent(e), s;
8424
8420
  } else {
@@ -8439,7 +8435,7 @@ let jr = class extends Oe {
8439
8435
  continue;
8440
8436
  let d = null;
8441
8437
  if (h instanceof ae) {
8442
- if (h.getToken() === ft && h.getChildren().length === 0) {
8438
+ if (h.getToken() === ht && h.getChildren().length === 0) {
8443
8439
  const _ = (l = h.getParent()) == null ? void 0 : l.getChildren();
8444
8440
  if (_ && _.length === 1)
8445
8441
  return xe.create(m.NAME);
@@ -8531,14 +8527,14 @@ let jr = class extends Oe {
8531
8527
  jr = yh([
8532
8528
  it(0, Ot),
8533
8529
  it(1, Ve(No)),
8534
- it(2, Ve(Vn)),
8535
- it(3, Ve(Nn)),
8530
+ it(2, Ve(pn)),
8531
+ it(3, Ve(Vn)),
8536
8532
  it(4, Ve(Do)),
8537
- it(5, Ve(On)),
8538
- it(6, Ve(pn)),
8539
- it(7, Ve(Mn)),
8540
- it(8, Ve(Sn)),
8541
- it(9, Ve(wn)),
8533
+ it(5, Ve(Nn)),
8534
+ it(6, Ve(Rn)),
8535
+ it(7, Ve(On)),
8536
+ it(8, Ve(Mn)),
8537
+ it(9, Ve(Sn)),
8542
8538
  it(10, Ve(Lo))
8543
8539
  ], jr);
8544
8540
  class Rh extends Oe {
@@ -8553,7 +8549,7 @@ class Rh extends Oe {
8553
8549
  A(this, "_definedNameMap", /* @__PURE__ */ new Map());
8554
8550
  // unitId -> definedName -> treeId
8555
8551
  A(this, "_otherFormulaDataMainData", /* @__PURE__ */ new Set());
8556
- A(this, "_dependencyRTreeCache", new ps());
8552
+ A(this, "_dependencyRTreeCache", new Rs());
8557
8553
  A(this, "_dependencyTreeIdLast", 0);
8558
8554
  }
8559
8555
  buildDependencyTree(e, t) {
@@ -8885,7 +8881,7 @@ class ph extends Rh {
8885
8881
  this._allTreeMap.set(e.treeId, e);
8886
8882
  }
8887
8883
  }
8888
- const Kn = lt(
8884
+ const qn = ft(
8889
8885
  "univer.formula.dependency-manager.service"
8890
8886
  );
8891
8887
  class Vh extends Oe {
@@ -8931,7 +8927,7 @@ class Vh extends Oe {
8931
8927
  return this._referenceExecutorMap;
8932
8928
  }
8933
8929
  }
8934
- const Ur = lt(
8930
+ const Ur = ft(
8935
8931
  "univer.formula.feature-calculation-manager.service"
8936
8932
  );
8937
8933
  class Nh extends Oe {
@@ -9007,7 +9003,7 @@ class Nh extends Oe {
9007
9003
  return this._otherFormulaData;
9008
9004
  }
9009
9005
  }
9010
- const Oa = lt(
9006
+ const Oa = ft(
9011
9007
  "univer.formula.other-formula-manager.service"
9012
9008
  ), Oh = 5e3, Gs = new Nt(Oh);
9013
9009
  function Oi(i, a, e, t, r) {
@@ -9176,7 +9172,7 @@ class Mi extends xo {
9176
9172
  return this.refTree == null ? "" : this.refTree.formulaId;
9177
9173
  }
9178
9174
  }
9179
- class _s extends xo {
9175
+ class Cs extends xo {
9180
9176
  constructor(e) {
9181
9177
  super();
9182
9178
  A(this, "isCache", !1);
@@ -9321,12 +9317,12 @@ var Sh = Object.getOwnPropertyDescriptor, wh = (i, a, e, t) => {
9321
9317
  function ur(i) {
9322
9318
  return i.getLastTreeId() || 0;
9323
9319
  }
9324
- const Ws = lt("engine-formula.dependency-generator");
9320
+ const Ws = ft("engine-formula.dependency-generator");
9325
9321
  let qs = class extends Oe {
9326
9322
  constructor(a, e, t, r, n, s, o, u) {
9327
9323
  super();
9328
9324
  A(this, "_updateRangeFlattenCache", /* @__PURE__ */ new Map());
9329
- A(this, "_dependencyRTreeCacheForAddressFunction", new ps());
9325
+ A(this, "_dependencyRTreeCacheForAddressFunction", new Rs());
9330
9326
  A(this, "_executedAddressFunctionNodeIds", /* @__PURE__ */ new Set());
9331
9327
  this._currentConfigService = a, this._runtimeService = e, this._otherFormulaManagerService = t, this._featureCalculationManagerService = r, this._interpreter = n, this._astTreeBuilder = s, this._lexer = o, this._dependencyManagerService = u;
9332
9328
  }
@@ -9507,7 +9503,7 @@ let qs = class extends Oe {
9507
9503
  });
9508
9504
  }
9509
9505
  _getFeatureFormulaTree(a, e, t) {
9510
- const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || ur(this._dependencyManagerService), c = new _s(u);
9506
+ const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || ur(this._dependencyManagerService), c = new Cs(u);
9511
9507
  c.unitId = r, c.subUnitId = n, c.rangeList = s, c.getDirtyData = o;
9512
9508
  const l = o(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), f = this._convertDirtyRangesToUnitRange(l.dirtyRanges);
9513
9509
  return c.featureDirtyRanges = f, c.featureId = a, c.type = Qs.FEATURE_FORMULA, this._dependencyManagerService.addFeatureFormulaDependency(r, n, a, c), this._dependencyManagerService.getFeatureFormulaDependency(t.unitId, t.subUnitId, a) && (c.isCache = !0), c;
@@ -9527,7 +9523,7 @@ let qs = class extends Oe {
9527
9523
  const f = this._dependencyManagerService.hasOtherFormulaDataMainData(l), h = u[l], { f: d, ranges: _ } = h;
9528
9524
  let C = !1;
9529
9525
  f && (C = !0);
9530
- const E = Oi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) || ur(this._dependencyManagerService), M = new _s(N);
9526
+ const E = Oi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) || ur(this._dependencyManagerService), M = new Cs(N);
9531
9527
  for (let S = 0; S < _.length; S++) {
9532
9528
  const w = _[S], { startRow: D, startColumn: L, endRow: U, endColumn: x } = w;
9533
9529
  for (let F = D; F <= U; F++)
@@ -9588,7 +9584,7 @@ let qs = class extends Oe {
9588
9584
  }
9589
9585
  }
9590
9586
  _createFDtree(a, e, t, r, n, s) {
9591
- const { f: o, x: u = 0, y: c = 0 } = s, l = new _s(ur(this._dependencyManagerService)), f = n[a][e], h = Oi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
9587
+ const { f: o, x: u = 0, y: c = 0 } = s, l = new Cs(ur(this._dependencyManagerService)), f = n[a][e], h = Oi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
9592
9588
  return l.node = h, l.formula = o, l.unitId = a, l.subUnitId = e, l.row = t, l.column = r, l.rowCount = f.rowCount, l.columnCount = f.columnCount, l;
9593
9589
  }
9594
9590
  _createVirtualFDtree(a, e) {
@@ -9684,7 +9680,7 @@ let qs = class extends Oe {
9684
9680
  u.length !== 0 && await this._calculateAddressFunctionRuntimeData(a, u);
9685
9681
  }
9686
9682
  async _calculateListByFunctionRefNode(a) {
9687
- const e = new ps();
9683
+ const e = new Rs();
9688
9684
  for (let t = 0, r = a.length; t < r; t++) {
9689
9685
  const n = a[t];
9690
9686
  e.insert({
@@ -9920,14 +9916,14 @@ qs = wh([
9920
9916
  wt(4, Ve(_r)),
9921
9917
  wt(5, Ve(jr)),
9922
9918
  wt(6, Ve(dr)),
9923
- wt(7, Kn)
9919
+ wt(7, qn)
9924
9920
  ], qs);
9925
9921
  var Dh = Object.getOwnPropertyDescriptor, Lh = (i, a, e, t) => {
9926
9922
  for (var r = t > 1 ? void 0 : t ? Dh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
9927
9923
  (s = i[n]) && (r = s(r) || r);
9928
9924
  return r;
9929
9925
  }, Qt = (i, a) => (e, t) => a(e, t, i);
9930
- const Ph = 500, Ks = lt("engine-formula.calculate-formula.service");
9926
+ const Ph = 500, Ks = ft("engine-formula.calculate-formula.service");
9931
9927
  let Xs = class extends Oe {
9932
9928
  constructor(a, e, t, r, n, s, o) {
9933
9929
  super();
@@ -9938,7 +9934,7 @@ let Xs = class extends Oe {
9938
9934
  this._configService = a, this._lexer = e, this._currentConfigService = t, this._runtimeService = r, this._formulaDependencyGenerator = n, this._interpreter = s, this._astTreeBuilder = o;
9939
9935
  }
9940
9936
  dispose() {
9941
- super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(), bn.clear(), bt.clear(), js.clear(), $s.clear();
9937
+ super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(), En.clear(), bt.clear(), xs.clear(), $s.clear();
9942
9938
  }
9943
9939
  /**
9944
9940
  * Stop the execution of the formula.
@@ -9962,7 +9958,7 @@ let Xs = class extends Oe {
9962
9958
  async execute(a) {
9963
9959
  this._runtimeService.setFormulaExecuteStage(Xe.START), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._currentConfigService.load(a), this._runtimeService.reset();
9964
9960
  const e = a.maxIteration || lo;
9965
- for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._execute(), bn.clear(), !!this._runtimeService.isCycleDependency()); t++)
9961
+ for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._execute(), En.clear(), !!this._runtimeService.isCycleDependency()); t++)
9966
9962
  ;
9967
9963
  this._runtimeService.setFormulaExecuteStage(Xe.CALCULATION_COMPLETED), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._executionCompleteListener$.next(this._runtimeService.getAllRuntimeData()), bt.clear(), this._runtimeService.reset();
9968
9964
  }
@@ -10062,8 +10058,8 @@ var xh = Object.getOwnPropertyDescriptor, jh = (i, a, e, t) => {
10062
10058
  for (var r = t > 1 ? void 0 : t ? xh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
10063
10059
  (s = i[n]) && (r = s(r) || r);
10064
10060
  return r;
10065
- }, As = (i, a) => (e, t) => a(e, t, i);
10066
- let Dn = class extends Oe {
10061
+ }, _s = (i, a) => (e, t) => a(e, t, i);
10062
+ let wn = class extends Oe {
10067
10063
  constructor(i, a, e) {
10068
10064
  super(), this._commandService = i, this._calculateFormulaService = a, this._formulaDataModel = e, this._initialize();
10069
10065
  }
@@ -10078,7 +10074,7 @@ let Dn = class extends Oe {
10078
10074
  else if (i.id === no.id) {
10079
10075
  const a = i.params;
10080
10076
  this._calculate(a);
10081
- } else if (i.id === Ns.id) {
10077
+ } else if (i.id === Vs.id) {
10082
10078
  const a = i.params;
10083
10079
  if (a == null)
10084
10080
  return;
@@ -10120,7 +10116,7 @@ let Dn = class extends Oe {
10120
10116
  break;
10121
10117
  }
10122
10118
  this._commandService.executeCommand(
10123
- dn.id,
10119
+ gn.id,
10124
10120
  {
10125
10121
  functionsExecutedState: a
10126
10122
  },
@@ -10130,7 +10126,7 @@ let Dn = class extends Oe {
10130
10126
  );
10131
10127
  }), this._calculateFormulaService.executionInProgressListener$.subscribe((i) => {
10132
10128
  this._commandService.executeCommand(
10133
- dn.id,
10129
+ gn.id,
10134
10130
  {
10135
10131
  stageInfo: i
10136
10132
  },
@@ -10147,7 +10143,7 @@ let Dn = class extends Oe {
10147
10143
  return;
10148
10144
  }
10149
10145
  t && (this._formulaDataModel.clearPreviousArrayFormulaCellData(n), this._formulaDataModel.mergeArrayFormulaCellData(r), this._formulaDataModel.mergeArrayFormulaRange(t), this._commandService.executeCommand(
10150
- Ns.id,
10146
+ Vs.id,
10151
10147
  {
10152
10148
  arrayFormulaRange: this._formulaDataModel.getArrayFormulaRange(),
10153
10149
  arrayFormulaCellData: this._formulaDataModel.getArrayFormulaCellData()
@@ -10167,11 +10163,11 @@ let Dn = class extends Oe {
10167
10163
  );
10168
10164
  }
10169
10165
  };
10170
- Dn = jh([
10171
- As(0, ar),
10172
- As(1, Ks),
10173
- As(2, Ve(Pr))
10174
- ], Dn);
10166
+ wn = jh([
10167
+ _s(0, ar),
10168
+ _s(1, Ks),
10169
+ _s(2, Ve(Pr))
10170
+ ], wn);
10175
10171
  const Si = /[\[\]]/g;
10176
10172
  function wi(i, a) {
10177
10173
  if (Si.test(i)) {
@@ -10180,7 +10176,7 @@ function wi(i, a) {
10180
10176
  }
10181
10177
  return Number(i) - 1;
10182
10178
  }
10183
- function Es(i, a = 0, e = 0) {
10179
+ function As(i, a = 0, e = 0) {
10184
10180
  i = i.toLocaleUpperCase();
10185
10181
  const t = i.split(/[RC]/), r = t[1], n = t[2], s = wi(r, a), o = wi(n, e);
10186
10182
  return {
@@ -10192,7 +10188,7 @@ function Es(i, a = 0, e = 0) {
10192
10188
  function Uh(i, a = 0, e = 0) {
10193
10189
  const { refBody: t, sheetName: r, unitId: n } = ua(i), s = t.indexOf(":");
10194
10190
  if (s === -1) {
10195
- const C = Es(t, a, e), E = C.row, b = C.column, R = C.absoluteRefType;
10191
+ const C = As(t, a, e), E = C.row, b = C.column, R = C.absoluteRefType;
10196
10192
  return {
10197
10193
  unitId: n,
10198
10194
  sheetName: r,
@@ -10206,7 +10202,7 @@ function Uh(i, a = 0, e = 0) {
10206
10202
  }
10207
10203
  };
10208
10204
  }
10209
- const o = t.substring(0, s), u = t.substring(s + 1), c = Es(o, a, e), l = Es(u, a, e), f = c.row, h = c.column, d = l.row, _ = l.column;
10205
+ const o = t.substring(0, s), u = t.substring(s + 1), c = As(o, a, e), l = As(u, a, e), f = c.row, h = c.column, d = l.row, _ = l.column;
10210
10206
  return {
10211
10207
  unitId: n,
10212
10208
  sheetName: r,
@@ -10588,13 +10584,13 @@ class V {
10588
10584
  return a;
10589
10585
  }
10590
10586
  createReferenceObject(a, e) {
10591
- const t = a.getForcedUnitId(), r = a.getForcedSheetId() || "", n = a.getForcedSheetName(), o = Os({
10587
+ const t = a.getForcedUnitId(), r = a.getForcedSheetId() || "", n = a.getForcedSheetName(), o = Ns({
10592
10588
  unitId: t,
10593
10589
  sheetName: n,
10594
10590
  range: e
10595
10591
  });
10596
10592
  let u;
10597
- return Tr(o) ? u = new ba(o) : zi(o) ? u = new Ra(o) : Ji(o) ? u = new ya(o) : u = new yn(e, r, t), this._setReferenceDefault(a, u);
10593
+ return Tr(o) ? u = new ba(o) : zi(o) ? u = new Ra(o) : Ji(o) ? u = new ya(o) : u = new bn(e, r, t), this._setReferenceDefault(a, u);
10598
10594
  }
10599
10595
  _setReferenceDefault(a, e) {
10600
10596
  return this.unitId == null || this.subUnitId == null ? g.create(m.REF) : (e.setDefaultUnitId(this.unitId), e.setDefaultSheetId(this.subUnitId), e.setUnitData(a.getUnitData()), e.setRuntimeData(a.getRuntimeData()), e.setArrayFormulaCellData(a.getArrayFormulaCellData()), e.setRuntimeArrayFormulaCellData(a.getRuntimeArrayFormulaCellData()), e);
@@ -10895,7 +10891,7 @@ function Di(i, a) {
10895
10891
  const e = zs(i, a);
10896
10892
  return e === 0 ? 0 : Math.abs(i * a) / e;
10897
10893
  }
10898
- function Xn(i) {
10894
+ function Kn(i) {
10899
10895
  const a = i.length;
10900
10896
  if (a === 1)
10901
10897
  return i[0][0];
@@ -10903,11 +10899,11 @@ function Xn(i) {
10903
10899
  return i[0][0] * i[1][1] - i[0][1] * i[1][0];
10904
10900
  let e = 0;
10905
10901
  for (let t = 0; t < a; t++)
10906
- e += (t % 2 === 0 ? 1 : -1) * i[0][t] * Xn(jo(i, 0, t));
10902
+ e += (t % 2 === 0 ? 1 : -1) * i[0][t] * Kn(jo(i, 0, t));
10907
10903
  return e;
10908
10904
  }
10909
10905
  function kh(i) {
10910
- const a = Xn(i);
10906
+ const a = Kn(i);
10911
10907
  return a === 0 ? null : i.length === 1 ? [[1 / a]] : $h(i).map((r) => r.map((n) => n / a));
10912
10908
  }
10913
10909
  function jo(i, a, e) {
@@ -10918,7 +10914,7 @@ function $h(i) {
10918
10914
  for (let t = 0; t < a; t++)
10919
10915
  for (let r = 0; r < a; r++) {
10920
10916
  const n = (t + r) % 2 === 0 ? 1 : -1;
10921
- e[r][t] = n * Xn(jo(i, t, r));
10917
+ e[r][t] = n * Kn(jo(i, t, r));
10922
10918
  }
10923
10919
  return e;
10924
10920
  }
@@ -10927,7 +10923,7 @@ function fr(i, a) {
10927
10923
  (t, r) => e.reduce((n, s, o) => n + s * a[o][r], 0)
10928
10924
  ));
10929
10925
  }
10930
- function ht(i) {
10926
+ function mt(i) {
10931
10927
  return i[0].map((a, e) => i.map((t) => t[e]));
10932
10928
  }
10933
10929
  function Yh(i) {
@@ -10935,7 +10931,7 @@ function Yh(i) {
10935
10931
  return a ? null : Gh(e, t);
10936
10932
  }
10937
10933
  function Hh(i) {
10938
- const a = ht(i), e = a.length, t = a[0].length;
10934
+ const a = mt(i), e = a.length, t = a[0].length;
10939
10935
  let r = !0, n = !1;
10940
10936
  const s = Js(e, t, 0), o = new Array(t).fill(0).map((u, c) => c);
10941
10937
  for (let u = 0; u < t; u++) {
@@ -11013,26 +11009,26 @@ function Qh(i) {
11013
11009
  const a = Wh(i);
11014
11010
  if (!a)
11015
11011
  return null;
11016
- const { matrixU: e, matrixS: t, matrixV: r } = a, n = ht(e), s = Array.from({ length: t.length }, () => new Array(i[0].length).fill(0)), o = Math.max(i.length, i[0].length) * Number.EPSILON * t[0];
11012
+ const { matrixU: e, matrixS: t, matrixV: r } = a, n = mt(e), s = Array.from({ length: t.length }, () => new Array(i[0].length).fill(0)), o = Math.max(i.length, i[0].length) * Number.EPSILON * t[0];
11017
11013
  for (let u = 0; u < t.length; u++)
11018
11014
  Math.abs(t[u]) > o && (s[u][u] = 1 / t[u]);
11019
11015
  return fr(r, fr(s, n));
11020
11016
  }
11021
11017
  function Wh(i) {
11022
- const a = ht(i), e = a.length, t = a[0].length;
11018
+ const a = mt(i), e = a.length, t = a[0].length;
11023
11019
  if (e < t)
11024
11020
  return null;
11025
11021
  const r = new Array(t).fill(0), n = new Array(t).fill(0), s = Array.from({ length: t }, () => new Array(t).fill(0));
11026
11022
  let o = Number.EPSILON, u = 0, c = 0, l = 0;
11027
11023
  for (let C = 0; C < t; C++) {
11028
- if (r[C] = u, c = bs(a, C, e, C, C), c <= 1e-64 / o)
11024
+ if (r[C] = u, c = Es(a, C, e, C, C), c <= 1e-64 / o)
11029
11025
  u = 0;
11030
11026
  else {
11031
11027
  u = Math.sqrt(c), a[C][C] >= 0 && (u = -u);
11032
11028
  const b = a[C][C] * u - c;
11033
11029
  a[C][C] -= u;
11034
11030
  for (let R = C + 1; R < t; R++) {
11035
- c = bs(a, C, e, C, R);
11031
+ c = Es(a, C, e, C, R);
11036
11032
  for (let p = C; p < e; p++)
11037
11033
  a[p][R] += c / b * a[p][C];
11038
11034
  }
@@ -11077,7 +11073,7 @@ function Wh(i) {
11077
11073
  a[C][E] = 0;
11078
11074
  if (u !== 0) {
11079
11075
  for (let E = C + 1; E < t; E++) {
11080
- c = bs(a, C + 1, e, C, E);
11076
+ c = Es(a, C + 1, e, C, E);
11081
11077
  for (let b = C; b < e; b++)
11082
11078
  a[b][E] += c / (a[C][C] * u) * a[b][C];
11083
11079
  }
@@ -11166,7 +11162,7 @@ function Xr(i, a) {
11166
11162
  let e = 0;
11167
11163
  return Math.abs(i) > Math.abs(a) ? (e = a / i, Math.abs(i) * Math.sqrt(1 + e * e)) : a !== 0 ? (e = i / a, Math.abs(a) * Math.sqrt(1 + e * e)) : 0;
11168
11164
  }
11169
- function bs(i, a, e, t, r) {
11165
+ function Es(i, a, e, t, r) {
11170
11166
  let n = 0;
11171
11167
  for (let s = a; s < e; s++)
11172
11168
  n += i[s][t] * i[s][r];
@@ -11220,7 +11216,7 @@ const Zr = /* @__PURE__ */ new Map([
11220
11216
  [1, 4, 5, 9, 10, 40, 45, 49, 50, 90, 95, 99, 100, 400, 450, 490, 495, 499, 500, 900, 950, 990, 995, 999, 1e3, 4e3]
11221
11217
  ];
11222
11218
  function Uo(i, a, e) {
11223
- return i <= 0 ? 0 : i >= 1 ? 1 : Zn(i, a, e);
11219
+ return i <= 0 ? 0 : i >= 1 ? 1 : Xn(i, a, e);
11224
11220
  }
11225
11221
  function Xh(i, a, e) {
11226
11222
  return i <= 0 || i >= 1 ? 0 : a === 1 && e === 1 ? 1 : a < 512 && e < 512 ? i ** (a - 1) * (1 - i) ** (e - 1) / Pa(a, e) : Math.exp((a - 1) * Math.log(i) + (e - 1) * Math.log(1 - i) - xa(a, e));
@@ -11246,13 +11242,13 @@ function La(i, a, e) {
11246
11242
  for (let c = 0; c < 10; c++) {
11247
11243
  if (r === 0 || r === 1)
11248
11244
  return r;
11249
- if (s = Zn(r, a, e) - i, o = Math.exp((a - 1) * Math.log(r) + (e - 1) * Math.log(1 - r) + n), u = s / o, r -= o = u / (1 - 0.5 * Math.min(1, u * ((a - 1) / r - (e - 1) / (1 - r)))), r <= 0 && (r = 0.5 * (r + o)), r >= 1 && (r = 0.5 * (r + o + 1)), Math.abs(o) < t * r && c > 0)
11245
+ if (s = Xn(r, a, e) - i, o = Math.exp((a - 1) * Math.log(r) + (e - 1) * Math.log(1 - r) + n), u = s / o, r -= o = u / (1 - 0.5 * Math.min(1, u * ((a - 1) / r - (e - 1) / (1 - r)))), r <= 0 && (r = 0.5 * (r + o)), r >= 1 && (r = 0.5 * (r + o + 1)), Math.abs(o) < t * r && c > 0)
11250
11246
  break;
11251
11247
  }
11252
11248
  return r;
11253
11249
  }
11254
- function Zn(i, a, e) {
11255
- const t = i === 0 || i === 1 ? 0 : Math.exp(ct(a + e) - ct(a) - ct(e) + a * Math.log(i) + e * Math.log(1 - i));
11250
+ function Xn(i, a, e) {
11251
+ const t = i === 0 || i === 1 ? 0 : Math.exp(lt(a + e) - lt(a) - lt(e) + a * Math.log(i) + e * Math.log(1 - i));
11256
11252
  return i < (a + 1) / (a + e + 2) ? t * Pi(i, a, e) / a : 1 - t * Pi(1 - i, e, a) / e;
11257
11253
  }
11258
11254
  function Pi(i, a, e) {
@@ -11267,10 +11263,10 @@ function Pi(i, a, e) {
11267
11263
  return o;
11268
11264
  }
11269
11265
  function Pa(i, a) {
11270
- return i + a > 170 ? Math.exp(xa(i, a)) : ln(i) * ln(a) / ln(i + a);
11266
+ return i + a > 170 ? Math.exp(xa(i, a)) : cn(i) * cn(a) / cn(i + a);
11271
11267
  }
11272
11268
  function xa(i, a) {
11273
- return ct(i) + ct(a) - ct(i + a);
11269
+ return lt(i) + lt(a) - lt(i + a);
11274
11270
  }
11275
11271
  function vo(i, a, e) {
11276
11272
  if (i < 0)
@@ -11291,13 +11287,13 @@ function Ua(i, a) {
11291
11287
  return i <= 0 ? 0 : Ta(a / 2, i / 2);
11292
11288
  }
11293
11289
  function Zh(i, a) {
11294
- return i < 0 ? 0 : i === 0 && a === 2 ? 0.5 : Math.exp((a / 2 - 1) * Math.log(i) - i / 2 - a / 2 * Math.log(2) - ct(a / 2));
11290
+ return i < 0 ? 0 : i === 0 && a === 2 ? 0.5 : Math.exp((a / 2 - 1) * Math.log(i) - i / 2 - a / 2 * Math.log(2) - lt(a / 2));
11295
11291
  }
11296
11292
  function To(i, a) {
11297
11293
  return i <= 0 ? 0 : i >= 1 ? 1 / 0 : 2 * Fo(i, a / 2);
11298
11294
  }
11299
11295
  function va(i, a, e) {
11300
- return i < 0 ? 0 : Zn(a * i / (a * i + e), a / 2, e / 2);
11296
+ return i < 0 ? 0 : Xn(a * i / (a * i + e), a / 2, e / 2);
11301
11297
  }
11302
11298
  function zh(i, a, e) {
11303
11299
  if (i < 0)
@@ -11332,7 +11328,7 @@ function Io(i, a, e) {
11332
11328
  const l = u / c;
11333
11329
  return s - l * o + l * i;
11334
11330
  }
11335
- function ln(i) {
11331
+ function cn(i) {
11336
11332
  const a = [
11337
11333
  -1.716185138865495,
11338
11334
  24.76565080557592,
@@ -11382,12 +11378,12 @@ function tm(i, a, e) {
11382
11378
  return i <= 0 ? 0 : Ta(a, i / e);
11383
11379
  }
11384
11380
  function rm(i, a, e) {
11385
- return i < 0 ? 0 : i === 0 && a === 1 ? 1 / e : Math.exp((a - 1) * Math.log(i) - i / e - ct(a) - a * Math.log(e));
11381
+ return i < 0 ? 0 : i === 0 && a === 1 ? 1 / e : Math.exp((a - 1) * Math.log(i) - i / e - lt(a) - a * Math.log(e));
11386
11382
  }
11387
11383
  function nm(i, a, e) {
11388
11384
  return i <= 0 ? 0 : i >= 1 ? 1 / 0 : e * Fo(i, a);
11389
11385
  }
11390
- function ct(i) {
11386
+ function lt(i) {
11391
11387
  const a = [
11392
11388
  76.18009172947146,
11393
11389
  -86.50532032941678,
@@ -11407,7 +11403,7 @@ function ct(i) {
11407
11403
  function Ta(i, a) {
11408
11404
  if (a < 0 || i <= 0)
11409
11405
  return Number.NaN;
11410
- const e = 1e-30, t = -~(Math.log(i >= 1 ? i : 1 / i) * 8.5 + i * 0.4 + 17), r = ct(i), n = Math.exp(-a + i * Math.log(a) - r);
11406
+ const e = 1e-30, t = -~(Math.log(i >= 1 ? i : 1 / i) * 8.5 + i * 0.4 + 17), r = lt(i), n = Math.exp(-a + i * Math.log(a) - r);
11411
11407
  let s = i, o = 1 / i, u = o;
11412
11408
  if (a < i + 1) {
11413
11409
  if (n === 0)
@@ -11439,7 +11435,7 @@ function Fo(i, a) {
11439
11435
  const o = 1 - a * (0.253 + a * 0.12);
11440
11436
  i < o ? e = (i / o) ** (1 / a) : e = 1 - Math.log(1 - (i - o) / (1 - o));
11441
11437
  }
11442
- const t = 1e-8, r = ct(a);
11438
+ const t = 1e-8, r = lt(a);
11443
11439
  let n, s;
11444
11440
  for (let o = 0; o < 12; o++) {
11445
11441
  if (e <= 0)
@@ -11465,7 +11461,7 @@ function am(i, a, e) {
11465
11461
  return i <= 0 ? 0 : Math.exp(-Math.log(i) - 0.5 * Math.log(2 * Math.PI) - Math.log(e) - (Math.log(i) - a) ** 2 / (2 * e * e));
11466
11462
  }
11467
11463
  function im(i, a, e) {
11468
- return Math.exp(zn(i, a, e));
11464
+ return Math.exp(Zn(i, a, e));
11469
11465
  }
11470
11466
  function om(i, a, e) {
11471
11467
  if (i < 0)
@@ -11484,7 +11480,7 @@ function $r(i, a, e) {
11484
11480
  function $o(i, a, e) {
11485
11481
  return Math.exp(-0.5 * Math.log(2 * Math.PI) - Math.log(e) - (i - a) ** 2 / (2 * e * e));
11486
11482
  }
11487
- function zn(i, a, e) {
11483
+ function Zn(i, a, e) {
11488
11484
  return -1.4142135623730951 * e * Fh(2 * i) + a;
11489
11485
  }
11490
11486
  function um(i, a) {
@@ -11497,14 +11493,14 @@ function Yo(i, a) {
11497
11493
  return Math.exp(-a) * a ** i / lr(i);
11498
11494
  }
11499
11495
  function Yr(i, a) {
11500
- const e = 0.5 * Zn(a / (i ** 2 + a), a / 2, 0.5);
11496
+ const e = 0.5 * Xn(a / (i ** 2 + a), a / 2, 0.5);
11501
11497
  return i < 0 ? e : 1 - e;
11502
11498
  }
11503
11499
  function cm(i, a) {
11504
11500
  const e = (1 + i ** 2 / a) ** (-(a + 1) / 2);
11505
11501
  return 1 / (Math.sqrt(a) * Pa(0.5, a / 2)) * e;
11506
11502
  }
11507
- function Jn(i, a) {
11503
+ function zn(i, a) {
11508
11504
  let e = La(2 * Math.min(i, 1 - i), 0.5 * a, 0.5);
11509
11505
  return e = Math.sqrt(a * (1 - e) / e), i > 0.5 ? e : -e;
11510
11506
  }
@@ -11542,7 +11538,7 @@ function et(i, a, e, t, r) {
11542
11538
  noCalculate: o
11543
11539
  };
11544
11540
  }
11545
- function es(i, a, e) {
11541
+ function Jn(i, a, e) {
11546
11542
  const t = i.isArray() ? i.getRowCount() : 1, r = i.isArray() ? i.getColumnCount() : 1;
11547
11543
  let n = t, s = r;
11548
11544
  if (a && !a.isNull() && (n = a.isArray() ? a.getRowCount() : 1, s = a.isArray() ? a.getColumnCount() : 1, t === 1 && s !== r || r === 1 && n !== t || t !== 1 && r !== 1 && (n !== t || s !== r)))
@@ -11576,7 +11572,7 @@ function dt(i) {
11576
11572
  }
11577
11573
  return t;
11578
11574
  }
11579
- function ts(i, a) {
11575
+ function es(i, a) {
11580
11576
  const e = [];
11581
11577
  let t = 1;
11582
11578
  for (let r = 0; r < i; r++) {
@@ -11586,7 +11582,7 @@ function ts(i, a) {
11586
11582
  }
11587
11583
  return e;
11588
11584
  }
11589
- function rs(i, a, e, t) {
11585
+ function ts(i, a, e, t) {
11590
11586
  let r = a;
11591
11587
  t && (r = a.map((o) => Math.log(o)));
11592
11588
  let n, s;
@@ -11648,18 +11644,18 @@ function fm(i, a) {
11648
11644
  intercept: 0
11649
11645
  };
11650
11646
  }
11651
- function ns(i, a, e, t, r) {
11647
+ function rs(i, a, e, t, r) {
11652
11648
  const n = i.length === 1 && i[0].length > 1;
11653
11649
  let s = i;
11654
11650
  r && (s = i.map((C) => C.map((E) => Math.log(E))));
11655
11651
  let o = a, u = e;
11656
- n && (s = ht(s), o = ht(o), u = ht(u)), t && (o = o.map((C) => [...C, 1]));
11657
- const c = ht(o), l = fr(c, o), f = fr(c, s);
11652
+ n && (s = mt(s), o = mt(o), u = mt(u)), t && (o = o.map((C) => [...C, 1]));
11653
+ const c = mt(o), l = fr(c, o), f = fr(c, s);
11658
11654
  let h = Yh(l);
11659
11655
  if (!h && (h = Qh(l), !h))
11660
11656
  return g.create(m.NA);
11661
11657
  let d = fr(h, f);
11662
- t || d.push([0]), d = ht(d);
11658
+ t || d.push([0]), d = mt(d);
11663
11659
  const _ = d[0].pop();
11664
11660
  if (d[0].reverse(), d[0].push(_), r)
11665
11661
  for (let C = 0; C < d[0].length; C++)
@@ -11923,7 +11919,7 @@ class Xo extends V {
11923
11919
  const [p, N, M] = R, S = +p.getValue(), w = +N.getValue(), D = Math.floor(+M.getValue());
11924
11920
  if (S <= 0 || S >= 1 || w <= 0 || D < 1)
11925
11921
  return g.create(m.NUM);
11926
- const L = Math.abs(zn(S / 2, 0, 1) * w / Math.sqrt(D));
11922
+ const L = Math.abs(Zn(S / 2, 0, 1) * w / Math.sqrt(D));
11927
11923
  return y.create(L);
11928
11924
  });
11929
11925
  return n === 1 && s === 1 ? l.get(0, 0) : l;
@@ -12361,7 +12357,7 @@ class ou extends V {
12361
12357
  const [u, c, l] = o, f = +u.getValue(), h = +c.getValue(), d = +l.getValue();
12362
12358
  if (f <= 0 || f >= 1 || d <= 0)
12363
12359
  return g.create(m.NUM);
12364
- const _ = zn(f, h, d);
12360
+ const _ = Zn(f, h, d);
12365
12361
  return y.create(_);
12366
12362
  }
12367
12363
  }
@@ -12385,7 +12381,7 @@ class uu extends V {
12385
12381
  const [s] = n, o = +s.getValue();
12386
12382
  if (o <= 0 || o >= 1)
12387
12383
  return g.create(m.NUM);
12388
- const u = zn(o, 0, 1);
12384
+ const u = Zn(o, 0, 1);
12389
12385
  return y.create(u);
12390
12386
  }
12391
12387
  }
@@ -12610,7 +12606,7 @@ class du extends V {
12610
12606
  const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
12611
12607
  if (c <= 0 || c > 1 || l < 1 || l > 10 ** 10)
12612
12608
  return g.create(m.NUM);
12613
- const f = Math.abs(Jn(c / 2, l));
12609
+ const f = Math.abs(zn(c / 2, l));
12614
12610
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
12615
12611
  }
12616
12612
  }
@@ -13810,7 +13806,7 @@ function pu(i) {
13810
13806
  }
13811
13807
  return Ru[Number(i)] || [];
13812
13808
  }
13813
- function Ln(i, a, e = 1, t) {
13809
+ function Dn(i, a, e = 1, t) {
13814
13810
  const r = pu(e), n = Math.floor(i), s = Math.floor(a), o = s > n ? n : s;
13815
13811
  let u = 0;
13816
13812
  const c = Math.abs(Math.floor(a) - Math.floor(i)) + 1;
@@ -13823,7 +13819,7 @@ function Ln(i, a, e = 1, t) {
13823
13819
  }
13824
13820
  return s >= n ? u : -u;
13825
13821
  }
13826
- function Pn(i, a, e = 1, t) {
13822
+ function Ln(i, a, e = 1, t) {
13827
13823
  const r = pu(e), n = Math.floor(i);
13828
13824
  let s = n, o = Math.abs(a);
13829
13825
  for (let u = 1; u <= o; u++) {
@@ -13941,7 +13937,7 @@ const Ym = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Hm = [31, 28, 31, 3
13941
13937
  function Gr(i, a) {
13942
13938
  return km(i) ? Ym[a] : Hm[a];
13943
13939
  }
13944
- function ss(i) {
13940
+ function ns(i) {
13945
13941
  return $m(i) ? 366 : 365;
13946
13942
  }
13947
13943
  function Vu(i, a) {
@@ -13951,7 +13947,7 @@ function Vu(i, a) {
13951
13947
  case 4:
13952
13948
  return 360;
13953
13949
  case 1:
13954
- return ss(re(i).getUTCFullYear());
13950
+ return ns(re(i).getUTCFullYear());
13955
13951
  case 3:
13956
13952
  return 365;
13957
13953
  default:
@@ -14448,7 +14444,7 @@ class sg extends V {
14448
14444
  return u;
14449
14445
  if (r)
14450
14446
  return this._getResultByHolidays(o, u, r);
14451
- const c = Ln(o, u);
14447
+ const c = Dn(o, u);
14452
14448
  return y.create(c);
14453
14449
  }
14454
14450
  _getResultByHolidays(e, t, r) {
@@ -14473,7 +14469,7 @@ class sg extends V {
14473
14469
  return o;
14474
14470
  n.push(o);
14475
14471
  }
14476
- const s = Ln(e, t, 1, n);
14472
+ const s = Dn(e, t, 1, n);
14477
14473
  return y.create(s);
14478
14474
  }
14479
14475
  }
@@ -14521,7 +14517,7 @@ class ag extends V {
14521
14517
  return l;
14522
14518
  if (n)
14523
14519
  return this._getResultByHolidays(c, l, u, n);
14524
- const f = Ln(c, l, u);
14520
+ const f = Dn(c, l, u);
14525
14521
  return y.create(f);
14526
14522
  }
14527
14523
  _getResultByHolidays(e, t, r, n) {
@@ -14546,7 +14542,7 @@ class ag extends V {
14546
14542
  return u;
14547
14543
  s.push(u);
14548
14544
  }
14549
- const o = Ln(e, t, r, s);
14545
+ const o = Dn(e, t, r, s);
14550
14546
  return y.create(o);
14551
14547
  }
14552
14548
  }
@@ -14833,7 +14829,7 @@ class gg extends V {
14833
14829
  return g.create(m.VALUE);
14834
14830
  if (r)
14835
14831
  return this._getResultByHolidays(o, u, r);
14836
- const c = Pn(o, u);
14832
+ const c = Ln(o, u);
14837
14833
  return typeof c != "number" ? c : y.create(c);
14838
14834
  }
14839
14835
  _getResultByHolidays(e, t, r) {
@@ -14858,7 +14854,7 @@ class gg extends V {
14858
14854
  return o;
14859
14855
  n.push(o);
14860
14856
  }
14861
- const s = Pn(e, t, 1, n);
14857
+ const s = Ln(e, t, 1, n);
14862
14858
  return typeof s != "number" ? s : y.create(s);
14863
14859
  }
14864
14860
  }
@@ -14893,7 +14889,7 @@ class dg extends V {
14893
14889
  return g.create(m.NUM);
14894
14890
  if (n)
14895
14891
  return this._getResultByHolidays(c, l, f, n);
14896
- const h = Pn(c, l, f);
14892
+ const h = Ln(c, l, f);
14897
14893
  return typeof h != "number" ? h : y.create(h);
14898
14894
  }
14899
14895
  _checkArrayError(e) {
@@ -14928,7 +14924,7 @@ class dg extends V {
14928
14924
  return u;
14929
14925
  s.push(u);
14930
14926
  }
14931
- const o = Pn(e, t, r, s);
14927
+ const o = Ln(e, t, r, s);
14932
14928
  return typeof o != "number" ? o : y.create(o);
14933
14929
  }
14934
14930
  }
@@ -17057,7 +17053,7 @@ const R1 = [
17057
17053
  [y1, Z.OCT2HEX]
17058
17054
  ];
17059
17055
  var ee = /* @__PURE__ */ ((i) => (i.ACCRINT = "ACCRINT", i.ACCRINTM = "ACCRINTM", i.AMORDEGRC = "AMORDEGRC", i.AMORLINC = "AMORLINC", i.COUPDAYBS = "COUPDAYBS", i.COUPDAYS = "COUPDAYS", i.COUPDAYSNC = "COUPDAYSNC", i.COUPNCD = "COUPNCD", i.COUPNUM = "COUPNUM", i.COUPPCD = "COUPPCD", i.CUMIPMT = "CUMIPMT", i.CUMPRINC = "CUMPRINC", i.DB = "DB", i.DDB = "DDB", i.DISC = "DISC", i.DOLLARDE = "DOLLARDE", i.DOLLARFR = "DOLLARFR", i.DURATION = "DURATION", i.EFFECT = "EFFECT", i.FV = "FV", i.FVSCHEDULE = "FVSCHEDULE", i.INTRATE = "INTRATE", i.IPMT = "IPMT", i.IRR = "IRR", i.ISPMT = "ISPMT", i.MDURATION = "MDURATION", i.MIRR = "MIRR", i.NOMINAL = "NOMINAL", i.NPER = "NPER", i.NPV = "NPV", i.ODDFPRICE = "ODDFPRICE", i.ODDFYIELD = "ODDFYIELD", i.ODDLPRICE = "ODDLPRICE", i.ODDLYIELD = "ODDLYIELD", i.PDURATION = "PDURATION", i.PMT = "PMT", i.PPMT = "PPMT", i.PRICE = "PRICE", i.PRICEDISC = "PRICEDISC", i.PRICEMAT = "PRICEMAT", i.PV = "PV", i.RATE = "RATE", i.RECEIVED = "RECEIVED", i.RRI = "RRI", i.SLN = "SLN", i.SYD = "SYD", i.TBILLEQ = "TBILLEQ", i.TBILLPRICE = "TBILLPRICE", i.TBILLYIELD = "TBILLYIELD", i.VDB = "VDB", i.XIRR = "XIRR", i.XNPV = "XNPV", i.YIELD = "YIELD", i.YIELDDISC = "YIELDDISC", i.YIELDMAT = "YIELDMAT", i))(ee || {});
17060
- function as(i, a, e, t) {
17056
+ function ss(i, a, e, t) {
17061
17057
  const r = It(i, a, e), { days: n } = _e(r, i, t);
17062
17058
  return n;
17063
17059
  }
@@ -17095,7 +17091,7 @@ function It(i, a, e) {
17095
17091
  return ye(r);
17096
17092
  }
17097
17093
  function Ou(i, a, e, t, r, n) {
17098
- const s = as(i, a, r, n), o = qe(i, a, r, n), u = nr(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
17094
+ const s = ss(i, a, r, n), o = qe(i, a, r, n), u = nr(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
17099
17095
  let h = 0, d = 0;
17100
17096
  for (let E = 1; E <= u; E++) {
17101
17097
  const b = E + c, R = f / l ** b;
@@ -17259,8 +17255,8 @@ function O1(i, a) {
17259
17255
  while (Math.abs(_) > 1e-7 && f < 60);
17260
17256
  return C;
17261
17257
  }
17262
- function fn(i, a, e, t, r, n, s) {
17263
- const o = nr(i, a, n), u = qe(i, a, n, s), c = as(i, a, n, s);
17258
+ function ln(i, a, e, t, r, n, s) {
17259
+ const o = nr(i, a, n), u = qe(i, a, n, s), c = ss(i, a, n, s);
17264
17260
  if (o === 1) {
17265
17261
  const h = u - c, d = 100 * e / n + r, _ = t / n * h / u + 1, C = 100 * e / n * c / u;
17266
17262
  return d / _ - C;
@@ -17411,7 +17407,7 @@ class D1 extends V {
17411
17407
  return g.create(m.VALUE);
17412
17408
  if (![1, 2, 4].includes(E) || b < 0 || b > 4 || Math.floor(_) >= Math.floor(C))
17413
17409
  return g.create(m.NUM);
17414
- const R = as(_, C, E, b);
17410
+ const R = ss(_, C, E, b);
17415
17411
  return y.create(R);
17416
17412
  }
17417
17413
  }
@@ -18574,7 +18570,7 @@ class c0 extends V {
18574
18570
  return g.create(m.VALUE);
18575
18571
  if (S < 0 || w < 0 || D <= 0 || ![1, 2, 4].includes(L) || U < 0 || U > 4 || N >= M || !Or(N, M, L))
18576
18572
  return g.create(m.NUM);
18577
- const x = fn(N, M, S, w, D, L, U);
18573
+ const x = ln(N, M, S, w, D, L, U);
18578
18574
  return y.create(x);
18579
18575
  }
18580
18576
  }
@@ -18873,7 +18869,7 @@ class A0 extends V {
18873
18869
  return g.create(m.VALUE);
18874
18870
  if (d <= 0 || f >= h)
18875
18871
  return g.create(m.NUM);
18876
- const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = ss(E);
18872
+ const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = ns(E);
18877
18873
  if (_ > b)
18878
18874
  return g.create(m.NUM);
18879
18875
  let R = 365 * d / (360 - d * _);
@@ -18907,7 +18903,7 @@ class E0 extends V {
18907
18903
  return g.create(m.VALUE);
18908
18904
  if (d <= 0 || f >= h)
18909
18905
  return g.create(m.NUM);
18910
- const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = ss(E);
18906
+ const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = ns(E);
18911
18907
  if (_ > b)
18912
18908
  return g.create(m.NUM);
18913
18909
  const R = 100 * (1 - d * _ / 360);
@@ -18935,7 +18931,7 @@ class b0 extends V {
18935
18931
  return g.create(m.VALUE);
18936
18932
  if (d <= 0 || f >= h)
18937
18933
  return g.create(m.NUM);
18938
- const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = ss(E);
18934
+ const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = ns(E);
18939
18935
  if (_ > b)
18940
18936
  return g.create(m.NUM);
18941
18937
  const R = (100 - d) / d * 360 / _;
@@ -19332,12 +19328,12 @@ class V0 extends V {
19332
19328
  }
19333
19329
  _getResult(e, t, r, n, s, o, u) {
19334
19330
  if (nr(e, t, o) > 1) {
19335
- let E = r || 0.01, b = fn(e, t, r, E, s, o, u), R = b - n;
19331
+ let E = r || 0.01, b = ln(e, t, r, E, s, o, u), R = b - n;
19336
19332
  for (let p = 0; p < 100 && Math.abs(R) > 1e-7; p++)
19337
- b = fn(e, t, r, 1.01 * E, s, o, u), E += -R / (b - n - R) * E * 0.01, R = fn(e, t, r, E, s, o, u) - n;
19333
+ b = ln(e, t, r, 1.01 * E, s, o, u), E += -R / (b - n - R) * E * 0.01, R = ln(e, t, r, E, s, o, u) - n;
19338
19334
  return E;
19339
19335
  }
19340
- const l = as(e, t, o, u), f = qe(e, t, o, u), { days: h } = _e(e, t, u), d = n / 100 + l / f * r / o;
19336
+ const l = ss(e, t, o, u), f = qe(e, t, o, u), { days: h } = _e(e, t, u), d = n / 100 + l / f * r / o;
19341
19337
  return (s / 100 + r / o - d) / d * o * f / h;
19342
19338
  }
19343
19339
  }
@@ -21299,7 +21295,7 @@ class xd extends V {
21299
21295
  return g.create(m.REF);
21300
21296
  const n = this._convertToDefinedName(r);
21301
21297
  if (t === 0) {
21302
- const f = Uh(n), { range: h, sheetName: d, unitId: _ } = f, C = new yn(h);
21298
+ const f = Uh(n), { range: h, sheetName: d, unitId: _ } = f, C = new bn(h);
21303
21299
  return C.setForcedUnitIdDirect(_), C.setForcedSheetName(d), this._setDefault(C);
21304
21300
  }
21305
21301
  if (Tr(n))
@@ -21311,7 +21307,7 @@ class xd extends V {
21311
21307
  const s = gr(n), { range: o, sheetName: u, unitId: c } = s;
21312
21308
  if (Number.isNaN(o.startRow) || o.endRow + 1 > 1048576 || Number.isNaN(o.startColumn) || o.endColumn + 1 > 16384)
21313
21309
  return g.create(m.REF);
21314
- const l = new yn(o);
21310
+ const l = new bn(o);
21315
21311
  return l.setForcedUnitIdDirect(c), l.setForcedSheetName(u), this._setDefault(l);
21316
21312
  }
21317
21313
  _setDefault(e) {
@@ -21617,7 +21613,7 @@ class Id extends V {
21617
21613
  }
21618
21614
  }
21619
21615
  _sort(e, t = 1) {
21620
- const r = Cn();
21616
+ const r = dn();
21621
21617
  return t === 1 ? this._sortAsc(e, r) : this._sortDesc(e, r);
21622
21618
  }
21623
21619
  _sortAsc(e, t) {
@@ -21782,7 +21778,7 @@ class Fd extends V {
21782
21778
  return n;
21783
21779
  }
21784
21780
  _sort(e, t) {
21785
- const r = Cn();
21781
+ const r = dn();
21786
21782
  return (n, s) => {
21787
21783
  let o = n[e], u = s[e], c = this._compare(o, u, t[0], r);
21788
21784
  if (c === 0 && t.length > 1) {
@@ -22437,7 +22433,7 @@ class Xd extends V {
22437
22433
  }
22438
22434
  _handleExpandObject(e, t, r, n, s, o = 0) {
22439
22435
  if ((s === 2 || s === -2) && n !== 2) {
22440
- const u = vs(s), c = Us(n);
22436
+ const u = Us(s), c = js(n);
22441
22437
  return this.binarySearchExpand(
22442
22438
  e,
22443
22439
  t,
@@ -22458,7 +22454,7 @@ class Xd extends V {
22458
22454
  }
22459
22455
  _handleSingleObject(e, t, r, n, s) {
22460
22456
  if ((s === 2 || s === -2) && n !== 2) {
22461
- const o = vs(s), u = Us(n);
22457
+ const o = Us(s), u = js(n);
22462
22458
  return this.binarySearch(e, t, r, o, u);
22463
22459
  }
22464
22460
  return n === 2 ? this.fuzzySearch(e, t, r, s !== -1) : n === -1 || n === 1 ? this.orderSearch(
@@ -22516,7 +22512,7 @@ class Zd extends V {
22516
22512
  _handleSingleObject(e, t, r, n) {
22517
22513
  let s;
22518
22514
  if ((n === 2 || n === -2) && r !== 2) {
22519
- const o = vs(n), u = Us(r);
22515
+ const o = Us(n), u = js(r);
22520
22516
  s = t.binarySearch(e, o, u);
22521
22517
  } else if (r === 2) {
22522
22518
  const o = t.compare(e, $.EQUALS);
@@ -23485,7 +23481,7 @@ class TC extends V {
23485
23481
  }
23486
23482
  if (t !== r)
23487
23483
  return g.create(m.VALUE);
23488
- const s = Xn(n);
23484
+ const s = Kn(n);
23489
23485
  return y.create(s);
23490
23486
  }
23491
23487
  }
@@ -24600,8 +24596,8 @@ class d_ extends V {
24600
24596
  if (!e.isReferenceObject() || r && !r.isReferenceObject())
24601
24597
  return g.create(m.VALUE);
24602
24598
  const n = e.toArrayValueObject();
24603
- let s = Wn(n, t);
24604
- s = qn(s, n, t);
24599
+ let s = Qn(n, t);
24600
+ s = Wn(s, n, t);
24605
24601
  const o = n.getRowCount(), u = n.getColumnCount();
24606
24602
  let c = n;
24607
24603
  if (r) {
@@ -24936,7 +24932,7 @@ class V_ extends V {
24936
24932
  return _;
24937
24933
  if (d.isString() && (d = d.convertToNumberObjectValue()), d.isError())
24938
24934
  return d;
24939
- const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R = Yn(C, b), p = Math.trunc(Vr(C, b) + R) / b;
24935
+ const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R = $n(C, b), p = Math.trunc(Vr(C, b) + R) / b;
24940
24936
  return y.create(p);
24941
24937
  });
24942
24938
  return n === 1 && s === 1 ? c.get(0, 0) : c;
@@ -25334,8 +25330,8 @@ class B_ extends V {
25334
25330
  return s.isReferenceObject() && (s = s.toArrayValueObject()), r && !(r != null && r.isReferenceObject()) ? g.create(m.NA) : (s = s, s.isArray() ? s.map((o) => this._handleSingleObject(n, o, r)) : this._handleSingleObject(n, s, r));
25335
25331
  }
25336
25332
  _handleSingleObject(e, t, r) {
25337
- let n = Wn(e, t);
25338
- n = qn(n, e, t);
25333
+ let n = Qn(e, t);
25334
+ n = Wn(n, e, t);
25339
25335
  let s = r ? this._createRangeReferenceObject(r, e) : e;
25340
25336
  if (!s)
25341
25337
  return g.create(m.VALUE);
@@ -25581,7 +25577,7 @@ class H_ extends V {
25581
25577
  return g.create(m.NUM);
25582
25578
  if (D === 1)
25583
25579
  return g.create(m.DIV_BY_ZERO);
25584
- const L = Math.abs(Jn(S / 2, D - 1) * w / Math.sqrt(D));
25580
+ const L = Math.abs(zn(S / 2, D - 1) * w / Math.sqrt(D));
25585
25581
  return y.create(L);
25586
25582
  });
25587
25583
  return n === 1 && s === 1 ? l.get(0, 0) : l;
@@ -25689,8 +25685,8 @@ class K_ extends V {
25689
25685
  return e.isError() || t.isError() ? g.create(m.NA) : e.isArray() ? t.isArray() ? t.mapValue((r) => this._handleSingleObject(e, r)) : this._handleSingleObject(e, t) : g.create(m.VALUE);
25690
25686
  }
25691
25687
  _handleSingleObject(e, t) {
25692
- let r = Wn(e, t);
25693
- r = qn(r, e, t);
25688
+ let r = Qn(e, t);
25689
+ r = Wn(r, e, t);
25694
25690
  const n = e.pick(r);
25695
25691
  return this._countA(n);
25696
25692
  }
@@ -26082,7 +26078,7 @@ class aA extends V {
26082
26078
  const [s] = n, o = +s.getValue();
26083
26079
  if (o === 0 || o < 0 && o % 1 === 0)
26084
26080
  return g.create(m.NUM);
26085
- const u = ln(o);
26081
+ const u = cn(o);
26086
26082
  return Number.isNaN(u) || !Number.isFinite(u) ? g.create(m.NUM) : y.create(u);
26087
26083
  }
26088
26084
  }
@@ -26106,7 +26102,7 @@ class vi extends V {
26106
26102
  const [s] = n, o = +s.getValue();
26107
26103
  if (o <= 0)
26108
26104
  return g.create(m.NUM);
26109
- const u = ct(o);
26105
+ const u = lt(o);
26110
26106
  return Math.abs(u) < 1e-15 ? y.create(0) : y.create(u);
26111
26107
  }
26112
26108
  }
@@ -26183,7 +26179,7 @@ class uA extends V {
26183
26179
  A(this, "maxParams", 4);
26184
26180
  }
26185
26181
  calculate(e, t, r, n) {
26186
- const { isError: s, errorObject: o } = es(e, t, r);
26182
+ const { isError: s, errorObject: o } = Jn(e, t, r);
26187
26183
  if (s)
26188
26184
  return o;
26189
26185
  const u = dt(e);
@@ -26205,7 +26201,7 @@ class uA extends V {
26205
26201
  return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (n ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (n ? t[0].length + 1 : t[0].length) > e.length ? g.create(m.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
26206
26202
  }
26207
26203
  _getResultByMultipleVariables(e, t, r, n) {
26208
- const s = e.length === 1 && e[0].length > 1, o = ns(e, t, r, n, !0);
26204
+ const s = e.length === 1 && e[0].length > 1, o = rs(e, t, r, n, !0);
26209
26205
  if (o instanceof g)
26210
26206
  return o;
26211
26207
  const { coefficients: u, newX: c } = o, l = u[0].length, f = u[0][l - 1];
@@ -26217,14 +26213,14 @@ class uA extends V {
26217
26213
  _ *= u[0][l - 2 - C] ** c[d][C];
26218
26214
  h[d].push(_);
26219
26215
  }
26220
- return s && (h = ht(h)), q.createByArray(h);
26216
+ return s && (h = mt(h)), q.createByArray(h);
26221
26217
  }
26222
26218
  _getResultBySimpleVariables(e, t, r, n) {
26223
- const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = rs(o, s, n, !0), l = r.map((f) => f.map((h) => c * u ** h));
26219
+ const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ts(o, s, n, !0), l = r.map((f) => f.map((h) => c * u ** h));
26224
26220
  return q.createByArray(l);
26225
26221
  }
26226
26222
  _getKnownXsValues(e, t) {
26227
- return !t || t.isNull() ? ts(e.length, e[0].length) : dt(t);
26223
+ return !t || t.isNull() ? es(e.length, e[0].length) : dt(t);
26228
26224
  }
26229
26225
  _getNewXsValues(e, t) {
26230
26226
  return !t || t.isNull() ? e : dt(t);
@@ -26444,7 +26440,7 @@ class gA extends V {
26444
26440
  A(this, "maxParams", 4);
26445
26441
  }
26446
26442
  calculate(e, t, r, n) {
26447
- const { isError: s, errorObject: o } = es(e, t);
26443
+ const { isError: s, errorObject: o } = Jn(e, t);
26448
26444
  if (s)
26449
26445
  return o;
26450
26446
  const u = dt(e);
@@ -26467,7 +26463,7 @@ class gA extends V {
26467
26463
  return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (r ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (r ? t[0].length + 1 : t[0].length) > e.length ? g.create(m.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
26468
26464
  }
26469
26465
  _getResultByMultipleVariables(e, t, r, n) {
26470
- const s = ns(e, t, t, r, !1);
26466
+ const s = rs(e, t, t, r, !1);
26471
26467
  if (s instanceof g)
26472
26468
  return s;
26473
26469
  const { coefficients: o, X: u, XTXInverse: c } = s;
@@ -26514,7 +26510,7 @@ class gA extends V {
26514
26510
  return q.createByArray(l);
26515
26511
  }
26516
26512
  _getResultBySimpleVariables(e, t, r, n) {
26517
- const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = rs(o, s, r, !1);
26513
+ const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ts(o, s, r, !1);
26518
26514
  if (Number.isNaN(u))
26519
26515
  return g.create(m.NA);
26520
26516
  let l = [];
@@ -26554,7 +26550,7 @@ class gA extends V {
26554
26550
  return q.createByArray(l);
26555
26551
  }
26556
26552
  _getKnownXsValues(e, t) {
26557
- return !t || t.isNull() ? ts(e.length, e[0].length) : dt(t);
26553
+ return !t || t.isNull() ? es(e.length, e[0].length) : dt(t);
26558
26554
  }
26559
26555
  }
26560
26556
  class dA extends V {
@@ -26564,7 +26560,7 @@ class dA extends V {
26564
26560
  A(this, "maxParams", 4);
26565
26561
  }
26566
26562
  calculate(e, t, r, n) {
26567
- const { isError: s, errorObject: o } = es(e, t);
26563
+ const { isError: s, errorObject: o } = Jn(e, t);
26568
26564
  if (s)
26569
26565
  return o;
26570
26566
  const u = dt(e);
@@ -26588,7 +26584,7 @@ class dA extends V {
26588
26584
  }
26589
26585
  // eslint-disable-next-line max-lines-per-function
26590
26586
  _getResultByMultipleVariables(e, t, r, n) {
26591
- const s = ns(e, t, t, r, !0);
26587
+ const s = rs(e, t, t, r, !0);
26592
26588
  if (s instanceof g)
26593
26589
  return s;
26594
26590
  const { coefficients: o, Y: u, X: c, XTXInverse: l } = s;
@@ -26636,7 +26632,7 @@ class dA extends V {
26636
26632
  return q.createByArray(f);
26637
26633
  }
26638
26634
  _getResultBySimpleVariables(e, t, r, n) {
26639
- const s = e.flat(), o = t.flat(), { slope: u, intercept: c, Y: l } = rs(o, s, r, !0);
26635
+ const s = e.flat(), o = t.flat(), { slope: u, intercept: c, Y: l } = ts(o, s, r, !0);
26640
26636
  if (Number.isNaN(u))
26641
26637
  return g.create(m.NA);
26642
26638
  let f = [];
@@ -26674,7 +26670,7 @@ class dA extends V {
26674
26670
  return q.createByArray(f);
26675
26671
  }
26676
26672
  _getKnownXsValues(e, t) {
26677
- return !t || t.isNull() ? ts(e.length, e[0].length) : dt(t);
26673
+ return !t || t.isNull() ? es(e.length, e[0].length) : dt(t);
26678
26674
  }
26679
26675
  }
26680
26676
  class CA extends V {
@@ -26735,7 +26731,7 @@ class _A extends V {
26735
26731
  const f = 1 - l, h = r.length, d = r.reduce((b, R) => b + R, 0) / h, _ = r.reduce((b, R) => b + (R - d) ** 2, 0) / (h - 1), C = Math.sqrt(_);
26736
26732
  if (C <= 0)
26737
26733
  return g.create(m.NUM);
26738
- const E = Math.abs(Jn(f / 2, h - 1) * C / Math.sqrt(h));
26734
+ const E = Math.abs(zn(f / 2, h - 1) * C / Math.sqrt(h));
26739
26735
  return y.create(E);
26740
26736
  }
26741
26737
  _getRangeValues(e) {
@@ -28035,7 +28031,7 @@ class XA extends V {
28035
28031
  const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
28036
28032
  if (c <= 0 || c > 1 || l < 1 || l > 10 ** 10)
28037
28033
  return g.create(m.NUM);
28038
- const f = Jn(c, l);
28034
+ const f = zn(c, l);
28039
28035
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
28040
28036
  }
28041
28037
  }
@@ -28046,7 +28042,7 @@ class ZA extends V {
28046
28042
  A(this, "maxParams", 4);
28047
28043
  }
28048
28044
  calculate(e, t, r, n) {
28049
- const { isError: s, errorObject: o } = es(e, t, r);
28045
+ const { isError: s, errorObject: o } = Jn(e, t, r);
28050
28046
  if (s)
28051
28047
  return o;
28052
28048
  const u = dt(e);
@@ -28068,7 +28064,7 @@ class ZA extends V {
28068
28064
  return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (n ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (n ? t[0].length + 1 : t[0].length) > e.length ? g.create(m.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
28069
28065
  }
28070
28066
  _getResultByMultipleVariables(e, t, r, n) {
28071
- const s = e.length === 1 && e[0].length > 1, o = ns(e, t, r, n, !1);
28067
+ const s = e.length === 1 && e[0].length > 1, o = rs(e, t, r, n, !1);
28072
28068
  if (o instanceof g)
28073
28069
  return o;
28074
28070
  const { coefficients: u, newX: c } = o, l = u[0].length, f = u[0][l - 1];
@@ -28080,17 +28076,17 @@ class ZA extends V {
28080
28076
  _ += u[0][l - 2 - C] * c[d][C];
28081
28077
  h[d].push(_);
28082
28078
  }
28083
- return s && (h = ht(h)), q.createByArray(h);
28079
+ return s && (h = mt(h)), q.createByArray(h);
28084
28080
  }
28085
28081
  _getResultBySimpleVariables(e, t, r, n) {
28086
- const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = rs(o, s, n, !1);
28082
+ const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ts(o, s, n, !1);
28087
28083
  if (Number.isNaN(u))
28088
28084
  return g.create(m.NA);
28089
28085
  const l = r.map((f) => f.map((h) => u * h + c));
28090
28086
  return q.createByArray(l);
28091
28087
  }
28092
28088
  _getKnownXsValues(e, t) {
28093
- return !t || t.isNull() ? ts(e.length, e[0].length) : dt(t);
28089
+ return !t || t.isNull() ? es(e.length, e[0].length) : dt(t);
28094
28090
  }
28095
28091
  _getNewXsValues(e, t) {
28096
28092
  return !t || t.isNull() ? e : dt(t);
@@ -30648,7 +30644,7 @@ let na = class extends Oe {
30648
30644
  super();
30649
30645
  A(this, "_computingCompleted$", new oc((a) => {
30650
30646
  this._commandService.onCommandExecuted((e) => {
30651
- if (e.id !== dn.id) return;
30647
+ if (e.id !== gn.id) return;
30652
30648
  const t = e.params;
30653
30649
  if (t.stageInfo)
30654
30650
  return a.next(
@@ -30673,7 +30669,7 @@ var db = Object.getOwnPropertyDescriptor, Cb = (i, a, e, t) => {
30673
30669
  (s = i[n]) && (r = s(r) || r);
30674
30670
  return r;
30675
30671
  }, Jr = (i, a) => (e, t) => a(e, t, i);
30676
- let xn = class extends Oe {
30672
+ let Pn = class extends Oe {
30677
30673
  constructor(i, a, e, t) {
30678
30674
  super(), this._commandService = i, this._functionService = a, this._configService = e, this._dataSyncPrimaryController = t, this._initialize();
30679
30675
  }
@@ -30683,10 +30679,10 @@ let xn = class extends Oe {
30683
30679
  _registerCommands() {
30684
30680
  [
30685
30681
  io,
30686
- Ns,
30682
+ Vs,
30687
30683
  no,
30688
30684
  so,
30689
- dn,
30685
+ gn,
30690
30686
  ao,
30691
30687
  ca,
30692
30688
  ro,
@@ -30729,18 +30725,18 @@ let xn = class extends Oe {
30729
30725
  this._functionService.registerExecutors(...a);
30730
30726
  }
30731
30727
  };
30732
- xn = Cb([
30728
+ Pn = Cb([
30733
30729
  Jr(0, ar),
30734
30730
  Jr(1, Yt),
30735
30731
  Jr(2, ia),
30736
30732
  Jr(3, rc(lc))
30737
- ], xn);
30733
+ ], Pn);
30738
30734
  var _b = Object.getOwnPropertyDescriptor, Ab = (i, a, e, t) => {
30739
30735
  for (var r = t > 1 ? void 0 : t ? _b(a, e) : a, n = i.length - 1, s; n >= 0; n--)
30740
30736
  (s = i[n]) && (r = s(r) || r);
30741
30737
  return r;
30742
30738
  }, en = (i, a) => (e, t) => a(e, t, i);
30743
- let jn = class extends Oe {
30739
+ let xn = class extends Oe {
30744
30740
  constructor(i, a, e) {
30745
30741
  super(), this._commandService = i, this._dependencyManagerService = a, this._featureCalculationManagerService = e, this._initialize();
30746
30742
  }
@@ -30816,18 +30812,18 @@ let jn = class extends Oe {
30816
30812
  this._dependencyManagerService.removeFormulaDependencyByDefinedName(e, t);
30817
30813
  }
30818
30814
  };
30819
- jn = Ab([
30815
+ xn = Ab([
30820
30816
  en(0, ar),
30821
30817
  en(1, Ur),
30822
- en(1, Kn),
30818
+ en(1, qn),
30823
30819
  en(2, Ur)
30824
- ], jn);
30820
+ ], xn);
30825
30821
  var Eb = Object.getOwnPropertyDescriptor, bb = (i, a, e, t) => {
30826
30822
  for (var r = t > 1 ? void 0 : t ? Eb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
30827
30823
  (s = i[n]) && (r = s(r) || r);
30828
30824
  return r;
30829
30825
  }, ki = (i, a) => (e, t) => a(e, t, i);
30830
- let Un = class extends Oe {
30826
+ let jn = class extends Oe {
30831
30827
  constructor(i, a) {
30832
30828
  super(), this._commandService = i, this._featureCalculationManagerService = a, this._initialize();
30833
30829
  }
@@ -30854,16 +30850,16 @@ let Un = class extends Oe {
30854
30850
  );
30855
30851
  }
30856
30852
  };
30857
- Un = bb([
30853
+ jn = bb([
30858
30854
  ki(0, ar),
30859
30855
  ki(1, Ur)
30860
- ], Un);
30856
+ ], jn);
30861
30857
  var yb = Object.getOwnPropertyDescriptor, Rb = (i, a, e, t) => {
30862
30858
  for (var r = t > 1 ? void 0 : t ? yb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
30863
30859
  (s = i[n]) && (r = s(r) || r);
30864
30860
  return r;
30865
- }, ys = (i, a) => (e, t) => a(e, t, i);
30866
- let vn = class extends Oe {
30861
+ }, bs = (i, a) => (e, t) => a(e, t, i);
30862
+ let Un = class extends Oe {
30867
30863
  constructor(i, a, e) {
30868
30864
  super(), this._commandService = i, this._otherFormulaManagerService = a, this._dependencyManagerService = e, this._initialize();
30869
30865
  }
@@ -30892,11 +30888,11 @@ let vn = class extends Oe {
30892
30888
  );
30893
30889
  }
30894
30890
  };
30895
- vn = Rb([
30896
- ys(0, ar),
30897
- ys(1, Oa),
30898
- ys(2, Kn)
30899
- ], vn);
30891
+ Un = Rb([
30892
+ bs(0, ar),
30893
+ bs(1, Oa),
30894
+ bs(2, qn)
30895
+ ], Un);
30900
30896
  class pb extends Oe {
30901
30897
  constructor() {
30902
30898
  super(...arguments);
@@ -30926,13 +30922,13 @@ class pb extends Oe {
30926
30922
  this._tableOptionMap.set(e, t);
30927
30923
  }
30928
30924
  }
30929
- const $u = lt("univer.formula.super-table.service");
30925
+ const $u = ft("univer.formula.super-table.service");
30930
30926
  var Vb = Object.getOwnPropertyDescriptor, Nb = (i, a, e, t) => {
30931
30927
  for (var r = t > 1 ? void 0 : t ? Vb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
30932
30928
  (s = i[n]) && (r = s(r) || r);
30933
30929
  return r;
30934
30930
  }, $i = (i, a) => (e, t) => a(e, t, i);
30935
- let Tn = class extends Oe {
30931
+ let vn = class extends Oe {
30936
30932
  constructor(i, a) {
30937
30933
  super(), this._commandService = i, this._superTableService = a, this._initialize();
30938
30934
  }
@@ -30965,10 +30961,10 @@ let Tn = class extends Oe {
30965
30961
  );
30966
30962
  }
30967
30963
  };
30968
- Tn = Nb([
30964
+ vn = Nb([
30969
30965
  $i(0, ar),
30970
30966
  $i(1, $u)
30971
- ], Tn);
30967
+ ], vn);
30972
30968
  class Ob extends Oe {
30973
30969
  constructor() {
30974
30970
  super(...arguments);
@@ -30993,7 +30989,7 @@ class Ob extends Oe {
30993
30989
  return this._dirtyConversionMap;
30994
30990
  }
30995
30991
  }
30996
- const Mb = lt(
30992
+ const Mb = ft(
30997
30993
  "univer.formula.active-dirty-manager.service"
30998
30994
  );
30999
30995
  var Sb = Object.getOwnPropertyDescriptor, wb = (i, a, e, t) => {
@@ -31002,8 +30998,8 @@ var Sb = Object.getOwnPropertyDescriptor, wb = (i, a, e, t) => {
31002
30998
  return r;
31003
30999
  }, Yi = (i, a) => (e, t) => a(e, t, i);
31004
31000
  const Db = "UNIVER_ENGINE_FORMULA_PLUGIN";
31005
- var Rs;
31006
- let Hi = (Rs = class extends nc {
31001
+ var ys;
31002
+ let Hi = (ys = class extends nc {
31007
31003
  constructor(i = fi, a, e) {
31008
31004
  super(), this._config = i, this._injector = a, this._configService = e;
31009
31005
  const { ...t } = sc(
@@ -31018,19 +31014,19 @@ let Hi = (Rs = class extends nc {
31018
31014
  }
31019
31015
  onReady() {
31020
31016
  var i;
31021
- is(this._injector, [
31022
- [xn],
31023
- [Tn]
31024
- ]), (i = this._config) != null && i.notExecuteFormula || is(this._injector, [
31025
- [vn],
31017
+ as(this._injector, [
31018
+ [Pn],
31019
+ [vn]
31020
+ ]), (i = this._config) != null && i.notExecuteFormula || as(this._injector, [
31026
31021
  [Un],
31027
31022
  [jn],
31028
- [Dn]
31023
+ [xn],
31024
+ [wn]
31029
31025
  ]);
31030
31026
  }
31031
31027
  onRendered() {
31032
31028
  var i;
31033
- (i = this._config) != null && i.notExecuteFormula || is(this._injector, [
31029
+ (i = this._config) != null && i.notExecuteFormula || as(this._injector, [
31034
31030
  [Ks],
31035
31031
  [Ws]
31036
31032
  ]);
@@ -31039,7 +31035,7 @@ let Hi = (Rs = class extends nc {
31039
31035
  const i = !this._config.notExecuteFormula, a = [
31040
31036
  // Services
31041
31037
  [Yt, { useClass: Gf }],
31042
- [pr, { useClass: ws }],
31038
+ [pr, { useClass: Ss }],
31043
31039
  [Mb, { useClass: Ob }],
31044
31040
  [$u, { useClass: pb }],
31045
31041
  [ku],
@@ -31048,35 +31044,35 @@ let Hi = (Rs = class extends nc {
31048
31044
  // Engine
31049
31045
  [ga],
31050
31046
  //Controllers
31051
- [xn],
31052
- [Tn],
31047
+ [Pn],
31048
+ [vn],
31053
31049
  [na]
31054
31050
  ];
31055
31051
  i && a.push(
31056
31052
  // Services
31057
31053
  [Oa, { useClass: Nh }],
31058
31054
  [Ot, { useClass: Ys }],
31059
- [Ft, { useClass: Ps }],
31055
+ [Ft, { useClass: Ls }],
31060
31056
  [Ur, { useClass: Vh }],
31061
31057
  //Controller
31062
- [Dn],
31063
- [vn],
31064
- [jn],
31058
+ [wn],
31065
31059
  [Un],
31060
+ [xn],
31061
+ [jn],
31066
31062
  // Calculation engine
31067
31063
  [_r],
31068
31064
  [jr],
31069
31065
  [dr],
31070
31066
  // AstNode factory
31071
31067
  [No],
31068
+ [pn],
31072
31069
  [Vn],
31073
- [Nn],
31074
31070
  [Do],
31071
+ [Nn],
31072
+ [Rn],
31075
31073
  [On],
31076
- [pn],
31077
31074
  [Mn],
31078
31075
  [Sn],
31079
- [wn],
31080
31076
  [Lo]
31081
31077
  ), a.forEach((e) => this._injector.add(e));
31082
31078
  }
@@ -31084,11 +31080,11 @@ let Hi = (Rs = class extends nc {
31084
31080
  var i;
31085
31081
  (i = this._config) != null && i.notExecuteFormula || [
31086
31082
  [Ks, { useClass: Xs }],
31087
- [Kn, { useClass: ph }],
31083
+ [qn, { useClass: ph }],
31088
31084
  [Ws, { useClass: qs }]
31089
31085
  ].forEach((e) => this._injector.add(e));
31090
31086
  }
31091
- }, A(Rs, "pluginName", Db), Rs);
31087
+ }, A(ys, "pluginName", Db), ys);
31092
31088
  Hi = wb([
31093
31089
  Yi(1, Ve(Gi)),
31094
31090
  Yi(2, ia)
@@ -31102,15 +31098,15 @@ export {
31102
31098
  Hb as AsyncCustomFunction,
31103
31099
  Uf as AsyncObject,
31104
31100
  V as BaseFunction,
31105
- Qn as BaseReferenceObject,
31101
+ Gn as BaseReferenceObject,
31106
31102
  kt as BaseValueObject,
31107
31103
  er as BooleanValue,
31108
31104
  T as BooleanValueObject,
31109
- Dn as CalculateController,
31105
+ wn as CalculateController,
31110
31106
  Xs as CalculateFormulaService,
31111
31107
  Rm as CustomFunction,
31112
31108
  Ph as DEFAULT_INTERVAL_COUNT,
31113
- ws as DefinedNamesService,
31109
+ Ss as DefinedNamesService,
31114
31110
  Rh as DependencyManagerBaseService,
31115
31111
  ph as DependencyManagerService,
31116
31112
  $b as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
@@ -31134,23 +31130,23 @@ export {
31134
31130
  lb as FUNCTION_NAMES_UNIVER,
31135
31131
  Fu as FUNCTION_NAMES_WEB,
31136
31132
  Vh as FeatureCalculationManagerService,
31137
- Ps as FormulaCurrentConfigService,
31133
+ Ls as FormulaCurrentConfigService,
31138
31134
  Pr as FormulaDataModel,
31139
31135
  qs as FormulaDependencyGenerator,
31140
- _s as FormulaDependencyTree,
31136
+ Cs as FormulaDependencyTree,
31141
31137
  Qs as FormulaDependencyTreeType,
31142
31138
  Mi as FormulaDependencyTreeVirtual,
31143
31139
  Xe as FormulaExecuteStageType,
31144
31140
  wr as FormulaExecutedStateType,
31145
31141
  Ys as FormulaRuntimeService,
31146
- Vn as FunctionNodeFactory,
31142
+ pn as FunctionNodeFactory,
31147
31143
  Gf as FunctionService,
31148
31144
  mc as FunctionType,
31149
31145
  ku as GlobalComputingStatusService,
31150
31146
  Mb as IActiveDirtyManagerService,
31151
31147
  Ks as ICalculateFormulaService,
31152
31148
  pr as IDefinedNamesService,
31153
- Kn as IDependencyManagerService,
31149
+ qn as IDependencyManagerService,
31154
31150
  Ur as IFeatureCalculationManagerService,
31155
31151
  Ft as IFormulaCurrentConfigService,
31156
31152
  Ws as IFormulaDependencyGenerator,
@@ -31159,7 +31155,7 @@ export {
31159
31155
  Oa as IOtherFormulaManagerService,
31160
31156
  $u as ISuperTableService,
31161
31157
  _r as Interpreter,
31162
- Nn as LambdaNodeFactory,
31158
+ Vn as LambdaNodeFactory,
31163
31159
  Do as LambdaParameterNodeFactory,
31164
31160
  Na as LambdaValueObjectObject,
31165
31161
  dr as Lexer,
@@ -31167,21 +31163,21 @@ export {
31167
31163
  ga as LexerTreeBuilder,
31168
31164
  ie as NullValueObject,
31169
31165
  y as NumberValueObject,
31170
- On as OperatorNodeFactory,
31166
+ Nn as OperatorNodeFactory,
31171
31167
  Nh as OtherFormulaManagerService,
31172
- pn as PrefixNodeFactory,
31173
- yn as RangeReferenceObject,
31174
- Mn as ReferenceNodeFactory,
31168
+ Rn as PrefixNodeFactory,
31169
+ bn as RangeReferenceObject,
31170
+ On as ReferenceNodeFactory,
31175
31171
  jc as RegisterFunctionMutation,
31176
31172
  ro as RemoveDefinedNameMutation,
31177
31173
  fa as RemoveFeatureCalculationMutation,
31178
31174
  ma as RemoveOtherFormulaMutation,
31179
31175
  qc as RemoveSuperTableMutation,
31180
- Ns as SetArrayFormulaDataMutation,
31176
+ Vs as SetArrayFormulaDataMutation,
31181
31177
  ca as SetDefinedNameMutation,
31182
31178
  kb as SetDefinedNameMutationFactory,
31183
31179
  la as SetFeatureCalculationMutation,
31184
- dn as SetFormulaCalculationNotificationMutation,
31180
+ gn as SetFormulaCalculationNotificationMutation,
31185
31181
  ao as SetFormulaCalculationResultMutation,
31186
31182
  no as SetFormulaCalculationStartMutation,
31187
31183
  so as SetFormulaCalculationStopMutation,
@@ -31190,16 +31186,16 @@ export {
31190
31186
  Wc as SetSuperTableMutation,
31191
31187
  oo as SetSuperTableOptionMutation,
31192
31188
  j as StringValueObject,
31193
- Sn as SuffixNodeFactory,
31189
+ Mn as SuffixNodeFactory,
31194
31190
  pb as SuperTableService,
31195
- wn as UnionNodeFactory,
31191
+ Sn as UnionNodeFactory,
31196
31192
  Hi as UniverFormulaEnginePlugin,
31197
31193
  Lo as ValueNodeFactory,
31198
31194
  Vt as ValueObjectFactory,
31199
31195
  $ as compareToken,
31200
31196
  yc as convertUnitDataToRuntime,
31201
31197
  Uh as deserializeRangeForR1C1,
31202
- gn as deserializeRangeWithSheet,
31198
+ mn as deserializeRangeWithSheet,
31203
31199
  gr as deserializeRangeWithSheetWithCache,
31204
31200
  Ih as functionArray,
31205
31201
  Em as functionCompatibility,
@@ -31240,10 +31236,10 @@ export {
31240
31236
  X as operatorToken,
31241
31237
  $e as sequenceNodeType,
31242
31238
  hr as serializeRange,
31243
- Os as serializeRangeToRefString,
31239
+ Ns as serializeRangeToRefString,
31244
31240
  Tc as serializeRangeWithSheet,
31245
31241
  Bc as serializeRangeWithSpreadsheet,
31246
- us as singleReferenceToGrid,
31242
+ os as singleReferenceToGrid,
31247
31243
  yi as strip,
31248
31244
  Mf as stripErrorMargin
31249
31245
  };