solve-engine 1.1.1 → 2.0.0

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 (395) hide show
  1. package/README.md +12 -17
  2. package/dist/{BytecodeBuilder-Bp9xeTmX.d.cts → BytecodeBuilder-DGGeByAP.d.cts} +18 -0
  3. package/dist/{BytecodeBuilder-Bp9xeTmX.d.ts → BytecodeBuilder-DGGeByAP.d.ts} +18 -0
  4. package/dist/{Configuration-C9W8tJv_.d.cts → Configuration-B6W0-T67.d.cts} +17 -4
  5. package/dist/{Configuration-C9W8tJv_.d.ts → Configuration-B6W0-T67.d.ts} +17 -4
  6. package/dist/{EngineError-B61GS1jp.d.cts → EngineError-Ce1lPkjZ.d.cts} +8 -0
  7. package/dist/{EngineError-B61GS1jp.d.ts → EngineError-Ce1lPkjZ.d.ts} +8 -0
  8. package/dist/{Lexer-BOs7euZe.d.cts → Lexer-B4C1qHXu.d.cts} +1 -1
  9. package/dist/{Lexer-CSI_lwbW.d.ts → Lexer-DKMlj7Sy.d.ts} +1 -1
  10. package/dist/{PackageCompatibility-B-7rK1TD.d.cts → PackageCompatibility-Bn5jnBtA.d.cts} +2 -2
  11. package/dist/{PackageCompatibility-Dh59eF-X.d.ts → PackageCompatibility-CIvq2MP5.d.ts} +2 -2
  12. package/dist/{PackageRegistry-_8rDlvxI.d.ts → PackageRegistry-DzeiWcv4.d.ts} +143 -175
  13. package/dist/{PackageRegistry-BHWJP83F.d.cts → PackageRegistry-dpdurBVO.d.cts} +143 -175
  14. package/dist/{Parselet-BBT8riYh.d.ts → Parselet-B-zoPrTa.d.ts} +9 -6
  15. package/dist/{Parselet-BHcgK9S7.d.cts → Parselet-C4Wu055_.d.cts} +9 -6
  16. package/dist/{ScopeManager-CxA24W5n.d.ts → ScopeManager-C2LDOrDx.d.ts} +14 -16
  17. package/dist/{ScopeManager-8vf02dwj.d.cts → ScopeManager-D7uMXbhS.d.cts} +14 -16
  18. package/dist/{Token-B1hdkedD.d.cts → Token-CbP_OutD.d.cts} +9 -0
  19. package/dist/{Token-B1hdkedD.d.ts → Token-CbP_OutD.d.ts} +9 -0
  20. package/dist/{TokenNormalizer-C6VzZgHa.d.ts → TokenNormalizer-DCWdZjGz.d.ts} +1 -1
  21. package/dist/{TokenNormalizer-DRc1Js1V.d.cts → TokenNormalizer-DnlL7_8c.d.cts} +1 -1
  22. package/dist/{VMCheckpoints-MK--EBH2.d.ts → VMCheckpoints-CGyFhivM.d.ts} +3 -3
  23. package/dist/{VMCheckpoints-ELYqITdF.d.cts → VMCheckpoints-I9jg3jWR.d.cts} +3 -3
  24. package/dist/{Value-BUi1RA3S.d.cts → Value-CCi_Eecs.d.cts} +72 -5
  25. package/dist/{Value-BUi1RA3S.d.ts → Value-CCi_Eecs.d.ts} +72 -5
  26. package/dist/{WorkerError-gzmaopj2.d.cts → WorkerError-B4p6PNfx.d.cts} +1 -1
  27. package/dist/{WorkerError-_-RkoQ5P.d.ts → WorkerError-Dhj9BQ_A.d.ts} +1 -1
  28. package/dist/chunk-2JMFUQZH.js +2 -0
  29. package/dist/chunk-2JMFUQZH.js.map +1 -0
  30. package/dist/chunk-2RWAXT6O.js +0 -1
  31. package/dist/chunk-4BZIYU7S.cjs +3 -0
  32. package/dist/chunk-4BZIYU7S.cjs.map +1 -0
  33. package/dist/chunk-4J7XZSZJ.cjs +5 -0
  34. package/dist/chunk-4J7XZSZJ.cjs.map +1 -0
  35. package/dist/chunk-4QVBSG6B.cjs +2 -0
  36. package/dist/chunk-4QVBSG6B.cjs.map +1 -0
  37. package/dist/chunk-5IJD5L3O.cjs +2 -0
  38. package/dist/chunk-5IJD5L3O.cjs.map +1 -0
  39. package/dist/chunk-62LMTO4F.js +2 -0
  40. package/dist/chunk-62LMTO4F.js.map +1 -0
  41. package/dist/chunk-6CY44ZPG.js +2 -0
  42. package/dist/chunk-6CY44ZPG.js.map +1 -0
  43. package/dist/chunk-6G3PMEPA.js +2 -0
  44. package/dist/chunk-6G3PMEPA.js.map +1 -0
  45. package/dist/chunk-6INX773F.cjs +2 -0
  46. package/dist/chunk-6INX773F.cjs.map +1 -0
  47. package/dist/chunk-6KFVG6UY.cjs +2 -0
  48. package/dist/chunk-6KFVG6UY.cjs.map +1 -0
  49. package/dist/chunk-76F3LCIL.js +4 -0
  50. package/dist/chunk-76F3LCIL.js.map +1 -0
  51. package/dist/chunk-7GK3XEZF.js +2 -0
  52. package/dist/chunk-7GK3XEZF.js.map +1 -0
  53. package/dist/chunk-APN442VD.cjs +2 -0
  54. package/dist/chunk-APN442VD.cjs.map +1 -0
  55. package/dist/chunk-AXMQG5TS.cjs +2 -0
  56. package/dist/chunk-AXMQG5TS.cjs.map +1 -0
  57. package/dist/chunk-CIQOK7Q4.cjs +2 -0
  58. package/dist/chunk-CIQOK7Q4.cjs.map +1 -0
  59. package/dist/chunk-E6Z4NQAS.js +2 -0
  60. package/dist/chunk-E6Z4NQAS.js.map +1 -0
  61. package/dist/chunk-EFJCC6FJ.cjs +2 -0
  62. package/dist/chunk-EFJCC6FJ.cjs.map +1 -0
  63. package/dist/chunk-ESUN2THE.cjs +2 -0
  64. package/dist/chunk-ESUN2THE.cjs.map +1 -0
  65. package/dist/chunk-EVAOPEO4.js +2 -0
  66. package/dist/chunk-EVAOPEO4.js.map +1 -0
  67. package/dist/chunk-EYRBENHC.js +3 -0
  68. package/dist/chunk-EYRBENHC.js.map +1 -0
  69. package/dist/chunk-FDE5HWDI.cjs +2 -0
  70. package/dist/chunk-FDE5HWDI.cjs.map +1 -0
  71. package/dist/chunk-FWW3M36J.cjs +2 -0
  72. package/dist/chunk-FWW3M36J.cjs.map +1 -0
  73. package/dist/chunk-GOIQYUWV.js +2 -0
  74. package/dist/chunk-GOIQYUWV.js.map +1 -0
  75. package/dist/chunk-HFKDWQUL.js +2 -0
  76. package/dist/chunk-HFKDWQUL.js.map +1 -0
  77. package/dist/chunk-HLBYHXQD.cjs +3 -0
  78. package/dist/chunk-HLBYHXQD.cjs.map +1 -0
  79. package/dist/chunk-IANAMBJQ.cjs +2 -0
  80. package/dist/chunk-IANAMBJQ.cjs.map +1 -0
  81. package/dist/chunk-IJMNVBIS.js +2 -0
  82. package/dist/chunk-IJMNVBIS.js.map +1 -0
  83. package/dist/chunk-J4LZD4ZY.js +3 -0
  84. package/dist/chunk-J4LZD4ZY.js.map +1 -0
  85. package/dist/chunk-JAK3RAFA.cjs +2 -0
  86. package/dist/chunk-JAK3RAFA.cjs.map +1 -0
  87. package/dist/chunk-JFAJN3C2.cjs +2 -0
  88. package/dist/chunk-JFAJN3C2.cjs.map +1 -0
  89. package/dist/chunk-JPFCXLJV.js +2 -0
  90. package/dist/chunk-JPFCXLJV.js.map +1 -0
  91. package/dist/chunk-JSPKKNPQ.js +3 -0
  92. package/dist/chunk-JSPKKNPQ.js.map +1 -0
  93. package/dist/chunk-L3FPQSGN.js +2 -0
  94. package/dist/chunk-L3FPQSGN.js.map +1 -0
  95. package/dist/chunk-LR4E4A4W.cjs +2 -0
  96. package/dist/chunk-LR4E4A4W.cjs.map +1 -0
  97. package/dist/chunk-MIQBJGGR.js +2 -0
  98. package/dist/chunk-MIQBJGGR.js.map +1 -0
  99. package/dist/chunk-MPB7KUN5.js +3 -0
  100. package/dist/chunk-MPB7KUN5.js.map +1 -0
  101. package/dist/chunk-MSYX32PF.cjs +2 -0
  102. package/dist/chunk-MSYX32PF.cjs.map +1 -0
  103. package/dist/chunk-MVZUTETT.js +2 -0
  104. package/dist/chunk-MVZUTETT.js.map +1 -0
  105. package/dist/chunk-N7N7MPMK.cjs +2 -0
  106. package/dist/chunk-N7N7MPMK.cjs.map +1 -0
  107. package/dist/chunk-NGBBNL4K.cjs +1 -3
  108. package/dist/chunk-P6WPEUAJ.cjs +2 -0
  109. package/dist/chunk-P6WPEUAJ.cjs.map +1 -0
  110. package/dist/chunk-PS272DZJ.cjs +2 -0
  111. package/dist/chunk-PS272DZJ.cjs.map +1 -0
  112. package/dist/chunk-QXQE7X4S.js +2 -0
  113. package/dist/chunk-QXQE7X4S.js.map +1 -0
  114. package/dist/chunk-R2ENWQ76.js +2 -0
  115. package/dist/chunk-R2ENWQ76.js.map +1 -0
  116. package/dist/chunk-R2SZFJTT.cjs +2 -0
  117. package/dist/chunk-R2SZFJTT.cjs.map +1 -0
  118. package/dist/chunk-RAF57WYO.js +2 -0
  119. package/dist/chunk-RAF57WYO.js.map +1 -0
  120. package/dist/chunk-RSF25YSJ.js +2 -0
  121. package/dist/chunk-RSF25YSJ.js.map +1 -0
  122. package/dist/chunk-SOMGSIO4.cjs +3 -0
  123. package/dist/chunk-SOMGSIO4.cjs.map +1 -0
  124. package/dist/chunk-SUXRZWH2.cjs +3 -0
  125. package/dist/chunk-SUXRZWH2.cjs.map +1 -0
  126. package/dist/chunk-SYYE3QAX.cjs +2 -0
  127. package/dist/chunk-SYYE3QAX.cjs.map +1 -0
  128. package/dist/chunk-SZGK6RIP.cjs +2 -0
  129. package/dist/chunk-SZGK6RIP.cjs.map +1 -0
  130. package/dist/chunk-TCZSPH4A.js +2 -0
  131. package/dist/chunk-TCZSPH4A.js.map +1 -0
  132. package/dist/chunk-TLG7VZRX.cjs +2 -0
  133. package/dist/chunk-TLG7VZRX.cjs.map +1 -0
  134. package/dist/chunk-TRBXW6HW.js +2 -0
  135. package/dist/{chunk-AQNHHJMJ.cjs.map → chunk-TRBXW6HW.js.map} +1 -1
  136. package/dist/chunk-TTFO4YDP.cjs +2 -0
  137. package/dist/chunk-TTFO4YDP.cjs.map +1 -0
  138. package/dist/chunk-TWC7K3ZX.js +2 -0
  139. package/dist/chunk-TWC7K3ZX.js.map +1 -0
  140. package/dist/chunk-UDQ57ZRX.cjs +2 -0
  141. package/dist/chunk-UDQ57ZRX.cjs.map +1 -0
  142. package/dist/chunk-UI6IFGBT.js +2 -0
  143. package/dist/chunk-UI6IFGBT.js.map +1 -0
  144. package/dist/chunk-UURM7P3P.cjs +4 -0
  145. package/dist/chunk-UURM7P3P.cjs.map +1 -0
  146. package/dist/chunk-W2JAR233.js +2 -0
  147. package/dist/chunk-W2JAR233.js.map +1 -0
  148. package/dist/chunk-WGZ3FNHI.js +2 -0
  149. package/dist/chunk-WGZ3FNHI.js.map +1 -0
  150. package/dist/chunk-WN5CMP4T.cjs +3 -0
  151. package/dist/chunk-WN5CMP4T.cjs.map +1 -0
  152. package/dist/chunk-XEIDV5JP.js +2 -0
  153. package/dist/chunk-XEIDV5JP.js.map +1 -0
  154. package/dist/chunk-XNIWQHXY.js +2 -0
  155. package/dist/chunk-XNIWQHXY.js.map +1 -0
  156. package/dist/chunk-XR7HEC7B.js +5 -0
  157. package/dist/chunk-XR7HEC7B.js.map +1 -0
  158. package/dist/chunk-Y7O4D3BJ.cjs +2 -0
  159. package/dist/chunk-Y7O4D3BJ.cjs.map +1 -0
  160. package/dist/chunk-YAYBVVG2.js +3 -0
  161. package/dist/chunk-YAYBVVG2.js.map +1 -0
  162. package/dist/chunk-YJ2OPULK.js +2 -0
  163. package/dist/chunk-YJ2OPULK.js.map +1 -0
  164. package/dist/chunk-YVKHEAFT.js +2 -0
  165. package/dist/chunk-YVKHEAFT.js.map +1 -0
  166. package/dist/chunk-ZCNBT44X.cjs +2 -0
  167. package/dist/chunk-ZCNBT44X.cjs.map +1 -0
  168. package/dist/chunk-ZLRJ7TDP.cjs +2 -0
  169. package/dist/chunk-ZLRJ7TDP.cjs.map +1 -0
  170. package/dist/constants.cjs +1 -21
  171. package/dist/constants.d.cts +1 -1
  172. package/dist/constants.d.ts +1 -1
  173. package/dist/constants.js +1 -4
  174. package/dist/engine.cjs +1 -94
  175. package/dist/engine.d.cts +29 -14
  176. package/dist/engine.d.ts +29 -14
  177. package/dist/engine.js +1 -37
  178. package/dist/errors.cjs +1 -105
  179. package/dist/errors.d.cts +3 -3
  180. package/dist/errors.d.ts +3 -3
  181. package/dist/errors.js +1 -4
  182. package/dist/format.cjs +1 -26
  183. package/dist/format.d.cts +2 -2
  184. package/dist/format.d.ts +2 -2
  185. package/dist/format.js +1 -9
  186. package/dist/index.cjs +1 -314
  187. package/dist/index.cjs.map +1 -1
  188. package/dist/index.d.cts +55 -23
  189. package/dist/index.d.ts +55 -23
  190. package/dist/index.js +1 -278
  191. package/dist/index.js.map +1 -1
  192. package/dist/language.cjs +1 -369
  193. package/dist/language.cjs.map +1 -1
  194. package/dist/language.d.cts +12 -13
  195. package/dist/language.d.ts +12 -13
  196. package/dist/language.js +1 -348
  197. package/dist/language.js.map +1 -1
  198. package/dist/lexer.cjs +1 -63
  199. package/dist/lexer.d.cts +3 -3
  200. package/dist/lexer.d.ts +3 -3
  201. package/dist/lexer.js +1 -10
  202. package/dist/normalizer.cjs +1 -39
  203. package/dist/normalizer.d.cts +3 -3
  204. package/dist/normalizer.d.ts +3 -3
  205. package/dist/normalizer.js +1 -10
  206. package/dist/packages.cjs +1 -128
  207. package/dist/packages.d.cts +39 -14
  208. package/dist/packages.d.ts +39 -14
  209. package/dist/packages.js +1 -23
  210. package/dist/parser.cjs +1 -54
  211. package/dist/parser.d.cts +9 -9
  212. package/dist/parser.d.ts +9 -9
  213. package/dist/parser.js +1 -9
  214. package/dist/{pipeline-CtfJtPQc.d.cts → pipeline-72QmQlGx.d.ts} +3 -3
  215. package/dist/{pipeline-DCd5M6Gk.d.ts → pipeline-DCQicwWX.d.cts} +3 -3
  216. package/dist/resolvers.cjs +1 -12
  217. package/dist/resolvers.d.cts +3 -3
  218. package/dist/resolvers.d.ts +3 -3
  219. package/dist/resolvers.js +1 -3
  220. package/dist/services.cjs +1 -20
  221. package/dist/services.js +1 -3
  222. package/dist/testing.cjs +3 -477
  223. package/dist/testing.cjs.map +1 -1
  224. package/dist/testing.d.cts +12 -13
  225. package/dist/testing.d.ts +12 -13
  226. package/dist/testing.js +3 -469
  227. package/dist/testing.js.map +1 -1
  228. package/dist/uom.cjs +1 -55
  229. package/dist/uom.d.cts +3 -3
  230. package/dist/uom.d.ts +3 -3
  231. package/dist/uom.js +1 -10
  232. package/dist/utilities.cjs +1 -36
  233. package/dist/utilities.js +1 -7
  234. package/dist/vm.cjs +1 -295
  235. package/dist/vm.cjs.map +1 -1
  236. package/dist/vm.d.cts +22 -10
  237. package/dist/vm.d.ts +22 -10
  238. package/dist/vm.js +1 -193
  239. package/dist/vm.js.map +1 -1
  240. package/dist/worker.cjs +2 -492
  241. package/dist/worker.cjs.map +1 -1
  242. package/dist/worker.d.cts +19 -20
  243. package/dist/worker.d.ts +19 -20
  244. package/dist/worker.js +2 -483
  245. package/dist/worker.js.map +1 -1
  246. package/package.json +1 -13
  247. package/dist/chunk-267JPOTF.js +0 -406
  248. package/dist/chunk-267JPOTF.js.map +0 -1
  249. package/dist/chunk-2TZKENDH.cjs +0 -448
  250. package/dist/chunk-2TZKENDH.cjs.map +0 -1
  251. package/dist/chunk-3BOK2LDK.js +0 -17
  252. package/dist/chunk-3BOK2LDK.js.map +0 -1
  253. package/dist/chunk-3OWCDIPN.js +0 -215
  254. package/dist/chunk-3OWCDIPN.js.map +0 -1
  255. package/dist/chunk-3VGDNEE3.js +0 -84
  256. package/dist/chunk-3VGDNEE3.js.map +0 -1
  257. package/dist/chunk-4D6NIHE2.js +0 -451
  258. package/dist/chunk-4D6NIHE2.js.map +0 -1
  259. package/dist/chunk-4HQKTMWG.js +0 -7985
  260. package/dist/chunk-4HQKTMWG.js.map +0 -1
  261. package/dist/chunk-536WPM2V.cjs +0 -283
  262. package/dist/chunk-536WPM2V.cjs.map +0 -1
  263. package/dist/chunk-5HRB36DK.js +0 -405
  264. package/dist/chunk-5HRB36DK.js.map +0 -1
  265. package/dist/chunk-5ON7PUAZ.js +0 -12
  266. package/dist/chunk-5ON7PUAZ.js.map +0 -1
  267. package/dist/chunk-7KYSUDQO.js +0 -109
  268. package/dist/chunk-7KYSUDQO.js.map +0 -1
  269. package/dist/chunk-7ZX6B7SY.cjs +0 -3222
  270. package/dist/chunk-7ZX6B7SY.cjs.map +0 -1
  271. package/dist/chunk-ADBA3XBE.cjs +0 -20
  272. package/dist/chunk-ADBA3XBE.cjs.map +0 -1
  273. package/dist/chunk-ALYRJ72W.cjs +0 -434
  274. package/dist/chunk-ALYRJ72W.cjs.map +0 -1
  275. package/dist/chunk-AMOJYLG2.cjs +0 -1692
  276. package/dist/chunk-AMOJYLG2.cjs.map +0 -1
  277. package/dist/chunk-AQNHHJMJ.cjs +0 -261
  278. package/dist/chunk-B4HBEFTB.cjs +0 -375
  279. package/dist/chunk-B4HBEFTB.cjs.map +0 -1
  280. package/dist/chunk-B7LXJ6LC.cjs +0 -36
  281. package/dist/chunk-B7LXJ6LC.cjs.map +0 -1
  282. package/dist/chunk-B7NLZMQ3.cjs +0 -74
  283. package/dist/chunk-B7NLZMQ3.cjs.map +0 -1
  284. package/dist/chunk-BLI4NIQY.js +0 -98
  285. package/dist/chunk-BLI4NIQY.js.map +0 -1
  286. package/dist/chunk-BYJBUL7U.js +0 -499
  287. package/dist/chunk-BYJBUL7U.js.map +0 -1
  288. package/dist/chunk-CCBZZQAE.js +0 -312
  289. package/dist/chunk-CCBZZQAE.js.map +0 -1
  290. package/dist/chunk-CKQMXMHR.cjs +0 -219
  291. package/dist/chunk-CKQMXMHR.cjs.map +0 -1
  292. package/dist/chunk-CUR2WLI4.cjs +0 -507
  293. package/dist/chunk-CUR2WLI4.cjs.map +0 -1
  294. package/dist/chunk-DLEBSLF4.js +0 -336
  295. package/dist/chunk-DLEBSLF4.js.map +0 -1
  296. package/dist/chunk-E23GZEWL.cjs +0 -209
  297. package/dist/chunk-E23GZEWL.cjs.map +0 -1
  298. package/dist/chunk-EJ3ILXX6.cjs +0 -223
  299. package/dist/chunk-EJ3ILXX6.cjs.map +0 -1
  300. package/dist/chunk-ENKKJYD3.js +0 -333
  301. package/dist/chunk-ENKKJYD3.js.map +0 -1
  302. package/dist/chunk-ENRIK36Q.cjs +0 -94
  303. package/dist/chunk-ENRIK36Q.cjs.map +0 -1
  304. package/dist/chunk-ERCOHGXD.js +0 -356
  305. package/dist/chunk-ERCOHGXD.js.map +0 -1
  306. package/dist/chunk-FD5ZZHEU.js +0 -92
  307. package/dist/chunk-FD5ZZHEU.js.map +0 -1
  308. package/dist/chunk-FEAIOR7N.cjs +0 -91
  309. package/dist/chunk-FEAIOR7N.cjs.map +0 -1
  310. package/dist/chunk-GCM5JHMX.js +0 -88
  311. package/dist/chunk-GCM5JHMX.js.map +0 -1
  312. package/dist/chunk-GLA4JXBO.js +0 -204
  313. package/dist/chunk-GLA4JXBO.js.map +0 -1
  314. package/dist/chunk-HIQ5HSZL.cjs +0 -1923
  315. package/dist/chunk-HIQ5HSZL.cjs.map +0 -1
  316. package/dist/chunk-HVRVSI2Z.cjs +0 -829
  317. package/dist/chunk-HVRVSI2Z.cjs.map +0 -1
  318. package/dist/chunk-I4GAWIPW.js +0 -825
  319. package/dist/chunk-I4GAWIPW.js.map +0 -1
  320. package/dist/chunk-J45BCEZ4.cjs +0 -339
  321. package/dist/chunk-J45BCEZ4.cjs.map +0 -1
  322. package/dist/chunk-JG6ZJ2WU.js +0 -1513
  323. package/dist/chunk-JG6ZJ2WU.js.map +0 -1
  324. package/dist/chunk-L2TE7PMO.cjs +0 -14
  325. package/dist/chunk-L2TE7PMO.cjs.map +0 -1
  326. package/dist/chunk-LHZ6VOA7.js +0 -1764
  327. package/dist/chunk-LHZ6VOA7.js.map +0 -1
  328. package/dist/chunk-MN3LHRGV.cjs +0 -8012
  329. package/dist/chunk-MN3LHRGV.cjs.map +0 -1
  330. package/dist/chunk-MVTOCRV2.js +0 -213
  331. package/dist/chunk-MVTOCRV2.js.map +0 -1
  332. package/dist/chunk-N5NNW4VG.cjs +0 -341
  333. package/dist/chunk-N5NNW4VG.cjs.map +0 -1
  334. package/dist/chunk-N7FNVFXW.cjs +0 -32
  335. package/dist/chunk-N7FNVFXW.cjs.map +0 -1
  336. package/dist/chunk-NKW7LKYU.js +0 -3185
  337. package/dist/chunk-NKW7LKYU.js.map +0 -1
  338. package/dist/chunk-NLNDMWZC.js +0 -31
  339. package/dist/chunk-NLNDMWZC.js.map +0 -1
  340. package/dist/chunk-NNQ2TYDF.js +0 -1848
  341. package/dist/chunk-NNQ2TYDF.js.map +0 -1
  342. package/dist/chunk-NNZAEUDW.js +0 -6792
  343. package/dist/chunk-NNZAEUDW.js.map +0 -1
  344. package/dist/chunk-OUHT5Z36.cjs +0 -393
  345. package/dist/chunk-OUHT5Z36.cjs.map +0 -1
  346. package/dist/chunk-QFTDTX6K.cjs +0 -457
  347. package/dist/chunk-QFTDTX6K.cjs.map +0 -1
  348. package/dist/chunk-SBUFNJVE.js +0 -258
  349. package/dist/chunk-SBUFNJVE.js.map +0 -1
  350. package/dist/chunk-SRGQ72IR.cjs +0 -2800
  351. package/dist/chunk-SRGQ72IR.cjs.map +0 -1
  352. package/dist/chunk-SSV46KFA.cjs +0 -112
  353. package/dist/chunk-SSV46KFA.cjs.map +0 -1
  354. package/dist/chunk-T6ZYQJ63.cjs +0 -6807
  355. package/dist/chunk-T6ZYQJ63.cjs.map +0 -1
  356. package/dist/chunk-UKQHXPGW.js +0 -30
  357. package/dist/chunk-UKQHXPGW.js.map +0 -1
  358. package/dist/chunk-UO6BUV6K.js +0 -278
  359. package/dist/chunk-UO6BUV6K.js.map +0 -1
  360. package/dist/chunk-V4XG5QF6.js +0 -1685
  361. package/dist/chunk-V4XG5QF6.js.map +0 -1
  362. package/dist/chunk-VEKIWQ3F.cjs +0 -39
  363. package/dist/chunk-VEKIWQ3F.cjs.map +0 -1
  364. package/dist/chunk-WWQEY7BV.js +0 -67
  365. package/dist/chunk-WWQEY7BV.js.map +0 -1
  366. package/dist/chunk-WXEHD6TT.js +0 -2795
  367. package/dist/chunk-WXEHD6TT.js.map +0 -1
  368. package/dist/chunk-X6K3HUOY.cjs +0 -86
  369. package/dist/chunk-X6K3HUOY.cjs.map +0 -1
  370. package/dist/chunk-XA4CKRML.cjs +0 -316
  371. package/dist/chunk-XA4CKRML.cjs.map +0 -1
  372. package/dist/chunk-XBTEO4OB.js +0 -391
  373. package/dist/chunk-XBTEO4OB.js.map +0 -1
  374. package/dist/chunk-XIYYHA65.cjs +0 -101
  375. package/dist/chunk-XIYYHA65.cjs.map +0 -1
  376. package/dist/chunk-YLJ4XMA6.js +0 -33
  377. package/dist/chunk-YLJ4XMA6.js.map +0 -1
  378. package/dist/chunk-YRIKITGF.cjs +0 -1768
  379. package/dist/chunk-YRIKITGF.cjs.map +0 -1
  380. package/dist/chunk-Z2XP767T.cjs +0 -35
  381. package/dist/chunk-Z2XP767T.cjs.map +0 -1
  382. package/dist/chunk-Z4X2RWOF.js +0 -37
  383. package/dist/chunk-Z4X2RWOF.js.map +0 -1
  384. package/dist/chunk-Z7XGGLI2.js +0 -455
  385. package/dist/chunk-Z7XGGLI2.js.map +0 -1
  386. package/dist/chunk-ZMW6NU2K.cjs +0 -1516
  387. package/dist/chunk-ZMW6NU2K.cjs.map +0 -1
  388. package/dist/chunk-ZVTWQLK4.cjs +0 -459
  389. package/dist/chunk-ZVTWQLK4.cjs.map +0 -1
  390. package/dist/variables.cjs +0 -17
  391. package/dist/variables.cjs.map +0 -1
  392. package/dist/variables.d.cts +0 -87
  393. package/dist/variables.d.ts +0 -87
  394. package/dist/variables.js +0 -4
  395. package/dist/variables.js.map +0 -1
