@sheetxl/sdk 0.8.0-beta.11 → 0.8.0-beta.12

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.
Files changed (191) hide show
  1. package/browser/esm/{BpgskG1Er_lGQ_yS.mjs → -Jx-jNHmtIQQfLvK.mjs} +1 -1
  2. package/browser/esm/{BLoUBId2xZpXAK_H.mjs → 2WuhYrIpYmOR5H73.mjs} +15 -15
  3. package/browser/esm/{Ctjb0SsxV4K4MMqG.mjs → 2mIwPy2D2JUX-9wx.mjs} +2 -2
  4. package/browser/esm/{CkxWugaJFjDGZNZ-.mjs → B3wf5vZCsWfWsDbj.mjs} +1 -1
  5. package/browser/esm/{BjkCiv5Jz6WYKZeu.mjs → BIHrHjRGWVlJglcp.mjs} +2 -2
  6. package/browser/esm/{BtvLTTfSBdAKplVG.mjs → BTFBedJMRWGvZyCE.mjs} +1 -1
  7. package/browser/esm/{C4MqfLn9Dm-l3OIk.mjs → BdCJNawfifyPupCP.mjs} +1 -1
  8. package/browser/esm/{CV5EGEjG5_-CPpP0.mjs → Bg5Di9GLNAkbqQ1P.mjs} +3 -3
  9. package/browser/esm/{C2VbEI_XVAoseAwa.mjs → BnC4-27Igwb8oDf2.mjs} +2 -2
  10. package/browser/esm/{CQYjO777cmAznUzK.mjs → Bt8_m94tBdks209L.mjs} +1 -1
  11. package/browser/esm/{C16ycKja6zG0crV_.mjs → BudSIfXBAsTxvu-K.mjs} +17836 -15712
  12. package/browser/esm/{DvAaxH6z_tGvrRzl.mjs → C9u8FUewte5ugUjH.mjs} +686 -686
  13. package/browser/esm/{DEiPS3Dr-s4fPbVZ.mjs → CBYMTDzMf1Vh7pkw.mjs} +1 -1
  14. package/browser/esm/{Dyq_ivuHvlXLwPCl.mjs → CNdjyofiRu6CYOrr.mjs} +1106 -1102
  15. package/browser/esm/{PcHFjNzQsE54POri.mjs → CRkYR-siY2C994KV.mjs} +1 -1
  16. package/browser/esm/{C5E6zSGAALWf61n4.mjs → CTe2qfmIUEad6FJv.mjs} +2 -2
  17. package/browser/esm/{BoV6zPBnfqCBCqZ7.mjs → CUzYuYTTGsChC_kZ.mjs} +3841 -3148
  18. package/browser/esm/CdEO8CEee6lEhabA.mjs +117 -0
  19. package/browser/esm/{S2dNNx1a5ydRnARM.mjs → CfRqiPDg6RBTg1EN.mjs} +2 -2
  20. package/browser/esm/{ClbvFbFzFzXLBKNN.mjs → CndRBvVfQUJIYRRj.mjs} +50 -50
  21. package/browser/esm/{BnG31I6Oj_HEtSPS.mjs → CwOPLXU3-9ZHGyOT.mjs} +1 -1
  22. package/browser/esm/{CHU6iu_WGlm7fLET.mjs → Cxjxk0ncRKx80I-w.mjs} +1 -1
  23. package/browser/esm/D2RZh0O9neOsyLAE.mjs +281 -0
  24. package/browser/esm/{BkBhLS0l6z8sxI6D.mjs → D64dM68B1pKYFzdP.mjs} +2 -2
  25. package/browser/esm/{BVDiOXGMc5_FMGfy.mjs → D9xNz46kAfXMZzp4.mjs} +2 -2
  26. package/browser/esm/{zlLuW405RSguy4Kn.mjs → DK899HhWX1HINMC1.mjs} +53 -53
  27. package/browser/esm/{B7aUIvgUjncMMD_i.mjs → DPhGQLNGmDZwODwJ.mjs} +5 -4
  28. package/browser/esm/{gssVX_FH1XFN-twD.mjs → DVroRnhi-5IDXNgM.mjs} +1 -1
  29. package/{node/esm/CZICGK_ss0HoGHCP.mjs → browser/esm/DZiivy0NmO1Vnyzk.mjs} +2 -2
  30. package/browser/esm/{ClPfI4lODvCece29.mjs → DgrAuRD2qr2DvFeJ.mjs} +61 -61
  31. package/browser/esm/{CU3DmJ-YnVVrC1_k.mjs → DobHLF6VjHr7Xi40.mjs} +1 -1
  32. package/browser/esm/{CaB7J-xgfKO2uAkG.mjs → DwZCT7DZiiXoTweg.mjs} +2 -2
  33. package/browser/esm/{BMyDRQ716j79h_bH.mjs → DwwR3O2sEZApPSTF.mjs} +6 -6
  34. package/browser/esm/{DLLE0FZNsKxbBzRn.mjs → Tah7cnFb_HNZdLtj.mjs} +45 -45
  35. package/browser/esm/{Dlmig06rIo7cInRk.mjs → fXWUMDhZ5yMSO629.mjs} +1 -1
  36. package/browser/esm/{DWNzqw7DUKwoxjri.mjs → hCQJcmIzPDxDEv2q.mjs} +2 -2
  37. package/browser/esm/index.mjs +679 -542
  38. package/browser/esm/{BFagR2JeWs74iAG3.mjs → qO-ujUrgq6H3TQix.mjs} +1 -1
  39. package/browser/esm/w6Jea0TiclPrYZ2M.mjs +1703 -0
  40. package/browser/esm/yuhcOYw6SHQ-RCm3.mjs +114 -0
  41. package/node/esm/-TA0MneBDKdGhsib.mjs +8668 -0
  42. package/node/esm/{B21JjOLghRoDOrkx.mjs → B-HUPAcqvK0eeeCz.mjs} +1 -1
  43. package/node/esm/{DNRhGK-8Tr9xcRyc.mjs → BL2iiEoqxDEV2Xrg.mjs} +3 -3
  44. package/node/esm/{D1TKBVmoKGAXf37B.mjs → BNXLOEddJ6O9gYws.mjs} +2 -2
  45. package/node/esm/{BrCKGFRsX_ezFJ4B.mjs → BSvOluusoDM4z_dx.mjs} +15 -15
  46. package/node/esm/{BIwObuhTJYf0jpUa.mjs → BskP3b8vUoIOGLY6.mjs} +2 -2
  47. package/node/esm/{2Kihw_-5lVTEnwMa.mjs → Btw4148Ot8ifhNc1.mjs} +1 -1
  48. package/node/esm/{BqiexuA89caYnAPz.mjs → C14-R6tifRh7pc0p.mjs} +1 -1
  49. package/node/esm/{DUTskXCXref-IJnI.mjs → C99zzq8DImQXi4BQ.mjs} +47 -47
  50. package/node/esm/{D8zEN-6ZdDqDvTxM.mjs → CBuEu5Jk-LfaDy-H.mjs} +61 -61
  51. package/node/esm/{yavzZOiZW_EjG9lE.mjs → CG-qBU5BAaVz7e-P.mjs} +1 -1
  52. package/node/esm/CPI58duc0j0a-HpJ.mjs +115 -0
  53. package/node/esm/{CCN5vD410obwdz38.mjs → CRt3vXe6YmXzqk3H.mjs} +15 -14
  54. package/node/esm/{CzXT00vrQa1_gvW9.mjs → C_aL7CGS1lrNn1Ng.mjs} +1 -1
  55. package/node/esm/{CZiqiay42tFTrLI4.mjs → C_xf5Bz30VqiJjXn.mjs} +1 -1
  56. package/node/esm/{BIRq1kT7lLRzns9t.mjs → CiIymQN6aJCul62g.mjs} +9 -9
  57. package/node/esm/{CNCNJNg890KdgkWh.mjs → Ci_zLYmCD7e-C79O.mjs} +1 -1
  58. package/{browser/esm/D5np__Jb1euAyaLw.mjs → node/esm/CkRYLed8Mmn3giNg.mjs} +2 -2
  59. package/node/esm/D3ptRKzASqBut1DE.mjs +117 -0
  60. package/node/esm/{cGwrLA1RCE-WhJ7w.mjs → D4ROK9UwDpS6jO3Z.mjs} +1 -1
  61. package/node/esm/{mFiBSM7XgBHV9AY7.mjs → D8hO07ToAibIuniw.mjs} +1535 -1531
  62. package/node/esm/{CDHdgJXH2vS71WMc.mjs → DUTmDHbFbhLDT4F3.mjs} +1 -1
  63. package/node/esm/{CGp6VZL-gZa9Uezx.mjs → DV5CU37aEbFbWFL0.mjs} +1 -1
  64. package/node/esm/{De2IONBxQhz-Qbyh.mjs → DdoiuKg9BKubtF1V.mjs} +1 -1
  65. package/node/esm/{Db0v7zXNnyjBIjjI.mjs → DggQ23jKMpwhENfa.mjs} +2 -2
  66. package/node/esm/{CwePQwTILHHjGDkZ.mjs → DhS6yWjrrSNIJMsn.mjs} +204 -204
  67. package/node/esm/{D_t5AUxSm7_icjzq.mjs → DhTya_mhmN53vskv.mjs} +1 -1
  68. package/node/esm/{DOU54VsOjG-m-NyQ.mjs → Dn1M7YWi25DeeYUb.mjs} +1 -1
  69. package/node/esm/{DkwIPzKc3UwdUIfM.mjs → DrCf6ITcBhVOFpRj.mjs} +6 -6
  70. package/node/esm/{D2KBymQJd1XhpeQD.mjs → DxazKtROyaI51dWl.mjs} +1 -1
  71. package/node/esm/{D6e2z7eZpxOJXHc7.mjs → Q_S1g46ZOTrdhTae.mjs} +1 -1
  72. package/node/esm/{OVfaSb506tNSIvbv.mjs → Vocy-I9dKzZMr0Ct.mjs} +19038 -16822
  73. package/node/esm/ZXPFcsT2zrALCZux.mjs +289 -0
  74. package/node/esm/{857CIBgQgGpnqrXk.mjs → eimUGjiIP-b8HiM6.mjs} +55 -55
  75. package/node/esm/{Bbf1Pm9Gk7YpLTvg.mjs → icn2nX5Z8e_3mNAv.mjs} +1 -1
  76. package/node/esm/index.mjs +740 -603
  77. package/node/esm/{Ct3h15sCus4Tgt6M.mjs → lGJ42sHqg5if2bba.mjs} +624 -616
  78. package/node/esm/{CdJHUJSBRHZoryPe.mjs → pYtP7wPyS96NQyXS.mjs} +59 -59
  79. package/package.json +6 -6
  80. package/resources/locales/de/model.msg.json +8 -2
  81. package/resources/locales/en/model.msg.json +9 -2
  82. package/types/scripting-api.json +10619 -10446
  83. package/types/scripting-enums.json +20 -1
  84. package/types/scripting.d.ts +1233 -296
  85. package/types/src/{sheet → anomalies}/_Anomalies.d.ts +3 -3
  86. package/types/src/anomalies/_FocusTable.d.ts +11 -0
  87. package/types/src/{sheet/_AnomalyFormulaChecks.d.ts → anomalies/_FormulaChecks.d.ts} +10 -2
  88. package/types/src/{sheet/_AnomalyLabelChecks.d.ts → anomalies/_LabelChecks.d.ts} +1 -1
  89. package/types/src/anomalies/_LiteralChecks.d.ts +35 -0
  90. package/types/src/anomalies/_SeriesChecks.d.ts +13 -0
  91. package/types/src/calculation/Calculation.d.ts +47 -9
  92. package/types/src/calculation/ExternalBookBindings.d.ts +2 -3
  93. package/types/src/calculation/ICalculation.d.ts +96 -9
  94. package/types/src/calculation/NamedFormulaCollection.d.ts +104 -8
  95. package/types/src/calculation/_CloneBoundary.d.ts +1 -1
  96. package/types/src/calculation/compiler/ASTTypes.d.ts +6 -2
  97. package/types/src/calculation/compiler/Types.d.ts +8 -0
  98. package/types/src/calculation/engine/CalcBackend.d.ts +104 -6
  99. package/types/src/calculation/executor/CalcExecutor.d.ts +73 -22
  100. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +17 -1
  101. package/types/src/calculation/executor/_WhatIf.d.ts +50 -0
  102. package/types/src/calculation/formula/FormulaBlock.d.ts +4 -3
  103. package/types/src/calculation/formula/IFormulaBlock.d.ts +5 -0
  104. package/types/src/calculation/functions/_DataTableFunction.d.ts +14 -0
  105. package/types/src/calculation/grid/CalcGrid.d.ts +4 -6
  106. package/types/src/calculation/grid/CalcGridBackend.d.ts +5 -27
  107. package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -2
  108. package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
  109. package/types/src/calculation/grid/ICalcGrid.d.ts +16 -12
  110. package/types/src/calculation/grid/_CalcRequest.d.ts +17 -5
  111. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
  112. package/types/src/calculation/spatial/SpillEntry.d.ts +16 -2
  113. package/types/src/calculation/state/CalcNode.d.ts +0 -1
  114. package/types/src/calculation/state/CalcScope.d.ts +29 -0
  115. package/types/src/calculation/state/CalcState.d.ts +26 -4
  116. package/types/src/calculation/state/CalculationContext.d.ts +28 -1
  117. package/types/src/calculation/state/DeferredCalls.d.ts +260 -0
  118. package/types/src/calculation/state/IContextContainer.d.ts +20 -0
  119. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +6 -0
  120. package/types/src/calculation/state/_WhatIfLayer.d.ts +91 -0
  121. package/types/src/cell/ICell.d.ts +53 -34
  122. package/types/src/cellControl/CellControl.d.ts +67 -0
  123. package/types/src/cellControl/CellControlCollection.d.ts +29 -0
  124. package/types/src/cellControl/CellControlRegistry.d.ts +47 -0
  125. package/types/src/cellControl/ICellControl.d.ts +99 -0
  126. package/types/src/cellControl/ICellControlCollection.d.ts +67 -0
  127. package/types/src/cellControl/index.d.ts +4 -0
  128. package/types/src/cellRange/ICellRange.d.ts +207 -59
  129. package/types/src/cellRange/ICellRanges.d.ts +4 -3
  130. package/types/src/chart/layout/ChartLayout.d.ts +5 -1
  131. package/types/src/chart/resolve/_Resolve.d.ts +10 -0
  132. package/types/src/chart/resolve/_ResolvedChart.d.ts +5 -2
  133. package/types/src/collections/ISparseGrid.d.ts +11 -2
  134. package/types/src/collections/MixedTypedArrayList.d.ts +8 -2
  135. package/types/src/collections/SparseGrid.d.ts +3 -8
  136. package/types/src/condition/AnchoredConditional.d.ts +2 -2
  137. package/types/src/externalBook/IExternalBook.d.ts +3 -4
  138. package/types/src/fetch/Fetcher.d.ts +15 -0
  139. package/types/src/fetch/IFetcher.d.ts +47 -0
  140. package/types/src/fetch/_WorkbookFetch.d.ts +43 -0
  141. package/types/src/fetch/index.d.ts +3 -0
  142. package/types/src/fill/PaintUtils.d.ts +3 -1
  143. package/types/src/hyperlink/IHyperlink.d.ts +10 -0
  144. package/types/src/hyperlink/_Hyperlink.d.ts +4 -1
  145. package/types/src/index.d.ts +2 -1
  146. package/types/src/named/INamedCollection.d.ts +36 -0
  147. package/types/src/named/NamedCollection.d.ts +18 -0
  148. package/types/src/primitives/AsyncValue.d.ts +58 -0
  149. package/types/src/resource/IResource.d.ts +9 -0
  150. package/types/src/resource/IResourceCollection.d.ts +4 -0
  151. package/types/src/resource/Resource.d.ts +2 -0
  152. package/types/src/resource/_AddResource.d.ts +13 -0
  153. package/types/src/richData/CellImage.d.ts +95 -0
  154. package/types/src/richData/Hyperlink.d.ts +49 -0
  155. package/types/src/richData/IRichDataCollection.d.ts +76 -0
  156. package/types/src/richData/IRichDataKind.d.ts +55 -11
  157. package/types/src/richData/RichArray.d.ts +42 -0
  158. package/types/src/richData/RichDataCollection.d.ts +23 -0
  159. package/types/src/richData/RichDataRegistry.d.ts +46 -14
  160. package/types/src/richData/RichDataValues.d.ts +20 -0
  161. package/types/src/richData/RichRecord.d.ts +68 -0
  162. package/types/src/richData/RichText.d.ts +5 -5
  163. package/types/src/richData/index.d.ts +6 -0
  164. package/types/src/scripting/FunctionArguments.d.ts +17 -1
  165. package/types/src/scripting/FunctionCollection.d.ts +8 -0
  166. package/types/src/scripting/Scripts.d.ts +10 -0
  167. package/types/src/scripting/TypedFunction.d.ts +2 -0
  168. package/types/src/sheet/ICellContainerOptions.d.ts +6 -0
  169. package/types/src/sheet/IWorksheet.d.ts +24 -17
  170. package/types/src/sheet/SheetCell.d.ts +17 -1
  171. package/types/src/sheet/SheetRange.d.ts +8 -2
  172. package/types/src/sheet/SheetRanges.d.ts +2 -2
  173. package/types/src/sheet/Worksheet.d.ts +110 -56
  174. package/types/src/sheet/_ListenerAnchor.d.ts +7 -1
  175. package/types/src/sheet/_ScalarListFactory.d.ts +54 -6
  176. package/types/src/sheet/_SheetMutations.d.ts +4 -1
  177. package/types/src/sheet/_SheetStateTypes.d.ts +23 -11
  178. package/types/src/workbook/IWorkbook.d.ts +40 -1
  179. package/types/src/workbook/Workbook.d.ts +25 -3
  180. package/types/src/workbook/WorkbookRanges.d.ts +1 -1
  181. package/browser/esm/BGOFfpxr2jPIdqmV.mjs +0 -40
  182. package/browser/esm/f1IoRb7tEb0QmCSt.mjs +0 -110
  183. package/browser/esm/nvU0ClAbf0g94YBK.mjs +0 -1695
  184. package/node/esm/B084DssTcdBheTp_.mjs +0 -7966
  185. package/node/esm/Df1bL6VFvrqIdSLB.mjs +0 -40
  186. package/node/esm/DrTZbfemSLq2mseG.mjs +0 -111
  187. package/types/src/dataTable/DataTable.d.ts +0 -67
  188. package/types/src/dataTable/DataTableCollection.d.ts +0 -19
  189. package/types/src/dataTable/IDataTable.d.ts +0 -99
  190. package/types/src/dataTable/IDataTableCollection.d.ts +0 -18
  191. package/types/src/dataTable/index.d.ts +0 -6
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.11
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { An as e, Bn as t, Dn as s, Fn as r, Gn as i, Hn as n, In as o, Jn as a, Kn as h, Ln as l, Nn as u, Pn as c, Rn as p, Tn as g, Un as m, Vn as O, Wn as _, Xn as E, Yn as L, Zn as f, dr as A, ir as C, jn as T, kn as N, nr as U, or as S, qn as d, rr as x, sr as R, zn as I } from "./OVfaSb506tNSIvbv.mjs";
7
+ import { $n as e, Bn as t, Gn as s, Hn as r, In as i, Jn as n, Kn as o, Pn as a, Qn as h, Rn as l, Un as u, Wn as c, Xn as p, Yn as g, Zn as m, ar as O, br as _, dr as E, er as L, fr as f, gr as A, hr as C, ir as T, nr as N, or as U, pr as S, qn as d, rr as x, tr as R, zn as I } from "./Vocy-I9dKzZMr0Ct.mjs";
8
8
  import { FormulaError as M } from "@sheetxl/primitives";
