@sheetxl/sdk 0.8.0-beta.14 → 0.8.0-beta.16

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 (195) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/4MbBwfmW2hDXk9_w.mjs +165 -0
  3. package/browser/esm/{ChYgQL-8qIDFmX31.mjs → 9YWdxmSjzLN4j_ts.mjs} +22 -22
  4. package/browser/esm/B6BdiHigbUdbZp3J.mjs +686 -0
  5. package/browser/esm/{CImFKFaYToUH-bSE.mjs → BF_QwkZ_hs2rFoTT.mjs} +3 -3
  6. package/browser/esm/{DBvu0tdSf-5vol4e.mjs → BMo2_9Ul36IwRm3S.mjs} +3 -3
  7. package/browser/esm/{B1aH_qa-czVyEVHd.mjs → BWY1qiidTUBVPJoD.mjs} +506 -502
  8. package/browser/esm/{BSXQAXwZdJKYTO4P.mjs → Bf80epSsm_RyAOb9.mjs} +29 -29
  9. package/browser/esm/{D_XMi4_5iO2rkET5.mjs → BfoE6Dn_GQCIkQD3.mjs} +2 -2
  10. package/browser/esm/{Dhw5XEJYFrkYjdU2.mjs → BlMYYQZP-QM-iBHz.mjs} +23 -22
  11. package/browser/esm/{MuNBN02MyZ558c_K.mjs → BqT-ASHP0NVSUUnY.mjs} +1528 -1433
  12. package/browser/esm/{DnR0xY7_iE3TmMcg.mjs → BtNuoQIrrHw_jnbJ.mjs} +4 -4
  13. package/browser/esm/BxFzcCYhvo9NXFjC.mjs +527 -0
  14. package/browser/esm/{DonQz2Tc3k9lNT8E.mjs → BxYuRTSF9ykc-Tpz.mjs} +3 -3
  15. package/browser/esm/{aRXqxIzjuSLwawMh.mjs → C2PvZwqK-uvsugVS.mjs} +2 -2
  16. package/browser/esm/C3JOjQwdG9kAig7i.mjs +2017 -0
  17. package/browser/esm/{SwLp-iElwDjfcJtv.mjs → C5x0EzqElYGTiTQc.mjs} +2 -2
  18. package/browser/esm/{AXlD9K1gCwPU4gCO.mjs → CMChv-fCFh68VQQt.mjs} +588 -587
  19. package/browser/esm/{BpwULQPKbb4R9Jew.mjs → CRbQATfI0yZxe1kX.mjs} +3 -3
  20. package/browser/esm/{CM_X1zZYzEUPaNJL.mjs → CUu3zeHqcwMRYiov.mjs} +2 -2
  21. package/{node/esm/b3XnssSr9lmvAC2N.mjs → browser/esm/C_jLGkFemj55_BP3.mjs} +3 -3
  22. package/browser/esm/{CtC__ALh4I8PKIln.mjs → CkZoDPUCK5jMUaeJ.mjs} +26955 -22064
  23. package/browser/esm/{DvvqmUQ9Z0NFm1-4.mjs → D-iHJ3q4nwOLcn1D.mjs} +2 -2
  24. package/browser/esm/{qCqzZW74-fhaIG2V.mjs → D807piM0VSokWz-L.mjs} +2 -2
  25. package/browser/esm/{BLYl-afJe_3std8i.mjs → DW3oQ39IF0bsc_lm.mjs} +2 -2
  26. package/browser/esm/{Ln4gsmhqH1LyoANj.mjs → DcB52JPBPmkc3l1m.mjs} +4 -4
  27. package/browser/esm/{DIfAk63CvaOZ3QKi.mjs → DlVnybrgwZWxWN3_.mjs} +10 -10
  28. package/browser/esm/{Dh84MDs-OhdCPCIg.mjs → DvVhatd0J1ch3OCO.mjs} +22 -22
  29. package/browser/esm/{BWoz4kQdA5KKJfl6.mjs → Dx9Fya60meMpuHqm.mjs} +2 -2
  30. package/browser/esm/{r_EZapMBdyS4gUd-.mjs → HV0FkJ6k3Ils318J.mjs} +78 -78
  31. package/browser/esm/{C7hpfT-sX2lyLS-D.mjs → JV9Szh5qTssjxJoE.mjs} +2 -2
  32. package/browser/esm/{CPIWV3Enlh_BF2TY.mjs → KpuD1kEcWB7cT0VM.mjs} +3 -3
  33. package/browser/esm/{3t4S9eda2I6jFad0.mjs → U4FL-QeC0bRUhTEo.mjs} +2 -2
  34. package/browser/esm/{D39XcmtPXVtMN4yF.mjs → WLlpmgLN5OVLoLrC.mjs} +3 -3
  35. package/browser/esm/{Cy8uYCggktF83278.mjs → WR146UAqrsUsL39e.mjs} +2 -2
  36. package/browser/esm/{BPPMKyMn65i1a1mE.mjs → WcHfawW2lkTHtWUd.mjs} +51 -49
  37. package/browser/esm/{Bdcd3QOzsc0aVMjN.mjs → Zp5-cTJ0Llb6EfGi.mjs} +4 -4
  38. package/browser/esm/{oSCy1X5CJ1iYtGDp.mjs → ad9PX897hYE4Srkc.mjs} +3 -3
  39. package/browser/esm/{UMQTbO0zNmBpzW1V.mjs → d_t-7d5BD1AdHg3u.mjs} +404 -404
  40. package/browser/esm/{BVqIknGhQCLUB_7Q.mjs → dwGdnbV-CykjNrlm.mjs} +2 -2
  41. package/browser/esm/{DiXeQjc0WJGLSVEo.mjs → e69NcYnKMLnAmqyA.mjs} +2 -2
  42. package/browser/esm/index.mjs +886 -578
  43. package/browser/esm/{yuF8SbWfjBfrxcq5.mjs → r-o0UCm7KtluNmyK.mjs} +3 -3
  44. package/licenses/dependencies.txt +69 -69
  45. package/node/esm/{BEBt5fo__rvT2q_u.mjs → 446KYBjJQa8g-8Gg.mjs} +52 -50
  46. package/node/esm/{BELc5aQ_pFPgbiso.mjs → 5OfKfTRX2_y2NwpU.mjs} +2 -2
  47. package/node/esm/{C-5JLSNof0FhkuFd.mjs → A3PEHO1HJvkHfb5n.mjs} +2 -2
  48. package/node/esm/{YpOpRyciqQLIY1-G.mjs → B4WUGzJBkQu7BXRm.mjs} +2 -2
  49. package/node/esm/{I-FZojIFWluC6X-j.mjs → BH8J6vKSO5zI_TWo.mjs} +2 -2
  50. package/node/esm/BLmdKnkLwkb3wWe6.mjs +2040 -0
  51. package/node/esm/{BuyAYLI4s33-vmgG.mjs → BZSxu_ZqX8-Uczzn.mjs} +2 -2
  52. package/node/esm/{DiCMnYA2bttmrX3q.mjs → BfPBiAgVmWhuFgFP.mjs} +3 -3
  53. package/node/esm/{BSVttk12GXNfKZ9k.mjs → Bknw7zWZhl2-w1pi.mjs} +3 -3
  54. package/node/esm/{uLrulyR7IXq0SF4j.mjs → BvIPsPiHhMclZ1kH.mjs} +22 -22
  55. package/node/esm/{clgEkmEwfB28nkz2.mjs → By2TFKOjA1HekZap.mjs} +4 -4
  56. package/node/esm/{BXg-D8Rc_iyB8p7X.mjs → BywIhvYkWk2o7MSW.mjs} +2 -2
  57. package/node/esm/{pF2vCOTmrxPAB41Q.mjs → C3zyhnMwQ2hRQBz7.mjs} +31 -30
  58. package/node/esm/{BCjHRVU8tC5lYypg.mjs → C884edhUf9yMqpPp.mjs} +2 -2
  59. package/node/esm/{B6jhx5pHPs2W5GE7.mjs → CDHY-0OyQ9348Brb.mjs} +189 -189
  60. package/node/esm/{xRGObcoaGDnAZFnj.mjs → CERNLhFrAwtu_p-q.mjs} +2 -2
  61. package/node/esm/{DbPUG2DcQ3T_QhcJ.mjs → CFkX_Cn6avQqQiVC.mjs} +78 -78
  62. package/node/esm/CJDV8P3hI8lu--3Z.mjs +530 -0
  63. package/node/esm/{Cyeq1rDslIqF1LKz.mjs → CKwiipdPJGzAiPjg.mjs} +2 -2
  64. package/node/esm/{BLPrFp_jKGYgWPX1.mjs → CLtUMJfKsy4SevWE.mjs} +3 -3
  65. package/node/esm/{DLdXl0O0TXuyqLU4.mjs → CVPieTgKCwkL21nD.mjs} +28573 -23108
  66. package/node/esm/{Dlk2ZYExFgQ0xE2H.mjs → C_fYuynP2a_70WdL.mjs} +2 -2
  67. package/{browser/esm/BEDfJP2tcuRy2Y2E.mjs → node/esm/CgdNA3B_GFG_yJiN.mjs} +3 -3
  68. package/node/esm/Cs3ibv6YHCDwLRlk.mjs +115 -0
  69. package/node/esm/{DeFE8QfuCeGw-mvd.mjs → Cxak8i2NidZ4Uv6v.mjs} +487 -483
  70. package/node/esm/{NA-8urR7T1NCwrgD.mjs → D88A3UpCyGRjcX3U.mjs} +3 -3
  71. package/node/esm/{99miMotf3dOuG5Jk.mjs → DBIUe2BC9xU7qMHR.mjs} +3 -3
  72. package/node/esm/{BEdxa3I4VOiCsvy7.mjs → DELfV5HQZo1mInBd.mjs} +4 -4
  73. package/node/esm/{BfEdeOg4iYXaYTlh.mjs → DOt3t-13tsnM7Fj6.mjs} +2 -2
  74. package/node/esm/{B3hBxzqJ2_hUylNr.mjs → DfWc3nW_Z_qqc_Wf.mjs} +1762 -1674
  75. package/node/esm/DgnwKbUEyQN5_gWT.mjs +169 -0
  76. package/node/esm/{Ccocd9DTvOnlOE9D.mjs → Dhv9JymnXqcF54oo.mjs} +2 -2
  77. package/node/esm/{Lj98EH6coGdKUzuS.mjs → DvtyKKzOnoOM80NB.mjs} +22 -22
  78. package/node/esm/{Crn6dnSQQRCQAnQ-.mjs → KDGrIa9R5XzWfjM2.mjs} +2 -2
  79. package/node/esm/{D30rC6AWaGGf3CaC.mjs → RTwm9ge1KoPdlBNt.mjs} +2 -2
  80. package/node/esm/{CdSTmD2ZvG9NesNR.mjs → _RIAmJI98l6bIFfZ.mjs} +2 -2
  81. package/node/esm/{CI8UIWR01z9QDlzH.mjs → bIGdvfpnijWeCac6.mjs} +1005 -1004
  82. package/node/esm/index.mjs +913 -598
  83. package/node/esm/kaiXmn0AA5WDsLPo.mjs +199 -0
  84. package/node/esm/{B5VmOC0jO9Zbh9Mq.mjs → mTIhoz1gEcaEm7s1.mjs} +3 -3
  85. package/package.json +7 -7
  86. package/resources/locales/de/model.msg.json +82 -1
  87. package/resources/locales/en/model.msg.json +80 -1
  88. package/types/scripting-api.json +9967 -9497
  89. package/types/scripting-enums.json +27 -0
  90. package/types/scripting.d.ts +2282 -166
  91. package/types/src/.generated/wasm/sdk.d.ts +332 -0
  92. package/types/src/calculation/Calculation.d.ts +8 -0
  93. package/types/src/calculation/ICalculation.d.ts +51 -0
  94. package/types/src/calculation/compiler/Types.d.ts +5 -0
  95. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +1 -1
  96. package/types/src/calculation/formula/FormulaBlock.d.ts +2 -0
  97. package/types/src/calculation/formula/IFormulaBlock.d.ts +18 -0
  98. package/types/src/calculation/grid/CalcGrid.d.ts +5 -1
  99. package/types/src/calculation/grid/CalcGridBackend.d.ts +36 -1
  100. package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
  101. package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
  102. package/types/src/calculation/grid/FormulaHost.d.ts +3 -1
  103. package/types/src/calculation/grid/ICalcGrid.d.ts +88 -0
  104. package/types/src/calculation/grid/_CalcRequest.d.ts +9 -0
  105. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
  106. package/types/src/calculation/spatial/SpillEntry.d.ts +55 -4
  107. package/types/src/calculation/state/CalcNode.d.ts +6 -3
  108. package/types/src/calculation/state/CalculationContext.d.ts +4 -2
  109. package/types/src/calculation/state/_PivotView.d.ts +22 -0
  110. package/types/src/cell/ICell.d.ts +1 -21
  111. package/types/src/cellRange/ICellRange.d.ts +18 -2
  112. package/types/src/collections/MixedTypedArrayList.d.ts +16 -2
  113. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +10 -0
  114. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +3 -0
  115. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +3 -0
  116. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +3 -0
  117. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +3 -0
  118. package/types/src/condition/BuiltInOperators/MatchesOperator.d.ts +10 -0
  119. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  120. package/types/src/condition/BuiltInOperators/index.d.ts +2 -0
  121. package/types/src/condition/Condition.d.ts +1 -0
  122. package/types/src/condition/ICondition.d.ts +15 -0
  123. package/types/src/condition/_ConditionUtils.d.ts +14 -0
  124. package/types/src/conditionalFormat/ConditionalFormat.d.ts +2 -1
  125. package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
  126. package/types/src/license/LicenseDetails.d.ts +27 -0
  127. package/types/src/license/LicenseManager.d.ts +24 -7
  128. package/types/src/license/_Utils.d.ts +34 -3
  129. package/types/src/license/index.d.ts +1 -0
  130. package/types/src/license/runtime.browser.d.ts +32 -4
  131. package/types/src/license/runtime.node.d.ts +8 -5
  132. package/types/src/license/summary.d.ts +18 -0
  133. package/types/src/pivot/IPivotTable.d.ts +1549 -13
  134. package/types/src/pivot/IPivotTableCollection.d.ts +70 -4
  135. package/types/src/pivot/PivotCache.d.ts +95 -11
  136. package/types/src/pivot/PivotDataField.d.ts +73 -0
  137. package/types/src/pivot/PivotField.d.ts +142 -0
  138. package/types/src/pivot/PivotTable.d.ts +548 -14
  139. package/types/src/pivot/PivotTableCollection.d.ts +18 -3
  140. package/types/src/pivot/_PivotAreas.d.ts +48 -0
  141. package/types/src/pivot/_PivotControls.d.ts +140 -0
  142. package/types/src/pivot/_PivotEngine.d.ts +9 -0
  143. package/types/src/pivot/_PivotGroups.d.ts +25 -0
  144. package/types/src/pivot/_PivotItems.d.ts +167 -0
  145. package/types/src/pivot/_PivotStructure.d.ts +237 -0
  146. package/types/src/pivot/_PivotStylePreview.d.ts +21 -0
  147. package/types/src/pivot/_PivotUtils.d.ts +37 -0
  148. package/types/src/pivot/engine/PivotAdd.d.ts +37 -0
  149. package/types/src/pivot/engine/PivotData.d.ts +65 -0
  150. package/types/src/pivot/engine/PivotEdit.d.ts +45 -0
  151. package/types/src/pivot/engine/PivotFilters.d.ts +50 -0
  152. package/types/src/pivot/engine/PivotFormulas.d.ts +72 -0
  153. package/types/src/pivot/engine/PivotLayout.d.ts +133 -0
  154. package/types/src/pivot/engine/PivotMove.d.ts +24 -0
  155. package/types/src/pivot/engine/PivotRefresh.d.ts +87 -0
  156. package/types/src/pivot/engine/PivotSort.d.ts +26 -0
  157. package/types/src/pivot/engine/PivotViewBuilder.d.ts +22 -0
  158. package/types/src/pivot/engine/index.d.ts +15 -0
  159. package/types/src/pivot/index.d.ts +4 -0
  160. package/types/src/pivot/kernel/KernelPivot.d.ts +63 -0
  161. package/types/src/pivot/kernel/_KernelLeaves.d.ts +100 -0
  162. package/types/src/pivot/kernel/_PivotAxisTree.d.ts +71 -0
  163. package/types/src/primitives/Range.d.ts +12 -1
  164. package/types/src/sheet/IWorksheet.d.ts +35 -0
  165. package/types/src/sheet/SheetCell.d.ts +21 -14
  166. package/types/src/sheet/SheetRange.d.ts +3 -0
  167. package/types/src/sheet/Worksheet.d.ts +175 -7
  168. package/types/src/sheet/_PivotFootprint.d.ts +42 -0
  169. package/types/src/sheet/_SheetAutoFitUtils.d.ts +12 -1
  170. package/types/src/sheet/_SheetMutations.d.ts +47 -0
  171. package/types/src/sheet/_SheetStateTypes.d.ts +11 -0
  172. package/types/src/sheet/style/SheetCellStyle.d.ts +6 -0
  173. package/types/src/sheet/style/SheetPivotStyle.d.ts +83 -0
  174. package/types/src/sheet/style/_IndentUnit.d.ts +14 -0
  175. package/types/src/sheetHeader/SheetCellHeader.d.ts +1 -1
  176. package/types/src/slicer/ISlicer.d.ts +114 -34
  177. package/types/src/slicer/ITimeline.d.ts +61 -0
  178. package/types/src/slicer/Slicer.d.ts +76 -3
  179. package/types/src/slicer/_PivotSlicer.d.ts +51 -0
  180. package/types/src/slicer/index.d.ts +1 -0
  181. package/types/src/table/AnchoredTable.d.ts +11 -1
  182. package/types/src/table/ITable.d.ts +5 -6
  183. package/types/src/table/ITableStyle.d.ts +50 -34
  184. package/types/src/table/_BuiltInPivotStyles.d.ts +8 -0
  185. package/types/src/table/_BuiltInTableStyles.d.ts +0 -1
  186. package/types/src/type/ITypes.d.ts +5 -1
  187. package/types/src/workbook/IWorkbook.d.ts +8 -2
  188. package/types/src/workbook/Workbook.d.ts +72 -6
  189. package/browser/esm/D2NFcBM4xsv0JJ1q.mjs +0 -184
  190. package/browser/esm/DnqwX3-2NfGBaXXl.mjs +0 -357
  191. package/node/esm/C3S4hF1vn0NyJPPd.mjs +0 -199
  192. package/node/esm/CPsGyt3vnOdLTShj.mjs +0 -360
  193. package/node/esm/D4Y1WJgjiFEgbWrW.mjs +0 -115
  194. package/types/src/pivot/_PivotXml.d.ts +0 -24
  195. package/types/src/primitives/Grouping.d.ts +0 -65
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.14
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.16
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { $n as e, Bn as t, Fn as s, Gn as r, Jn as i, Kn as n, Ln as o, Qn as a, Un as h, Vn as l, Wn as u, Xn as c, Yn as p, Zn as g, _r as m, ar as O, er as _, fr as E, gr as L, ir as A, mr as f, nr as C, or as T, pr as N, qn as U, rr as S, sr as d, tr as x, xr as R, zn as I } from "./DLdXl0O0TXuyqLU4.mjs";
7
+ import { $r as e, Br as t, Dr as s, Fr as r, Gr as i, Hr as n, Ir as o, Jr as a, Kr as h, Lr as l, Mr as u, Nr as c, Qr as p, Rr as g, Ur as m, Vr as O, Wr as _, Xr as E, Yr as L, Zr as A, ai as f, ci as C, ii as T, jr as N, kr as U, li as S, oi as d, pi as x, qr as R, zr as I } from "./CVPieTgKCwkL21nD.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 ?? m, r = t?.maxColumn ?? D, i = t?.maxRow ?? G;
12
+ const s = t?.locale ?? S, 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 ?? m;
24
+ const t = e?.maxColumn ?? D, s = e?.maxRow ?? G, r = e?.locale ?? S;
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,16 +37,16 @@ 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: N },
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: E },
45
+ pattern: { exec: T },
46
46
  line_breaks: !1,
