@sheetxl/sdk 0.7.21 → 0.7.23-beta.2

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 (1088) hide show
  1. package/THIRD-PARTY-NOTICES.md +34 -0
  2. package/browser/cjs/A5-b-7zx2sEOEcvl.cjs +33 -0
  3. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +1 -0
  4. package/browser/cjs/Ccctey_HrpWuagT6.cjs +1 -0
  5. package/browser/cjs/CniTOg7oLRZwmgyM.cjs +57 -0
  6. package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +10 -0
  7. package/browser/cjs/E1pJfQiTbMva4WCz.cjs +1 -0
  8. package/browser/cjs/Y8ZGOM8g4sbsbA1Y.cjs +1 -0
  9. package/browser/cjs/index.cjs +3 -6
  10. package/browser/esm/BBJT6wXyXEvBQZKA.mjs +24 -0
  11. package/browser/esm/Ba8ViNCurmu-pQzB.mjs +818 -0
  12. package/browser/esm/Cnay4yeRx2XxT4Yp.mjs +50007 -0
  13. package/browser/esm/CrUqWGb8XSOVpWCS.mjs +109 -0
  14. package/browser/esm/DIqScru4YD2CC9q7.mjs +4436 -0
  15. package/browser/esm/DvShgCfX0MBnppXt.mjs +503 -0
  16. package/browser/esm/VD1vENLIu7_1r1UY.mjs +14 -0
  17. package/browser/esm/index.mjs +3225 -62
  18. package/licenses/dependencies.txt +74 -193
  19. package/node/esm/AiAlZ5mkssqXTadr.mjs +22 -0
  20. package/node/esm/Pg7h7EA11A6iLSIA.mjs +837 -0
  21. package/node/esm/index.mjs +53637 -23246
  22. package/node/esm/k4ZdzJqmTRplKGLv.mjs +114 -0
  23. package/package.json +19 -14
  24. package/resources/contents.json +21 -0
  25. package/resources/locales/contents.json +19 -0
  26. package/resources/locales/de/grammar.json +16 -0
  27. package/resources/locales/de/model.msg.json +510 -0
  28. package/resources/locales/en/model.msg.json +525 -0
  29. package/types/index.d.ts +2 -21284
  30. package/types/scripting-enums.json +1009 -0
  31. package/types/scripting.d.ts +26139 -31019
  32. package/types/src/address/AddressUtils.d.ts +252 -0
  33. package/types/src/address/AddressUtils.d.ts.map +1 -0
  34. package/types/src/address/_AddressMessages.d.ts +7 -0
  35. package/types/src/address/_AddressMessages.d.ts.map +1 -0
  36. package/types/src/address/index.d.ts +35 -0
  37. package/types/src/address/index.d.ts.map +1 -0
  38. package/types/src/anchored/AbstractAnchored.d.ts +200 -0
  39. package/types/src/anchored/AbstractAnchored.d.ts.map +1 -0
  40. package/types/src/anchored/Anchored.d.ts +154 -0
  41. package/types/src/anchored/Anchored.d.ts.map +1 -0
  42. package/types/src/anchored/AnchoredMap.d.ts +178 -0
  43. package/types/src/anchored/AnchoredMap.d.ts.map +1 -0
  44. package/types/src/anchored/IAnchored.d.ts +118 -0
  45. package/types/src/anchored/IAnchored.d.ts.map +1 -0
  46. package/types/src/anchored/IAnchoredMap.d.ts +207 -0
  47. package/types/src/anchored/IAnchoredMap.d.ts.map +1 -0
  48. package/types/src/anchored/_AnchorMessages.d.ts +3 -0
  49. package/types/src/anchored/_AnchorMessages.d.ts.map +1 -0
  50. package/types/src/anchored/index.d.ts +2 -0
  51. package/types/src/anchored/index.d.ts.map +1 -0
  52. package/types/src/autoFill/AutoFill.d.ts +161 -0
  53. package/types/src/autoFill/AutoFill.d.ts.map +1 -0
  54. package/types/src/autoFill/IAutoFill.d.ts +117 -0
  55. package/types/src/autoFill/IAutoFill.d.ts.map +1 -0
  56. package/types/src/autoFill/index.d.ts +3 -0
  57. package/types/src/autoFill/index.d.ts.map +1 -0
  58. package/types/src/border/IBorder.d.ts +284 -0
  59. package/types/src/border/IBorder.d.ts.map +1 -0
  60. package/types/src/border/index.d.ts +2 -0
  61. package/types/src/border/index.d.ts.map +1 -0
  62. package/types/src/calculation/Calculation.d.ts +440 -0
  63. package/types/src/calculation/Calculation.d.ts.map +1 -0
  64. package/types/src/calculation/FormulaLiterals.d.ts +18 -0
  65. package/types/src/calculation/FormulaLiterals.d.ts.map +1 -0
  66. package/types/src/calculation/ICalculation.d.ts +1016 -0
  67. package/types/src/calculation/ICalculation.d.ts.map +1 -0
  68. package/types/src/calculation/INamedFormulasCollection.d.ts +141 -0
  69. package/types/src/calculation/INamedFormulasCollection.d.ts.map +1 -0
  70. package/types/src/calculation/NamedFormulaCollection.d.ts +671 -0
  71. package/types/src/calculation/NamedFormulaCollection.d.ts.map +1 -0
  72. package/types/src/calculation/TokenType.d.ts +117 -0
  73. package/types/src/calculation/TokenType.d.ts.map +1 -0
  74. package/types/src/calculation/Types.d.ts +110 -0
  75. package/types/src/calculation/Types.d.ts.map +1 -0
  76. package/types/src/calculation/_CalculationMessages.d.ts +3 -0
  77. package/types/src/calculation/_CalculationMessages.d.ts.map +1 -0
  78. package/types/src/calculation/builtInNames.d.ts +2 -0
  79. package/types/src/calculation/builtInNames.d.ts.map +1 -0
  80. package/types/src/calculation/compiler/ASTTypes.d.ts +180 -0
  81. package/types/src/calculation/compiler/ASTTypes.d.ts.map +1 -0
  82. package/types/src/calculation/compiler/CompilerLocale.d.ts +69 -0
  83. package/types/src/calculation/compiler/CompilerLocale.d.ts.map +1 -0
  84. package/types/src/calculation/compiler/CompilerUtils.d.ts +331 -0
  85. package/types/src/calculation/compiler/CompilerUtils.d.ts.map +1 -0
  86. package/types/src/calculation/compiler/FormulaCompiler.d.ts +69 -0
  87. package/types/src/calculation/compiler/FormulaCompiler.d.ts.map +1 -0
  88. package/types/src/calculation/compiler/FormulaLexer.d.ts +85 -0
  89. package/types/src/calculation/compiler/FormulaLexer.d.ts.map +1 -0
  90. package/types/src/calculation/compiler/FormulaParser.d.ts +270 -0
  91. package/types/src/calculation/compiler/FormulaParser.d.ts.map +1 -0
  92. package/types/src/calculation/compiler/FormulaSeparators.d.ts +35 -0
  93. package/types/src/calculation/compiler/FormulaSeparators.d.ts.map +1 -0
  94. package/types/src/calculation/compiler/LiteTransform.d.ts +15 -0
  95. package/types/src/calculation/compiler/LiteTransform.d.ts.map +1 -0
  96. package/types/src/calculation/compiler/ParserUtils.d.ts +167 -0
  97. package/types/src/calculation/compiler/ParserUtils.d.ts.map +1 -0
  98. package/types/src/calculation/compiler/SRLexer.d.ts +19 -0
  99. package/types/src/calculation/compiler/SRLexer.d.ts.map +1 -0
  100. package/types/src/calculation/compiler/SRParser.d.ts +38 -0
  101. package/types/src/calculation/compiler/SRParser.d.ts.map +1 -0
  102. package/types/src/calculation/compiler/Types.d.ts +274 -0
  103. package/types/src/calculation/compiler/Types.d.ts.map +1 -0
  104. package/types/src/calculation/compiler/index.d.ts +3 -0
  105. package/types/src/calculation/compiler/index.d.ts.map +1 -0
  106. package/types/src/calculation/executor/CalcExecutor.d.ts +115 -0
  107. package/types/src/calculation/executor/CalcExecutor.d.ts.map +1 -0
  108. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +11 -0
  109. package/types/src/calculation/executor/CalcExecutorUtils.d.ts.map +1 -0
  110. package/types/src/calculation/executor/index.d.ts +3 -0
  111. package/types/src/calculation/executor/index.d.ts.map +1 -0
  112. package/types/src/calculation/formula/Formula.d.ts +168 -0
  113. package/types/src/calculation/formula/Formula.d.ts.map +1 -0
  114. package/types/src/calculation/formula/FormulaBlock.d.ts +207 -0
  115. package/types/src/calculation/formula/FormulaBlock.d.ts.map +1 -0
  116. package/types/src/calculation/formula/IFormulaBlock.d.ts +181 -0
  117. package/types/src/calculation/formula/IFormulaBlock.d.ts.map +1 -0
  118. package/types/src/calculation/formula/LambdaValue.d.ts +166 -0
  119. package/types/src/calculation/formula/LambdaValue.d.ts.map +1 -0
  120. package/types/src/calculation/formula/TokenUtils.d.ts +26 -0
  121. package/types/src/calculation/formula/TokenUtils.d.ts.map +1 -0
  122. package/types/src/calculation/formula/index.d.ts +4 -0
  123. package/types/src/calculation/formula/index.d.ts.map +1 -0
  124. package/types/src/calculation/functions/Operators.d.ts +30 -0
  125. package/types/src/calculation/functions/Operators.d.ts.map +1 -0
  126. package/types/src/calculation/functions/index.d.ts +2 -0
  127. package/types/src/calculation/functions/index.d.ts.map +1 -0
  128. package/types/src/calculation/functions/initializeFunctions.d.ts +22 -0
  129. package/types/src/calculation/functions/initializeFunctions.d.ts.map +1 -0
  130. package/types/src/calculation/grid/CalcGrid.d.ts +205 -0
  131. package/types/src/calculation/grid/CalcGrid.d.ts.map +1 -0
  132. package/types/src/calculation/grid/CalcGridUtils.d.ts +172 -0
  133. package/types/src/calculation/grid/CalcGridUtils.d.ts.map +1 -0
  134. package/types/src/calculation/grid/ICalcGrid.d.ts +500 -0
  135. package/types/src/calculation/grid/ICalcGrid.d.ts.map +1 -0
  136. package/types/src/calculation/grid/index.d.ts +3 -0
  137. package/types/src/calculation/grid/index.d.ts.map +1 -0
  138. package/types/src/calculation/index.d.ts +5 -0
  139. package/types/src/calculation/index.d.ts.map +1 -0
  140. package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +25 -0
  141. package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts.map +1 -0
  142. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +120 -0
  143. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts.map +1 -0
  144. package/types/src/calculation/spatial/PrecedentSpatialValue.d.ts +115 -0
  145. package/types/src/calculation/spatial/PrecedentSpatialValue.d.ts.map +1 -0
  146. package/types/src/calculation/spatial/SpillEntry.d.ts +40 -0
  147. package/types/src/calculation/spatial/SpillEntry.d.ts.map +1 -0
  148. package/types/src/calculation/spatial/index.d.ts +5 -0
  149. package/types/src/calculation/spatial/index.d.ts.map +1 -0
  150. package/types/src/calculation/state/CalcNode.d.ts +71 -0
  151. package/types/src/calculation/state/CalcNode.d.ts.map +1 -0
  152. package/types/src/calculation/state/CalcScope.d.ts +35 -0
  153. package/types/src/calculation/state/CalcScope.d.ts.map +1 -0
  154. package/types/src/calculation/state/CalcState.d.ts +28 -0
  155. package/types/src/calculation/state/CalcState.d.ts.map +1 -0
  156. package/types/src/calculation/state/CalculationContext.d.ts +125 -0
  157. package/types/src/calculation/state/CalculationContext.d.ts.map +1 -0
  158. package/types/src/calculation/state/IContextContainer.d.ts +320 -0
  159. package/types/src/calculation/state/IContextContainer.d.ts.map +1 -0
  160. package/types/src/calculation/state/index.d.ts +6 -0
  161. package/types/src/calculation/state/index.d.ts.map +1 -0
  162. package/types/src/calculation/symbol/FunctionSymbolProvider.d.ts +44 -0
  163. package/types/src/calculation/symbol/FunctionSymbolProvider.d.ts.map +1 -0
  164. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +93 -0
  165. package/types/src/calculation/symbol/ISymbolRegistry.d.ts.map +1 -0
  166. package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +144 -0
  167. package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts.map +1 -0
  168. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +18 -0
  169. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts.map +1 -0
  170. package/types/src/calculation/symbol/SymbolRegistry.d.ts +19 -0
  171. package/types/src/calculation/symbol/SymbolRegistry.d.ts.map +1 -0
  172. package/types/src/calculation/symbol/TableColumnSymbolProvider.d.ts +21 -0
  173. package/types/src/calculation/symbol/TableColumnSymbolProvider.d.ts.map +1 -0
  174. package/types/src/calculation/symbol/TableSymbolProvider.d.ts +19 -0
  175. package/types/src/calculation/symbol/TableSymbolProvider.d.ts.map +1 -0
  176. package/types/src/calculation/symbol/index.d.ts +9 -0
  177. package/types/src/calculation/symbol/index.d.ts.map +1 -0
  178. package/types/src/cell/ICell.d.ts +672 -0
  179. package/types/src/cell/ICell.d.ts.map +1 -0
  180. package/types/src/cell/ICellHeader.d.ts +142 -0
  181. package/types/src/cell/ICellHeader.d.ts.map +1 -0
  182. package/types/src/cell/ICellProtection.d.ts +41 -0
  183. package/types/src/cell/ICellProtection.d.ts.map +1 -0
  184. package/types/src/cell/index.d.ts +4 -0
  185. package/types/src/cell/index.d.ts.map +1 -0
  186. package/types/src/cellRange/ICellHeaderRange.d.ts +306 -0
  187. package/types/src/cellRange/ICellHeaderRange.d.ts.map +1 -0
  188. package/types/src/cellRange/ICellHeaderRanges.d.ts +107 -0
  189. package/types/src/cellRange/ICellHeaderRanges.d.ts.map +1 -0
  190. package/types/src/cellRange/ICellRange.d.ts +2509 -0
  191. package/types/src/cellRange/ICellRange.d.ts.map +1 -0
  192. package/types/src/cellRange/ICellRanges.d.ts +407 -0
  193. package/types/src/cellRange/ICellRanges.d.ts.map +1 -0
  194. package/types/src/cellRange/ICellRegion.d.ts +133 -0
  195. package/types/src/cellRange/ICellRegion.d.ts.map +1 -0
  196. package/types/src/cellRange/_GraphNode.d.ts +38 -0
  197. package/types/src/cellRange/_GraphNode.d.ts.map +1 -0
  198. package/types/src/cellRange/index.d.ts +6 -0
  199. package/types/src/cellRange/index.d.ts.map +1 -0
  200. package/types/src/chart/Chart.d.ts +53 -0
  201. package/types/src/chart/Chart.d.ts.map +1 -0
  202. package/types/src/chart/IChart.d.ts +42 -0
  203. package/types/src/chart/IChart.d.ts.map +1 -0
  204. package/types/src/chart/index.d.ts +5 -0
  205. package/types/src/chart/index.d.ts.map +1 -0
  206. package/types/src/collections/ArraysGrid.d.ts +72 -0
  207. package/types/src/collections/ArraysGrid.d.ts.map +1 -0
  208. package/types/src/collections/BooleanList.d.ts +67 -0
  209. package/types/src/collections/BooleanList.d.ts.map +1 -0
  210. package/types/src/collections/GridMap.d.ts +47 -0
  211. package/types/src/collections/GridMap.d.ts.map +1 -0
  212. package/types/src/collections/HashMap.d.ts +15 -0
  213. package/types/src/collections/HashMap.d.ts.map +1 -0
  214. package/types/src/collections/IGrid.d.ts +278 -0
  215. package/types/src/collections/IGrid.d.ts.map +1 -0
  216. package/types/src/collections/IList.d.ts +89 -0
  217. package/types/src/collections/IList.d.ts.map +1 -0
  218. package/types/src/collections/IMap.d.ts +45 -0
  219. package/types/src/collections/IMap.d.ts.map +1 -0
  220. package/types/src/collections/IReadableList.d.ts +120 -0
  221. package/types/src/collections/IReadableList.d.ts.map +1 -0
  222. package/types/src/collections/ISortedMap.d.ts +171 -0
  223. package/types/src/collections/ISortedMap.d.ts.map +1 -0
  224. package/types/src/collections/ISparseGrid.d.ts +61 -0
  225. package/types/src/collections/ISparseGrid.d.ts.map +1 -0
  226. package/types/src/collections/ISparseList.d.ts +103 -0
  227. package/types/src/collections/ISparseList.d.ts.map +1 -0
  228. package/types/src/collections/ISpatialMap.d.ts +515 -0
  229. package/types/src/collections/ISpatialMap.d.ts.map +1 -0
  230. package/types/src/collections/ISpatialMap3D.d.ts +116 -0
  231. package/types/src/collections/ISpatialMap3D.d.ts.map +1 -0
  232. package/types/src/collections/IWritableList.d.ts +41 -0
  233. package/types/src/collections/IWritableList.d.ts.map +1 -0
  234. package/types/src/collections/ImmutableList.d.ts +52 -0
  235. package/types/src/collections/ImmutableList.d.ts.map +1 -0
  236. package/types/src/collections/IteratorUtils.d.ts +91 -0
  237. package/types/src/collections/IteratorUtils.d.ts.map +1 -0
  238. package/types/src/collections/MixedTypedArrayList.d.ts +140 -0
  239. package/types/src/collections/MixedTypedArrayList.d.ts.map +1 -0
  240. package/types/src/collections/OverlappingRangeIterator.d.ts +91 -0
  241. package/types/src/collections/OverlappingRangeIterator.d.ts.map +1 -0
  242. package/types/src/collections/RTree.d.ts +111 -0
  243. package/types/src/collections/RTree.d.ts.map +1 -0
  244. package/types/src/collections/RepeatingList.d.ts +20 -0
  245. package/types/src/collections/RepeatingList.d.ts.map +1 -0
  246. package/types/src/collections/SortedMap.d.ts +396 -0
  247. package/types/src/collections/SortedMap.d.ts.map +1 -0
  248. package/types/src/collections/SparseGrid.d.ts +99 -0
  249. package/types/src/collections/SparseGrid.d.ts.map +1 -0
  250. package/types/src/collections/SparseList.d.ts +90 -0
  251. package/types/src/collections/SparseList.d.ts.map +1 -0
  252. package/types/src/collections/SpatialMap.d.ts +102 -0
  253. package/types/src/collections/SpatialMap.d.ts.map +1 -0
  254. package/types/src/collections/SpatialMap3D.d.ts +64 -0
  255. package/types/src/collections/SpatialMap3D.d.ts.map +1 -0
  256. package/types/src/collections/Tuple.d.ts +160 -0
  257. package/types/src/collections/Tuple.d.ts.map +1 -0
  258. package/types/src/collections/_CollectionUtils.d.ts +25 -0
  259. package/types/src/collections/_CollectionUtils.d.ts.map +1 -0
  260. package/types/src/collections/_GridUtils.d.ts +268 -0
  261. package/types/src/collections/_GridUtils.d.ts.map +1 -0
  262. package/types/src/collections/_RunUtils.d.ts +170 -0
  263. package/types/src/collections/_RunUtils.d.ts.map +1 -0
  264. package/types/src/collections/_SpatialUtils.d.ts +115 -0
  265. package/types/src/collections/_SpatialUtils.d.ts.map +1 -0
  266. package/types/src/collections/index.d.ts +21 -0
  267. package/types/src/collections/index.d.ts.map +1 -0
  268. package/types/src/color/Color.d.ts +120 -0
  269. package/types/src/color/Color.d.ts.map +1 -0
  270. package/types/src/color/ColorSpace.d.ts +45 -0
  271. package/types/src/color/ColorSpace.d.ts.map +1 -0
  272. package/types/src/color/IColor.d.ts +1110 -0
  273. package/types/src/color/IColor.d.ts.map +1 -0
  274. package/types/src/color/_BuiltInIndexDefs.d.ts +4 -0
  275. package/types/src/color/_BuiltInIndexDefs.d.ts.map +1 -0
  276. package/types/src/color/_BuiltInNamedDefs.d.ts +29 -0
  277. package/types/src/color/_BuiltInNamedDefs.d.ts.map +1 -0
  278. package/types/src/color/_BuiltInSchemeDefs.d.ts +7 -0
  279. package/types/src/color/_BuiltInSchemeDefs.d.ts.map +1 -0
  280. package/types/src/color/_ColorUtils.d.ts +93 -0
  281. package/types/src/color/_ColorUtils.d.ts.map +1 -0
  282. package/types/src/color/index.d.ts +3 -0
  283. package/types/src/color/index.d.ts.map +1 -0
  284. package/types/src/comment/IComment.d.ts +108 -0
  285. package/types/src/comment/IComment.d.ts.map +1 -0
  286. package/types/src/comment/index.d.ts +2 -0
  287. package/types/src/comment/index.d.ts.map +1 -0
  288. package/types/src/condition/AnchoredConditional.d.ts +263 -0
  289. package/types/src/condition/AnchoredConditional.d.ts.map +1 -0
  290. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +83 -0
  291. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts.map +1 -0
  292. package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +8 -0
  293. package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts.map +1 -0
  294. package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +8 -0
  295. package/types/src/condition/BuiltInOperators/AfterOperator.d.ts.map +1 -0
  296. package/types/src/condition/BuiltInOperators/AndOperator.d.ts +12 -0
  297. package/types/src/condition/BuiltInOperators/AndOperator.d.ts.map +1 -0
  298. package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +12 -0
  299. package/types/src/condition/BuiltInOperators/AverageOperator.d.ts.map +1 -0
  300. package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +8 -0
  301. package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts.map +1 -0
  302. package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +8 -0
  303. package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts.map +1 -0
  304. package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +12 -0
  305. package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts.map +1 -0
  306. package/types/src/condition/BuiltInOperators/BlankOperator.d.ts +9 -0
  307. package/types/src/condition/BuiltInOperators/BlankOperator.d.ts.map +1 -0
  308. package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +8 -0
  309. package/types/src/condition/BuiltInOperators/ColorOperator.d.ts.map +1 -0
  310. package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +8 -0
  311. package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts.map +1 -0
  312. package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +8 -0
  313. package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts.map +1 -0
  314. package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +11 -0
  315. package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts.map +1 -0
  316. package/types/src/condition/BuiltInOperators/ErrorOperator.d.ts +9 -0
  317. package/types/src/condition/BuiltInOperators/ErrorOperator.d.ts.map +1 -0
  318. package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +17 -0
  319. package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts.map +1 -0
  320. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +8 -0
  321. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts.map +1 -0
  322. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +8 -0
  323. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts.map +1 -0
  324. package/types/src/condition/BuiltInOperators/IconOperator.d.ts +8 -0
  325. package/types/src/condition/BuiltInOperators/IconOperator.d.ts.map +1 -0
  326. package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +14 -0
  327. package/types/src/condition/BuiltInOperators/InSetOperator.d.ts.map +1 -0
  328. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +8 -0
  329. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts.map +1 -0
  330. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +8 -0
  331. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts.map +1 -0
  332. package/types/src/condition/BuiltInOperators/NotOperator.d.ts +12 -0
  333. package/types/src/condition/BuiltInOperators/NotOperator.d.ts.map +1 -0
  334. package/types/src/condition/BuiltInOperators/OrOperator.d.ts +12 -0
  335. package/types/src/condition/BuiltInOperators/OrOperator.d.ts.map +1 -0
  336. package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +8 -0
  337. package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts.map +1 -0
  338. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +13 -0
  339. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts.map +1 -0
  340. package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +12 -0
  341. package/types/src/condition/BuiltInOperators/TopNOperator.d.ts.map +1 -0
  342. package/types/src/condition/BuiltInOperators/UniqueOperator.d.ts +8 -0
  343. package/types/src/condition/BuiltInOperators/UniqueOperator.d.ts.map +1 -0
  344. package/types/src/condition/BuiltInOperators/ValidEmailOperator.d.ts +8 -0
  345. package/types/src/condition/BuiltInOperators/ValidEmailOperator.d.ts.map +1 -0
  346. package/types/src/condition/BuiltInOperators/ValidUrlOperator.d.ts +8 -0
  347. package/types/src/condition/BuiltInOperators/ValidUrlOperator.d.ts.map +1 -0
  348. package/types/src/condition/BuiltInOperators/index.d.ts +59 -0
  349. package/types/src/condition/BuiltInOperators/index.d.ts.map +1 -0
  350. package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +43 -0
  351. package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts.map +1 -0
  352. package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +14 -0
  353. package/types/src/condition/BuiltinSelectors/DateSelector.d.ts.map +1 -0
  354. package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +12 -0
  355. package/types/src/condition/BuiltinSelectors/ListSelector.d.ts.map +1 -0
  356. package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +16 -0
  357. package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts.map +1 -0
  358. package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +14 -0
  359. package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts.map +1 -0
  360. package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +14 -0
  361. package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts.map +1 -0
  362. package/types/src/condition/BuiltinSelectors/index.d.ts +18 -0
  363. package/types/src/condition/BuiltinSelectors/index.d.ts.map +1 -0
  364. package/types/src/condition/Condition.d.ts +123 -0
  365. package/types/src/condition/Condition.d.ts.map +1 -0
  366. package/types/src/condition/ICondition.d.ts +915 -0
  367. package/types/src/condition/ICondition.d.ts.map +1 -0
  368. package/types/src/condition/_ConditionUtils.d.ts +190 -0
  369. package/types/src/condition/_ConditionUtils.d.ts.map +1 -0
  370. package/types/src/condition/index.d.ts +3 -0
  371. package/types/src/condition/index.d.ts.map +1 -0
  372. package/types/src/conditionalFormat/ConditionalEntry.d.ts +20 -0
  373. package/types/src/conditionalFormat/ConditionalEntry.d.ts.map +1 -0
  374. package/types/src/conditionalFormat/ConditionalFormat.d.ts +190 -0
  375. package/types/src/conditionalFormat/ConditionalFormat.d.ts.map +1 -0
  376. package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +20 -0
  377. package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts.map +1 -0
  378. package/types/src/conditionalFormat/IConditionalFormat.d.ts +518 -0
  379. package/types/src/conditionalFormat/IConditionalFormat.d.ts.map +1 -0
  380. package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +70 -0
  381. package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts.map +1 -0
  382. package/types/src/conditionalFormat/_ConditionalMessages.d.ts +2 -0
  383. package/types/src/conditionalFormat/_ConditionalMessages.d.ts.map +1 -0
  384. package/types/src/conditionalFormat/index.d.ts +3 -0
  385. package/types/src/conditionalFormat/index.d.ts.map +1 -0
  386. package/types/src/dataValidation/DataValidation.d.ts +121 -0
  387. package/types/src/dataValidation/DataValidation.d.ts.map +1 -0
  388. package/types/src/dataValidation/DataValidationCollection.d.ts +20 -0
  389. package/types/src/dataValidation/DataValidationCollection.d.ts.map +1 -0
  390. package/types/src/dataValidation/IDataValidation.d.ts +327 -0
  391. package/types/src/dataValidation/IDataValidation.d.ts.map +1 -0
  392. package/types/src/dataValidation/IDataValidationCollection.d.ts +63 -0
  393. package/types/src/dataValidation/IDataValidationCollection.d.ts.map +1 -0
  394. package/types/src/dataValidation/_DataValidationMessages.d.ts +2 -0
  395. package/types/src/dataValidation/_DataValidationMessages.d.ts.map +1 -0
  396. package/types/src/dataValidation/_Utils.d.ts +10 -0
  397. package/types/src/dataValidation/_Utils.d.ts.map +1 -0
  398. package/types/src/dataValidation/index.d.ts +3 -0
  399. package/types/src/dataValidation/index.d.ts.map +1 -0
  400. package/types/src/date/DateUtils.d.ts +8 -0
  401. package/types/src/date/DateUtils.d.ts.map +1 -0
  402. package/types/src/date/_DateUtils.d.ts +122 -0
  403. package/types/src/date/_DateUtils.d.ts.map +1 -0
  404. package/types/src/date/index.d.ts +2 -0
  405. package/types/src/date/index.d.ts.map +1 -0
  406. package/types/src/externalBook/ExternalBookCollection.d.ts +36 -0
  407. package/types/src/externalBook/ExternalBookCollection.d.ts.map +1 -0
  408. package/types/src/externalBook/IExternalBook.d.ts +97 -0
  409. package/types/src/externalBook/IExternalBook.d.ts.map +1 -0
  410. package/types/src/externalBook/IExternalBookCollection.d.ts +29 -0
  411. package/types/src/externalBook/IExternalBookCollection.d.ts.map +1 -0
  412. package/types/src/externalBook/index.d.ts +3 -0
  413. package/types/src/externalBook/index.d.ts.map +1 -0
  414. package/types/src/fill/IEffect.d.ts +389 -0
  415. package/types/src/fill/IEffect.d.ts.map +1 -0
  416. package/types/src/fill/IFill.d.ts +597 -0
  417. package/types/src/fill/IFill.d.ts.map +1 -0
  418. package/types/src/fill/IStroke.d.ts +265 -0
  419. package/types/src/fill/IStroke.d.ts.map +1 -0
  420. package/types/src/fill/_BuiltInPatterns.d.ts +27 -0
  421. package/types/src/fill/_BuiltInPatterns.d.ts.map +1 -0
  422. package/types/src/fill/index.d.ts +4 -0
  423. package/types/src/fill/index.d.ts.map +1 -0
  424. package/types/src/filter/IFilter.d.ts +83 -0
  425. package/types/src/filter/IFilter.d.ts.map +1 -0
  426. package/types/src/filter/index.d.ts +2 -0
  427. package/types/src/filter/index.d.ts.map +1 -0
  428. package/types/src/font/CanvasFontMeasurer.d.ts +25 -0
  429. package/types/src/font/CanvasFontMeasurer.d.ts.map +1 -0
  430. package/types/src/font/ExtendedTextMetrics.d.ts +1 -0
  431. package/types/src/font/ExtendedTextMetrics.d.ts.map +1 -0
  432. package/types/src/font/Font.d.ts +19 -0
  433. package/types/src/font/Font.d.ts.map +1 -0
  434. package/types/src/font/FontKitFontMeasurer.d.ts +11 -0
  435. package/types/src/font/FontKitFontMeasurer.d.ts.map +1 -0
  436. package/types/src/font/FontUtils.d.ts +9 -0
  437. package/types/src/font/FontUtils.d.ts.map +1 -0
  438. package/types/src/font/IFont.d.ts +261 -0
  439. package/types/src/font/IFont.d.ts.map +1 -0
  440. package/types/src/font/IFontCollection.d.ts +31 -0
  441. package/types/src/font/IFontCollection.d.ts.map +1 -0
  442. package/types/src/font/SimpleFontMeasurer.d.ts +4 -0
  443. package/types/src/font/SimpleFontMeasurer.d.ts.map +1 -0
  444. package/types/src/font/_FontUtils.d.ts +22 -0
  445. package/types/src/font/_FontUtils.d.ts.map +1 -0
  446. package/types/src/font/index.d.ts +5 -0
  447. package/types/src/font/index.d.ts.map +1 -0
  448. package/types/src/history/IHistory.d.ts +110 -0
  449. package/types/src/history/IHistory.d.ts.map +1 -0
  450. package/types/src/history/index.d.ts +2 -0
  451. package/types/src/history/index.d.ts.map +1 -0
  452. package/types/src/hyperlink/IHyperlink.d.ts +96 -0
  453. package/types/src/hyperlink/IHyperlink.d.ts.map +1 -0
  454. package/types/src/hyperlink/_Hyperlink.d.ts +21 -0
  455. package/types/src/hyperlink/_Hyperlink.d.ts.map +1 -0
  456. package/types/src/hyperlink/index.d.ts +2 -0
  457. package/types/src/hyperlink/index.d.ts.map +1 -0
  458. package/types/src/i18n/LanguagePack.d.ts +97 -0
  459. package/types/src/i18n/LanguagePack.d.ts.map +1 -0
  460. package/types/src/i18n/LocaleProfile.d.ts +15 -0
  461. package/types/src/i18n/LocaleProfile.d.ts.map +1 -0
  462. package/types/src/i18n/_CurrencyData.d.ts +20 -0
  463. package/types/src/i18n/_CurrencyData.d.ts.map +1 -0
  464. package/types/src/i18n/functionLocales.d.ts +6 -0
  465. package/types/src/i18n/functionLocales.d.ts.map +1 -0
  466. package/types/src/i18n/index.d.ts +4 -0
  467. package/types/src/i18n/index.d.ts.map +1 -0
  468. package/types/src/i18n/locales.d.ts +3 -0
  469. package/types/src/i18n/locales.d.ts.map +1 -0
  470. package/types/src/index.d.ts +71 -0
  471. package/types/src/index.d.ts.map +1 -0
  472. package/types/src/io/AbstractBackingStore.d.ts +53 -0
  473. package/types/src/io/AbstractBackingStore.d.ts.map +1 -0
  474. package/types/src/io/ArrayBackingStore.d.ts +34 -0
  475. package/types/src/io/ArrayBackingStore.d.ts.map +1 -0
  476. package/types/src/io/IWorkbookIO.d.ts +1322 -0
  477. package/types/src/io/IWorkbookIO.d.ts.map +1 -0
  478. package/types/src/io/WorkbookIO.d.ts +91 -0
  479. package/types/src/io/WorkbookIO.d.ts.map +1 -0
  480. package/types/src/io/WorkbookOrigin.d.ts +114 -0
  481. package/types/src/io/WorkbookOrigin.d.ts.map +1 -0
  482. package/types/src/io/WorkbookRegistry.d.ts +49 -0
  483. package/types/src/io/WorkbookRegistry.d.ts.map +1 -0
  484. package/types/src/io/index.d.ts +5 -0
  485. package/types/src/io/index.d.ts.map +1 -0
  486. package/types/src/lib/file/file.browser.d.ts +41 -0
  487. package/types/src/lib/file/file.browser.d.ts.map +1 -0
  488. package/types/src/lib/file/file.node.d.ts +25 -0
  489. package/types/src/lib/file/file.node.d.ts.map +1 -0
  490. package/types/src/lib/utils/_Utils.d.ts +20 -0
  491. package/types/src/lib/utils/_Utils.d.ts.map +1 -0
  492. package/types/src/lib/utils/banner.d.ts +6 -0
  493. package/types/src/lib/utils/banner.d.ts.map +1 -0
  494. package/types/src/lib/utils/utils.browser.d.ts +28 -0
  495. package/types/src/lib/utils/utils.browser.d.ts.map +1 -0
  496. package/types/src/lib/utils/utils.node.d.ts +42 -0
  497. package/types/src/lib/utils/utils.node.d.ts.map +1 -0
  498. package/types/src/license/LicenseDetails.d.ts +22 -0
  499. package/types/src/license/LicenseDetails.d.ts.map +1 -0
  500. package/types/src/license/LicenseManager.d.ts +63 -0
  501. package/types/src/license/LicenseManager.d.ts.map +1 -0
  502. package/types/src/license/index.d.ts +3 -0
  503. package/types/src/license/index.d.ts.map +1 -0
  504. package/types/src/license/license-key.d.ts +33 -0
  505. package/types/src/license/license-key.d.ts.map +1 -0
  506. package/types/src/listener/IListener.d.ts +62 -0
  507. package/types/src/listener/IListener.d.ts.map +1 -0
  508. package/types/src/listener/ListenerEmitter.d.ts +47 -0
  509. package/types/src/listener/ListenerEmitter.d.ts.map +1 -0
  510. package/types/src/listener/index.d.ts +2 -0
  511. package/types/src/listener/index.d.ts.map +1 -0
  512. package/types/src/model/AbstractModel.d.ts +90 -0
  513. package/types/src/model/AbstractModel.d.ts.map +1 -0
  514. package/types/src/model/IModel.d.ts +108 -0
  515. package/types/src/model/IModel.d.ts.map +1 -0
  516. package/types/src/model/_ModelMessages.d.ts +2 -0
  517. package/types/src/model/_ModelMessages.d.ts.map +1 -0
  518. package/types/src/model/index.d.ts +3 -0
  519. package/types/src/model/index.d.ts.map +1 -0
  520. package/types/src/movable/CustomElement.d.ts +42 -0
  521. package/types/src/movable/CustomElement.d.ts.map +1 -0
  522. package/types/src/movable/ICustomElement.d.ts +29 -0
  523. package/types/src/movable/ICustomElement.d.ts.map +1 -0
  524. package/types/src/movable/IGroup.d.ts +30 -0
  525. package/types/src/movable/IGroup.d.ts.map +1 -0
  526. package/types/src/movable/IMovable.d.ts +327 -0
  527. package/types/src/movable/IMovable.d.ts.map +1 -0
  528. package/types/src/movable/IMovableCollection.d.ts +129 -0
  529. package/types/src/movable/IMovableCollection.d.ts.map +1 -0
  530. package/types/src/movable/IMovableSelection.d.ts +49 -0
  531. package/types/src/movable/IMovableSelection.d.ts.map +1 -0
  532. package/types/src/movable/Movable.d.ts +221 -0
  533. package/types/src/movable/Movable.d.ts.map +1 -0
  534. package/types/src/movable/MovableCollection.d.ts +29 -0
  535. package/types/src/movable/MovableCollection.d.ts.map +1 -0
  536. package/types/src/movable/_MovableUtils.d.ts +4 -0
  537. package/types/src/movable/_MovableUtils.d.ts.map +1 -0
  538. package/types/src/movable/index.d.ts +4 -0
  539. package/types/src/movable/index.d.ts.map +1 -0
  540. package/types/src/named/AbstractNamed.d.ts +41 -0
  541. package/types/src/named/AbstractNamed.d.ts.map +1 -0
  542. package/types/src/named/INamed.d.ts +225 -0
  543. package/types/src/named/INamed.d.ts.map +1 -0
  544. package/types/src/named/INamedCollection.d.ts +230 -0
  545. package/types/src/named/INamedCollection.d.ts.map +1 -0
  546. package/types/src/named/NamedCollection.d.ts +302 -0
  547. package/types/src/named/NamedCollection.d.ts.map +1 -0
  548. package/types/src/named/_BuiltInNamed.d.ts +6 -0
  549. package/types/src/named/_BuiltInNamed.d.ts.map +1 -0
  550. package/types/src/named/index.d.ts +3 -0
  551. package/types/src/named/index.d.ts.map +1 -0
  552. package/types/src/numFmt/BuiltInFormats.d.ts +49 -0
  553. package/types/src/numFmt/BuiltInFormats.d.ts.map +1 -0
  554. package/types/src/numFmt/IFormatEngine.d.ts +149 -0
  555. package/types/src/numFmt/IFormatEngine.d.ts.map +1 -0
  556. package/types/src/numFmt/NumberFormatBuilder.d.ts +46 -0
  557. package/types/src/numFmt/NumberFormatBuilder.d.ts.map +1 -0
  558. package/types/src/numFmt/NumberFormatParser.d.ts +168 -0
  559. package/types/src/numFmt/NumberFormatParser.d.ts.map +1 -0
  560. package/types/src/numFmt/NumberFormatStyles.d.ts +43 -0
  561. package/types/src/numFmt/NumberFormatStyles.d.ts.map +1 -0
  562. package/types/src/numFmt/NumberFormatType.d.ts +79 -0
  563. package/types/src/numFmt/NumberFormatType.d.ts.map +1 -0
  564. package/types/src/numFmt/NumfmtFormatEngine.d.ts +33 -0
  565. package/types/src/numFmt/NumfmtFormatEngine.d.ts.map +1 -0
  566. package/types/src/numFmt/_BuiltInNumberFormats.d.ts +12 -0
  567. package/types/src/numFmt/_BuiltInNumberFormats.d.ts.map +1 -0
  568. package/types/src/numFmt/_FormatCell.d.ts +52 -0
  569. package/types/src/numFmt/_FormatCell.d.ts.map +1 -0
  570. package/types/src/numFmt/_NumFmtUtils.d.ts +102 -0
  571. package/types/src/numFmt/_NumFmtUtils.d.ts.map +1 -0
  572. package/types/src/numFmt/index.d.ts +105 -0
  573. package/types/src/numFmt/index.d.ts.map +1 -0
  574. package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +15 -0
  575. package/types/src/numFmt/vendor/numfmt/index.d.ts +721 -0
  576. package/types/src/picture/IPicture.d.ts +69 -0
  577. package/types/src/picture/IPicture.d.ts.map +1 -0
  578. package/types/src/picture/Picture.d.ts +67 -0
  579. package/types/src/picture/Picture.d.ts.map +1 -0
  580. package/types/src/picture/index.d.ts +2 -0
  581. package/types/src/picture/index.d.ts.map +1 -0
  582. package/types/src/primitives/CompositeRangeStats.d.ts +63 -0
  583. package/types/src/primitives/CompositeRangeStats.d.ts.map +1 -0
  584. package/types/src/primitives/Criteria.d.ts +35 -0
  585. package/types/src/primitives/Criteria.d.ts.map +1 -0
  586. package/types/src/primitives/FormulaContext.d.ts +2 -0
  587. package/types/src/primitives/FormulaContext.d.ts.map +1 -0
  588. package/types/src/primitives/PrimitiveUtils.d.ts +255 -0
  589. package/types/src/primitives/PrimitiveUtils.d.ts.map +1 -0
  590. package/types/src/primitives/Range.d.ts +221 -0
  591. package/types/src/primitives/Range.d.ts.map +1 -0
  592. package/types/src/primitives/RangeStats.d.ts +48 -0
  593. package/types/src/primitives/RangeStats.d.ts.map +1 -0
  594. package/types/src/primitives/ReferenceRange.d.ts +19 -0
  595. package/types/src/primitives/ReferenceRange.d.ts.map +1 -0
  596. package/types/src/primitives/Runtime.d.ts +55 -0
  597. package/types/src/primitives/Runtime.d.ts.map +1 -0
  598. package/types/src/primitives/ScalarCollation.d.ts +174 -0
  599. package/types/src/primitives/ScalarCollation.d.ts.map +1 -0
  600. package/types/src/primitives/TextFold.d.ts +62 -0
  601. package/types/src/primitives/TextFold.d.ts.map +1 -0
  602. package/types/src/primitives/_PrimitiveMessages.d.ts +3 -0
  603. package/types/src/primitives/_PrimitiveMessages.d.ts.map +1 -0
  604. package/types/src/primitives/index.d.ts +7 -0
  605. package/types/src/primitives/index.d.ts.map +1 -0
  606. package/types/src/primitives/stats/AggregateStats.d.ts +119 -0
  607. package/types/src/primitives/stats/AggregateStats.d.ts.map +1 -0
  608. package/types/src/primitives/stats/Cancellation.d.ts +43 -0
  609. package/types/src/primitives/stats/Cancellation.d.ts.map +1 -0
  610. package/types/src/primitives/stats/FrequencyStats.d.ts +94 -0
  611. package/types/src/primitives/stats/FrequencyStats.d.ts.map +1 -0
  612. package/types/src/primitives/stats/Ranked.d.ts +26 -0
  613. package/types/src/primitives/stats/Ranked.d.ts.map +1 -0
  614. package/types/src/primitives/stats/ScalarOrder.d.ts +18 -0
  615. package/types/src/primitives/stats/ScalarOrder.d.ts.map +1 -0
  616. package/types/src/primitives/stats/SortedNumbers.d.ts +48 -0
  617. package/types/src/primitives/stats/SortedNumbers.d.ts.map +1 -0
  618. package/types/src/primitives/stats/index.d.ts +7 -0
  619. package/types/src/primitives/stats/index.d.ts.map +1 -0
  620. package/types/src/print/IPrint.d.ts +234 -0
  621. package/types/src/print/IPrint.d.ts.map +1 -0
  622. package/types/src/print/index.d.ts +2 -0
  623. package/types/src/print/index.d.ts.map +1 -0
  624. package/types/src/protectedRange/IProtectedRange.d.ts +239 -0
  625. package/types/src/protectedRange/IProtectedRange.d.ts.map +1 -0
  626. package/types/src/protectedRange/IProtectedRangeCollection.d.ts +73 -0
  627. package/types/src/protectedRange/IProtectedRangeCollection.d.ts.map +1 -0
  628. package/types/src/protectedRange/ProtectedRange.d.ts +101 -0
  629. package/types/src/protectedRange/ProtectedRange.d.ts.map +1 -0
  630. package/types/src/protectedRange/ProtectedRangeCollection.d.ts +21 -0
  631. package/types/src/protectedRange/ProtectedRangeCollection.d.ts.map +1 -0
  632. package/types/src/protectedRange/index.d.ts +3 -0
  633. package/types/src/protectedRange/index.d.ts.map +1 -0
  634. package/types/src/protection/DefaultProtection.d.ts +43 -0
  635. package/types/src/protection/DefaultProtection.d.ts.map +1 -0
  636. package/types/src/protection/IProtection.d.ts +170 -0
  637. package/types/src/protection/IProtection.d.ts.map +1 -0
  638. package/types/src/protection/PasswordHasher.d.ts +35 -0
  639. package/types/src/protection/PasswordHasher.d.ts.map +1 -0
  640. package/types/src/protection/index.d.ts +6 -0
  641. package/types/src/protection/index.d.ts.map +1 -0
  642. package/types/src/resource/IResource.d.ts +98 -0
  643. package/types/src/resource/IResource.d.ts.map +1 -0
  644. package/types/src/resource/IResourceCollection.d.ts +96 -0
  645. package/types/src/resource/IResourceCollection.d.ts.map +1 -0
  646. package/types/src/resource/Resource.d.ts +39 -0
  647. package/types/src/resource/Resource.d.ts.map +1 -0
  648. package/types/src/resource/ResourceCollection.d.ts +19 -0
  649. package/types/src/resource/ResourceCollection.d.ts.map +1 -0
  650. package/types/src/resource/_ResourceMessages.d.ts +4 -0
  651. package/types/src/resource/_ResourceMessages.d.ts.map +1 -0
  652. package/types/src/resource/index.d.ts +5 -0
  653. package/types/src/resource/index.d.ts.map +1 -0
  654. package/types/src/resource/resourceKinds.d.ts +23 -0
  655. package/types/src/resource/resourceKinds.d.ts.map +1 -0
  656. package/types/src/richData/index.d.ts +1 -0
  657. package/types/src/richData/index.d.ts.map +1 -0
  658. package/types/src/scripting/FunctionCollection.d.ts +88 -0
  659. package/types/src/scripting/FunctionCollection.d.ts.map +1 -0
  660. package/types/src/scripting/IFunctionCollection.d.ts +208 -0
  661. package/types/src/scripting/IFunctionCollection.d.ts.map +1 -0
  662. package/types/src/scripting/IModule.d.ts +82 -0
  663. package/types/src/scripting/IModule.d.ts.map +1 -0
  664. package/types/src/scripting/IModuleCollection.d.ts +79 -0
  665. package/types/src/scripting/IModuleCollection.d.ts.map +1 -0
  666. package/types/src/scripting/IScript.d.ts +289 -0
  667. package/types/src/scripting/IScript.d.ts.map +1 -0
  668. package/types/src/scripting/ITypedFunction.d.ts +61 -0
  669. package/types/src/scripting/ITypedFunction.d.ts.map +1 -0
  670. package/types/src/scripting/MacroFunction.d.ts +15 -0
  671. package/types/src/scripting/MacroFunction.d.ts.map +1 -0
  672. package/types/src/scripting/Module.d.ts +39 -0
  673. package/types/src/scripting/Module.d.ts.map +1 -0
  674. package/types/src/scripting/ModuleCollection.d.ts +56 -0
  675. package/types/src/scripting/ModuleCollection.d.ts.map +1 -0
  676. package/types/src/scripting/Runtime.d.ts +16 -0
  677. package/types/src/scripting/Runtime.d.ts.map +1 -0
  678. package/types/src/scripting/Scripts.d.ts +79 -0
  679. package/types/src/scripting/Scripts.d.ts.map +1 -0
  680. package/types/src/scripting/TypedFunction.d.ts +161 -0
  681. package/types/src/scripting/TypedFunction.d.ts.map +1 -0
  682. package/types/src/scripting/_FunctionIndex.d.ts +111 -0
  683. package/types/src/scripting/_FunctionIndex.d.ts.map +1 -0
  684. package/types/src/scripting/_FunctionMessages.d.ts +6 -0
  685. package/types/src/scripting/_FunctionMessages.d.ts.map +1 -0
  686. package/types/src/scripting/_ModuleUtils.d.ts +5 -0
  687. package/types/src/scripting/_ModuleUtils.d.ts.map +1 -0
  688. package/types/src/scripting/_ScriptUtils.d.ts +18 -0
  689. package/types/src/scripting/_ScriptUtils.d.ts.map +1 -0
  690. package/types/src/scripting/enumManifest.browser.d.ts +9 -0
  691. package/types/src/scripting/enumManifest.browser.d.ts.map +1 -0
  692. package/types/src/scripting/enumManifest.node.d.ts +13 -0
  693. package/types/src/scripting/enumManifest.node.d.ts.map +1 -0
  694. package/types/src/scripting/index.d.ts +4 -0
  695. package/types/src/scripting/index.d.ts.map +1 -0
  696. package/types/src/selection/IRangeSelection.d.ts +307 -0
  697. package/types/src/selection/IRangeSelection.d.ts.map +1 -0
  698. package/types/src/selection/RangeSelection.d.ts +144 -0
  699. package/types/src/selection/RangeSelection.d.ts.map +1 -0
  700. package/types/src/selection/_RangeSelectionUtils.d.ts +32 -0
  701. package/types/src/selection/_RangeSelectionUtils.d.ts.map +1 -0
  702. package/types/src/selection/index.d.ts +2 -0
  703. package/types/src/selection/index.d.ts.map +1 -0
  704. package/types/src/shape/IShape.d.ts +279 -0
  705. package/types/src/shape/IShape.d.ts.map +1 -0
  706. package/types/src/shape/Shape.d.ts +54 -0
  707. package/types/src/shape/Shape.d.ts.map +1 -0
  708. package/types/src/shape/index.d.ts +2 -0
  709. package/types/src/shape/index.d.ts.map +1 -0
  710. package/types/src/sheet/CellRegion.d.ts +106 -0
  711. package/types/src/sheet/CellRegion.d.ts.map +1 -0
  712. package/types/src/sheet/ICellContainerOptions.d.ts +97 -0
  713. package/types/src/sheet/ICellContainerOptions.d.ts.map +1 -0
  714. package/types/src/sheet/ISheet.d.ts +1074 -0
  715. package/types/src/sheet/ISheet.d.ts.map +1 -0
  716. package/types/src/sheet/ISheetCollection.d.ts +70 -0
  717. package/types/src/sheet/ISheetCollection.d.ts.map +1 -0
  718. package/types/src/sheet/NamedCellRange.d.ts +45 -0
  719. package/types/src/sheet/NamedCellRange.d.ts.map +1 -0
  720. package/types/src/sheet/NamedRange.d.ts +30 -0
  721. package/types/src/sheet/NamedRange.d.ts.map +1 -0
  722. package/types/src/sheet/Sheet.d.ts +1068 -0
  723. package/types/src/sheet/Sheet.d.ts.map +1 -0
  724. package/types/src/sheet/SheetCell.d.ts +335 -0
  725. package/types/src/sheet/SheetCell.d.ts.map +1 -0
  726. package/types/src/sheet/SheetCollection.d.ts +18 -0
  727. package/types/src/sheet/SheetCollection.d.ts.map +1 -0
  728. package/types/src/sheet/SheetRange.d.ts +362 -0
  729. package/types/src/sheet/SheetRange.d.ts.map +1 -0
  730. package/types/src/sheet/SheetRanges.d.ts +225 -0
  731. package/types/src/sheet/SheetRanges.d.ts.map +1 -0
  732. package/types/src/sheet/_CopyUtils.d.ts +33 -0
  733. package/types/src/sheet/_CopyUtils.d.ts.map +1 -0
  734. package/types/src/sheet/_InvalidSheetRange.d.ts +70 -0
  735. package/types/src/sheet/_InvalidSheetRange.d.ts.map +1 -0
  736. package/types/src/sheet/_SheetAutoFitUtils.d.ts +18 -0
  737. package/types/src/sheet/_SheetAutoFitUtils.d.ts.map +1 -0
  738. package/types/src/sheet/_SheetCoords.d.ts +54 -0
  739. package/types/src/sheet/_SheetCoords.d.ts.map +1 -0
  740. package/types/src/sheet/_SheetFilterUtils.d.ts +9 -0
  741. package/types/src/sheet/_SheetFilterUtils.d.ts.map +1 -0
  742. package/types/src/sheet/_SheetMessages.d.ts +11 -0
  743. package/types/src/sheet/_SheetMessages.d.ts.map +1 -0
  744. package/types/src/sheet/_SheetMutations.d.ts +137 -0
  745. package/types/src/sheet/_SheetMutations.d.ts.map +1 -0
  746. package/types/src/sheet/_SheetSortUtils.d.ts +9 -0
  747. package/types/src/sheet/_SheetSortUtils.d.ts.map +1 -0
  748. package/types/src/sheet/_SheetStateReader.d.ts +161 -0
  749. package/types/src/sheet/_SheetStateReader.d.ts.map +1 -0
  750. package/types/src/sheet/_SheetStateTypes.d.ts +446 -0
  751. package/types/src/sheet/_SheetStateTypes.d.ts.map +1 -0
  752. package/types/src/sheet/_SheetUtils.d.ts +265 -0
  753. package/types/src/sheet/_SheetUtils.d.ts.map +1 -0
  754. package/types/src/sheet/clipboard/IHTMLParser.d.ts +92 -0
  755. package/types/src/sheet/clipboard/IHTMLParser.d.ts.map +1 -0
  756. package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +55 -0
  757. package/types/src/sheet/clipboard/RangeClipboardItems.d.ts.map +1 -0
  758. package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +29 -0
  759. package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts.map +1 -0
  760. package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +46 -0
  761. package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts.map +1 -0
  762. package/types/src/sheet/clipboard/_ClipboardUtils.d.ts +10 -0
  763. package/types/src/sheet/clipboard/_ClipboardUtils.d.ts.map +1 -0
  764. package/types/src/sheet/clipboard/index.d.ts +2 -0
  765. package/types/src/sheet/clipboard/index.d.ts.map +1 -0
  766. package/types/src/sheet/index.d.ts +6 -0
  767. package/types/src/sheet/index.d.ts.map +1 -0
  768. package/types/src/sheet/listener/RangesListener.d.ts +32 -0
  769. package/types/src/sheet/listener/RangesListener.d.ts.map +1 -0
  770. package/types/src/sheet/listener/RangesListenerEntry.d.ts +19 -0
  771. package/types/src/sheet/listener/RangesListenerEntry.d.ts.map +1 -0
  772. package/types/src/sheet/listener/index.d.ts +3 -0
  773. package/types/src/sheet/listener/index.d.ts.map +1 -0
  774. package/types/src/sheet/spatial/MergeEntry.d.ts +17 -0
  775. package/types/src/sheet/spatial/MergeEntry.d.ts.map +1 -0
  776. package/types/src/sheet/spatial/index.d.ts +2 -0
  777. package/types/src/sheet/spatial/index.d.ts.map +1 -0
  778. package/types/src/sheet/style/SheetCellStyle.d.ts +540 -0
  779. package/types/src/sheet/style/SheetCellStyle.d.ts.map +1 -0
  780. package/types/src/sheet/style/SheetDirectStyle.d.ts +130 -0
  781. package/types/src/sheet/style/SheetDirectStyle.d.ts.map +1 -0
  782. package/types/src/sheet/style/SheetNamedStyle.d.ts +47 -0
  783. package/types/src/sheet/style/SheetNamedStyle.d.ts.map +1 -0
  784. package/types/src/sheet/style/SheetTableStyle.d.ts +47 -0
  785. package/types/src/sheet/style/SheetTableStyle.d.ts.map +1 -0
  786. package/types/src/sheet/style/UsedRangeSpatialMap.d.ts +80 -0
  787. package/types/src/sheet/style/UsedRangeSpatialMap.d.ts.map +1 -0
  788. package/types/src/sheet/style/_Resolvers.d.ts +41 -0
  789. package/types/src/sheet/style/_Resolvers.d.ts.map +1 -0
  790. package/types/src/sheet/style/_StyleUtils.d.ts +69 -0
  791. package/types/src/sheet/style/_StyleUtils.d.ts.map +1 -0
  792. package/types/src/sheet/style/index.d.ts +1 -0
  793. package/types/src/sheet/style/index.d.ts.map +1 -0
  794. package/types/src/sheetHeader/ISheetHeader.d.ts +217 -0
  795. package/types/src/sheetHeader/ISheetHeader.d.ts.map +1 -0
  796. package/types/src/sheetHeader/SheetCellHeader.d.ts +61 -0
  797. package/types/src/sheetHeader/SheetCellHeader.d.ts.map +1 -0
  798. package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +54 -0
  799. package/types/src/sheetHeader/SheetCellHeaderRange.d.ts.map +1 -0
  800. package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +46 -0
  801. package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts.map +1 -0
  802. package/types/src/sheetHeader/SheetHeader.d.ts +257 -0
  803. package/types/src/sheetHeader/SheetHeader.d.ts.map +1 -0
  804. package/types/src/sheetHeader/_HeaderUtils.d.ts +94 -0
  805. package/types/src/sheetHeader/_HeaderUtils.d.ts.map +1 -0
  806. package/types/src/sheetHeader/_InvalidSheetHeaderRange.d.ts +7 -0
  807. package/types/src/sheetHeader/_InvalidSheetHeaderRange.d.ts.map +1 -0
  808. package/types/src/sheetHeader/index.d.ts +2 -0
  809. package/types/src/sheetHeader/index.d.ts.map +1 -0
  810. package/types/src/sheetProtection/ISheetProtection.d.ts +150 -0
  811. package/types/src/sheetProtection/ISheetProtection.d.ts.map +1 -0
  812. package/types/src/sheetProtection/SheetProtection.d.ts +39 -0
  813. package/types/src/sheetProtection/SheetProtection.d.ts.map +1 -0
  814. package/types/src/sheetProtection/index.d.ts +2 -0
  815. package/types/src/sheetProtection/index.d.ts.map +1 -0
  816. package/types/src/sheetView/ISheetView.d.ts +439 -0
  817. package/types/src/sheetView/ISheetView.d.ts.map +1 -0
  818. package/types/src/sheetView/SheetView.d.ts +113 -0
  819. package/types/src/sheetView/SheetView.d.ts.map +1 -0
  820. package/types/src/sheetView/_SheetViewUtils.d.ts +19 -0
  821. package/types/src/sheetView/_SheetViewUtils.d.ts.map +1 -0
  822. package/types/src/sheetView/index.d.ts +2 -0
  823. package/types/src/sheetView/index.d.ts.map +1 -0
  824. package/types/src/slicer/ISlicer.d.ts +38 -0
  825. package/types/src/slicer/ISlicer.d.ts.map +1 -0
  826. package/types/src/slicer/Slicer.d.ts +41 -0
  827. package/types/src/slicer/Slicer.d.ts.map +1 -0
  828. package/types/src/slicer/index.d.ts +2 -0
  829. package/types/src/slicer/index.d.ts.map +1 -0
  830. package/types/src/sort/ISort.d.ts +318 -0
  831. package/types/src/sort/ISort.d.ts.map +1 -0
  832. package/types/src/sort/Sort.d.ts +48 -0
  833. package/types/src/sort/Sort.d.ts.map +1 -0
  834. package/types/src/sort/_SortUtils.d.ts +12 -0
  835. package/types/src/sort/_SortUtils.d.ts.map +1 -0
  836. package/types/src/sort/index.d.ts +3 -0
  837. package/types/src/sort/index.d.ts.map +1 -0
  838. package/types/src/string/IStringCollection.d.ts +50 -0
  839. package/types/src/string/IStringCollection.d.ts.map +1 -0
  840. package/types/src/string/StringCollection.d.ts +26 -0
  841. package/types/src/string/StringCollection.d.ts.map +1 -0
  842. package/types/src/string/index.d.ts +3 -0
  843. package/types/src/string/index.d.ts.map +1 -0
  844. package/types/src/style/IStyle.d.ts +485 -0
  845. package/types/src/style/IStyle.d.ts.map +1 -0
  846. package/types/src/style/IStyleCollection.d.ts +292 -0
  847. package/types/src/style/IStyleCollection.d.ts.map +1 -0
  848. package/types/src/style/StyleCollection.d.ts +125 -0
  849. package/types/src/style/StyleCollection.d.ts.map +1 -0
  850. package/types/src/style/_BuiltInStyleDefs.d.ts +18 -0
  851. package/types/src/style/_BuiltInStyleDefs.d.ts.map +1 -0
  852. package/types/src/style/_BuiltInStyleNames.d.ts +20 -0
  853. package/types/src/style/_BuiltInStyleNames.d.ts.map +1 -0
  854. package/types/src/style/index.d.ts +5 -0
  855. package/types/src/style/index.d.ts.map +1 -0
  856. package/types/src/table/AnchoredTable.d.ts +349 -0
  857. package/types/src/table/AnchoredTable.d.ts.map +1 -0
  858. package/types/src/table/AutoTable.d.ts +64 -0
  859. package/types/src/table/AutoTable.d.ts.map +1 -0
  860. package/types/src/table/ITable.d.ts +714 -0
  861. package/types/src/table/ITable.d.ts.map +1 -0
  862. package/types/src/table/ITableCollection.d.ts +88 -0
  863. package/types/src/table/ITableCollection.d.ts.map +1 -0
  864. package/types/src/table/ITableStyle.d.ts +318 -0
  865. package/types/src/table/ITableStyle.d.ts.map +1 -0
  866. package/types/src/table/Table.d.ts +8 -0
  867. package/types/src/table/Table.d.ts.map +1 -0
  868. package/types/src/table/TableCollection.d.ts +20 -0
  869. package/types/src/table/TableCollection.d.ts.map +1 -0
  870. package/types/src/table/_AutoTableColumn.d.ts +27 -0
  871. package/types/src/table/_AutoTableColumn.d.ts.map +1 -0
  872. package/types/src/table/_BuiltInTableStyles.d.ts +9 -0
  873. package/types/src/table/_BuiltInTableStyles.d.ts.map +1 -0
  874. package/types/src/table/_FilterField.d.ts +30 -0
  875. package/types/src/table/_FilterField.d.ts.map +1 -0
  876. package/types/src/table/_NamedTable.d.ts +84 -0
  877. package/types/src/table/_NamedTable.d.ts.map +1 -0
  878. package/types/src/table/_NamedTableSource.d.ts +57 -0
  879. package/types/src/table/_NamedTableSource.d.ts.map +1 -0
  880. package/types/src/table/_SortField.d.ts +29 -0
  881. package/types/src/table/_SortField.d.ts.map +1 -0
  882. package/types/src/table/_TableColumn.d.ts +51 -0
  883. package/types/src/table/_TableColumn.d.ts.map +1 -0
  884. package/types/src/table/_TableMessages.d.ts +5 -0
  885. package/types/src/table/_TableMessages.d.ts.map +1 -0
  886. package/types/src/table/_TableUtils.d.ts +94 -0
  887. package/types/src/table/_TableUtils.d.ts.map +1 -0
  888. package/types/src/table/index.d.ts +5 -0
  889. package/types/src/table/index.d.ts.map +1 -0
  890. package/types/src/text/AutoNumberingScheme.d.ts +175 -0
  891. package/types/src/text/AutoNumberingScheme.d.ts.map +1 -0
  892. package/types/src/text/Bullet.d.ts +34 -0
  893. package/types/src/text/Bullet.d.ts.map +1 -0
  894. package/types/src/text/IText.d.ts +53 -0
  895. package/types/src/text/IText.d.ts.map +1 -0
  896. package/types/src/text/ITextFrame.d.ts +313 -0
  897. package/types/src/text/ITextFrame.d.ts.map +1 -0
  898. package/types/src/text/TextBoxAlignment.d.ts +141 -0
  899. package/types/src/text/TextBoxAlignment.d.ts.map +1 -0
  900. package/types/src/text/TextFrame.d.ts +43 -0
  901. package/types/src/text/TextFrame.d.ts.map +1 -0
  902. package/types/src/text/TextLine.d.ts +24 -0
  903. package/types/src/text/TextLine.d.ts.map +1 -0
  904. package/types/src/text/TextParagraph.d.ts +61 -0
  905. package/types/src/text/TextParagraph.d.ts.map +1 -0
  906. package/types/src/text/TextRotation.d.ts +106 -0
  907. package/types/src/text/TextRotation.d.ts.map +1 -0
  908. package/types/src/text/TextRun.d.ts +85 -0
  909. package/types/src/text/TextRun.d.ts.map +1 -0
  910. package/types/src/text/TextUtils.d.ts +165 -0
  911. package/types/src/text/TextUtils.d.ts.map +1 -0
  912. package/types/src/text/TextVisitor.d.ts +11 -0
  913. package/types/src/text/TextVisitor.d.ts.map +1 -0
  914. package/types/src/text/TextWrapper.d.ts +78 -0
  915. package/types/src/text/TextWrapper.d.ts.map +1 -0
  916. package/types/src/text/_TextUtils.d.ts +90 -0
  917. package/types/src/text/_TextUtils.d.ts.map +1 -0
  918. package/types/src/text/impl/Phrase.d.ts +3 -0
  919. package/types/src/text/impl/Phrase.d.ts.map +1 -0
  920. package/types/src/text/impl/TabStrategy.d.ts +9 -0
  921. package/types/src/text/impl/TabStrategy.d.ts.map +1 -0
  922. package/types/src/text/impl/WordWrapUtils.d.ts +6 -0
  923. package/types/src/text/impl/WordWrapUtils.d.ts.map +1 -0
  924. package/types/src/text/index.d.ts +7 -0
  925. package/types/src/text/index.d.ts.map +1 -0
  926. package/types/src/text/richtext/IStyledFont.d.ts +330 -0
  927. package/types/src/text/richtext/IStyledFont.d.ts.map +1 -0
  928. package/types/src/text/richtext/index.d.ts +2 -0
  929. package/types/src/text/richtext/index.d.ts.map +1 -0
  930. package/types/src/theme/ITheme.d.ts +252 -0
  931. package/types/src/theme/ITheme.d.ts.map +1 -0
  932. package/types/src/theme/IThemeCollection.d.ts +84 -0
  933. package/types/src/theme/IThemeCollection.d.ts.map +1 -0
  934. package/types/src/theme/ThemeCollection.d.ts +62 -0
  935. package/types/src/theme/ThemeCollection.d.ts.map +1 -0
  936. package/types/src/theme/_BuiltInColorSchemes.d.ts +3 -0
  937. package/types/src/theme/_BuiltInColorSchemes.d.ts.map +1 -0
  938. package/types/src/theme/_BuiltInFontSchemes.d.ts +3 -0
  939. package/types/src/theme/_BuiltInFontSchemes.d.ts.map +1 -0
  940. package/types/src/theme/_BuiltInThemeDefs.d.ts +3 -0
  941. package/types/src/theme/_BuiltInThemeDefs.d.ts.map +1 -0
  942. package/types/src/theme/_ThemeMessages.d.ts +3 -0
  943. package/types/src/theme/_ThemeMessages.d.ts.map +1 -0
  944. package/types/src/theme/_ThemeUtils.d.ts +3 -0
  945. package/types/src/theme/_ThemeUtils.d.ts.map +1 -0
  946. package/types/src/theme/index.d.ts +4 -0
  947. package/types/src/theme/index.d.ts.map +1 -0
  948. package/types/src/transaction/ITransaction.d.ts +594 -0
  949. package/types/src/transaction/ITransaction.d.ts.map +1 -0
  950. package/types/src/transaction/Transaction.d.ts +184 -0
  951. package/types/src/transaction/Transaction.d.ts.map +1 -0
  952. package/types/src/transaction/TransactionSaveStateManager.d.ts +85 -0
  953. package/types/src/transaction/TransactionSaveStateManager.d.ts.map +1 -0
  954. package/types/src/transaction/TransactionUndoManager.d.ts +60 -0
  955. package/types/src/transaction/TransactionUndoManager.d.ts.map +1 -0
  956. package/types/src/transaction/index.d.ts +5 -0
  957. package/types/src/transaction/index.d.ts.map +1 -0
  958. package/types/src/type/ICollection.d.ts +110 -0
  959. package/types/src/type/ICollection.d.ts.map +1 -0
  960. package/types/src/type/IProperties.d.ts +51 -0
  961. package/types/src/type/IProperties.d.ts.map +1 -0
  962. package/types/src/type/ITypes.d.ts +69 -0
  963. package/types/src/type/ITypes.d.ts.map +1 -0
  964. package/types/src/type/Registry.d.ts +66 -0
  965. package/types/src/type/Registry.d.ts.map +1 -0
  966. package/types/src/type/index.d.ts +5 -0
  967. package/types/src/type/index.d.ts.map +1 -0
  968. package/types/src/utils/GeomUtils.d.ts +61 -0
  969. package/types/src/utils/GeomUtils.d.ts.map +1 -0
  970. package/types/src/utils/ObjectPath.d.ts +9 -0
  971. package/types/src/utils/ObjectPath.d.ts.map +1 -0
  972. package/types/src/utils/Profiler.d.ts +38 -0
  973. package/types/src/utils/Profiler.d.ts.map +1 -0
  974. package/types/src/utils/_CSSUtils.d.ts +156 -0
  975. package/types/src/utils/_CSSUtils.d.ts.map +1 -0
  976. package/types/src/utils/_GeomUtils.d.ts +14 -0
  977. package/types/src/utils/_GeomUtils.d.ts.map +1 -0
  978. package/types/src/utils/_RangeCoordUtils.d.ts +84 -0
  979. package/types/src/utils/_RangeCoordUtils.d.ts.map +1 -0
  980. package/types/src/utils/_RangeSetUtils.d.ts +55 -0
  981. package/types/src/utils/_RangeSetUtils.d.ts.map +1 -0
  982. package/types/src/utils/index.d.ts +2 -0
  983. package/types/src/utils/index.d.ts.map +1 -0
  984. package/types/src/workbook/IWorkbook.d.ts +711 -0
  985. package/types/src/workbook/IWorkbook.d.ts.map +1 -0
  986. package/types/src/workbook/Workbook.d.ts +342 -0
  987. package/types/src/workbook/Workbook.d.ts.map +1 -0
  988. package/types/src/workbook/WorkbookRange.d.ts +25 -0
  989. package/types/src/workbook/WorkbookRange.d.ts.map +1 -0
  990. package/types/src/workbook/WorkbookRanges.d.ts +39 -0
  991. package/types/src/workbook/WorkbookRanges.d.ts.map +1 -0
  992. package/types/src/workbook/_WorkbookMessages.d.ts +8 -0
  993. package/types/src/workbook/_WorkbookMessages.d.ts.map +1 -0
  994. package/types/src/workbook/_WorkbookUtils.d.ts +35 -0
  995. package/types/src/workbook/_WorkbookUtils.d.ts.map +1 -0
  996. package/types/src/workbook/index.d.ts +3 -0
  997. package/types/src/workbook/index.d.ts.map +1 -0
  998. package/types/src/workbookProtection/IWorkbookProtection.d.ts +57 -0
  999. package/types/src/workbookProtection/IWorkbookProtection.d.ts.map +1 -0
  1000. package/types/src/workbookProtection/WorkbookProtection.d.ts +14 -0
  1001. package/types/src/workbookProtection/WorkbookProtection.d.ts.map +1 -0
  1002. package/types/src/workbookProtection/index.d.ts +2 -0
  1003. package/types/src/workbookProtection/index.d.ts.map +1 -0
  1004. package/types/src/workbookView/IWorkbookView.d.ts +134 -0
  1005. package/types/src/workbookView/IWorkbookView.d.ts.map +1 -0
  1006. package/types/src/workbookView/WorkbookView.d.ts +49 -0
  1007. package/types/src/workbookView/WorkbookView.d.ts.map +1 -0
  1008. package/types/src/workbookView/index.d.ts +3 -0
  1009. package/types/src/workbookView/index.d.ts.map +1 -0
  1010. package/browser/cjs/B1wkCHMcDuFkMcC_.cjs +0 -6
  1011. package/browser/cjs/B6GPcN051NmcYcIT.cjs +0 -124
  1012. package/browser/cjs/BLBAZ-Bmj0EAhunn.cjs +0 -6
  1013. package/browser/cjs/BP8dBZEDNeacQUNp.cjs +0 -7
  1014. package/browser/cjs/BhNultME1o9xbmcX.cjs +0 -15
  1015. package/browser/cjs/Bm_Mc6TDFCZ1OJNj.cjs +0 -6
  1016. package/browser/cjs/Bo1CE3hgxUD5DGqu.cjs +0 -6
  1017. package/browser/cjs/Btp8A0kzb6cHSEMD.cjs +0 -6
  1018. package/browser/cjs/BvS2Hclafqxj6DCP.cjs +0 -6
  1019. package/browser/cjs/CASsDxt2bA8JHiEW.cjs +0 -6
  1020. package/browser/cjs/CI7HTC82ehwZZ7G9.cjs +0 -55
  1021. package/browser/cjs/CNw4tHphpF3kplDH.cjs +0 -6
  1022. package/browser/cjs/CO7SAK1ru6qnh7fr.cjs +0 -6
  1023. package/browser/cjs/CdLUUmZCUY5uWnq5.cjs +0 -6
  1024. package/browser/cjs/Cegi9isUAUZKUYFl.cjs +0 -6
  1025. package/browser/cjs/CnlnOI_NWWeETB4i.cjs +0 -6
  1026. package/browser/cjs/CphmaCdyCfgLRsS0.cjs +0 -6
  1027. package/browser/cjs/D0Qme7PcsKfdtShi.cjs +0 -6
  1028. package/browser/cjs/D74bWkyzhU8E2TDh.cjs +0 -6
  1029. package/browser/cjs/DFQA35q7KQ-zS2eo.cjs +0 -6
  1030. package/browser/cjs/DK27kwlwz0N4_IpD.cjs +0 -6
  1031. package/browser/cjs/DMfUZBX5dMS-QcFB.cjs +0 -6
  1032. package/browser/cjs/DTrbxLKRbIsj3mPI.cjs +0 -6
  1033. package/browser/cjs/DUbyVNEdEpgkjI-U.cjs +0 -6
  1034. package/browser/cjs/DUiZ8WcVcUyjfILT.cjs +0 -6
  1035. package/browser/cjs/DzZ_6y4OF7HzFZLT.cjs +0 -6
  1036. package/browser/cjs/vQgVD2EniUvkeXnq.cjs +0 -6
  1037. package/browser/esm/B8depZMfw4f8vJ6H.mjs +0 -10
  1038. package/browser/esm/B9z2sURkI9ThbLxE.mjs +0 -10
  1039. package/browser/esm/BDSqdyFcw4FRrODg.mjs +0 -23823
  1040. package/browser/esm/BLoU0uz84A8fWYom.mjs +0 -10
  1041. package/browser/esm/BgKy-xWSJeSV_EyO.mjs +0 -10
  1042. package/browser/esm/Bi2_8iLEY_M-v_34.mjs +0 -10
  1043. package/browser/esm/Bzs_r45vqhZAtTZK.mjs +0 -10
  1044. package/browser/esm/C39Yfk__mPOF8auo.mjs +0 -10
  1045. package/browser/esm/C4EnSMaP8fTEJmhu.mjs +0 -10
  1046. package/browser/esm/CWj2Ts01muSR6zp-.mjs +0 -12
  1047. package/browser/esm/Cd2b3Z4DxOR0M3qa.mjs +0 -4022
  1048. package/browser/esm/Cg7YNnt2uhmFG_3d.mjs +0 -10
  1049. package/browser/esm/CkU9J_RtpNfpxh0y.mjs +0 -10
  1050. package/browser/esm/D0Mb17_7UFEFNmkU.mjs +0 -426
  1051. package/browser/esm/D6VvBNUOfq8QUBY5.mjs +0 -10
  1052. package/browser/esm/DE0iHIHhP7sczC_y.mjs +0 -10
  1053. package/browser/esm/DORXFXgRUsjkR1kA.mjs +0 -10
  1054. package/browser/esm/DTPLUnlOvF2feqR4.mjs +0 -10
  1055. package/browser/esm/DTzUiMAnLD_Zuf0f.mjs +0 -10
  1056. package/browser/esm/D_lQo-PErOoj-8tN.mjs +0 -10
  1057. package/browser/esm/DbK0GAKpj9hwwFwY.mjs +0 -10
  1058. package/browser/esm/DflesN5VzS43jsHK.mjs +0 -5653
  1059. package/browser/esm/DoMqoQP6F7OPue_g.mjs +0 -10
  1060. package/browser/esm/DrIkV6ixO7gbuv7Q.mjs +0 -10
  1061. package/browser/esm/mxYovIi79sCzcZtQ.mjs +0 -10
  1062. package/browser/esm/oRsIla0R_H7slM9k.mjs +0 -10
  1063. package/browser/esm/u5XTTNCFdsbCZ-ud.mjs +0 -10
  1064. package/node/esm/3vOMW8PI4UI73pTa.mjs +0 -10
  1065. package/node/esm/B9z2sURkI9ThbLxE.mjs +0 -10
  1066. package/node/esm/BE2XMKirjoBI9zkt.mjs +0 -1072
  1067. package/node/esm/BL_7m0SH43tASZc8.mjs +0 -10
  1068. package/node/esm/BLoU0uz84A8fWYom.mjs +0 -10
  1069. package/node/esm/BNoPG6CBaybfp_G7.mjs +0 -10
  1070. package/node/esm/BgKy-xWSJeSV_EyO.mjs +0 -10
  1071. package/node/esm/Bi2_8iLEY_M-v_34.mjs +0 -10
  1072. package/node/esm/C4EnSMaP8fTEJmhu.mjs +0 -10
  1073. package/node/esm/CS080xy3HgmgAFgx.mjs +0 -10
  1074. package/node/esm/Cg7YNnt2uhmFG_3d.mjs +0 -10
  1075. package/node/esm/D6VvBNUOfq8QUBY5.mjs +0 -10
  1076. package/node/esm/D7cm1_99nK7c_-6L.mjs +0 -13
  1077. package/node/esm/DE0iHIHhP7sczC_y.mjs +0 -10
  1078. package/node/esm/DElHitSTYjDdkUx1.mjs +0 -10
  1079. package/node/esm/DORXFXgRUsjkR1kA.mjs +0 -10
  1080. package/node/esm/DP7a0Jrz8vTZnv2W.mjs +0 -10
  1081. package/node/esm/DTzUiMAnLD_Zuf0f.mjs +0 -10
  1082. package/node/esm/D_lQo-PErOoj-8tN.mjs +0 -10
  1083. package/node/esm/DbK0GAKpj9hwwFwY.mjs +0 -10
  1084. package/node/esm/DoMqoQP6F7OPue_g.mjs +0 -10
  1085. package/node/esm/mxYovIi79sCzcZtQ.mjs +0 -10
  1086. package/node/esm/oRsIla0R_H7slM9k.mjs +0 -10
  1087. package/node/esm/sVuz1UjytOtK5gck.mjs +0 -2458
  1088. package/node/esm/u5XTTNCFdsbCZ-ud.mjs +0 -10
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(o,s,c)=>(c=o==null?{}:e(i(o)),((e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c,l=r(i),u=0,d=l.length;u<d;u++)c=l[u],a.call(e,c)||c===o||t(e,c,{get:(e=>i[e]).bind(null,c),enumerable:!(s=n(i,c))||s.enumerable});return e})(!s&&o&&o.__esModule?c:t(c,`default`,{value:o,enumerable:!0}),o));Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
@@ -0,0 +1 @@
1
+ exports.loadEnumManifest=async function(){let e=`@0.7.23-beta.2`;e!==`@local`&&e!==`@0.0.0`||(e=``);let t=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${e}/types/scripting-enums.json`,n=await fetch(t);if(!n.ok)throw Error(`Unable to load script enum runtime (${n.status}) from ${t}.`);return n.json()};
@@ -0,0 +1,57 @@
1
+ const e=require("./A5-b-7zx2sEOEcvl.cjs");let t=require("@sheetxl/primitives");function n(e){console&&console.error&&console.error(`Error: ${e}`)}function r(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function i(e){let t=new Date().getTime(),n=e();return{time:new Date().getTime()-t,value:n}}function a(e){function t(){}t.prototype=e;let n=new t;function r(){return typeof n.bar}return r(),r(),e}var o=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}},s=class extends o{constructor(e){super([]),this.idx=1,Object.assign(this,v(e))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},c=class extends o{constructor(e){super(e.definition),this.orgText=``,Object.assign(this,v(e))}},l=class extends o{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,v(e))}},u=class extends o{constructor(e){super(e.definition),this.idx=1,Object.assign(this,v(e))}},d=class extends o{constructor(e){super(e.definition),this.idx=1,Object.assign(this,v(e))}},f=class extends o{constructor(e){super(e.definition),this.idx=1,Object.assign(this,v(e))}},p=class extends o{constructor(e){super(e.definition),this.idx=1,Object.assign(this,v(e))}},m=class extends o{constructor(e){super(e.definition),this.idx=1,Object.assign(this,v(e))}},h=class extends o{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,v(e))}},g=class{constructor(e){this.idx=1,Object.assign(this,v(e))}accept(e){e.visit(this)}};function _(e){function t(e){return e.map(_)}if(e instanceof s){let t={type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};return typeof e.label==`string`&&(t.label=e.label),t}if(e instanceof l)return{type:`Alternative`,definition:t(e.definition)};if(e instanceof u)return{type:`Option`,idx:e.idx,definition:t(e.definition)};if(e instanceof d)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};if(e instanceof f)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:_(new g({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof m)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:_(new g({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof p)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};if(e instanceof h)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};if(e instanceof g){let t={type:`Terminal`,name:e.terminalType.name,label:(n=e.terminalType,typeof(r=n).LABEL==`string`&&r.LABEL!==``?n.LABEL:n.name),idx:e.idx};typeof e.label==`string`&&(t.terminalLabel=e.label);let i=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=i instanceof RegExp?i.source:i),t}if(e instanceof c)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error(`non exhaustive match`);var n,r}function v(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var y=class{visit(e){let t=e;switch(t.constructor){case s:return this.visitNonTerminal(t);case l:return this.visitAlternative(t);case u:return this.visitOption(t);case d:return this.visitRepetitionMandatory(t);case f:return this.visitRepetitionMandatoryWithSeparator(t);case m:return this.visitRepetitionWithSeparator(t);case p:return this.visitRepetition(t);case h:return this.visitAlternation(t);case g:return this.visitTerminal(t);case c:return this.visitRule(t);default:throw Error(`non exhaustive match`)}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function b(e,t=[]){return e instanceof u||e instanceof p||e instanceof m||(e instanceof h?e.definition.some(e=>b(e,t)):!(e instanceof s&&t.includes(e))&&e instanceof o&&(e instanceof s&&t.push(e),e.definition.every(e=>b(e,t))))}function x(e){if(e instanceof s)return`SUBRULE`;if(e instanceof u)return`OPTION`;if(e instanceof h)return`OR`;if(e instanceof d)return`AT_LEAST_ONE`;if(e instanceof f)return`AT_LEAST_ONE_SEP`;if(e instanceof m)return`MANY_SEP`;if(e instanceof p)return`MANY`;if(e instanceof g)return`CONSUME`;throw Error(`non exhaustive match`)}var S=class{walk(e,t=[]){e.definition.forEach((n,r)=>{let i=e.definition.slice(r+1);if(n instanceof s)this.walkProdRef(n,i,t);else if(n instanceof g)this.walkTerminal(n,i,t);else if(n instanceof l)this.walkFlat(n,i,t);else if(n instanceof u)this.walkOption(n,i,t);else if(n instanceof d)this.walkAtLeastOne(n,i,t);else if(n instanceof f)this.walkAtLeastOneSep(n,i,t);else if(n instanceof m)this.walkManySep(n,i,t);else if(n instanceof p)this.walkMany(n,i,t);else{if(!(n instanceof h))throw Error(`non exhaustive match`);this.walkOr(n,i,t)}})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new u({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=C(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new u({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=C(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);e.definition.forEach(e=>{let t=new l({definition:[e]});this.walk(t,r)})}};function C(e,t,n){return[new u({definition:[new g({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function w(e){if(e instanceof s)return w(e.referencedRule);if(e instanceof g)return[e.terminalType];if(function(e){return e instanceof l||e instanceof u||e instanceof p||e instanceof d||e instanceof f||e instanceof m||e instanceof g||e instanceof c}(e))return function(e){let t=[],n=e.definition,r,i=0,a=n.length>i,o=!0;for(;a&&o;)r=n[i],o=b(r),t=t.concat(w(r)),i+=1,a=n.length>i;return[...new Set(t)]}(e);if(function(e){return e instanceof h}(e))return function(e){let t=e.definition.map(e=>w(e));return[...new Set(t.flat())]}(e);throw Error(`non exhaustive match`)}var T=`_~IN~_`,E=class extends S{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){let r=(i=e.referencedRule,a=e.idx,i.name+a+T+this.topProd.name);var i,a;let o=w(new l({definition:t.concat(n)}));this.follows[r]=o}};function D(e){return e.charCodeAt(0)}function O(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function k(e,t){if(!0===e[t])throw`duplicate flag `+t;e[t],e[t]=!0}function A(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function j(){throw Error(`Internal Error - Should never get here!`)}function M(e){return e.type===`Character`}var N=[];for(let e=D(`0`);e<=D(`9`);e++)N.push(e);var P=[D(`_`)].concat(N);for(let e=D(`a`);e<=D(`z`);e++)P.push(e);for(let e=D(`A`);e<=D(`Z`);e++)P.push(e);var ee=[D(` `),D(`\f`),D(`
2
+ `),D(`\r`),D(` `),D(`\v`),D(` `),D(`\xA0`),D(` `),D(` `),D(` `),D(` `),D(` `),D(` `),D(` `),D(` `),D(` `),D(` `),D(` `),D(` `),D(`\u2028`),D(`\u2029`),D(` `),D(` `),D(` `),D(``)],te=/[0-9a-fA-F]/,F=/[0-9]/,ne=/[1-9]/,I=class{visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this):this.visit(n))}}visit(e){switch(e.type){case`Pattern`:this.visitPattern(e);break;case`Flags`:this.visitFlags(e);break;case`Disjunction`:this.visitDisjunction(e);break;case`Alternative`:this.visitAlternative(e);break;case`StartAnchor`:this.visitStartAnchor(e);break;case`EndAnchor`:this.visitEndAnchor(e);break;case`WordBoundary`:this.visitWordBoundary(e);break;case`NonWordBoundary`:this.visitNonWordBoundary(e);break;case`Lookahead`:this.visitLookahead(e);break;case`NegativeLookahead`:this.visitNegativeLookahead(e);break;case`Lookbehind`:this.visitLookbehind(e);break;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);break;case`Character`:this.visitCharacter(e);break;case`Set`:this.visitSet(e);break;case`Group`:this.visitGroup(e);break;case`GroupBackReference`:this.visitGroupBackReference(e);break;case`Quantifier`:this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},L={},re=new class{constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:k(n,`global`);break;case`i`:k(n,`ignoreCase`);break;case`m`:k(n,`multiLine`);break;case`u`:k(n,`unicode`);break;case`y`:k(n,`sticky`)}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:let t;switch(this.consumeChar(`?`),this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}}A(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return j()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`)}if(!0===e&&t===void 0)return;A(t)}if(!0!==e||t!==void 0)return A(t)?(this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t):void 0}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group()}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),A(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):j()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[D(`
3
+ `),D(`\r`),D(`\u2028`),D(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=N;break;case`D`:e=N,t=!0;break;case`s`:e=ee;break;case`S`:e=ee,t=!0;break;case`w`:e=P;break;case`W`:e=P,t=!0}return A(e)?{type:`Set`,value:e,complement:t}:j()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=D(`\f`);break;case`n`:e=D(`
4
+ `);break;case`r`:e=D(`\r`);break;case`t`:e=D(` `);break;case`v`:e=D(`\v`)}return A(e)?{type:`Character`,value:e}:j()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:D(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:D(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
5
+ `:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:D(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),t=!0);this.isClassAtom();){let t=this.classAtom();if(t.type,M(t)&&this.isRangeDash()){this.consumeChar(`-`);let n=this.classAtom();if(n.type,M(n)){if(n.value<t.value)throw Error(`Range out of order in character class`);e.push({from:t.value,to:n.value})}else O(t.value,e),e.push(D(`-`)),O(n.value,e)}else O(t.value,e)}return this.consumeChar(`]`),{type:`Set`,complement:t,value:e}}classAtom(){switch(this.peekChar()){case`]`:case`
6
+ `:case`\r`:case`\u2028`:case`\u2029`:throw Error(`TBD`);case`\\`:return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`b`:return this.consumeChar(`b`),{type:`Character`,value:D(`\b`)};case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;this.consumeChar(`(`),this.peekChar(0)===`?`?(this.consumeChar(`?`),this.consumeChar(`:`),e=!1):this.groupIdx++;let t=this.disjunction();this.consumeChar(`)`);let n={type:`Group`,capturing:e,value:t};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(!1===ne.test(e))throw Error(`Expecting a positive integer`);for(;F.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===F.test(e))throw Error(`Expecting an integer`);for(;F.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
7
+ `:case`\r`:case`\u2028`:case`\u2029`:case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:throw Error(`TBD`);default:return{type:`Character`,value:D(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case`g`:case`i`:case`m`:case`u`:case`y`:return!0;default:return!1}}isRangeDash(){return this.peekChar()===`-`&&this.isClassAtom(1)}isDigit(){return F.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case`]`:case`
8
+ `:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case`.`:case`\\`:case`[`:case`(`:return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case`^`:case`$`:return!0;case`\\`:switch(this.peekChar(1)){case`b`:case`B`:return!0;default:return!1}case`(`:return this.peekChar(1)===`?`&&(this.peekChar(2)===`=`||this.peekChar(2)===`!`||this.peekChar(2)===`<`&&(this.peekChar(3)===`=`||this.peekChar(3)===`!`));default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:case`/`:case`
9
+ `:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}parseHexDigits(e){let t=``;for(let n=0;n<e;n++){let e=this.popChar();if(!1===te.test(e))throw Error(`Expecting a HexDecimal digits`);t+=e}return{type:`Character`,value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error(`Expected: '`+e+`' but found: '`+this.input[this.idx]+`' at offset: `+this.idx);if(this.idx>=this.input.length)throw Error(`Unexpected end of input`);this.idx++}loc(e){return{begin:e,end:this.idx}}};function ie(e){let t=e.toString();if(L.hasOwnProperty(t))return L[t];{let e=re.pattern(t);return L[t]=e,e}}var ae=`Complement Sets are not supported for first char optimization`,oe=`Unable to use "first char" lexer optimizations:
10
+ `;function se(e,t=!1){try{let t=ie(e);return ce(t.value,{},t.flags.ignoreCase)}catch(i){if(i.message===ae)t&&r(`${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.`);else{let r=``;t&&(r=`
11
+ This will disable the lexer's first char optimizations.
12
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),n(`${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`+r)}}return[]}function ce(e,t,n){switch(e.type){case`Disjunction`:for(let r=0;r<e.value.length;r++)ce(e.value[r],t,n);break;case`Alternative`:let r=e.value;for(let e=0;e<r.length;e++){let i=r[e];switch(i.type){case`EndAnchor`:case`GroupBackReference`:case`Lookahead`:case`NegativeLookahead`:case`Lookbehind`:case`NegativeLookbehind`:case`StartAnchor`:case`WordBoundary`:case`NonWordBoundary`:continue}let a=i;switch(a.type){case`Character`:le(a.value,t,n);break;case`Set`:if(!0===a.complement)throw Error(ae);a.value.forEach(e=>{if(typeof e==`number`)le(e,t,n);else{let r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)le(e,t,n);else{for(let e=r.from;e<=r.to&&e<256;e++)le(e,t,n);if(r.to>=256){let e=r.from>=256?r.from:256,n=r.to,i=z(e),a=z(n);for(let e=i;e<=a;e++)t[e]=e}}}});break;case`Group`:ce(a.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}let o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type===`Group`&&!1===de(a)||a.type!==`Group`&&!1===o)break}break;default:throw Error(`non exhaustive match!`)}return Object.values(t)}function le(e,t,n){let r=z(e);t[r]=r,!0===n&&function(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let e=z(r.charCodeAt(0));t[e]=e}else{let e=n.toLowerCase();if(e!==n){let n=z(e.charCodeAt(0));t[n]=n}}}(e,t)}function ue(e,t){return e.value.find(e=>{if(typeof e==`number`)return t.includes(e);{let n=e;return t.find(e=>n.from<=e&&e<=n.to)!==void 0}})}function de(e){let t=e.quantifier;return!(!t||t.atLeast!==0)||!!e.value&&(Array.isArray(e.value)?e.value.every(de):de(e.value))}var fe=class extends I{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case`Lookahead`:this.visitLookahead(e);return;case`NegativeLookahead`:this.visitNegativeLookahead(e);return;case`Lookbehind`:this.visitLookbehind(e);return;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){this.targetCharCodes.includes(e.value)&&(this.found=!0)}visitSet(e){e.complement?ue(e,this.targetCharCodes)===void 0&&(this.found=!0):ue(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function pe(e,t){if(t instanceof RegExp){let n=ie(t),r=new fe(e);return r.visit(n),r.found}for(let n of t){let t=n.charCodeAt(0);if(e.includes(t))return!0}return!1}var R=`PATTERN`,me=`defaultMode`;function he(e,t){let r=(t=Object.assign({safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,`
13
+ `],tracer:(e,t)=>t()},t)).tracer,i;r(`initCharCodeToOptimizedIndexMap`,()=>{(function(){if(De.length===0){De=Array(65536);for(let e=0;e<65536;e++)De[e]=e>255?255+~~(e/255):e}})()}),r(`Reject Lexer.NA`,()=>{i=e.filter(e=>e[R]!==W.NA)});let a,o,s,c,l,u,d,f,p,m,h,g=!1;r(`Transform Patterns`,()=>{g=!1,a=i.map(e=>{let t=e[R];if(t instanceof RegExp){let e=t.source;return e.length!==1||e===`^`||e===`$`||e===`.`||t.ignoreCase?e.length!==2||e[0]!==`\\`||[`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`].includes(e[1])?ye(t):e[1]:e}if(typeof t==`function`)return g=!0,{exec:t};if(typeof t==`object`)return g=!0,t;if(typeof t==`string`){if(t.length===1)return t;{let e=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`);return ye(new RegExp(e))}}throw Error(`non exhaustive match`)})}),r(`misc mapping`,()=>{o=i.map(e=>e.tokenTypeIdx),s=i.map(e=>{let t=e.GROUP;if(t!==W.SKIPPED){if(typeof t==`string`)return t;if(t===void 0)return!1;throw Error(`non exhaustive match`)}}),c=i.map(e=>{let t=e.LONGER_ALT;if(t)return Array.isArray(t)?t.map(e=>i.indexOf(e)):[i.indexOf(t)]}),l=i.map(e=>e.PUSH_MODE),u=i.map(e=>Object.hasOwn(e,`POP_MODE`))}),r(`Line Terminator Handling`,()=>{let e=Te(t.lineTerminatorCharacters);d=i.map(e=>!1),t.positionTracking!==`onlyOffset`&&(d=i.map(t=>Object.hasOwn(t,`LINE_BREAKS`)?!!t.LINE_BREAKS:!1===Ce(t,e)&&pe(e,t.PATTERN)))}),r(`Misc Mapping #2`,()=>{f=i.map(be),p=a.map(xe),m=i.reduce((e,t)=>{let n=t.GROUP;return typeof n==`string`&&n!==W.SKIPPED&&(e[n]=[]),e},{}),h=a.map((e,t)=>({pattern:a[t],longerAlt:c[t],canLineTerminator:d[t],isCustom:f[t],short:p[t],group:s[t],push:l[t],pop:u[t],tokenTypeIdx:o[t],tokenType:i[t]}))});let _=!0,v=[];return t.safeMode||r(`First Char Optimization`,()=>{v=i.reduce((e,r,i)=>{if(typeof r.PATTERN==`string`)Ee(e,z(r.PATTERN.charCodeAt(0)),h[i]);else if(Array.isArray(r.START_CHARS_HINT)){let t;r.START_CHARS_HINT.forEach(n=>{let r=z(typeof n==`string`?n.charCodeAt(0):n);t!==r&&(t=r,Ee(e,r,h[i]))})}else if(r.PATTERN instanceof RegExp)if(r.PATTERN.unicode)_=!1,t.ensureOptimizations&&n(`${oe}\tUnable to analyze < ${r.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`);else{let n=se(r.PATTERN,t.ensureOptimizations);n.length===0&&(_=!1),n.forEach(t=>{Ee(e,t,h[i])})}else t.ensureOptimizations&&n(`${oe}\tTokenType: <${r.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`),_=!1;return e},[])}),{emptyGroups:m,patternIdxToConfig:h,charCodeToPatternIdxToConfig:v,hasCustom:g,canBeOptimized:_}}function ge(e,t){let n=[],r=function(e){let t=e.filter(e=>!Object.hasOwn(e,R));return{errors:t.map(e=>({message:`Token Type: ->`+e.name+`<- missing static 'PATTERN' property`,type:H.MISSING_PATTERN,tokenTypes:[e]})),valid:e.filter(e=>!t.includes(e))}}(e);n=n.concat(r.errors);let i=function(e){let t=e.filter(e=>{let t=e[R];return!(t instanceof RegExp||typeof t==`function`||Object.hasOwn(t,`exec`)||typeof t==`string`)});return{errors:t.map(e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.`,type:H.INVALID_PATTERN,tokenTypes:[e]})),valid:e.filter(e=>!t.includes(e))}}(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(function(e){let t=[],n=e.filter(e=>e[R]instanceof RegExp);return t=t.concat(function(e){class t extends I{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e.filter(e=>{let n=e.PATTERN;try{let e=ie(n),r=new t;return r.visit(e),r.found}catch{return _e.test(n.source)}}).map(e=>({message:`Unexpected RegExp Anchor Error:
14
+ Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
15
+ See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:H.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}(n)),t=t.concat(function(e){class t extends I{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e.filter(e=>{let n=e.PATTERN;try{let e=ie(n),r=new t;return r.visit(e),r.found}catch{return ve.test(n.source)}}).map(e=>({message:`Unexpected RegExp Anchor Error:
16
+ Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
17
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:H.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}(n)),t=t.concat(function(e){return e.filter(e=>{let t=e[R];return t instanceof RegExp&&(t.multiline||t.global)}).map(e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' may NOT contain global('g') or multiline('m')`,type:H.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}(n)),t=t.concat(function(e){let t=[],n=e.map(n=>e.reduce((e,r)=>(n.PATTERN.source!==r.PATTERN.source||t.includes(r)||r.PATTERN===W.NA||(t.push(r),e.push(r)),e),[]));return n=n.filter(Boolean),n.filter(e=>e.length>1).map(e=>{let t=e.map(e=>e.name);return{message:`The same RegExp pattern ->${e[0].PATTERN}<-has been used in all of the following Token Types: ${t.join(`, `)} <-`,type:H.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}(n)),t=t.concat(function(e){return e.filter(e=>e.PATTERN.test(``)).map(e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' must not match an empty string`,type:H.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}(n)),t}(a)),n=n.concat(function(e){return e.filter(e=>{if(!Object.hasOwn(e,`GROUP`))return!1;let t=e.GROUP;return t!==W.SKIPPED&&t!==W.NA&&typeof t!=`string`}).map(e=>({message:`Token Type: ->`+e.name+`<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String`,type:H.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}(a)),n=n.concat(function(e,t){return e.filter(e=>e.PUSH_MODE!==void 0&&!t.includes(e.PUSH_MODE)).map(e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:H.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}(a,t)),n=n.concat(function(e){let t=[],n=e.reduce((e,t,n)=>{let r=t.PATTERN;return r===W.NA||(typeof r==`string`?e.push({str:r,idx:n,tokenType:t}):r instanceof RegExp&&(i=r,[`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`].find(e=>i.source.indexOf(e)!==-1)===void 0)&&e.push({str:r.source,idx:n,tokenType:t})),e;var i},[]);return e.forEach((e,r)=>{n.forEach(({str:n,idx:i,tokenType:a})=>{if(r<i&&function(e,t){if(t instanceof RegExp){if(/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source))return!1;let n=t.exec(e);return n!==null&&n.index===0}if(typeof t==`function`)return t(e,0,[],{});if(Object.hasOwn(t,`exec`))return t.exec(e,0,[],{});if(typeof t==`string`)return t===e;throw Error(`non exhaustive match`)}(n,e.PATTERN)){let n=`Token: ->${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:H.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}(a)),n}var _e=/[^\\][$]/,ve=/[^\\[][\^]|^\^/;function ye(e){let t=e.ignoreCase?`iy`:`y`;return RegExp(`${e.source}`,t)}function be(e){let t=e.PATTERN;if(t instanceof RegExp)return!1;if(typeof t==`function`||Object.hasOwn(t,`exec`))return!0;if(typeof t==`string`)return!1;throw Error(`non exhaustive match`)}function xe(e){return typeof e==`string`&&e.length===1&&e.charCodeAt(0)}var Se={test:function(e){let t=e.length;for(let n=this.lastIndex;n<t;n++){let t=e.charCodeAt(n);if(t===10)return this.lastIndex=n+1,!0;if(t===13)return e.charCodeAt(n+1)===10?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function Ce(e,t){if(Object.hasOwn(e,`LINE_BREAKS`))return!1;if(e.PATTERN instanceof RegExp){try{pe(t,e.PATTERN)}catch(e){return{issue:H.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(typeof e.PATTERN==`string`)return!1;if(be(e))return{issue:H.CUSTOM_LINE_BREAK};throw Error(`non exhaustive match`)}function we(e,t){if(t.issue===H.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===H.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}function Te(e){return e.map(e=>typeof e==`string`?e.charCodeAt(0):e)}function Ee(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}var De=[];function z(e){return e<256?e:De[e]}function B(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function Oe(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var ke=1,Ae={};function V(e){let t=function(e){let t=[...e],n=e,r=!0;for(;r;){n=n.map(e=>e.CATEGORIES).flat().filter(Boolean);let e=n.filter(e=>!t.includes(e));t=t.concat(e),e.length===0?r=!1:n=e}return t}(e);(function(e){e.forEach(e=>{var t;Me(e)||(Ae[ke]=e,e.tokenTypeIdx=ke++),Ne(e)&&!Array.isArray(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Ne(e)||(e.CATEGORIES=[]),t=e,Object.hasOwn(t??{},`categoryMatches`)||(e.categoryMatches=[]),function(e){return Object.hasOwn(e??{},`categoryMatchesMap`)}(e)||(e.categoryMatchesMap={})})})(t),function(e){e.forEach(e=>{je([],e)})}(t),function(e){e.forEach(e=>{e.categoryMatches=[],Object.keys(e.categoryMatchesMap).forEach(t=>{e.categoryMatches.push(Ae[t].tokenTypeIdx)})})}(t),t.forEach(e=>{e.isParent=e.categoryMatches.length>0})}function je(e,t){e.forEach(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),t.CATEGORIES.forEach(n=>{let r=e.concat(t);r.includes(n)||je(r,n)})}function Me(e){return Object.hasOwn(e??{},`tokenTypeIdx`)}function Ne(e){return Object.hasOwn(e??{},`CATEGORIES`)}function Pe(e){return Object.hasOwn(e??{},`tokenTypeIdx`)}var H,Fe={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i,a)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`};(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`,e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]=`MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE`})(H||={});var U={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
18
+ `,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Fe,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(U);var W=class{constructor(e,t=U){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.cachedGroupKeys=[],this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--\x3e <${e}>`);let{time:r,value:a}=i(t),o=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,a}return t()},typeof t==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
19
+ a boolean 2nd argument is no longer supported`);this.config=Object.assign({},U,t);let n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n==`number`&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,()=>{let n,i=!0;this.TRACE_INIT(`Lexer Config handling`,()=>{if(this.config.lineTerminatorsPattern===U.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Se;else if(this.config.lineTerminatorCharacters===U.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
20
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Array.isArray(e)?n={modes:{defaultMode:[...e]},defaultMode:me}:(i=!1,n=Object.assign({},e))}),!1===this.config.skipValidations&&(this.TRACE_INIT(`performRuntimeChecks`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e){let t=[];return Object.hasOwn(e,`defaultMode`)||t.push({message:`A MultiMode Lexer cannot be initialized without a <defaultMode> property in its definition
21
+ `,type:H.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object.hasOwn(e,`modes`)||t.push({message:`A MultiMode Lexer cannot be initialized without a <modes> property in its definition
22
+ `,type:H.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object.hasOwn(e,`modes`)&&Object.hasOwn(e,`defaultMode`)&&!Object.hasOwn(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${me}: <${e.defaultMode}>which does not exist\n`,type:H.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object.hasOwn(e,`modes`)&&Object.keys(e.modes).forEach(n=>{let r=e.modes[n];r.forEach((e,i)=>{e===void 0?t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${i}>\n`,type:H.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Object.hasOwn(e,`LONGER_ALT`)&&(Array.isArray(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT]).forEach(i=>{i===void 0||r.includes(i)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${e.name}> outside of mode <${n}>\n`,type:H.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),t}(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT(`performWarningRuntimeChecks`,()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(function(e,t,n){let r=[],i=!1,a=Object.values(e.modes||{}).flat().filter(Boolean).filter(e=>e[R]!==W.NA),o=Te(n);return t&&a.forEach(e=>{let t=Ce(e,o);if(!1!==t){let n={message:we(e,t),type:t.issue,tokenType:e};r.push(n)}else Object.hasOwn(e,`LINE_BREAKS`)?!0===e.LINE_BREAKS&&(i=!0):pe(o,e.PATTERN)&&(i=!0)}),t&&!i&&r.push({message:`Warning: No LINE_BREAKS Found.
23
+ This Lexer has been defined to track line and column information,
24
+ But none of the Token Types can be identified as matching a line terminator.
25
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
26
+ for details.`,type:H.NO_LINE_BREAKS_FLAGS}),r}(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},Object.entries(n.modes).forEach(([e,t])=>{n.modes[e]=t.filter(e=>e!==void 0)});let o=Object.keys(n.modes);if(Object.entries(n.modes).forEach(([e,n])=>{this.TRACE_INIT(`Mode: <${e}> processing`,()=>{if(this.modes.push(e),!1===this.config.skipValidations&&this.TRACE_INIT(`validatePatterns`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ge(n,o))}),this.lexerDefinitionErrors.length===0){let r;V(n),this.TRACE_INIT(`analyzeTokenTypes`,()=>{r=he(n,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[e]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[e]=r.charCodeToPatternIdxToConfig,this.emptyGroups=Object.assign({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[e]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,this.cachedGroupKeys=Object.keys(this.emptyGroups),this.lexerDefinitionErrors.length>0&&!this.config.deferDefinitionErrorsHandling){let e=this.lexerDefinitionErrors.map(e=>e.message).join(`-----------------------
27
+ `);throw Error(`Errors detected in definition of Lexer:
28
+ `+e)}this.lexerDefinitionWarning.forEach(e=>{r(e.message)}),this.TRACE_INIT(`Choosing sub-methods implementations`,()=>{if(i&&(this.handleModes=()=>{}),!1===this.trackStartLines&&(this.computeNewColumn=e=>e),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=()=>{}),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT(`Failed Optimization Warnings`,()=>{let e=Object.entries(this.canModeBeOptimized).reduce((e,[t,n])=>(!1===n&&e.push(t),e),[]);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.`)}),this.TRACE_INIT(`clearRegExpParserCache`,()=>{L={}}),this.TRACE_INIT(`toFastProperties`,()=>{a(this)})})}tokenize(e,t=this.defaultMode){if(this.lexerDefinitionErrors.length>0){let e=this.lexerDefinitionErrors.map(e=>e.message).join(`-----------------------
29
+ `);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer:
30
+ `+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=e,v=_.length,y=0,b=0,x=this.hasCustom?0:Math.floor(e.length/10),S=Array(x),C=[],w=this.trackStartLines?1:void 0,T=this.trackStartLines?1:void 0,E={};for(let e=0;e<this.cachedGroupKeys.length;e++)E[this.cachedGroupKeys[e]]=[];let D=this.trackStartLines,O=this.config.lineTerminatorsPattern,k=0,A=[],j=[],M=[],N=[];Object.freeze(N);let P=!1,ee=e=>{if(M.length===1&&e.tokenType.PUSH_MODE===void 0){let t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);C.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{M.pop();let e=M.at(-1);A=this.patternIdxToConfig[e],j=this.charCodeToPatternIdxToConfig[e],k=A.length;let t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;P=!(!j||!t)}};function te(e){M.push(e),j=this.charCodeToPatternIdxToConfig[e],A=this.patternIdxToConfig[e],k=A.length;let t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;P=!(!j||!t)}let F;te.call(this,t);let ne=this.config.recoveryEnabled;for(;y<v;){s=null,u=-1;let t=_.charCodeAt(y),x;if(P){let e=z(t),n=j[e];x=n===void 0?N:n}else x=A;let I=x.length;for(n=0;n<I;n++){F=x[n];let r=F.pattern;c=null;let d=F.short;if(!1===d?!0===F.isCustom?(g=r.exec(_,y,S,E),g===null?s=null:(s=g[0],u=s.length,g.payload!==void 0&&(c=g.payload))):(r.lastIndex=y,u=this.matchLength(r,e,y)):t===d&&(u=1,s=r),u!==-1){if(o=F.longerAlt,o!==void 0){s=e.substring(y,y+u);let t=o.length;for(i=0;i<t;i++){let t=A[o[i]],n=t.pattern;if(l=null,!0===t.isCustom?(g=n.exec(_,y,S,E),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){s=a,u=a.length,c=l,F=t;break}}}break}}if(u!==-1){if(d=F.group,d!==void 0&&(s=s===null?e.substring(y,y+u):s,f=F.tokenTypeIdx,p=this.createTokenInstance(s,y,f,F.tokenType,w,T,u),this.handlePayload(p,c),!1===d?b=this.addToken(S,b,p):E[d].push(p)),!0===D&&!0===F.canLineTerminator){let t,n,r=0;O.lastIndex=0;do s=s===null?e.substring(y,y+u):s,t=O.test(s),!0===t&&(n=O.lastIndex-1,r++);while(!0===t);r===0?T=this.computeNewColumn(T,u):(w+=r,T=u-n,this.updateTokenEndLineColumnLocation(p,d,n,r,w,T,u))}else T=this.computeNewColumn(T,u);y+=u,this.handleModes(F,ee,te,p)}else{let t=y,n=w,i=T,a=!1===ne;for(;!1===a&&y<v;)for(y++,r=0;r<k;r++){let t=A[r],n=t.pattern,i=t.short;if(!1===i?!0===t.isCustom?a=n.exec(_,y,S,E)!==null:(n.lastIndex=y,a=n.exec(e)!==null):_.charCodeAt(y)===i&&(a=!0),!0===a)break}if(m=y-t,T=this.computeNewColumn(T,m),h=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_,t,m,n,i,M.at(-1)),C.push({offset:t,line:n,column:i,length:m,message:h}),!1===ne)break}}return this.hasCustom||(S.length=b),{tokens:S,groups:E,errors:C}}handleModes(e,t,n,r){if(!0===e.pop){let i=e.push;t(r),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,n,r,i,a,o){let s,c;t!==void 0&&(s=n===o-1,c=s?-1:0,r===1&&!0===s||(e.endLine=i+c,e.endColumn=a-1-c))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,a,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){return e.push(n),t}addTokenUsingMemberAccess(e,t,n){return e[t]=n,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){t!==null&&(e.payload=t)}match(e,t,n){return!0===e.test(t)?t.substring(n,e.lastIndex):null}matchLength(e,t,n){return!0===e.test(t)?e.lastIndex-n:-1}};function G(e){return Ie(e)?e.LABEL:e.name}function Ie(e){return typeof e.LABEL==`string`&&e.LABEL!==``}W.SKIPPED=`This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.`,W.NA=/NOT_APPLICABLE/;var Le=`parent`,Re=`categories`,ze=`label`,Be=`group`,Ve=`push_mode`,He=`pop_mode`,Ue=`longer_alt`,We=`line_breaks`,Ge=`start_chars_hint`;function K(e){return function(e){let t=e.pattern,n={};if(n.name=e.name,t!==void 0&&(n.PATTERN=t),Object.hasOwn(e,Le))throw`The parent property is no longer supported.
31
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Object.hasOwn(e,Re)&&(n.CATEGORIES=e[Re]),V([n]),Object.hasOwn(e,ze)&&(n.LABEL=e[ze]),Object.hasOwn(e,Be)&&(n.GROUP=e[Be]),Object.hasOwn(e,He)&&(n.POP_MODE=e[He]),Object.hasOwn(e,Ve)&&(n.PUSH_MODE=e[Ve]),Object.hasOwn(e,Ue)&&(n.LONGER_ALT=e[Ue]),Object.hasOwn(e,We)&&(n.LINE_BREAKS=e[We]),Object.hasOwn(e,Ge)&&(n.START_CHARS_HINT=e[Ge]),n}(e)}var q=K({name:`EOF`,pattern:W.NA});function Ke(e,t,n,r,i,a,o,s){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}V([q]);var qe={buildMismatchTokenMessage:({expected:e,actual:t,previous:n,ruleName:r})=>`Expecting ${Ie(e)?`--\x3e ${G(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>`Redundant input, expecting EOF but found: `+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){let a=`
32
+ but found: '`+t[0].image+`'`;return r?`Expecting: `+r+a:`Expecting: one of these possible Token sequences:\n${e.reduce((e,t)=>e.concat(t),[]).map(e=>`[${e.map(e=>G(e)).join(`, `)}]`).map((e,t)=>` ${t+1}. ${e}`).join(`
33
+ `)}`+a},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let i=`
34
+ but found: '`+t[0].image+`'`;return n?`Expecting: `+n+i:`Expecting: expecting at least one iteration which starts with one of these possible Token sequences::\n <${e.map(e=>`[${e.map(e=>G(e)).join(`,`)}]`).join(` ,`)}>`+i}};Object.freeze(qe);var Je={buildRuleNotFoundError:(e,t)=>`Invalid grammar, reference to a rule which is not defined: ->`+t.nonTerminalName+`<-
35
+ inside top level rule: ->`+e.name+`<-`},J={buildDuplicateFoundError(e,t){let n=e.name,r=t[0],i=r.idx,a=x(r),o=(c=r)instanceof g?c.terminalType.name:c instanceof s?c.nonTerminalName:``;var c;let l=`->${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 `;return l=l.replace(/[ \t]+/g,` `),l=l.replace(/\s\s+/g,`
36
+ `),l},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){let t=e.prefixPath.map(e=>G(e)).join(`, `),n=e.alternation.idx===0?``:e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(` ,`)}> due to common lookahead prefix\nin <OR${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?``:e.alternation.idx,n=e.prefixPath.length===0,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(` ,`)}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,\n`;return n?r+=`These alternatives are all empty (match no tokens), making them indistinguishable.
37
+ Only the last alternative may be empty.
38
+ `:r+=`<${e.prefixPath.map(e=>G(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
39
+ For Further details.`,r},buildEmptyRepetitionError(e){let t=x(e.repetition);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.`},buildTokenNameError:e=>`deprecated`,buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){let t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${t} --\x3e ${e.leftRecursionPath.map(e=>e.name).concat([t]).join(` --> `)}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>`deprecated`,buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof c?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}},Y,Ye=class extends y{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){Object.values(this.nameToTopRule).forEach(e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Q.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},Xe=class extends S{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName=``,this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(`The path does not start with the walker's top Rule!`);return this.ruleStack=[...this.path.ruleStack].reverse(),this.occurrenceStack=[...this.path.occurrenceStack].reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){this.ruleStack.length===0?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Ze=class extends Xe{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName=``,this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let e=new l({definition:t.concat(n)});this.possibleTokTypes=w(e),this.found=!0}}},Qe=class extends S{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},$e=class extends Qe{walkMany(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof g&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}},et=class extends Qe{walkManySep(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof g&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}},tt=class extends Qe{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof g&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}},nt=class extends Qe{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof g&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}};function rt(e,t,n=[]){n=[...n];let r=[],i=0;function a(a){let o=rt(a.concat(e.slice(i+1)),t,n);return r.concat(o)}for(;n.length<t&&i<e.length;){let t=e[i];if(t instanceof l||t instanceof s)return a(t.definition);if(t instanceof u)r=a(t.definition);else{if(t instanceof d)return a(t.definition.concat([new p({definition:t.definition})]));if(t instanceof f)return a([new l({definition:t.definition}),new p({definition:[new g({terminalType:t.separator})].concat(t.definition)})]);if(t instanceof m)r=a(t.definition.concat([new p({definition:[new g({terminalType:t.separator})].concat(t.definition)})]));else if(t instanceof p)r=a(t.definition.concat([new p({definition:t.definition})]));else{if(t instanceof h)return t.definition.forEach(e=>{e.definition.length!==0&&(r=a(e.definition))}),r;if(!(t instanceof g))throw Error(`non exhaustive match`);n.push(t.terminalType)}}i++}return r.push({partialPath:n,suffixDef:e.slice(i)}),r}function it(e,t,n,r){let i=[...n];i.push(e.name);let a=[...r];return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}function at(e){if(e instanceof u||e===`Option`)return Y.OPTION;if(e instanceof p||e===`Repetition`)return Y.REPETITION;if(e instanceof d||e===`RepetitionMandatory`)return Y.REPETITION_MANDATORY;if(e instanceof f||e===`RepetitionMandatoryWithSeparator`)return Y.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof m||e===`RepetitionWithSeparator`)return Y.REPETITION_WITH_SEPARATOR;if(e instanceof h||e===`Alternation`)return Y.ALTERNATION;throw Error(`non exhaustive match`)}function ot(e,t,n,r){let i=e.length,a=e.every(e=>e.every(e=>e.length===1));if(t)return function(t){let r=t.map(e=>e.GATE);for(let t=0;t<i;t++){let i=e[t],a=i.length,o=r[t];if(o===void 0||!1!==o.call(this))e:for(let e=0;e<a;e++){let r=i[e],a=r.length;for(let e=0;e<a;e++)if(!1===n(this.LA_FAST(e+1),r[e]))continue e;return t}}};if(a&&!r){let t=e.map(e=>e.flat()).reduce((e,t,n)=>(t.forEach(t=>{t.tokenTypeIdx in e||(e[t.tokenTypeIdx]=n),t.categoryMatches.forEach(t=>{Object.hasOwn(e,t)||(e[t]=n)})}),e),{});return function(){let e=this.LA_FAST(1);return t[e.tokenTypeIdx]}}return function(){for(let t=0;t<i;t++){let r=e[t],i=r.length;e:for(let e=0;e<i;e++){let i=r[e],a=i.length;for(let e=0;e<a;e++)if(!1===n(this.LA_FAST(e+1),i[e]))continue e;return t}}}}function st(e,t,n){let r=e.every(e=>e.length===1),i=e.length;if(r&&!n){let t=e.flat();if(t.length===1&&t[0].categoryMatches.length===0){let e=t[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===e}}{let e=t.reduce((e,t,n)=>(e[t.tokenTypeIdx]=!0,t.categoryMatches.forEach(t=>{e[t]=!0}),e),[]);return function(){let t=this.LA_FAST(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;n<i;n++){let r=e[n],i=r.length;for(let e=0;e<i;e++)if(!1===t(this.LA_FAST(e+1),r[e]))continue e;return!0}return!1}}(function(e){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`})(Y||={});var ct=class extends S{constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)}walkOption(e,t,n){this.checkIsTarget(e,Y.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,Y.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,Y.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,Y.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,Y.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}},lt=class extends y{constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||this.targetRef!==void 0&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Y.OPTION)}visitRepetition(e){this.checkIsTarget(e,Y.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Y.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Y.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Y.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Y.ALTERNATION)}};function ut(e){let t=Array(e);for(let n=0;n<e;n++)t[n]=[];return t}function dt(e){let t=[``];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e=0;e<t.length;e++){let n=t[e];i.push(n+`_`+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){let t=`_`+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function ft(e,t,n){for(let r=0;r<e.length;r++){if(r===n)continue;let i=e[r];for(let e=0;e<t.length;e++)if(!0===i[t[e]])return!1}return!0}function pt(e,t){let n=e.map(e=>rt([e],1)),r=ut(n.length),i=n.map(e=>{let t={};return e.forEach(e=>{dt(e.partialPath).forEach(e=>{t[e]=!0})}),t}),a=n;for(let e=1;e<=t;e++){let n=a;a=ut(n.length);for(let o=0;o<n.length;o++){let s=n[o];for(let n=0;n<s.length;n++){let c=s[n].partialPath,l=s[n].suffixDef,u=dt(c);if(ft(i,u,o)||l.length===0||c.length===t){let e=r[o];if(!1===gt(e,c)){e.push(c);for(let e=0;e<u.length;e++){let t=u[e];i[o][t]=!0}}}else{let t=rt(l,e+1,c);a[o]=a[o].concat(t),t.forEach(e=>{dt(e.partialPath).forEach(e=>{i[o][e]=!0})})}}}}return r}function mt(e,t,n,r){let i=new lt(e,Y.ALTERNATION,r);return t.accept(i),pt(i.result,n)}function ht(e,t,n,r){let i=new lt(e,n);t.accept(i);let a=i.result,o=new ct(t,e,n).startWalking();return pt([new l({definition:a}),new l({definition:o})],r)}function gt(e,t){e:for(let n=0;n<e.length;n++){let r=e[n];if(r.length===t.length){for(let e=0;e<r.length;e++){let n=t[e],i=r[e];if((n===i||i.categoryMatchesMap[n.tokenTypeIdx]!==void 0)==0)continue e}return!0}}return!1}function _t(e){return e.every(e=>e.every(e=>e.every(e=>e.categoryMatches.length===0)))}function vt(e,t,n,r){let i=e.flatMap(e=>function(e,t){let n=new xt;e.accept(n);let r=n.allProductions,i=Object.groupBy(r,yt),a=Object.fromEntries(Object.entries(i).filter(([e,t])=>t.length>1));return Object.values(a).map(n=>{let r=n[0],i=t.buildDuplicateFoundError(e,n),a=x(r),o={message:i,type:Q.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:a,occurrence:r.idx},s=bt(r);return s&&(o.parameter=s),o})}(e,n)),a=function(e,t,n){let r=[],i=t.map(e=>e.name);return e.forEach(e=>{let t=e.name;if(i.includes(t)){let i=n.buildNamespaceConflictError(e);r.push({message:i,type:Q.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),r}(e,t,n),o=e.flatMap(e=>function(e,t){let n=new wt;return e.accept(n),n.alternations.flatMap(n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Q.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}(e,n)),s=e.flatMap(t=>function(e,t,n,r){let i=[];if(t.reduce((t,n)=>n.name===e.name?t+1:t,0)>1){let t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:Q.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,r,n));return i.concat(a,o,s)}function yt(e){return`${x(e)}_#_${e.idx}_#_${bt(e)}`}function bt(e){return e instanceof g?e.terminalType.name:e instanceof s?e.nonTerminalName:``}var xt=class extends y{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function St(e,t,n,r=[]){let i=[],a=Ct(t.definition);if(a.length===0)return[];{let t=e.name;a.includes(e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Q.LEFT_RECURSION,ruleName:t});let o=r.concat([e]),s=a.filter(e=>!o.includes(e)).flatMap(t=>{let i=[...r];return i.push(t),St(e,t,n,i)});return i.concat(s)}}function Ct(e){let t=[];if(e.length===0)return t;let n=e[0];if(n instanceof s)t.push(n.referencedRule);else if(n instanceof l||n instanceof u||n instanceof d||n instanceof f||n instanceof m||n instanceof p)t=t.concat(Ct(n.definition));else if(n instanceof h)t=n.definition.map(e=>Ct(e.definition)).flat();else if(!(n instanceof g))throw Error(`non exhaustive match`);let r=b(n),i=e.length>1;if(r&&i){let n=e.slice(1);return t.concat(Ct(n))}return t}var wt=class extends y{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function Tt(e,t){let n=new wt;return e.accept(n),n.alternations.flatMap(n=>n.definition.slice(0,-1).flatMap((r,i)=>function(e,t,n,r){let i=`EXIT_NONE_TERMINAL`,a=[i],o=`EXIT_ALTERNATIVE`,_=!1,v=t.length,y=v-r-1,b=[],x=[];for(x.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});x.length!==0;){let e=x.pop();if(e===o){_&&x.at(-1).idx<=y&&x.pop();continue}let r=e.def,S=e.idx,C=e.ruleStack,w=e.occurrenceStack;if(r.length===0)continue;let T=r[0];if(T===i){let e={idx:S,def:r.slice(1),ruleStack:C.slice(0,-1),occurrenceStack:w.slice(0,-1)};x.push(e)}else if(T instanceof g)if(S<v-1){let e=S+1;if(n(t[e],T.terminalType)){let t={idx:e,def:r.slice(1),ruleStack:C,occurrenceStack:w};x.push(t)}}else{if(S!==v-1)throw Error(`non exhaustive match`);b.push({nextTokenType:T.terminalType,nextTokenOccurrence:T.idx,ruleStack:C,occurrenceStack:w}),_=!0}else if(T instanceof s){let e=[...C];e.push(T.nonTerminalName);let t=[...w];t.push(T.idx);let n={idx:S,def:T.definition.concat(a,r.slice(1)),ruleStack:e,occurrenceStack:t};x.push(n)}else if(T instanceof u){let e={idx:S,def:r.slice(1),ruleStack:C,occurrenceStack:w};x.push(e),x.push(o);let t={idx:S,def:T.definition.concat(r.slice(1)),ruleStack:C,occurrenceStack:w};x.push(t)}else if(T instanceof d){let e=new p({definition:T.definition,idx:T.idx}),t={idx:S,def:T.definition.concat([e],r.slice(1)),ruleStack:C,occurrenceStack:w};x.push(t)}else if(T instanceof f){let e=new p({definition:[new g({terminalType:T.separator})].concat(T.definition),idx:T.idx}),t={idx:S,def:T.definition.concat([e],r.slice(1)),ruleStack:C,occurrenceStack:w};x.push(t)}else if(T instanceof m){let e={idx:S,def:r.slice(1),ruleStack:C,occurrenceStack:w};x.push(e),x.push(o);let t=new p({definition:[new g({terminalType:T.separator})].concat(T.definition),idx:T.idx}),n={idx:S,def:T.definition.concat([t],r.slice(1)),ruleStack:C,occurrenceStack:w};x.push(n)}else if(T instanceof p){let e={idx:S,def:r.slice(1),ruleStack:C,occurrenceStack:w};x.push(e),x.push(o);let t=new p({definition:T.definition,idx:T.idx}),n={idx:S,def:T.definition.concat([t],r.slice(1)),ruleStack:C,occurrenceStack:w};x.push(n)}else if(T instanceof h)for(let e=T.definition.length-1;e>=0;e--){let t={idx:S,def:T.definition[e].definition.concat(r.slice(1)),ruleStack:C,occurrenceStack:w};x.push(t),x.push(o)}else if(T instanceof l)x.push({idx:S,def:T.definition.concat(r.slice(1)),ruleStack:C,occurrenceStack:w});else{if(!(T instanceof c))throw Error(`non exhaustive match`);x.push(it(T,S,C,w))}}return b}([r],[],B,1).length===0?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:Q.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))}function Et(e,t,n){let r=new wt;e.accept(r);let i=r.alternations;return i=i.filter(e=>!0!==e.ignoreAmbiguities),i.flatMap(r=>{let i=mt(r.idx,e,r.maxLookahead||t,r),a=function(e,t,n,r){let i=[];return e.reduce((n,r,a)=>(!0===t.definition[a].ignoreAmbiguities||r.forEach(r=>{let o=[a];e.forEach((e,n)=>{a!==n&&gt(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&o.push(n)}),o.length>1&&!gt(i,r)&&(i.push(r),n.push({alts:o,path:r}))}),n),[]).map(e=>{let i=e.alts.map(e=>e+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Q.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}(i,r,e,n),o=function(e,t,n,r){let i=e.reduce((e,t,n)=>{let r=t.map(e=>({idx:n,path:e}));return e.concat(r)},[]);return i.flatMap(e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];let a=e.idx,o=e.path;return i.filter(e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<a&&(n=e.path,r=o,n.length<r.length&&n.every((e,t)=>{let n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]}));var n,r}).map(e=>{let i=[e.idx+1,a+1],o=t.idx===0?``:t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Q.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}})})}(i,r,e,n);return a.concat(o)})}var Dt=class extends y{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function Ot(e){let t=Object.assign({errMsgProvider:Je},e),n={};return e.rules.forEach(e=>{n[e.name]=e}),function(e,t){let n=new Ye(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}var kt=`MismatchedTokenException`,At=`NoViableAltException`,jt=`EarlyExitException`,Mt=`NotAllInputParsedException`,Nt=[kt,At,jt,Mt];function Pt(e){return Nt.includes(e.name)}Object.freeze(Nt);var Ft=class extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},It=class extends Ft{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=kt}},Lt=class extends Ft{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=At}},Rt=class extends Ft{constructor(e,t){super(e,t),this.name=Mt}},zt=class extends Ft{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=jt}},Bt={},Vt=class extends Error{constructor(e){super(e),this.name=`InRuleRecoveryException`}};function Ht(e,t,n,r,i,a,o){let s=this.getKeyForAutomaticLookahead(r,i),c=this.firstAfterRepMap[s];if(c===void 0){let e=this.getCurrRuleFullName();c=new a(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[s]=c}let l=c.token,u=c.occurrence,d=c.isEndOfRule;this.RULE_STACK_IDX===0&&d&&l===void 0&&(l=q,u=1),l!==void 0&&u!==void 0&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}var Ut=1024,Wt=1280,Gt=1536;function Kt(e,t,n){return n|t|e}var qt=class{constructor(e){this.maxLookahead=e?.maxLookahead??$.maxLookahead}validate(e){let t=this.validateNoLeftRecursion(e.rules);if(t.length===0){let n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return e.flatMap(e=>St(e,e,J))}validateEmptyOrAlternatives(e){return e.flatMap(e=>Tt(e,J))}validateAmbiguousAlternationAlternatives(e,t){return e.flatMap(e=>Et(e,t,J))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){let r=[];return e.forEach(e=>{let i=new Dt;e.accept(i),i.allProductions.forEach(i=>{let a=at(i),o=i.maxLookahead||t;if(ht(i.idx,e,a,o)[0].flat().length===0){let t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:Q.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),r}(e,t,J)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,a){let o=mt(e,t,n);return a(o,r,_t(o)?Oe:B,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,ot)}buildLookaheadForOptional(e){return function(e,t,n,r,i,a){let o=ht(e,t,i,n),s=_t(o)?Oe:B;return a(o[0],s,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,at(e.prodType),st)}},Jt=new class extends y{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function Yt(e,t){e.startOffset===-1?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==1&&(e.endOffset=t.endOffset)}function Xt(e,t){e.startOffset===-1?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==1&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}var Zt;function Qt(e,t){Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t})}function $t(e,t){let n=Object.keys(e),r=n.length;for(let i=0;i<r;i++){let r=e[n[i]],a=r.length;for(let e=0;e<a;e++){let n=r[e];n.tokenTypeIdx===void 0&&this[n.name](n.children,t)}}}function en(e,t){let n=function(){};return Qt(n,e+`BaseSemantics`),n.prototype={visit:function(e,t){if(Array.isArray(e)&&(e=e[0]),e!==void 0)return this[e.name](e.children,t)},validateVisitor:function(){let e=function(e,t){return function(e,t){return t.filter(t=>typeof e[t]==`function`==0).map(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Zt.MISSING_METHOD,methodName:t})).filter(Boolean)}(e,t)}(this,t);if(e.length!==0){let t=e.map(e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join(`
40
+
41
+ `).replace(/\n/g,`
42
+ `)}`)}}},n.prototype.constructor=n,n._RULE_NAMES=t,n}(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(Zt||={});var tn={description:`This Object indicates the Parser is during Recording Phase`};Object.freeze(tn);var nn=!0,rn=2**8-1,an=K({name:`RECORDING_PHASE_TOKEN`,pattern:W.NA});V([an]);var on=Ke(an,`This IToken indicates the Parser is in Recording Phase
43
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(on);var sn={name:`This CSTNode indicates the Parser is in Recording Phase
44
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};function X(e,t,n,r=!1){un(n);let i=this.recordingProdStack.at(-1),a=typeof t==`function`?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),Object.hasOwn(t,`MAX_LOOKAHEAD`)&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),tn}function cn(e,t){un(t);let n=this.recordingProdStack.at(-1),r=!1===Array.isArray(e),i=!1===r?e:e.DEF,a=new h({definition:[],idx:t,ignoreAmbiguities:r&&!0===e.IGNORE_AMBIGUITIES});return Object.hasOwn(e,`MAX_LOOKAHEAD`)&&(a.maxLookahead=e.MAX_LOOKAHEAD),a.hasPredicates=i.some(e=>typeof e.GATE==`function`),n.definition.push(a),i.forEach(e=>{let t=new l({definition:[]});a.definition.push(t),Object.hasOwn(e,`IGNORE_AMBIGUITIES`)?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Object.hasOwn(e,`GATE`)&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),tn}function ln(e){return e===0?``:`${e}`}function un(e){if(e<0||e>rn){let t=Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${rn+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var Z=Ke(q,``,-1,-1,-1,-1,-1,-1);Object.freeze(Z);var Q,$=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:qe,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),dn=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`,e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]=`CUSTOM_LOOKAHEAD_VALIDATION`})(Q||={});var fn,pn=class e{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT(`performSelfAnalysis`,()=>{let t;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT(`toFastProps`,()=>{a(this)}),this.TRACE_INIT(`Grammar Recording`,()=>{try{this.enableRecording(),this.definedRulesNames.forEach(e=>{let t=this[e].originalGrammarAction,n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT(`Grammar Resolving`,()=>{r=Ot({rules:Object.values(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT(`Grammar Validations`,()=>{if(r.length===0&&!1===this.skipValidations){let t=function(e){let t=e.errMsgProvider??J;return vt(e.rules,e.tokenTypes,t,e.grammarName)}({rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),errMsgProvider:J,grammarName:n}),r=(e={lookaheadStrategy:this.lookaheadStrategy,rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),grammarName:n}).lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}).map(e=>Object.assign({type:Q.CUSTOM_LOOKAHEAD_VALIDATION},e));this.definitionErrors=this.definitionErrors.concat(t,r)}var e}),this.definitionErrors.length===0&&(this.recoveryEnabled&&this.TRACE_INIT(`computeAllProdsFollows`,()=>{let e=function(e){let t={};return e.forEach(e=>{let n=new E(e).startWalking();Object.assign(t,n)}),t}(Object.values(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT(`ComputeLookaheadFunctions`,()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)==null||t.call(e,{rules:Object.values(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Object.values(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&this.definitionErrors.length!==0)throw t=this.definitionErrors.map(e=>e.message),Error(`Parser Definition Errors detected:\n ${t.join(`
45
+ -------------------------------
46
+ `)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initGastRecorder(t),n.initPerformanceTracer(t),Object.hasOwn(t,`ignoredIssues`))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.
47
+ Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
48
+ See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
49
+ For further details.`);this.skipValidations=Object.hasOwn(t,`skipValidations`)?t.skipValidations:$.skipValidations}};pn.DEFER_DEFINITION_ERRORS_HANDLING=!1,fn=pn,[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object.hasOwn(e,`recoveryEnabled`)?e.recoveryEnabled:$.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Ht)}getTokenToInsert(e){let t=Ke(e,``,-1,-1,-1,-1,-1,-1);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let i=this.findReSyncTokenType(),a=this.exportLexerState(),o=[],s=!1,c=this.LA_FAST(1),l=this.LA_FAST(1),u=()=>{let e=this.LA(0),t=new It(this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()}),c,this.LA(0));t.resyncedTokens=o.slice(0,-1),this.SAVE_ERROR(t)};for(;!s;){if(this.tokenMatcher(l,r))return void u();if(n.call(this))return u(),void e.apply(this,t);this.tokenMatcher(l,i)?s=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,o))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA_FAST(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getNextPossibleTokenTypes(e){let t=e.ruleStack[0],n=this.getGAstProductions()[t];return new Ze(n,e).startWalking()}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new Vt(`sad sad panda`)}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||t.length===0)return!1;let n=this.LA_FAST(1);return t.find(e=>this.tokenMatcher(n,e))!==void 0}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return this.getFollowSetFromFollowKey(t).includes(e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA_FAST(1),n=2;for(;;){let r=e.find(e=>B(t,e));if(r!==void 0)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK_IDX===0)return Bt;let e=this.currRuleShortName,t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK,n=this.RULE_STACK_IDX+1,r=Array(n);for(let i=0;i<n;i++)r[i]=i===0?Bt:{ruleName:this.shortRuleNameToFullName(e[i]),idxInCallingRule:t[i],inRule:this.shortRuleNameToFullName(e[i-1])};return r}flattenFollowSet(){return this.buildFullFollowKeyStack().map(e=>this.getFollowSetFromFollowKey(e)).flat()}getFollowSetFromFollowKey(e){if(e===Bt)return[q];let t=e.ruleName+e.idxInCallingRule+T+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,q)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA_FAST(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return t.slice(0,-1)}attemptInRepetitionRecovery(e,t,n,r,i,a,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){let e=this.RULE_STACK_IDX+1,t=Array(e);for(let n=0;n<e;n++)t[n]=this.shortRuleNameToFullName(this.RULE_STACK[n]);return t}},class{initLooksAhead(e){this.dynamicTokensEnabled=Object.hasOwn(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:$.dynamicTokensEnabled,this.maxLookahead=Object.hasOwn(e,`maxLookahead`)?e.maxLookahead:$.maxLookahead,this.lookaheadStrategy=Object.hasOwn(e,`lookaheadStrategy`)?e.lookaheadStrategy:new qt({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){e.forEach(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{let{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:o}=function(e){Jt.reset(),e.accept(Jt);let t=Jt.dslMethods;return Jt.reset(),t}(e);t.forEach(t=>{let n=t.idx===0?``:t.idx;this.TRACE_INIT(`${x(t)}${n}`,()=>{let n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=Kt(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)})}),n.forEach(t=>{this.computeLookaheadFunc(e,t.idx,768,`Repetition`,t.maxLookahead,x(t))}),r.forEach(t=>{this.computeLookaheadFunc(e,t.idx,512,`Option`,t.maxLookahead,x(t))}),i.forEach(t=>{this.computeLookaheadFunc(e,t.idx,Ut,`RepetitionMandatory`,t.maxLookahead,x(t))}),a.forEach(t=>{this.computeLookaheadFunc(e,t.idx,Gt,`RepetitionMandatoryWithSeparator`,t.maxLookahead,x(t))}),o.forEach(t=>{this.computeLookaheadFunc(e,t.idx,Wt,`RepetitionWithSeparator`,t.maxLookahead,x(t))})})})}computeLookaheadFunc(e,t,n,r,i,a){this.TRACE_INIT(`${a}${t===0?``:t}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=Kt(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,a)})}getKeyForAutomaticLookahead(e,t){return Kt(this.currRuleShortName,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Object.hasOwn(e,`nodeLocationTracking`)?e.nodeLocationTracking:$.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Xt,this.setNodeLocationFromNode=Xt,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Yt,this.setNodeLocationFromNode=Yt,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=()=>{},this.setInitialNodeLocation=()=>{}}else this.cstInvocationStateUpdate=()=>{},this.cstFinallyStateUpdate=()=>{},this.cstPostTerminal=()=>{},this.cstPostNonTerminal=()=>{},this.cstPostRule=()=>{}}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:-1,endOffset:-1}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA_FAST(1).startOffset,endOffset:-1}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:-1,startLine:-1,startColumn:-1,endOffset:-1,endLine:-1,endColumn:-1}}setInitialNodeLocationFullRegular(e){let t=this.LA_FAST(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:-1,endLine:-1,endColumn:-1}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset!==-1&&n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=-1,n.startLine=-1,n.startColumn=-1)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset!==-1&&n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=-1}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];var r,i=t,a=e;(r=n).children[a]===void 0?r.children[a]=[i]:r.children[a].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];(function(e,t,n){e.children[t]===void 0?e.children[t]=[n]:e.children[t].push(n)})(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}get currCSTNode(){return this.CST_STACK[this.CST_STACK.length-1]}getBaseCstVisitorConstructor(){if(this.baseCstVisitorConstructor===void 0){let e=en(this.className,Object.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(this.baseCstVisitorWithDefaultsConstructor===void 0){let e=function(e,t,n){let r=function(){};Qt(r,e+`BaseSemanticsWithDefaults`);let i=Object.create(n.prototype);return t.forEach(e=>{i[e]=$t}),(r.prototype=i).constructor=r,r}(this.className,Object.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getPreviousExplicitRuleShortName(){return this.RULE_STACK[this.RULE_STACK_IDX-1]}getLastExplicitRuleOccurrenceIndex(){return this.RULE_OCCURRENCE_STACK[this.RULE_OCCURRENCE_STACK_IDX]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error(`Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.`);this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVectorLength-2?(this.consumeToken(),this.LA_FAST(1)):Z}LA_FAST(e){let t=this.currIdx+e;return this.tokVector[t]}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Z:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVectorLength-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Oe,this.subruleIdx=0,this.currRuleShortName=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK=[],this.RULE_OCCURRENCE_STACK_IDX=-1,this.gastProductionsCache={},Object.hasOwn(t,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
50
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
51
+ For Further details.`);if(Array.isArray(e)){if(e.length===0)throw Error(`A Token Vocabulary cannot be empty.
52
+ Note that the first argument for the parser constructor
53
+ is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==`number`)throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
54
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
55
+ For Further details.`)}if(Array.isArray(e))this.tokensMap=e.reduce((e,t)=>(e[t.name]=t,e),{});else if(Object.hasOwn(e,`modes`)&&Object.values(e.modes).flat().every(Pe)){let t=Object.values(e.modes).flat(),n=[...new Set(t)];this.tokensMap=n.reduce((e,t)=>(e[t.name]=t,e),{})}else{if(typeof e!=`object`||!e)throw Error(`<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap=Object.assign({},e)}this.tokensMap.EOF=q;let n=(Object.hasOwn(e,`modes`)?Object.values(e.modes).flat():Object.values(e)).every(e=>e.categoryMatches?.length==0);this.tokenMatcher=n?Oe:B,V(Object.values(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let r=Object.hasOwn(n,`resyncEnabled`)?n.resyncEnabled:dn.resyncEnabled,i=Object.hasOwn(n,`recoveryValueFunc`)?n.recoveryValueFunc:dn.recoveryValueFunc,a=this.ruleShortNameIdx<<12,o;return this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a,o=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,n);let r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(function(...t){this.onBeforeParse(e);try{return o.apply(this,t)}finally{this.onAfterParse(e)}},{ruleName:e,originalGrammarAction:t,coreRule:o})}invokeRuleCatch(e,t,n){let r=this.RULE_STACK_IDX===0,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Pt(e)){let t=e;if(i){let r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){let n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if(typeof e!=`function`){r=e.DEF;let t=e.GATE;if(t!==void 0){let e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(Ut,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if(typeof t!=`function`){r=t.DEF;let e=t.GATE;if(e!==void 0){let t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Y.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,Ut,e,tt)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(Gt,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,Y.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);let t=()=>this.tokenMatcher(this.LA_FAST(1),i);for(;!0===this.tokenMatcher(this.LA_FAST(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,nt],t,Gt,e,nt)}}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if(typeof t!=`function`){r=t.DEF;let e=t.GATE;if(e!==void 0){let t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,$e,a)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(Wt,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);let t=()=>this.tokenMatcher(this.LA_FAST(1),i);for(;!0===this.tokenMatcher(this.LA_FAST(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,et],t,Wt,e,et)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Gt,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(256,t),r=Array.isArray(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(i!==void 0)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK_IDX--,this.RULE_OCCURRENCE_STACK_IDX--,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX]),this.cstFinallyStateUpdate()}subruleInternal(e,t,n){let r;try{let i=n===void 0?void 0:n.ARGS;return this.subruleIdx=t,r=e.coreRule.apply(this,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw Pt(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let t=this.LA_FAST(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,i=this.LA(0);throw r=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new It(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||n.name!==`MismatchedTokenException`||this.isBackTracking())throw n;{let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===`InRuleRecoveryException`?n:e}}}saveRecogState(){let e=this.errors,t=this.RULE_STACK.slice(0,this.RULE_STACK_IDX+1);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState);let t=e.RULE_STACK;for(let e=0;e<t.length;e++)this.RULE_STACK[e]=t[e];this.RULE_STACK_IDX=t.length-1,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX])}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK[++this.RULE_OCCURRENCE_STACK_IDX]=n,this.RULE_STACK[++this.RULE_STACK_IDX]=e,this.currRuleShortName=e,this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.currRuleShortName;return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),q)}reset(){this.resetLexerState(),this.subruleIdx=0,this.currRuleShortName=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK_IDX=-1,this.CST_STACK=[]}onBeforeParse(e){for(let e=0;e<this.maxLookahead+1;e++)this.tokVector.push(Z)}onAfterParse(e){if(!1===this.isAtEndOfInput()){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Rt(t,e))}for(;this.tokVector.at(-1)===Z;)this.tokVector.pop()}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=dn){if(this.definedRulesNames.includes(e)){let t={message:J.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Q.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=dn){let r=function(e,t,n){let r=[],i;return t.includes(e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:Q.INVALID_RULE_OVERRIDE,ruleName:e})),r}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);let i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){let n=e.coreRule??e;return function(){this.isBackTrackingStack.push(1);let e=this.saveRecogState();try{return n.apply(this,t),!0}catch(e){if(Pt(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Object.values(this.gastProductionsCache).map(_)}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Object.hasOwn(e,`errorMessageProvider`)?e.errorMessageProvider:$.errorMessageProvider}SAVE_ERROR(e){if(Pt(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)}get errors(){return[...this._errors]}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),i=ht(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],a=[];for(let e=1;e<=this.maxLookahead;e++)a.push(this.LA(e));let o=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:a,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new zt(o,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=mt(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));let a=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:a,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Lt(o,this.LA(1),a))}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,()=>{for(let e=0;e<10;e++){let t=e>0?e:``;this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,()=>{let e=this;for(let t=0;t<10;t++){let n=t>0?t:``;delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Z}topLevelRuleRecord(e,t){try{let n=new c({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message+=`
56
+ This error was thrown during the "grammar recording phase" For more info see:
57
+ https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}}optionInternalRecord(e,t){return X.call(this,u,e,t)}atLeastOneInternalRecord(e,t){X.call(this,d,t,e)}atLeastOneSepFirstInternalRecord(e,t){X.call(this,f,t,e,nn)}manyInternalRecord(e,t){X.call(this,p,t,e)}manySepFirstInternalRecord(e,t){X.call(this,m,t,e,nn)}orInternalRecord(e,t){return cn.call(this,e,t)}subruleInternalRecord(e,t,n){if(un(t),!e||!Object.hasOwn(e,`ruleName`)){let n=Error(`<SUBRULE${ln(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=this.recordingProdStack.at(-1),i=e.ruleName,a=new s({idx:t,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?sn:tn}consumeInternalRecord(e,t,n){if(un(t),!Me(e)){let n=Error(`<CONSUME${ln(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=this.recordingProdStack.at(-1),i=new g({idx:t,terminalType:e,label:n?.LABEL});return r.definition.push(i),on}},class{initPerformanceTracer(e){if(Object.hasOwn(e,`traceInitPerf`)){let t=e.traceInitPerf,n=typeof t==`number`;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=$.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--\x3e <${e}>`);let{time:r,value:a}=i(t),o=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,a}return t()}}].forEach(e=>{let t=e.prototype;Object.getOwnPropertyNames(t).forEach(n=>{if(n===`constructor`)return;let r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(fn.prototype,n,r):fn.prototype[n]=e.prototype[n]})});var mn=class extends pn{constructor(e,t=$){let n=Object.assign({},t);n.outputCst=!1,super(e,n)}},hn=class n{static shared(t){let r=t?.locale??e.tt,i=t?.maxColumn??yn,a=t?.maxRow??bn,o=vn.get(r);o||(o=new Map,vn.set(r,o));let s=`${i}:${a}`,c=o.get(s);return c||(c=new n({locale:r,maxColumn:i,maxRow:a}),o.set(s,c)),c}constructor(t){let n=t?.maxColumn??yn,r=t?.maxRow??bn,i=t?.locale??e.tt;this._locale=i,this._maxColumn=n,this._maxRow=r;let{separatorFunction:a,separatorColumn:o,separatorRow:s,separatorDecimal:c}=i.separators;if(o===s)throw Error(`FormulaLexer: separatorColumn and separatorRow must differ (both '${o}')`);let l=K({name:`WhiteSpace`,pattern:/\s+/,group:W.SKIPPED}),u=K({name:`StringToken`,pattern:/"(""|[^"])*"/}),d=K({name:`FunctionToken`,pattern:/[a-zA-Z_\u007F-\uFFFF]+[a-zA-Z0-9_.\u007F-\uFFFF]*(?=\()/}),f=K({name:`TableReference`,pattern:{exec:wn},line_breaks:!1,start_chars_hint:_n}),p=K({name:`BracketedString`,pattern:{exec:En},line_breaks:!1,start_chars_hint:[91],longer_alt:[f,u]}),m=e=>(e??[]).map(e=>e?.trim()).filter(Boolean).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).map(e=>e+`|`).join(``),h=K({name:`LiteralError`,pattern:RegExp(m(i.errorLiterals)+`#PARSE!|#NULL!|#DIV\\/0!|#VALUE!|#NUM!|#FIELD!|#N\\/A|#GETTING_DATA|#SPILL!|#CONNECT!|#BLOCKED!|#UNKNOWN!|#CALC!|#BUSY!|#PYTHON!|#TIMEOUT!`)}),g=K({name:`RefError`,pattern:RegExp(m(i.errorRefs)+`#REF!|#NAME\\?`)}),_=K({name:`SingleQuotedString`,pattern:/'(''|[^'])*'/}),v=K({name:`SheetQuoted`,pattern:/'(?:''|[^'])*?'!/}),y=K({name:`Sheet`,pattern:/[A-Za-z_.\d\u007F-\uFFFF]*!/}),b=/[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y,x=K({name:`NamedToken`,pattern:{exec:(e,t)=>{b.lastIndex=t;let n=b.exec(e);if(!n)return null;let r=n[0],i=r.indexOf(`.:`);return i===-1?r.endsWith(`:`)&&(r=r.slice(0,-1)):r=r.substring(0,i),[r]}},line_breaks:!1,start_chars_hint:_n}),S=K({name:`Cell`,pattern:{exec:Cn(n,r)},line_breaks:!1,start_chars_hint:[36,...gn],longer_alt:x}),C=K({name:`Column`,pattern:{exec:Sn(n)},line_breaks:!1,start_chars_hint:[36,...gn],longer_alt:x}),w=K({name:`AbsRow`,pattern:/[$][0-9]+/}),T=c===`.`?`\\.`:c,E=K({name:`NumberToken`,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]+`)}),D=K({name:`ScientificDigit`,pattern:/[0-9]+\*\*[+-]?[0-9]+/}),O=K({name:`DigitToken`,pattern:/[0-9]+/}),k=[`TRUE`,`FALSE`];for(let e of[i.booleanTrue,i.booleanFalse]){let t=e?.trim();t&&!k.some(e=>e.toLowerCase()===t.toLowerCase())&&k.push(t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))}let A=K({name:`BooleanToken`,pattern:new RegExp(k.join(`|`),`i`)}),j=K({name:`ArgSeparator`,pattern:Tn(a)}),M=K({name:`ColSeparator`,pattern:Tn(o)}),N=K({name:`RowSeparator`,pattern:Tn(s)}),P=K({name:`RangeOp`,pattern:/:/}),ee=K({name:`RangeTrimFullOp`,pattern:/\.:\./}),te=K({name:`RangeTrimLeadingOp`,pattern:/\.:/}),F=K({name:`RangeTrimTrailingOp`,pattern:/:\./}),ne=K({name:`OpenParen`,pattern:/\(/}),I=K({name:`CloseParen`,pattern:/\)/}),L=K({name:`OpenCurlyParen`,pattern:/{/}),re=K({name:`CloseCurlyParen`,pattern:/}/}),ie=K({name:`QuoteS`,pattern:/'/}),ae=K({name:`MulOp`,pattern:/\*(?!\*)/}),oe=K({name:`PlusOp`,pattern:/\+/}),se=K({name:`DivOp`,pattern:/\//}),ce=K({name:`MinOp`,pattern:/-/}),le=K({name:`ImplicitIntersectOp`,pattern:/@/}),ue=K({name:`ConcatOp`,pattern:/&/}),de=K({name:`ExOp`,pattern:/\^/}),fe=K({name:`PercentOp`,pattern:/%/}),pe=K({name:`ArrayAnchorOp`,pattern:/#/,longer_alt:[h,g]}),R=K({name:`GtOp`,pattern:/>/}),me=K({name:`EqOp`,pattern:/=/}),he=K({name:`LtOp`,pattern:/</}),ge=[l,u,v,_,y,d,f,p,h,g,j,...o===a?[]:[M],N,ee,te,F,P,S,A,C,w,E,D,O,pe,le,x,ne,I,L,re,ie,ae,oe,se,ce,ue,de,fe,K({name:`NeqOp`,pattern:/<>/}),K({name:`GteOp`,pattern:/>=/}),K({name:`LteOp`,pattern:/<=/}),R,me,he];this._lexer=new W(ge,{ensureOptimizations:!0});let _e={};ge.forEach(e=>{_e[e.name]=e}),o===a&&(_e.ColSeparator=j),this._vocabulary=_e}tokenize(e,n=!0){let r=this._lexer.tokenize(e);if(n&&r.errors.length>0){let n=r.errors[0],i=n.line,a=n.column,o=e.substr(n.offset,n.length||1),s=o?`Unexpected character '${o}'`:n.message;throw new t.FormulaError.Parse(s,{line:i,column:a,offset:n.offset,length:n.length})}return r}getVocabulary(){return this._vocabulary}getLocale(){return this._locale}getMaxColumn(){return this._maxColumn}getMaxRow(){return this._maxRow}getSeparators(){return this._locale.separators}},gn=(()=>{let e=[];for(let t=65;t<=90;t++)e.push(t);for(let t=97;t<=122;t++)e.push(t);for(let t=48;t<=57;t++)e.push(t);return e})().filter(e=>e<48||e>57),_n=(()=>{let e=[...gn,95,92];for(let t=127;t<=65535;t++)e.push(t);return e})(),vn=new WeakMap,yn=16384,bn=1048576;function xn(e,t,n){let r=0;for(let i=t;i<n;i++){let t=e.charCodeAt(i);r=26*r+(t>=97?t-96:t-64)}return r}function Sn(e){return(t,n)=>{let r=n;t.charCodeAt(r)===36&&r++;let i=r;for(;r<t.length&&r-i<3;){let e=t.charCodeAt(r);if(!(e>=65&&e<=90||e>=97&&e<=122))break;r++}if(r-i===0||xn(t,i,r)>e)return null;if(r<t.length){let e=t.charCodeAt(r);if(e>=48&&e<=57)return null}return[t.substring(n,r)]}}function Cn(e,t){return(n,r)=>{let i=r;n.charCodeAt(i)===36&&i++;let a=i;for(;i<n.length&&i-a<3;){let e=n.charCodeAt(i);if(!(e>=65&&e<=90||e>=97&&e<=122))break;i++}if(i-a===0||xn(n,a,i)>e)return null;i<n.length&&n.charCodeAt(i)===36&&i++;let o=i;if(i>=n.length)return null;let s=n.charCodeAt(i);if(s<49||s>57)return null;for(i++;i<n.length;){let e=n.charCodeAt(i);if(!(e>=48&&e<=57))break;i++}return parseInt(n.substring(o,i),10)>t?null:[n.substring(r,i)]}}function wn(e,t){let n=e.charCodeAt(t);if(!(n>=65&&n<=90||n>=97&&n<=122||n===95||n>=127&&n<=65535))return null;let r=t+1;for(;r<e.length;){let t=e.charCodeAt(r);if(!(t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===95||t===46||t>=127&&t<=65535))break;r++}if(r>=e.length||e.charCodeAt(r)!==91)return null;let i=0;for(;r<e.length;){let n=e.charCodeAt(r);if(n===91)i++;else if(n===93&&(i--,i===0))return[e.substring(t,r+1)];r++}return null}function Tn(e){return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))}function En(e,t){if(e.charCodeAt(t)!==91)return null;let n=0,r=t;for(;r<e.length;){let i=e.charCodeAt(r);if(i===91)n++;else if(i===93&&(n--,n===0))return[e.substring(t,r+1)];r++}return null}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return mn}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return hn}});
@@ -0,0 +1,10 @@
1
+ var e=require("./B7_pDFYCVzt-3hUs.cjs").t((e,t)=>{var n=e,r=function e(){var t,n=typeof self<`u`?self:typeof window<`u`?window:n===void 0?{}:n,r=!n.document&&!!n.postMessage,i=n.IS_PAPA_WORKER||!1,a={},o=0,s={};function c(e){return e.charCodeAt(0)===65279?e.slice(1):e}function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine=``,this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new m(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<r){let t=this._config.newline;t||=(a=this._config.quoteChar||`"`,this._handle.guessLineEndings(e,a)),e=[...e.split(t).slice(r)].join(t)}this.isFirstChunk&&S(this._config.beforeFirstChunk)&&(a=this._config.beforeFirstChunk(e))!==void 0&&(e=a),this.isFirstChunk=!1,this._halted=!1,r=this._partialLine+e;var a=(this._partialLine=``,this._handle.parse(r,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=a.meta.cursor,this._finished||(this._partialLine=r.substring(e-this._baseIndex),this._baseIndex=e),a&&a.data&&(this._rowCount+=a.data.length),r=this._finished||this._config.preview&&this._rowCount>=this._config.preview,i)n.postMessage({results:a,workerId:s.WORKER_ID,finished:r});else if(S(this._config.chunk)&&!t){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=a=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!r||!S(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){S(this._config.error)?this._config.error(e):i&&this._config.error&&n.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e||={}).chunkSize||(e.chunkSize=s.RemoteChunkSize),l.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)),t.open(this._config.downloadRequestBody?`POST`:`GET`,this._input,!r),this._config.downloadRequestHeaders){var e,n=this._config.downloadRequestHeaders;for(e in n)t.setRequestHeader(e,n[e])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,t.setRequestHeader(`Range`,`bytes=`+this._start+`-`+i));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(e=>(e=e.getResponseHeader(`Content-Range`))===null?-1:parseInt(e.substring(e.lastIndexOf(`/`)+1)))(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function d(e){(e||={}).chunkSize||(e.chunkSize=s.LocalChunkSize),l.call(this,e);var t,n,r=typeof FileReader<`u`;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,i=(this._config.chunkSize&&(i=Math.min(this._start+this._config.chunkSize,this._input.size),e=n.call(e,this._start,i)),t.readAsText(e,this._config.encoding));r||this._chunkLoaded({target:{result:i}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;l.call(this,e||={}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,n;if(!this._finished)return e=this._config.chunkSize,t=e?(n=t.substring(0,e),t.substring(e)):(n=t,``),this._finished=!t,this.parseChunk(n)}}function p(e){l.call(this,e||={});var t=[],n=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on(`data`,this._streamData),this._input.on(`end`,this._streamEnd),this._input.on(`error`,this._streamError)},this._checkIsFinished=function(){r&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=x(function(e){try{t.push(typeof e==`string`?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=x(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=x(function(){this._streamCleanUp(),r=!0,this._streamData(``)},this),this._streamCleanUp=x(function(){this._input.removeListener(`data`,this._streamData),this._input.removeListener(`end`,this._streamEnd),this._input.removeListener(`error`,this._streamError)},this)}function m(e){var t,n,r,i,a=2**53,o=-a,l=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,d=this,f=0,p=0,m=!1,_=!1,v=[],y={data:[],errors:[],meta:{}};function x(t){return e.skipEmptyLines===`greedy`?t.join(``).trim()===``:t.length===1&&t[0].length===0}function C(){if(y&&r&&(T(`Delimiter`,`UndetectableDelimiter`,`Unable to auto-detect delimiting character; defaulted to '`+s.DefaultDelimiter+`'`),r=!1),e.skipEmptyLines&&(y.data=y.data.filter(function(e){return!x(e)})),w()){if(y)if(Array.isArray(y.data[0])){for(var t=0;w()&&t<y.data.length;t++)y.data[t].forEach(n);y.data.splice(0,1)}else y.data.forEach(n);function n(t,n){t=c(t),S(e.transformHeader)&&(t=e.transformHeader(t,n)),v.push(t)}}function i(t,n){for(var r=e.header?{}:[],i=0;i<t.length;i++){var s=i,c=t[i];c=((t,n)=>(t=>(e.dynamicTypingFunction&&e.dynamicTyping[t]===void 0&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)))(t)?n===`true`||n===`TRUE`||n!==`false`&&n!==`FALSE`&&((e=>{if(l.test(e)&&(e=parseFloat(e),o<e&&e<a))return 1})(n)?parseFloat(n):u.test(n)?new Date(n):n===``?null:n):n)(s=e.header?i>=v.length?`__parsed_extra`:v[i]:s,c=e.transform?e.transform(c,s):c),s===`__parsed_extra`?(r[s]=r[s]||[],r[s].push(c)):r[s]=c}return e.header&&(i>v.length?T(`FieldMismatch`,`TooManyFields`,`Too many fields: expected `+v.length+` fields but parsed `+i,p+n):i<v.length&&T(`FieldMismatch`,`TooFewFields`,`Too few fields: expected `+v.length+` fields but parsed `+i,p+n)),r}var d;y&&(e.header||e.dynamicTyping||e.transform)&&(d=1,!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(i),d=y.data.length):y.data=i(y.data,0),e.header&&y.meta&&(y.meta.fields=v),p+=d)}function w(){return e.header&&v.length===0}function T(e,t,n,r){e={type:e,code:t,message:n},r!==void 0&&(e.row=r),y.errors.push(e)}S(e.step)&&(i=e.step,e.step=function(t){y=t,w()?C():(C(),y.data.length!==0&&(f+=t.data.length,e.preview&&f>e.preview?n.abort():(y.data=y.data[0],i(y,d))))}),this.parse=function(i,a,o){var c=e.quoteChar||`"`;return e.newline||=this.guessLineEndings(i,c),r=!1,e.delimiter?S(e.delimiter)&&(e.delimiter=e.delimiter(i),y.meta.delimiter=e.delimiter):((c=((t,n,r,i,a)=>{var o,c,l,u;a||=[`,`,` `,`|`,`;`,s.RECORD_SEP,s.UNIT_SEP];for(var d=0;d<a.length;d++){for(var f,p=a[d],m=0,h=0,_=0,v=(l=void 0,new g({comments:i,delimiter:p,newline:n,preview:10}).parse(t)),y=0;y<v.data.length;y++)r&&x(v.data[y])?_++:(h+=f=v.data[y].length,l===void 0?l=f:0<f&&(m+=Math.abs(f-l),l=f));0<v.data.length&&(h/=v.data.length-_),(c===void 0||m<=c)&&(u===void 0||u<h)&&1.99<h&&(c=m,o=p,u=h)}return{successful:!!(e.delimiter=o),bestDelimiter:o}})(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=c.bestDelimiter:(r=!0,e.delimiter=s.DefaultDelimiter),y.meta.delimiter=e.delimiter),c=b(e),e.preview&&e.header&&c.preview++,t=i,n=new g(c),y=n.parse(t,a,o),C(),m?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return m},this.pause=function(){m=!0,n.abort(),t=S(e.chunk)?``:t.substring(n.getCharIndex())},this.resume=function(){d.streamer._halted?(m=!1,d.streamer.parseChunk(t,!0)):setTimeout(d.resume,3)},this.aborted=function(){return _},this.abort=function(){_=!0,n.abort(),y.meta.aborted=!0,S(e.complete)&&e.complete(y),t=``},this.guessLineEndings=function(e,t){e=e.substring(0,1048576),t=RegExp(h(t)+`([^]*?)`+h(t),`gm`);var n=(e=e.replace(t,``)).split(`\r`);if(e=1<(t=e.split(`
2
+ `)).length&&t[0].length<n[0].length,n.length===1||e)return`
3
+ `;for(var r=0,i=0;i<n.length;i++)n[i][0]===`
4
+ `&&r++;return r>=n.length/2?`\r
5
+ `:`\r`}}function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function g(e){var t=(e||={}).delimiter,n=e.newline,r=e.comments,i=e.step,a=e.preview,o=e.fastMode,l=null,u=!1,d=e.quoteChar==null?`"`:e.quoteChar,f=d;if(e.escapeChar!==void 0&&(f=e.escapeChar),(typeof t!=`string`||-1<s.BAD_DELIMITERS.indexOf(t))&&(t=`,`),r===t)throw Error(`Comment character same as delimiter`);!0===r?r=`#`:(typeof r!=`string`||-1<s.BAD_DELIMITERS.indexOf(r))&&(r=!1),n!==`
6
+ `&&n!==`\r`&&n!==`\r
7
+ `&&(n=`
8
+ `);var p=0,m=!1;this.parse=function(s,g,_){if(typeof s!=`string`)throw Error(`Input must be a string`);var v=s.length,y=t.length,b=n.length,x=r.length,C=S(i),w=[],T=[],E=[],D=p=0;if(!s)return z();if(o||!1!==o&&s.indexOf(d)===-1){for(var O=s.split(n),k=0;k<O.length;k++){if(E=O[k],p+=E.length,k!==O.length-1)p+=n.length;else if(_)return z();if(!r||E.substring(0,x)!==r){if(C){if(w=[],F(E.split(t)),B(),m)return z()}else F(E.split(t));if(a&&a<=k)return w=w.slice(0,a),z(!0)}}return z()}for(var A=s.indexOf(t,p),j=s.indexOf(n,p),M=new RegExp(h(f)+h(d),`g`),N=s.indexOf(d,p);;)if(s[p]===d)for(N=p,p++;;){if((N=s.indexOf(d,N+1))===-1)return _||T.push({type:`Quotes`,code:`MissingQuotes`,message:`Quoted field unterminated`,row:w.length,index:p}),L();if(N===v-1)return L(s.substring(p,N).replace(M,d));if(d===f&&s[N+1]===f)N++;else if(d===f||N===0||s[N-1]!==f){A!==-1&&A<N+1&&(A=s.indexOf(t,N+1));var P=I((j=j!==-1&&j<N+1?s.indexOf(n,N+1):j)===-1?A:Math.min(A,j));if(s.substr(N+1+P,y)===t){E.push(s.substring(p,N).replace(M,d)),s[p=N+1+P+y]!==d&&(N=s.indexOf(d,p)),A=s.indexOf(t,p),j=s.indexOf(n,p);break}if(P=I(j),s.substring(N+1+P,N+1+P+b)===n){if(E.push(s.substring(p,N).replace(M,d)),R(N+1+P+b),A=s.indexOf(t,p),N=s.indexOf(d,p),C&&(B(),m))return z();if(a&&w.length>=a)return z(!0);break}T.push({type:`Quotes`,code:`InvalidQuotes`,message:`Trailing quote on quoted field is malformed`,row:w.length,index:p}),N++}}else if(r&&E.length===0&&s.substring(p,p+x)===r){if(j===-1)return z();p=j+b,j=s.indexOf(n,p),A=s.indexOf(t,p)}else if(A!==-1&&(A<j||j===-1))E.push(s.substring(p,A)),p=A+y,A=s.indexOf(t,p);else{if(j===-1)break;if(E.push(s.substring(p,j)),R(j+b),C&&(B(),m))return z();if(a&&w.length>=a)return z(!0)}return L();function F(e){w.push(e),D=p}function I(e){return e!==-1&&(e=s.substring(N+1,e))&&e.trim()===``?e.length:0}function L(e){return _||(e===void 0&&(e=s.substring(p)),E.push(e),p=v,F(E),C&&B()),z()}function R(e){p=e,F(E),E=[],j=s.indexOf(n,p)}function z(r){if(e.header&&!g&&w.length&&!u){var i=w[0],a=Object.create(null),o=new Set(i);let t=!1;for(let n=0;n<i.length;n++){let r=c(i[n]);if(a[r=S(e.transformHeader)?e.transformHeader(r,n):r]){let e,s=a[r];for(;e=r+`_`+s,s++,o.has(e););o.add(e),i[n]=e,a[r]++,t=!0,(l=l===null?{}:l)[e]=r}else a[r]=1,i[n]=r;o.add(r)}t&&console.warn(`Duplicate headers found and renamed.`),u=!0}return{data:w,errors:T,meta:{delimiter:t,linebreak:n,aborted:m,truncated:!!r,cursor:D+(g||0),renamedHeaders:l}}}function B(){i(z()),w=[],T=[]}},this.abort=function(){m=!0},this.getCharIndex=function(){return p}}function _(e){var t=e.data,n=a[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(S(n.userStep)){for(var o=0;o<t.results.data.length&&(n.userStep({data:t.results.data[o],errors:t.results.errors,meta:t.results.meta},i),!r);o++);delete t.results}else S(n.userChunk)&&(n.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!r&&v(t.workerId,t.results)}function v(e,t){var n=a[e];S(n.userComplete)&&n.userComplete(t),n.terminate(),delete a[e]}function y(){throw Error(`Not implemented.`)}function b(e){if(typeof e!=`object`||!e)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=b(e[t]);return n}function x(e,t){return function(){e.apply(t,arguments)}}function S(e){return typeof e==`function`}return s.parse=function(t,r){var i=(r||={}).dynamicTyping||!1;if(S(i)&&(r.dynamicTypingFunction=i,i={}),r.dynamicTyping=i,r.transform=!!S(r.transform)&&r.transform,!r.worker||!s.WORKERS_SUPPORTED)return i=null,s.NODE_STREAM_INPUT,typeof t==`string`?(t=c(t),i=new(r.download?u:f)(r)):!0===t.readable&&S(t.read)&&S(t.on)?i=new p(r):(n.File&&t instanceof File||t instanceof Object)&&(i=new d(r)),i.stream(t);(i=(()=>{var t;return!!s.WORKERS_SUPPORTED&&(t=(()=>{var t=n.URL||n.webkitURL||null,r=e.toString();return s.BLOB_URL||=t.createObjectURL(new Blob([`var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; `,`(`,r,`)();`],{type:`text/javascript`}))})(),(t=new n.Worker(t)).onmessage=_,t.id=o++,a[t.id]=t)})()).userStep=r.step,i.userChunk=r.chunk,i.userComplete=r.complete,i.userError=r.error,r.step=S(r.step),r.chunk=S(r.chunk),r.complete=S(r.complete),r.error=S(r.error),delete r.worker,i.postMessage({input:t,config:r,workerId:i.id})},s.unparse=function(e,t){var n=!1,r=!0,i=`,`,a=`\r
9
+ `,o=`"`,c=o+o,l=!1,u=null,d=!1,f=((()=>{if(typeof t==`object`){if(typeof t.delimiter!=`string`||s.BAD_DELIMITERS.filter(function(e){return t.delimiter.indexOf(e)!==-1}).length||(i=t.delimiter),typeof t.quotes!=`boolean`&&typeof t.quotes!=`function`&&!Array.isArray(t.quotes)||(n=t.quotes),typeof t.skipEmptyLines!=`boolean`&&typeof t.skipEmptyLines!=`string`||(l=t.skipEmptyLines),typeof t.newline==`string`&&(a=t.newline),typeof t.quoteChar==`string`&&(o=t.quoteChar,c=o+o),typeof t.header==`boolean`&&(r=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw Error(`Option columns is empty`);u=t.columns}t.escapeChar!==void 0&&(c=t.escapeChar+o),t.escapeFormulae instanceof RegExp?d=t.escapeFormulae:typeof t.escapeFormulae==`boolean`&&t.escapeFormulae&&(d=/^[=+\-@\t\r].*$/)}})(),new RegExp(h(o),`g`));if(typeof e==`string`&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,l);if(typeof e[0]==`object`)return p(u||Object.keys(e[0]),e,l)}else if(typeof e==`object`)return typeof e.data==`string`&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||=e.meta&&e.meta.fields||u,e.fields||=Array.isArray(e.data[0])?e.fields:typeof e.data[0]==`object`?Object.keys(e.data[0]):[],Array.isArray(e.data[0])||typeof e.data[0]==`object`||(e.data=[e.data])),p(e.fields||[],e.data||[],l);throw Error(`Unable to serialize unrecognized input`);function p(e,t,n){var o=``,s=(typeof e==`string`&&(e=JSON.parse(e)),typeof t==`string`&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),c=!Array.isArray(t[0]);if(s&&r){for(var l=0;l<e.length;l++)0<l&&(o+=i),o+=m(e[l],l);0<t.length&&(o+=a)}for(var u=0;u<t.length;u++){var d=(s?e:t[u]).length,f=!1,p=s?Object.keys(t[u]).length===0:t[u].length===0;if(n&&!s&&(f=n===`greedy`?t[u].join(``).trim()===``:t[u].length===1&&t[u][0].length===0),n===`greedy`&&s){for(var h=[],g=0;g<d;g++){var _=c?e[g]:g;h.push(t[u][_])}f=h.join(``).trim()===``}if(!f){for(var v=0;v<d;v++){0<v&&!p&&(o+=i);var y=s&&c?e[v]:v;o+=m(t[u][y],v)}u<t.length-1&&(!n||0<d&&!p)&&(o+=a)}}return o}function m(e,t){var r,a,l;return e==null?``:e.constructor===Date?JSON.stringify(e).slice(1,25):(l=!1,d&&typeof e==`string`&&d.test(e)&&(e=`'`+e,l=!0),a=(r=e.toString()).replace(f,c),(l=l||!0===n||typeof n==`function`&&n(e,t)||Array.isArray(n)&&n[t]||((e,t)=>{for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1})(a,s.BAD_DELIMITERS)||-1<a.indexOf(i)||-1<r.indexOf(o)||a.charAt(0)===` `||a.charAt(a.length-1)===` `)?o+a+o:a)}},s.RECORD_SEP=``,s.UNIT_SEP=``,s.BYTE_ORDER_MARK=``,s.BAD_DELIMITERS=[`\r`,`
10
+ `,`"`,s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!r&&!!n.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=`,`,s.Parser=g,s.ParserHandle=m,s.NetworkStreamer=u,s.FileStreamer=d,s.StringStreamer=f,s.ReadableStreamStreamer=p,n.jQuery&&((t=n.jQuery).fn.parse=function(e){var r=e.config||{},i=[];return this.each(function(e){if(t(this).prop(`tagName`).toUpperCase()!==`INPUT`||t(this).attr(`type`).toLowerCase()!==`file`||!n.FileReader||!this.files||this.files.length===0)return!0;for(var a=0;a<this.files.length;a++)i.push({file:this.files[a],inputElem:this,instanceConfig:t.extend({},r)})}),a(),this;function a(){if(i.length===0)S(e.complete)&&e.complete();else{var n,r,a,c=i[0];if(S(e.before)){var l=e.before(c.file,c.inputElem);if(typeof l==`object`){if(l.action===`abort`)return n=c.file,r=c.inputElem,a=l.reason,void(S(e.error)&&e.error({name:`AbortError`},n,r,a));if(l.action===`skip`)return void o();typeof l.config==`object`&&(c.instanceConfig=t.extend(c.instanceConfig,l.config))}else if(l===`skip`)return void o()}var u=c.instanceConfig.complete;c.instanceConfig.complete=function(e){S(u)&&u(e,c.file,c.inputElem),o()},s.parse(c.file,c.instanceConfig)}}function o(){i.splice(0,1),a()}}),i&&(n.onmessage=function(e){e=e.data,s.WORKER_ID===void 0&&e&&(s.WORKER_ID=e.workerId),typeof e.input==`string`?n.postMessage({workerId:s.WORKER_ID,results:s.parse(e.input,e.config),finished:!0}):(n.File&&e.input instanceof File||e.input instanceof Object)&&(e=s.parse(e.input,e.config))&&n.postMessage({workerId:s.WORKER_ID,results:e,finished:!0})}),(u.prototype=Object.create(l.prototype)).constructor=u,(d.prototype=Object.create(l.prototype)).constructor=d,(f.prototype=Object.create(f.prototype)).constructor=f,(p.prototype=Object.create(l.prototype)).constructor=p,s};typeof define==`function`&&define.amd?define([],r):typeof t==`object`&&e!==void 0?t.exports=r():n.Papa=r()});Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e()}});
@@ -0,0 +1 @@
1
+ const e=require("./A5-b-7zx2sEOEcvl.cjs"),t=require("./CniTOg7oLRZwmgyM.cjs");let n=require("@sheetxl/primitives"),r=require("@sheetxl/utils");var i=[`All`,`Data`,`Headers`,`Totals`,`This Row`],a=class{constructor(n=e.tt){let r=function(e){let t=[...i];if(e)for(let n of Object.values(e)){let e=n?.trim();e&&!t.some(t=>t.toLowerCase()===e.toLowerCase())&&t.push(e)}return t.sort((e,t)=>t.length-e.length),t.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`)}(n.specifiers),a=t.a({name:`WhiteSpace`,pattern:/\s+/,group:t.o.SKIPPED}),o=t.a({name:`TableSpecifier`,pattern:RegExp(`\\[#(?:${r})\\]`,`i`)}),s=[a,o,t.a({name:`BracketedColumn`,pattern:/\[([^[\]]*)\]/,longer_alt:[o]}),t.a({name:`BareSpecifier`,pattern:RegExp(`#(?:${r})`,`i`)}),t.a({name:`ColumnSep`,pattern:/:/}),t.a({name:`ListSep`,pattern:new RegExp(n.separators.separatorFunction.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))})];this._lexer=new t.o(s,{ensureOptimizations:!0});let c={};s.forEach(e=>{c[e.name]=e}),this._vocabulary=c}getVocabulary(){return this._vocabulary}tokenize(e){return this._lexer.tokenize(e)}},o=class extends t.n{constructor(t=e.tt){let n=new a(t),r=n.getVocabulary();super(r,{nodeLocationTracking:`none`,maxLookahead:2,skipValidations:!0,recoveryEnabled:!1}),this._lexer=n;let{TableSpecifier:i,BracketedColumn:o,BareSpecifier:s,ColumnSep:c,ListSep:l}=r,u=this;u.RULE(`ruleContent`,()=>{let e=[],t=u.SUBRULE(u.ruleItem);return u.ACTION(()=>{t&&e.push(t)}),u.MANY(()=>{u.CONSUME(l),u.OPTION(()=>{let t=u.SUBRULE2(u.ruleItem);u.ACTION(()=>{t&&e.push(t)})})}),e}),u.RULE(`ruleItem`,()=>u.OR([{ALT:()=>u.SUBRULE(u.ruleSpecifier)},{ALT:()=>u.SUBRULE(u.ruleColumnOrRange)}])),u.RULE(`ruleSpecifier`,()=>u.OR([{ALT:()=>{let n=u.CONSUME(i);return u.ACTION(()=>{let r=e.Z(n.image,t);return r.image=n.image,r})}},{ALT:()=>{let n=u.CONSUME(s);return u.ACTION(()=>{let r=e.Z(n.image,t);return r.image=n.image,r})}}])),u.RULE(`ruleColumnOrRange`,()=>{let t=u.CONSUME(o),n,r;return u.OPTION(()=>{n=u.CONSUME(c),r=u.CONSUME2(o)}),u.ACTION(()=>{let i=e.Y(t.image);if(i.image=t.image,!r)return i;let a=e.Y(r.image);a.image=r.image;let o=e.L(`:`,i,a,!0);return o.image=n?.image??`:`,o})}),u.performSelfAnalysis()}_parseInner(e){let t=this._lexer.tokenize(e);return t.errors.length>0||t.tokens.length===0?[]:(this.input=t.tokens,this.reset(),this.ruleContent()??[])}_parseContent(t){if(!t)return[];let n=t.trim();if(!n)return[];let r=n[0];if(r===`@`){let t=n.slice(1).trim();if(!t){let t=e.W(`@`,null,!0);return t.image=`@`,[t]}let r=e.Y(t);r.image=t;let i=e.W(`@`,r,!0);return i.image=`@`,[i]}if(r!==`[`&&r!==`#`){let n=e.Y(t);return n.image=t,[n]}return this._parseInner(n)}parse(t,n,r){let i=()=>({root:e.X(``,[]),errors:[]});if(!r)return i();let a=r.indexOf(`[`);if(a===-1)return i();let o=r.slice(0,a),s=r.slice(a+1,-1),c=this._parseContent(s);return{root:e.X(o,c),errors:this.errors.length>0?[...this.errors]:[]}}},s=new Set([`:`,`.:.`,`.:`,`:.`]),c=new Set([`.:.`,`.:`,`:.`]),l=t=>{if(!t)return null;if(t.type===e.et.Cell){let e=t.value;return e.rowIndex===-(2**53-1)?`col`:e.colIndex===-(2**53-1)?`row`:null}return Number.isInteger(t.value)?`row`:null},u=(e,t)=>{let n=parseInt(e.charCodeAt(0)===36?e.substring(1):e,10);return n>=1&&n<=t},d=`A formula must not be empty`;function f(e,t){let n=e?.[0]?.image;if(!n){let e=t?.image;return e?`Expected a value after '${e}'`:`Expected a value`}return`Unexpected '${n}'`}var p={...t.r,buildNoViableAltMessage:e=>f(e.actual,e.previous),buildEarlyExitMessage:e=>f(e.actual,e.previous),buildNotAllInputParsedMessage:e=>{let n=e.firstRedundant?.image;return n?`Unexpected '${n}'`:t.r.buildNotAllInputParsedMessage(e)},buildMismatchTokenMessage:e=>{let n=e.actual?.image;return e.expected===t.i&&n?`Unexpected '${n}'`:t.r.buildMismatchTokenMessage(e)}},m=class extends t.n{constructor(n){let r=n?.lexer??t.t.shared(n?.lexerOptions),i=r.getVocabulary();super(i,{skipValidations:!0,recoveryEnabled:!0,...n,nodeLocationTracking:`full`,errorMessageProvider:p,maxLookahead:1}),this._ruleInfixOp=this.RULE(`ruleInfixOp`,()=>{let{PlusOp:t,MinOp:n,MulOp:r,DivOp:i,ExOp:a,ConcatOp:o,GtOp:s,EqOp:c,LtOp:l,NeqOp:u,GteOp:d,LteOp:f}=this._vocab,p=[];return p.push({node:this.SUBRULE(this._rulePostfixOp)}),this.MANY(()=>{let m=this.OR(this._c1||=[{ALT:()=>this.CONSUME(t).image},{ALT:()=>this.CONSUME(n).image},{ALT:()=>this.CONSUME(r).image},{ALT:()=>this.CONSUME(i).image},{ALT:()=>this.CONSUME(a).image},{ALT:()=>this.CONSUME(o).image},{ALT:()=>this.CONSUME(s).image},{ALT:()=>this.CONSUME(c).image},{ALT:()=>this.CONSUME(l).image},{ALT:()=>this.CONSUME(u).image},{ALT:()=>this.CONSUME(d).image},{ALT:()=>this.CONSUME(f).image}]),h={value:m,index:this.getLexerPosition(),isRange:e.Q.includes(m)},g=this.SUBRULE2(this._rulePostfixOp);p.push({op:h,node:g})}),this.ACTION(()=>{let t=p.length-1,n=e.k.length;for(let r=0;t>0&&r<n;r++){let n=e.k[r],i=1;for(;i<p.length;){let r=p[i].op;if(n.includes(r.value)){let n=p[i-1].node,a=p[i].node,o=e.L(r.value,n,a,r.isRange);o=this._tag(o,r.index),p[i-1].node=o,p.splice(i,1),t--}else i++}}}),p[0].node}),this._rulePlusMinusOp=this.RULE(`rulePlusMinusOp`,()=>{let{PlusOp:e,MinOp:t}=this._vocab;return this.OR([{ALT:()=>this.CONSUME(e)},{ALT:()=>this.CONSUME(t)}])}),this._rulePostfixOp=this.RULE(`rulePostfixOp`,()=>{let{PercentOp:t,ArrayAnchorOp:n}=this._vocab,r=this.SUBRULE(this._rulePrefixOp),i=[];return this.MANY(()=>{let e=this.OR([{ALT:()=>this.CONSUME(t).image},{ALT:()=>this.CONSUME(n).image}]);this.ACTION(()=>{i.push([e,this.getLexerPosition()])})}),this.ACTION(()=>{let t=i.length;if(t!==0)for(let n=0;n<t;n++){let t=i[n],a=t[0],o=t[1],s=e.Q.includes(a);r=e.U(a,r,s),r=this._tag(r,o)}}),r}),this._rulePrefixOp=this.RULE(`rulePrefixOp`,()=>{let{PlusOp:t,MinOp:n,ImplicitIntersectOp:r}=this._vocab,i=[];this.MANY(()=>{let e=this.OR([{ALT:()=>this.CONSUME(t).image},{ALT:()=>this.CONSUME(n).image},{ALT:()=>this.CONSUME(r).image}]);this.ACTION(()=>{i.push([e,this.getLexerPosition()])})});let a=this.SUBRULE(this._ruleRangeOp);return this.ACTION(()=>{let t=i.length;if(t!==0)for(let n=t-1;n>=0;n--){let t=i[n],r=t[0],o=t[1],s=e.Q.includes(r);a=e.W(r,a,s),a=this._tag(a,o)}}),a}),this._ruleRangeOp=this.RULE(`ruleRangeOp`,()=>{let{RangeOp:t,RangeTrimFullOp:n,RangeTrimLeadingOp:r,RangeTrimTrailingOp:i}=this._vocab,a=[];return a.push({node:this.SUBRULE(this._ruleCallOp)}),this.MANY(()=>{let e={value:this.OR(this._c2||=[{ALT:()=>this.CONSUME(t).image},{ALT:()=>this.CONSUME(n).image},{ALT:()=>this.CONSUME(r).image},{ALT:()=>this.CONSUME(i).image}]),index:this.getLexerPosition()},o=this.SUBRULE2(this._ruleCallOp);a.push({op:e,node:o})}),this.ACTION(()=>{for(let t=1;t<a.length;t++){let n=a[t].op,r=e.L(n.value,a[0].node,a[t].node,!0);r=this._tag(r,n.index),a[0].node=r}}),a[0].node}),this._ruleCallOp=this.RULE(`ruleCallOp`,()=>{let{OpenParen:t,CloseParen:n}=this._vocab,r=this.SUBRULE(this._ruleFormula);return this.MANY({GATE:()=>{let e=this.LA(0),n=this.LA(1);return!(!e||!n||n.tokenType!==t)&&n.startOffset===e.endOffset+1},DEF:()=>{this.CONSUME(t);let i=this.getLexerPosition(),a=this.SUBRULE(this._ruleFunctionArguments),o=r,s=this.ACTION(()=>this._tag(e.M(o,a),i)),c=this.OPTION(()=>this.CONSUME(n));this.ACTION(()=>{c||this._reportError(s,`Missing closing parenthesis ')'`,i),this._tagClose(s,this.getLexerPosition()),r=s})}}),r}),this._ruleIntersectOp=this.RULE(`ruleIntersectOp`,()=>{let t=[this.SUBRULE(this._ruleInfixOp)];return this.MANY(()=>{this.OPTION({GATE:()=>{let e=this.LA(0);return this.LA(1).startOffset>e.endOffset+1},DEF:()=>{t.push(this.SUBRULE3(this._ruleInfixOp))}})}),this.ACTION(()=>{for(;t.length>1;){let n=t.length-1;for(let r=0;r<n;r++){let i=t[r],a=t[r+1],o=e.L(` `,i,a,!0),s=this._tokenMap.get(i);s&&delete s.tokenIndexClose;let c=this._tokenMap.get(a),l=c?.tokenIndex;if(l!==void 0){let e=this.input[l],t=this.input[l-1]?.endOffset??-1,n=this._inputText.slice(t+1,e.startOffset).slice(0,-1);n.length>0&&(o.wsBefore=n)}c&&delete c.tokenIndex,r+1<n&&c&&delete c.tokenIndexClose,t.splice(r,2,o),r--,n--}}}),t[0]}),this._ruleFormula=this.RULE(`ruleFormula`,()=>this.OR9([{ALT:()=>this.SUBRULE(this._ruleLiteral)},{ALT:()=>this.SUBRULE(this._ruleReference)},{ALT:()=>this.SUBRULE(this._ruleFunction)},{ALT:()=>this.SUBRULE(this._ruleParen)},{ALT:()=>this.SUBRULE(this._ruleTableReference)},{ALT:()=>this.SUBRULE(this._ruleBracketedString)},{ALT:()=>this.SUBRULE(this._ruleLiteralArray)}])),this._ruleGroup=this.RULE(`ruleGroup`,()=>{let{ArgSeparator:e}=this._vocab,t=[];return this.MANY(()=>{this.CONSUME(e);let n=this.SUBRULE2(this._ruleIntersectOp);this.ACTION(()=>{t.push(n)})}),t}),this._ruleParen=this.RULE(`ruleParen`,()=>{let{OpenParen:t,CloseParen:n}=this._vocab;return this._processParen(e.et.Paren,t,n)}),this._ruleLiteralArray=this.RULE(`ruleLiteralArray`,()=>{let{OpenCurlyParen:t,CloseCurlyParen:n,ColSeparator:r,RowSeparator:i}=this._vocab,a=e.B();this.CONSUME(t);let o=this.getLexerPosition(),s=this.ACTION(()=>this._tag(e.R(a),o)),c=this.SUBRULE(this._ruleLiteralForArray);this.ACTION(()=>{a.value.push(c)}),this.MANY(()=>{let t=!1;this.OR([{ALT:()=>{this.CONSUME(r),t=!0}},{ALT:()=>this.CONSUME(i)}]);let n=this.SUBRULE2(this._ruleLiteralForArray);this.ACTION(()=>{t||(a=e.B(),s.value.push(a)),a.value.push(n)})});let l=this.OPTION(()=>this.CONSUME(n));return s=this.ACTION(()=>(l||this._reportError(s,`Missing closing parenthesis '}'`,o),this._tagClose(s,this.getLexerPosition()))),s}),this._ruleLiteralForArray=this.RULE(`ruleLiteralForArray`,()=>{let{StringToken:t,BooleanToken:n,LiteralError:r,RefError:i}=this._vocab;return this.OR([{ALT:()=>{let t=this.OPTION(()=>this.SUBRULE(this._rulePlusMinusOp)),n=this.SUBRULE(this._ruleNumber),r=this.ACTION(()=>this._tag(e.H(n.image,this._locale),this.getLexerPosition()));return this.ACTION(()=>t?e.G(t.image,r):r)}},{ALT:()=>{let n=this.CONSUME(t);return this.ACTION(()=>this._tag(e.J(n.image),this.getLexerPosition()))}},{ALT:()=>{let t=this.CONSUME(n);return this.ACTION(()=>this._tag(e.j(t.image,this._locale),this.getLexerPosition()))}},{ALT:()=>{let t=this.CONSUME(r);return this.ACTION(()=>this._tag(e.z(t.image,this._locale),this.getLexerPosition()))}},{ALT:()=>{let t=this.CONSUME(i);return this.ACTION(()=>this._tag(e.K(t.image,this._locale),this.getLexerPosition()))}}])}),this._ruleLiteral=this.RULE(`ruleLiteral`,()=>{let{StringToken:t,BooleanToken:n,LiteralError:r,RefError:i}=this._vocab;return this.OR([{ALT:()=>{let t=this.SUBRULE(this._ruleNumber);return this.ACTION(()=>this._tag(e.H(t.image,this._locale),this.getLexerPosition()))}},{ALT:()=>{let n=this.CONSUME(t);return this.ACTION(()=>this._tag(e.J(n.image),this.getLexerPosition()))}},{ALT:()=>{let t=this.CONSUME(n);return this.ACTION(()=>this._tag(e.j(t.image,this._locale),this.getLexerPosition()))}},{ALT:()=>{let t=this.CONSUME(r);return this.ACTION(()=>this._tag(e.z(t.image,this._locale),this.getLexerPosition()))}},{ALT:()=>{let t=this.CONSUME(i);return this.ACTION(()=>this._tag(e.K(t.image,this._locale),this.getLexerPosition()))}}])}),this._ruleFunction=this.RULE(`ruleFunction`,()=>{let{FunctionToken:t,OpenParen:n,CloseParen:r}=this._vocab,i=this.CONSUME(t).image,a=this.getLexerPosition();this.CONSUME(n);let o=this.SUBRULE(this._ruleFunctionArguments),s=this.ACTION(()=>this._tag(e.I(i,o),a)),c=this.OPTION(()=>this.CONSUME(r));return s=this.ACTION(()=>(c||this._reportError(s,`Missing closing parenthesis ')'`,a),this._tagClose(s,this.getLexerPosition()))),s}),this._ruleFunctionArguments=this.RULE(`ruleFunctionArguments`,()=>{let{ArgSeparator:t,CloseParen:n}=this._vocab,r=[];return this.OPTION({GATE:()=>this.LA(1).tokenType!==n,DEF:()=>{let n;this.OPTION2(()=>{n=this.SUBRULE(this._ruleIntersectOp)}),n=this.ACTION(()=>n??this._tagClose(e.F(),this.getLexerPosition())),r.push(n),this.MANY(()=>{let n;this.CONSUME(t),this.OPTION3(()=>{n=this.SUBRULE2(this._ruleIntersectOp)}),n=this.ACTION(()=>n??this._tagClose(e.F(),this.getLexerPosition())),r.push(n)})}}),r}),this._ruleBracketedString=this.RULE(`ruleBracketedString`,()=>{let{BracketedString:e}=this._vocab,t=this.CONSUME(e),n=this.getLexerPosition();return this.ACTION(()=>{let e=this._srParser.parse(this.rowIndex,this.colIndex,t.image);for(let t of e.errors)this._astErrors.push(t);return this._tag(e.root,n)})}),this._ruleTableReference=this.RULE(`ruleTableReference`,()=>{let{TableReference:e}=this._vocab,t=this.CONSUME(e),n=this.getLexerPosition();return this.ACTION(()=>{let e=this._srParser.parse(this.rowIndex,this.colIndex,t.image);for(let t of e.errors)this._astErrors.push(t);return this._tag(e.root,n)})}),this._ruleReference=this.RULE(`ruleReference`,()=>{let{Sheet:t,SheetQuoted:n,DivOp:r,MulOp:i,PlusOp:a,MinOp:o,ArgSeparator:s,Cell:c,ArrayAnchorOp:l,NamedToken:u,SingleQuotedString:d,Column:f,AbsRow:p,DigitToken:m,RefError:h}=this._vocab,g;this.OPTION2({GATE:()=>{for(let e=1;e<6;e++){let c=this.LA(e);if(c.tokenType===t||c.tokenType===n)return!0;if(c.image===``||c.image===`)`||c.tokenType===r||c.tokenType===i||c.tokenType===a||c.tokenType===o||c.tokenType===s)break}return!1},DEF:()=>{g=this.SUBRULE(this._rulePrefixSheetName)}});let _=this.OR([{ALT:()=>{let t=this.CONSUME(c),n=this.getLexerPosition(),r=this.OPTION(()=>this.CONSUME(l));return this.ACTION(()=>{let i=this._tag(e.N(t.image,this.rowIndex,this.colIndex),n);return r?this._tag(e.U(`#`,i,!0),n):i})}},{ALT:()=>{let t=this.OR2([{ALT:()=>this.CONSUME(u)},{ALT:()=>this.CONSUME(d)}]);return this.ACTION(()=>this._tag(e.V(t.image),this.getLexerPosition()))}},{ALT:()=>this.SUBRULE(this._ruleBracketedString)},{ALT:()=>this.SUBRULE(this._ruleFunction)},{ALT:()=>{let t=this.CONSUME(f);return this.ACTION(()=>this._tag(e.P(t.image,this.colIndex),this.getLexerPosition()))}},{ALT:()=>{let t=this.CONSUME(p);return this.ACTION(()=>this._tag(e.q(t.image,this.rowIndex),this.getLexerPosition()))}},{ALT:()=>{let t=this.CONSUME(m);return this.ACTION(()=>this._tag(e.q(t.image,this.rowIndex),this.getLexerPosition()))}},{ALT:()=>{let t=this.CONSUME(h);return this.ACTION(()=>this._tag(e.K(t.image,this._locale),this.getLexerPosition()))}}]);return this.ACTION(()=>{if(g&&_){if(g.name===``)return void this._reportError(_,`'${g.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);let t=_;_.type===e.et.Postfix&&_.inputs?.[0]&&(t=_.inputs[0]),t.type!==e.et.Cell&&t.type!==e.et.Named&&t.type!==e.et.Row&&t.type!==e.et.TableColumn&&t.type!==e.et.Error||(t.value.scope=g.name,t.value.scopeImage=g.image)}}),_}),this._rulePrefixSheetName=this.RULE(`rulePrefixSheetName`,()=>{let{SheetQuoted:e,BracketedString:t,NamedToken:n,RangeOp:r,Sheet:i}=this._vocab;return this.OR([{ALT:()=>{let t=this.CONSUME(e).image;return{name:t.slice(1,-2).replace(/''/g,`'`),image:t}}},{ALT:()=>{let e=``;this.OPTION(()=>{e+=this.CONSUME(t).image}),this.OPTION2({GATE:()=>this.LA(2).tokenType===r,DEF:()=>{e+=this.CONSUME(n).image,this.CONSUME(r),e+=`:`}});let a=this.CONSUME(i).image;return{name:e+a.slice(0,-1),image:e+a}}}])}),this._ruleNumber=this.RULE(`ruleNumber`,()=>{let{NumberToken:e,ScientificDigit:t,DigitToken:n}=this._vocab;return this.OR([{ALT:()=>this.CONSUME(e)},{ALT:()=>this.CONSUME(t)},{ALT:()=>this.CONSUME(n)}])}),this._ruleRoot=this.RULE(`ruleRoot`,()=>{let{ArgSeparator:t}=this._vocab,n=this.SUBRULE(this._ruleIntersectOp),r=[];return this.MANY(()=>{this.CONSUME(t),r.push(this.SUBRULE2(this._ruleIntersectOp))}),this.ACTION(()=>r.length===0?n:{type:e.et.List,value:`,`,inputs:[n,...r],isReference:!0})}),this._lexer=r,this._locale=r.getLocale(),this._vocab=i,this._srParser=n?.srParser??new o(this._locale),this.performSelfAnalysis()}getLexer(){return this._lexer}parse(t,r,i,a){let o=this._lexer.tokenize(i),f;if(!o)return{root:{type:e.et.Unparsed,value:i},errors:[]};let p=o.tokens;if(p.length===0)throw new n.FormulaError.Parse(d);return this.input=p,this._inputText=i,this._inputTextLength=i.length,this.rowIndex=t,this.colIndex=r,this._astErrors=[],this._tokenMap=new Map,this.reset(),f=this._ruleRoot(),f&&this._bindAllWhitespace(f),f=e.$(f,(n,r)=>{let i=n.type,a=r?.isReference?r.value:void 0,o=typeof a==`string`&&s.has(a),d=typeof a==`string`&&c.has(a),f=o?r.inputs:void 0,p=f?f[0]===n?f[1]:f[0]:void 0,m=this._lexer.getMaxRow();if(o&&i!==e.et.Cell&&Number.isInteger(n.value)){let r=e.q(n.image,t);return e.A(r,n),l(p)===`row`?u(n.image,m)||this._reportError(r,`'${n.image}' is not a valid row — rows run from 1 to ${m}`):this._reportError(r,`'${n.image}' is not a valid reference — a whole row can only pair with another row (as in ${n.image}:${n.image})`),r}if(d&&i===e.et.Named)return this._reportError(n,`'${n.image??n.value?.nameId}' is a name — '${a}' needs a cell or range on both sides`),n;if(i===e.et.Cell){let t=n.value,r=t.colIndex===-(2**53-1),i=t.rowIndex===-(2**53-1);if((r||i)&&l(p)===(r?`row`:`col`))return r&&!u(n.image,m)&&this._reportError(n,`'${n.image}' is not a valid row — rows run from 1 to ${m}`),n;if(r||i||t.colIndex>=16384){let o=e.V(n.image);e.A(o,n);let s=t.scope;return s&&(o.value.scope=s,o.value.scopeImage=t.scopeImage),r?this._reportError(o,`'${n.image}' is not a valid reference — a row needs a column (use ${n.image}:${n.image} for the whole row)`):i&&n.image.includes(`$`)?this._reportError(o,`'${n.image}' is not a valid reference — a whole column can only pair with another column (as in ${n.image}:${n.image})`):d&&this._reportError(o,`'${n.image}' is a name — '${a}' needs a cell or range on both sides`),o}}return n}),a&&f&&(f=e.g(f,a,null)),{root:f,errors:[...this.errors,...this._astErrors]}}_processParen(e,t,n){let r;this.CONSUME(t);let i=this.getLexerPosition();r=this.ACTION(()=>(r={type:e,value:null,inputs:null},this._tag(r,i)));let a=[],o=this.SUBRULE(this._ruleIntersectOp);o&&a.push(o);let s=this.SUBRULE(this._ruleGroup),c=this.OPTION(()=>this.CONSUME(n));return r=this.ACTION(()=>{if(s)for(let e=0;e<s.length;e++)a.push(s[e]);return r&&(c||this._reportError(r,`Missing closing parenthesis`,i),r.inputs=a),this._tagClose(r,this.getLexerPosition())}),r}_reportError(e,t,n=void 0,r=`SyntaxError`){n===void 0&&(n=this.getLexerPosition()),e.error=!0,this._astErrors.push({name:r,message:t,previousToken:this.input[n],ast:e})}_tag(e,t){return e?(e.image??=this.input[t].image,this._tokenMap.set(e,{tokenIndex:t,tokenIndexClose:t}),e):(console.warn(`node is null`),e)}_tagClose(e,t){let n=this._tokenMap.get(e);return n?n.tokenIndexClose=t:this._tokenMap.set(e,{tokenIndexClose:t}),e}_bindNodeWhitespace(e){let t=this._tokenMap.get(e);if(!t)return;let n=this.input,r=this._inputText,i=t.tokenIndex;if(i!==void 0){let t=n[i],a=n[i-1]?.endOffset??-1;a+1<t.startOffset&&(e.wsBefore=r.slice(a+1,t.startOffset))}let a=t.tokenIndexClose;if(a!==void 0){let t=n[a],i=n[a+1]?.startOffset??this._inputTextLength;t.endOffset+1<i&&(e.wsAfter=r.slice(t.endOffset+1,i))}}_bindAllWhitespace(t){if(t){if(this._bindNodeWhitespace(t),t.inputs)for(let e of t.inputs)e&&this._bindAllWhitespace(e);if(t.type===e.et.Array&&Array.isArray(t.value)){for(let e of t.value)if(e&&Array.isArray(e.value))for(let t of e.value)t&&this._bindAllWhitespace(t)}}}};exports.FormulaCompiler=class{constructor(e){e={...e},this._editing=e.profile===`editing`,this._parser=new m(e)}compile(t,r,i,a,o,s,c,l){if(a.length===0){let e=new n.FormulaError.Parse(d);return this._compileUnparsed(t,o,a,{input:a,cause:e,causes:[e]})}if(a.length>e.nt.MAX_EXPRESSION_LENGTH){let r=new n.FormulaError.Parse((u=a.length,`A formula must not be longer than ${e.nt.MAX_EXPRESSION_LENGTH} characters (this one is ${u})`));return this._compileUnparsed(t,o,a,{input:a,cause:r,causes:[r]})}var u;let f,p,m=[];try{let e=this._parser.parse(r,i,a,l);f=e.root,m=e.errors}catch(e){p=n.FormulaError.isError(e,n.FormulaError.Code.Parse)?e:new n.FormulaError.Parse(e.message,e)}let h=[];for(let t of m)h.push(e.T(t));if(f){e.C(f,s??null)&&h.push(new n.FormulaError.Parse(`The implicit intersection operator ' ' requires a cell or range on both sides`)),e.w(f,s??null)&&h.push(new n.FormulaError.Parse(`Expected a reference; a value cannot be converted to one.`));let t=e.y(f,s??null);t&&h.push(new n.FormulaError.Parse(t));let r=e.b(f,s??null);r&&h.push(new n.FormulaError.Parse(r));let i=e.x(f,s??null);i&&h.push(new n.FormulaError.Parse(i));let a=e.S(f);a&&h.push(new n.FormulaError.Parse(a))}h.length>0&&!p&&(p=h[0]);let g=null;if(p&&(g={input:a,cause:p,causes:h.length>0?h:[p]}),!f){if(this._editing){let e=this._recoverCompiled(t,r,i,a,o,g,c);if(e)return e}return this._compileUnparsed(t,o,a,g)}f=e.D(f,s??null),f=e._(f,s??null),o&&(f=e.E(f,o,c));let _=e.v(t,o,f,this._editing,g,s??null);return this._editing&&g&&e.O(_.getTokens(),o)!==a?this._recoverCompiled(t,r,i,a,o,g,c)||this._compileUnparsed(t,o,a,g):_}autoCorrect(e){let t;try{let n=this._parser.getLexer().tokenize(e,!1);if(n.errors.length>0)return null;t=n.tokens}catch{return null}let n=[];for(let e of t){let t=e.tokenType?.name;if(t===`OpenParen`)n.push(`)`);else if(t===`OpenCurlyParen`)n.push(`}`);else if((t===`CloseParen`||t===`CloseCurlyParen`)&&n.pop()!==(t===`CloseParen`?`)`:`}`))return null}return n.length===0?null:e+n.reverse().join(``)}_compileUnparsed(t,n,i,a){let o={runtime:t,symbols:n,getFunction:null,ast:null,evaluations:r.CommonUtils.EmptyArray,executions:r.CommonUtils.EmptyArray,bindings:r.CommonUtils.EmptyArray,referencesAbsolute:r.CommonUtils.EmptyArray,referencesExecute:r.CommonUtils.EmptyArray,referencesRelative:r.CommonUtils.EmptyArray,referencesRoot:r.CommonUtils.EmptyArray,referenceIndices:r.CommonUtils.EmptyArray,getTokens:()=>[{type:e.et.Unparsed,value:i,text:i}],namedIds:r.CommonUtils.EmptyArray,symbolIds:r.CommonUtils.EmptyArray,hasTotals:!1,isReferenceOnly:!1,error:a,transform:()=>o};return o}_recoverCompiled(t,n,r,i,a,o,s){let c,l=i.length;try{let e=this._parser.getLexer().tokenize(i,!1);c=e.tokens,e.errors.length>0&&(l=Math.min(l,e.errors[0].offset))}catch{return null}let u=[];for(let e=c.length-1;e>=0&&u.length<24;e--){let t=(c[e].endOffset??-1)+1;t>0&&t<i.length&&t<=l&&u.push(t)}for(let c of u){let l=i.slice(0,c),u,d;try{u=this._parser.parse(n,r,l).root}catch{continue}if(!u||u.type===e.et.Unparsed)continue;try{let n=e._(u,null),r=a?e.E(n,a,s):n;d=e.v(t,a,r,!0,o)}catch{continue}if(e.O(d.getTokens(),a)!==l)continue;let f=i.slice(c);if(f.length===0)return d;let p,m={...d,getTokens:()=>(p||(p=[...d.getTokens()],this._appendUnparsedTail(p,f)),p),transform:()=>m};return m}return null}_appendUnparsedTail(t,n){let r=[];for(let n of t)n.type===e.et.Paren&&n.text===`(`?r.push({ctx:n.context,argIndex:0}):n.type===e.et.Paren&&n.text===`)`?r.pop():n.type===e.et.Separator&&r.length>0&&r[r.length-1].argIndex++;let i=r.length>0?r[r.length-1]:void 0,a=i?.ctx?{...i.ctx,argIndex:i.ctx.argIndex===-1?i.argIndex:i.ctx.argIndex}:void 0,o=(n,r)=>{let i={type:e.et.Unparsed,value:n,text:n};a&&(i.context=a),r&&(i.isLookup=!0),t.push(i)},s=/[A-Za-z_][A-Za-z0-9_]*$/.exec(n),c=s?s.index:-1;c>=0&&(c===0||!/[A-Za-z0-9_.]/.test(n[c-1]))?(c>0&&o(n.slice(0,c)),o(n.slice(c),!0)):o(n)}};
@@ -0,0 +1 @@
1
+ const e=require("./B7_pDFYCVzt-3hUs.cjs"),t=require("./A5-b-7zx2sEOEcvl.cjs");let n=require("@sheetxl/primitives"),r=require("@sheetxl/utils"),i=require("@sheetxl/formulas");i=e.r(i,1);let a=require("@sheetxl/formulas-extended");a=e.r(a,1);var o=[{pkg:`@sheetxl/formulas`,id:`@sheetxl/formulas`,files:[`functions.json`]},{pkg:`@sheetxl/formulas-extended`,id:`@sheetxl/formulas-extended`,files:[`functions.json`]},{pkg:`@sheetxl/sdk`,id:`@sheetxl/sdk:grammar`,files:[`grammar.json`]}],s=new Set;function c(e,t){let n=`${e.id}\0${t}`;s.has(n)||(s.add(n),r.DefaultLanguagePackService.registerPack(e.id,t,async()=>{let n={tag:t};return await Promise.all(e.files.map(async i=>{let a=await(0,r.fetchLocaleResource)(e.pkg,`${t}/${i}`).catch(()=>{});a&&(i===`functions.json`?n.functions=a:Object.assign(n,a))})),n}))}function l(e){if(e&&e!==`en`&&!e.startsWith(`en-`))for(let t of o)c(t,e)}var u=!1,d=new WeakMap;function f(){let e=t.an(),n=e?.functionHelp;if(!e||!n)return Promise.resolve(null);let r=d.get(e);return r||(r=n().then(e=>(e&&typeof e==`object`&&`default`in e?e.default:e)??null).catch(()=>null),d.set(e,r)),r}var p=(e,i,a,o,s,c)=>{let l=Object.keys(o);for(let u of l){let l=o[u],d=u,p=e=>{let t=null;e.s?t=e.s:e.r||e.g||(t=n.ScalarType.Number);let i={name:e.n,scalar:t,range:e.r??null,arrayDepth:e.d??0,optional:e.m===`?`,rest:e.m===`...`,enums:e.e??r.CommonUtils.EmptyArray};return e.l&&(i.lambda=e.l),e.a!==void 0&&(i.lambdaArity=e.a),e.o&&(i.errors=e.o),e.v!==void 0&&(i.defaultValue=e.v),e.u&&(i.omittable=!0),e.w!==void 0&&(i.omittedValue=e.w),e.g&&(i.repeating=e.g.map(p)),delete i.dim,i},m=[],h=l.p;if(h)for(let e=0;e<h.length;e++)m.push(p(h[e]));let g=null;l.r&&(g={},l.r.s&&(g.scalar=l.r.s),l.r.r&&(g.range=l.r.r===`p`||l.r.r===`r`||l.r.r===`m`?l.r.r:null),l.r.d&&(g.arrayDepth=l.r.d??0),l.r.l&&(g.lambda=l.r.l||null));let _={name:d,parameters:m,returnType:g,context:l.c?`calculation`:null,behavior:null},v=a[l.fn??d],y,b=new t.Gt(_,v,i,async e=>{if(!s)return null;let n;y?n=y:(n=(await s()).default,y=n);let i=n?.[d];if(!i)return console.warn(`No descriptor found for built-in function: ${d}`),null;let a=(await f())?.[d],o=i.p,l=o?{...o}:r.CommonUtils.EmptyObject,u=Object.keys(l);if(u.length>0)for(let e=0;e<u.length;e++){let t=u[e],n=o[t],r=a?.p?.[t];l[t]={description:r?.d??n.d??``,example:r?.e??n.e,defaultValue:n.v}}return{name:d,nameLocal:t.an()?.functions?.[d]??d,summary:a?.s??i.s??``,category:a?.c??i.c??c??null,parameters:l,deprecated:i.h??!1,links:i.l??r.CommonUtils.EmptyArray}},!0);e.set(d,b)}};exports.initializeFunctions=function(e,t){u||(u=!0,l(r.DefaultLanguagePackService.getActive()),r.DefaultLanguagePackService.addChangeListener(e=>l(e)));let n=(0,i.default)(e,p);if((0,a.default)(e,p,n),t)for(let r of t)r(e,p,n);return n};