9
9
  import { EOF as P, EmbeddedActionsParser as b, Lexer as v, createToken as k, defaultParserErrorProvider as w } from "chevrotain";
10
10
  var y = class e {
11
11
  static shared(t) {
12
- const s = t?.locale ?? R, r = t?.maxColumn ?? D, i = t?.maxRow ?? G;
12
+ const s = t?.locale ?? A, r = t?.maxColumn ?? D, i = t?.maxRow ?? G;
13
13
  let n = $.get(s);
14
14
  n || (n = /* @__PURE__ */ new Map(), $.set(s, n));
15
15
  const o = `${r}:${i}`;
@@ -21,7 +21,7 @@ var y = class e {
21
21
  }), n.set(o, a)), a;
22
22
  }
23
23
  constructor(e) {
24
- const t = e?.maxColumn ?? D, s = e?.maxRow ?? G, r = e?.locale ?? R;
24
+ const t = e?.maxColumn ?? D, s = e?.maxRow ?? G, r = e?.locale ?? A;
25
25
  this._locale = r, this._maxColumn = t, this._maxRow = s;
26
26
  const { separatorFunction: i, separatorColumn: n, separatorRow: o, separatorDecimal: a } = r.separators;
27
27
  if (n === o) throw new Error(`FormulaLexer: separatorColumn and separatorRow must differ (both '${n}')`);
@@ -37,12 +37,12 @@ var y = class e {
37
37
  pattern: /[a-zA-Z_\u007F-\uFFFF]+[a-zA-Z0-9_.\u007F-\uFFFF]*(?=\()/
38
38
  }), c = k({
39
39
  name: "TableReference",
40
- pattern: { exec: x },
40
+ pattern: { exec: f },
41
41
  line_breaks: !1,
42
42
  start_chars_hint: B
43
43
  }), p = k({
44
44
  name: "BracketedString",
45
- pattern: { exec: U },
45
+ pattern: { exec: E },
46
46
  line_breaks: !1,
47
47
  start_chars_hint: [91],
48
48
  longer_alt: [c, l]
@@ -69,20 +69,20 @@ var y = class e {
69
69
  }), _ = k({
70
70
  name: "RefError",
71
71
  pattern: new RegExp(g(r.errorRefs) + ["#REF!", "#NAME\\?"].map(m).join("|"))
72
- }), E = k({
72
+ }), L = k({
73
73
  name: "SingleQuotedString",
74
74
  pattern: /'(''|[^'])*'/
75
- }), L = k({
75
+ }), C = k({
76
76
  name: "SheetQuoted",
77
77
  pattern: /'(?:''|[^'])*?'!/