@@ -1,261 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkAMOJYLG2_cjs = require('./chunk-AMOJYLG2.cjs');
4
-
5
- // src/lexer/units.ts
6
- var EXCLUDED_UNIT_SPELLINGS = /* @__PURE__ */ new Map([
7
- ["in", "the IN keyword owns this word (the conversion operator). ConvertParselet and friends special-case the IN token type directly and trust its text as a unit name, so inches still convert"],
8
- ["dec", "already a converter name, as in `255 as dec`"],
9
- ["M", "the millions magnitude suffix, as in `2.5M`. Nautical miles are still spelled `nmi` and `NM`"],
10
- // Claimed by a normalizer rule rather than by the keyword table, which is why
11
- // scanning the locale keywords alone does not find it. Admitting `pm`
12
- // (picometre) broke every clock time in the suite: `4pm` lexed as 4
13
- // picometres. There is deliberately no entry for `am`: the table's SI
14
- // prefixes stop at femto, so attometres do not exist and an exclusion would
15
- // be dead weight. `UnitVocabularyCollisions.spec.ts` asserts that.
16
- ["pm", "the meridiem marker, as in `4pm`. Picometres lose, and `picometre` still works"],
17
- ["are", "the English verb, against a 100-square-metre unit almost nobody writes"],
18
- ["ares", "the English verb in plural, same reasoning as `are` above"],
19
- ["turn", "ordinary English, against a full-rotation angle unit also spelled in gradians"],
20
- ["turns", "ordinary English in plural, same reasoning as `turn` above"],
21
- ["grade", "ordinary English. The angle unit is also spelled `gon` and `grad`"],
22
- ["grades", "ordinary English in plural, same reasoning as `grade` above"],
23
- ["point", "ordinary English. The typographic point is also reachable as `pica`"],
24
- ["points", "ordinary English in plural, same reasoning as `point` above"],
25
- ["moment", "ordinary English, against an obscure medieval time unit of 90 seconds"],
26
- ["moments", "ordinary English in plural, same reasoning as `moment` above"],
27
- ["shake", "ordinary English, against an obscure physics unit of ten nanoseconds"],
28
- ["shakes", "ordinary English in plural, same reasoning as `shake` above"]
29
- ]);
30
- function isTokenizableSpelling(spelling) {
31
- return /^[A-Za-z0-9_]+$/.test(spelling);
32
- }
33
- var GRANDFATHERED_SINGLE_CHARACTER_UNITS = /* @__PURE__ */ new Set([
34
- "m",
35
- "g",
36
- "t",
37
- "s",
38
- "h",
39
- "d",
40
- "l",
41
- "b",
42
- "B",
43
- "C",
44
- "F",
45
- "K",
46
- "W"
47
- ]);
48
- function isAdmissible(spelling) {
49
- if (!isTokenizableSpelling(spelling)) return false;
50
- if (EXCLUDED_UNIT_SPELLINGS.has(spelling)) return false;
51
- if (spelling.length === 1) return GRANDFATHERED_SINGLE_CHARACTER_UNITS.has(spelling);
52
- return true;
53
- }
54
- var CURRENCY_CODES = [
55
- "USD",
56
- "EUR",
57
- "GBP",
58
- "JPY",
59
- "AUD",
60
- "CAD",
61
- "CHF",
62
- "CNY",
63
- "SEK",
64
- "NOK",
65
- "DKK",
66
- "NZD",
67
- "KRW",
68
- "SGD",
69
- "HKD",
70
- "TWD",
71
- "INR",
72
- "BRL",
73
- "ZAR",
74
- "MXN",
75
- "RUB",
76
- "TRY",
77
- "SAR",
78
- "AED",
79
- "ILS",
80
- "PLN",
81
- "CZK",
82
- "HUF",
83
- "THB",
84
- "IDR",
85
- "MYR",
86
- "PHP",
87
- "CLP",
88
- "COP",
89
- "ARS",
90
- "NGN",
91
- "EGP",
92
- "PKR",
93
- "BDT",
94
- "VND",
95
- "KES",
96
- "XOF",
97
- "XAF",
98
- "MAD",
99
- "QAR",
100
- "KWD",
101
- "OMR",
102
- "BHD",
103
- "JOD",
104
- "LKR",
105
- "MMK",
106
- "UZS",
107
- "KZT",
108
- "RON",
109
- "BGN",
110
- "HRK",
111
- "ISK",
112
- "UAH",
113
- "GEL",
114
- "AZN",
115
- "BTN",
116
- "BND",
117
- "BOB",
118
- "BWP",
119
- "BYN",
120
- "BZD",
121
- "CDF",
122
- "CRC",
123
- "CUP",
124
- "DOP",
125
- "DZD",
126
- "ERN",
127
- "ETB",
128
- "FJD",
129
- "FKP",
130
- "GMD",
131
- "GNF",
132
- "GYD",
133
- "HNL",
134
- "HTG",
135
- "JMD",
136
- "KGZ",
137
- "KHR",
138
- "KMF",
139
- "KYD",
140
- "LAK",
141
- "LBP",
142
- "LRD",
143
- "LSL",
144
- "LYD",
145
- "MDL",
146
- "MGA",
147
- "MKD",
148
- "MNT",
149
- "MOP",
150
- "MRU",
151
- "MUR",
152
- "MVR",
153
- "MWK",
154
- "MZN",
155
- "NAD",
156
- "NIO",
157
- "NPR",
158
- "PGK",
159
- "PYG",
160
- "RSD",
161
- "RWF",
162
- "SBD",
163
- "SCR",
164
- "SDG",
165
- "SHP",
166
- "SLE",
167
- "SOS",
168
- "SRD",
169
- "SSP",
170
- "STN",
171
- "SVC",
172
- "SYP",
173
- "SZL",
174
- "TJS",
175
- "TMT",
176
- "TND",
177
- "TOP",
178
- "TTD",
179
- "TZS",
180
- "UGX",
181
- "UYU",
182
- "VEB",
183
- "VUV",
184
- "WST",
185
- "XCD",
186
- "XDR",
187
- "XPF",
188
- "YER",
189
- "ZMW",
190
- "ZWL",
191
- "BTC",
192
- "ETH",
193
- "SOL",
194
- "XRP",
195
- "ADA",
196
- "DOGE",
197
- "DOT"
198
- ];
199
- var CURRENCY_WORD_FORMS = [
200
- "dollar",
201
- "dollars",
202
- "euro",
203
- "euros",
204
- "yen",
205
- "ruble",
206
- "rubles",
207
- "rouble",
208
- "roubles",
209
- "won",
210
- "rupee",
211
- "rupees",
212
- "yuan",
213
- "renminbi",
214
- "franc",
215
- "francs",
216
- "rand",
217
- "krona",
218
- "kronor",
219
- "krone",
220
- "kroner",
221
- "real",
222
- "reais",
223
- "peso",
224
- "pesos",
225
- "shekel",
226
- "shekels",
227
- "lira",
228
- "hryvnia",
229
- "hryvnias",
230
- "zloty",
231
- "zlotys",
232
- "forint",
233
- "koruna",
234
- "dirham",
235
- "dirhams",
236
- "riyal",
237
- "riyals",
238
- "rial",
239
- "rials",
240
- "ringgit",
241
- "rupiah",
242
- "baht",
243
- "dong",
244
- "naira"
245
- ];
246
- var WORKDAY_UNITS = ["workday", "workdays"];
247
- var knownUnits = /* @__PURE__ */ new Set([
248
- ...Object.keys(chunkAMOJYLG2_cjs.UNIT_TABLE).filter(isAdmissible),
249
- ...Object.keys(chunkAMOJYLG2_cjs.EXTENDED_UNITS),
250
- ...WORKDAY_UNITS,
251
- ...CURRENCY_CODES,
252
- ...CURRENCY_WORD_FORMS
253
- ]);
254
- function isKnownUnit(text) {
255
- return knownUnits.has(text);
256
- }
257
-
258
- exports.isKnownUnit = isKnownUnit;
259
- exports.knownUnits = knownUnits;
260
- //# sourceMappingURL=chunk-AQNHHJMJ.cjs.map
261
- //# sourceMappingURL=chunk-AQNHHJMJ.cjs.map
@@ -1,375 +0,0 @@
1
- 'use strict';
2
-
3
- // src/errors/EngineError.ts
4
- var ErrorCategory = /* @__PURE__ */ ((ErrorCategory2) => {
5
- ErrorCategory2["PARSING"] = "PARSING";
6
- ErrorCategory2["EXECUTION"] = "EXECUTION";
7
- ErrorCategory2["VALIDATION"] = "VALIDATION";
8
- ErrorCategory2["EXTERNAL"] = "EXTERNAL";
9
- ErrorCategory2["INTERNAL"] = "INTERNAL";
10
- ErrorCategory2["CONFIG"] = "CONFIG";
11
- return ErrorCategory2;
12
- })(ErrorCategory || {});
13
- var EngineError = class _EngineError extends Error {
14
- constructor(category, init) {
15
- super(init.message);
16
- this.name = "EngineError";
17
- this.category = category;
18
- this.code = init.code;
19
- this.expected = init.expected;
20
- this.found = init.found;
21
- this.suggestion = init.suggestion;
22
- this.recoverable = init.recoverable ?? true;
23
- this.span = init.span;
24
- this.context = init.context;
25
- this.cause = init.cause;
26
- this.timestamp = /* @__PURE__ */ new Date();
27
- if (Error.captureStackTrace) {
28
- Error.captureStackTrace(this, _EngineError);
29
- }
30
- }
31
- /** `!recoverable`. See `EngineErrorInit.recoverable`'s doc comment for what this actually gates (message framing/telemetry, not whether evaluation continues). */
32
- isFatal() {
33
- return !this.recoverable;
34
- }
35
- /** Walk `.cause` repeatedly, collecting the full chain (this error first). */
36
- causeChain() {
37
- const chain = [this];
38
- let current = this.cause;
39
- while (current !== void 0 && current !== null) {
40
- chain.push(current);
41
- current = current instanceof Error ? current.cause : void 0;
42
- }
43
- return chain;
44
- }
45
- /**
46
- * Rust/Go-style multi-line renderer, the NEW thing a host/CLI/test
47
- * reaches for when it wants the full, verbose picture, as distinct from
48
- * `.message` (kept short and stable for existing assertions). Example:
49
- *
50
- * ```
51
- * error[WEATHER_EXPECTED_CITY]: Expected a city name after "weather in"
52
- * expected: a city name
53
- * found: end of expression
54
- * suggestion: e.g. "weather in London"
55
- * ```
56
- */
57
- format() {
58
- const lines = [`error[${this.code}]: ${this.message}`];
59
- if (this.expected) lines.push(` expected: ${this.expected}`);
60
- if (this.found) lines.push(` found: ${this.found}`);
61
- if (this.suggestion) lines.push(` suggestion: ${this.suggestion}`);
62
- return lines.join("\n");
63
- }
64
- toJSON() {
65
- return {
66
- name: this.name,
67
- category: this.category,
68
- code: this.code,
69
- message: this.message,
70
- expected: this.expected,
71
- found: this.found,
72
- suggestion: this.suggestion,
73
- recoverable: this.recoverable,
74
- span: this.span,
75
- context: this.context,
76
- timestamp: this.timestamp.toISOString()
77
- };
78
- }
79
- };
80
- var ErrorFactory = class _ErrorFactory {
81
- static build(category, defaultRecoverable, codeOrInit, message, context) {
82
- const init = typeof codeOrInit === "string" ? { code: codeOrInit, message, context } : codeOrInit;
83
- return new EngineError(category, { recoverable: defaultRecoverable, ...init });
84
- }
85
- static validation(codeOrInit, message, context) {
86
- return _ErrorFactory.build("VALIDATION" /* VALIDATION */, true, codeOrInit, message, context);
87
- }
88
- static parsing(codeOrInit, message, context) {
89
- return _ErrorFactory.build("PARSING" /* PARSING */, true, codeOrInit, message, context);
90
- }
91
- static execution(codeOrInit, message, context) {
92
- return _ErrorFactory.build("EXECUTION" /* EXECUTION */, true, codeOrInit, message, context);
93
- }
94
- static external(codeOrInit, message, context) {
95
- return _ErrorFactory.build("EXTERNAL" /* EXTERNAL */, true, codeOrInit, message, context);
96
- }
97
- static internal(codeOrInit, message, context) {
98
- return _ErrorFactory.build("INTERNAL" /* INTERNAL */, true, codeOrInit, message, context);
99
- }
100
- static config(codeOrInit, message, context) {
101
- return _ErrorFactory.build("CONFIG" /* CONFIG */, false, codeOrInit, message, context);
102
- }
103
- };
104
- function normalizeUnknownError(error) {
105
- if (error instanceof EngineError) return error;
106
- if (error instanceof Error) {
107
- return ErrorFactory.internal({
108
- code: "UNEXPECTED_ERROR",
109
- message: error.message,
110
- context: { originalErrorName: error.name },
111
- cause: error,
112
- recoverable: true
113
- });
114
- }
115
- return ErrorFactory.internal({
116
- code: "UNKNOWN_ERROR",
117
- message: "An unknown error occurred",
118
- context: { error: String(error) },
119
- recoverable: true
120
- });
121
- }
122
-
123
- // src/errors/Result.ts
124
- function ok(value) {
125
- return { ok: true, value };
126
- }
127
- function err(error) {
128
- return { ok: false, error };
129
- }
130
- function isOk(r) {
131
- return r.ok;
132
- }
133
- function isErr(r) {
134
- return !r.ok;
135
- }
136
- function map(r, fn) {
137
- return r.ok ? ok(fn(r.value)) : r;
138
- }
139
- function mapErr(r, fn) {
140
- return r.ok ? r : err(fn(r.error));
141
- }
142
- function andThen(r, fn) {
143
- return r.ok ? fn(r.value) : r;
144
- }
145
- function unwrapOr(r, fallback) {
146
- return r.ok ? r.value : fallback;
147
- }
148
- function match(r, arms) {
149
- return r.ok ? arms.ok(r.value) : arms.err(r.error);
150
- }
151
- function combine(results) {
152
- const values = [];
153
- for (const r of results) {
154
- if (!r.ok) return r;
155
- values.push(r.value);
156
- }
157
- return ok(values);
158
- }
159
- function throwIfErr(r) {
160
- if (r.ok) return r.value;
161
- throw r.error;
162
- }
163
- function tryCatch(fn, normalize = normalizeUnknownError) {
164
- try {
165
- return ok(fn());
166
- } catch (e) {
167
- return err(normalize(e));
168
- }
169
- }
170
- async function tryCatchAsync(fn, normalize = normalizeUnknownError) {
171
- try {
172
- return ok(await fn());
173
- } catch (e) {
174
- return err(normalize(e));
175
- }
176
- }
177
-
178
- // src/errors/ErrorCode.ts
179
- var CoreErrorCodes = {
180
- // ── Parser (parser/PrecedenceParser.ts, parser/BytecodeBuilder.ts, parser/PhrasePattern.ts) ──
181
- INVALID_NUMBER_LITERAL: "INVALID_NUMBER_LITERAL",
182
- /** A `"` that never meets its closing partner (`lexer/ExpressionLexer.ts`'s `tokenizeString()`). Previously the tokenizer ran off the end of the input and returned what it had, so `"abc` lexed to an ordinary String and an unterminated literal was indistinguishable from a terminated one. */
183
- UNTERMINATED_STRING: "UNTERMINATED_STRING",
184
- NO_PREFIX_PARSELET: "NO_PREFIX_PARSELET",
185
- UNEXPECTED_END_OF_INPUT: "UNEXPECTED_END_OF_INPUT",
186
- UNEXPECTED_TOKEN_TYPE: "UNEXPECTED_TOKEN_TYPE",
187
- NESTING_DEPTH_EXCEEDED: "NESTING_DEPTH_EXCEEDED",
188
- UNEXPECTED_END: "UNEXPECTED_END",
189
- UNEXPECTED_TRAILING_TOKEN: "UNEXPECTED_TRAILING_TOKEN",
190
- PARSE_ERROR: "PARSE_ERROR",
191
- TOO_MANY_NUMERIC_CONSTANTS: "TOO_MANY_NUMERIC_CONSTANTS",
192
- TOO_MANY_STRING_CONSTANTS: "TOO_MANY_STRING_CONSTANTS",
193
- NO_MATCHING_PHRASE_ALTERNATIVE: "NO_MATCHING_PHRASE_ALTERNATIVE",
194
- INVALID_PHRASE_PATTERN: "INVALID_PHRASE_PATTERN",
195
- PHRASE_KEYWORD_MISMATCH: "PHRASE_KEYWORD_MISMATCH",
196
- /** User-defined-function definition parsing (`f(x, y) = ...`), an invalid token where a parameter name was expected. */
197
- USER_FUNCTION_INVALID_PARAM_NAME: "USER_FUNCTION_INVALID_PARAM_NAME",
198
- /** `f() = ...` with zero parameters, indistinguishable from a plain no-arg function call, so rejected at definition time. */
199
- USER_FUNCTION_NO_PARAMS: "USER_FUNCTION_NO_PARAMS",
200
- /** A user-defined function body calling an async plugin (weather/stocks/currency/...), rejected at definition time; v1 scope excludes async function bodies. */
201
- FUNCTION_BODY_MUST_BE_SYNCHRONOUS: "FUNCTION_BODY_MUST_BE_SYNCHRONOUS",
202
- /** `BytecodeBuilder`'s `userFunctionBodies` side-table exceeding its capacity. Same class as `TOO_MANY_NUMERIC_CONSTANTS`/`TOO_MANY_STRING_CONSTANTS` below. */
203
- TOO_MANY_FUNCTION_DEFINITIONS: "TOO_MANY_FUNCTION_DEFINITIONS",
204
- /** `BytecodeBuilder`'s `anonymousBodies` side-table (map/reduce inline transform bodies) exceeding its capacity. Same class as `TOO_MANY_FUNCTION_DEFINITIONS` above. */
205
- TOO_MANY_ANONYMOUS_BODIES: "TOO_MANY_ANONYMOUS_BODIES",
206
- // ── VM (vm/VM.ts, vm/OpRegistry.ts, vm/VMBuiltins.ts) ──
207
- EVALUATION_ERROR: "EVALUATION_ERROR",
208
- INSTRUCTION_LIMIT_EXCEEDED: "INSTRUCTION_LIMIT_EXCEEDED",
209
- STACK_LIMIT_EXCEEDED: "STACK_LIMIT_EXCEEDED",
210
- /** One evaluation asking for more elements (collection Values, matrix cells) than `vm.maxAllocatedElements` allows. The counter the two limits above cannot be: both are checked between opcodes, so neither can see what a single opcode allocates inside a loop of its own. See `vm/AllocationBudget.ts`. Recoverable, since it describes this expression rather than the engine. */
211
- ALLOCATION_LIMIT_EXCEEDED: "ALLOCATION_LIMIT_EXCEEDED",
212
- /** New this phase. See `VM.ts`'s `safePop()`: a stack-underflow (corrupted bytecode, a buggy plugin) is now a controlled EngineError instead of a raw TypeError. Category INTERNAL, since it is an engine or plugin fault rather than a typed line, but recoverable: it happened on one line and the engine is still usable. */
213
- STACK_UNDERFLOW: "STACK_UNDERFLOW",
214
- UNDEFINED_VARIABLE: "UNDEFINED_VARIABLE",
215
- /** New this phase, the Tier-2/`LOAD_GLOBAL_VAR` hardening: a global variable read before its async preflight resolved, surfaced as a controlled error instead of pushing `undefined`. */
216
- GLOBAL_VARIABLE_NOT_RESOLVED: "GLOBAL_VARIABLE_NOT_RESOLVED",
217
- UNKNOWN_FUNCTION: "UNKNOWN_FUNCTION",
218
- /** `unwrapEvalResult()`'s pending-when-expecting-value case, a caller-contract violation, not user-input. */
219
- UNEXPECTED_PENDING_RESULT: "UNEXPECTED_PENDING_RESULT",
220
- /** User-defined-function call/definition errors (`CALL_USER_FUNCTION`/`DEFINE_USER_FUNCTION` opcodes), calling a name with no matching definition, calling with the wrong argument count, and the deliberate v1 restriction that a function body can't itself contain async work. */
221
- UNDEFINED_FUNCTION: "UNDEFINED_FUNCTION",
222
- FUNCTION_ARITY_MISMATCH: "FUNCTION_ARITY_MISMATCH",
223
- /** The same mistake against a BUILT-IN rather than a user-defined function (`sqrt()`, `atan2(1)`, `sqrt(1,2,3)`). Separate from `FUNCTION_ARITY_MISMATCH` above because the two are raised by different opcodes and a host may want to word them differently. Checked at the `CALL_BUILTIN` dispatch against `vm/VMBuiltinArity.ts`; recoverable, since it is a typo in the line, not an engine fault. */
224
- BUILTIN_ARITY_MISMATCH: "BUILTIN_ARITY_MISMATCH",
225
- USER_FUNCTION_ASYNC_UNSUPPORTED: "USER_FUNCTION_ASYNC_UNSUPPORTED",
226
- /** A map/reduce transform body (inline expression or user-defined function) calling an async plugin. Same v1 scope restriction as `USER_FUNCTION_ASYNC_UNSUPPORTED` above, enforced both at parse time (`MAP_REDUCE_TRANSFORM_MUST_BE_SYNCHRONOUS`, packages/mapreduce/) and as a defense-in-depth runtime backstop here. */
227
- MAP_REDUCE_ASYNC_UNSUPPORTED: "MAP_REDUCE_ASYNC_UNSUPPORTED",
228
- /** An algebra verb's expression argument (`BIND_UNKNOWN`'s body) calling an async plugin. Same v1 scope restriction as the two above, and likewise refused at parse time first (`SYMBOLIC_ARGUMENT_MUST_BE_SYNCHRONOUS`, packages/symbolic/). */
229
- SYMBOLIC_ASYNC_UNSUPPORTED: "SYMBOLIC_ASYNC_UNSUPPORTED",
230
- /** `explainLine()` asked to derive a line that resolves data asynchronously (a live-data or async-plugin line). A derivation is a sequence of settled intermediate values, which a pending result has none of, so the line is refused rather than explained with a hole in it. */
231
- EXPLAIN_ASYNC_UNSUPPORTED: "EXPLAIN_ASYNC_UNSUPPORTED",
232
- /** `pushCallFrame()`'s recursion guard, a nested `CALL_USER_FUNCTION` re-enters `executeBytecode()`, so `maxInstructions` alone can't catch e.g. `f(x) = f(x)`; this is the dedicated backstop. `recoverable: true` (the default for `.execution()`), ordinary user-written infinite recursion, not an engine bug; the guard exists precisely so it surfaces as a clear error instead of overflowing the native call stack uncatchably. */
233
- FUNCTION_RECURSION_LIMIT_EXCEEDED: "FUNCTION_RECURSION_LIMIT_EXCEEDED",
234
- /** The companion to the code above, and the half it could never see: how MANY user-defined-function calls one evaluation makes, rather than how deeply they nest. A twenty-two-line doubling chain nests twenty-two deep (legal) and makes two million calls (a fatal heap abort). Counted in `vm/AllocationBudget.ts`, because the tally has to survive `executeBytecode()` re-entering itself. Recoverable. */
235
- FUNCTION_CALL_LIMIT_EXCEEDED: "FUNCTION_CALL_LIMIT_EXCEEDED",
236
- /** A `<date> + N workdays` offset outside `date.maxOffsetYears`/`minOffsetYears`. Workdays are the one date offset that walks the calendar a day at a time, so the one whose cost is the offset; every other one moves a Date field once. Recoverable. */
237
- DATE_OFFSET_LIMIT_EXCEEDED: "DATE_OFFSET_LIMIT_EXCEEDED",
238
- /** The anchor of `N working days after/before/from <expr>` was not a date (e.g. `5 working days after 3`). The grammar guarantees the count is a number, so this only fires on the anchor. Emitted as a recoverable Error value, not thrown, matching the datetime package's other type guards. See `vm/VM.ts`'s `DATE_WORKDAY_OFFSET` case. */
239
- WORKDAY_OFFSET_EXPECTED_DATE: "WORKDAY_OFFSET_EXPECTED_DATE",
240
- /** An endpoint of `working days between <expr> and <expr>` was not a date. Recoverable Error value. See `vm/VM.ts`'s `DATE_WORKDAYS_BETWEEN` case. */
241
- WORKDAYS_BETWEEN_EXPECTED_DATES: "WORKDAYS_BETWEEN_EXPECTED_DATES",
242
- /** The two endpoints of `working days between <expr> and <expr>` are further apart than `date.maxOffsetYears`/`minOffsetYears` allow the count's calendar walk to run. Recoverable Error value, the between-count's equivalent of `DATE_OFFSET_LIMIT_EXCEEDED`. See `vm/VM.ts`'s `DATE_WORKDAYS_BETWEEN` case. */
243
- WORKDAYS_BETWEEN_RANGE_TOO_LARGE: "WORKDAYS_BETWEEN_RANGE_TOO_LARGE",
244
- /** A `<<`/`>>` with a bigint operand whose exact result would pass `MAX_EXACT_SHIFT_BITS`, whichever operand is the bigint. Both spellings refuse as of 1.0.0: a bigint on the left used to fall through to `x * 2^n` in doubles and report a 19,870-digit integer as Infinity. See `vm/VM.ts`'s `bigIntShift()`. Recoverable. */
245
- BIGINT_SHIFT_LIMIT_EXCEEDED: "BIGINT_SHIFT_LIMIT_EXCEEDED",
246
- /** The same ceiling for `^`, the operator it was written for: `2n ^ 100000` asks for the same 100,001-bit integer `1n << 100000` does, so the two spellings answer the same way. Also new in 1.0.0, and for the same reason: this used to fall through to the double path and answer Infinity. A fractional or negative exponent (`4n ^ 0.5`, `2n ^ -1`) has no exact answer to bound and still uses the double path. See `vm/VM.ts`'s `MAX_EXACT_POW_BITS`. Recoverable. */
247
- BIGINT_POW_LIMIT_EXCEEDED: "BIGINT_POW_LIMIT_EXCEEDED",
248
- /** An operand with no whole-number form (a fraction, an infinity, a NaN) meeting a bigint: `1n + 0.5`, `1n & 1.5`, `5n/pi`. `BigInt()` answers those with a raw RangeError, which the VM relabelled UNEXPECTED_ERROR, so a typo in the line was reported as an engine fault. Recoverable; see `vm/VMConversion.ts`'s `toBigIntOperand()`. */
249
- BIGINT_INEXACT_OPERAND: "BIGINT_INEXACT_OPERAND",
250
- /** `10n / 0n` and `10n mod 0n`. Deliberately NOT what `1 / 0` does, which is Infinity: a bigint division is exact integer division (`7n / 2n` is 3n), and integer division by zero has no answer, exactly as it has none in C, Java, Python or JavaScript's own BigInt. Previously V8's own RangeError, relabelled UNEXPECTED_ERROR. Recoverable; see `vm/VMConversion.ts`'s `bigIntDivisionByZero()`. */
251
- BIGINT_DIVISION_BY_ZERO: "BIGINT_DIVISION_BY_ZERO",
252
- /** `DEFINE_USER_FUNCTION`'s body-index lookup failing, a compiler/VM invariant violation (the opcode stream referenced a `userFunctionBodies` slot that doesn't exist), never a user-input error. */
253
- INTERNAL_MISSING_FUNCTION_BODY: "INTERNAL_MISSING_FUNCTION_BODY",
254
- /** `MAP_INVOKE`/`REDUCE_INVOKE`'s anonymous-body-index lookup failing. Same class as `INTERNAL_MISSING_FUNCTION_BODY` above, for the `anonymousBodies` side-table instead of `userFunctionBodies`. */
255
- INTERNAL_MISSING_ANONYMOUS_BODY: "INTERNAL_MISSING_ANONYMOUS_BODY",
256
- // ── Malformed bytecode on the public `./vm` surface (vm/VM.ts) ──
257
- //
258
- // `executeBytecode` is exported, so a bytecode program is caller input in
259
- // the same sense an expression string is, and these five say so. They are
260
- // VALIDATION rather than INTERNAL for exactly that reason: before they
261
- // existed, every one of these cases reached a raw TypeError (`BigInt(undefined)`,
262
- // `code.toUpperCase()` on a boolean, destructuring a program that was not
263
- // there), which normalised to UNEXPECTED_ERROR and told the caller the
264
- // engine was broken when their eleven bytes were. Reachable from ordinary
265
- // source only through a compiler bug, which is why the messages name the
266
- // opcode and the operand rather than the user's line.
267
- /** An operand byte read past the end of the stream: the program ends in the middle of an instruction. */
268
- MALFORMED_BYTECODE_TRUNCATED: "MALFORMED_BYTECODE_TRUNCATED",
269
- /** A constant-pool operand indexing a `numbers`/`strings` entry that does not exist, or that is not of the pool's type. */
270
- MALFORMED_BYTECODE_CONSTANT_INDEX: "MALFORMED_BYTECODE_CONSTANT_INDEX",
271
- /** A unit or converter name read off the value stack that is not a string. Distinct from the pool case above: the operand is a Value another opcode pushed, not a pool entry. */
272
- MALFORMED_BYTECODE_OPERAND_TYPE: "MALFORMED_BYTECODE_OPERAND_TYPE",
273
- /** `MAP_INVOKE`/`REDUCE_INVOKE` carrying a body kind other than 0/1/2. Used to fall through every arm with no body and recurse into `executeBytecode(undefined)`. */
274
- MALFORMED_BYTECODE_BODY_KIND: "MALFORMED_BYTECODE_BODY_KIND",
275
- /** A `PUSH_BIGINT` pool entry that is not a whole number, e.g. `"1.000"`. `BigInt()` answers that with a raw SyntaxError. */
276
- MALFORMED_BYTECODE_BIGINT_LITERAL: "MALFORMED_BYTECODE_BIGINT_LITERAL",
277
- /** `executeBytecode()` called with something that is not a runnable program at all. Checked before the destructure that used to throw outside the function's own try/catch. */
278
- MALFORMED_BYTECODE_PROGRAM: "MALFORMED_BYTECODE_PROGRAM",
279
- // ── Symbolic algebra (symbolic/, vm/SymbolicOps.ts) ──
280
- /** A coefficient grew past `RATIONAL_MAX_BITS`, e.g. repeated exact elimination multiplying denominators together. */
281
- SYMBOLIC_RATIONAL_OVERFLOW: "SYMBOLIC_RATIONAL_OVERFLOW",
282
- /** `NaN` or `±Infinity` reaching a symbolic expression, neither of which has an exact rational value. */
283
- SYMBOLIC_NONFINITE_OPERAND: "SYMBOLIC_NONFINITE_OPERAND",
284
- /** Division by an exactly-zero rational. Exact, unlike the double comparison it replaced, which could not distinguish a true zero from `5.551e-17`. */
285
- SYMBOLIC_DIVISION_BY_ZERO: "SYMBOLIC_DIVISION_BY_ZERO",
286
- /** A tree exceeding `SYMBOLIC_MAX_NODES` entering the simplifier. */
287
- SYMBOLIC_NODE_LIMIT_EXCEEDED: "SYMBOLIC_NODE_LIMIT_EXCEEDED",
288
- /** A builtin with no symbolic reading (`min`, `random`, the finance block, ...) applied to an expression still containing an unknown. Returned rather than computing against `toNumber()`'s placeholder zero. */
289
- SYMBOLIC_UNSUPPORTED_FUNCTION: "SYMBOLIC_UNSUPPORTED_FUNCTION",
290
- /** The rational-root search exceeding `FACTOR_MAX_ROOT_CANDIDATES`. The candidate set is the product of two divisor sets, so a highly-composite coefficient escapes quickly. */
291
- SYMBOLIC_FACTOR_LIMIT_EXCEEDED: "SYMBOLIC_FACTOR_LIMIT_EXCEEDED",
292
- /** An equation outside what the solver attempts: not a polynomial, above the degree ceiling, or non-linear in the unknown while another unknown is present. */
293
- SYMBOLIC_SOLVE_UNSUPPORTED: "SYMBOLIC_SOLVE_UNSUPPORTED",
294
- /** Some but not all of an equation's roots were found. Reported rather than returned, because a partial list of roots looks exactly like a complete one. */
295
- SYMBOLIC_SOLVE_INCOMPLETE: "SYMBOLIC_SOLVE_INCOMPLETE",
296
- /** `solve`'s second argument not being a bare name. */
297
- SOLVE_REQUIRES_VARIABLE_NAME: "SOLVE_REQUIRES_VARIABLE_NAME",
298
- /** A derivative order outside 0..`DERIVATIVE_MAX_ORDER`. */
299
- SYMBOLIC_DERIVATIVE_ORDER_LIMIT: "SYMBOLIC_DERIVATIVE_ORDER_LIMIT",
300
- /** An expression with no known elementary antiderivative. Reported rather than approximated, since a wrong integral is indistinguishable from a right one at the point of use. */
301
- SYMBOLIC_INTEGRAL_UNSUPPORTED: "SYMBOLIC_INTEGRAL_UNSUPPORTED",
302
- /** A Taylor degree outside 0..`TAYLOR_MAX_DEGREE`. */
303
- SYMBOLIC_TAYLOR_DEGREE_LIMIT: "SYMBOLIC_TAYLOR_DEGREE_LIMIT",
304
- /** A Taylor coefficient that does not reduce to an exact number at the expansion point. */
305
- SYMBOLIC_TAYLOR_INEXACT: "SYMBOLIC_TAYLOR_INEXACT",
306
- /** An algebra verb's variable-name argument not being a bare name. */
307
- SYMBOLIC_REQUIRES_VARIABLE_NAME: "SYMBOLIC_REQUIRES_VARIABLE_NAME",
308
- /** `jacobian` called with expressions containing no unknown to differentiate against. */
309
- SYMBOLIC_JACOBIAN_NO_VARIABLES: "SYMBOLIC_JACOBIAN_NO_VARIABLES",
310
- /** A finite number whose decimal form could not be read back, which the regex covering every `Number.prototype.toString` output should make unreachable. */
311
- INTERNAL_RATIONAL_PARSE: "INTERNAL_RATIONAL_PARSE",
312
- // ── Engine (engine/ExpressionEngine.ts, engine/ExpressionEngineSafety.ts, engine/AsyncResolutionBatcher.ts) ──
313
- EXPRESSION_TOO_LONG: "EXPRESSION_TOO_LONG",
314
- EXPRESSION_TOO_COMPLEX: "EXPRESSION_TOO_COMPLEX",
315
- /** A document with more lines than `performance.maxDocumentLines`. The per-line limits above bound what one line may ask for and say nothing about how many lines there are; two hundred thousand of `1 + 1` exhausted the heap on the line records alone. Recoverable. */
316
- DOCUMENT_TOO_LARGE: "DOCUMENT_TOO_LARGE",
317
- NORMALIZED_TOKEN_LIMIT_EXCEEDED: "NORMALIZED_TOKEN_LIMIT_EXCEEDED",
318
- /** `"=>"` with nothing before it, needs an expression or variable name to solve/simplify. */
319
- THEREFORE_REQUIRES_EXPRESSION: "THEREFORE_REQUIRES_EXPRESSION",
320
- /** A `"=>"`-triggered expression called an async plugin (weather/stocks/currency). Same v1 scope restriction as user-function/map-reduce bodies. */
321
- THEREFORE_ASYNC_UNSUPPORTED: "THEREFORE_ASYNC_UNSUPPORTED",
322
- /** Colon-separated numbers that are not a time any clock can show ("24:00", "9:60", "100:5"). Raised by the labeled-line fallback, which used to answer them with whatever stood after the colon. */
323
- INVALID_TIME_LITERAL: "INVALID_TIME_LITERAL",
324
- // ── Snapshot / restore (engine/EngineSnapshot.ts, engine/ExpressionEngine.ts) ──
325
- /** `fromJSON()` handed an object that is not a snapshot at all, or whose serialised-shape version does not match this engine's reader. The versioning gate that refuses an incompatible snapshot clearly rather than restoring it wrongly. See `engine/EngineSnapshot.ts`'s `assertRestorable()`. */
326
- SNAPSHOT_VERSION_MISMATCH: "SNAPSHOT_VERSION_MISMATCH",
327
- /** A snapshot with the right envelope but internally inconsistent contents (an unrecognised number sentinel, an unknown value tag). Distinct from a version mismatch: the format is right, the payload is not. */
328
- SNAPSHOT_MALFORMED: "SNAPSHOT_MALFORMED",
329
- /** A value the v1 snapshot format cannot yet represent (a symbolic/algebra value, a symbolic matrix cell). Deferred to a follow-up; refused by name rather than dropped silently. */
330
- SNAPSHOT_UNSUPPORTED_VALUE: "SNAPSHOT_UNSUPPORTED_VALUE",
331
- // ── Config (constants/Configuration.ts) ──
332
- CONFIG_PATH_NOT_FOUND: "CONFIG_PATH_NOT_FOUND",
333
- INVALID_CONFIG_PATH: "INVALID_CONFIG_PATH",
334
- CONFIG_SECTION_NOT_FOUND: "CONFIG_SECTION_NOT_FOUND",
335
- CONFIG_PROPERTY_NOT_FOUND: "CONFIG_PROPERTY_NOT_FOUND",
336
- // ── Package/lexer registration-time collisions (lexer/ExpressionLexer.ts) ──
337
- PLUGIN_OPERATOR_COLLISION: "PLUGIN_OPERATOR_COLLISION",
338
- PLUGIN_KEYWORD_COLLISION: "PLUGIN_KEYWORD_COLLISION",
339
- PLUGIN_UNIT_COLLISION: "PLUGIN_UNIT_COLLISION",
340
- /** A package's declared `IEnginePackage.engineVersion` semver range doesn't satisfy the running engine's ENGINE_VERSION. See api/EngineVersionCompatibility.ts. */
341
- PACKAGE_ENGINE_VERSION_MISMATCH: "PACKAGE_ENGINE_VERSION_MISMATCH",
342
- /** A package's declared `IEnginePackage.engineVersion` isn't a parseable semver range at all (a typo in the package's own descriptor). */
343
- PACKAGE_ENGINE_VERSION_INVALID_RANGE: "PACKAGE_ENGINE_VERSION_INVALID_RANGE",
344
- /** `OpRegistry.allocateOpcode()`'s dynamic opcode pool (started at 201) exhausted, too many packages calling it. */
345
- OPCODE_POOL_EXHAUSTED: "OPCODE_POOL_EXHAUSTED",
346
- /** `VMBuiltins.allocatePluginFunctionIndex()`'s 0-255 index pool (a single opcode-stream byte) exhausted. */
347
- PLUGIN_FUNCTION_INDEX_POOL_EXHAUSTED: "PLUGIN_FUNCTION_INDEX_POOL_EXHAUSTED",
348
- // ── vm/Value.ts caller-contract violations (check isRateUnit()/isTimecodeUnit() first) ──
349
- INVALID_RATE_UNIT: "INVALID_RATE_UNIT",
350
- INVALID_TIMECODE_UNIT: "INVALID_TIMECODE_UNIT",
351
- // ── errors/EngineError.ts's own fallback normalization ──
352
- UNEXPECTED_ERROR: "UNEXPECTED_ERROR",
353
- UNKNOWN_ERROR: "UNKNOWN_ERROR"
354
- };
355
-
356
- exports.CoreErrorCodes = CoreErrorCodes;
357
- exports.EngineError = EngineError;
358
- exports.ErrorCategory = ErrorCategory;
359
- exports.ErrorFactory = ErrorFactory;
360
- exports.andThen = andThen;
361
- exports.combine = combine;
362
- exports.err = err;
363
- exports.isErr = isErr;
364
- exports.isOk = isOk;
365
- exports.map = map;
366
- exports.mapErr = mapErr;
367
- exports.match = match;
368
- exports.normalizeUnknownError = normalizeUnknownError;
369
- exports.ok = ok;
370
- exports.throwIfErr = throwIfErr;
371
- exports.tryCatch = tryCatch;
372
- exports.tryCatchAsync = tryCatchAsync;
373
- exports.unwrapOr = unwrapOr;
374
- //# sourceMappingURL=chunk-B4HBEFTB.cjs.map
375
- //# sourceMappingURL=chunk-B4HBEFTB.cjs.map