@kerebron/legacy-compat 0.7.5 → 0.7.7

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 (435) hide show
  1. package/dist/kerebron-light.css +1 -1
  2. package/dist/kerebron.cjs +196 -1
  3. package/dist/kerebron.css +1 -1
  4. package/dist/kerebron.js +35005 -5
  5. package/dist/kerebron3.cjs.map +1 -1
  6. package/dist/kerebron3.js.map +1 -1
  7. package/package.json +1 -1
  8. package/dist/__vite-browser-external-DEj2HSsT.cjs +0 -235
  9. package/dist/__vite-browser-external-DEj2HSsT.cjs.map +0 -1
  10. package/dist/__vite-browser-external-ZW37Brf4.js +0 -56473
  11. package/dist/__vite-browser-external-ZW37Brf4.js.map +0 -1
  12. package/dist/apl-B2DGVGxc.js +0 -77
  13. package/dist/apl-B2DGVGxc.js.map +0 -1
  14. package/dist/apl-M-DNMvvR.cjs +0 -2
  15. package/dist/apl-M-DNMvvR.cjs.map +0 -1
  16. package/dist/asciiarmor-2LVJmxlE.js +0 -35
  17. package/dist/asciiarmor-2LVJmxlE.js.map +0 -1
  18. package/dist/asciiarmor-BMx3XVjX.cjs +0 -2
  19. package/dist/asciiarmor-BMx3XVjX.cjs.map +0 -1
  20. package/dist/asn1-OOsVM4yU.cjs +0 -2
  21. package/dist/asn1-OOsVM4yU.cjs.map +0 -1
  22. package/dist/asn1-jKiBa2Ya.js +0 -96
  23. package/dist/asn1-jKiBa2Ya.js.map +0 -1
  24. package/dist/asterisk-B1QUaW1C.cjs +0 -2
  25. package/dist/asterisk-B1QUaW1C.cjs.map +0 -1
  26. package/dist/asterisk-DS281yxp.js +0 -272
  27. package/dist/asterisk-DS281yxp.js.map +0 -1
  28. package/dist/brainfuck-BjUlYKdF.cjs +0 -2
  29. package/dist/brainfuck-BjUlYKdF.cjs.map +0 -1
  30. package/dist/brainfuck-C_p9pTT8.js +0 -35
  31. package/dist/brainfuck-C_p9pTT8.js.map +0 -1
  32. package/dist/clike-DE3V9X8-.js +0 -616
  33. package/dist/clike-DE3V9X8-.js.map +0 -1
  34. package/dist/clike-DLHgOXgk.cjs +0 -2
  35. package/dist/clike-DLHgOXgk.cjs.map +0 -1
  36. package/dist/clojure-Ap_IXD2I.cjs +0 -2
  37. package/dist/clojure-Ap_IXD2I.cjs.map +0 -1
  38. package/dist/clojure-CCKyeQKf.js +0 -801
  39. package/dist/clojure-CCKyeQKf.js.map +0 -1
  40. package/dist/cmake-C4D5_VmS.cjs +0 -2
  41. package/dist/cmake-C4D5_VmS.cjs.map +0 -1
  42. package/dist/cmake-CuaCgAKt.js +0 -29
  43. package/dist/cmake-CuaCgAKt.js.map +0 -1
  44. package/dist/cobol-BlTKFDRj.js +0 -73
  45. package/dist/cobol-BlTKFDRj.js.map +0 -1
  46. package/dist/cobol-Du-cT2hr.cjs +0 -2
  47. package/dist/cobol-Du-cT2hr.cjs.map +0 -1
  48. package/dist/coffeescript-BVCvwO8I.js +0 -180
  49. package/dist/coffeescript-BVCvwO8I.js.map +0 -1
  50. package/dist/coffeescript-DDFAj2ea.cjs +0 -2
  51. package/dist/coffeescript-DDFAj2ea.cjs.map +0 -1
  52. package/dist/commonlisp-CXBBRCTx.cjs +0 -2
  53. package/dist/commonlisp-CXBBRCTx.cjs.map +0 -1
  54. package/dist/commonlisp-D_kxz07b.js +0 -76
  55. package/dist/commonlisp-D_kxz07b.js.map +0 -1
  56. package/dist/crystal-D309uH6_.js +0 -218
  57. package/dist/crystal-D309uH6_.js.map +0 -1
  58. package/dist/crystal-DAFWRDbh.cjs +0 -2
  59. package/dist/crystal-DAFWRDbh.cjs.map +0 -1
  60. package/dist/cypher-BMq4Fwjl.js +0 -69
  61. package/dist/cypher-BMq4Fwjl.js.map +0 -1
  62. package/dist/cypher-BN0-oCze.cjs +0 -2
  63. package/dist/cypher-BN0-oCze.cjs.map +0 -1
  64. package/dist/d-BHsqGcfm.cjs +0 -2
  65. package/dist/d-BHsqGcfm.cjs.map +0 -1
  66. package/dist/d-BZcgY6La.js +0 -128
  67. package/dist/d-BZcgY6La.js.map +0 -1
  68. package/dist/diff-CemTHKfk.cjs +0 -2
  69. package/dist/diff-CemTHKfk.cjs.map +0 -1
  70. package/dist/diff-Cg9d_RX2.js +0 -19
  71. package/dist/diff-Cg9d_RX2.js.map +0 -1
  72. package/dist/dockerfile-BBTH3voH.cjs +0 -2
  73. package/dist/dockerfile-BBTH3voH.cjs.map +0 -1
  74. package/dist/dockerfile-DIy8NleC.js +0 -195
  75. package/dist/dockerfile-DIy8NleC.js.map +0 -1
  76. package/dist/dtd-ChoVQPwv.cjs +0 -2
  77. package/dist/dtd-ChoVQPwv.cjs.map +0 -1
  78. package/dist/dtd-CtLokQ-U.js +0 -85
  79. package/dist/dtd-CtLokQ-U.js.map +0 -1
  80. package/dist/dylan-QYeExnWK.js +0 -235
  81. package/dist/dylan-QYeExnWK.js.map +0 -1
  82. package/dist/dylan-apTQIgUA.cjs +0 -2
  83. package/dist/dylan-apTQIgUA.cjs.map +0 -1
  84. package/dist/ebnf-DUPDuY4r.js +0 -79
  85. package/dist/ebnf-DUPDuY4r.js.map +0 -1
  86. package/dist/ebnf-LYmLy17h.cjs +0 -2
  87. package/dist/ebnf-LYmLy17h.cjs.map +0 -1
  88. package/dist/ecl-C7WNQq7-.cjs +0 -2
  89. package/dist/ecl-C7WNQq7-.cjs.map +0 -1
  90. package/dist/ecl-CiXN-g_D.js +0 -122
  91. package/dist/ecl-CiXN-g_D.js.map +0 -1
  92. package/dist/eiffel-BJThA8RG.cjs +0 -2
  93. package/dist/eiffel-BJThA8RG.cjs.map +0 -1
  94. package/dist/eiffel-yQhjl4T1.js +0 -111
  95. package/dist/eiffel-yQhjl4T1.js.map +0 -1
  96. package/dist/elm-CNT9vbN0.js +0 -109
  97. package/dist/elm-CNT9vbN0.js.map +0 -1
  98. package/dist/elm-CcXP9T36.cjs +0 -2
  99. package/dist/elm-CcXP9T36.cjs.map +0 -1
  100. package/dist/erlang-B6mpcObI.cjs +0 -2
  101. package/dist/erlang-B6mpcObI.cjs.map +0 -1
  102. package/dist/erlang-CFOYdy9e.js +0 -488
  103. package/dist/erlang-CFOYdy9e.js.map +0 -1
  104. package/dist/factor-B-tsx9yW.cjs +0 -2
  105. package/dist/factor-B-tsx9yW.cjs.map +0 -1
  106. package/dist/factor-DDOC7X6P.js +0 -66
  107. package/dist/factor-DDOC7X6P.js.map +0 -1
  108. package/dist/fcl-BzAKklXo.cjs +0 -2
  109. package/dist/fcl-BzAKklXo.cjs.map +0 -1
  110. package/dist/fcl-CPC2WYrI.js +0 -104
  111. package/dist/fcl-CPC2WYrI.js.map +0 -1
  112. package/dist/forth-BmxRyE9S.js +0 -61
  113. package/dist/forth-BmxRyE9S.js.map +0 -1
  114. package/dist/forth-CPAzyZ_n.cjs +0 -2
  115. package/dist/forth-CPAzyZ_n.cjs.map +0 -1
  116. package/dist/fortran-9bvPyrOW.js +0 -443
  117. package/dist/fortran-9bvPyrOW.js.map +0 -1
  118. package/dist/fortran-DHiTlGV1.cjs +0 -2
  119. package/dist/fortran-DHiTlGV1.cjs.map +0 -1
  120. package/dist/gas-BiPtGF2E.cjs +0 -2
  121. package/dist/gas-BiPtGF2E.cjs.map +0 -1
  122. package/dist/gas-cpmYfFX2.js +0 -184
  123. package/dist/gas-cpmYfFX2.js.map +0 -1
  124. package/dist/gherkin-CJuwpceU.js +0 -35
  125. package/dist/gherkin-CJuwpceU.js.map +0 -1
  126. package/dist/gherkin-Djo7Y51D.cjs +0 -2
  127. package/dist/gherkin-Djo7Y51D.cjs.map +0 -1
  128. package/dist/go-BHVhI2MG.js +0 -156
  129. package/dist/go-BHVhI2MG.js.map +0 -1
  130. package/dist/go-BgtlNyKc.cjs +0 -2
  131. package/dist/go-BgtlNyKc.cjs.map +0 -1
  132. package/dist/groovy-BMVITiCm.cjs +0 -2
  133. package/dist/groovy-BMVITiCm.cjs.map +0 -1
  134. package/dist/groovy-DZeT_VM-.js +0 -147
  135. package/dist/groovy-DZeT_VM-.js.map +0 -1
  136. package/dist/haskell-C46lNFBv.cjs +0 -2
  137. package/dist/haskell-C46lNFBv.cjs.map +0 -1
  138. package/dist/haskell-CxiO_7JL.js +0 -376
  139. package/dist/haskell-CxiO_7JL.js.map +0 -1
  140. package/dist/haxe-BhV0x0nk.js +0 -337
  141. package/dist/haxe-BhV0x0nk.js.map +0 -1
  142. package/dist/haxe-G9XvbXZx.cjs +0 -2
  143. package/dist/haxe-G9XvbXZx.cjs.map +0 -1
  144. package/dist/http-BkLifcnL.cjs +0 -2
  145. package/dist/http-BkLifcnL.cjs.map +0 -1
  146. package/dist/http-D9LttvKF.js +0 -45
  147. package/dist/http-D9LttvKF.js.map +0 -1
  148. package/dist/idl-B6TRFYjl.js +0 -948
  149. package/dist/idl-B6TRFYjl.js.map +0 -1
  150. package/dist/idl-FmHDmsE-.cjs +0 -2
  151. package/dist/idl-FmHDmsE-.cjs.map +0 -1
  152. package/dist/index-1FwPug-t.js +0 -961
  153. package/dist/index-1FwPug-t.js.map +0 -1
  154. package/dist/index-B6dEzV2b.cjs +0 -2
  155. package/dist/index-B6dEzV2b.cjs.map +0 -1
  156. package/dist/index-B7gU7Fh_.js +0 -613
  157. package/dist/index-B7gU7Fh_.js.map +0 -1
  158. package/dist/index-B8srnV19.js +0 -1306
  159. package/dist/index-B8srnV19.js.map +0 -1
  160. package/dist/index-BBMh0BvB.js +0 -63
  161. package/dist/index-BBMh0BvB.js.map +0 -1
  162. package/dist/index-BQ530BQl.cjs +0 -2
  163. package/dist/index-BQ530BQl.cjs.map +0 -1
  164. package/dist/index-BUEvxYg1.cjs +0 -4
  165. package/dist/index-BUEvxYg1.cjs.map +0 -1
  166. package/dist/index-BZ5P3Kv0.cjs +0 -7
  167. package/dist/index-BZ5P3Kv0.cjs.map +0 -1
  168. package/dist/index-BvLgnTK0.cjs +0 -2
  169. package/dist/index-BvLgnTK0.cjs.map +0 -1
  170. package/dist/index-Byc1bIE2.js +0 -310
  171. package/dist/index-Byc1bIE2.js.map +0 -1
  172. package/dist/index-BzuM7CSO.js +0 -77
  173. package/dist/index-BzuM7CSO.js.map +0 -1
  174. package/dist/index-CQpRl1to.js +0 -303
  175. package/dist/index-CQpRl1to.js.map +0 -1
  176. package/dist/index-CYSjCryY.cjs +0 -2
  177. package/dist/index-CYSjCryY.cjs.map +0 -1
  178. package/dist/index-Cb9pkCYO.js +0 -158
  179. package/dist/index-Cb9pkCYO.js.map +0 -1
  180. package/dist/index-CcIqnmcV.js +0 -60
  181. package/dist/index-CcIqnmcV.js.map +0 -1
  182. package/dist/index-CdGHKsNJ.cjs +0 -2
  183. package/dist/index-CdGHKsNJ.cjs.map +0 -1
  184. package/dist/index-CsNjufUm.cjs +0 -3
  185. package/dist/index-CsNjufUm.cjs.map +0 -1
  186. package/dist/index-D0nsdJs5.js +0 -95
  187. package/dist/index-D0nsdJs5.js.map +0 -1
  188. package/dist/index-D203InKa.cjs +0 -2
  189. package/dist/index-D203InKa.cjs.map +0 -1
  190. package/dist/index-DBCbd-3W.cjs +0 -2
  191. package/dist/index-DBCbd-3W.cjs.map +0 -1
  192. package/dist/index-DPNQvgDc.cjs +0 -14
  193. package/dist/index-DPNQvgDc.cjs.map +0 -1
  194. package/dist/index-D__6kAHa.js +0 -1918
  195. package/dist/index-D__6kAHa.js.map +0 -1
  196. package/dist/index-DjzVrRux.cjs +0 -2
  197. package/dist/index-DjzVrRux.cjs.map +0 -1
  198. package/dist/index-DkicjISi.cjs +0 -2
  199. package/dist/index-DkicjISi.cjs.map +0 -1
  200. package/dist/index-DvZkiV6W.cjs +0 -2
  201. package/dist/index-DvZkiV6W.cjs.map +0 -1
  202. package/dist/index-E9rwTPVg.cjs +0 -2
  203. package/dist/index-E9rwTPVg.cjs.map +0 -1
  204. package/dist/index-Hy59UYbT.js +0 -566
  205. package/dist/index-Hy59UYbT.js.map +0 -1
  206. package/dist/index-MOkOI4Tj.js +0 -554
  207. package/dist/index-MOkOI4Tj.js.map +0 -1
  208. package/dist/index-qEqiXfAO.js +0 -946
  209. package/dist/index-qEqiXfAO.js.map +0 -1
  210. package/dist/index-yxAWy9bG.js +0 -139
  211. package/dist/index-yxAWy9bG.js.map +0 -1
  212. package/dist/jinja2-DnB6dQmV.js +0 -155
  213. package/dist/jinja2-DnB6dQmV.js.map +0 -1
  214. package/dist/jinja2-wbVbDTNi.cjs +0 -2
  215. package/dist/jinja2-wbVbDTNi.cjs.map +0 -1
  216. package/dist/julia-DA67Qw9E.cjs +0 -2
  217. package/dist/julia-DA67Qw9E.cjs.map +0 -1
  218. package/dist/julia-DpvXAuO6.js +0 -242
  219. package/dist/julia-DpvXAuO6.js.map +0 -1
  220. package/dist/livescript-Bg3URadp.cjs +0 -2
  221. package/dist/livescript-Bg3URadp.cjs.map +0 -1
  222. package/dist/livescript-CanGTf8u.js +0 -273
  223. package/dist/livescript-CanGTf8u.js.map +0 -1
  224. package/dist/lua-CIsxjGwi.cjs +0 -2
  225. package/dist/lua-CIsxjGwi.cjs.map +0 -1
  226. package/dist/lua-XplVlWi_.js +0 -218
  227. package/dist/lua-XplVlWi_.js.map +0 -1
  228. package/dist/mathematica-BG089QIc.cjs +0 -2
  229. package/dist/mathematica-BG089QIc.cjs.map +0 -1
  230. package/dist/mathematica-jaRHnSxC.js +0 -36
  231. package/dist/mathematica-jaRHnSxC.js.map +0 -1
  232. package/dist/mbox-BctzC1hL.js +0 -77
  233. package/dist/mbox-BctzC1hL.js.map +0 -1
  234. package/dist/mbox-CySolFFZ.cjs +0 -2
  235. package/dist/mbox-CySolFFZ.cjs.map +0 -1
  236. package/dist/mirc-BfqEffzk.cjs +0 -2
  237. package/dist/mirc-BfqEffzk.cjs.map +0 -1
  238. package/dist/mirc-CFBPAOaF.js +0 -73
  239. package/dist/mirc-CFBPAOaF.js.map +0 -1
  240. package/dist/mllike-CBK_zjnT.cjs +0 -2
  241. package/dist/mllike-CBK_zjnT.cjs.map +0 -1
  242. package/dist/mllike-gvRenHsu.js +0 -273
  243. package/dist/mllike-gvRenHsu.js.map +0 -1
  244. package/dist/modelica-B6Zhcb-M.cjs +0 -2
  245. package/dist/modelica-B6Zhcb-M.cjs.map +0 -1
  246. package/dist/modelica-vUgVs--1.js +0 -94
  247. package/dist/modelica-vUgVs--1.js.map +0 -1
  248. package/dist/mscgen-B_Dg_s1G.cjs +0 -2
  249. package/dist/mscgen-B_Dg_s1G.cjs.map +0 -1
  250. package/dist/mscgen-ucEwbOaK.js +0 -82
  251. package/dist/mscgen-ucEwbOaK.js.map +0 -1
  252. package/dist/mumps-CQoS1kWX.js +0 -26
  253. package/dist/mumps-CQoS1kWX.js.map +0 -1
  254. package/dist/mumps-wfyQdxSu.cjs +0 -2
  255. package/dist/mumps-wfyQdxSu.cjs.map +0 -1
  256. package/dist/nginx-CwqyBUfA.cjs +0 -2
  257. package/dist/nginx-CwqyBUfA.cjs.map +0 -1
  258. package/dist/nginx-zDPm3Z74.js +0 -90
  259. package/dist/nginx-zDPm3Z74.js.map +0 -1
  260. package/dist/nsis-DPj2fUaP.cjs +0 -2
  261. package/dist/nsis-DPj2fUaP.cjs.map +0 -1
  262. package/dist/nsis-fePjrhq7.js +0 -63
  263. package/dist/nsis-fePjrhq7.js.map +0 -1
  264. package/dist/ntriples-CsNjv2QF.js +0 -80
  265. package/dist/ntriples-CsNjv2QF.js.map +0 -1
  266. package/dist/ntriples-DgwJmozm.cjs +0 -2
  267. package/dist/ntriples-DgwJmozm.cjs.map +0 -1
  268. package/dist/octave-1pkKrgAA.cjs +0 -2
  269. package/dist/octave-1pkKrgAA.cjs.map +0 -1
  270. package/dist/octave-C8PmmSRH.js +0 -144
  271. package/dist/octave-C8PmmSRH.js.map +0 -1
  272. package/dist/oz-BXOZCt0U.cjs +0 -2
  273. package/dist/oz-BXOZCt0U.cjs.map +0 -1
  274. package/dist/oz-Ce8aN8oE.js +0 -152
  275. package/dist/oz-Ce8aN8oE.js.map +0 -1
  276. package/dist/pascal-De0D6mP7.js +0 -78
  277. package/dist/pascal-De0D6mP7.js.map +0 -1
  278. package/dist/pascal-DtY2LEkJ.cjs +0 -2
  279. package/dist/pascal-DtY2LEkJ.cjs.map +0 -1
  280. package/dist/perl-B4bSCe1C.js +0 -916
  281. package/dist/perl-B4bSCe1C.js.map +0 -1
  282. package/dist/perl-CVDWbEju.cjs +0 -2
  283. package/dist/perl-CVDWbEju.cjs.map +0 -1
  284. package/dist/pig-D24Z8EXi.js +0 -55
  285. package/dist/pig-D24Z8EXi.js.map +0 -1
  286. package/dist/pig-DMByOrnr.cjs +0 -2
  287. package/dist/pig-DMByOrnr.cjs.map +0 -1
  288. package/dist/powershell-BaoYaFvj.cjs +0 -2
  289. package/dist/powershell-BaoYaFvj.cjs.map +0 -1
  290. package/dist/powershell-DkYVfTzP.js +0 -250
  291. package/dist/powershell-DkYVfTzP.js.map +0 -1
  292. package/dist/properties-DXHJZ3WE.cjs +0 -2
  293. package/dist/properties-DXHJZ3WE.cjs.map +0 -1
  294. package/dist/properties-Dn9wna3M.js +0 -27
  295. package/dist/properties-Dn9wna3M.js.map +0 -1
  296. package/dist/protobuf-BKhXdfH6.cjs +0 -2
  297. package/dist/protobuf-BKhXdfH6.cjs.map +0 -1
  298. package/dist/protobuf-BPIjwpzm.js +0 -50
  299. package/dist/protobuf-BPIjwpzm.js.map +0 -1
  300. package/dist/puppet-8mAyuMbW.cjs +0 -2
  301. package/dist/puppet-8mAyuMbW.cjs.map +0 -1
  302. package/dist/puppet-nyd4dhjf.js +0 -46
  303. package/dist/puppet-nyd4dhjf.js.map +0 -1
  304. package/dist/q-BPQ45Nxu.cjs +0 -2
  305. package/dist/q-BPQ45Nxu.cjs.map +0 -1
  306. package/dist/q-DXjKs-tC.js +0 -84
  307. package/dist/q-DXjKs-tC.js.map +0 -1
  308. package/dist/r-LKEuhEGI.js +0 -105
  309. package/dist/r-LKEuhEGI.js.map +0 -1
  310. package/dist/r-r2_EZsON.cjs +0 -2
  311. package/dist/r-r2_EZsON.cjs.map +0 -1
  312. package/dist/rpm-BoAefZZ1.js +0 -50
  313. package/dist/rpm-BoAefZZ1.js.map +0 -1
  314. package/dist/rpm-C6UDHByS.cjs +0 -2
  315. package/dist/rpm-C6UDHByS.cjs.map +0 -1
  316. package/dist/ruby-CcYfvIk6.js +0 -229
  317. package/dist/ruby-CcYfvIk6.js.map +0 -1
  318. package/dist/ruby-Cn1sFkZF.cjs +0 -2
  319. package/dist/ruby-Cn1sFkZF.cjs.map +0 -1
  320. package/dist/sas-7E8yHoCW.js +0 -106
  321. package/dist/sas-7E8yHoCW.js.map +0 -1
  322. package/dist/sas-DAGcJy94.cjs +0 -2
  323. package/dist/sas-DAGcJy94.cjs.map +0 -1
  324. package/dist/scheme-B0ZrbojV.cjs +0 -2
  325. package/dist/scheme-B0ZrbojV.cjs.map +0 -1
  326. package/dist/scheme-DjibxsNh.js +0 -125
  327. package/dist/scheme-DjibxsNh.js.map +0 -1
  328. package/dist/shell-BMYo43V6.cjs +0 -2
  329. package/dist/shell-BMYo43V6.cjs.map +0 -1
  330. package/dist/shell-C0C2sNA_.js +0 -183
  331. package/dist/shell-C0C2sNA_.js.map +0 -1
  332. package/dist/simple-mode-B0dvCdAA.js +0 -90
  333. package/dist/simple-mode-B0dvCdAA.js.map +0 -1
  334. package/dist/simple-mode-BIKNPBes.cjs +0 -2
  335. package/dist/simple-mode-BIKNPBes.cjs.map +0 -1
  336. package/dist/smalltalk-Bhddl2pB.js +0 -49
  337. package/dist/smalltalk-Bhddl2pB.js.map +0 -1
  338. package/dist/smalltalk-CSslY-3i.cjs +0 -2
  339. package/dist/smalltalk-CSslY-3i.cjs.map +0 -1
  340. package/dist/solr-A1kSnAwJ.cjs +0 -2
  341. package/dist/solr-A1kSnAwJ.cjs.map +0 -1
  342. package/dist/solr-BNlsLglM.js +0 -42
  343. package/dist/solr-BNlsLglM.js.map +0 -1
  344. package/dist/sparql-DnHMBLLY.cjs +0 -2
  345. package/dist/sparql-DnHMBLLY.cjs.map +0 -1
  346. package/dist/sparql-FarWu_Gb.js +0 -198
  347. package/dist/sparql-FarWu_Gb.js.map +0 -1
  348. package/dist/spreadsheet-B7_BK8hB.cjs +0 -2
  349. package/dist/spreadsheet-B7_BK8hB.cjs.map +0 -1
  350. package/dist/spreadsheet-C-cy4P5N.js +0 -50
  351. package/dist/spreadsheet-C-cy4P5N.js.map +0 -1
  352. package/dist/stex-B4wyjEnp.cjs +0 -2
  353. package/dist/stex-B4wyjEnp.cjs.map +0 -1
  354. package/dist/stex-Du4h4KAU.js +0 -130
  355. package/dist/stex-Du4h4KAU.js.map +0 -1
  356. package/dist/stylus-B3vYZZY8.cjs +0 -2
  357. package/dist/stylus-B3vYZZY8.cjs.map +0 -1
  358. package/dist/stylus-DRcbY16X.js +0 -251
  359. package/dist/stylus-DRcbY16X.js.map +0 -1
  360. package/dist/swift-DGw6Cgu8.cjs +0 -2
  361. package/dist/swift-DGw6Cgu8.cjs.map +0 -1
  362. package/dist/swift-DSxqR9R6.js +0 -231
  363. package/dist/swift-DSxqR9R6.js.map +0 -1
  364. package/dist/tcl-ByLXbQFo.cjs +0 -2
  365. package/dist/tcl-ByLXbQFo.cjs.map +0 -1
  366. package/dist/tcl-xfoLljhY.js +0 -82
  367. package/dist/tcl-xfoLljhY.js.map +0 -1
  368. package/dist/textile-D1AWE-pc.js +0 -296
  369. package/dist/textile-D1AWE-pc.js.map +0 -1
  370. package/dist/textile-iryw-lTw.cjs +0 -2
  371. package/dist/textile-iryw-lTw.cjs.map +0 -1
  372. package/dist/tiddlywiki-5wqsXtSk.js +0 -156
  373. package/dist/tiddlywiki-5wqsXtSk.js.map +0 -1
  374. package/dist/tiddlywiki-D8IJz1k7.cjs +0 -2
  375. package/dist/tiddlywiki-D8IJz1k7.cjs.map +0 -1
  376. package/dist/tiki-C5p5KSQK.cjs +0 -2
  377. package/dist/tiki-C5p5KSQK.cjs.map +0 -1
  378. package/dist/tiki-__Kn3CeS.js +0 -182
  379. package/dist/tiki-__Kn3CeS.js.map +0 -1
  380. package/dist/toml-3ZsH_4Qa.cjs +0 -2
  381. package/dist/toml-3ZsH_4Qa.cjs.map +0 -1
  382. package/dist/toml-BHiuTcfn.js +0 -50
  383. package/dist/toml-BHiuTcfn.js.map +0 -1
  384. package/dist/troff-D-3QCOYN.cjs +0 -2
  385. package/dist/troff-D-3QCOYN.cjs.map +0 -1
  386. package/dist/troff-D2UO-fKf.js +0 -36
  387. package/dist/troff-D2UO-fKf.js.map +0 -1
  388. package/dist/ttcn-Bsa4sfRm.js +0 -124
  389. package/dist/ttcn-Bsa4sfRm.js.map +0 -1
  390. package/dist/ttcn-C2MXAqcM.cjs +0 -2
  391. package/dist/ttcn-C2MXAqcM.cjs.map +0 -1
  392. package/dist/turtle-DSJNatSv.cjs +0 -2
  393. package/dist/turtle-DSJNatSv.cjs.map +0 -1
  394. package/dist/turtle-xwJUxoPV.js +0 -81
  395. package/dist/turtle-xwJUxoPV.js.map +0 -1
  396. package/dist/vb-c2kQGd6-.js +0 -75
  397. package/dist/vb-c2kQGd6-.js.map +0 -1
  398. package/dist/vb-qzHzzvyB.cjs +0 -2
  399. package/dist/vb-qzHzzvyB.cjs.map +0 -1
  400. package/dist/vbscript-1f_Dhg5H.js +0 -325
  401. package/dist/vbscript-1f_Dhg5H.js.map +0 -1
  402. package/dist/vbscript-CWm8v9tE.cjs +0 -2
  403. package/dist/vbscript-CWm8v9tE.cjs.map +0 -1
  404. package/dist/velocity-D3_yAIp3.cjs +0 -2
  405. package/dist/velocity-D3_yAIp3.cjs.map +0 -1
  406. package/dist/velocity-DJd0pTTC.js +0 -97
  407. package/dist/velocity-DJd0pTTC.js.map +0 -1
  408. package/dist/verilog-BOhLNmQo.cjs +0 -2
  409. package/dist/verilog-BOhLNmQo.cjs.map +0 -1
  410. package/dist/verilog-CiS1jyi5.js +0 -263
  411. package/dist/verilog-CiS1jyi5.js.map +0 -1
  412. package/dist/vhdl-CMFbi8Im.cjs +0 -2
  413. package/dist/vhdl-CMFbi8Im.cjs.map +0 -1
  414. package/dist/vhdl-T9HkrbI2.js +0 -107
  415. package/dist/vhdl-T9HkrbI2.js.map +0 -1
  416. package/dist/webidl-CWb_flNk.cjs +0 -2
  417. package/dist/webidl-CWb_flNk.cjs.map +0 -1
  418. package/dist/webidl-CjfDENEo.js +0 -156
  419. package/dist/webidl-CjfDENEo.js.map +0 -1
  420. package/dist/xquery-Ct6lEb4B.js +0 -423
  421. package/dist/xquery-Ct6lEb4B.js.map +0 -1
  422. package/dist/xquery-mbJFEpkV.cjs +0 -2
  423. package/dist/xquery-mbJFEpkV.cjs.map +0 -1
  424. package/dist/yacas-C0absKBh.js +0 -74
  425. package/dist/yacas-C0absKBh.js.map +0 -1
  426. package/dist/yacas-urx_N5C8.cjs +0 -2
  427. package/dist/yacas-urx_N5C8.cjs.map +0 -1
  428. package/dist/yaml-CSixJMdf.cjs +0 -2
  429. package/dist/yaml-CSixJMdf.cjs.map +0 -1
  430. package/dist/yaml-Dt6Tp2eU.js +0 -54
  431. package/dist/yaml-Dt6Tp2eU.js.map +0 -1
  432. package/dist/z80-CsG3CM6M.cjs +0 -2
  433. package/dist/z80-CsG3CM6M.cjs.map +0 -1
  434. package/dist/z80-Pki2zAjW.js +0 -62
  435. package/dist/z80-Pki2zAjW.js.map +0 -1