78
- }), f = k({
78
+ }), T = k({
79
79
  name: "Sheet",
80
80
  pattern: /[A-Za-z_.\d\u007F-\uFFFF]*!/
81
- }), A = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, C = k({
81
+ }), N = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, U = k({
82
82
  name: "NamedToken",
83
83
  pattern: { exec: (e, t) => {
84
- A.lastIndex = t;
85
- const s = A.exec(e);
84
+ N.lastIndex = t;
85
+ const s = N.exec(e);
86
86
  if (!s) return null;
87
87
  let r = s[0];
88
88
  const i = r.indexOf(".:");
@@ -90,24 +90,24 @@ var y = class e {
90
90
  } },
91
91
  line_breaks: !1,
92
92
  start_chars_hint: B
93
- }), T = k({
93
+ }), S = k({
94
94
  name: "Cell",
95
95
  pattern: { exec: W(t, s) },
96
96
  line_breaks: !1,
97
97
  start_chars_hint: [36, ...F],
98
- longer_alt: C
99
- }), N = k({
98
+ longer_alt: U
99
+ }), d = k({
100
100
  name: "Column",
101
101
  pattern: { exec: z(t) },
102
102
  line_breaks: !1,
103
103
  start_chars_hint: [36, ...F],
104
- longer_alt: C
105
- }), S = k({
104
+ longer_alt: U
105
+ }), x = k({
106
106
  name: "AbsRow",
107
107
  pattern: /[$][0-9]+/
108
- }), d = "." === a ? "\\." : a, I = k({
108
+ }), R = "." === a ? "\\." : a, I = k({
109
109
  name: "NumberToken",
110
- pattern: new RegExp(`[0-9]+${d}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${d}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
110
+ pattern: new RegExp(`[0-9]+${R}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${R}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
111
111
  }), M = k({
112
112
  name: "ScientificDigit",
113
113
  pattern: /[0-9]+\*\*[+-]?[0-9]+/
@@ -134,10 +134,10 @@ var y = class e {
134
134
  }), j = k({
135
135
  name: "RangeOp",
136
136
  pattern: /:/
137
- }), Z = k({
137
+ }), Q = k({
138
138
  name: "RangeTrimFullOp",
139
139
  pattern: /\.:\./
140
- }), Q = k({
140
+ }), Z = k({
141
141
  name: "RangeTrimLeadingOp",
142
142
  pattern: /\.:/
143
143
  }), q = k({
@@ -198,9 +198,9 @@ var y = class e {
198
198
  }), ge = [
199
199
  h,
200
200
  l,
201
+ C,
201
202
  L,
202
- E,
203
- f,
203
+ T,
204
204
  u,
205
205
  c,
206
206
  p,
@@ -209,20 +209,20 @@ var y = class e {
209
209
  y,
210
210
  ...n !== i ? [$] : [],
211
211
  Y,
212
- Z,
213
212
  Q,
213
+ Z,
214
214
  q,
215
215
  j,
216
- T,
217
- w,
218
- N,
219
216
  S,
217
+ w,
218
+ d,
219
+ x,
220
220
  I,
221
221
  M,
222
222
  P,
223
223
  le,
224
224
  ne,
225
- C,
225
+ U,
226
226
  K,
227
227
  H,
228
228
  J,
@@ -355,9 +355,9 @@ function V(e) {
355
355
  return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
356
356
  }
357
357
  var j = class {
358
- constructor(e = R) {
358
+ constructor(e = A) {
359
359
  const t = function(e) {
360
- const t = [...g];
360
+ const t = [...a];
361
361
  if (e) for (const s of Object.values(e)) {
362
362
  const e = s?.trim();
363
363
  e && !t.some((t) => t.toLowerCase() === e.toLowerCase()) && t.push(e);
@@ -403,8 +403,8 @@ var j = class {
403
403
  tokenize(e) {
404
404
  return this._lexer.tokenize(e);
405
405
  }
406
- }, Z = class extends b {
407
- constructor(e = R) {
406
+ }, Q = class extends b {
407
+ constructor(e = A) {
408
408
  const t = new j(e), s = t.getVocabulary();
409
409
  super(s, {
410
410
  nodeLocationTracking: "none",
@@ -412,83 +412,83 @@ var j = class {
412
412
  skipValidations: !0,
413
413
  recoveryEnabled: !1
414
414
  }), this._lexer = t;
415
- const { TableSpecifier: r, BracketedColumn: i, BareSpecifier: n, ColumnSep: o, ListSep: a } = s, h = this;
416
- h.RULE("ruleContent", () => {
417
- const e = [], t = h.SUBRULE(h.ruleItem);
418
- return h.ACTION(() => {
415
+ const { TableSpecifier: r, BracketedColumn: i, BareSpecifier: n, ColumnSep: a, ListSep: h } = s, l = this;
416
+ l.RULE("ruleContent", () => {
417
+ const e = [], t = l.SUBRULE(l.ruleItem);
418
+ return l.ACTION(() => {
419
419
  t && e.push(t);
420
- }), h.MANY(() => {
421
- h.CONSUME(a), h.OPTION(() => {
422
- const t = h.SUBRULE2(h.ruleItem);
423
- h.ACTION(() => {
420
+ }), l.MANY(() => {
421
+ l.CONSUME(h), l.OPTION(() => {
422
+ const t = l.SUBRULE2(l.ruleItem);
423
+ l.ACTION(() => {
424
424
  t && e.push(t);
425
425
  });
426
426
  });
427
427
  }), e;
428
- }), h.RULE("ruleItem", () => h.OR([{ ALT: () => h.SUBRULE(h.ruleSpecifier) }, { ALT: () => h.SUBRULE(h.ruleColumnOrRange) }])), h.RULE("ruleSpecifier", () => h.OR([{ ALT: () => {
429
- const t = h.CONSUME(r);
430
- return h.ACTION(() => {
431
- const s = f(t.image, e);
428
+ }), l.RULE("ruleItem", () => l.OR([{ ALT: () => l.SUBRULE(l.ruleSpecifier) }, { ALT: () => l.SUBRULE(l.ruleColumnOrRange) }])), l.RULE("ruleSpecifier", () => l.OR([{ ALT: () => {
429
+ const t = l.CONSUME(r);
430
+ return l.ACTION(() => {
431
+ const s = U(t.image, e);
432
432
  return s.image = t.image, s;
433
433
  });
434
434
  } }, { ALT: () => {
435
- const t = h.CONSUME(n);
436
- return h.ACTION(() => {
437
- const s = f(t.image, e);
435
+ const t = l.CONSUME(n);
436
+ return l.ACTION(() => {
437
+ const s = U(t.image, e);
438
438
  return s.image = t.image, s;
439
439
  });
440
- } }])), h.RULE("ruleColumnOrRange", () => {
441
- const e = h.CONSUME(i);
440
+ } }])), l.RULE("ruleColumnOrRange", () => {
441
+ const e = l.CONSUME(i);
442
442
  let t, s;
443
- return h.OPTION(() => {
444
- t = h.CONSUME(o), s = h.CONSUME2(i);
445
- }), h.ACTION(() => {
446
- const r = L(e.image);
443
+ return l.OPTION(() => {
444
+ t = l.CONSUME(a), s = l.CONSUME2(i);
445
+ }), l.ACTION(() => {
446
+ const r = T(e.image);
447
447
  if (r.image = e.image, !s) return r;
448
- const i = L(s.image);
448
+ const i = T(s.image);
449
449
  i.image = s.image;
450
- const n = l(":", r, i, !0);
450
+ const n = o(":", r, i, !0);
451
451
  return n.image = t?.image ?? ":", n;
452
452
  });
453
- }), h.performSelfAnalysis();
453
+ }), l.performSelfAnalysis();
454
454
  }
455
455
  _parseInner(e) {
456
456
  const t = this._lexer.tokenize(e);
457
457
  return t.errors.length > 0 || 0 === t.tokens.length ? [] : (this.input = t.tokens, this.reset(), this.ruleContent() ?? []);
458
458
  }
459
- _parseContent(e) {
460
- if (!e) return [];
461
- const t = e.trim();
459
+ _parseContent(t) {
462
460
  if (!t) return [];
463
- const s = t[0];
464
- if ("@" === s) {
465
- const e = t.slice(1).trim();
466
- if (!e) {
467
- const e = _("@", null, !0);
468
- return e.image = "@", [e];
461
+ const s = t.trim();
462
+ if (!s) return [];
463
+ const r = s[0];
464
+ if ("@" === r) {
465
+ const t = s.slice(1).trim();
466
+ if (!t) {
467
+ const t = e("@", null, !0);
468
+ return t.image = "@", [t];
469
469
  }
470
- if ("[" === e.charAt(0)) {
471
- const t = this._parseInner(e);
472
- if (1 === t.length && "infix" === t[0].type) {
473
- const e = _("@", t[0], !0);
474
- return e.image = "@", [e];
470
+ if ("[" === t.charAt(0)) {
471
+ const s = this._parseInner(t);
472
+ if (1 === s.length && "infix" === s[0].type) {
473
+ const t = e("@", s[0], !0);
474
+ return t.image = "@", [t];
475
475
  }
476
476
  }
477
- const s = L(e);
478
- s.image = e;
479
- const r = _("@", s, !0);
480
- return r.image = "@", [r];
477
+ const r = T(t);
478
+ r.image = t;
479
+ const i = e("@", r, !0);
480
+ return i.image = "@", [i];
481
481
  }
482
- if ("[" !== s && "#" !== s) {
483
- const t = L(e);
484
- return t.image = e, [t];
482
+ if ("[" !== r && "#" !== r) {
483
+ const e = T(t);
484
+ return e.image = t, [e];
485
485
  }
486
- return this._parseInner(t);
486
+ return this._parseInner(s);
487
487
  }
488
488
  parse(e, t, s) {
489
489
  this.reset();
490
490
  const r = () => ({
491
- root: E("", []),
491
+ root: O("", []),
492
492
  errors: []
493
493
  });
494
494
  if (!s) return r();
@@ -501,11 +501,11 @@ var j = class {
501
501
  if (-1 === n) return r();
502
502
  const o = s.slice(0, n), a = s.slice(n + 1, -1), h = this._parseContent(a);
503
503
  return {
504
- root: E(o, h),
504
+ root: O(o, h),
505
505
  errors: this.errors.length > 0 ? [...this.errors] : []
506
506
  };
507
507
  }
508
- }, Q = /* @__PURE__ */ new Set([
508
+ }, Z = /* @__PURE__ */ new Set([
509
509
  ":",
510
510
  ".:.",
511
511
  ".:",
@@ -516,7 +516,7 @@ var j = class {
516
516
  ":."
517
517
  ]), K = (e) => {
518
518
  if (!e) return null;
519
- if (e.type === A.Cell) {
519
+ if (e.type === _.Cell) {
520
520
  const t = e.value;
521
521
  return t.rowIndex === Number.MIN_SAFE_INTEGER ? "col" : t.colIndex === Number.MIN_SAFE_INTEGER ? "row" : null;
522
522
  }
@@ -546,53 +546,53 @@ var te = {
546
546
  return e.expected === P && t ? `Unexpected '${t}'` : w.buildMismatchTokenMessage(e);
547
547
  }
548
548
  }, se = class extends b {
549
- constructor(g) {
550
- const E = g?.lexer ?? y.shared(g?.lexerOptions), L = E.getVocabulary();
551
- super(L, {
549
+ constructor(a) {
550
+ const l = a?.lexer ?? y.shared(a?.lexerOptions), O = l.getVocabulary();
551
+ super(O, {
552
552
  skipValidations: !0,
553
553
  recoveryEnabled: !0,
554
- ...g,
554
+ ...a,
555
555
  nodeLocationTracking: "full",
556
556
  errorMessageProvider: te,
557
557
  maxLookahead: 1
558
558
  }), this._ruleInfixOp = this.RULE("ruleInfixOp", () => {
559
- const { PlusOp: e, MinOp: t, MulOp: r, DivOp: i, ExOp: n, ConcatOp: o, GtOp: a, EqOp: h, LtOp: u, NeqOp: c, GteOp: p, LteOp: g } = this._vocab, m = [];
559
+ const { PlusOp: e, MinOp: t, MulOp: s, DivOp: r, ExOp: n, ConcatOp: a, GtOp: h, EqOp: l, LtOp: u, NeqOp: c, GteOp: p, LteOp: g } = this._vocab, m = [];
560
560
  return m.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
561
- const s = this.OR(this._c1 || (this._c1 = [
561
+ const i = this.OR(this._c1 || (this._c1 = [
562
562
  { ALT: () => this.CONSUME(e).image },
563
563
  { ALT: () => this.CONSUME(t).image },
564
+ { ALT: () => this.CONSUME(s).image },
564
565
  { ALT: () => this.CONSUME(r).image },
565
- { ALT: () => this.CONSUME(i).image },
566
566
  { ALT: () => this.CONSUME(n).image },
567
- { ALT: () => this.CONSUME(o).image },
568
567
  { ALT: () => this.CONSUME(a).image },
569
568
  { ALT: () => this.CONSUME(h).image },
569
+ { ALT: () => this.CONSUME(l).image },
570
570
  { ALT: () => this.CONSUME(u).image },
571
571
  { ALT: () => this.CONSUME(c).image },
572
572
  { ALT: () => this.CONSUME(p).image },
573
573
  { ALT: () => this.CONSUME(g).image }
574
- ])), l = {
575
- value: s,
574
+ ])), o = {
575
+ value: i,
576
576
  index: this.getLexerPosition(),
577
- isRange: C.includes(s)
577
+ isRange: S.includes(i)
578
578
  }, O = this.SUBRULE2(this._rulePostfixOp);
579
579
  m.push({
580
- op: l,
580
+ op: o,
581
581
  node: O
582
582
  });
583
583
  }), this.ACTION(() => {
584
584
  let e = m.length - 1;
585
- const t = s.length;
586
- for (let r = 0; e > 0 && r < t; r++) {
587
- const t = s[r];
588
- let i = 1;
589
- for (; i < m.length;) {
590
- const s = m[i].op;
585
+ const t = i.length;
586
+ for (let s = 0; e > 0 && s < t; s++) {
587
+ const t = i[s];
588
+ let r = 1;
589
+ for (; r < m.length;) {
590
+ const s = m[r].op;
591
591
  if (t.includes(s.value)) {
592
- const t = m[i - 1].node, r = m[i].node;
593
- let n = l(s.value, t, r, s.isRange);
594
- n = this._tag(n, s.index), m[i - 1].node = n, m.splice(i, 1), e--;
595
- } else i++;
592
+ const t = m[r - 1].node, i = m[r].node;
593
+ let n = o(s.value, t, i, s.isRange);
594
+ n = this._tag(n, s.index), m[r - 1].node = n, m.splice(r, 1), e--;
595
+ } else r++;
596
596
  }
597
597
  }
598
598
  }), m[0].node;
@@ -611,30 +611,30 @@ var te = {
611
611
  }), this.ACTION(() => {
612
612
  const e = s.length;
613
613
  if (0 !== e) for (let r = 0; r < e; r++) {
614
- const e = s[r], i = e[0], n = e[1], o = C.includes(i);
615
- t = m(i, t, o), t = this._tag(t, n);
614
+ const e = s[r], i = e[0], n = e[1], o = S.includes(i);
615
+ t = h(i, t, o), t = this._tag(t, n);
616
616
  }
617
617
  }), t;
618
618
  }), this._rulePrefixOp = this.RULE("rulePrefixOp", () => {
619
- const { PlusOp: e, MinOp: t, ImplicitIntersectOp: s } = this._vocab, r = [];
619
+ const { PlusOp: t, MinOp: s, ImplicitIntersectOp: r } = this._vocab, i = [];
620
620
  this.MANY(() => {
621
- const i = this.OR([
622
- { ALT: () => this.CONSUME(e).image },
621
+ const e = this.OR([
623
622
  { ALT: () => this.CONSUME(t).image },
624
- { ALT: () => this.CONSUME(s).image }
623
+ { ALT: () => this.CONSUME(s).image },
624
+ { ALT: () => this.CONSUME(r).image }
625
625
  ]);
626
626
  this.ACTION(() => {
627
- r.push([i, this.getLexerPosition()]);
627
+ i.push([e, this.getLexerPosition()]);
628
628
  });
629
629
  });
630
- let i = this.SUBRULE(this._ruleRangeOp);
630
+ let n = this.SUBRULE(this._ruleRangeOp);
631
631
  return this.ACTION(() => {
632
- const e = r.length;
633
- if (0 !== e) for (let t = e - 1; t >= 0; t--) {
634
- const e = r[t], s = e[0], n = e[1], o = C.includes(s);
635
- i = _(s, i, o), i = this._tag(i, n);
632
+ const t = i.length;
633
+ if (0 !== t) for (let s = t - 1; s >= 0; s--) {
634
+ const t = i[s], r = t[0], o = t[1], a = S.includes(r);
635
+ n = e(r, n, a), n = this._tag(n, o);
636
636
  }
637
- }), i;
637
+ }), n;
638
638
  }), this._ruleRangeOp = this.RULE("ruleRangeOp", () => {
639
639
  const { RangeOp: e, RangeTrimFullOp: t, RangeTrimLeadingOp: s, RangeTrimTrailingOp: r, ArrayAnchorOp: i } = this._vocab, n = [];
640
640
  return n.push({ node: this.SUBRULE(this._ruleCallOp) }), this.MANY2(() => {
@@ -659,17 +659,17 @@ var te = {
659
659
  for (let e = 1; e < n.length; e++) {
660
660
  const t = n[e];
661
661
  if (void 0 !== t.anchor) {
662
- n[0].node = this._tag(m("#", n[0].node, !0), t.anchor);
662
+ n[0].node = this._tag(h("#", n[0].node, !0), t.anchor);
663
663
  continue;
664
664
  }
665
665
  const s = t.op;
666
- let r = l(s.value, n[0].node, t.node, !0);
666
+ let r = o(s.value, n[0].node, t.node, !0);
667
667
  r = this._tag(r, s.index), n[0].node = r;
668
668
  }
669
669
  }), n[0].node;
670
670
  }), this._ruleCallOp = this.RULE("ruleCallOp", () => {
671
- const { OpenParen: e, CloseParen: t } = this._vocab;
672
- let s = this.SUBRULE(this._ruleFormula);
671
+ const { OpenParen: e, CloseParen: s } = this._vocab;
672
+ let r = this.SUBRULE(this._ruleFormula);
673
673
  return this.MANY({
674
674
  GATE: () => {
675
675
  const t = this.LA(0), s = this.LA(1);
@@ -677,12 +677,12 @@ var te = {
677
677
  },
678
678
  DEF: () => {
679
679
  this.CONSUME(e);
680
- const r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), n = s, o = this.ACTION(() => this._tag(T(n, i), r)), a = this.OPTION(() => this.CONSUME(t));
680
+ const i = this.getLexerPosition(), n = this.SUBRULE(this._ruleFunctionArguments), o = r, a = this.ACTION(() => this._tag(t(o, n), i)), h = this.OPTION(() => this.CONSUME(s));
681
681
  this.ACTION(() => {
682
- a || this._reportError(o, "Missing closing parenthesis ')'", r), this._tagClose(o, this.getLexerPosition()), s = o;
682
+ h || this._reportError(a, "Missing closing parenthesis ')'", i), this._tagClose(a, this.getLexerPosition()), r = a;
683
683
  });
684
684
  }
685
- }), s;
685
+ }), r;
686
686
  }), this._ruleIntersectOp = this.RULE("ruleIntersectOp", () => {
687
687
  const e = [this.SUBRULE(this._ruleInfixOp)];
688
688
  return this.MANY(() => {
@@ -699,14 +699,14 @@ var te = {
699
699
  for (; e.length > 1;) {
700
700
  let t = e.length - 1;
701
701
  for (let s = 0; s < t; s++) {
702
- const r = e[s], i = e[s + 1], n = l(" ", r, i, !0), o = this._tokenMap.get(r);
703
- o && delete o.tokenIndexClose;
704
- const a = this._tokenMap.get(i), h = a?.tokenIndex;
705
- if (void 0 !== h) {
706
- const e = this.input[h], t = this.input[h - 1]?.endOffset ?? -1, s = this._inputText.slice(t + 1, e.startOffset).slice(0, -1);
702
+ const r = e[s], i = e[s + 1], n = o(" ", r, i, !0), a = this._tokenMap.get(r);
703
+ a && delete a.tokenIndexClose;
704
+ const h = this._tokenMap.get(i), l = h?.tokenIndex;
705
+ if (void 0 !== l) {
706
+ const e = this.input[l], t = this.input[l - 1]?.endOffset ?? -1, s = this._inputText.slice(t + 1, e.startOffset).slice(0, -1);
707
707
  s.length > 0 && (n.wsBefore = s);
708
708
  }
709
- a && delete a.tokenIndex, s + 1 < t && a && delete a.tokenIndexClose, e.splice(s, 2, n), s--, t--;
709
+ h && delete h.tokenIndex, s + 1 < t && h && delete h.tokenIndexClose, e.splice(s, 2, n), s--, t--;
710
710
  }
711
711
  }
712
712
  }), e[0];
@@ -729,83 +729,83 @@ var te = {
729
729
  }), t;
730
730
  }), this._ruleParen = this.RULE("ruleParen", () => {
731
731
  const { OpenParen: e, CloseParen: t } = this._vocab;
732
- return this._processParen(A.Paren, e, t);
732
+ return this._processParen(_.Paren, e, t);
733
733
  }), this._ruleLiteralArray = this.RULE("ruleLiteralArray", () => {
734
- const { OpenCurlyParen: e, CloseCurlyParen: s, ColSeparator: r, RowSeparator: i } = this._vocab;
735
- let n = t();
734
+ const { OpenCurlyParen: e, CloseCurlyParen: t, ColSeparator: s, RowSeparator: r } = this._vocab;
735
+ let i = g();
736
736
  this.CONSUME(e);
737
- const o = this.getLexerPosition();
738
- let a = this.ACTION(() => this._tag(p(n), o));
739
- const h = this.SUBRULE(this._ruleLiteralForArray);
737
+ const n = this.getLexerPosition();
738
+ let o = this.ACTION(() => this._tag(d(i), n));
739
+ const a = this.SUBRULE(this._ruleLiteralForArray);
740
740
  this.ACTION(() => {
741
- n.value.push(h);
741
+ i.value.push(a);
742
742
  }), this.MANY(() => {
743
743
  let e = !1;
744
744
  this.OR([{ ALT: () => {
745
- this.CONSUME(r), e = !0;
746
- } }, { ALT: () => this.CONSUME(i) }]);
747
- const s = this.SUBRULE2(this._ruleLiteralForArray);
745
+ this.CONSUME(s), e = !0;
746
+ } }, { ALT: () => this.CONSUME(r) }]);
747
+ const t = this.SUBRULE2(this._ruleLiteralForArray);
748
748
  this.ACTION(() => {
749
- e || (n = t(), a.value.push(n)), n.value.push(s);
749
+ e || (i = g(), o.value.push(i)), i.value.push(t);
750
750
  });
751
751
  });
752
- const l = this.OPTION(() => this.CONSUME(s));
753
- return a = this.ACTION(() => (l || this._reportError(a, "Missing closing parenthesis '}'", o), this._tagClose(a, this.getLexerPosition()))), a;
752
+ const h = this.OPTION(() => this.CONSUME(t));
753
+ return o = this.ACTION(() => (h || this._reportError(o, "Missing closing parenthesis '}'", n), this._tagClose(o, this.getLexerPosition()))), o;
754
754
  }), this._ruleLiteralForArray = this.RULE("ruleLiteralForArray", () => {
755
- const { StringToken: t, BooleanToken: s, LiteralError: r, RefError: o } = this._vocab;
755
+ const { StringToken: e, BooleanToken: t, LiteralError: s, RefError: r } = this._vocab;
756
756
  return this.OR([
757
757
  { ALT: () => {
758
- const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), s = this.ACTION(() => this._tag(n(t.image, this._locale), this.getLexerPosition()));
759
- return this.ACTION(() => e ? i(e.image, s) : s);
758
+ const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), s = this.ACTION(() => this._tag(m(t.image, this._locale), this.getLexerPosition()));
759
+ return this.ACTION(() => e ? L(e.image, s) : s);
760
760
  } },
761
761
  { ALT: () => {
762
- const e = this.CONSUME(t);
763
- return this.ACTION(() => this._tag(a(e.image), this.getLexerPosition()));
762
+ const t = this.CONSUME(e);
763
+ return this.ACTION(() => this._tag(x(t.image), this.getLexerPosition()));
764
764
  } },
765
765
  { ALT: () => {
766
- const t = this.CONSUME(s);
767
- return this.ACTION(() => this._tag(e(t.image, this._locale), this.getLexerPosition()));
766
+ const e = this.CONSUME(t);
767
+ return this.ACTION(() => this._tag(I(e.image, this._locale), this.getLexerPosition()));
768
768
  } },
769
769
  { ALT: () => {
770
- const e = this.CONSUME(r);
771
- return this.ACTION(() => this._tag(I(e.image, this._locale), this.getLexerPosition()));
770
+ const e = this.CONSUME(s);
771
+ return this.ACTION(() => this._tag(n(e.image, this._locale), this.getLexerPosition()));
772
772
  } },
773
773
  { ALT: () => {
774
- const e = this.CONSUME(o);
775
- return this.ACTION(() => this._tag(h(e.image, this._locale), this.getLexerPosition()));
774
+ const e = this.CONSUME(r);
775
+ return this.ACTION(() => this._tag(R(e.image, this._locale), this.getLexerPosition()));
776
776
  } }
777
777
  ]);
778
778
  }), this._ruleLiteral = this.RULE("ruleLiteral", () => {
779
- const { StringToken: t, BooleanToken: s, LiteralError: r, RefError: i } = this._vocab;
779
+ const { StringToken: e, BooleanToken: t, LiteralError: s, RefError: r } = this._vocab;
780
780
  return this.OR([
781
781
  { ALT: () => {
782
782
  const e = this.SUBRULE(this._ruleNumber);
783
- return this.ACTION(() => this._tag(n(e.image, this._locale), this.getLexerPosition()));
783
+ return this.ACTION(() => this._tag(m(e.image, this._locale), this.getLexerPosition()));
784
784
  } },
785
785
  { ALT: () => {
786
- const e = this.CONSUME(t);
787
- return this.ACTION(() => this._tag(a(e.image), this.getLexerPosition()));
786
+ const t = this.CONSUME(e);
787
+ return this.ACTION(() => this._tag(x(t.image), this.getLexerPosition()));
788
788
  } },
789
789
  { ALT: () => {
790
- const t = this.CONSUME(s);
791
- return this.ACTION(() => this._tag(e(t.image, this._locale), this.getLexerPosition()));
790
+ const e = this.CONSUME(t);
791
+ return this.ACTION(() => this._tag(I(e.image, this._locale), this.getLexerPosition()));
792
792
  } },
793
793
  { ALT: () => {
794
- const e = this.CONSUME(r);
795
- return this.ACTION(() => this._tag(I(e.image, this._locale), this.getLexerPosition()));
794
+ const e = this.CONSUME(s);
795
+ return this.ACTION(() => this._tag(n(e.image, this._locale), this.getLexerPosition()));
796
796
  } },
797
797
  { ALT: () => {
798
- const e = this.CONSUME(i);
799
- return this.ACTION(() => this._tag(h(e.image, this._locale), this.getLexerPosition()));
798
+ const e = this.CONSUME(r);
799
+ return this.ACTION(() => this._tag(R(e.image, this._locale), this.getLexerPosition()));
800
800
  } }
801
801
  ]);
802
802
  }), this._ruleFunction = this.RULE("ruleFunction", () => {
803
- const { FunctionToken: e, OpenParen: t, CloseParen: s } = this._vocab, r = this.CONSUME(e).image, i = this.getLexerPosition();
803
+ const { FunctionToken: e, OpenParen: t, CloseParen: r } = this._vocab, i = this.CONSUME(e).image, n = this.getLexerPosition();
804
804
  this.CONSUME(t);
805
- const n = this.SUBRULE(this._ruleFunctionArguments);
806
- let a = this.ACTION(() => this._tag(o(r, n), i));
807
- const h = this.OPTION(() => this.CONSUME(s));
808
- return a = this.ACTION(() => (h || this._reportError(a, "Missing closing parenthesis ')'", i), this._tagClose(a, this.getLexerPosition()))), a;
805
+ const o = this.SUBRULE(this._ruleFunctionArguments);
806
+ let a = this.ACTION(() => this._tag(s(i, o), n));
807
+ const h = this.OPTION(() => this.CONSUME(r));
808
+ return a = this.ACTION(() => (h || this._reportError(a, "Missing closing parenthesis ')'", n), this._tagClose(a, this.getLexerPosition()))), a;
809
809
  }), this._ruleFunctionArguments = this.RULE("ruleFunctionArguments", () => {
810
810
  const { ArgSeparator: e, CloseParen: t } = this._vocab, s = [];
811
811
  return this.OPTION({
@@ -814,11 +814,11 @@ var te = {
814
814
  let t;
815
815
  this.OPTION2(() => {
816
816
  t = this.SUBRULE(this._ruleIntersectOp);
817
- }), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), s.push(t), this.MANY(() => {
817
+ }), t = this.ACTION(() => t ?? this._tagClose(c(), this.getLexerPosition())), s.push(t), this.MANY(() => {
818
818
  let t;
819
819
  this.CONSUME(e), this.OPTION3(() => {
820
820
  t = this.SUBRULE2(this._ruleIntersectOp);
821
- }), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), s.push(t);
821
+ }), t = this.ACTION(() => t ?? this._tagClose(c(), this.getLexerPosition())), s.push(t);
822
822
  });
823
823
  }
824
824
  }), s;
@@ -837,14 +837,14 @@ var te = {
837
837
  return this._tag(e.root, s);
838
838
  });
839
839
  }), this._ruleReference = this.RULE("ruleReference", () => {
840
- const { Sheet: e, SheetQuoted: t, DivOp: s, MulOp: r, PlusOp: i, MinOp: n, ArgSeparator: o, Cell: a, NamedToken: l, SingleQuotedString: p, Column: g, AbsRow: m, DigitToken: _, RefError: E } = this._vocab;
840
+ const { Sheet: e, SheetQuoted: t, DivOp: s, MulOp: i, PlusOp: n, MinOp: o, ArgSeparator: a, Cell: h, NamedToken: l, SingleQuotedString: c, Column: g, AbsRow: m, DigitToken: O, RefError: E } = this._vocab;
841
841
  let L, f;
842
842
  this.OPTION2({
843
843
  GATE: () => {
844
- for (let a = 1; a < 6; a++) {
845
- const h = this.LA(a);
844
+ for (let r = 1; r < 6; r++) {
845
+ const h = this.LA(r);
846
846
  if (h.tokenType === e || h.tokenType === t) return !0;
847
- if ("" === h.image || ")" === h.image || h.tokenType === s || h.tokenType === r || h.tokenType === i || h.tokenType === n || h.tokenType === o) break;
847
+ if ("" === h.image || ")" === h.image || h.tokenType === s || h.tokenType === i || h.tokenType === n || h.tokenType === o || h.tokenType === a) break;
848
848
  }
849
849
  return !1;
850
850
  },
@@ -852,45 +852,45 @@ var te = {
852
852
  f = this.getLexerPosition() + 1, L = this.SUBRULE(this._rulePrefixSheetName);
853
853
  }
854
854
  });
855
- let C = this.OR([
855
+ let A = this.OR([
856
856
  { ALT: () => {
857
- const e = this.CONSUME(a), t = this.getLexerPosition();
858
- return this.ACTION(() => this._tag(u(e.image, this.rowIndex, this.colIndex), t));
857
+ const e = this.CONSUME(h), t = this.getLexerPosition();
858
+ return this.ACTION(() => this._tag(r(e.image, this.rowIndex, this.colIndex), t));
859
859
  } },
860
860
  { ALT: () => {
861
- const e = this.OR2([{ ALT: () => this.CONSUME(l) }, { ALT: () => this.CONSUME(p) }]);
862
- return this.ACTION(() => this._tag(O(e.image), this.getLexerPosition()));
861
+ const e = this.OR2([{ ALT: () => this.CONSUME(l) }, { ALT: () => this.CONSUME(c) }]);
862
+ return this.ACTION(() => this._tag(p(e.image), this.getLexerPosition()));
863
863
  } },
864
864
  { ALT: () => this.SUBRULE(this._ruleBracketedString) },
865
865
  { ALT: () => this.SUBRULE(this._ruleFunction) },
866
866
  { ALT: () => {
867
867
  const e = this.CONSUME(g);
868
- return this.ACTION(() => this._tag(c(e.image, this.colIndex), this.getLexerPosition()));
868
+ return this.ACTION(() => this._tag(u(e.image, this.colIndex), this.getLexerPosition()));
869
869
  } },
870
870
  { ALT: () => {
871
871
  const e = this.CONSUME(m);
872
- return this.ACTION(() => this._tag(d(e.image, this.rowIndex), this.getLexerPosition()));
872
+ return this.ACTION(() => this._tag(N(e.image, this.rowIndex), this.getLexerPosition()));
873
873
  } },
874
874
  { ALT: () => {
875
- const e = this.CONSUME(_);
876
- return this.ACTION(() => this._tag(d(e.image, this.rowIndex), this.getLexerPosition()));
875
+ const e = this.CONSUME(O);
876
+ return this.ACTION(() => this._tag(N(e.image, this.rowIndex), this.getLexerPosition()));
877
877
  } },
878
878
  { ALT: () => {
879
879
  const e = this.CONSUME(E);
880
- return this.ACTION(() => this._tag(h(e.image, this._locale), this.getLexerPosition()));
880
+ return this.ACTION(() => this._tag(R(e.image, this._locale), this.getLexerPosition()));
881
881
  } }
882
882
  ]);
883
883
  return this.ACTION(() => {
884
- if (L && C) {
885
- if ("" === L.name) return void this._reportError(C, `'${L.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
886
- let e = C;
887
- if (C.type === A.Postfix && C.inputs?.[0] && (e = C.inputs[0]), e.type === A.Cell || e.type === A.Named || e.type === A.Row || e.type === A.TableColumn || e.type === A.Error) {
884
+ if (L && A) {
885
+ if ("" === L.name) return void this._reportError(A, `'${L.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
886
+ let e = A;
887
+ if (A.type === _.Postfix && A.inputs?.[0] && (e = A.inputs[0]), e.type === _.Cell || e.type === _.Named || e.type === _.Row || e.type === _.TableColumn || e.type === _.Error) {
888
888
  e.value.scope = L.name, e.value.scopeImage = L.image;
889
889
  const t = this._tokenMap.get(e);
890
890
  t && void 0 !== f && (t.tokenIndex = f);
891
891
  }
892
892
  }
893
- }), C;
893
+ }), A;
894
894
  }), this._rulePrefixSheetName = this.RULE("rulePrefixSheetName", () => {
895
895
  const { SheetQuoted: e, BracketedString: t, NamedToken: s, RangeOp: r, Sheet: i } = this._vocab;
896
896
  return this.OR([{ ALT: () => {
@@ -927,12 +927,12 @@ var te = {
927
927
  return this.MANY(() => {
928
928
  this.CONSUME(e), s.push(this.SUBRULE2(this._ruleIntersectOp));
929
929
  }), this.ACTION(() => 0 === s.length ? t : {
930
- type: A.List,
930
+ type: _.List,
931
931
  value: ",",
932
932
  inputs: [t, ...s],
933
933
  isReference: !0
934
934
  });
935
- }), this._lexer = E, this._locale = E.getLocale(), this._vocab = L, this._srParser = g?.srParser ?? new Z(this._locale), this.performSelfAnalysis();
935
+ }), this._lexer = l, this._locale = l.getLocale(), this._vocab = O, this._srParser = a?.srParser ?? new Q(this._locale), this.performSelfAnalysis();
936
936
  }
937
937
  getLexer() {
938
938
  return this._lexer;
@@ -942,26 +942,26 @@ var te = {
942
942
  let i;
943
943
  if (!r) return {
944
944
  root: {
945
- type: A.Unparsed,
945
+ type: _.Unparsed,
946
946
  value: s
947
947
  },
948
948
  errors: []
949
949
  };
950
950
  const n = r.tokens;
951
951
  if (0 === n.length) throw new M.Parse(J);
952
- return this.input = n, this._inputText = s, this._inputTextLength = s.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = S(i, (t, s) => {
953
- const r = t.type, i = s?.isReference ? s.value : void 0, n = "string" == typeof i && Q.has(i), o = "string" == typeof i && q.has(i), a = n ? s.inputs : void 0, h = a ? a[0] === t ? a[1] : a[0] : void 0, l = this._lexer.getMaxRow();
954
- if (n && r !== A.Cell && Number.isInteger(t.value)) {
955
- const s = d(t.image, e);
956
- return N(s, t), "row" !== K(h) ? this._reportError(s, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`) : H(t.image, l) || this._reportError(s, `'${t.image}' is not a valid row — rows run from 1 to ${l}`), s;
952
+ return this.input = n, this._inputText = s, this._inputTextLength = s.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = C(i, (t, s) => {
953
+ const r = t.type, i = s?.isReference ? s.value : void 0, n = "string" == typeof i && Z.has(i), o = "string" == typeof i && q.has(i), a = n ? s.inputs : void 0, h = a ? a[0] === t ? a[1] : a[0] : void 0, u = this._lexer.getMaxRow();
954
+ if (n && r !== _.Cell && Number.isInteger(t.value)) {
955
+ const s = N(t.image, e);
956
+ return l(s, t), "row" !== K(h) ? this._reportError(s, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`) : H(t.image, u) || this._reportError(s, `'${t.image}' is not a valid row — rows run from 1 to ${u}`), s;
957
957
  }
958
- if (o && r === A.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
959
- if (r === A.Cell) {
958
+ if (o && r === _.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
959
+ if (r === _.Cell) {
960
960
  const e = t.value, s = e.colIndex === Number.MIN_SAFE_INTEGER, r = e.rowIndex === Number.MIN_SAFE_INTEGER;
961
- if ((s || r) && K(h) === (s ? "row" : "col")) return s && !H(t.image, l) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${l}`), t;
961
+ if ((s || r) && K(h) === (s ? "row" : "col")) return s && !H(t.image, u) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${u}`), t;
962
962
  if (s || r || e.colIndex >= 16384) {
963
- const n = O(t.image);
964
- N(n, t);
963
+ const n = p(t.image);
964
+ l(n, t);
965
965
  const a = e.scope;
966
966
  return a && (n.value.scope = a, n.value.scopeImage = e.scopeImage), s ? this._reportError(n, `'${t.image}' is not a valid reference — a row needs a column (use ${t.image}:${t.image} for the whole row)`) : r && t.image.includes("$") ? this._reportError(n, `'${t.image}' is not a valid reference — a whole column can only pair with another column (as in ${t.image}:${t.image})`) : o && this._reportError(n, `'${t.image}' is a name — '${i}' needs a cell or range on both sides`), n;
967
967
  }
@@ -1024,7 +1024,7 @@ var te = {
1024
1024
  _bindAllWhitespace(e) {
1025
1025
  if (e) {
1026
1026
  if (this._bindNodeWhitespace(e), e.inputs) for (const t of e.inputs) t && this._bindAllWhitespace(t);
1027
- if (e.type === A.Array && Array.isArray(e.value)) {
1027
+ if (e.type === _.Array && Array.isArray(e.value)) {
1028
1028
  for (const t of e.value) if (t && Array.isArray(t.value)) for (const e of t.value) e && this._bindAllWhitespace(e);
1029
1029
  }
1030
1030
  }