@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,10 +1,10 @@
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 n, Gn as r, Jn as i, Kn as a, Ln as o, Qn as s, Un as c, Vn as l, Wn as u, Xn as d, Yn as f, Zn as p, _r as m, ar as h, er as g, fr as _, gr as v, ir as y, mr as ee, nr as b, or as x, pr as te, qn as S, rr as C, sr as w, tr as ne, xr as T, zn as re } from "./CtC__ALh4I8PKIln.mjs";
7
+ import { $r as e, Br as t, Dr as n, Fr as r, Gr as i, Hr as a, Ir as o, Jr as s, Kr as c, Lr as l, Mr as u, Nr as d, Qr as f, Rr as p, Ur as m, Vr as h, Wr as g, Xr as _, Yr as ee, Zr as v, ai as te, ci as y, ii as ne, jr as b, kr as x, li as S, oi as C, pi as w, qr as re, zr as T } from "./CkZoDPUCK5jMUaeJ.mjs";
8
8
  import { FormulaError as E } from "@sheetxl/primitives";
9
9
  function D(e) {
10
10
  console && console.error && console.error(`Error: ${e}`);
@@ -171,7 +171,7 @@ function oe(e) {
171
171
  function B(e) {
172
172
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
173
173
  }
174
- var se = class {
174
+ var V = class {
175
175
  visit(e) {
176
176
  let t = e;
177
177
  switch (t.constructor) {
@@ -199,10 +199,10 @@ var se = class {
199
199
  visitTerminal(e) {}
200
200
  visitRule(e) {}
201
201
  };
202
- function ce(e, t = []) {
203
- return e instanceof N || e instanceof I || e instanceof L || (e instanceof R ? e.definition.some((e) => ce(e, t)) : !(e instanceof A && t.includes(e)) && e instanceof k && (e instanceof A && t.push(e), e.definition.every((e) => ce(e, t))));
202
+ function se(e, t = []) {
203
+ return e instanceof N || e instanceof I || e instanceof L || (e instanceof R ? e.definition.some((e) => se(e, t)) : !(e instanceof A && t.includes(e)) && e instanceof k && (e instanceof A && t.push(e), e.definition.every((e) => se(e, t))));
204
204
  }
205
- function V(e) {
205
+ function H(e) {
206
206
  if (e instanceof A) return "SUBRULE";
207
207
  if (e instanceof N) return "OPTION";
208
208
  if (e instanceof R) return "OR";
@@ -213,7 +213,7 @@ function V(e) {
213
213
  if (e instanceof z) return "CONSUME";
214
214
  throw Error("non exhaustive match");
215
215
  }
216
- var le = class {
216
+ var ce = class {
217
217
  walk(e, t = []) {
218
218
  e.definition.forEach((n, r) => {
219
219
  let i = e.definition.slice(r + 1);
@@ -246,7 +246,7 @@ var le = class {
246
246
  this.walk(e, r);
247
247
  }
248
248
  walkAtLeastOneSep(e, t, n) {
249
- let r = ue(e, t, n);
249
+ let r = le(e, t, n);
250
250
  this.walk(e, r);
251
251
  }
252
252
  walkMany(e, t, n) {
@@ -254,7 +254,7 @@ var le = class {
254
254
  this.walk(e, r);
255
255
  }
256
256
  walkManySep(e, t, n) {
257
- let r = ue(e, t, n);
257
+ let r = le(e, t, n);
258
258
  this.walk(e, r);
259
259
  }
260
260
  walkOr(e, t, n) {
@@ -265,28 +265,28 @@ var le = class {
265
265
  });
266
266
  }
267
267
  };
268
- function ue(e, t, n) {
268
+ function le(e, t, n) {
269
269
  return [new N({ definition: [new z({ terminalType: e.separator })].concat(e.definition) })].concat(t, n);
270
270
  }
271
- function de(e) {
272
- if (e instanceof A) return de(e.referencedRule);
271
+ function ue(e) {
272
+ if (e instanceof A) return ue(e.referencedRule);
273
273
  if (e instanceof z) return [e.terminalType];
274
274
  if (function(e) {
275
275
  return e instanceof M || e instanceof N || e instanceof I || e instanceof P || e instanceof F || e instanceof L || e instanceof z || e instanceof j;
276
276
  }(e)) return function(e) {
277
277
  let t = [], n = e.definition, r, i = 0, a = n.length > i, o = !0;
278
- for (; a && o;) r = n[i], o = ce(r), t = t.concat(de(r)), i += 1, a = n.length > i;
278
+ for (; a && o;) r = n[i], o = se(r), t = t.concat(ue(r)), i += 1, a = n.length > i;
279
279
  return [...new Set(t)];
280
280
  }(e);
281
281
  if (function(e) {
282
282
  return e instanceof R;
283
283
  }(e)) return function(e) {
284
- let t = e.definition.map((e) => de(e));
284
+ let t = e.definition.map((e) => ue(e));
285
285
  return [...new Set(t.flat())];
286
286
  }(e);
287
287
  throw Error("non exhaustive match");
288
288
  }
289
- var fe = "_~IN~_", pe = class extends le {
289
+ var de = "_~IN~_", fe = class extends ce {
290
290
  constructor(e) {
291
291
  super(), this.topProd = e, this.follows = {};
292
292
  }
@@ -295,67 +295,67 @@ var fe = "_~IN~_", pe = class extends le {
295
295
  }
296
296
  walkTerminal(e, t, n) {}
297
297
  walkProdRef(e, t, n) {
298
- let r = (i = e.referencedRule, a = e.idx, i.name + a + fe + this.topProd.name);
298
+ let r = (i = e.referencedRule, a = e.idx, i.name + a + de + this.topProd.name);
299
299
  var i, a;
300
- let o = de(new M({ definition: t.concat(n) }));
300
+ let o = ue(new M({ definition: t.concat(n) }));
301
301
  this.follows[r] = o;
302
302
  }
303
303
  };
304
- function H(e) {
304
+ function U(e) {
305
305
  return e.charCodeAt(0);
306
306
  }
307
- function me(e, t) {
307
+ function pe(e, t) {
308
308
  Array.isArray(e) ? e.forEach(function(e) {
309
309
  t.push(e);
310
310
  }) : t.push(e);
311
311
  }
312
- function U(e, t) {
312
+ function W(e, t) {
313
313
  if (!0 === e[t]) throw "duplicate flag " + t;
314
314
  e[t], e[t] = !0;
315
315
  }
316
- function W(e) {
316
+ function G(e) {
317
317
  if (e === void 0) throw Error("Internal Error - Should never get here!");
318
318
  return !0;
319
319
  }
320
- function he() {
320
+ function me() {
321
321
  throw Error("Internal Error - Should never get here!");
322
322
  }
323
- function ge(e) {
323
+ function he(e) {
324
324
  return e.type === "Character";
325
325
  }
326
- var _e = [];
327
- for (let e = H("0"); e <= H("9"); e++) _e.push(e);
328
- var ve = [H("_")].concat(_e);
329
- for (let e = H("a"); e <= H("z"); e++) ve.push(e);
330
- for (let e = H("A"); e <= H("Z"); e++) ve.push(e);
331
- var ye = [
332
- H(" "),
333
- H("\f"),
334
- H("\n"),
335
- H("\r"),
336
- H(" "),
337
- H("\v"),
338
- H(" "),
339
- H("\xA0"),
340
- H(" "),
341
- H(" "),
342
- H(" "),
343
- H(" "),
344
- H(" "),
345
- H(" "),
346
- H(" "),
347
- H(" "),
348
- H(" "),
349
- H(" "),
350
- H(" "),
351
- H(" "),
352
- H("\u2028"),
353
- H("\u2029"),
354
- H(" "),
355
- H(" "),
356
- H(" "),
357
- H("")
358
- ], be = /[0-9a-fA-F]/, xe = /[0-9]/, Se = /[1-9]/, Ce = class {
326
+ var ge = [];
327
+ for (let e = U("0"); e <= U("9"); e++) ge.push(e);
328
+ var _e = [U("_")].concat(ge);
329
+ for (let e = U("a"); e <= U("z"); e++) _e.push(e);
330
+ for (let e = U("A"); e <= U("Z"); e++) _e.push(e);
331
+ var ve = [
332
+ U(" "),
333
+ U("\f"),
334
+ U("\n"),
335
+ U("\r"),
336
+ U(" "),
337
+ U("\v"),
338
+ U(" "),
339
+ U("\xA0"),
340
+ U(" "),
341
+ U(" "),
342
+ U(" "),
343
+ U(" "),
344
+ U(" "),
345
+ U(" "),
346
+ U(" "),
347
+ U(" "),
348
+ U(" "),
349
+ U(" "),
350
+ U(" "),
351
+ U(" "),
352
+ U("\u2028"),
353
+ U("\u2029"),
354
+ U(" "),
355
+ U(" "),
356
+ U(" "),
357
+ U("")
358
+ ], ye = /[0-9a-fA-F]/, be = /[0-9]/, xe = /[1-9]/, Se = class {
359
359
  visitChildren(e) {
360
360
  for (let t in e) {
361
361
  let n = e[t];
@@ -435,7 +435,7 @@ var ye = [
435
435
  visitGroup(e) {}
436
436
  visitGroupBackReference(e) {}
437
437
  visitQuantifier(e) {}
438
- }, we = {}, Te = new class {
438
+ }, Ce = {}, we = new class {
439
439
  constructor() {
440
440
  this.idx = 0, this.input = "", this.groupIdx = 0;
441
441
  }
@@ -467,18 +467,18 @@ var ye = [
467
467
  };
468
468
  for (; this.isRegExpFlag();) switch (this.popChar()) {
469
469
  case "g":
470
- U(n, "global");
470
+ W(n, "global");
471
471
  break;
472
472
  case "i":
473
- U(n, "ignoreCase");
473
+ W(n, "ignoreCase");
474
474
  break;
475
475
  case "m":
476
- U(n, "multiLine");
476
+ W(n, "multiLine");
477
477
  break;
478
478
  case "u":
479
- U(n, "unicode");
479
+ W(n, "unicode");
480
480
  break;
481
- case "y": U(n, "sticky");
481
+ case "y": W(n, "sticky");
482
482
  }
483
483
  if (this.idx !== this.input.length) throw Error("Redundant input: " + this.input.substring(this.idx));
484
484
  return {
@@ -548,7 +548,7 @@ var ye = [
548
548
  case "!": t = "NegativeLookbehind";
549
549
  }
550
550
  }
551
- W(t);
551
+ G(t);
552
552
  let n = this.disjunction();
553
553
  return this.consumeChar(")"), {
554
554
  type: t,
@@ -556,7 +556,7 @@ var ye = [
556
556
  loc: this.loc(e)
557
557
  };
558
558
  }
559
- return he();
559
+ return me();
560
560
  }
561
561
  quantifier(e = !1) {
562
562
  let t, n = this.idx;
@@ -599,9 +599,9 @@ var ye = [
599
599
  }, this.consumeChar("}");
600
600
  }
601
601
  if (!0 === e && t === void 0) return;
602
- W(t);
602
+ G(t);
603
603
  }
604
- if (!0 !== e || t !== void 0) return W(t) ? (this.peekChar(0) === "?" ? (this.consumeChar("?"), t.greedy = !1) : t.greedy = !0, t.type = "Quantifier", t.loc = this.loc(n), t) : void 0;
604
+ if (!0 !== e || t !== void 0) return G(t) ? (this.peekChar(0) === "?" ? (this.consumeChar("?"), t.greedy = !1) : t.greedy = !0, t.type = "Quantifier", t.loc = this.loc(n), t) : void 0;
605
605
  }
606
606
  atom() {
607
607
  let e, t = this.idx;
@@ -617,17 +617,17 @@ var ye = [
617
617
  break;
618
618
  case "(": e = this.group();
619
619
  }
620
- return e === void 0 && this.isPatternCharacter() && (e = this.patternCharacter()), W(e) ? (e.loc = this.loc(t), this.isQuantifier() && (e.quantifier = this.quantifier()), e) : he();
620
+ return e === void 0 && this.isPatternCharacter() && (e = this.patternCharacter()), G(e) ? (e.loc = this.loc(t), this.isQuantifier() && (e.quantifier = this.quantifier()), e) : me();
621
621
  }
622
622
  dotAll() {
623
623
  return this.consumeChar("."), {
624
624
  type: "Set",
625
625
  complement: !0,
626
626
  value: [
627
- H("\n"),
628
- H("\r"),
629
- H("\u2028"),
630
- H("\u2029")
627
+ U("\n"),
628
+ U("\r"),
629
+ U("\u2028"),
630
+ U("\u2029")
631
631
  ]
632
632
  };
633
633
  }
@@ -670,49 +670,49 @@ var ye = [
670
670
  let e, t = !1;
671
671
  switch (this.popChar()) {
672
672
  case "d":
673
- e = _e;
673
+ e = ge;
674
674
  break;
675
675
  case "D":
676
- e = _e, t = !0;
676
+ e = ge, t = !0;
677
677
  break;
678
678
  case "s":
679
- e = ye;
679
+ e = ve;
680
680
  break;
681
681
  case "S":
682
- e = ye, t = !0;
682
+ e = ve, t = !0;
683
683
  break;
684
684
  case "w":
685
- e = ve;
685
+ e = _e;
686
686
  break;
687
- case "W": e = ve, t = !0;
687
+ case "W": e = _e, t = !0;
688
688
  }
689
- return W(e) ? {
689
+ return G(e) ? {
690
690
  type: "Set",
691
691
  value: e,
692
692
  complement: t
693
- } : he();
693
+ } : me();
694
694
  }
695
695
  controlEscapeAtom() {
696
696
  let e;
697
697
  switch (this.popChar()) {
698
698
  case "f":
699
- e = H("\f");
699
+ e = U("\f");
700
700
  break;
701
701
  case "n":
702
- e = H("\n");
702
+ e = U("\n");
703
703
  break;
704
704
  case "r":
705
- e = H("\r");
705
+ e = U("\r");
706
706
  break;
707
707
  case "t":
708
- e = H(" ");
708
+ e = U(" ");
709
709
  break;
710
- case "v": e = H("\v");
710
+ case "v": e = U("\v");
711
711
  }
712
- return W(e) ? {
712
+ return G(e) ? {
713
713
  type: "Character",
714
714
  value: e
715
- } : he();
715
+ } : me();
716
716
  }
717
717
  controlLetterEscapeAtom() {
718
718
  this.consumeChar("c");
@@ -726,7 +726,7 @@ var ye = [
726
726
  nulCharacterAtom() {
727
727
  return this.consumeChar("0"), {
728
728
  type: "Character",
729
- value: H("\0")
729
+ value: U("\0")
730
730
  };
731
731
  }
732
732
  hexEscapeSequenceAtom() {
@@ -738,7 +738,7 @@ var ye = [
738
738
  identityEscapeAtom() {
739
739
  return {
740
740
  type: "Character",
741
- value: H(this.popChar())
741
+ value: U(this.popChar())
742
742
  };
743
743
  }
744
744
  classPatternCharacterAtom() {
@@ -751,7 +751,7 @@ var ye = [
751
751
  case "]": throw Error("TBD");
752
752
  default: return {
753
753
  type: "Character",
754
- value: H(this.popChar())
754
+ value: U(this.popChar())
755
755
  };
756
756
  }
757
757
  }
@@ -759,17 +759,17 @@ var ye = [
759
759
  let e = [], t = !1;
760
760
  for (this.consumeChar("["), this.peekChar(0) === "^" && (this.consumeChar("^"), t = !0); this.isClassAtom();) {
761
761
  let t = this.classAtom();
762
- if (t.type, ge(t) && this.isRangeDash()) {
762
+ if (t.type, he(t) && this.isRangeDash()) {
763
763
  this.consumeChar("-");
764
764
  let n = this.classAtom();
765
- if (n.type, ge(n)) {
765
+ if (n.type, he(n)) {
766
766
  if (n.value < t.value) throw Error("Range out of order in character class");
767
767
  e.push({
768
768
  from: t.value,
769
769
  to: n.value
770
770
  });
771
- } else me(t.value, e), e.push(H("-")), me(n.value, e);
772
- } else me(t.value, e);
771
+ } else pe(t.value, e), e.push(U("-")), pe(n.value, e);
772
+ } else pe(t.value, e);
773
773
  }
774
774
  return this.consumeChar("]"), {
775
775
  type: "Set",
@@ -792,7 +792,7 @@ var ye = [
792
792
  switch (this.consumeChar("\\"), this.peekChar()) {
793
793
  case "b": return this.consumeChar("b"), {
794
794
  type: "Character",
795
- value: H("\b")
795
+ value: U("\b")
796
796
  };
797
797
  case "d":
798
798
  case "D":
@@ -826,14 +826,14 @@ var ye = [
826
826
  }
827
827
  positiveInteger() {
828
828
  let e = this.popChar();
829
- if (!1 === Se.test(e)) throw Error("Expecting a positive integer");
830
- for (; xe.test(this.peekChar(0));) e += this.popChar();
829
+ if (!1 === xe.test(e)) throw Error("Expecting a positive integer");
830
+ for (; be.test(this.peekChar(0));) e += this.popChar();
831
831
  return parseInt(e, 10);
832
832
  }
833
833
  integerIncludingZero() {
834
834
  let e = this.popChar();
835
- if (!1 === xe.test(e)) throw Error("Expecting an integer");
836
- for (; xe.test(this.peekChar(0));) e += this.popChar();
835
+ if (!1 === be.test(e)) throw Error("Expecting an integer");
836
+ for (; be.test(this.peekChar(0));) e += this.popChar();
837
837
  return parseInt(e, 10);
838
838
  }
839
839
  patternCharacter() {
@@ -856,7 +856,7 @@ var ye = [
856
856
  case "|": throw Error("TBD");
857
857
  default: return {
858
858
  type: "Character",
859
- value: H(e)
859
+ value: U(e)
860
860
  };
861
861
  }
862
862
  }
@@ -874,7 +874,7 @@ var ye = [
874
874
  return this.peekChar() === "-" && this.isClassAtom(1);
875
875
  }
876
876
  isDigit() {
877
- return xe.test(this.peekChar(0));
877
+ return be.test(this.peekChar(0));
878
878
  }
879
879
  isClassAtom(e = 0) {
880
880
  switch (this.peekChar(e)) {
@@ -947,7 +947,7 @@ var ye = [
947
947
  let t = "";
948
948
  for (let n = 0; n < e; n++) {
949
949
  let e = this.popChar();
950
- if (!1 === be.test(e)) throw Error("Expecting a HexDecimal digits");
950
+ if (!1 === ye.test(e)) throw Error("Expecting a HexDecimal digits");
951
951
  t += e;
952
952
  }
953
953
  return {
@@ -974,32 +974,32 @@ var ye = [
974
974
  };
975
975
  }
976
976
  }();
977
- function Ee(e) {
977
+ function Te(e) {
978
978
  let t = e.toString();
979
- if (we.hasOwnProperty(t)) return we[t];
979
+ if (Ce.hasOwnProperty(t)) return Ce[t];
980
980
  {
981
- let e = Te.pattern(t);
982
- return we[t] = e, e;
981
+ let e = we.pattern(t);
982
+ return Ce[t] = e, e;
983
983
  }
984
984
  }
985
- var De = "Complement Sets are not supported for first char optimization", Oe = "Unable to use \"first char\" lexer optimizations:\n";
986
- function ke(e, t = !1) {
985
+ var Ee = "Complement Sets are not supported for first char optimization", De = "Unable to use \"first char\" lexer optimizations:\n";
986
+ function Oe(e, t = !1) {
987
987
  try {
988
- let t = Ee(e);
989
- return Ae(t.value, {}, t.flags.ignoreCase);
988
+ let t = Te(e);
989
+ return ke(t.value, {}, t.flags.ignoreCase);
990
990
  } catch (n) {
991
- if (n.message === De) t && O(`${Oe}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);
991
+ if (n.message === Ee) t && O(`${De}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);
992
992
  else {
993
993
  let n = "";
994
- t && (n = "\n This will disable the lexer's first char optimizations.\n See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."), D(`${Oe}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues` + n);
994
+ t && (n = "\n This will disable the lexer's first char optimizations.\n See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."), D(`${De}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues` + n);
995
995
  }
996
996
  }
997
997
  return [];
998
998
  }
999
- function Ae(e, t, n) {
999
+ function ke(e, t, n) {
1000
1000
  switch (e.type) {
1001
1001
  case "Disjunction":
1002
- for (let r = 0; r < e.value.length; r++) Ae(e.value[r], t, n);
1002
+ for (let r = 0; r < e.value.length; r++) ke(e.value[r], t, n);
1003
1003
  break;
1004
1004
  case "Alternative":
1005
1005
  let r = e.value;
@@ -1019,17 +1019,17 @@ function Ae(e, t, n) {
1019
1019
  let a = i;
1020
1020
  switch (a.type) {
1021
1021
  case "Character":
1022
- je(a.value, t, n);
1022
+ Ae(a.value, t, n);
1023
1023
  break;
1024
1024
  case "Set":
1025
- if (!0 === a.complement) throw Error(De);
1025
+ if (!0 === a.complement) throw Error(Ee);
1026
1026
  a.value.forEach((e) => {
1027
- if (typeof e == "number") je(e, t, n);
1027
+ if (typeof e == "number") Ae(e, t, n);
1028
1028
  else {
1029
1029
  let r = e;
1030
- if (!0 === n) for (let e = r.from; e <= r.to; e++) je(e, t, n);
1030
+ if (!0 === n) for (let e = r.from; e <= r.to; e++) Ae(e, t, n);
1031
1031
  else {
1032
- for (let e = r.from; e <= r.to && e < 256; e++) je(e, t, n);
1032
+ for (let e = r.from; e <= r.to && e < 256; e++) Ae(e, t, n);
1033
1033
  if (r.to >= 256) {
1034
1034
  let e = r.from >= 256 ? r.from : 256, n = r.to, i = K(e), a = K(n);
1035
1035
  for (let e = i; e <= a; e++) t[e] = e;
@@ -1039,19 +1039,19 @@ function Ae(e, t, n) {
1039
1039
  });
1040
1040
  break;
1041
1041
  case "Group":
1042
- Ae(a.value, t, n);
1042
+ ke(a.value, t, n);
1043
1043
  break;
1044
1044
  default: throw Error("Non Exhaustive Match");
1045
1045
  }
1046
1046
  let o = a.quantifier !== void 0 && a.quantifier.atLeast === 0;
1047
- if (a.type === "Group" && !1 === Ne(a) || a.type !== "Group" && !1 === o) break;
1047
+ if (a.type === "Group" && !1 === Me(a) || a.type !== "Group" && !1 === o) break;
1048
1048
  }
1049
1049
  break;
1050
1050
  default: throw Error("non exhaustive match!");
1051
1051
  }
1052
1052
  return Object.values(t);
1053
1053
  }
1054
- function je(e, t, n) {
1054
+ function Ae(e, t, n) {
1055
1055
  let r = K(e);
1056
1056
  t[r] = r, !0 === n && function(e, t) {
1057
1057
  let n = String.fromCharCode(e), r = n.toUpperCase();
@@ -1067,7 +1067,7 @@ function je(e, t, n) {
1067
1067
  }
1068
1068
  }(e, t);
1069
1069
  }
1070
- function Me(e, t) {
1070
+ function je(e, t) {
1071
1071
  return e.value.find((e) => {
1072
1072
  if (typeof e == "number") return t.includes(e);
1073
1073
  {
@@ -1076,11 +1076,11 @@ function Me(e, t) {
1076
1076
  }
1077
1077
  });
1078
1078
  }
1079
- function Ne(e) {
1079
+ function Me(e) {
1080
1080
  let t = e.quantifier;
1081
- return !(!t || t.atLeast !== 0) || !!e.value && (Array.isArray(e.value) ? e.value.every(Ne) : Ne(e.value));
1081
+ return !(!t || t.atLeast !== 0) || !!e.value && (Array.isArray(e.value) ? e.value.every(Me) : Me(e.value));
1082
1082
  }
1083
- var Pe = class extends Ce {
1083
+ var Ne = class extends Se {
1084
1084
  constructor(e) {
1085
1085
  super(), this.targetCharCodes = e, this.found = !1;
1086
1086
  }
@@ -1107,12 +1107,12 @@ var Pe = class extends Ce {
1107
1107
  this.targetCharCodes.includes(e.value) && (this.found = !0);
1108
1108
  }
1109
1109
  visitSet(e) {
1110
- e.complement ? Me(e, this.targetCharCodes) === void 0 && (this.found = !0) : Me(e, this.targetCharCodes) !== void 0 && (this.found = !0);
1110
+ e.complement ? je(e, this.targetCharCodes) === void 0 && (this.found = !0) : je(e, this.targetCharCodes) !== void 0 && (this.found = !0);
1111
1111
  }
1112
1112
  };
1113
- function Fe(e, t) {
1113
+ function Pe(e, t) {
1114
1114
  if (t instanceof RegExp) {
1115
- let n = Ee(t), r = new Pe(e);
1115
+ let n = Te(t), r = new Ne(e);
1116
1116
  return r.visit(n), r.found;
1117
1117
  }
1118
1118
  for (let n of t) {
@@ -1121,7 +1121,7 @@ function Fe(e, t) {
1121
1121
  }
1122
1122
  return !1;
1123
1123
  }
1124
- var G = "PATTERN", Ie = "defaultMode";
1124
+ var Fe = "PATTERN", Ie = "defaultMode";
1125
1125
  function Le(e, t) {
1126
1126
  let n = (t = Object.assign({
1127
1127
  safeMode: !1,
@@ -1137,12 +1137,12 @@ function Le(e, t) {
1137
1137
  }
1138
1138
  })();
1139
1139
  }), n("Reject Lexer.NA", () => {
1140
- r = e.filter((e) => e[G] !== J.NA);
1140
+ r = e.filter((e) => e[Fe] !== J.NA);
1141
1141
  });
1142
1142
  let i, a, o, s, c, l, u, d, f, p, m, h = !1;
1143
1143
  n("Transform Patterns", () => {
1144
1144
  h = !1, i = r.map((e) => {
1145
- let t = e[G];
1145
+ let t = e[Fe];
1146
1146
  if (t instanceof RegExp) {
1147
1147
  let e = t.source;
1148
1148
  return e.length !== 1 || e === "^" || e === "$" || e === "." || t.ignoreCase ? e.length !== 2 || e[0] !== "\\" || [
@@ -1189,7 +1189,7 @@ function Le(e, t) {
1189
1189
  }), c = r.map((e) => e.PUSH_MODE), l = r.map((e) => Object.hasOwn(e, "POP_MODE"));
1190
1190
  }), n("Line Terminator Handling", () => {
1191
1191
  let e = qe(t.lineTerminatorCharacters);
1192
- u = r.map((e) => !1), t.positionTracking !== "onlyOffset" && (u = r.map((t) => Object.hasOwn(t, "LINE_BREAKS") ? !!t.LINE_BREAKS : !1 === Ge(t, e) && Fe(e, t.PATTERN)));
1192
+ u = r.map((e) => !1), t.positionTracking !== "onlyOffset" && (u = r.map((t) => Object.hasOwn(t, "LINE_BREAKS") ? !!t.LINE_BREAKS : !1 === Ge(t, e) && Pe(e, t.PATTERN)));
1193
1193
  }), n("Misc Mapping #2", () => {
1194
1194
  d = r.map(He), f = i.map(Ue), p = r.reduce((e, t) => {
1195
1195
  let n = t.GROUP;
@@ -1199,7 +1199,7 @@ function Le(e, t) {
1199
1199
  if (!(e instanceof RegExp) || e.flags !== "") return;
1200
1200
  let t;
1201
1201
  try {
1202
- t = Ee(e);
1202
+ t = Te(e);
1203
1203
  } catch {
1204
1204
  return;
1205
1205
  }
@@ -1244,14 +1244,14 @@ function Le(e, t) {
1244
1244
  t !== i && (t = i, Je(e, i, m[r]));
1245
1245
  });
1246
1246
  } else if (n.PATTERN instanceof RegExp) {
1247
- if (n.PATTERN.unicode) g = !1, t.ensureOptimizations && D(`${Oe}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);
1247
+ if (n.PATTERN.unicode) g = !1, t.ensureOptimizations && D(`${De}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);
1248
1248
  else {
1249
- let i = ke(n.PATTERN, t.ensureOptimizations);
1249
+ let i = Oe(n.PATTERN, t.ensureOptimizations);
1250
1250
  i.length === 0 && (g = !1), i.forEach((t) => {
1251
1251
  Je(e, t, m[r]);
1252
1252
  });
1253
1253
  }
1254
- } else t.ensureOptimizations && D(`${Oe}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`), g = !1;
1254
+ } else t.ensureOptimizations && D(`${De}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`), g = !1;
1255
1255
  return e;
1256
1256
  }, []);
1257
1257
  }), {
@@ -1264,7 +1264,7 @@ function Le(e, t) {
1264
1264
  }
1265
1265
  function Re(e, t) {
1266
1266
  let n = [], r = function(e) {
1267
- let t = e.filter((e) => !Object.hasOwn(e, G));
1267
+ let t = e.filter((e) => !Object.hasOwn(e, Fe));
1268
1268
  return {
1269
1269
  errors: t.map((e) => ({
1270
1270
  message: "Token Type: ->" + e.name + "<- missing static 'PATTERN' property",
@@ -1277,7 +1277,7 @@ function Re(e, t) {
1277
1277
  n = n.concat(r.errors);
1278
1278
  let i = function(e) {
1279
1279
  let t = e.filter((e) => {
1280
- let t = e[G];
1280
+ let t = e[Fe];
1281
1281
  return !(t instanceof RegExp || typeof t == "function" || Object.hasOwn(t, "exec") || typeof t == "string");
1282
1282
  });
1283
1283
  return {
@@ -1290,9 +1290,9 @@ function Re(e, t) {
1290
1290
  };
1291
1291
  }(r.valid), a = i.valid;
1292
1292
  return n = n.concat(i.errors), n = n.concat(function(e) {
1293
- let t = [], n = e.filter((e) => e[G] instanceof RegExp);
1293
+ let t = [], n = e.filter((e) => e[Fe] instanceof RegExp);
1294
1294
  return t = t.concat(function(e) {
1295
- class t extends Ce {
1295
+ class t extends Se {
1296
1296
  constructor() {
1297
1297
  super(...arguments), this.found = !1;
1298
1298
  }
@@ -1303,7 +1303,7 @@ function Re(e, t) {
1303
1303
  return e.filter((e) => {
1304
1304
  let n = e.PATTERN;
1305
1305
  try {
1306
- let e = Ee(n), r = new t();
1306
+ let e = Te(n), r = new t();
1307
1307
  return r.visit(e), r.found;
1308
1308
  } catch {
1309
1309
  return ze.test(n.source);
@@ -1314,7 +1314,7 @@ function Re(e, t) {
1314
1314
  tokenTypes: [e]
1315
1315
  }));
1316
1316
  }(n)), t = t.concat(function(e) {
1317
- class t extends Ce {
1317
+ class t extends Se {
1318
1318
  constructor() {
1319
1319
  super(...arguments), this.found = !1;
1320
1320
  }
@@ -1325,7 +1325,7 @@ function Re(e, t) {
1325
1325
  return e.filter((e) => {
1326
1326
  let n = e.PATTERN;
1327
1327
  try {
1328
- let e = Ee(n), r = new t();
1328
+ let e = Te(n), r = new t();
1329
1329
  return r.visit(e), r.found;
1330
1330
  } catch {
1331
1331
  return Be.test(n.source);
@@ -1337,7 +1337,7 @@ function Re(e, t) {
1337
1337
  }));
1338
1338
  }(n)), t = t.concat(function(e) {
1339
1339
  return e.filter((e) => {
1340
- let t = e[G];
1340
+ let t = e[Fe];
1341
1341
  return t instanceof RegExp && (t.multiline || t.global);
1342
1342
  }).map((e) => ({
1343
1343
  message: "Token Type: ->" + e.name + "<- static 'PATTERN' may NOT contain global('g') or multiline('m')",
@@ -1460,7 +1460,7 @@ function Ge(e, t) {
1460
1460
  if (Object.hasOwn(e, "LINE_BREAKS")) return !1;
1461
1461
  if (e.PATTERN instanceof RegExp) {
1462
1462
  try {
1463
- Fe(t, e.PATTERN);
1463
+ Pe(t, e.PATTERN);
1464
1464
  } catch (e) {
1465
1465
  return {
1466
1466
  issue: q.IDENTIFY_TERMINATOR,
@@ -1617,7 +1617,7 @@ var J = class {
1617
1617
  }(n, this.trackStartLines, this.config.lineTerminatorCharacters));
1618
1618
  }), this.TRACE_INIT("performWarningRuntimeChecks", () => {
1619
1619
  this.lexerDefinitionWarning = this.lexerDefinitionWarning.concat(function(e, t, n) {
1620
- let r = [], i = !1, a = Object.values(e.modes || {}).flat().filter(Boolean).filter((e) => e[G] !== J.NA), o = qe(n);
1620
+ let r = [], i = !1, a = Object.values(e.modes || {}).flat().filter(Boolean).filter((e) => e[Fe] !== J.NA), o = qe(n);
1621
1621
  return t && a.forEach((e) => {
1622
1622
  let t = Ge(e, o);
1623
1623
  if (!1 !== t) {
@@ -1627,7 +1627,7 @@ var J = class {
1627
1627
  tokenType: e
1628
1628
  };
1629
1629
  r.push(n);
1630
- } else Object.hasOwn(e, "LINE_BREAKS") ? !0 === e.LINE_BREAKS && (i = !0) : Fe(o, e.PATTERN) && (i = !0);
1630
+ } else Object.hasOwn(e, "LINE_BREAKS") ? !0 === e.LINE_BREAKS && (i = !0) : Pe(o, e.PATTERN) && (i = !0);
1631
1631
  }), t && !i && r.push({
1632
1632
  message: "Warning: No LINE_BREAKS Found.\n This Lexer has been defined to track line and column information,\n But none of the Token Types can be identified as matching a line terminator.\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n for details.",
1633
1633
  type: q.NO_LINE_BREAKS_FLAGS
@@ -1672,7 +1672,7 @@ var J = class {
1672
1672
  let e = Object.entries(this.canModeBeOptimized).reduce((e, [t, n]) => (!1 === n && e.push(t), e), []);
1673
1673
  if (t.ensureOptimizations && e.length > 0) throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`);
1674
1674
  }), this.TRACE_INIT("clearRegExpParserCache", () => {
1675
- we = {};
1675
+ Ce = {};
1676
1676
  }), this.TRACE_INIT("toFastProperties", () => {
1677
1677
  ae(this);
1678
1678
  });
@@ -1686,14 +1686,14 @@ var J = class {
1686
1686
  return this.tokenizeInternal(e, t);
1687
1687
  }
1688
1688
  tokenizeInternal(e, t) {
1689
- let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _ = e, v = _.length, y = 0, ee = 0, b = this.hasCustom ? 0 : Math.floor(e.length / 10), x = Array(b), te = [], S = this.trackStartLines ? 1 : void 0, C = this.trackStartLines ? 1 : void 0, w = {};
1690
- for (let e = 0; e < this.cachedGroupKeys.length; e++) w[this.cachedGroupKeys[e]] = [];
1691
- let ne = this.trackStartLines, T = this.config.lineTerminatorsPattern, re = 0, E = [], D = [], O = [], ie = [];
1689
+ let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _ = e, ee = _.length, v = 0, te = 0, y = this.hasCustom ? 0 : Math.floor(e.length / 10), ne = Array(y), b = [], x = this.trackStartLines ? 1 : void 0, S = this.trackStartLines ? 1 : void 0, C = {};
1690
+ for (let e = 0; e < this.cachedGroupKeys.length; e++) C[this.cachedGroupKeys[e]] = [];
1691
+ let w = this.trackStartLines, re = this.config.lineTerminatorsPattern, T = 0, E = [], D = [], O = [], ie = [];
1692
1692
  Object.freeze(ie);
1693
1693
  let ae = !1, k = (e) => {
1694
1694
  if (O.length === 1 && e.tokenType.PUSH_MODE === void 0) {
1695
1695
  let t = this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);
1696
- te.push({
1696
+ b.push({
1697
1697
  offset: e.startOffset,
1698
1698
  line: e.startLine,
1699
1699
  column: e.startColumn,
@@ -1703,36 +1703,36 @@ var J = class {
1703
1703
  } else {
1704
1704
  O.pop();
1705
1705
  let e = O.at(-1);
1706
- E = this.patternIdxToConfig[e], D = this.charCodeToPatternIdxToConfig[e], re = E.length;
1706
+ E = this.patternIdxToConfig[e], D = this.charCodeToPatternIdxToConfig[e], T = E.length;
1707
1707
  let t = this.canModeBeOptimized[e] && !1 === this.config.safeMode;
1708
1708
  ae = !(!D || !t);
1709
1709
  }
1710
1710
  };
1711
1711
  function A(e) {
1712
- O.push(e), D = this.charCodeToPatternIdxToConfig[e], E = this.patternIdxToConfig[e], re = E.length;
1712
+ O.push(e), D = this.charCodeToPatternIdxToConfig[e], E = this.patternIdxToConfig[e], T = E.length;
1713
1713
  let t = this.canModeBeOptimized[e] && !1 === this.config.safeMode;
1714
1714
  ae = !(!D || !t);
1715
1715
  }
1716
1716
  let j;
1717
1717
  A.call(this, t);
1718
1718
  let M = this.config.recoveryEnabled;
1719
- for (; y < v;) {
1719
+ for (; v < ee;) {
1720
1720
  s = null, u = -1;
1721
- let t = _.charCodeAt(y), b;
1721
+ let t = _.charCodeAt(v), y;
1722
1722
  if (ae) {
1723
1723
  let e = K(t), n = D[e];
1724
- b = n === void 0 ? ie : n;
1725
- } else b = E;
1726
- let N = b.length;
1724
+ y = n === void 0 ? ie : n;
1725
+ } else y = E;
1726
+ let N = y.length;
1727
1727
  for (n = 0; n < N; n++) {
1728
- j = b[n];
1728
+ j = y[n];
1729
1729
  let r = j.pattern;
1730
1730
  switch (c = null, j.matchType) {
1731
1731
  case 0:
1732
1732
  t === j.short && (u = 1, s = r);
1733
1733
  break;
1734
1734
  case 1:
1735
- g = r.exec(_, y, x, w), g === null ? s = null : (s = g[0], u = s.length, g.payload !== void 0 && (c = g.payload));
1735
+ g = r.exec(_, v, ne, C), g === null ? s = null : (s = g[0], u = s.length, g.payload !== void 0 && (c = g.payload));
1736
1736
  break;
1737
1737
  case 3: {
1738
1738
  let e = j.asciiClass;
@@ -1740,20 +1740,20 @@ var J = class {
1740
1740
  r.lastIndex = 0;
1741
1741
  break;
1742
1742
  }
1743
- let n = y + 1;
1743
+ let n = v + 1;
1744
1744
  for (; e[_.charCodeAt(n)] === 1;) n++;
1745
- u = n - y, r.lastIndex = n;
1745
+ u = n - v, r.lastIndex = n;
1746
1746
  break;
1747
1747
  }
1748
- case 2: r.lastIndex = y, u = this.matchLength(r, e, y);
1748
+ case 2: r.lastIndex = v, u = this.matchLength(r, e, v);
1749
1749
  }
1750
1750
  if (u !== -1) {
1751
1751
  if (o = j.longerAlt, o !== void 0) {
1752
- s = e.substring(y, y + u);
1752
+ s = e.substring(v, v + u);
1753
1753
  let t = o.length;
1754
1754
  for (i = 0; i < t; i++) {
1755
1755
  let t = E[o[i]], n = t.pattern;
1756
- if (l = null, t.matchType === 1 ? (g = n.exec(_, y, x, w), g === null ? a = null : (a = g[0], g.payload !== void 0 && (l = g.payload))) : (n.lastIndex = y, a = this.match(n, e, y)), a && a.length > s.length) {
1756
+ if (l = null, t.matchType === 1 ? (g = n.exec(_, v, ne, C), g === null ? a = null : (a = g[0], g.payload !== void 0 && (l = g.payload))) : (n.lastIndex = v, a = this.match(n, e, v)), a && a.length > s.length) {
1757
1757
  s = a, u = a.length, c = l, j = t;
1758
1758
  break;
1759
1759
  }
@@ -1763,32 +1763,32 @@ var J = class {
1763
1763
  }
1764
1764
  }
1765
1765
  if (u !== -1) {
1766
- if (d = j.group, d !== void 0 && (s = s === null ? e.substring(y, y + u) : s, f = j.tokenTypeIdx, p = this.createTokenInstance(s, y, f, j.tokenType, S, C, u), this.handlePayload(p, c), !1 === d ? ee = this.addToken(x, ee, p) : w[d].push(p)), !0 === ne && !0 === j.canLineTerminator) {
1766
+ if (d = j.group, d !== void 0 && (s = s === null ? e.substring(v, v + u) : s, f = j.tokenTypeIdx, p = this.createTokenInstance(s, v, f, j.tokenType, x, S, u), this.handlePayload(p, c), !1 === d ? te = this.addToken(ne, te, p) : C[d].push(p)), !0 === w && !0 === j.canLineTerminator) {
1767
1767
  let t, n, r = 0;
1768
- T.lastIndex = 0;
1768
+ re.lastIndex = 0;
1769
1769
  do
1770
- s = s === null ? e.substring(y, y + u) : s, t = T.test(s), !0 === t && (n = T.lastIndex - 1, r++);
1770
+ s = s === null ? e.substring(v, v + u) : s, t = re.test(s), !0 === t && (n = re.lastIndex - 1, r++);
1771
1771
  while (!0 === t);
1772
- r === 0 ? C = this.computeNewColumn(C, u) : (S += r, C = u - n, this.updateTokenEndLineColumnLocation(p, d, n, r, S, C, u));
1773
- } else C = this.computeNewColumn(C, u);
1774
- y += u, this.handleModes(j, k, A, p);
1772
+ r === 0 ? S = this.computeNewColumn(S, u) : (x += r, S = u - n, this.updateTokenEndLineColumnLocation(p, d, n, r, x, S, u));
1773
+ } else S = this.computeNewColumn(S, u);
1774
+ v += u, this.handleModes(j, k, A, p);
1775
1775
  } else {
1776
- let t = y, n = S, i = C, a = !1 === M;
1777
- for (; !1 === a && y < v;) for (y++, r = 0; r < re; r++) {
1776
+ let t = v, n = x, i = S, a = !1 === M;
1777
+ for (; !1 === a && v < ee;) for (v++, r = 0; r < T; r++) {
1778
1778
  let t = E[r], n = t.pattern;
1779
1779
  switch (t.matchType) {
1780
1780
  case 0:
1781
- _.charCodeAt(y) === t.short && (a = !0);
1781
+ _.charCodeAt(v) === t.short && (a = !0);
1782
1782
  break;
1783
1783
  case 1:
1784
- a = n.exec(_, y, x, w) !== null;
1784
+ a = n.exec(_, v, ne, C) !== null;
1785
1785
  break;
1786
1786
  case 3:
1787
- case 2: n.lastIndex = y, a = n.exec(e) !== null;
1787
+ case 2: n.lastIndex = v, a = n.exec(e) !== null;
1788
1788
  }
1789
1789
  if (!0 === a) break;
1790
1790
  }
1791
- if (m = y - t, C = this.computeNewColumn(C, m), h = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_, t, m, n, i, O.at(-1)), te.push({
1791
+ if (m = v - t, S = this.computeNewColumn(S, m), h = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_, t, m, n, i, O.at(-1)), b.push({
1792
1792
  offset: t,
1793
1793
  line: n,
1794
1794
  column: i,
@@ -1797,10 +1797,10 @@ var J = class {
1797
1797
  }), !1 === M) break;
1798
1798
  }
1799
1799
  }
1800
- return this.hasCustom || (x.length = ee), {
1801
- tokens: x,
1802
- groups: w,
1803
- errors: te
1800
+ return this.hasCustom || (ne.length = te), {
1801
+ tokens: ne,
1802
+ groups: C,
1803
+ errors: b
1804
1804
  };
1805
1805
  }
1806
1806
  handleModes(e, t, n, r) {
@@ -1912,7 +1912,7 @@ var yt = {
1912
1912
  Object.freeze(yt);
1913
1913
  var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a rule which is not defined: ->" + t.nonTerminalName + "<-\ninside top level rule: ->" + e.name + "<-" }, xt = {
1914
1914
  buildDuplicateFoundError(e, t) {
1915
- let n = e.name, r = t[0], i = r.idx, a = V(r), o = (s = r) instanceof z ? s.terminalType.name : s instanceof A ? s.nonTerminalName : "";
1915
+ let n = e.name, r = t[0], i = r.idx, a = H(r), o = (s = r) instanceof z ? s.terminalType.name : s instanceof A ? s.nonTerminalName : "";
1916
1916
  var s;
1917
1917
  let c = `->${a}${i > 0 ? i : ""}<- ${o ? `with argument: ->${o}<-` : ""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;
1918
1918
  return c = c.replace(/[ \t]+/g, " "), c = c.replace(/\s\s+/g, "\n"), c;
@@ -1927,7 +1927,7 @@ var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1927
1927
  return r += n ? "These alternatives are all empty (match no tokens), making them indistinguishable.\nOnly the last alternative may be empty.\n" : `<${e.prefixPath.map((e) => st(e)).join(", ")}> may appears as a prefix path in all these alternatives.\n`, r += "See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.", r;
1928
1928
  },
1929
1929
  buildEmptyRepetitionError(e) {
1930
- let t = V(e.repetition);
1930
+ let t = H(e.repetition);
1931
1931
  return e.repetition.idx !== 0 && (t += e.repetition.idx), `The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`;
1932
1932
  },
1933
1933
  buildTokenNameError: (e) => "deprecated",
@@ -1942,7 +1942,7 @@ var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1942
1942
  let t;
1943
1943
  return t = e.topLevelRule instanceof j ? e.topLevelRule.name : e.topLevelRule, `Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`;
1944
1944
  }
1945
- }, Z, St = class extends se {
1945
+ }, Z, St = class extends V {
1946
1946
  constructor(e, t) {
1947
1947
  super(), this.nameToTopRule = e, this.errMsgProvider = t, this.errors = [];
1948
1948
  }
@@ -1964,7 +1964,7 @@ var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1964
1964
  });
1965
1965
  }
1966
1966
  }
1967
- }, Ct = class extends le {
1967
+ }, Ct = class extends ce {
1968
1968
  constructor(e, t) {
1969
1969
  super(), this.topProd = e, this.path = t, this.possibleTokTypes = [], this.nextProductionName = "", this.nextProductionOccurrence = 0, this.found = !1, this.isAtEndOfPath = !1;
1970
1970
  }
@@ -1991,10 +1991,10 @@ var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1991
1991
  walkTerminal(e, t, n) {
1992
1992
  if (this.isAtEndOfPath && e.terminalType.name === this.nextTerminalName && e.idx === this.nextTerminalOccurrence && !this.found) {
1993
1993
  let e = new M({ definition: t.concat(n) });
1994
- this.possibleTokTypes = de(e), this.found = !0;
1994
+ this.possibleTokTypes = ue(e), this.found = !0;
1995
1995
  }
1996
1996
  }
1997
- }, Tt = class extends le {
1997
+ }, Tt = class extends ce {
1998
1998
  constructor(e, t) {
1999
1999
  super(), this.topRule = e, this.occurrence = t, this.result = {
2000
2000
  token: void 0,
@@ -2152,7 +2152,7 @@ function Pt(e, t, n) {
2152
2152
  (function(e) {
2153
2153
  e[e.OPTION = 0] = "OPTION", e[e.REPETITION = 1] = "REPETITION", e[e.REPETITION_MANDATORY = 2] = "REPETITION_MANDATORY", e[e.REPETITION_MANDATORY_WITH_SEPARATOR = 3] = "REPETITION_MANDATORY_WITH_SEPARATOR", e[e.REPETITION_WITH_SEPARATOR = 4] = "REPETITION_WITH_SEPARATOR", e[e.ALTERNATION = 5] = "ALTERNATION";
2154
2154
  })(Z ||= {});
2155
- var Ft = class extends le {
2155
+ var Ft = class extends ce {
2156
2156
  constructor(e, t, n) {
2157
2157
  super(), this.topProd = e, this.targetOccurrence = t, this.targetProdType = n;
2158
2158
  }
@@ -2177,7 +2177,7 @@ var Ft = class extends le {
2177
2177
  walkManySep(e, t, n) {
2178
2178
  this.checkIsTarget(e, Z.REPETITION_WITH_SEPARATOR, t, n) || super.walkOption(e, t, n);
2179
2179
  }
2180
- }, It = class extends se {
2180
+ }, It = class extends V {
2181
2181
  constructor(e, t, n) {
2182
2182
  super(), this.targetOccurrence = e, this.targetProdType = t, this.targetRef = n, this.result = [];
2183
2183
  }
@@ -2302,7 +2302,7 @@ function Gt(e, t, n, r) {
2302
2302
  e.accept(n);
2303
2303
  let r = n.allProductions, i = Object.groupBy(r, Kt), a = Object.fromEntries(Object.entries(i).filter(([e, t]) => t.length > 1));
2304
2304
  return Object.values(a).map((n) => {
2305
- let r = n[0], i = t.buildDuplicateFoundError(e, n), a = V(r), o = {
2305
+ let r = n[0], i = t.buildDuplicateFoundError(e, n), a = H(r), o = {
2306
2306
  message: i,
2307
2307
  type: Q.DUPLICATE_PRODUCTIONS,
2308
2308
  ruleName: e.name,
@@ -2353,12 +2353,12 @@ function Gt(e, t, n, r) {
2353
2353
  return i.concat(a, o, s);
2354
2354
  }
2355
2355
  function Kt(e) {
2356
- return `${V(e)}_#_${e.idx}_#_${qt(e)}`;
2356
+ return `${H(e)}_#_${e.idx}_#_${qt(e)}`;
2357
2357
  }
2358
2358
  function qt(e) {
2359
2359
  return e instanceof z ? e.terminalType.name : e instanceof A ? e.nonTerminalName : "";
2360
2360
  }
2361
- var Jt = class extends se {
2361
+ var Jt = class extends V {
2362
2362
  constructor() {
2363
2363
  super(...arguments), this.allProductions = [];
2364
2364
  }
@@ -2415,14 +2415,14 @@ function Xt(e) {
2415
2415
  else if (n instanceof M || n instanceof N || n instanceof P || n instanceof F || n instanceof L || n instanceof I) t = t.concat(Xt(n.definition));
2416
2416
  else if (n instanceof R) t = n.definition.map((e) => Xt(e.definition)).flat();
2417
2417
  else if (!(n instanceof z)) throw Error("non exhaustive match");
2418
- let r = ce(n), i = e.length > 1;
2418
+ let r = se(n), i = e.length > 1;
2419
2419
  if (r && i) {
2420
2420
  let n = e.slice(1);
2421
2421
  return t.concat(Xt(n));
2422
2422
  }
2423
2423
  return t;
2424
2424
  }
2425
- var Zt = class extends se {
2425
+ var Zt = class extends V {
2426
2426
  constructor() {
2427
2427
  super(...arguments), this.alternations = [];
2428
2428
  }
@@ -2662,7 +2662,7 @@ function $t(e, t, n) {
2662
2662
  return o.concat(s);
2663
2663
  });
2664
2664
  }
2665
- var en = class extends se {
2665
+ var en = class extends V {
2666
2666
  constructor() {
2667
2667
  super(...arguments), this.allProductions = [];
2668
2668
  }
@@ -2793,7 +2793,7 @@ var _n = 1024, vn = 1280, yn = 1536, bn = class {
2793
2793
  return a(o[0], s, r);
2794
2794
  }(e.prodOccurrence, e.rule, e.maxLookahead, e.dynamicTokensEnabled, Mt(e.prodType), Pt);
2795
2795
  }
2796
- }, xn = new class extends se {
2796
+ }, xn = new class extends V {
2797
2797
  constructor() {
2798
2798
  super(...arguments), this.dslMethods = {
2799
2799
  option: [],
@@ -2997,7 +2997,7 @@ var zn, Bn = class e {
2997
2997
  let e = function(e) {
2998
2998
  let t = {};
2999
2999
  return e.forEach((e) => {
3000
- let n = new pe(e).startWalking();
3000
+ let n = new fe(e).startWalking();
3001
3001
  Object.assign(t, n);
3002
3002
  }), t;
3003
3003
  }(Object.values(this.gastProductionsCache));
@@ -3112,7 +3112,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3112
3112
  }
3113
3113
  getFollowSetFromFollowKey(e) {
3114
3114
  if (e === mn) return [X];
3115
- let t = e.ruleName + e.idxInCallingRule + fe + e.inRule;
3115
+ let t = e.ruleName + e.idxInCallingRule + de + e.inRule;
3116
3116
  return this.resyncFollows[t];
3117
3117
  }
3118
3118
  addToResyncTokens(e, t) {
@@ -3152,7 +3152,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3152
3152
  }(e);
3153
3153
  t.forEach((t) => {
3154
3154
  let n = t.idx === 0 ? "" : t.idx;
3155
- this.TRACE_INIT(`${V(t)}${n}`, () => {
3155
+ this.TRACE_INIT(`${H(t)}${n}`, () => {
3156
3156
  let n = this.lookaheadStrategy.buildLookaheadForAlternation({
3157
3157
  prodOccurrence: t.idx,
3158
3158
  rule: e,
@@ -3163,15 +3163,15 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3163
3163
  this.setLaFuncCache(this.fullRuleNameToShort[e.name], 256 | t.idx, n);
3164
3164
  });
3165
3165
  }), n.forEach((t) => {
3166
- this.computeLookaheadFunc(e, t.idx, 768, "Repetition", t.maxLookahead, V(t));
3166
+ this.computeLookaheadFunc(e, t.idx, 768, "Repetition", t.maxLookahead, H(t));
3167
3167
  }), r.forEach((t) => {
3168
- this.computeLookaheadFunc(e, t.idx, 512, "Option", t.maxLookahead, V(t));
3168
+ this.computeLookaheadFunc(e, t.idx, 512, "Option", t.maxLookahead, H(t));
3169
3169
  }), i.forEach((t) => {
3170
- this.computeLookaheadFunc(e, t.idx, _n, "RepetitionMandatory", t.maxLookahead, V(t));
3170
+ this.computeLookaheadFunc(e, t.idx, _n, "RepetitionMandatory", t.maxLookahead, H(t));
3171
3171
  }), a.forEach((t) => {
3172
- this.computeLookaheadFunc(e, t.idx, yn, "RepetitionMandatoryWithSeparator", t.maxLookahead, V(t));
3172
+ this.computeLookaheadFunc(e, t.idx, yn, "RepetitionMandatoryWithSeparator", t.maxLookahead, H(t));
3173
3173
  }), o.forEach((t) => {
3174
- this.computeLookaheadFunc(e, t.idx, vn, "RepetitionWithSeparator", t.maxLookahead, V(t));
3174
+ this.computeLookaheadFunc(e, t.idx, vn, "RepetitionWithSeparator", t.maxLookahead, H(t));
3175
3175
  });
3176
3176
  });
3177
3177
  });
@@ -4128,7 +4128,7 @@ var Vn = class extends Bn {
4128
4128
  }
4129
4129
  }, Hn = class e {
4130
4130
  static shared(t) {
4131
- let n = t?.locale ?? m, r = t?.maxColumn ?? Kn, i = t?.maxRow ?? qn, a = Gn.get(n);
4131
+ let n = t?.locale ?? S, r = t?.maxColumn ?? Kn, i = t?.maxRow ?? qn, a = Gn.get(n);
4132
4132
  a || (a = /* @__PURE__ */ new Map(), Gn.set(n, a));
4133
4133
  let o = `${r}:${i}`, s = a.get(o);
4134
4134
  return s || (s = new e({
@@ -4138,7 +4138,7 @@ var Vn = class extends Bn {
4138
4138
  }), a.set(o, s)), s;
4139
4139
  }
4140
4140
  constructor(e) {
4141
- let t = e?.maxColumn ?? Kn, n = e?.maxRow ?? qn, r = e?.locale ?? m;
4141
+ let t = e?.maxColumn ?? Kn, n = e?.maxRow ?? qn, r = e?.locale ?? S;
4142
4142
  this._locale = r, this._maxColumn = t, this._maxRow = n;
4143
4143
  let { separatorFunction: i, separatorColumn: a, separatorRow: o, separatorDecimal: s } = r.separators;
4144
4144
  if (a === o) throw Error(`FormulaLexer: separatorColumn and separatorRow must differ (both '${a}')`);
@@ -4159,11 +4159,11 @@ var Vn = class extends Bn {
4159
4159
  start_chars_hint: Wn
4160
4160
  }), f = Y({
4161
4161
  name: "BracketedString",
4162
- pattern: { exec: _ },
4162
+ pattern: { exec: ne },
4163
4163
  line_breaks: !1,
4164
4164
  start_chars_hint: [91],
4165
4165
  longer_alt: [d, l]
4166
- }), p = (e) => (e ?? []).map((e) => e?.trim()).filter(Boolean).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).map((e) => e + "|").join(""), h = (e) => e.replace(/[A-Za-z]/g, (e) => `[${e.toUpperCase()}${e.toLowerCase()}]`), g = Y({
4166
+ }), p = (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()}]`), h = Y({
4167
4167
  name: "LiteralError",
4168
4168
  pattern: new RegExp(p(r.errorLiterals) + [
4169
4169
  "#PARSE!",
@@ -4182,48 +4182,48 @@ var Vn = class extends Bn {
4182
4182
  "#BUSY!",
4183
4183
  "#PYTHON!",
4184
4184
  "#TIMEOUT!"
4185
- ].map(h).join("|"))
4186
- }), v = Y({
4185
+ ].map(m).join("|"))
4186
+ }), g = Y({
4187
4187
  name: "RefError",
4188
- pattern: new RegExp(p(r.errorRefs) + ["#REF!", "#NAME\\?"].map(h).join("|"))
4189
- }), y = Y({
4188
+ pattern: new RegExp(p(r.errorRefs) + ["#REF!", "#NAME\\?"].map(m).join("|"))
4189
+ }), _ = Y({
4190
4190
  name: "SingleQuotedString",
4191
4191
  pattern: /'(''|[^'])*'/
4192
4192
  }), ee = Y({
4193
4193
  name: "SheetQuoted",
4194
4194
  pattern: /'(?:''|[^'])*?'!/
4195
- }), b = Y({
4195
+ }), v = Y({
4196
4196
  name: "Sheet",
4197
4197
  pattern: /[A-Za-z_.\d\u007F-\uFFFF]*!/
4198
- }), x = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, S = Y({
4198
+ }), y = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, b = Y({
4199
4199
  name: "NamedToken",
4200
4200
  pattern: { exec: (e, t) => {
4201
- x.lastIndex = t;
4202
- let n = x.exec(e);
4201
+ y.lastIndex = t;
4202
+ let n = y.exec(e);
4203
4203
  if (!n) return null;
4204
4204
  let r = n[0], i = r.indexOf(".:");
4205
4205
  return i === -1 ? r.endsWith(":") && (r = r.slice(0, -1)) : r = r.substring(0, i), [r];
4206
4206
  } },
4207
4207
  line_breaks: !1,
4208
4208
  start_chars_hint: Wn
4209
- }), C = Y({
4209
+ }), x = Y({
4210
4210
  name: "Cell",
4211
4211
  pattern: { exec: Xn(t, n) },
4212
4212
  line_breaks: !1,
4213
4213
  start_chars_hint: [36, ...Un],
4214
- longer_alt: S
4215
- }), w = Y({
4214
+ longer_alt: b
4215
+ }), C = Y({
4216
4216
  name: "Column",
4217
4217
  pattern: { exec: Yn(t) },
4218
4218
  line_breaks: !1,
4219
4219
  start_chars_hint: [36, ...Un],
4220
- longer_alt: S
4221
- }), ne = Y({
4220
+ longer_alt: b
4221
+ }), w = Y({
4222
4222
  name: "AbsRow",
4223
4223
  pattern: /[$][0-9]+/
4224
- }), T = s === "." ? "\\." : s, re = Y({
4224
+ }), re = s === "." ? "\\." : s, T = Y({
4225
4225
  name: "NumberToken",
4226
- pattern: RegExp(`[0-9]+${T}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${T}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
4226
+ pattern: RegExp(`[0-9]+${re}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${re}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
4227
4227
  }), E = Y({
4228
4228
  name: "ScientificDigit",
4229
4229
  pattern: /[0-9]+\*\*[+-]?[0-9]+/
@@ -4280,48 +4280,48 @@ var Vn = class extends Bn {
4280
4280
  }), B = Y({
4281
4281
  name: "PlusOp",
4282
4282
  pattern: /\+/
4283
- }), se = Y({
4283
+ }), V = Y({
4284
4284
  name: "DivOp",
4285
4285
  pattern: /\//
4286
- }), ce = Y({
4286
+ }), se = Y({
4287
4287
  name: "MinOp",
4288
4288
  pattern: /-/
4289
- }), V = Y({
4289
+ }), H = Y({
4290
4290
  name: "ImplicitIntersectOp",
4291
4291
  pattern: /@/
4292
- }), le = Y({
4292
+ }), ce = Y({
4293
4293
  name: "ConcatOp",
4294
4294
  pattern: /&/
4295
- }), ue = Y({
4295
+ }), le = Y({
4296
4296
  name: "ExOp",
4297
4297
  pattern: /\^/
4298
- }), de = Y({
4298
+ }), ue = Y({
4299
4299
  name: "PercentOp",
4300
4300
  pattern: /%/
4301
- }), fe = Y({
4301
+ }), de = Y({
4302
4302
  name: "ArrayAnchorOp",
4303
4303
  pattern: /#/,
4304
- longer_alt: [g, v]
4305
- }), pe = Y({
4304
+ longer_alt: [h, g]
4305
+ }), fe = Y({
4306
4306
  name: "GtOp",
4307
4307
  pattern: />/
4308
- }), H = Y({
4308
+ }), U = Y({
4309
4309
  name: "EqOp",
4310
4310
  pattern: /=/
4311
- }), me = Y({
4311
+ }), pe = Y({
4312
4312
  name: "LtOp",
4313
4313
  pattern: /</
4314
- }), U = [
4314
+ }), W = [
4315
4315
  c,
4316
4316
  l,
4317
4317
  ee,
4318
- y,
4319
- b,
4318
+ _,
4319
+ v,
4320
4320
  u,
4321
4321
  d,
4322
4322
  f,
4323
+ h,
4323
4324
  g,
4324
- v,
4325
4325
  ae,
4326
4326
  ...a === i ? [] : [k],
4327
4327
  A,
@@ -4329,16 +4329,16 @@ var Vn = class extends Bn {
4329
4329
  N,
4330
4330
  P,
4331
4331
  j,
4332
- C,
4332
+ x,
4333
4333
  ie,
4334
+ C,
4334
4335
  w,
4335
- ne,
4336
- re,
4336
+ T,
4337
4337
  E,
4338
4338
  D,
4339
- fe,
4340
- V,
4341
- S,
4339
+ de,
4340
+ H,
4341
+ b,
4342
4342
  F,
4343
4343
  I,
4344
4344
  L,
@@ -4346,11 +4346,11 @@ var Vn = class extends Bn {
4346
4346
  z,
4347
4347
  oe,
4348
4348
  B,
4349
+ V,
4349
4350
  se,
4350
4351
  ce,
4351
4352
  le,
4352
4353
  ue,
4353
- de,
4354
4354
  Y({
4355
4355
  name: "NeqOp",
4356
4356
  pattern: /<>/
@@ -4363,15 +4363,15 @@ var Vn = class extends Bn {
4363
4363
  name: "LteOp",
4364
4364
  pattern: /<=/
4365
4365
  }),
4366
- pe,
4367
- H,
4368
- me
4366
+ fe,
4367
+ U,
4368
+ pe
4369
4369
  ];
4370
- this._lexer = new J(U, { ensureOptimizations: !0 });
4371
- let W = {};
4372
- U.forEach((e) => {
4373
- W[e.name] = e;
4374
- }), a === i && (W.ColSeparator = ae), this._vocabulary = W;
4370
+ this._lexer = new J(W, { ensureOptimizations: !0 });
4371
+ let G = {};
4372
+ W.forEach((e) => {
4373
+ G[e.name] = e;
4374
+ }), a === i && (G.ColSeparator = ae), this._vocabulary = G;
4375
4375
  }
4376
4376
  tokenize(e, t = !0) {
4377
4377
  let n = this._lexer.tokenize(e);
@@ -4469,7 +4469,7 @@ function Zn(e) {
4469
4469
  return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
4470
4470
  }
4471
4471
  var Qn = class {
4472
- constructor(e = m) {
4472
+ constructor(e = S) {
4473
4473
  let t = function(e) {
4474
4474
  let t = [...n];
4475
4475
  if (e) for (let n of Object.values(e)) {
@@ -4518,52 +4518,52 @@ var Qn = class {
4518
4518
  return this._lexer.tokenize(e);
4519
4519
  }
4520
4520
  }, $n = class extends Vn {
4521
- constructor(e = m) {
4522
- let t = new Qn(e), n = t.getVocabulary();
4523
- super(n, {
4521
+ constructor(t = S) {
4522
+ let n = new Qn(t), r = n.getVocabulary();
4523
+ super(r, {
4524
4524
  nodeLocationTracking: "none",
4525
4525
  maxLookahead: 2,
4526
4526
  skipValidations: !0,
4527
4527
  recoveryEnabled: !1
4528
- }), this._lexer = t;
4529
- let { TableSpecifier: r, BracketedColumn: i, BareSpecifier: a, ColumnSep: o, ListSep: s } = n, c = this;
4530
- c.RULE("ruleContent", () => {
4531
- let e = [], t = c.SUBRULE(c.ruleItem);
4532
- return c.ACTION(() => {
4528
+ }), this._lexer = n;
4529
+ let { TableSpecifier: i, BracketedColumn: a, BareSpecifier: o, ColumnSep: s, ListSep: c } = r, l = this;
4530
+ l.RULE("ruleContent", () => {
4531
+ let e = [], t = l.SUBRULE(l.ruleItem);
4532
+ return l.ACTION(() => {
4533
4533
  t && e.push(t);
4534
- }), c.MANY(() => {
4535
- c.CONSUME(s), c.OPTION(() => {
4536
- let t = c.SUBRULE2(c.ruleItem);
4537
- c.ACTION(() => {
4534
+ }), l.MANY(() => {
4535
+ l.CONSUME(c), l.OPTION(() => {
4536
+ let t = l.SUBRULE2(l.ruleItem);
4537
+ l.ACTION(() => {
4538
4538
  t && e.push(t);
4539
4539
  });
4540
4540
  });
4541
4541
  }), e;
4542
- }), c.RULE("ruleItem", () => c.OR([{ ALT: () => c.SUBRULE(c.ruleSpecifier) }, { ALT: () => c.SUBRULE(c.ruleColumnOrRange) }])), c.RULE("ruleSpecifier", () => c.OR([{ ALT: () => {
4543
- let t = c.CONSUME(r);
4544
- return c.ACTION(() => {
4545
- let n = w(t.image, e);
4546
- return n.image = t.image, n;
4542
+ }), l.RULE("ruleItem", () => l.OR([{ ALT: () => l.SUBRULE(l.ruleSpecifier) }, { ALT: () => l.SUBRULE(l.ruleColumnOrRange) }])), l.RULE("ruleSpecifier", () => l.OR([{ ALT: () => {
4543
+ let n = l.CONSUME(i);
4544
+ return l.ACTION(() => {
4545
+ let r = e(n.image, t);
4546
+ return r.image = n.image, r;
4547
4547
  });
4548
4548
  } }, { ALT: () => {
4549
- let t = c.CONSUME(a);
4550
- return c.ACTION(() => {
4551
- let n = w(t.image, e);
4552
- return n.image = t.image, n;
4549
+ let n = l.CONSUME(o);
4550
+ return l.ACTION(() => {
4551
+ let r = e(n.image, t);
4552
+ return r.image = n.image, r;
4553
4553
  });
4554
- } }])), c.RULE("ruleColumnOrRange", () => {
4555
- let e = c.CONSUME(i), t, n;
4556
- return c.OPTION(() => {
4557
- t = c.CONSUME(o), n = c.CONSUME2(i);
4558
- }), c.ACTION(() => {
4559
- let r = h(e.image);
4554
+ } }])), l.RULE("ruleColumnOrRange", () => {
4555
+ let e = l.CONSUME(a), t, n;
4556
+ return l.OPTION(() => {
4557
+ t = l.CONSUME(s), n = l.CONSUME2(a);
4558
+ }), l.ACTION(() => {
4559
+ let r = v(e.image);
4560
4560
  if (r.image = e.image, !n) return r;
4561
- let i = h(n.image);
4561
+ let i = v(n.image);
4562
4562
  i.image = n.image;
4563
- let a = S(":", r, i, !0);
4563
+ let a = T(":", r, i, !0);
4564
4564
  return a.image = t?.image ?? ":", a;
4565
4565
  });
4566
- }), c.performSelfAnalysis();
4566
+ }), l.performSelfAnalysis();
4567
4567
  }
4568
4568
  _parseInner(e) {
4569
4569
  let t = this._lexer.tokenize(e);
@@ -4577,23 +4577,23 @@ var Qn = class {
4577
4577
  if (n === "@") {
4578
4578
  let e = t.slice(1).trim();
4579
4579
  if (!e) {
4580
- let e = g("@", null, !0);
4580
+ let e = c("@", null, !0);
4581
4581
  return e.image = "@", [e];
4582
4582
  }
4583
4583
  if (e.charAt(0) === "[") {
4584
4584
  let t = this._parseInner(e);
4585
4585
  if (t.length === 1 && t[0].type === "infix") {
4586
- let e = g("@", t[0], !0);
4586
+ let e = c("@", t[0], !0);
4587
4587
  return e.image = "@", [e];
4588
4588
  }
4589
4589
  }
4590
- let n = h(e);
4590
+ let n = v(e);
4591
4591
  n.image = e;
4592
- let r = g("@", n, !0);
4592
+ let r = c("@", n, !0);
4593
4593
  return r.image = "@", [r];
4594
4594
  }
4595
4595
  if (n !== "[" && n !== "#") {
4596
- let t = h(e);
4596
+ let t = v(e);
4597
4597
  return t.image = e, [t];
4598
4598
  }
4599
4599
  return this._parseInner(t);
@@ -4601,7 +4601,7 @@ var Qn = class {
4601
4601
  parse(e, t, n) {
4602
4602
  this.reset();
4603
4603
  let r = () => ({
4604
- root: x("", []),
4604
+ root: f("", []),
4605
4605
  errors: []
4606
4606
  });
4607
4607
  if (!n) return r();
@@ -4614,7 +4614,7 @@ var Qn = class {
4614
4614
  if (a === -1) return r();
4615
4615
  let o = n.slice(0, a), s = n.slice(a + 1, -1), c = this._parseContent(s);
4616
4616
  return {
4617
- root: x(o, c),
4617
+ root: f(o, c),
4618
4618
  errors: this.errors.length > 0 ? [...this.errors] : []
4619
4619
  };
4620
4620
  }
@@ -4629,7 +4629,7 @@ var Qn = class {
4629
4629
  ":."
4630
4630
  ]), nr = (e) => {
4631
4631
  if (!e) return null;
4632
- if (e.type === T.Cell) {
4632
+ if (e.type === w.Cell) {
4633
4633
  let t = e.value;
4634
4634
  return t.rowIndex === -(2 ** 53 - 1) ? "col" : t.colIndex === -(2 ** 53 - 1) ? "row" : null;
4635
4635
  }
@@ -4659,70 +4659,70 @@ var sr = {
4659
4659
  return e.expected === X && t ? `Unexpected '${t}'` : yt.buildMismatchTokenMessage(e);
4660
4660
  }
4661
4661
  }, cr = class extends Vn {
4662
- constructor(n) {
4663
- let m = n?.lexer ?? Hn.shared(n?.lexerOptions), h = m.getVocabulary();
4664
- super(h, {
4662
+ constructor(e) {
4663
+ let n = e?.lexer ?? Hn.shared(e?.lexerOptions), f = n.getVocabulary();
4664
+ super(f, {
4665
4665
  skipValidations: !0,
4666
4666
  recoveryEnabled: !0,
4667
- ...n,
4667
+ ...e,
4668
4668
  nodeLocationTracking: "full",
4669
4669
  errorMessageProvider: sr,
4670
4670
  maxLookahead: 1
4671
4671
  }), this._ruleInfixOp = this.RULE("ruleInfixOp", () => {
4672
- let { PlusOp: e, MinOp: t, MulOp: n, DivOp: r, ExOp: i, ConcatOp: a, GtOp: s, EqOp: c, LtOp: l, NeqOp: u, GteOp: d, LteOp: f } = this._vocab, p = [];
4673
- return p.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
4674
- let o = this.OR(this._c1 ||= [
4672
+ let { PlusOp: e, MinOp: t, MulOp: n, DivOp: r, ExOp: i, ConcatOp: a, GtOp: o, EqOp: s, LtOp: c, NeqOp: l, GteOp: u, LteOp: d } = this._vocab, f = [];
4673
+ return f.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
4674
+ let p = this.OR(this._c1 ||= [
4675
4675
  { ALT: () => this.CONSUME(e).image },
4676
4676
  { ALT: () => this.CONSUME(t).image },
4677
4677
  { ALT: () => this.CONSUME(n).image },
4678
4678
  { ALT: () => this.CONSUME(r).image },
4679
4679
  { ALT: () => this.CONSUME(i).image },
4680
4680
  { ALT: () => this.CONSUME(a).image },
4681
+ { ALT: () => this.CONSUME(o).image },
4681
4682
  { ALT: () => this.CONSUME(s).image },
4682
4683
  { ALT: () => this.CONSUME(c).image },
4683
4684
  { ALT: () => this.CONSUME(l).image },
4684
4685
  { ALT: () => this.CONSUME(u).image },
4685
- { ALT: () => this.CONSUME(d).image },
4686
- { ALT: () => this.CONSUME(f).image }
4686
+ { ALT: () => this.CONSUME(d).image }
4687
4687
  ]), m = {
4688
- value: o,
4688
+ value: p,
4689
4689
  index: this.getLexerPosition(),
4690
- isRange: ee.includes(o)
4690
+ isRange: C.includes(p)
4691
4691
  }, h = this.SUBRULE2(this._rulePostfixOp);
4692
- p.push({
4692
+ f.push({
4693
4693
  op: m,
4694
4694
  node: h
4695
4695
  });
4696
4696
  }), this.ACTION(() => {
4697
- let e = p.length - 1, t = o.length;
4697
+ let e = f.length - 1, t = x.length;
4698
4698
  for (let n = 0; e > 0 && n < t; n++) {
4699
- let t = o[n], r = 1;
4700
- for (; r < p.length;) {
4701
- let n = p[r].op;
4699
+ let t = x[n], r = 1;
4700
+ for (; r < f.length;) {
4701
+ let n = f[r].op;
4702
4702
  if (t.includes(n.value)) {
4703
- let t = p[r - 1].node, i = p[r].node, a = S(n.value, t, i, n.isRange);
4704
- a = this._tag(a, n.index), p[r - 1].node = a, p.splice(r, 1), e--;
4703
+ let t = f[r - 1].node, i = f[r].node, a = T(n.value, t, i, n.isRange);
4704
+ a = this._tag(a, n.index), f[r - 1].node = a, f.splice(r, 1), e--;
4705
4705
  } else r++;
4706
4706
  }
4707
4707
  }
4708
- }), p[0].node;
4708
+ }), f[0].node;
4709
4709
  }), this._rulePlusMinusOp = this.RULE("rulePlusMinusOp", () => {
4710
4710
  let { PlusOp: e, MinOp: t } = this._vocab;
4711
4711
  return this.OR([{ ALT: () => this.CONSUME(e) }, { ALT: () => this.CONSUME(t) }]);
4712
4712
  }), this._rulePostfixOp = this.RULE("rulePostfixOp", () => {
4713
- let { PercentOp: t } = this._vocab, n = this.SUBRULE(this._rulePrefixOp), r = [];
4713
+ let { PercentOp: e } = this._vocab, t = this.SUBRULE(this._rulePrefixOp), n = [];
4714
4714
  return this.MANY(() => {
4715
- let e = this.CONSUME(t).image;
4715
+ let t = this.CONSUME(e).image;
4716
4716
  this.ACTION(() => {
4717
- r.push([e, this.getLexerPosition()]);
4717
+ n.push([t, this.getLexerPosition()]);
4718
4718
  });
4719
4719
  }), this.ACTION(() => {
4720
- let t = r.length;
4721
- if (t !== 0) for (let i = 0; i < t; i++) {
4722
- let t = r[i], a = t[0], o = t[1], s = ee.includes(a);
4723
- n = e(a, n, s), n = this._tag(n, o);
4720
+ let e = n.length;
4721
+ if (e !== 0) for (let r = 0; r < e; r++) {
4722
+ let e = n[r], a = e[0], o = e[1], s = C.includes(a);
4723
+ t = i(a, t, s), t = this._tag(t, o);
4724
4724
  }
4725
- }), n;
4725
+ }), t;
4726
4726
  }), this._rulePrefixOp = this.RULE("rulePrefixOp", () => {
4727
4727
  let { PlusOp: e, MinOp: t, ImplicitIntersectOp: n } = this._vocab, r = [];
4728
4728
  this.MANY(() => {
@@ -4739,26 +4739,26 @@ var sr = {
4739
4739
  return this.ACTION(() => {
4740
4740
  let e = r.length;
4741
4741
  if (e !== 0) for (let t = e - 1; t >= 0; t--) {
4742
- let e = r[t], n = e[0], a = e[1], o = ee.includes(n);
4743
- i = g(n, i, o), i = this._tag(i, a);
4742
+ let e = r[t], n = e[0], a = e[1], o = C.includes(n);
4743
+ i = c(n, i, o), i = this._tag(i, a);
4744
4744
  }
4745
4745
  }), i;
4746
4746
  }), this._ruleRangeOp = this.RULE("ruleRangeOp", () => {
4747
- let { RangeOp: t, RangeTrimFullOp: n, RangeTrimLeadingOp: r, RangeTrimTrailingOp: i, ArrayAnchorOp: a } = this._vocab, o = [];
4747
+ let { RangeOp: e, RangeTrimFullOp: t, RangeTrimLeadingOp: n, RangeTrimTrailingOp: r, ArrayAnchorOp: a } = this._vocab, o = [];
4748
4748
  return o.push({ node: this.SUBRULE(this._ruleCallOp) }), this.MANY2(() => {
4749
4749
  this.CONSUME(a), o.push({ anchor: this.getLexerPosition() });
4750
4750
  }), this.MANY(() => {
4751
- let e = {
4751
+ let i = {
4752
4752
  value: this.OR(this._c2 ||= [
4753
+ { ALT: () => this.CONSUME(e).image },
4753
4754
  { ALT: () => this.CONSUME(t).image },
4754
4755
  { ALT: () => this.CONSUME(n).image },
4755
- { ALT: () => this.CONSUME(r).image },
4756
- { ALT: () => this.CONSUME(i).image }
4756
+ { ALT: () => this.CONSUME(r).image }
4757
4757
  ]),
4758
4758
  index: this.getLexerPosition()
4759
4759
  }, s = this.SUBRULE2(this._ruleCallOp);
4760
4760
  o.push({
4761
- op: e,
4761
+ op: i,
4762
4762
  node: s
4763
4763
  }), this.MANY3(() => {
4764
4764
  this.CONSUME2(a), o.push({ anchor: this.getLexerPosition() });
@@ -4768,16 +4768,16 @@ var sr = {
4768
4768
  let t = o[e], n = o[e + 1];
4769
4769
  if (t.op?.value !== ":" || n.op?.value !== ":") continue;
4770
4770
  let r = nr(t.node);
4771
- r && nr(n.node) === r && nr(o[e - 1].node) !== r && (t.node = this._tag(S(":", t.node, n.node, !0), n.op.index), o.splice(e + 1, 1));
4771
+ r && nr(n.node) === r && nr(o[e - 1].node) !== r && (t.node = this._tag(T(":", t.node, n.node, !0), n.op.index), o.splice(e + 1, 1));
4772
4772
  }
4773
- for (let t = 1; t < o.length; t++) {
4774
- let n = o[t];
4775
- if (n.anchor !== void 0) {
4776
- o[0].node = this._tag(e("#", o[0].node, !0), n.anchor);
4773
+ for (let e = 1; e < o.length; e++) {
4774
+ let t = o[e];
4775
+ if (t.anchor !== void 0) {
4776
+ o[0].node = this._tag(i("#", o[0].node, !0), t.anchor);
4777
4777
  continue;
4778
4778
  }
4779
- let r = n.op, i = S(r.value, o[0].node, n.node, !0);
4780
- i = this._tag(i, r.index), o[0].node = i;
4779
+ let n = t.op, r = T(n.value, o[0].node, t.node, !0);
4780
+ r = this._tag(r, n.index), o[0].node = r;
4781
4781
  }
4782
4782
  }), o[0].node;
4783
4783
  }), this._ruleCallOp = this.RULE("ruleCallOp", () => {
@@ -4789,7 +4789,7 @@ var sr = {
4789
4789
  },
4790
4790
  DEF: () => {
4791
4791
  this.CONSUME(e);
4792
- let r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), a = n, o = this.ACTION(() => this._tag(l(a, i), r)), s = this.OPTION(() => this.CONSUME(t));
4792
+ let r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), a = n, o = this.ACTION(() => this._tag(d(a, i), r)), s = this.OPTION(() => this.CONSUME(t));
4793
4793
  this.ACTION(() => {
4794
4794
  s || this._reportError(o, "Missing closing parenthesis ')'", r), this._tagClose(o, this.getLexerPosition()), n = o;
4795
4795
  });
@@ -4811,7 +4811,7 @@ var sr = {
4811
4811
  for (; e.length > 1;) {
4812
4812
  let t = e.length - 1;
4813
4813
  for (let n = 0; n < t; n++) {
4814
- let r = e[n], i = e[n + 1], a = S(" ", r, i, !0), o = this._tokenMap.get(r);
4814
+ let r = e[n], i = e[n + 1], a = T(" ", r, i, !0), o = this._tokenMap.get(r);
4815
4815
  o && delete o.tokenIndexClose;
4816
4816
  let s = this._tokenMap.get(i), c = s?.tokenIndex;
4817
4817
  if (c !== void 0) {
@@ -4841,78 +4841,78 @@ var sr = {
4841
4841
  }), t;
4842
4842
  }), this._ruleParen = this.RULE("ruleParen", () => {
4843
4843
  let { OpenParen: e, CloseParen: t } = this._vocab;
4844
- return this._processParen(T.Paren, e, t);
4844
+ return this._processParen(w.Paren, e, t);
4845
4845
  }), this._ruleLiteralArray = this.RULE("ruleLiteralArray", () => {
4846
- let { OpenCurlyParen: e, CloseCurlyParen: t, ColSeparator: n, RowSeparator: r } = this._vocab, a = d();
4846
+ let { OpenCurlyParen: e, CloseCurlyParen: n, ColSeparator: r, RowSeparator: i } = this._vocab, o = a();
4847
4847
  this.CONSUME(e);
4848
- let o = this.getLexerPosition(), s = this.ACTION(() => this._tag(i(a), o)), c = this.SUBRULE(this._ruleLiteralForArray);
4848
+ let s = this.getLexerPosition(), c = this.ACTION(() => this._tag(t(o), s)), l = this.SUBRULE(this._ruleLiteralForArray);
4849
4849
  this.ACTION(() => {
4850
- a.value.push(c);
4850
+ o.value.push(l);
4851
4851
  }), this.MANY(() => {
4852
4852
  let e = !1;
4853
4853
  this.OR([{ ALT: () => {
4854
- this.CONSUME(n), e = !0;
4855
- } }, { ALT: () => this.CONSUME(r) }]);
4854
+ this.CONSUME(r), e = !0;
4855
+ } }, { ALT: () => this.CONSUME(i) }]);
4856
4856
  let t = this.SUBRULE2(this._ruleLiteralForArray);
4857
4857
  this.ACTION(() => {
4858
- e || (a = d(), s.value.push(a)), a.value.push(t);
4858
+ e || (o = a(), c.value.push(o)), o.value.push(t);
4859
4859
  });
4860
4860
  });
4861
- let l = this.OPTION(() => this.CONSUME(t));
4862
- return s = this.ACTION(() => (l || this._reportError(s, "Missing closing parenthesis '}'", o), this._tagClose(s, this.getLexerPosition()))), s;
4861
+ let u = this.OPTION(() => this.CONSUME(n));
4862
+ return c = this.ACTION(() => (u || this._reportError(c, "Missing closing parenthesis '}'", s), this._tagClose(c, this.getLexerPosition()))), c;
4863
4863
  }), this._ruleLiteralForArray = this.RULE("ruleLiteralForArray", () => {
4864
- let { StringToken: e, BooleanToken: n, LiteralError: r, RefError: i } = this._vocab;
4864
+ let { StringToken: e, BooleanToken: t, LiteralError: n, RefError: r } = this._vocab;
4865
4865
  return this.OR([
4866
4866
  { ALT: () => {
4867
- let e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), n = this.ACTION(() => this._tag(s(t.image, this._locale), this.getLexerPosition()));
4868
- return this.ACTION(() => e ? ne(e.image, n) : n);
4867
+ let e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), n = this.ACTION(() => this._tag(g(t.image, this._locale), this.getLexerPosition()));
4868
+ return this.ACTION(() => e ? re(e.image, n) : n);
4869
4869
  } },
4870
4870
  { ALT: () => {
4871
4871
  let t = this.CONSUME(e);
4872
- return this.ACTION(() => this._tag(y(t.image), this.getLexerPosition()));
4872
+ return this.ACTION(() => this._tag(_(t.image), this.getLexerPosition()));
4873
4873
  } },
4874
4874
  { ALT: () => {
4875
- let e = this.CONSUME(n);
4876
- return this.ACTION(() => this._tag(t(e.image, this._locale), this.getLexerPosition()));
4875
+ let e = this.CONSUME(t);
4876
+ return this.ACTION(() => this._tag(u(e.image, this._locale), this.getLexerPosition()));
4877
4877
  } },
4878
4878
  { ALT: () => {
4879
- let e = this.CONSUME(r);
4880
- return this.ACTION(() => this._tag(f(e.image, this._locale), this.getLexerPosition()));
4879
+ let e = this.CONSUME(n);
4880
+ return this.ACTION(() => this._tag(h(e.image, this._locale), this.getLexerPosition()));
4881
4881
  } },
4882
4882
  { ALT: () => {
4883
- let e = this.CONSUME(i);
4884
- return this.ACTION(() => this._tag(b(e.image, this._locale), this.getLexerPosition()));
4883
+ let e = this.CONSUME(r);
4884
+ return this.ACTION(() => this._tag(s(e.image, this._locale), this.getLexerPosition()));
4885
4885
  } }
4886
4886
  ]);
4887
4887
  }), this._ruleLiteral = this.RULE("ruleLiteral", () => {
4888
- let { StringToken: e, BooleanToken: n, LiteralError: r, RefError: i } = this._vocab;
4888
+ let { StringToken: e, BooleanToken: t, LiteralError: n, RefError: r } = this._vocab;
4889
4889
  return this.OR([
4890
4890
  { ALT: () => {
4891
4891
  let e = this.SUBRULE(this._ruleNumber);
4892
- return this.ACTION(() => this._tag(s(e.image, this._locale), this.getLexerPosition()));
4892
+ return this.ACTION(() => this._tag(g(e.image, this._locale), this.getLexerPosition()));
4893
4893
  } },
4894
4894
  { ALT: () => {
4895
4895
  let t = this.CONSUME(e);
4896
- return this.ACTION(() => this._tag(y(t.image), this.getLexerPosition()));
4896
+ return this.ACTION(() => this._tag(_(t.image), this.getLexerPosition()));
4897
4897
  } },
4898
4898
  { ALT: () => {
4899
- let e = this.CONSUME(n);
4900
- return this.ACTION(() => this._tag(t(e.image, this._locale), this.getLexerPosition()));
4899
+ let e = this.CONSUME(t);
4900
+ return this.ACTION(() => this._tag(u(e.image, this._locale), this.getLexerPosition()));
4901
4901
  } },
4902
4902
  { ALT: () => {
4903
- let e = this.CONSUME(r);
4904
- return this.ACTION(() => this._tag(f(e.image, this._locale), this.getLexerPosition()));
4903
+ let e = this.CONSUME(n);
4904
+ return this.ACTION(() => this._tag(h(e.image, this._locale), this.getLexerPosition()));
4905
4905
  } },
4906
4906
  { ALT: () => {
4907
- let e = this.CONSUME(i);
4908
- return this.ACTION(() => this._tag(b(e.image, this._locale), this.getLexerPosition()));
4907
+ let e = this.CONSUME(r);
4908
+ return this.ACTION(() => this._tag(s(e.image, this._locale), this.getLexerPosition()));
4909
4909
  } }
4910
4910
  ]);
4911
4911
  }), this._ruleFunction = this.RULE("ruleFunction", () => {
4912
4912
  let { FunctionToken: e, OpenParen: t, CloseParen: n } = this._vocab, r = this.CONSUME(e).image, i = this.getLexerPosition();
4913
4913
  this.CONSUME(t);
4914
- let o = this.SUBRULE(this._ruleFunctionArguments), s = this.ACTION(() => this._tag(a(r, o), i)), c = this.OPTION(() => this.CONSUME(n));
4915
- return s = this.ACTION(() => (c || this._reportError(s, "Missing closing parenthesis ')'", i), this._tagClose(s, this.getLexerPosition()))), s;
4914
+ let a = this.SUBRULE(this._ruleFunctionArguments), o = this.ACTION(() => this._tag(p(r, a), i)), s = this.OPTION(() => this.CONSUME(n));
4915
+ return o = this.ACTION(() => (s || this._reportError(o, "Missing closing parenthesis ')'", i), this._tagClose(o, this.getLexerPosition()))), o;
4916
4916
  }), this._ruleFunctionArguments = this.RULE("ruleFunctionArguments", () => {
4917
4917
  let { ArgSeparator: e, CloseParen: t } = this._vocab, n = [];
4918
4918
  return this.OPTION({
@@ -4921,11 +4921,11 @@ var sr = {
4921
4921
  let t;
4922
4922
  this.OPTION2(() => {
4923
4923
  t = this.SUBRULE(this._ruleIntersectOp);
4924
- }), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), n.push(t), this.MANY(() => {
4924
+ }), t = this.ACTION(() => t ?? this._tagClose(l(), this.getLexerPosition())), n.push(t), this.MANY(() => {
4925
4925
  let t;
4926
4926
  this.CONSUME(e), this.OPTION3(() => {
4927
4927
  t = this.SUBRULE2(this._ruleIntersectOp);
4928
- }), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), n.push(t);
4928
+ }), t = this.ACTION(() => t ?? this._tagClose(l(), this.getLexerPosition())), n.push(t);
4929
4929
  });
4930
4930
  }
4931
4931
  }), n;
@@ -4944,56 +4944,56 @@ var sr = {
4944
4944
  return this._tag(e.root, n);
4945
4945
  });
4946
4946
  }), this._ruleReference = this.RULE("ruleReference", () => {
4947
- let { Sheet: e, SheetQuoted: t, DivOp: n, MulOp: r, PlusOp: i, MinOp: a, ArgSeparator: o, Cell: s, NamedToken: l, SingleQuotedString: d, Column: f, AbsRow: m, DigitToken: h, RefError: g } = this._vocab, _, v;
4947
+ let { Sheet: e, SheetQuoted: t, DivOp: n, MulOp: i, PlusOp: a, MinOp: c, ArgSeparator: l, Cell: u, NamedToken: d, SingleQuotedString: f, Column: p, AbsRow: h, DigitToken: g, RefError: _ } = this._vocab, v, te;
4948
4948
  this.OPTION2({
4949
4949
  GATE: () => {
4950
- for (let s = 1; s < 6; s++) {
4951
- let c = this.LA(s);
4952
- if (c.tokenType === e || c.tokenType === t) return !0;
4953
- if (c.image === "" || c.image === ")" || c.tokenType === n || c.tokenType === r || c.tokenType === i || c.tokenType === a || c.tokenType === o) break;
4950
+ for (let r = 1; r < 6; r++) {
4951
+ let o = this.LA(r);
4952
+ if (o.tokenType === e || o.tokenType === t) return !0;
4953
+ if (o.image === "" || o.image === ")" || o.tokenType === n || o.tokenType === i || o.tokenType === a || o.tokenType === c || o.tokenType === l) break;
4954
4954
  }
4955
4955
  return !1;
4956
4956
  },
4957
4957
  DEF: () => {
4958
- v = this.getLexerPosition() + 1, _ = this.SUBRULE(this._rulePrefixSheetName);
4958
+ te = this.getLexerPosition() + 1, v = this.SUBRULE(this._rulePrefixSheetName);
4959
4959
  }
4960
4960
  });
4961
4961
  let y = this.OR([
4962
4962
  { ALT: () => {
4963
- let e = this.CONSUME(s), t = this.getLexerPosition();
4964
- return this.ACTION(() => this._tag(c(e.image, this.rowIndex, this.colIndex), t));
4963
+ let e = this.CONSUME(u), t = this.getLexerPosition();
4964
+ return this.ACTION(() => this._tag(r(e.image, this.rowIndex, this.colIndex), t));
4965
4965
  } },
4966
4966
  { ALT: () => {
4967
- let e = this.OR2([{ ALT: () => this.CONSUME(l) }, { ALT: () => this.CONSUME(d) }]);
4968
- return this.ACTION(() => this._tag(p(e.image), this.getLexerPosition()));
4967
+ let e = this.OR2([{ ALT: () => this.CONSUME(d) }, { ALT: () => this.CONSUME(f) }]);
4968
+ return this.ACTION(() => this._tag(m(e.image), this.getLexerPosition()));
4969
4969
  } },
4970
4970
  { ALT: () => this.SUBRULE(this._ruleBracketedString) },
4971
4971
  { ALT: () => this.SUBRULE(this._ruleFunction) },
4972
4972
  { ALT: () => {
4973
- let e = this.CONSUME(f);
4974
- return this.ACTION(() => this._tag(u(e.image, this.colIndex), this.getLexerPosition()));
4975
- } },
4976
- { ALT: () => {
4977
- let e = this.CONSUME(m);
4978
- return this.ACTION(() => this._tag(C(e.image, this.rowIndex), this.getLexerPosition()));
4973
+ let e = this.CONSUME(p);
4974
+ return this.ACTION(() => this._tag(o(e.image, this.colIndex), this.getLexerPosition()));
4979
4975
  } },
4980
4976
  { ALT: () => {
4981
4977
  let e = this.CONSUME(h);
4982
- return this.ACTION(() => this._tag(C(e.image, this.rowIndex), this.getLexerPosition()));
4978
+ return this.ACTION(() => this._tag(ee(e.image, this.rowIndex), this.getLexerPosition()));
4983
4979
  } },
4984
4980
  { ALT: () => {
4985
4981
  let e = this.CONSUME(g);
4986
- return this.ACTION(() => this._tag(b(e.image, this._locale), this.getLexerPosition()));
4982
+ return this.ACTION(() => this._tag(ee(e.image, this.rowIndex), this.getLexerPosition()));
4983
+ } },
4984
+ { ALT: () => {
4985
+ let e = this.CONSUME(_);
4986
+ return this.ACTION(() => this._tag(s(e.image, this._locale), this.getLexerPosition()));
4987
4987
  } }
4988
4988
  ]);
4989
4989
  return this.ACTION(() => {
4990
- if (_ && y) {
4991
- if (_.name === "") return void this._reportError(y, `'${_.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
4990
+ if (v && y) {
4991
+ if (v.name === "") return void this._reportError(y, `'${v.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
4992
4992
  let e = y;
4993
- if (y.type === T.Postfix && y.inputs?.[0] && (e = y.inputs[0]), e.type === T.Cell || e.type === T.Named || e.type === T.Row || e.type === T.TableColumn || e.type === T.Error) {
4994
- e.value.scope = _.name, e.value.scopeImage = _.image;
4993
+ if (y.type === w.Postfix && y.inputs?.[0] && (e = y.inputs[0]), e.type === w.Cell || e.type === w.Named || e.type === w.Row || e.type === w.TableColumn || e.type === w.Error) {
4994
+ e.value.scope = v.name, e.value.scopeImage = v.image;
4995
4995
  let t = this._tokenMap.get(e);
4996
- t && v !== void 0 && (t.tokenIndex = v);
4996
+ t && te !== void 0 && (t.tokenIndex = te);
4997
4997
  }
4998
4998
  }
4999
4999
  }), y;
@@ -5036,12 +5036,12 @@ var sr = {
5036
5036
  return this.MANY(() => {
5037
5037
  this.CONSUME(e), n.push(this.SUBRULE2(this._ruleIntersectOp));
5038
5038
  }), this.ACTION(() => n.length === 0 ? t : {
5039
- type: T.List,
5039
+ type: w.List,
5040
5040
  value: ",",
5041
5041
  inputs: [t, ...n],
5042
5042
  isReference: !0
5043
5043
  });
5044
- }), this._lexer = m, this._locale = m.getLocale(), this._vocab = h, this._srParser = n?.srParser ?? new $n(this._locale), this.performSelfAnalysis();
5044
+ }), this._lexer = n, this._locale = n.getLocale(), this._vocab = f, this._srParser = e?.srParser ?? new $n(this._locale), this.performSelfAnalysis();
5045
5045
  }
5046
5046
  getLexer() {
5047
5047
  return this._lexer;
@@ -5050,26 +5050,26 @@ var sr = {
5050
5050
  let r = this._lexer.tokenize(n), i;
5051
5051
  if (!r) return {
5052
5052
  root: {
5053
- type: T.Unparsed,
5053
+ type: w.Unparsed,
5054
5054
  value: n
5055
5055
  },
5056
5056
  errors: []
5057
5057
  };
5058
5058
  let a = r.tokens;
5059
5059
  if (a.length === 0) throw new E.Parse(ir);
5060
- return this.input = a, this._inputText = n, this._inputTextLength = n.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = v(i, (t, n) => {
5060
+ return this.input = a, this._inputText = n, this._inputTextLength = n.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = y(i, (t, n) => {
5061
5061
  let r = t.type, i = n?.isReference ? n.value : void 0, a = typeof i == "string" && er.has(i), o = typeof i == "string" && tr.has(i), s = a ? n.inputs : void 0, c = s ? s[0] === t ? s[1] : s[0] : void 0, l = this._lexer.getMaxRow();
5062
- if (a && r !== T.Cell && Number.isInteger(t.value)) {
5063
- let n = C(t.image, e);
5064
- return re(n, t), nr(c) === "row" ? rr(t.image, l) || this._reportError(n, `'${t.image}' is not a valid row — rows run from 1 to ${l}`) : this._reportError(n, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`), n;
5062
+ if (a && r !== w.Cell && Number.isInteger(t.value)) {
5063
+ let n = ee(t.image, e);
5064
+ return b(n, t), nr(c) === "row" ? rr(t.image, l) || this._reportError(n, `'${t.image}' is not a valid row — rows run from 1 to ${l}`) : this._reportError(n, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`), n;
5065
5065
  }
5066
- if (o && r === T.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
5067
- if (r === T.Cell) {
5066
+ if (o && r === w.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
5067
+ if (r === w.Cell) {
5068
5068
  let e = t.value, n = e.colIndex === -(2 ** 53 - 1), r = e.rowIndex === -(2 ** 53 - 1);
5069
5069
  if ((n || r) && nr(c) === (n ? "row" : "col")) return n && !rr(t.image, l) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${l}`), t;
5070
5070
  if (n || r || e.colIndex >= 16384) {
5071
- let a = p(t.image);
5072
- re(a, t);
5071
+ let a = m(t.image);
5072
+ b(a, t);
5073
5073
  let s = e.scope;
5074
5074
  return s && (a.value.scope = s, a.value.scopeImage = e.scopeImage), n ? this._reportError(a, `'${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(a, `'${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(a, `'${t.image}' is a name — '${i}' needs a cell or range on both sides`), a;
5075
5075
  }
@@ -5132,7 +5132,7 @@ var sr = {
5132
5132
  _bindAllWhitespace(e) {
5133
5133
  if (e) {
5134
5134
  if (this._bindNodeWhitespace(e), e.inputs) for (let t of e.inputs) t && this._bindAllWhitespace(t);
5135
- if (e.type === T.Array && Array.isArray(e.value)) {
5135
+ if (e.type === w.Array && Array.isArray(e.value)) {
5136
5136
  for (let t of e.value) if (t && Array.isArray(t.value)) for (let e of t.value) e && this._bindAllWhitespace(e);
5137
5137
  }
5138
5138
  }