@@ -1,1306 +0,0 @@
1
- import { P as L, N as M, j as $, D as E, k as y, T as S, I as j } from "./__vite-browser-external-ZW37Brf4.js";
2
- class v {
3
- /**
4
- @internal
5
- */
6
- constructor(t, e, s, i, h, r, n, o, a, u = 0, f) {
7
- this.p = t, this.stack = e, this.state = s, this.reducePos = i, this.pos = h, this.score = r, this.buffer = n, this.bufferBase = o, this.curContext = a, this.lookAhead = u, this.parent = f;
8
- }
9
- /**
10
- @internal
11
- */
12
- toString() {
13
- return `[${this.stack.filter((t, e) => e % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
14
- }
15
- // Start an empty stack
16
- /**
17
- @internal
18
- */
19
- static start(t, e, s = 0) {
20
- let i = t.parser.context;
21
- return new v(t, [], e, s, s, 0, [], 0, i ? new N(i, i.start) : null, 0, null);
22
- }
23
- /**
24
- The stack's current [context](#lr.ContextTracker) value, if
25
- any. Its type will depend on the context tracker's type
26
- parameter, or it will be `null` if there is no context
27
- tracker.
28
- */
29
- get context() {
30
- return this.curContext ? this.curContext.context : null;
31
- }
32
- // Push a state onto the stack, tracking its start position as well
33
- // as the buffer base at that point.
34
- /**
35
- @internal
36
- */
37
- pushState(t, e) {
38
- this.stack.push(this.state, e, this.bufferBase + this.buffer.length), this.state = t;
39
- }
40
- // Apply a reduce action
41
- /**
42
- @internal
43
- */
44
- reduce(t) {
45
- var e;
46
- let s = t >> 19, i = t & 65535, { parser: h } = this.p, r = this.reducePos < this.pos - 25 && this.setLookAhead(this.pos), n = h.dynamicPrecedence(i);
47
- if (n && (this.score += n), s == 0) {
48
- this.pushState(h.getGoto(this.state, i, !0), this.reducePos), i < h.minRepeatTerm && this.storeNode(i, this.reducePos, this.reducePos, r ? 8 : 4, !0), this.reduceContext(i, this.reducePos);
49
- return;
50
- }
51
- let o = this.stack.length - (s - 1) * 3 - (t & 262144 ? 6 : 0), a = o ? this.stack[o - 2] : this.p.ranges[0].from, u = this.reducePos - a;
52
- u >= 2e3 && !(!((e = this.p.parser.nodeSet.types[i]) === null || e === void 0) && e.isAnonymous) && (a == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, this.p.lastBigReductionSize = u) : this.p.lastBigReductionSize < u && (this.p.bigReductionCount = 1, this.p.lastBigReductionStart = a, this.p.lastBigReductionSize = u));
53
- let f = o ? this.stack[o - 1] : 0, p = this.bufferBase + this.buffer.length - f;
54
- if (i < h.minRepeatTerm || t & 131072) {
55
- let c = h.stateFlag(
56
- this.state,
57
- 1
58
- /* StateFlag.Skipped */
59
- ) ? this.pos : this.reducePos;
60
- this.storeNode(i, a, c, p + 4, !0);
61
- }
62
- if (t & 262144)
63
- this.state = this.stack[o];
64
- else {
65
- let c = this.stack[o - 3];
66
- this.state = h.getGoto(c, i, !0);
67
- }
68
- for (; this.stack.length > o; )
69
- this.stack.pop();
70
- this.reduceContext(i, a);
71
- }
72
- // Shift a value into the buffer
73
- /**
74
- @internal
75
- */
76
- storeNode(t, e, s, i = 4, h = !1) {
77
- if (t == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
78
- let r = this, n = this.buffer.length;
79
- if (n == 0 && r.parent && (n = r.bufferBase - r.parent.bufferBase, r = r.parent), n > 0 && r.buffer[n - 4] == 0 && r.buffer[n - 1] > -1) {
80
- if (e == s)
81
- return;
82
- if (r.buffer[n - 2] >= e) {
83
- r.buffer[n - 2] = s;
84
- return;
85
- }
86
- }
87
- }
88
- if (!h || this.pos == s)
89
- this.buffer.push(t, e, s, i);
90
- else {
91
- let r = this.buffer.length;
92
- if (r > 0 && (this.buffer[r - 4] != 0 || this.buffer[r - 1] < 0)) {
93
- let n = !1;
94
- for (let o = r; o > 0 && this.buffer[o - 2] > s; o -= 4)
95
- if (this.buffer[o - 1] >= 0) {
96
- n = !0;
97
- break;
98
- }
99
- if (n)
100
- for (; r > 0 && this.buffer[r - 2] > s; )
101
- this.buffer[r] = this.buffer[r - 4], this.buffer[r + 1] = this.buffer[r - 3], this.buffer[r + 2] = this.buffer[r - 2], this.buffer[r + 3] = this.buffer[r - 1], r -= 4, i > 4 && (i -= 4);
102
- }
103
- this.buffer[r] = t, this.buffer[r + 1] = e, this.buffer[r + 2] = s, this.buffer[r + 3] = i;
104
- }
105
- }
106
- // Apply a shift action
107
- /**
108
- @internal
109
- */
110
- shift(t, e, s, i) {
111
- if (t & 131072)
112
- this.pushState(t & 65535, this.pos);
113
- else if ((t & 262144) == 0) {
114
- let h = t, { parser: r } = this.p;
115
- (i > this.pos || e <= r.maxNode) && (this.pos = i, r.stateFlag(
116
- h,
117
- 1
118
- /* StateFlag.Skipped */
119
- ) || (this.reducePos = i)), this.pushState(h, s), this.shiftContext(e, s), e <= r.maxNode && this.buffer.push(e, s, i, 4);
120
- } else
121
- this.pos = i, this.shiftContext(e, s), e <= this.p.parser.maxNode && this.buffer.push(e, s, i, 4);
122
- }
123
- // Apply an action
124
- /**
125
- @internal
126
- */
127
- apply(t, e, s, i) {
128
- t & 65536 ? this.reduce(t) : this.shift(t, e, s, i);
129
- }
130
- // Add a prebuilt (reused) node into the buffer.
131
- /**
132
- @internal
133
- */
134
- useNode(t, e) {
135
- let s = this.p.reused.length - 1;
136
- (s < 0 || this.p.reused[s] != t) && (this.p.reused.push(t), s++);
137
- let i = this.pos;
138
- this.reducePos = this.pos = i + t.length, this.pushState(e, i), this.buffer.push(
139
- s,
140
- i,
141
- this.reducePos,
142
- -1
143
- /* size == -1 means this is a reused value */
144
- ), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, t, this, this.p.stream.reset(this.pos - t.length)));
145
- }
146
- // Split the stack. Due to the buffer sharing and the fact
147
- // that `this.stack` tends to stay quite shallow, this isn't very
148
- // expensive.
149
- /**
150
- @internal
151
- */
152
- split() {
153
- let t = this, e = t.buffer.length;
154
- for (; e > 0 && t.buffer[e - 2] > t.reducePos; )
155
- e -= 4;
156
- let s = t.buffer.slice(e), i = t.bufferBase + e;
157
- for (; t && i == t.bufferBase; )
158
- t = t.parent;
159
- return new v(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, s, i, this.curContext, this.lookAhead, t);
160
- }
161
- // Try to recover from an error by 'deleting' (ignoring) one token.
162
- /**
163
- @internal
164
- */
165
- recoverByDelete(t, e) {
166
- let s = t <= this.p.parser.maxNode;
167
- s && this.storeNode(t, this.pos, e, 4), this.storeNode(0, this.pos, e, s ? 8 : 4), this.pos = this.reducePos = e, this.score -= 190;
168
- }
169
- /**
170
- Check if the given term would be able to be shifted (optionally
171
- after some reductions) on this stack. This can be useful for
172
- external tokenizers that want to make sure they only provide a
173
- given token when it applies.
174
- */
175
- canShift(t) {
176
- for (let e = new G(this); ; ) {
177
- let s = this.p.parser.stateSlot(
178
- e.state,
179
- 4
180
- /* ParseState.DefaultReduce */
181
- ) || this.p.parser.hasAction(e.state, t);
182
- if (s == 0)
183
- return !1;
184
- if ((s & 65536) == 0)
185
- return !0;
186
- e.reduce(s);
187
- }
188
- }
189
- // Apply up to Recover.MaxNext recovery actions that conceptually
190
- // inserts some missing token or rule.
191
- /**
192
- @internal
193
- */
194
- recoverByInsert(t) {
195
- if (this.stack.length >= 300)
196
- return [];
197
- let e = this.p.parser.nextStates(this.state);
198
- if (e.length > 8 || this.stack.length >= 120) {
199
- let i = [];
200
- for (let h = 0, r; h < e.length; h += 2)
201
- (r = e[h + 1]) != this.state && this.p.parser.hasAction(r, t) && i.push(e[h], r);
202
- if (this.stack.length < 120)
203
- for (let h = 0; i.length < 8 && h < e.length; h += 2) {
204
- let r = e[h + 1];
205
- i.some((n, o) => o & 1 && n == r) || i.push(e[h], r);
206
- }
207
- e = i;
208
- }
209
- let s = [];
210
- for (let i = 0; i < e.length && s.length < 4; i += 2) {
211
- let h = e[i + 1];
212
- if (h == this.state)
213
- continue;
214
- let r = this.split();
215
- r.pushState(h, this.pos), r.storeNode(0, r.pos, r.pos, 4, !0), r.shiftContext(e[i], this.pos), r.reducePos = this.pos, r.score -= 200, s.push(r);
216
- }
217
- return s;
218
- }
219
- // Force a reduce, if possible. Return false if that can't
220
- // be done.
221
- /**
222
- @internal
223
- */
224
- forceReduce() {
225
- let { parser: t } = this.p, e = t.stateSlot(
226
- this.state,
227
- 5
228
- /* ParseState.ForcedReduce */
229
- );
230
- if ((e & 65536) == 0)
231
- return !1;
232
- if (!t.validAction(this.state, e)) {
233
- let s = e >> 19, i = e & 65535, h = this.stack.length - s * 3;
234
- if (h < 0 || t.getGoto(this.stack[h], i, !1) < 0) {
235
- let r = this.findForcedReduction();
236
- if (r == null)
237
- return !1;
238
- e = r;
239
- }
240
- this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
241
- }
242
- return this.reducePos = this.pos, this.reduce(e), !0;
243
- }
244
- /**
245
- Try to scan through the automaton to find some kind of reduction
246
- that can be applied. Used when the regular ForcedReduce field
247
- isn't a valid action. @internal
248
- */
249
- findForcedReduction() {
250
- let { parser: t } = this.p, e = [], s = (i, h) => {
251
- if (!e.includes(i))
252
- return e.push(i), t.allActions(i, (r) => {
253
- if (!(r & 393216)) if (r & 65536) {
254
- let n = (r >> 19) - h;
255
- if (n > 1) {
256
- let o = r & 65535, a = this.stack.length - n * 3;
257
- if (a >= 0 && t.getGoto(this.stack[a], o, !1) >= 0)
258
- return n << 19 | 65536 | o;
259
- }
260
- } else {
261
- let n = s(r, h + 1);
262
- if (n != null)
263
- return n;
264
- }
265
- });
266
- };
267
- return s(this.state, 0);
268
- }
269
- /**
270
- @internal
271
- */
272
- forceAll() {
273
- for (; !this.p.parser.stateFlag(
274
- this.state,
275
- 2
276
- /* StateFlag.Accepting */
277
- ); )
278
- if (!this.forceReduce()) {
279
- this.storeNode(0, this.pos, this.pos, 4, !0);
280
- break;
281
- }
282
- return this;
283
- }
284
- /**
285
- Check whether this state has no further actions (assumed to be a direct descendant of the
286
- top state, since any other states must be able to continue
287
- somehow). @internal
288
- */
289
- get deadEnd() {
290
- if (this.stack.length != 3)
291
- return !1;
292
- let { parser: t } = this.p;
293
- return t.data[t.stateSlot(
294
- this.state,
295
- 1
296
- /* ParseState.Actions */
297
- )] == 65535 && !t.stateSlot(
298
- this.state,
299
- 4
300
- /* ParseState.DefaultReduce */
301
- );
302
- }
303
- /**
304
- Restart the stack (put it back in its start state). Only safe
305
- when this.stack.length == 3 (state is directly below the top
306
- state). @internal
307
- */
308
- restart() {
309
- this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
310
- }
311
- /**
312
- @internal
313
- */
314
- sameState(t) {
315
- if (this.state != t.state || this.stack.length != t.stack.length)
316
- return !1;
317
- for (let e = 0; e < this.stack.length; e += 3)
318
- if (this.stack[e] != t.stack[e])
319
- return !1;
320
- return !0;
321
- }
322
- /**
323
- Get the parser used by this stack.
324
- */
325
- get parser() {
326
- return this.p.parser;
327
- }
328
- /**
329
- Test whether a given dialect (by numeric ID, as exported from
330
- the terms file) is enabled.
331
- */
332
- dialectEnabled(t) {
333
- return this.p.parser.dialect.flags[t];
334
- }
335
- shiftContext(t, e) {
336
- this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, t, this, this.p.stream.reset(e)));
337
- }
338
- reduceContext(t, e) {
339
- this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, t, this, this.p.stream.reset(e)));
340
- }
341
- /**
342
- @internal
343
- */
344
- emitContext() {
345
- let t = this.buffer.length - 1;
346
- (t < 0 || this.buffer[t] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
347
- }
348
- /**
349
- @internal
350
- */
351
- emitLookAhead() {
352
- let t = this.buffer.length - 1;
353
- (t < 0 || this.buffer[t] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
354
- }
355
- updateContext(t) {
356
- if (t != this.curContext.context) {
357
- let e = new N(this.curContext.tracker, t);
358
- e.hash != this.curContext.hash && this.emitContext(), this.curContext = e;
359
- }
360
- }
361
- /**
362
- @internal
363
- */
364
- setLookAhead(t) {
365
- return t <= this.lookAhead ? !1 : (this.emitLookAhead(), this.lookAhead = t, !0);
366
- }
367
- /**
368
- @internal
369
- */
370
- close() {
371
- this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
372
- }
373
- }
374
- class N {
375
- constructor(t, e) {
376
- this.tracker = t, this.context = e, this.hash = t.strict ? t.hash(e) : 0;
377
- }
378
- }
379
- class G {
380
- constructor(t) {
381
- this.start = t, this.state = t.state, this.stack = t.stack, this.base = this.stack.length;
382
- }
383
- reduce(t) {
384
- let e = t & 65535, s = t >> 19;
385
- s == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= (s - 1) * 3;
386
- let i = this.start.p.parser.getGoto(this.stack[this.base - 3], e, !0);
387
- this.state = i;
388
- }
389
- }
390
- class A {
391
- constructor(t, e, s) {
392
- this.stack = t, this.pos = e, this.index = s, this.buffer = t.buffer, this.index == 0 && this.maybeNext();
393
- }
394
- static create(t, e = t.bufferBase + t.buffer.length) {
395
- return new A(t, e, e - t.bufferBase);
396
- }
397
- maybeNext() {
398
- let t = this.stack.parent;
399
- t != null && (this.index = this.stack.bufferBase - t.bufferBase, this.stack = t, this.buffer = t.buffer);
400
- }
401
- get id() {
402
- return this.buffer[this.index - 4];
403
- }
404
- get start() {
405
- return this.buffer[this.index - 3];
406
- }
407
- get end() {
408
- return this.buffer[this.index - 2];
409
- }
410
- get size() {
411
- return this.buffer[this.index - 1];
412
- }
413
- next() {
414
- this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
415
- }
416
- fork() {
417
- return new A(this.stack, this.pos, this.index);
418
- }
419
- }
420
- function x(l, t = Uint16Array) {
421
- if (typeof l != "string")
422
- return l;
423
- let e = null;
424
- for (let s = 0, i = 0; s < l.length; ) {
425
- let h = 0;
426
- for (; ; ) {
427
- let r = l.charCodeAt(s++), n = !1;
428
- if (r == 126) {
429
- h = 65535;
430
- break;
431
- }
432
- r >= 92 && r--, r >= 34 && r--;
433
- let o = r - 32;
434
- if (o >= 46 && (o -= 46, n = !0), h += o, n)
435
- break;
436
- h *= 46;
437
- }
438
- e ? e[i++] = h : e = new t(h);
439
- }
440
- return e;
441
- }
442
- class P {
443
- constructor() {
444
- this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
445
- }
446
- }
447
- const R = new P();
448
- class U {
449
- /**
450
- @internal
451
- */
452
- constructor(t, e) {
453
- this.input = t, this.ranges = e, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = R, this.rangeIndex = 0, this.pos = this.chunkPos = e[0].from, this.range = e[0], this.end = e[e.length - 1].to, this.readNext();
454
- }
455
- /**
456
- @internal
457
- */
458
- resolveOffset(t, e) {
459
- let s = this.range, i = this.rangeIndex, h = this.pos + t;
460
- for (; h < s.from; ) {
461
- if (!i)
462
- return null;
463
- let r = this.ranges[--i];
464
- h -= s.from - r.to, s = r;
465
- }
466
- for (; e < 0 ? h > s.to : h >= s.to; ) {
467
- if (i == this.ranges.length - 1)
468
- return null;
469
- let r = this.ranges[++i];
470
- h += r.from - s.to, s = r;
471
- }
472
- return h;
473
- }
474
- /**
475
- @internal
476
- */
477
- clipPos(t) {
478
- if (t >= this.range.from && t < this.range.to)
479
- return t;
480
- for (let e of this.ranges)
481
- if (e.to > t)
482
- return Math.max(t, e.from);
483
- return this.end;
484
- }
485
- /**
486
- Look at a code unit near the stream position. `.peek(0)` equals
487
- `.next`, `.peek(-1)` gives you the previous character, and so
488
- on.
489
-
490
- Note that looking around during tokenizing creates dependencies
491
- on potentially far-away content, which may reduce the
492
- effectiveness incremental parsing—when looking forward—or even
493
- cause invalid reparses when looking backward more than 25 code
494
- units, since the library does not track lookbehind.
495
- */
496
- peek(t) {
497
- let e = this.chunkOff + t, s, i;
498
- if (e >= 0 && e < this.chunk.length)
499
- s = this.pos + t, i = this.chunk.charCodeAt(e);
500
- else {
501
- let h = this.resolveOffset(t, 1);
502
- if (h == null)
503
- return -1;
504
- if (s = h, s >= this.chunk2Pos && s < this.chunk2Pos + this.chunk2.length)
505
- i = this.chunk2.charCodeAt(s - this.chunk2Pos);
506
- else {
507
- let r = this.rangeIndex, n = this.range;
508
- for (; n.to <= s; )
509
- n = this.ranges[++r];
510
- this.chunk2 = this.input.chunk(this.chunk2Pos = s), s + this.chunk2.length > n.to && (this.chunk2 = this.chunk2.slice(0, n.to - s)), i = this.chunk2.charCodeAt(0);
511
- }
512
- }
513
- return s >= this.token.lookAhead && (this.token.lookAhead = s + 1), i;
514
- }
515
- /**
516
- Accept a token. By default, the end of the token is set to the
517
- current stream position, but you can pass an offset (relative to
518
- the stream position) to change that.
519
- */
520
- acceptToken(t, e = 0) {
521
- let s = e ? this.resolveOffset(e, -1) : this.pos;
522
- if (s == null || s < this.token.start)
523
- throw new RangeError("Token end out of bounds");
524
- this.token.value = t, this.token.end = s;
525
- }
526
- /**
527
- Accept a token ending at a specific given position.
528
- */
529
- acceptTokenTo(t, e) {
530
- this.token.value = t, this.token.end = e;
531
- }
532
- getChunk() {
533
- if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
534
- let { chunk: t, chunkPos: e } = this;
535
- this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = t, this.chunk2Pos = e, this.chunkOff = this.pos - this.chunkPos;
536
- } else {
537
- this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
538
- let t = this.input.chunk(this.pos), e = this.pos + t.length;
539
- this.chunk = e > this.range.to ? t.slice(0, this.range.to - this.pos) : t, this.chunkPos = this.pos, this.chunkOff = 0;
540
- }
541
- }
542
- readNext() {
543
- return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
544
- }
545
- /**
546
- Move the stream forward N (defaults to 1) code units. Returns
547
- the new value of [`next`](#lr.InputStream.next).
548
- */
549
- advance(t = 1) {
550
- for (this.chunkOff += t; this.pos + t >= this.range.to; ) {
551
- if (this.rangeIndex == this.ranges.length - 1)
552
- return this.setDone();
553
- t -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
554
- }
555
- return this.pos += t, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
556
- }
557
- setDone() {
558
- return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
559
- }
560
- /**
561
- @internal
562
- */
563
- reset(t, e) {
564
- if (e ? (this.token = e, e.start = t, e.lookAhead = t + 1, e.value = e.extended = -1) : this.token = R, this.pos != t) {
565
- if (this.pos = t, t == this.end)
566
- return this.setDone(), this;
567
- for (; t < this.range.from; )
568
- this.range = this.ranges[--this.rangeIndex];
569
- for (; t >= this.range.to; )
570
- this.range = this.ranges[++this.rangeIndex];
571
- t >= this.chunkPos && t < this.chunkPos + this.chunk.length ? this.chunkOff = t - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
572
- }
573
- return this;
574
- }
575
- /**
576
- @internal
577
- */
578
- read(t, e) {
579
- if (t >= this.chunkPos && e <= this.chunkPos + this.chunk.length)
580
- return this.chunk.slice(t - this.chunkPos, e - this.chunkPos);
581
- if (t >= this.chunk2Pos && e <= this.chunk2Pos + this.chunk2.length)
582
- return this.chunk2.slice(t - this.chunk2Pos, e - this.chunk2Pos);
583
- if (t >= this.range.from && e <= this.range.to)
584
- return this.input.read(t, e);
585
- let s = "";
586
- for (let i of this.ranges) {
587
- if (i.from >= e)
588
- break;
589
- i.to > t && (s += this.input.read(Math.max(i.from, t), Math.min(i.to, e)));
590
- }
591
- return s;
592
- }
593
- }
594
- class m {
595
- constructor(t, e) {
596
- this.data = t, this.id = e;
597
- }
598
- token(t, e) {
599
- let { parser: s } = e.p;
600
- F(this.data, t, e, this.id, s.data, s.tokenPrecTable);
601
- }
602
- }
603
- m.prototype.contextual = m.prototype.fallback = m.prototype.extend = !1;
604
- class H {
605
- constructor(t, e, s) {
606
- this.precTable = e, this.elseToken = s, this.data = typeof t == "string" ? x(t) : t;
607
- }
608
- token(t, e) {
609
- let s = t.pos, i = 0;
610
- for (; ; ) {
611
- let h = t.next < 0, r = t.resolveOffset(1, 1);
612
- if (F(this.data, t, e, 0, this.data, this.precTable), t.token.value > -1)
613
- break;
614
- if (this.elseToken == null)
615
- return;
616
- if (h || i++, r == null)
617
- break;
618
- t.reset(r, t.token);
619
- }
620
- i && (t.reset(s, t.token), t.acceptToken(this.elseToken, i));
621
- }
622
- }
623
- H.prototype.contextual = m.prototype.fallback = m.prototype.extend = !1;
624
- class Y {
625
- /**
626
- Create a tokenizer. The first argument is the function that,
627
- given an input stream, scans for the types of tokens it
628
- recognizes at the stream's position, and calls
629
- [`acceptToken`](#lr.InputStream.acceptToken) when it finds
630
- one.
631
- */
632
- constructor(t, e = {}) {
633
- this.token = t, this.contextual = !!e.contextual, this.fallback = !!e.fallback, this.extend = !!e.extend;
634
- }
635
- }
636
- function F(l, t, e, s, i, h) {
637
- let r = 0, n = 1 << s, { dialect: o } = e.p.parser;
638
- t: for (; (n & l[r]) != 0; ) {
639
- let a = l[r + 1];
640
- for (let c = r + 3; c < a; c += 2)
641
- if ((l[c + 1] & n) > 0) {
642
- let d = l[c];
643
- if (o.allows(d) && (t.token.value == -1 || t.token.value == d || W(d, t.token.value, i, h))) {
644
- t.acceptToken(d);
645
- break;
646
- }
647
- }
648
- let u = t.next, f = 0, p = l[r + 2];
649
- if (t.next < 0 && p > f && l[a + p * 3 - 3] == 65535) {
650
- r = l[a + p * 3 - 1];
651
- continue t;
652
- }
653
- for (; f < p; ) {
654
- let c = f + p >> 1, d = a + c + (c << 1), b = l[d], O = l[d + 1] || 65536;
655
- if (u < b)
656
- p = c;
657
- else if (u >= O)
658
- f = c + 1;
659
- else {
660
- r = l[d + 2], t.advance();
661
- continue t;
662
- }
663
- }
664
- break;
665
- }
666
- }
667
- function z(l, t, e) {
668
- for (let s = t, i; (i = l[s]) != 65535; s++)
669
- if (i == e)
670
- return s - t;
671
- return -1;
672
- }
673
- function W(l, t, e, s) {
674
- let i = z(e, s, t);
675
- return i < 0 || z(e, s, l) < i;
676
- }
677
- const g = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
678
- let T = null;
679
- function I(l, t, e) {
680
- let s = l.cursor(j.IncludeAnonymous);
681
- for (s.moveTo(t); ; )
682
- if (!(e < 0 ? s.childBefore(t) : s.childAfter(t)))
683
- for (; ; ) {
684
- if ((e < 0 ? s.to < t : s.from > t) && !s.type.isError)
685
- return e < 0 ? Math.max(0, Math.min(
686
- s.to - 1,
687
- t - 25
688
- /* Lookahead.Margin */
689
- )) : Math.min(l.length, Math.max(
690
- s.from + 1,
691
- t + 25
692
- /* Lookahead.Margin */
693
- ));
694
- if (e < 0 ? s.prevSibling() : s.nextSibling())
695
- break;
696
- if (!s.parent())
697
- return e < 0 ? 0 : l.length;
698
- }
699
- }
700
- class q {
701
- constructor(t, e) {
702
- this.fragments = t, this.nodeSet = e, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment();
703
- }
704
- nextFragment() {
705
- let t = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
706
- if (t) {
707
- for (this.safeFrom = t.openStart ? I(t.tree, t.from + t.offset, 1) - t.offset : t.from, this.safeTo = t.openEnd ? I(t.tree, t.to + t.offset, -1) - t.offset : t.to; this.trees.length; )
708
- this.trees.pop(), this.start.pop(), this.index.pop();
709
- this.trees.push(t.tree), this.start.push(-t.offset), this.index.push(0), this.nextStart = this.safeFrom;
710
- } else
711
- this.nextStart = 1e9;
712
- }
713
- // `pos` must be >= any previously given `pos` for this cursor
714
- nodeAt(t) {
715
- if (t < this.nextStart)
716
- return null;
717
- for (; this.fragment && this.safeTo <= t; )
718
- this.nextFragment();
719
- if (!this.fragment)
720
- return null;
721
- for (; ; ) {
722
- let e = this.trees.length - 1;
723
- if (e < 0)
724
- return this.nextFragment(), null;
725
- let s = this.trees[e], i = this.index[e];
726
- if (i == s.children.length) {
727
- this.trees.pop(), this.start.pop(), this.index.pop();
728
- continue;
729
- }
730
- let h = s.children[i], r = this.start[e] + s.positions[i];
731
- if (r > t)
732
- return this.nextStart = r, null;
733
- if (h instanceof S) {
734
- if (r == t) {
735
- if (r < this.safeFrom)
736
- return null;
737
- let n = r + h.length;
738
- if (n <= this.safeTo) {
739
- let o = h.prop(y.lookAhead);
740
- if (!o || n + o < this.fragment.to)
741
- return h;
742
- }
743
- }
744
- this.index[e]++, r + h.length >= Math.max(this.safeFrom, t) && (this.trees.push(h), this.start.push(r), this.index.push(0));
745
- } else
746
- this.index[e]++, this.nextStart = r + h.length;
747
- }
748
- }
749
- }
750
- class J {
751
- constructor(t, e) {
752
- this.stream = e, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = t.tokenizers.map((s) => new P());
753
- }
754
- getActions(t) {
755
- let e = 0, s = null, { parser: i } = t.p, { tokenizers: h } = i, r = i.stateSlot(
756
- t.state,
757
- 3
758
- /* ParseState.TokenizerMask */
759
- ), n = t.curContext ? t.curContext.hash : 0, o = 0;
760
- for (let a = 0; a < h.length; a++) {
761
- if ((1 << a & r) == 0)
762
- continue;
763
- let u = h[a], f = this.tokens[a];
764
- if (!(s && !u.fallback) && ((u.contextual || f.start != t.pos || f.mask != r || f.context != n) && (this.updateCachedToken(f, u, t), f.mask = r, f.context = n), f.lookAhead > f.end + 25 && (o = Math.max(f.lookAhead, o)), f.value != 0)) {
765
- let p = e;
766
- if (f.extended > -1 && (e = this.addActions(t, f.extended, f.end, e)), e = this.addActions(t, f.value, f.end, e), !u.extend && (s = f, e > p))
767
- break;
768
- }
769
- }
770
- for (; this.actions.length > e; )
771
- this.actions.pop();
772
- return o && t.setLookAhead(o), !s && t.pos == this.stream.end && (s = new P(), s.value = t.p.parser.eofTerm, s.start = s.end = t.pos, e = this.addActions(t, s.value, s.end, e)), this.mainToken = s, this.actions;
773
- }
774
- getMainToken(t) {
775
- if (this.mainToken)
776
- return this.mainToken;
777
- let e = new P(), { pos: s, p: i } = t;
778
- return e.start = s, e.end = Math.min(s + 1, i.stream.end), e.value = s == i.stream.end ? i.parser.eofTerm : 0, e;
779
- }
780
- updateCachedToken(t, e, s) {
781
- let i = this.stream.clipPos(s.pos);
782
- if (e.token(this.stream.reset(i, t), s), t.value > -1) {
783
- let { parser: h } = s.p;
784
- for (let r = 0; r < h.specialized.length; r++)
785
- if (h.specialized[r] == t.value) {
786
- let n = h.specializers[r](this.stream.read(t.start, t.end), s);
787
- if (n >= 0 && s.p.parser.dialect.allows(n >> 1)) {
788
- (n & 1) == 0 ? t.value = n >> 1 : t.extended = n >> 1;
789
- break;
790
- }
791
- }
792
- } else
793
- t.value = 0, t.end = this.stream.clipPos(i + 1);
794
- }
795
- putAction(t, e, s, i) {
796
- for (let h = 0; h < i; h += 3)
797
- if (this.actions[h] == t)
798
- return i;
799
- return this.actions[i++] = t, this.actions[i++] = e, this.actions[i++] = s, i;
800
- }
801
- addActions(t, e, s, i) {
802
- let { state: h } = t, { parser: r } = t.p, { data: n } = r;
803
- for (let o = 0; o < 2; o++)
804
- for (let a = r.stateSlot(
805
- h,
806
- o ? 2 : 1
807
- /* ParseState.Actions */
808
- ); ; a += 3) {
809
- if (n[a] == 65535)
810
- if (n[a + 1] == 1)
811
- a = k(n, a + 2);
812
- else {
813
- i == 0 && n[a + 1] == 2 && (i = this.putAction(k(n, a + 2), e, s, i));
814
- break;
815
- }
816
- n[a] == e && (i = this.putAction(k(n, a + 1), e, s, i));
817
- }
818
- return i;
819
- }
820
- }
821
- class K {
822
- constructor(t, e, s, i) {
823
- this.parser = t, this.input = e, this.ranges = i, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new U(e, i), this.tokens = new J(t, this.stream), this.topTerm = t.top[1];
824
- let { from: h } = i[0];
825
- this.stacks = [v.start(this, t.top[0], h)], this.fragments = s.length && this.stream.end - h > t.bufferLength * 4 ? new q(s, t.nodeSet) : null;
826
- }
827
- get parsedPos() {
828
- return this.minStackPos;
829
- }
830
- // Move the parser forward. This will process all parse stacks at
831
- // `this.pos` and try to advance them to a further position. If no
832
- // stack for such a position is found, it'll start error-recovery.
833
- //
834
- // When the parse is finished, this will return a syntax tree. When
835
- // not, it returns `null`.
836
- advance() {
837
- let t = this.stacks, e = this.minStackPos, s = this.stacks = [], i, h;
838
- if (this.bigReductionCount > 300 && t.length == 1) {
839
- let [r] = t;
840
- for (; r.forceReduce() && r.stack.length && r.stack[r.stack.length - 2] >= this.lastBigReductionStart; )
841
- ;
842
- this.bigReductionCount = this.lastBigReductionSize = 0;
843
- }
844
- for (let r = 0; r < t.length; r++) {
845
- let n = t[r];
846
- for (; ; ) {
847
- if (this.tokens.mainToken = null, n.pos > e)
848
- s.push(n);
849
- else {
850
- if (this.advanceStack(n, s, t))
851
- continue;
852
- {
853
- i || (i = [], h = []), i.push(n);
854
- let o = this.tokens.getMainToken(n);
855
- h.push(o.value, o.end);
856
- }
857
- }
858
- break;
859
- }
860
- }
861
- if (!s.length) {
862
- let r = i && V(i);
863
- if (r)
864
- return g && console.log("Finish with " + this.stackID(r)), this.stackToTree(r);
865
- if (this.parser.strict)
866
- throw g && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + e);
867
- this.recovering || (this.recovering = 5);
868
- }
869
- if (this.recovering && i) {
870
- let r = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, h, s);
871
- if (r)
872
- return g && console.log("Force-finish " + this.stackID(r)), this.stackToTree(r.forceAll());
873
- }
874
- if (this.recovering) {
875
- let r = this.recovering == 1 ? 1 : this.recovering * 3;
876
- if (s.length > r)
877
- for (s.sort((n, o) => o.score - n.score); s.length > r; )
878
- s.pop();
879
- s.some((n) => n.reducePos > e) && this.recovering--;
880
- } else if (s.length > 1) {
881
- t: for (let r = 0; r < s.length - 1; r++) {
882
- let n = s[r];
883
- for (let o = r + 1; o < s.length; o++) {
884
- let a = s[o];
885
- if (n.sameState(a) || n.buffer.length > 500 && a.buffer.length > 500)
886
- if ((n.score - a.score || n.buffer.length - a.buffer.length) > 0)
887
- s.splice(o--, 1);
888
- else {
889
- s.splice(r--, 1);
890
- continue t;
891
- }
892
- }
893
- }
894
- s.length > 12 && s.splice(
895
- 12,
896
- s.length - 12
897
- /* Rec.MaxStackCount */
898
- );
899
- }
900
- this.minStackPos = s[0].pos;
901
- for (let r = 1; r < s.length; r++)
902
- s[r].pos < this.minStackPos && (this.minStackPos = s[r].pos);
903
- return null;
904
- }
905
- stopAt(t) {
906
- if (this.stoppedAt != null && this.stoppedAt < t)
907
- throw new RangeError("Can't move stoppedAt forward");
908
- this.stoppedAt = t;
909
- }
910
- // Returns an updated version of the given stack, or null if the
911
- // stack can't advance normally. When `split` and `stacks` are
912
- // given, stacks split off by ambiguous operations will be pushed to
913
- // `split`, or added to `stacks` if they move `pos` forward.
914
- advanceStack(t, e, s) {
915
- let i = t.pos, { parser: h } = this, r = g ? this.stackID(t) + " -> " : "";
916
- if (this.stoppedAt != null && i > this.stoppedAt)
917
- return t.forceReduce() ? t : null;
918
- if (this.fragments) {
919
- let a = t.curContext && t.curContext.tracker.strict, u = a ? t.curContext.hash : 0;
920
- for (let f = this.fragments.nodeAt(i); f; ) {
921
- let p = this.parser.nodeSet.types[f.type.id] == f.type ? h.getGoto(t.state, f.type.id) : -1;
922
- if (p > -1 && f.length && (!a || (f.prop(y.contextHash) || 0) == u))
923
- return t.useNode(f, p), g && console.log(r + this.stackID(t) + ` (via reuse of ${h.getName(f.type.id)})`), !0;
924
- if (!(f instanceof S) || f.children.length == 0 || f.positions[0] > 0)
925
- break;
926
- let c = f.children[0];
927
- if (c instanceof S && f.positions[0] == 0)
928
- f = c;
929
- else
930
- break;
931
- }
932
- }
933
- let n = h.stateSlot(
934
- t.state,
935
- 4
936
- /* ParseState.DefaultReduce */
937
- );
938
- if (n > 0)
939
- return t.reduce(n), g && console.log(r + this.stackID(t) + ` (via always-reduce ${h.getName(
940
- n & 65535
941
- /* Action.ValueMask */
942
- )})`), !0;
943
- if (t.stack.length >= 8400)
944
- for (; t.stack.length > 6e3 && t.forceReduce(); )
945
- ;
946
- let o = this.tokens.getActions(t);
947
- for (let a = 0; a < o.length; ) {
948
- let u = o[a++], f = o[a++], p = o[a++], c = a == o.length || !s, d = c ? t : t.split(), b = this.tokens.mainToken;
949
- if (d.apply(u, f, b ? b.start : d.pos, p), g && console.log(r + this.stackID(d) + ` (via ${(u & 65536) == 0 ? "shift" : `reduce of ${h.getName(
950
- u & 65535
951
- /* Action.ValueMask */
952
- )}`} for ${h.getName(f)} @ ${i}${d == t ? "" : ", split"})`), c)
953
- return !0;
954
- d.pos > i ? e.push(d) : s.push(d);
955
- }
956
- return !1;
957
- }
958
- // Advance a given stack forward as far as it will go. Returns the
959
- // (possibly updated) stack if it got stuck, or null if it moved
960
- // forward and was given to `pushStackDedup`.
961
- advanceFully(t, e) {
962
- let s = t.pos;
963
- for (; ; ) {
964
- if (!this.advanceStack(t, null, null))
965
- return !1;
966
- if (t.pos > s)
967
- return D(t, e), !0;
968
- }
969
- }
970
- runRecovery(t, e, s) {
971
- let i = null, h = !1;
972
- for (let r = 0; r < t.length; r++) {
973
- let n = t[r], o = e[r << 1], a = e[(r << 1) + 1], u = g ? this.stackID(n) + " -> " : "";
974
- if (n.deadEnd && (h || (h = !0, n.restart(), g && console.log(u + this.stackID(n) + " (restarted)"), this.advanceFully(n, s))))
975
- continue;
976
- let f = n.split(), p = u;
977
- for (let c = 0; c < 10 && f.forceReduce() && (g && console.log(p + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, s)); c++)
978
- g && (p = this.stackID(f) + " -> ");
979
- for (let c of n.recoverByInsert(o))
980
- g && console.log(u + this.stackID(c) + " (via recover-insert)"), this.advanceFully(c, s);
981
- this.stream.end > n.pos ? (a == n.pos && (a++, o = 0), n.recoverByDelete(o, a), g && console.log(u + this.stackID(n) + ` (via recover-delete ${this.parser.getName(o)})`), D(n, s)) : (!i || i.score < n.score) && (i = n);
982
- }
983
- return i;
984
- }
985
- // Convert the stack's buffer to a syntax tree.
986
- stackToTree(t) {
987
- return t.close(), S.build({
988
- buffer: A.create(t),
989
- nodeSet: this.parser.nodeSet,
990
- topID: this.topTerm,
991
- maxBufferLength: this.parser.bufferLength,
992
- reused: this.reused,
993
- start: this.ranges[0].from,
994
- length: t.pos - this.ranges[0].from,
995
- minRepeatType: this.parser.minRepeatTerm
996
- });
997
- }
998
- stackID(t) {
999
- let e = (T || (T = /* @__PURE__ */ new WeakMap())).get(t);
1000
- return e || T.set(t, e = String.fromCodePoint(this.nextStackID++)), e + t;
1001
- }
1002
- }
1003
- function D(l, t) {
1004
- for (let e = 0; e < t.length; e++) {
1005
- let s = t[e];
1006
- if (s.pos == l.pos && s.sameState(l)) {
1007
- t[e].score < l.score && (t[e] = l);
1008
- return;
1009
- }
1010
- }
1011
- t.push(l);
1012
- }
1013
- class Q {
1014
- constructor(t, e, s) {
1015
- this.source = t, this.flags = e, this.disabled = s;
1016
- }
1017
- allows(t) {
1018
- return !this.disabled || this.disabled[t] == 0;
1019
- }
1020
- }
1021
- const C = (l) => l;
1022
- class Z {
1023
- /**
1024
- Define a context tracker.
1025
- */
1026
- constructor(t) {
1027
- this.start = t.start, this.shift = t.shift || C, this.reduce = t.reduce || C, this.reuse = t.reuse || C, this.hash = t.hash || (() => 0), this.strict = t.strict !== !1;
1028
- }
1029
- }
1030
- class w extends L {
1031
- /**
1032
- @internal
1033
- */
1034
- constructor(t) {
1035
- if (super(), this.wrappers = [], t.version != 14)
1036
- throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);
1037
- let e = t.nodeNames.split(" ");
1038
- this.minRepeatTerm = e.length;
1039
- for (let n = 0; n < t.repeatNodeCount; n++)
1040
- e.push("");
1041
- let s = Object.keys(t.topRules).map((n) => t.topRules[n][1]), i = [];
1042
- for (let n = 0; n < e.length; n++)
1043
- i.push([]);
1044
- function h(n, o, a) {
1045
- i[n].push([o, o.deserialize(String(a))]);
1046
- }
1047
- if (t.nodeProps)
1048
- for (let n of t.nodeProps) {
1049
- let o = n[0];
1050
- typeof o == "string" && (o = y[o]);
1051
- for (let a = 1; a < n.length; ) {
1052
- let u = n[a++];
1053
- if (u >= 0)
1054
- h(u, o, n[a++]);
1055
- else {
1056
- let f = n[a + -u];
1057
- for (let p = -u; p > 0; p--)
1058
- h(n[a++], o, f);
1059
- a++;
1060
- }
1061
- }
1062
- }
1063
- this.nodeSet = new M(e.map((n, o) => $.define({
1064
- name: o >= this.minRepeatTerm ? void 0 : n,
1065
- id: o,
1066
- props: i[o],
1067
- top: s.indexOf(o) > -1,
1068
- error: o == 0,
1069
- skipped: t.skippedNodes && t.skippedNodes.indexOf(o) > -1
1070
- }))), t.propSources && (this.nodeSet = this.nodeSet.extend(...t.propSources)), this.strict = !1, this.bufferLength = E;
1071
- let r = x(t.tokenData);
1072
- this.context = t.context, this.specializerSpecs = t.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
1073
- for (let n = 0; n < this.specializerSpecs.length; n++)
1074
- this.specialized[n] = this.specializerSpecs[n].term;
1075
- this.specializers = this.specializerSpecs.map(B), this.states = x(t.states, Uint32Array), this.data = x(t.stateData), this.goto = x(t.goto), this.maxTerm = t.maxTerm, this.tokenizers = t.tokenizers.map((n) => typeof n == "number" ? new m(r, n) : n), this.topRules = t.topRules, this.dialects = t.dialects || {}, this.dynamicPrecedences = t.dynamicPrecedences || null, this.tokenPrecTable = t.tokenPrec, this.termNames = t.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
1076
- }
1077
- createParse(t, e, s) {
1078
- let i = new K(this, t, e, s);
1079
- for (let h of this.wrappers)
1080
- i = h(i, t, e, s);
1081
- return i;
1082
- }
1083
- /**
1084
- Get a goto table entry @internal
1085
- */
1086
- getGoto(t, e, s = !1) {
1087
- let i = this.goto;
1088
- if (e >= i[0])
1089
- return -1;
1090
- for (let h = i[e + 1]; ; ) {
1091
- let r = i[h++], n = r & 1, o = i[h++];
1092
- if (n && s)
1093
- return o;
1094
- for (let a = h + (r >> 1); h < a; h++)
1095
- if (i[h] == t)
1096
- return o;
1097
- if (n)
1098
- return -1;
1099
- }
1100
- }
1101
- /**
1102
- Check if this state has an action for a given terminal @internal
1103
- */
1104
- hasAction(t, e) {
1105
- let s = this.data;
1106
- for (let i = 0; i < 2; i++)
1107
- for (let h = this.stateSlot(
1108
- t,
1109
- i ? 2 : 1
1110
- /* ParseState.Actions */
1111
- ), r; ; h += 3) {
1112
- if ((r = s[h]) == 65535)
1113
- if (s[h + 1] == 1)
1114
- r = s[h = k(s, h + 2)];
1115
- else {
1116
- if (s[h + 1] == 2)
1117
- return k(s, h + 2);
1118
- break;
1119
- }
1120
- if (r == e || r == 0)
1121
- return k(s, h + 1);
1122
- }
1123
- return 0;
1124
- }
1125
- /**
1126
- @internal
1127
- */
1128
- stateSlot(t, e) {
1129
- return this.states[t * 6 + e];
1130
- }
1131
- /**
1132
- @internal
1133
- */
1134
- stateFlag(t, e) {
1135
- return (this.stateSlot(
1136
- t,
1137
- 0
1138
- /* ParseState.Flags */
1139
- ) & e) > 0;
1140
- }
1141
- /**
1142
- @internal
1143
- */
1144
- validAction(t, e) {
1145
- return !!this.allActions(t, (s) => s == e ? !0 : null);
1146
- }
1147
- /**
1148
- @internal
1149
- */
1150
- allActions(t, e) {
1151
- let s = this.stateSlot(
1152
- t,
1153
- 4
1154
- /* ParseState.DefaultReduce */
1155
- ), i = s ? e(s) : void 0;
1156
- for (let h = this.stateSlot(
1157
- t,
1158
- 1
1159
- /* ParseState.Actions */
1160
- ); i == null; h += 3) {
1161
- if (this.data[h] == 65535)
1162
- if (this.data[h + 1] == 1)
1163
- h = k(this.data, h + 2);
1164
- else
1165
- break;
1166
- i = e(k(this.data, h + 1));
1167
- }
1168
- return i;
1169
- }
1170
- /**
1171
- Get the states that can follow this one through shift actions or
1172
- goto jumps. @internal
1173
- */
1174
- nextStates(t) {
1175
- let e = [];
1176
- for (let s = this.stateSlot(
1177
- t,
1178
- 1
1179
- /* ParseState.Actions */
1180
- ); ; s += 3) {
1181
- if (this.data[s] == 65535)
1182
- if (this.data[s + 1] == 1)
1183
- s = k(this.data, s + 2);
1184
- else
1185
- break;
1186
- if ((this.data[s + 2] & 1) == 0) {
1187
- let i = this.data[s + 1];
1188
- e.some((h, r) => r & 1 && h == i) || e.push(this.data[s], i);
1189
- }
1190
- }
1191
- return e;
1192
- }
1193
- /**
1194
- Configure the parser. Returns a new parser instance that has the
1195
- given settings modified. Settings not provided in `config` are
1196
- kept from the original parser.
1197
- */
1198
- configure(t) {
1199
- let e = Object.assign(Object.create(w.prototype), this);
1200
- if (t.props && (e.nodeSet = this.nodeSet.extend(...t.props)), t.top) {
1201
- let s = this.topRules[t.top];
1202
- if (!s)
1203
- throw new RangeError(`Invalid top rule name ${t.top}`);
1204
- e.top = s;
1205
- }
1206
- return t.tokenizers && (e.tokenizers = this.tokenizers.map((s) => {
1207
- let i = t.tokenizers.find((h) => h.from == s);
1208
- return i ? i.to : s;
1209
- })), t.specializers && (e.specializers = this.specializers.slice(), e.specializerSpecs = this.specializerSpecs.map((s, i) => {
1210
- let h = t.specializers.find((n) => n.from == s.external);
1211
- if (!h)
1212
- return s;
1213
- let r = Object.assign(Object.assign({}, s), { external: h.to });
1214
- return e.specializers[i] = B(r), r;
1215
- })), t.contextTracker && (e.context = t.contextTracker), t.dialect && (e.dialect = this.parseDialect(t.dialect)), t.strict != null && (e.strict = t.strict), t.wrap && (e.wrappers = e.wrappers.concat(t.wrap)), t.bufferLength != null && (e.bufferLength = t.bufferLength), e;
1216
- }
1217
- /**
1218
- Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
1219
- are registered for this parser.
1220
- */
1221
- hasWrappers() {
1222
- return this.wrappers.length > 0;
1223
- }
1224
- /**
1225
- Returns the name associated with a given term. This will only
1226
- work for all terms when the parser was generated with the
1227
- `--names` option. By default, only the names of tagged terms are
1228
- stored.
1229
- */
1230
- getName(t) {
1231
- return this.termNames ? this.termNames[t] : String(t <= this.maxNode && this.nodeSet.types[t].name || t);
1232
- }
1233
- /**
1234
- The eof term id is always allocated directly after the node
1235
- types. @internal
1236
- */
1237
- get eofTerm() {
1238
- return this.maxNode + 1;
1239
- }
1240
- /**
1241
- The type of top node produced by the parser.
1242
- */
1243
- get topNode() {
1244
- return this.nodeSet.types[this.top[1]];
1245
- }
1246
- /**
1247
- @internal
1248
- */
1249
- dynamicPrecedence(t) {
1250
- let e = this.dynamicPrecedences;
1251
- return e == null ? 0 : e[t] || 0;
1252
- }
1253
- /**
1254
- @internal
1255
- */
1256
- parseDialect(t) {
1257
- let e = Object.keys(this.dialects), s = e.map(() => !1);
1258
- if (t)
1259
- for (let h of t.split(" ")) {
1260
- let r = e.indexOf(h);
1261
- r >= 0 && (s[r] = !0);
1262
- }
1263
- let i = null;
1264
- for (let h = 0; h < e.length; h++)
1265
- if (!s[h])
1266
- for (let r = this.dialects[e[h]], n; (n = this.data[r++]) != 65535; )
1267
- (i || (i = new Uint8Array(this.maxTerm + 1)))[n] = 1;
1268
- return new Q(t, s, i);
1269
- }
1270
- /**
1271
- Used by the output of the parser generator. Not available to
1272
- user code. @hide
1273
- */
1274
- static deserialize(t) {
1275
- return new w(t);
1276
- }
1277
- }
1278
- function k(l, t) {
1279
- return l[t] | l[t + 1] << 16;
1280
- }
1281
- function V(l) {
1282
- let t = null;
1283
- for (let e of l) {
1284
- let s = e.p.stoppedAt;
1285
- (e.pos == e.p.stream.end || s != null && e.pos > s) && e.p.parser.stateFlag(
1286
- e.state,
1287
- 2
1288
- /* StateFlag.Accepting */
1289
- ) && (!t || t.score < e.score) && (t = e);
1290
- }
1291
- return t;
1292
- }
1293
- function B(l) {
1294
- if (l.external) {
1295
- let t = l.extend ? 1 : 0;
1296
- return (e, s) => l.external(e, s) << 1 | t;
1297
- }
1298
- return l.get;
1299
- }
1300
- export {
1301
- Z as C,
1302
- Y as E,
1303
- w as L,
1304
- H as a
1305
- };
1306
- //# sourceMappingURL=index-B8srnV19.js.map