47
47
  start_chars_hint: [91],
48
48
  longer_alt: [c, l]
49
- }), g = (e) => (e ?? []).map((e) => e?.trim()).filter(Boolean).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).map((e) => e + "|").join(""), O = (e) => e.replace(/[A-Za-z]/g, (e) => `[${e.toUpperCase()}${e.toLowerCase()}]`), _ = k({
49
+ }), g = (e) => (e ?? []).map((e) => e?.trim()).filter(Boolean).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).map((e) => e + "|").join(""), m = (e) => e.replace(/[A-Za-z]/g, (e) => `[${e.toUpperCase()}${e.toLowerCase()}]`), O = k({
50
50
  name: "LiteralError",
51
51
  pattern: new RegExp(g(r.errorLiterals) + [
52
52
  "#PARSE!",
@@ -65,24 +65,24 @@ var y = class e {
65
65
  "#BUSY!",
66
66
  "#PYTHON!",
67
67
  "#TIMEOUT!"
68
- ].map(O).join("|"))
69
- }), L = k({
68
+ ].map(m).join("|"))
69
+ }), _ = k({
70
70
  name: "RefError",
71
- pattern: new RegExp(g(r.errorRefs) + ["#REF!", "#NAME\\?"].map(O).join("|"))
72
- }), A = k({
71
+ pattern: new RegExp(g(r.errorRefs) + ["#REF!", "#NAME\\?"].map(m).join("|"))
72
+ }), E = k({
73
73
  name: "SingleQuotedString",
74
74
  pattern: /'(''|[^'])*'/
75
- }), f = k({
75
+ }), L = k({
76
76
  name: "SheetQuoted",
77
77
  pattern: /'(?:''|[^'])*?'!/
78
- }), C = k({
78
+ }), A = k({
79
79
  name: "Sheet",
80
80
  pattern: /[A-Za-z_.\d\u007F-\uFFFF]*!/
81
- }), T = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, U = k({
81
+ }), C = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, N = k({
82
82
  name: "NamedToken",
83
83
  pattern: { exec: (e, t) => {
84
- T.lastIndex = t;
85
- const s = T.exec(e);
84
+ C.lastIndex = t;
85
+ const s = C.exec(e);
86
86
  if (!s) return null;
87
87
  let r = s[0];
88
88
  const i = r.indexOf(".:");
@@ -90,18 +90,18 @@ var y = class e {
90
90
  } },
91
91
  line_breaks: !1,
92
92
  start_chars_hint: B
93
- }), S = k({
93
+ }), U = 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: U
98
+ longer_alt: N
99
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: U
104
+ longer_alt: N
105
105
  }), x = k({
106
106
  name: "AbsRow",
107
107
  pattern: /[$][0-9]+/
@@ -185,7 +185,7 @@ var y = class e {
185
185
  }), le = k({
186
186
  name: "ArrayAnchorOp",
187
187
  pattern: /#/,
188
- longer_alt: [_, L]
188
+ longer_alt: [O, _]
189
189
  }), ue = k({
190
190
  name: "GtOp",
191
191
  pattern: />/
@@ -198,14 +198,14 @@ var y = class e {
198
198
  }), ge = [
199
199
  h,
200
200
  l,
201
- f,
201
+ L,
202
+ E,
202
203
  A,
203
- C,
204
204
  u,
205
205
  c,
206
206
  p,
207
+ O,
207
208
  _,
208
- L,
209
209
  y,
210
210
  ...n !== i ? [$] : [],
211
211
  Y,
@@ -213,7 +213,7 @@ var y = class e {
213
213
  Z,
214
214
  q,
215
215
  j,
216
- S,
216
+ U,
217
217
  w,
218
218
  d,
219
219
  x,
@@ -222,7 +222,7 @@ var y = class e {
222
222
  P,
223
223
  le,
224
224
  ne,
225
- U,
225
+ N,
226
226
  K,
227
227
  H,
228
228
  J,
@@ -355,7 +355,7 @@ function V(e) {
355
355
  return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
356
356
  }
357
357
  var j = class {
358
- constructor(e = m) {
358
+ constructor(e = S) {
359
359
  const t = function(e) {
360
360
  const t = [...s];
361
361
  if (e) for (const s of Object.values(e)) {
@@ -404,53 +404,53 @@ var j = class {
404
404
  return this._lexer.tokenize(e);
405
405
  }
406
406
  }, Q = class extends b {
407
- constructor(e = m) {
408
- const t = new j(e), s = t.getVocabulary();
409
- super(s, {
407
+ constructor(t = S) {
408
+ const s = new j(t), r = s.getVocabulary();
409
+ super(r, {
410
410
  nodeLocationTracking: "none",
411
411
  maxLookahead: 2,
412
412
  skipValidations: !0,
413
413
  recoveryEnabled: !1
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(() => {
414
+ }), this._lexer = s;
415
+ const { TableSpecifier: i, BracketedColumn: n, BareSpecifier: o, ColumnSep: a, ListSep: h } = r, 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 = d(t.image, e);
432
- return s.image = t.image, s;
428
+ }), l.RULE("ruleItem", () => l.OR([{ ALT: () => l.SUBRULE(l.ruleSpecifier) }, { ALT: () => l.SUBRULE(l.ruleColumnOrRange) }])), l.RULE("ruleSpecifier", () => l.OR([{ ALT: () => {
429
+ const s = l.CONSUME(i);
430
+ return l.ACTION(() => {
431
+ const r = e(s.image, t);
432
+ return r.image = s.image, r;
433
433
  });
434
434
  } }, { ALT: () => {
435
- const t = h.CONSUME(n);
436
- return h.ACTION(() => {
437
- const s = d(t.image, e);
438
- return s.image = t.image, s;
435
+ const s = l.CONSUME(o);
436
+ return l.ACTION(() => {
437
+ const r = e(s.image, t);
438
+ return r.image = s.image, r;
439
439
  });
440
- } }])), h.RULE("ruleColumnOrRange", () => {
441
- const e = h.CONSUME(i);
440
+ } }])), l.RULE("ruleColumnOrRange", () => {
441
+ const e = l.CONSUME(n);
442
442
  let t, s;
443
- return h.OPTION(() => {
444
- t = h.CONSUME(o), s = h.CONSUME2(i);
445
- }), h.ACTION(() => {
446
- const r = O(e.image);
443
+ return l.OPTION(() => {
444
+ t = l.CONSUME(a), s = l.CONSUME2(n);
445
+ }), l.ACTION(() => {
446
+ const r = A(e.image);
447
447
  if (r.image = e.image, !s) return r;
448
- const i = O(s.image);
448
+ const i = A(s.image);
449
449
  i.image = s.image;
450
- const n = U(":", r, i, !0);
450
+ const n = I(":", 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);
@@ -464,23 +464,23 @@ var j = class {
464
464
  if ("@" === s) {
465
465
  const e = t.slice(1).trim();
466
466
  if (!e) {
467
- const e = _("@", null, !0);
467
+ const e = h("@", null, !0);
468
468
  return e.image = "@", [e];
469
469
  }
470
470
  if ("[" === e.charAt(0)) {
471
471
  const t = this._parseInner(e);
472
472
  if (1 === t.length && "infix" === t[0].type) {
473
- const e = _("@", t[0], !0);
473
+ const e = h("@", t[0], !0);
474
474
  return e.image = "@", [e];
475
475
  }
476
476
  }
477
- const s = O(e);
477
+ const s = A(e);
478
478
  s.image = e;
479
- const r = _("@", s, !0);
479
+ const r = h("@", s, !0);
480
480
  return r.image = "@", [r];
481
481
  }
482
482
  if ("[" !== s && "#" !== s) {
483
- const t = O(e);
483
+ const t = A(e);
484
484
  return t.image = e, [t];
485
485
  }
486
486
  return this._parseInner(t);
@@ -488,7 +488,7 @@ var j = class {
488
488
  parse(e, t, s) {
489
489
  this.reset();
490
490
  const r = () => ({
491
- root: T("", []),
491
+ root: p("", []),
492
492
  errors: []
493
493
  });
494
494
  if (!s) return r();
@@ -501,7 +501,7 @@ 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: T(o, h),
504
+ root: p(o, h),
505
505
  errors: this.errors.length > 0 ? [...this.errors] : []
506
506
  };
507
507
  }
@@ -516,7 +516,7 @@ var j = class {
516
516
  ":."
517
517
  ]), K = (e) => {
518
518
  if (!e) return null;
519
- if (e.type === R.Cell) {
519
+ if (e.type === x.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,75 +546,75 @@ var te = {
546
546
  return e.expected === P && t ? `Unexpected '${t}'` : w.buildMismatchTokenMessage(e);
547
547
  }
548
548
  }, se = class extends b {
549
- constructor(s) {
550
- const m = s?.lexer ?? y.shared(s?.lexerOptions), O = m.getVocabulary();
551
- super(O, {
549
+ constructor(e) {
550
+ const s = e?.lexer ?? y.shared(e?.lexerOptions), p = s.getVocabulary();
551
+ super(p, {
552
552
  skipValidations: !0,
553
553
  recoveryEnabled: !0,
554
- ...s,
554
+ ...e,
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: s, DivOp: r, ExOp: i, ConcatOp: n, GtOp: a, EqOp: h, LtOp: l, NeqOp: u, GteOp: c, LteOp: p } = this._vocab, g = [];
560
- return g.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
561
- const o = this.OR(this._c1 || (this._c1 = [
559
+ const { PlusOp: e, MinOp: t, MulOp: s, DivOp: r, ExOp: i, ConcatOp: n, GtOp: o, EqOp: a, LtOp: h, NeqOp: l, GteOp: u, LteOp: c } = this._vocab, p = [];
560
+ return p.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
561
+ const g = this.OR(this._c1 || (this._c1 = [
562
562
  { ALT: () => this.CONSUME(e).image },
563
563
  { ALT: () => this.CONSUME(t).image },
564
564
  { ALT: () => this.CONSUME(s).image },
565
565
  { ALT: () => this.CONSUME(r).image },
566
566
  { ALT: () => this.CONSUME(i).image },
567
567
  { ALT: () => this.CONSUME(n).image },
568
+ { ALT: () => this.CONSUME(o).image },
568
569
  { ALT: () => this.CONSUME(a).image },
569
570
  { ALT: () => this.CONSUME(h).image },
570
571
  { ALT: () => this.CONSUME(l).image },
571
572
  { ALT: () => this.CONSUME(u).image },
572
- { ALT: () => this.CONSUME(c).image },
573
- { ALT: () => this.CONSUME(p).image }
573
+ { ALT: () => this.CONSUME(c).image }
574
574
  ])), m = {
575
- value: o,
575
+ value: g,
576
576
  index: this.getLexerPosition(),
577
- isRange: f.includes(o)
577
+ isRange: d.includes(g)
578
578
  }, O = this.SUBRULE2(this._rulePostfixOp);
579
- g.push({
579
+ p.push({
580
580
  op: m,
581
581
  node: O
582
582
  });
583
583
  }), this.ACTION(() => {
584
- let e = g.length - 1;
585
- const t = o.length;
584
+ let e = p.length - 1;
585
+ const t = U.length;
586
586
  for (let s = 0; e > 0 && s < t; s++) {
587
- const t = o[s];
587
+ const t = U[s];
588
588
  let r = 1;
589
- for (; r < g.length;) {
590
- const s = g[r].op;
589
+ for (; r < p.length;) {
590
+ const s = p[r].op;
591
591
  if (t.includes(s.value)) {
592
- const t = g[r - 1].node, i = g[r].node;
593
- let n = U(s.value, t, i, s.isRange);
594
- n = this._tag(n, s.index), g[r - 1].node = n, g.splice(r, 1), e--;
592
+ const t = p[r - 1].node, i = p[r].node;
593
+ let n = I(s.value, t, i, s.isRange);
594
+ n = this._tag(n, s.index), p[r - 1].node = n, p.splice(r, 1), e--;
595
595
  } else r++;
596
596
  }
597
597
  }
598
- }), g[0].node;
598
+ }), p[0].node;
599
599
  }), this._rulePlusMinusOp = this.RULE("rulePlusMinusOp", () => {
600
600
  const { PlusOp: e, MinOp: t } = this._vocab;
601
601
  return this.OR([{ ALT: () => this.CONSUME(e) }, { ALT: () => this.CONSUME(t) }]);
602
602
  }), this._rulePostfixOp = this.RULE("rulePostfixOp", () => {
603
- const { PercentOp: t } = this._vocab;
604
- let s = this.SUBRULE(this._rulePrefixOp);
605
- const r = [];
603
+ const { PercentOp: e } = this._vocab;
604
+ let t = this.SUBRULE(this._rulePrefixOp);
605
+ const s = [];
606
606
  return this.MANY(() => {
607
- const e = this.CONSUME(t).image;
607
+ const t = this.CONSUME(e).image;
608
608
  this.ACTION(() => {
609
- r.push([e, this.getLexerPosition()]);
609
+ s.push([t, this.getLexerPosition()]);
610
610
  });
611
611
  }), this.ACTION(() => {
612
- const t = r.length;
613
- if (0 !== t) for (let i = 0; i < t; i++) {
614
- const t = r[i], n = t[0], o = t[1], a = f.includes(n);
615
- s = e(n, s, a), s = this._tag(s, o);
612
+ const e = s.length;
613
+ if (0 !== e) for (let r = 0; r < e; r++) {
614
+ const e = s[r], n = e[0], o = e[1], a = d.includes(n);
615
+ t = i(n, t, a), t = this._tag(t, o);
616
616
  }
617
- }), s;
617
+ }), t;
618
618
  }), this._rulePrefixOp = this.RULE("rulePrefixOp", () => {
619
619
  const { PlusOp: e, MinOp: t, ImplicitIntersectOp: s } = this._vocab, r = [];
620
620
  this.MANY(() => {
@@ -631,26 +631,26 @@ var te = {
631
631
  return this.ACTION(() => {
632
632
  const e = r.length;
633
633
  if (0 !== e) for (let t = e - 1; t >= 0; t--) {
634
- const e = r[t], s = e[0], n = e[1], o = f.includes(s);
635
- i = _(s, i, o), i = this._tag(i, n);
634
+ const e = r[t], s = e[0], n = e[1], o = d.includes(s);
635
+ i = h(s, i, o), i = this._tag(i, n);
636
636
  }
637
637
  }), i;
638
638
  }), this._ruleRangeOp = this.RULE("ruleRangeOp", () => {
639
- const { RangeOp: t, RangeTrimFullOp: s, RangeTrimLeadingOp: r, RangeTrimTrailingOp: i, ArrayAnchorOp: n } = this._vocab, o = [];
639
+ const { RangeOp: e, RangeTrimFullOp: t, RangeTrimLeadingOp: s, RangeTrimTrailingOp: r, ArrayAnchorOp: n } = this._vocab, o = [];
640
640
  return o.push({ node: this.SUBRULE(this._ruleCallOp) }), this.MANY2(() => {
641
641
  this.CONSUME(n), o.push({ anchor: this.getLexerPosition() });
642
642
  }), this.MANY(() => {
643
- const e = {
643
+ const i = {
644
644
  value: this.OR(this._c2 || (this._c2 = [
645
+ { ALT: () => this.CONSUME(e).image },
645
646
  { ALT: () => this.CONSUME(t).image },
646
647
  { ALT: () => this.CONSUME(s).image },
647
- { ALT: () => this.CONSUME(r).image },
648
- { ALT: () => this.CONSUME(i).image }
648
+ { ALT: () => this.CONSUME(r).image }
649
649
  ])),
650
650
  index: this.getLexerPosition()
651
651
  }, a = this.SUBRULE2(this._ruleCallOp);
652
652
  o.push({
653
- op: e,
653
+ op: i,
654
654
  node: a
655
655
  }), this.MANY3(() => {
656
656
  this.CONSUME2(n), o.push({ anchor: this.getLexerPosition() });
@@ -660,17 +660,17 @@ var te = {
660
660
  const t = o[e], s = o[e + 1];
661
661
  if (":" !== t.op?.value || ":" !== s.op?.value) continue;
662
662
  const r = K(t.node);
663
- r && K(s.node) === r && K(o[e - 1].node) !== r && (t.node = this._tag(U(":", t.node, s.node, !0), s.op.index), o.splice(e + 1, 1));
663
+ r && K(s.node) === r && K(o[e - 1].node) !== r && (t.node = this._tag(I(":", t.node, s.node, !0), s.op.index), o.splice(e + 1, 1));
664
664
  }
665
- for (let t = 1; t < o.length; t++) {
666
- const s = o[t];
667
- if (void 0 !== s.anchor) {
668
- o[0].node = this._tag(e("#", o[0].node, !0), s.anchor);
665
+ for (let e = 1; e < o.length; e++) {
666
+ const t = o[e];
667
+ if (void 0 !== t.anchor) {
668
+ o[0].node = this._tag(i("#", o[0].node, !0), t.anchor);
669
669
  continue;
670
670
  }
671
- const r = s.op;
672
- let i = U(r.value, o[0].node, s.node, !0);
673
- i = this._tag(i, r.index), o[0].node = i;
671
+ const s = t.op;
672
+ let r = I(s.value, o[0].node, t.node, !0);
673
+ r = this._tag(r, s.index), o[0].node = r;
674
674
  }
675
675
  }), o[0].node;
676
676
  }), this._ruleCallOp = this.RULE("ruleCallOp", () => {
@@ -683,7 +683,7 @@ var te = {
683
683
  },
684
684
  DEF: () => {
685
685
  this.CONSUME(e);
686
- const r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), n = s, o = this.ACTION(() => this._tag(l(n, i), r)), a = this.OPTION(() => this.CONSUME(t));
686
+ const r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), n = s, o = this.ACTION(() => this._tag(c(n, i), r)), a = this.OPTION(() => this.CONSUME(t));
687
687
  this.ACTION(() => {
688
688
  a || this._reportError(o, "Missing closing parenthesis ')'", r), this._tagClose(o, this.getLexerPosition()), s = o;
689
689
  });
@@ -705,7 +705,7 @@ var te = {
705
705
  for (; e.length > 1;) {
706
706
  let t = e.length - 1;
707
707
  for (let s = 0; s < t; s++) {
708
- const r = e[s], i = e[s + 1], n = U(" ", r, i, !0), o = this._tokenMap.get(r);
708
+ const r = e[s], i = e[s + 1], n = I(" ", r, i, !0), o = this._tokenMap.get(r);
709
709
  o && delete o.tokenIndexClose;
710
710
  const a = this._tokenMap.get(i), h = a?.tokenIndex;
711
711
  if (void 0 !== h) {
@@ -735,83 +735,83 @@ var te = {
735
735
  }), t;
736
736
  }), this._ruleParen = this.RULE("ruleParen", () => {
737
737
  const { OpenParen: e, CloseParen: t } = this._vocab;
738
- return this._processParen(R.Paren, e, t);
738
+ return this._processParen(x.Paren, e, t);
739
739
  }), this._ruleLiteralArray = this.RULE("ruleLiteralArray", () => {
740
- const { OpenCurlyParen: e, CloseCurlyParen: t, ColSeparator: s, RowSeparator: r } = this._vocab;
741
- let n = c();
740
+ const { OpenCurlyParen: e, CloseCurlyParen: s, ColSeparator: r, RowSeparator: i } = this._vocab;
741
+ let o = n();
742
742
  this.CONSUME(e);
743
- const o = this.getLexerPosition();
744
- let a = this.ACTION(() => this._tag(i(n), o));
745
- const h = this.SUBRULE(this._ruleLiteralForArray);
743
+ const a = this.getLexerPosition();
744
+ let h = this.ACTION(() => this._tag(t(o), a));
745
+ const l = this.SUBRULE(this._ruleLiteralForArray);
746
746
  this.ACTION(() => {
747
- n.value.push(h);
747
+ o.value.push(l);
748
748
  }), this.MANY(() => {
749
749
  let e = !1;
750
750
  this.OR([{ ALT: () => {
751
- this.CONSUME(s), e = !0;
752
- } }, { ALT: () => this.CONSUME(r) }]);
751
+ this.CONSUME(r), e = !0;
752
+ } }, { ALT: () => this.CONSUME(i) }]);
753
753
  const t = this.SUBRULE2(this._ruleLiteralForArray);
754
754
  this.ACTION(() => {
755
- e || (n = c(), a.value.push(n)), n.value.push(t);
755
+ e || (o = n(), h.value.push(o)), o.value.push(t);
756
756
  });
757
757
  });
758
- const l = this.OPTION(() => this.CONSUME(t));
759
- return a = this.ACTION(() => (l || this._reportError(a, "Missing closing parenthesis '}'", o), this._tagClose(a, this.getLexerPosition()))), a;
758
+ const u = this.OPTION(() => this.CONSUME(s));
759
+ return h = this.ACTION(() => (u || this._reportError(h, "Missing closing parenthesis '}'", a), this._tagClose(h, this.getLexerPosition()))), h;
760
760
  }), this._ruleLiteralForArray = this.RULE("ruleLiteralForArray", () => {
761
- const { StringToken: e, BooleanToken: s, LiteralError: r, RefError: i } = this._vocab;
761
+ const { StringToken: e, BooleanToken: t, LiteralError: s, RefError: r } = this._vocab;
762
762
  return this.OR([
763
763
  { ALT: () => {
764
- const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), s = this.ACTION(() => this._tag(a(t.image, this._locale), this.getLexerPosition()));
765
- return this.ACTION(() => e ? x(e.image, s) : s);
764
+ const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), s = this.ACTION(() => this._tag(_(t.image, this._locale), this.getLexerPosition()));
765
+ return this.ACTION(() => e ? R(e.image, s) : s);
766
766
  } },
767
767
  { ALT: () => {
768
768
  const t = this.CONSUME(e);
769
- return this.ACTION(() => this._tag(A(t.image), this.getLexerPosition()));
769
+ return this.ACTION(() => this._tag(E(t.image), this.getLexerPosition()));
770
770
  } },
771
771
  { ALT: () => {
772
- const e = this.CONSUME(s);
773
- return this.ACTION(() => this._tag(t(e.image, this._locale), this.getLexerPosition()));
772
+ const e = this.CONSUME(t);
773
+ return this.ACTION(() => this._tag(u(e.image, this._locale), this.getLexerPosition()));
774
774
  } },
775
775
  { ALT: () => {
776
- const e = this.CONSUME(r);
777
- return this.ACTION(() => this._tag(p(e.image, this._locale), this.getLexerPosition()));
776
+ const e = this.CONSUME(s);
777
+ return this.ACTION(() => this._tag(O(e.image, this._locale), this.getLexerPosition()));
778
778
  } },
779
779
  { ALT: () => {
780
- const e = this.CONSUME(i);
781
- return this.ACTION(() => this._tag(C(e.image, this._locale), this.getLexerPosition()));
780
+ const e = this.CONSUME(r);
781
+ return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
782
782
  } }
783
783
  ]);
784
784
  }), this._ruleLiteral = this.RULE("ruleLiteral", () => {
785
- const { StringToken: e, BooleanToken: s, LiteralError: r, RefError: i } = this._vocab;
785
+ const { StringToken: e, BooleanToken: t, LiteralError: s, RefError: r } = this._vocab;
786
786
  return this.OR([
787
787
  { ALT: () => {
788
788
  const e = this.SUBRULE(this._ruleNumber);
789
- return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
789
+ return this.ACTION(() => this._tag(_(e.image, this._locale), this.getLexerPosition()));
790
790
  } },
791
791
  { ALT: () => {
792
792
  const t = this.CONSUME(e);
793
- return this.ACTION(() => this._tag(A(t.image), this.getLexerPosition()));
793
+ return this.ACTION(() => this._tag(E(t.image), this.getLexerPosition()));
794
794
  } },
795
795
  { ALT: () => {
796
- const e = this.CONSUME(s);
797
- return this.ACTION(() => this._tag(t(e.image, this._locale), this.getLexerPosition()));
796
+ const e = this.CONSUME(t);
797
+ return this.ACTION(() => this._tag(u(e.image, this._locale), this.getLexerPosition()));
798
798
  } },
799
799
  { ALT: () => {
800
- const e = this.CONSUME(r);
801
- return this.ACTION(() => this._tag(p(e.image, this._locale), this.getLexerPosition()));
800
+ const e = this.CONSUME(s);
801
+ return this.ACTION(() => this._tag(O(e.image, this._locale), this.getLexerPosition()));
802
802
  } },
803
803
  { ALT: () => {
804
- const e = this.CONSUME(i);
805
- return this.ACTION(() => this._tag(C(e.image, this._locale), this.getLexerPosition()));
804
+ const e = this.CONSUME(r);
805
+ return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
806
806
  } }
807
807
  ]);
808
808
  }), this._ruleFunction = this.RULE("ruleFunction", () => {
809
809
  const { FunctionToken: e, OpenParen: t, CloseParen: s } = this._vocab, r = this.CONSUME(e).image, i = this.getLexerPosition();
810
810
  this.CONSUME(t);
811
- const o = this.SUBRULE(this._ruleFunctionArguments);
812
- let a = this.ACTION(() => this._tag(n(r, o), i));
813
- const h = this.OPTION(() => this.CONSUME(s));
814
- return a = this.ACTION(() => (h || this._reportError(a, "Missing closing parenthesis ')'", i), this._tagClose(a, this.getLexerPosition()))), a;
811
+ const n = this.SUBRULE(this._ruleFunctionArguments);
812
+ let o = this.ACTION(() => this._tag(g(r, n), i));
813
+ const a = this.OPTION(() => this.CONSUME(s));
814
+ return o = this.ACTION(() => (a || this._reportError(o, "Missing closing parenthesis ')'", i), this._tagClose(o, this.getLexerPosition()))), o;
815
815
  }), this._ruleFunctionArguments = this.RULE("ruleFunctionArguments", () => {
816
816
  const { ArgSeparator: e, CloseParen: t } = this._vocab, s = [];
817
817
  return this.OPTION({
@@ -820,11 +820,11 @@ var te = {
820
820
  let t;
821
821
  this.OPTION2(() => {
822
822
  t = this.SUBRULE(this._ruleIntersectOp);
823
- }), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), s.push(t), this.MANY(() => {
823
+ }), t = this.ACTION(() => t ?? this._tagClose(l(), this.getLexerPosition())), s.push(t), this.MANY(() => {
824
824
  let t;
825
825
  this.CONSUME(e), this.OPTION3(() => {
826
826
  t = this.SUBRULE2(this._ruleIntersectOp);
827
- }), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), s.push(t);
827
+ }), t = this.ACTION(() => t ?? this._tagClose(l(), this.getLexerPosition())), s.push(t);
828
828
  });
829
829
  }
830
830
  }), s;
@@ -843,60 +843,60 @@ var te = {
843
843
  return this._tag(e.root, s);
844
844
  });
845
845
  }), this._ruleReference = this.RULE("ruleReference", () => {
846
- const { Sheet: e, SheetQuoted: t, DivOp: s, MulOp: r, PlusOp: i, MinOp: n, ArgSeparator: o, Cell: a, NamedToken: l, SingleQuotedString: c, Column: p, AbsRow: m, DigitToken: O, RefError: _ } = this._vocab;
847
- let E, L;
846
+ const { Sheet: e, SheetQuoted: t, DivOp: s, MulOp: i, PlusOp: n, MinOp: h, ArgSeparator: l, Cell: u, NamedToken: c, SingleQuotedString: p, Column: g, AbsRow: O, DigitToken: _, RefError: E } = this._vocab;
847
+ let A, f;
848
848
  this.OPTION2({
849
849
  GATE: () => {
850
- for (let a = 1; a < 6; a++) {
851
- const h = this.LA(a);
852
- if (h.tokenType === e || h.tokenType === t) return !0;
853
- if ("" === h.image || ")" === h.image || h.tokenType === s || h.tokenType === r || h.tokenType === i || h.tokenType === n || h.tokenType === o) break;
850
+ for (let r = 1; r < 6; r++) {
851
+ const o = this.LA(r);
852
+ if (o.tokenType === e || o.tokenType === t) return !0;
853
+ if ("" === o.image || ")" === o.image || o.tokenType === s || o.tokenType === i || o.tokenType === n || o.tokenType === h || o.tokenType === l) break;
854
854
  }
855
855
  return !1;
856
856
  },
857
857
  DEF: () => {
858
- L = this.getLexerPosition() + 1, E = this.SUBRULE(this._rulePrefixSheetName);
858
+ f = this.getLexerPosition() + 1, A = this.SUBRULE(this._rulePrefixSheetName);
859
859
  }
860
860
  });
861
- let A = this.OR([
861
+ let C = this.OR([
862
862
  { ALT: () => {
863
- const e = this.CONSUME(a), t = this.getLexerPosition();
864
- return this.ACTION(() => this._tag(h(e.image, this.rowIndex, this.colIndex), t));
863
+ const e = this.CONSUME(u), t = this.getLexerPosition();
864
+ return this.ACTION(() => this._tag(r(e.image, this.rowIndex, this.colIndex), t));
865
865
  } },
866
866
  { ALT: () => {
867
- const e = this.OR2([{ ALT: () => this.CONSUME(l) }, { ALT: () => this.CONSUME(c) }]);
868
- return this.ACTION(() => this._tag(g(e.image), this.getLexerPosition()));
867
+ const e = this.OR2([{ ALT: () => this.CONSUME(c) }, { ALT: () => this.CONSUME(p) }]);
868
+ return this.ACTION(() => this._tag(m(e.image), this.getLexerPosition()));
869
869
  } },
870
870
  { ALT: () => this.SUBRULE(this._ruleBracketedString) },
871
871
  { ALT: () => this.SUBRULE(this._ruleFunction) },
872
872
  { ALT: () => {
873
- const e = this.CONSUME(p);
874
- return this.ACTION(() => this._tag(u(e.image, this.colIndex), this.getLexerPosition()));
875
- } },
876
- { ALT: () => {
877
- const e = this.CONSUME(m);
878
- return this.ACTION(() => this._tag(S(e.image, this.rowIndex), this.getLexerPosition()));
873
+ const e = this.CONSUME(g);
874
+ return this.ACTION(() => this._tag(o(e.image, this.colIndex), this.getLexerPosition()));
879
875
  } },
880
876
  { ALT: () => {
881
877
  const e = this.CONSUME(O);
882
- return this.ACTION(() => this._tag(S(e.image, this.rowIndex), this.getLexerPosition()));
878
+ return this.ACTION(() => this._tag(L(e.image, this.rowIndex), this.getLexerPosition()));
883
879
  } },
884
880
  { ALT: () => {
885
881
  const e = this.CONSUME(_);
886
- return this.ACTION(() => this._tag(C(e.image, this._locale), this.getLexerPosition()));
882
+ return this.ACTION(() => this._tag(L(e.image, this.rowIndex), this.getLexerPosition()));
883
+ } },
884
+ { ALT: () => {
885
+ const e = this.CONSUME(E);
886
+ return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
887
887
  } }
888
888
  ]);
889
889
  return this.ACTION(() => {
890
- if (E && A) {
891
- if ("" === E.name) return void this._reportError(A, `'${E.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
892
- let e = A;
893
- if (A.type === R.Postfix && A.inputs?.[0] && (e = A.inputs[0]), e.type === R.Cell || e.type === R.Named || e.type === R.Row || e.type === R.TableColumn || e.type === R.Error) {
894
- e.value.scope = E.name, e.value.scopeImage = E.image;
890
+ if (A && C) {
891
+ if ("" === A.name) return void this._reportError(C, `'${A.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
892
+ let e = C;
893
+ if (C.type === x.Postfix && C.inputs?.[0] && (e = C.inputs[0]), e.type === x.Cell || e.type === x.Named || e.type === x.Row || e.type === x.TableColumn || e.type === x.Error) {
894
+ e.value.scope = A.name, e.value.scopeImage = A.image;
895
895
  const t = this._tokenMap.get(e);
896
- t && void 0 !== L && (t.tokenIndex = L);
896
+ t && void 0 !== f && (t.tokenIndex = f);
897
897
  }
898
898
  }
899
- }), A;
899
+ }), C;
900
900
  }), this._rulePrefixSheetName = this.RULE("rulePrefixSheetName", () => {
901
901
  const { SheetQuoted: e, BracketedString: t, NamedToken: s, Column: r, RangeOp: i, Sheet: n } = this._vocab;
902
902
  return this.OR([{ ALT: () => {
@@ -936,12 +936,12 @@ var te = {
936
936
  return this.MANY(() => {
937
937
  this.CONSUME(e), s.push(this.SUBRULE2(this._ruleIntersectOp));
938
938
  }), this.ACTION(() => 0 === s.length ? t : {
939
- type: R.List,
939
+ type: x.List,
940
940
  value: ",",
941
941
  inputs: [t, ...s],
942
942
  isReference: !0
943
943
  });
944
- }), this._lexer = m, this._locale = m.getLocale(), this._vocab = O, this._srParser = s?.srParser ?? new Q(this._locale), this.performSelfAnalysis();
944
+ }), this._lexer = s, this._locale = s.getLocale(), this._vocab = p, this._srParser = e?.srParser ?? new Q(this._locale), this.performSelfAnalysis();
945
945
  }
946
946
  getLexer() {
947
947
  return this._lexer;
@@ -951,26 +951,26 @@ var te = {
951
951
  let i;
952
952
  if (!r) return {
953
953
  root: {
954
- type: R.Unparsed,
954
+ type: x.Unparsed,
955
955
  value: s
956
956
  },
957
957
  errors: []
958
958
  };
959
959
  const n = r.tokens;
960
960
  if (0 === n.length) throw new M.Parse(J);
961
- 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 = L(i, (t, s) => {
961
+ 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) => {
962
962
  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, l = this._lexer.getMaxRow();
963
- if (n && r !== R.Cell && Number.isInteger(t.value)) {
964
- const s = S(t.image, e);
965
- return I(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;
963
+ if (n && r !== x.Cell && Number.isInteger(t.value)) {
964
+ const s = L(t.image, e);
965
+ 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;
966
966
  }
967
- if (o && r === R.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
968
- if (r === R.Cell) {
967
+ if (o && r === x.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
968
+ if (r === x.Cell) {
969
969
  const e = t.value, s = e.colIndex === Number.MIN_SAFE_INTEGER, r = e.rowIndex === Number.MIN_SAFE_INTEGER;
970
970
  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;
971
971
  if (s || r || e.colIndex >= 16384) {
972
- const n = g(t.image);
973
- I(n, t);
972
+ const n = m(t.image);
973
+ N(n, t);
974
974
  const a = e.scope;
975
975
  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;
976
976
  }
@@ -1033,7 +1033,7 @@ var te = {
1033
1033
  _bindAllWhitespace(e) {
1034
1034
  if (e) {
1035
1035
  if (this._bindNodeWhitespace(e), e.inputs) for (const t of e.inputs) t && this._bindAllWhitespace(t);
1036
- if (e.type === R.Array && Array.isArray(e.value)) {
1036
+ if (e.type === x.Array && Array.isArray(e.value)) {
1037
1037
  for (const t of e.value) if (t && Array.isArray(t.value)) for (const e of t.value) e && this._bindAllWhitespace(e);
1038
1038
  }
1039
1039
  }