@songtonyli/dsh-cli 0.1.19 → 0.1.21

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 (1212) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  4. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
  5. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +14 -16
  6. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +14 -16
  7. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +802 -387
  8. package/node_modules/@deepseek-ai/dsh-tui-app/package.json +4 -1
  9. package/node_modules/@shikijs/core/LICENSE +22 -0
  10. package/node_modules/@shikijs/core/README.md +5 -0
  11. package/node_modules/@shikijs/core/dist/index.mjs +1425 -0
  12. package/node_modules/@shikijs/core/dist/textmate.mjs +2 -0
  13. package/node_modules/@shikijs/core/dist/types.mjs +2 -0
  14. package/node_modules/@shikijs/core/package.json +55 -0
  15. package/node_modules/@shikijs/engine-javascript/LICENSE +22 -0
  16. package/node_modules/@shikijs/engine-javascript/README.md +9 -0
  17. package/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs +47 -0
  18. package/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs +27 -0
  19. package/node_modules/@shikijs/engine-javascript/dist/index.mjs +4 -0
  20. package/node_modules/@shikijs/engine-javascript/dist/scanner-DX8LRFGE.mjs +77 -0
  21. package/node_modules/@shikijs/engine-javascript/package.json +38 -0
  22. package/node_modules/@shikijs/engine-oniguruma/LICENSE +22 -0
  23. package/node_modules/@shikijs/engine-oniguruma/README.md +9 -0
  24. package/node_modules/@shikijs/engine-oniguruma/dist/index.mjs +449 -0
  25. package/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.mjs +8 -0
  26. package/node_modules/@shikijs/engine-oniguruma/package.json +41 -0
  27. package/node_modules/@shikijs/langs/LICENSE +22 -0
  28. package/node_modules/@shikijs/langs/README.md +7 -0
  29. package/node_modules/@shikijs/langs/dist/1c-query.mjs +2 -0
  30. package/node_modules/@shikijs/langs/dist/1c.mjs +2 -0
  31. package/node_modules/@shikijs/langs/dist/abap.mjs +5 -0
  32. package/node_modules/@shikijs/langs/dist/actionscript-3.mjs +5 -0
  33. package/node_modules/@shikijs/langs/dist/actionscript.mjs +2 -0
  34. package/node_modules/@shikijs/langs/dist/ada.mjs +5 -0
  35. package/node_modules/@shikijs/langs/dist/adoc.mjs +2 -0
  36. package/node_modules/@shikijs/langs/dist/ahk.mjs +5 -0
  37. package/node_modules/@shikijs/langs/dist/ahk1.mjs +2 -0
  38. package/node_modules/@shikijs/langs/dist/ahk2.mjs +5 -0
  39. package/node_modules/@shikijs/langs/dist/angular-expression.mjs +5 -0
  40. package/node_modules/@shikijs/langs/dist/angular-html.mjs +16 -0
  41. package/node_modules/@shikijs/langs/dist/angular-inline-style.mjs +8 -0
  42. package/node_modules/@shikijs/langs/dist/angular-inline-template.mjs +10 -0
  43. package/node_modules/@shikijs/langs/dist/angular-let-declaration.mjs +8 -0
  44. package/node_modules/@shikijs/langs/dist/angular-template-blocks.mjs +10 -0
  45. package/node_modules/@shikijs/langs/dist/angular-template.mjs +8 -0
  46. package/node_modules/@shikijs/langs/dist/angular-ts.mjs +18 -0
  47. package/node_modules/@shikijs/langs/dist/apache.mjs +5 -0
  48. package/node_modules/@shikijs/langs/dist/apex.mjs +5 -0
  49. package/node_modules/@shikijs/langs/dist/apl.mjs +16 -0
  50. package/node_modules/@shikijs/langs/dist/applescript.mjs +5 -0
  51. package/node_modules/@shikijs/langs/dist/ara.mjs +5 -0
  52. package/node_modules/@shikijs/langs/dist/as3.mjs +2 -0
  53. package/node_modules/@shikijs/langs/dist/asciidoc.mjs +5 -0
  54. package/node_modules/@shikijs/langs/dist/asm.mjs +5 -0
  55. package/node_modules/@shikijs/langs/dist/astro.mjs +18 -0
  56. package/node_modules/@shikijs/langs/dist/awk.mjs +5 -0
  57. package/node_modules/@shikijs/langs/dist/ballerina.mjs +5 -0
  58. package/node_modules/@shikijs/langs/dist/bash.mjs +2 -0
  59. package/node_modules/@shikijs/langs/dist/bat.mjs +5 -0
  60. package/node_modules/@shikijs/langs/dist/batch.mjs +2 -0
  61. package/node_modules/@shikijs/langs/dist/be.mjs +2 -0
  62. package/node_modules/@shikijs/langs/dist/beancount.mjs +5 -0
  63. package/node_modules/@shikijs/langs/dist/berry.mjs +5 -0
  64. package/node_modules/@shikijs/langs/dist/bibtex.mjs +5 -0
  65. package/node_modules/@shikijs/langs/dist/bicep.mjs +5 -0
  66. package/node_modules/@shikijs/langs/dist/bird.mjs +2 -0
  67. package/node_modules/@shikijs/langs/dist/bird2.mjs +5 -0
  68. package/node_modules/@shikijs/langs/dist/blade.mjs +20 -0
  69. package/node_modules/@shikijs/langs/dist/bsl.mjs +8 -0
  70. package/node_modules/@shikijs/langs/dist/c.mjs +5 -0
  71. package/node_modules/@shikijs/langs/dist/c3.mjs +5 -0
  72. package/node_modules/@shikijs/langs/dist/cadence.mjs +5 -0
  73. package/node_modules/@shikijs/langs/dist/cairo.mjs +8 -0
  74. package/node_modules/@shikijs/langs/dist/cdc.mjs +2 -0
  75. package/node_modules/@shikijs/langs/dist/chapel.mjs +8 -0
  76. package/node_modules/@shikijs/langs/dist/chpl.mjs +2 -0
  77. package/node_modules/@shikijs/langs/dist/cjs.mjs +2 -0
  78. package/node_modules/@shikijs/langs/dist/clarity.mjs +5 -0
  79. package/node_modules/@shikijs/langs/dist/clj.mjs +2 -0
  80. package/node_modules/@shikijs/langs/dist/clojure.mjs +5 -0
  81. package/node_modules/@shikijs/langs/dist/closure-templates.mjs +2 -0
  82. package/node_modules/@shikijs/langs/dist/cmake.mjs +5 -0
  83. package/node_modules/@shikijs/langs/dist/cmd.mjs +2 -0
  84. package/node_modules/@shikijs/langs/dist/cobol.mjs +10 -0
  85. package/node_modules/@shikijs/langs/dist/codeowners.mjs +5 -0
  86. package/node_modules/@shikijs/langs/dist/codeql.mjs +5 -0
  87. package/node_modules/@shikijs/langs/dist/coffee.mjs +8 -0
  88. package/node_modules/@shikijs/langs/dist/coffeescript.mjs +2 -0
  89. package/node_modules/@shikijs/langs/dist/common-lisp.mjs +5 -0
  90. package/node_modules/@shikijs/langs/dist/console.mjs +2 -0
  91. package/node_modules/@shikijs/langs/dist/coq.mjs +5 -0
  92. package/node_modules/@shikijs/langs/dist/cpp-macro.mjs +10 -0
  93. package/node_modules/@shikijs/langs/dist/cpp.mjs +12 -0
  94. package/node_modules/@shikijs/langs/dist/cql.mjs +2 -0
  95. package/node_modules/@shikijs/langs/dist/crystal.mjs +18 -0
  96. package/node_modules/@shikijs/langs/dist/cs.mjs +2 -0
  97. package/node_modules/@shikijs/langs/dist/csharp.mjs +5 -0
  98. package/node_modules/@shikijs/langs/dist/css.mjs +5 -0
  99. package/node_modules/@shikijs/langs/dist/csv.mjs +5 -0
  100. package/node_modules/@shikijs/langs/dist/cts.mjs +2 -0
  101. package/node_modules/@shikijs/langs/dist/cue.mjs +5 -0
  102. package/node_modules/@shikijs/langs/dist/cypher.mjs +5 -0
  103. package/node_modules/@shikijs/langs/dist/d.mjs +5 -0
  104. package/node_modules/@shikijs/langs/dist/dart.mjs +5 -0
  105. package/node_modules/@shikijs/langs/dist/dax.mjs +5 -0
  106. package/node_modules/@shikijs/langs/dist/desktop.mjs +5 -0
  107. package/node_modules/@shikijs/langs/dist/diff.mjs +5 -0
  108. package/node_modules/@shikijs/langs/dist/docker.mjs +5 -0
  109. package/node_modules/@shikijs/langs/dist/dockerfile.mjs +2 -0
  110. package/node_modules/@shikijs/langs/dist/dotenv.mjs +5 -0
  111. package/node_modules/@shikijs/langs/dist/dream-maker.mjs +5 -0
  112. package/node_modules/@shikijs/langs/dist/edge.mjs +12 -0
  113. package/node_modules/@shikijs/langs/dist/elisp.mjs +2 -0
  114. package/node_modules/@shikijs/langs/dist/elixir.mjs +8 -0
  115. package/node_modules/@shikijs/langs/dist/elm.mjs +8 -0
  116. package/node_modules/@shikijs/langs/dist/emacs-lisp.mjs +5 -0
  117. package/node_modules/@shikijs/langs/dist/erb.mjs +10 -0
  118. package/node_modules/@shikijs/langs/dist/erl.mjs +2 -0
  119. package/node_modules/@shikijs/langs/dist/erlang.mjs +8 -0
  120. package/node_modules/@shikijs/langs/dist/es-tag-css.mjs +12 -0
  121. package/node_modules/@shikijs/langs/dist/es-tag-glsl.mjs +12 -0
  122. package/node_modules/@shikijs/langs/dist/es-tag-html.mjs +12 -0
  123. package/node_modules/@shikijs/langs/dist/es-tag-sql.mjs +10 -0
  124. package/node_modules/@shikijs/langs/dist/es-tag-xml.mjs +8 -0
  125. package/node_modules/@shikijs/langs/dist/f.mjs +2 -0
  126. package/node_modules/@shikijs/langs/dist/f03.mjs +2 -0
  127. package/node_modules/@shikijs/langs/dist/f08.mjs +2 -0
  128. package/node_modules/@shikijs/langs/dist/f18.mjs +2 -0
  129. package/node_modules/@shikijs/langs/dist/f77.mjs +2 -0
  130. package/node_modules/@shikijs/langs/dist/f90.mjs +2 -0
  131. package/node_modules/@shikijs/langs/dist/f95.mjs +2 -0
  132. package/node_modules/@shikijs/langs/dist/fennel.mjs +5 -0
  133. package/node_modules/@shikijs/langs/dist/fish.mjs +5 -0
  134. package/node_modules/@shikijs/langs/dist/fluent.mjs +5 -0
  135. package/node_modules/@shikijs/langs/dist/for.mjs +2 -0
  136. package/node_modules/@shikijs/langs/dist/fortran-fixed-form.mjs +8 -0
  137. package/node_modules/@shikijs/langs/dist/fortran-free-form.mjs +5 -0
  138. package/node_modules/@shikijs/langs/dist/fs.mjs +2 -0
  139. package/node_modules/@shikijs/langs/dist/fsharp.mjs +8 -0
  140. package/node_modules/@shikijs/langs/dist/fsl.mjs +2 -0
  141. package/node_modules/@shikijs/langs/dist/ftl.mjs +2 -0
  142. package/node_modules/@shikijs/langs/dist/gd.mjs +2 -0
  143. package/node_modules/@shikijs/langs/dist/gdresource.mjs +10 -0
  144. package/node_modules/@shikijs/langs/dist/gdscript.mjs +5 -0
  145. package/node_modules/@shikijs/langs/dist/gdshader.mjs +5 -0
  146. package/node_modules/@shikijs/langs/dist/genie.mjs +5 -0
  147. package/node_modules/@shikijs/langs/dist/gherkin.mjs +5 -0
  148. package/node_modules/@shikijs/langs/dist/git-commit.mjs +8 -0
  149. package/node_modules/@shikijs/langs/dist/git-rebase.mjs +8 -0
  150. package/node_modules/@shikijs/langs/dist/gjs.mjs +2 -0
  151. package/node_modules/@shikijs/langs/dist/gleam.mjs +5 -0
  152. package/node_modules/@shikijs/langs/dist/glimmer-js.mjs +14 -0
  153. package/node_modules/@shikijs/langs/dist/glimmer-ts.mjs +14 -0
  154. package/node_modules/@shikijs/langs/dist/glsl.mjs +8 -0
  155. package/node_modules/@shikijs/langs/dist/gn.mjs +5 -0
  156. package/node_modules/@shikijs/langs/dist/gnuplot.mjs +5 -0
  157. package/node_modules/@shikijs/langs/dist/go.mjs +5 -0
  158. package/node_modules/@shikijs/langs/dist/gql.mjs +2 -0
  159. package/node_modules/@shikijs/langs/dist/graphql.mjs +14 -0
  160. package/node_modules/@shikijs/langs/dist/groovy.mjs +5 -0
  161. package/node_modules/@shikijs/langs/dist/gts.mjs +2 -0
  162. package/node_modules/@shikijs/langs/dist/hack.mjs +10 -0
  163. package/node_modules/@shikijs/langs/dist/haml.mjs +10 -0
  164. package/node_modules/@shikijs/langs/dist/handlebars.mjs +14 -0
  165. package/node_modules/@shikijs/langs/dist/haskell.mjs +5 -0
  166. package/node_modules/@shikijs/langs/dist/haxe.mjs +5 -0
  167. package/node_modules/@shikijs/langs/dist/hbs.mjs +2 -0
  168. package/node_modules/@shikijs/langs/dist/hcl.mjs +5 -0
  169. package/node_modules/@shikijs/langs/dist/hjson.mjs +5 -0
  170. package/node_modules/@shikijs/langs/dist/hlsl.mjs +5 -0
  171. package/node_modules/@shikijs/langs/dist/hs.mjs +2 -0
  172. package/node_modules/@shikijs/langs/dist/html-derivative.mjs +8 -0
  173. package/node_modules/@shikijs/langs/dist/html.mjs +10 -0
  174. package/node_modules/@shikijs/langs/dist/http.mjs +14 -0
  175. package/node_modules/@shikijs/langs/dist/hurl.mjs +12 -0
  176. package/node_modules/@shikijs/langs/dist/hxml.mjs +8 -0
  177. package/node_modules/@shikijs/langs/dist/hy.mjs +5 -0
  178. package/node_modules/@shikijs/langs/dist/imba.mjs +5 -0
  179. package/node_modules/@shikijs/langs/dist/index.mjs +367 -0
  180. package/node_modules/@shikijs/langs/dist/ini.mjs +5 -0
  181. package/node_modules/@shikijs/langs/dist/jade.mjs +2 -0
  182. package/node_modules/@shikijs/langs/dist/java.mjs +5 -0
  183. package/node_modules/@shikijs/langs/dist/javascript.mjs +5 -0
  184. package/node_modules/@shikijs/langs/dist/jinja-html.mjs +8 -0
  185. package/node_modules/@shikijs/langs/dist/jinja.mjs +8 -0
  186. package/node_modules/@shikijs/langs/dist/jison.mjs +8 -0
  187. package/node_modules/@shikijs/langs/dist/jl.mjs +2 -0
  188. package/node_modules/@shikijs/langs/dist/js.mjs +2 -0
  189. package/node_modules/@shikijs/langs/dist/json.mjs +5 -0
  190. package/node_modules/@shikijs/langs/dist/json5.mjs +5 -0
  191. package/node_modules/@shikijs/langs/dist/jsonc.mjs +5 -0
  192. package/node_modules/@shikijs/langs/dist/jsonl.mjs +5 -0
  193. package/node_modules/@shikijs/langs/dist/jsonnet.mjs +5 -0
  194. package/node_modules/@shikijs/langs/dist/jssm.mjs +5 -0
  195. package/node_modules/@shikijs/langs/dist/jsx.mjs +5 -0
  196. package/node_modules/@shikijs/langs/dist/julia.mjs +16 -0
  197. package/node_modules/@shikijs/langs/dist/just.mjs +18 -0
  198. package/node_modules/@shikijs/langs/dist/justfile.mjs +2 -0
  199. package/node_modules/@shikijs/langs/dist/kdl.mjs +5 -0
  200. package/node_modules/@shikijs/langs/dist/kotlin.mjs +5 -0
  201. package/node_modules/@shikijs/langs/dist/kql.mjs +2 -0
  202. package/node_modules/@shikijs/langs/dist/kt.mjs +2 -0
  203. package/node_modules/@shikijs/langs/dist/kts.mjs +2 -0
  204. package/node_modules/@shikijs/langs/dist/kusto.mjs +5 -0
  205. package/node_modules/@shikijs/langs/dist/latex.mjs +8 -0
  206. package/node_modules/@shikijs/langs/dist/lean.mjs +5 -0
  207. package/node_modules/@shikijs/langs/dist/lean4.mjs +2 -0
  208. package/node_modules/@shikijs/langs/dist/less.mjs +5 -0
  209. package/node_modules/@shikijs/langs/dist/liquid.mjs +14 -0
  210. package/node_modules/@shikijs/langs/dist/lisp.mjs +2 -0
  211. package/node_modules/@shikijs/langs/dist/lit.mjs +2 -0
  212. package/node_modules/@shikijs/langs/dist/llvm.mjs +5 -0
  213. package/node_modules/@shikijs/langs/dist/log.mjs +5 -0
  214. package/node_modules/@shikijs/langs/dist/logo.mjs +5 -0
  215. package/node_modules/@shikijs/langs/dist/lua.mjs +8 -0
  216. package/node_modules/@shikijs/langs/dist/luau.mjs +5 -0
  217. package/node_modules/@shikijs/langs/dist/make.mjs +5 -0
  218. package/node_modules/@shikijs/langs/dist/makefile.mjs +2 -0
  219. package/node_modules/@shikijs/langs/dist/markdown-nix.mjs +5 -0
  220. package/node_modules/@shikijs/langs/dist/markdown-vue.mjs +5 -0
  221. package/node_modules/@shikijs/langs/dist/markdown.mjs +5 -0
  222. package/node_modules/@shikijs/langs/dist/marko.mjs +14 -0
  223. package/node_modules/@shikijs/langs/dist/matlab.mjs +5 -0
  224. package/node_modules/@shikijs/langs/dist/mbt.mjs +2 -0
  225. package/node_modules/@shikijs/langs/dist/mbti.mjs +2 -0
  226. package/node_modules/@shikijs/langs/dist/md.mjs +2 -0
  227. package/node_modules/@shikijs/langs/dist/mdc.mjs +12 -0
  228. package/node_modules/@shikijs/langs/dist/mdx.mjs +5 -0
  229. package/node_modules/@shikijs/langs/dist/mediawiki.mjs +2 -0
  230. package/node_modules/@shikijs/langs/dist/mermaid.mjs +5 -0
  231. package/node_modules/@shikijs/langs/dist/mips.mjs +2 -0
  232. package/node_modules/@shikijs/langs/dist/mipsasm.mjs +5 -0
  233. package/node_modules/@shikijs/langs/dist/mjs.mjs +2 -0
  234. package/node_modules/@shikijs/langs/dist/mmd.mjs +2 -0
  235. package/node_modules/@shikijs/langs/dist/mojo.mjs +5 -0
  236. package/node_modules/@shikijs/langs/dist/moonbit.mjs +5 -0
  237. package/node_modules/@shikijs/langs/dist/move.mjs +5 -0
  238. package/node_modules/@shikijs/langs/dist/mts.mjs +2 -0
  239. package/node_modules/@shikijs/langs/dist/nar.mjs +2 -0
  240. package/node_modules/@shikijs/langs/dist/narrat.mjs +5 -0
  241. package/node_modules/@shikijs/langs/dist/nextflow-groovy.mjs +5 -0
  242. package/node_modules/@shikijs/langs/dist/nextflow.mjs +8 -0
  243. package/node_modules/@shikijs/langs/dist/nf.mjs +2 -0
  244. package/node_modules/@shikijs/langs/dist/nginx.mjs +8 -0
  245. package/node_modules/@shikijs/langs/dist/nim.mjs +20 -0
  246. package/node_modules/@shikijs/langs/dist/nix.mjs +8 -0
  247. package/node_modules/@shikijs/langs/dist/nsis.mjs +5 -0
  248. package/node_modules/@shikijs/langs/dist/nu.mjs +2 -0
  249. package/node_modules/@shikijs/langs/dist/nushell.mjs +5 -0
  250. package/node_modules/@shikijs/langs/dist/objc.mjs +2 -0
  251. package/node_modules/@shikijs/langs/dist/objective-c.mjs +5 -0
  252. package/node_modules/@shikijs/langs/dist/objective-cpp.mjs +5 -0
  253. package/node_modules/@shikijs/langs/dist/ocaml.mjs +5 -0
  254. package/node_modules/@shikijs/langs/dist/odin.mjs +5 -0
  255. package/node_modules/@shikijs/langs/dist/openscad.mjs +5 -0
  256. package/node_modules/@shikijs/langs/dist/org.mjs +100 -0
  257. package/node_modules/@shikijs/langs/dist/pascal.mjs +5 -0
  258. package/node_modules/@shikijs/langs/dist/perl.mjs +16 -0
  259. package/node_modules/@shikijs/langs/dist/perl6.mjs +2 -0
  260. package/node_modules/@shikijs/langs/dist/php.mjs +18 -0
  261. package/node_modules/@shikijs/langs/dist/pkl.mjs +5 -0
  262. package/node_modules/@shikijs/langs/dist/plsql.mjs +5 -0
  263. package/node_modules/@shikijs/langs/dist/po.mjs +5 -0
  264. package/node_modules/@shikijs/langs/dist/polar.mjs +5 -0
  265. package/node_modules/@shikijs/langs/dist/postcss.mjs +5 -0
  266. package/node_modules/@shikijs/langs/dist/pot.mjs +2 -0
  267. package/node_modules/@shikijs/langs/dist/potx.mjs +2 -0
  268. package/node_modules/@shikijs/langs/dist/powerquery.mjs +5 -0
  269. package/node_modules/@shikijs/langs/dist/powershell.mjs +5 -0
  270. package/node_modules/@shikijs/langs/dist/prisma.mjs +5 -0
  271. package/node_modules/@shikijs/langs/dist/prolog.mjs +5 -0
  272. package/node_modules/@shikijs/langs/dist/properties.mjs +2 -0
  273. package/node_modules/@shikijs/langs/dist/proto.mjs +5 -0
  274. package/node_modules/@shikijs/langs/dist/protobuf.mjs +2 -0
  275. package/node_modules/@shikijs/langs/dist/ps.mjs +2 -0
  276. package/node_modules/@shikijs/langs/dist/ps1.mjs +2 -0
  277. package/node_modules/@shikijs/langs/dist/pug.mjs +12 -0
  278. package/node_modules/@shikijs/langs/dist/puppet.mjs +5 -0
  279. package/node_modules/@shikijs/langs/dist/purescript.mjs +5 -0
  280. package/node_modules/@shikijs/langs/dist/pwsh.mjs +2 -0
  281. package/node_modules/@shikijs/langs/dist/py.mjs +2 -0
  282. package/node_modules/@shikijs/langs/dist/python.mjs +5 -0
  283. package/node_modules/@shikijs/langs/dist/ql.mjs +2 -0
  284. package/node_modules/@shikijs/langs/dist/qml.mjs +8 -0
  285. package/node_modules/@shikijs/langs/dist/qmldir.mjs +5 -0
  286. package/node_modules/@shikijs/langs/dist/qss.mjs +5 -0
  287. package/node_modules/@shikijs/langs/dist/r.mjs +5 -0
  288. package/node_modules/@shikijs/langs/dist/racket.mjs +5 -0
  289. package/node_modules/@shikijs/langs/dist/raku.mjs +5 -0
  290. package/node_modules/@shikijs/langs/dist/razor.mjs +10 -0
  291. package/node_modules/@shikijs/langs/dist/rb.mjs +2 -0
  292. package/node_modules/@shikijs/langs/dist/rbs.mjs +5 -0
  293. package/node_modules/@shikijs/langs/dist/reg.mjs +5 -0
  294. package/node_modules/@shikijs/langs/dist/regex.mjs +2 -0
  295. package/node_modules/@shikijs/langs/dist/regexp.mjs +5 -0
  296. package/node_modules/@shikijs/langs/dist/rel.mjs +5 -0
  297. package/node_modules/@shikijs/langs/dist/riscv.mjs +5 -0
  298. package/node_modules/@shikijs/langs/dist/ron.mjs +5 -0
  299. package/node_modules/@shikijs/langs/dist/rosmsg.mjs +5 -0
  300. package/node_modules/@shikijs/langs/dist/rs.mjs +2 -0
  301. package/node_modules/@shikijs/langs/dist/rst.mjs +22 -0
  302. package/node_modules/@shikijs/langs/dist/ruby-signature.mjs +2 -0
  303. package/node_modules/@shikijs/langs/dist/ruby.mjs +30 -0
  304. package/node_modules/@shikijs/langs/dist/rust.mjs +5 -0
  305. package/node_modules/@shikijs/langs/dist/sas.mjs +8 -0
  306. package/node_modules/@shikijs/langs/dist/sass.mjs +5 -0
  307. package/node_modules/@shikijs/langs/dist/scad.mjs +2 -0
  308. package/node_modules/@shikijs/langs/dist/scala.mjs +5 -0
  309. package/node_modules/@shikijs/langs/dist/scheme.mjs +5 -0
  310. package/node_modules/@shikijs/langs/dist/scss.mjs +8 -0
  311. package/node_modules/@shikijs/langs/dist/sdbl.mjs +5 -0
  312. package/node_modules/@shikijs/langs/dist/sh.mjs +2 -0
  313. package/node_modules/@shikijs/langs/dist/shader.mjs +2 -0
  314. package/node_modules/@shikijs/langs/dist/shaderlab.mjs +8 -0
  315. package/node_modules/@shikijs/langs/dist/shell.mjs +2 -0
  316. package/node_modules/@shikijs/langs/dist/shellscript.mjs +5 -0
  317. package/node_modules/@shikijs/langs/dist/shellsession.mjs +8 -0
  318. package/node_modules/@shikijs/langs/dist/smalltalk.mjs +5 -0
  319. package/node_modules/@shikijs/langs/dist/smithy.mjs +5 -0
  320. package/node_modules/@shikijs/langs/dist/solidity.mjs +5 -0
  321. package/node_modules/@shikijs/langs/dist/soy.mjs +8 -0
  322. package/node_modules/@shikijs/langs/dist/sparql.mjs +8 -0
  323. package/node_modules/@shikijs/langs/dist/spl.mjs +2 -0
  324. package/node_modules/@shikijs/langs/dist/splunk.mjs +5 -0
  325. package/node_modules/@shikijs/langs/dist/sql.mjs +5 -0
  326. package/node_modules/@shikijs/langs/dist/ssh-config.mjs +5 -0
  327. package/node_modules/@shikijs/langs/dist/stata.mjs +8 -0
  328. package/node_modules/@shikijs/langs/dist/styl.mjs +2 -0
  329. package/node_modules/@shikijs/langs/dist/stylus.mjs +5 -0
  330. package/node_modules/@shikijs/langs/dist/surql.mjs +2 -0
  331. package/node_modules/@shikijs/langs/dist/surrealql.mjs +8 -0
  332. package/node_modules/@shikijs/langs/dist/svelte.mjs +14 -0
  333. package/node_modules/@shikijs/langs/dist/swift.mjs +5 -0
  334. package/node_modules/@shikijs/langs/dist/system-verilog.mjs +5 -0
  335. package/node_modules/@shikijs/langs/dist/systemd.mjs +5 -0
  336. package/node_modules/@shikijs/langs/dist/talon.mjs +2 -0
  337. package/node_modules/@shikijs/langs/dist/talonscript.mjs +5 -0
  338. package/node_modules/@shikijs/langs/dist/tasl.mjs +5 -0
  339. package/node_modules/@shikijs/langs/dist/tcl.mjs +5 -0
  340. package/node_modules/@shikijs/langs/dist/templ.mjs +12 -0
  341. package/node_modules/@shikijs/langs/dist/terraform.mjs +5 -0
  342. package/node_modules/@shikijs/langs/dist/tex.mjs +8 -0
  343. package/node_modules/@shikijs/langs/dist/tf.mjs +2 -0
  344. package/node_modules/@shikijs/langs/dist/tfvars.mjs +2 -0
  345. package/node_modules/@shikijs/langs/dist/toml.mjs +5 -0
  346. package/node_modules/@shikijs/langs/dist/tres.mjs +2 -0
  347. package/node_modules/@shikijs/langs/dist/ts-tags.mjs +18 -0
  348. package/node_modules/@shikijs/langs/dist/ts.mjs +2 -0
  349. package/node_modules/@shikijs/langs/dist/tscn.mjs +2 -0
  350. package/node_modules/@shikijs/langs/dist/tsp.mjs +2 -0
  351. package/node_modules/@shikijs/langs/dist/tsv.mjs +5 -0
  352. package/node_modules/@shikijs/langs/dist/tsx.mjs +5 -0
  353. package/node_modules/@shikijs/langs/dist/turtle.mjs +5 -0
  354. package/node_modules/@shikijs/langs/dist/twig.mjs +18 -0
  355. package/node_modules/@shikijs/langs/dist/typ.mjs +2 -0
  356. package/node_modules/@shikijs/langs/dist/typescript.mjs +5 -0
  357. package/node_modules/@shikijs/langs/dist/typespec.mjs +5 -0
  358. package/node_modules/@shikijs/langs/dist/typst.mjs +120 -0
  359. package/node_modules/@shikijs/langs/dist/v.mjs +5 -0
  360. package/node_modules/@shikijs/langs/dist/vala.mjs +5 -0
  361. package/node_modules/@shikijs/langs/dist/vb.mjs +5 -0
  362. package/node_modules/@shikijs/langs/dist/verilog.mjs +5 -0
  363. package/node_modules/@shikijs/langs/dist/vhdl.mjs +5 -0
  364. package/node_modules/@shikijs/langs/dist/vim.mjs +2 -0
  365. package/node_modules/@shikijs/langs/dist/viml.mjs +5 -0
  366. package/node_modules/@shikijs/langs/dist/vimscript.mjs +2 -0
  367. package/node_modules/@shikijs/langs/dist/vue-directives.mjs +5 -0
  368. package/node_modules/@shikijs/langs/dist/vue-html.mjs +8 -0
  369. package/node_modules/@shikijs/langs/dist/vue-interpolations.mjs +5 -0
  370. package/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.mjs +8 -0
  371. package/node_modules/@shikijs/langs/dist/vue-vine.mjs +18 -0
  372. package/node_modules/@shikijs/langs/dist/vue.mjs +26 -0
  373. package/node_modules/@shikijs/langs/dist/vy.mjs +2 -0
  374. package/node_modules/@shikijs/langs/dist/vyper.mjs +5 -0
  375. package/node_modules/@shikijs/langs/dist/wasm.mjs +5 -0
  376. package/node_modules/@shikijs/langs/dist/wenyan.mjs +5 -0
  377. package/node_modules/@shikijs/langs/dist/wgsl.mjs +5 -0
  378. package/node_modules/@shikijs/langs/dist/wiki.mjs +2 -0
  379. package/node_modules/@shikijs/langs/dist/wikitext.mjs +5 -0
  380. package/node_modules/@shikijs/langs/dist/wit.mjs +5 -0
  381. package/node_modules/@shikijs/langs/dist/wl.mjs +2 -0
  382. package/node_modules/@shikijs/langs/dist/wolfram.mjs +5 -0
  383. package/node_modules/@shikijs/langs/dist/xml.mjs +8 -0
  384. package/node_modules/@shikijs/langs/dist/xsl.mjs +8 -0
  385. package/node_modules/@shikijs/langs/dist/yaml.mjs +5 -0
  386. package/node_modules/@shikijs/langs/dist/yml.mjs +2 -0
  387. package/node_modules/@shikijs/langs/dist/zenscript.mjs +5 -0
  388. package/node_modules/@shikijs/langs/dist/zig.mjs +5 -0
  389. package/node_modules/@shikijs/langs/dist/zsh.mjs +2 -0
  390. package/node_modules/@shikijs/langs/package.json +398 -0
  391. package/node_modules/@shikijs/primitive/LICENSE +22 -0
  392. package/node_modules/@shikijs/primitive/dist/index.mjs +834 -0
  393. package/node_modules/@shikijs/primitive/dist/textmate.mjs +2 -0
  394. package/node_modules/@shikijs/primitive/dist/types.mjs +2 -0
  395. package/node_modules/@shikijs/primitive/package.json +51 -0
  396. package/node_modules/@shikijs/themes/LICENSE +22 -0
  397. package/node_modules/@shikijs/themes/README.md +7 -0
  398. package/node_modules/@shikijs/themes/dist/andromeeda.mjs +2 -0
  399. package/node_modules/@shikijs/themes/dist/aurora-x.mjs +2 -0
  400. package/node_modules/@shikijs/themes/dist/ayu-dark.mjs +2 -0
  401. package/node_modules/@shikijs/themes/dist/ayu-light.mjs +2 -0
  402. package/node_modules/@shikijs/themes/dist/ayu-mirage.mjs +2 -0
  403. package/node_modules/@shikijs/themes/dist/catppuccin-frappe.mjs +2 -0
  404. package/node_modules/@shikijs/themes/dist/catppuccin-latte.mjs +2 -0
  405. package/node_modules/@shikijs/themes/dist/catppuccin-macchiato.mjs +2 -0
  406. package/node_modules/@shikijs/themes/dist/catppuccin-mocha.mjs +2 -0
  407. package/node_modules/@shikijs/themes/dist/dark-plus.mjs +2 -0
  408. package/node_modules/@shikijs/themes/dist/dracula-soft.mjs +2 -0
  409. package/node_modules/@shikijs/themes/dist/dracula.mjs +2 -0
  410. package/node_modules/@shikijs/themes/dist/everforest-dark.mjs +2 -0
  411. package/node_modules/@shikijs/themes/dist/everforest-light.mjs +2 -0
  412. package/node_modules/@shikijs/themes/dist/github-dark-default.mjs +2 -0
  413. package/node_modules/@shikijs/themes/dist/github-dark-dimmed.mjs +2 -0
  414. package/node_modules/@shikijs/themes/dist/github-dark-high-contrast.mjs +2 -0
  415. package/node_modules/@shikijs/themes/dist/github-dark.mjs +2 -0
  416. package/node_modules/@shikijs/themes/dist/github-light-default.mjs +2 -0
  417. package/node_modules/@shikijs/themes/dist/github-light-high-contrast.mjs +2 -0
  418. package/node_modules/@shikijs/themes/dist/github-light.mjs +2 -0
  419. package/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.mjs +2 -0
  420. package/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.mjs +2 -0
  421. package/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.mjs +2 -0
  422. package/node_modules/@shikijs/themes/dist/gruvbox-light-hard.mjs +2 -0
  423. package/node_modules/@shikijs/themes/dist/gruvbox-light-medium.mjs +2 -0
  424. package/node_modules/@shikijs/themes/dist/gruvbox-light-soft.mjs +2 -0
  425. package/node_modules/@shikijs/themes/dist/horizon-bright.mjs +2 -0
  426. package/node_modules/@shikijs/themes/dist/horizon.mjs +2 -0
  427. package/node_modules/@shikijs/themes/dist/houston.mjs +2 -0
  428. package/node_modules/@shikijs/themes/dist/index.mjs +67 -0
  429. package/node_modules/@shikijs/themes/dist/kanagawa-dragon.mjs +2 -0
  430. package/node_modules/@shikijs/themes/dist/kanagawa-lotus.mjs +2 -0
  431. package/node_modules/@shikijs/themes/dist/kanagawa-wave.mjs +2 -0
  432. package/node_modules/@shikijs/themes/dist/laserwave.mjs +2 -0
  433. package/node_modules/@shikijs/themes/dist/light-plus.mjs +2 -0
  434. package/node_modules/@shikijs/themes/dist/material-theme-darker.mjs +2 -0
  435. package/node_modules/@shikijs/themes/dist/material-theme-lighter.mjs +2 -0
  436. package/node_modules/@shikijs/themes/dist/material-theme-ocean.mjs +2 -0
  437. package/node_modules/@shikijs/themes/dist/material-theme-palenight.mjs +2 -0
  438. package/node_modules/@shikijs/themes/dist/material-theme.mjs +2 -0
  439. package/node_modules/@shikijs/themes/dist/min-dark.mjs +2 -0
  440. package/node_modules/@shikijs/themes/dist/min-light.mjs +2 -0
  441. package/node_modules/@shikijs/themes/dist/monokai.mjs +2 -0
  442. package/node_modules/@shikijs/themes/dist/night-owl-light.mjs +2 -0
  443. package/node_modules/@shikijs/themes/dist/night-owl.mjs +2 -0
  444. package/node_modules/@shikijs/themes/dist/nord.mjs +2 -0
  445. package/node_modules/@shikijs/themes/dist/one-dark-pro.mjs +2 -0
  446. package/node_modules/@shikijs/themes/dist/one-light.mjs +2 -0
  447. package/node_modules/@shikijs/themes/dist/plastic.mjs +2 -0
  448. package/node_modules/@shikijs/themes/dist/poimandres.mjs +2 -0
  449. package/node_modules/@shikijs/themes/dist/red.mjs +2 -0
  450. package/node_modules/@shikijs/themes/dist/rose-pine-dawn.mjs +2 -0
  451. package/node_modules/@shikijs/themes/dist/rose-pine-moon.mjs +2 -0
  452. package/node_modules/@shikijs/themes/dist/rose-pine.mjs +2 -0
  453. package/node_modules/@shikijs/themes/dist/slack-dark.mjs +2 -0
  454. package/node_modules/@shikijs/themes/dist/slack-ochin.mjs +2 -0
  455. package/node_modules/@shikijs/themes/dist/snazzy-light.mjs +2 -0
  456. package/node_modules/@shikijs/themes/dist/solarized-dark.mjs +2 -0
  457. package/node_modules/@shikijs/themes/dist/solarized-light.mjs +2 -0
  458. package/node_modules/@shikijs/themes/dist/synthwave-84.mjs +2 -0
  459. package/node_modules/@shikijs/themes/dist/tokyo-night.mjs +2 -0
  460. package/node_modules/@shikijs/themes/dist/vesper.mjs +2 -0
  461. package/node_modules/@shikijs/themes/dist/vitesse-black.mjs +2 -0
  462. package/node_modules/@shikijs/themes/dist/vitesse-dark.mjs +2 -0
  463. package/node_modules/@shikijs/themes/dist/vitesse-light.mjs +2 -0
  464. package/node_modules/@shikijs/themes/package.json +103 -0
  465. package/node_modules/@shikijs/types/LICENSE +22 -0
  466. package/node_modules/@shikijs/types/README.md +7 -0
  467. package/node_modules/@shikijs/types/dist/index.mjs +9 -0
  468. package/node_modules/@shikijs/types/package.json +35 -0
  469. package/node_modules/@shikijs/vscode-textmate/LICENSE.md +21 -0
  470. package/node_modules/@shikijs/vscode-textmate/README.md +9 -0
  471. package/node_modules/@shikijs/vscode-textmate/dist/index.js +3216 -0
  472. package/node_modules/@shikijs/vscode-textmate/package.json +35 -0
  473. package/node_modules/@types/hast/LICENSE +21 -0
  474. package/node_modules/@types/hast/README.md +15 -0
  475. package/node_modules/@types/hast/package.json +47 -0
  476. package/node_modules/@types/mdast/LICENSE +21 -0
  477. package/node_modules/@types/mdast/README.md +15 -0
  478. package/node_modules/@types/mdast/package.json +46 -0
  479. package/node_modules/@types/unist/LICENSE +21 -0
  480. package/node_modules/@types/unist/README.md +15 -0
  481. package/node_modules/@types/unist/package.json +59 -0
  482. package/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml +31 -0
  483. package/node_modules/@ungap/structured-clone/LICENSE +15 -0
  484. package/node_modules/@ungap/structured-clone/README.md +95 -0
  485. package/node_modules/@ungap/structured-clone/cjs/deserialize.js +112 -0
  486. package/node_modules/@ungap/structured-clone/cjs/index.js +27 -0
  487. package/node_modules/@ungap/structured-clone/cjs/json.js +24 -0
  488. package/node_modules/@ungap/structured-clone/cjs/package.json +1 -0
  489. package/node_modules/@ungap/structured-clone/cjs/serialize.js +174 -0
  490. package/node_modules/@ungap/structured-clone/cjs/types.js +22 -0
  491. package/node_modules/@ungap/structured-clone/esm/deserialize.js +113 -0
  492. package/node_modules/@ungap/structured-clone/esm/index.js +25 -0
  493. package/node_modules/@ungap/structured-clone/esm/json.js +21 -0
  494. package/node_modules/@ungap/structured-clone/esm/serialize.js +175 -0
  495. package/node_modules/@ungap/structured-clone/esm/types.js +11 -0
  496. package/node_modules/@ungap/structured-clone/package.json +52 -0
  497. package/node_modules/@ungap/structured-clone/structured-json.js +1 -0
  498. package/node_modules/ccount/index.js +27 -0
  499. package/node_modules/ccount/license +22 -0
  500. package/node_modules/ccount/package.json +63 -0
  501. package/node_modules/ccount/readme.md +149 -0
  502. package/node_modules/character-entities-html4/index.js +259 -0
  503. package/node_modules/character-entities-html4/license +22 -0
  504. package/node_modules/character-entities-html4/package.json +70 -0
  505. package/node_modules/character-entities-html4/readme.md +153 -0
  506. package/node_modules/character-entities-legacy/index.js +113 -0
  507. package/node_modules/character-entities-legacy/license +22 -0
  508. package/node_modules/character-entities-legacy/package.json +68 -0
  509. package/node_modules/character-entities-legacy/readme.md +157 -0
  510. package/node_modules/comma-separated-tokens/index.js +74 -0
  511. package/node_modules/comma-separated-tokens/license +22 -0
  512. package/node_modules/comma-separated-tokens/package.json +64 -0
  513. package/node_modules/comma-separated-tokens/readme.md +167 -0
  514. package/node_modules/dequal/dist/index.js +86 -0
  515. package/node_modules/dequal/dist/index.min.js +1 -0
  516. package/node_modules/dequal/dist/index.mjs +84 -0
  517. package/node_modules/dequal/license +21 -0
  518. package/node_modules/dequal/lite/index.js +31 -0
  519. package/node_modules/dequal/lite/index.min.js +1 -0
  520. package/node_modules/dequal/lite/index.mjs +29 -0
  521. package/node_modules/dequal/package.json +51 -0
  522. package/node_modules/dequal/readme.md +112 -0
  523. package/node_modules/devlop/lib/default.js +9 -0
  524. package/node_modules/devlop/lib/development.js +238 -0
  525. package/node_modules/devlop/license +22 -0
  526. package/node_modules/devlop/package.json +70 -0
  527. package/node_modules/devlop/readme.md +360 -0
  528. package/node_modules/hast-util-to-html/index.js +8 -0
  529. package/node_modules/hast-util-to-html/lib/handle/comment.js +52 -0
  530. package/node_modules/hast-util-to-html/lib/handle/doctype.js +27 -0
  531. package/node_modules/hast-util-to-html/lib/handle/element.js +265 -0
  532. package/node_modules/hast-util-to-html/lib/handle/index.js +47 -0
  533. package/node_modules/hast-util-to-html/lib/handle/raw.js +27 -0
  534. package/node_modules/hast-util-to-html/lib/handle/root.js +22 -0
  535. package/node_modules/hast-util-to-html/lib/handle/text.js +38 -0
  536. package/node_modules/hast-util-to-html/lib/index.js +257 -0
  537. package/node_modules/hast-util-to-html/lib/omission/closing.js +358 -0
  538. package/node_modules/hast-util-to-html/lib/omission/omission.js +44 -0
  539. package/node_modules/hast-util-to-html/lib/omission/opening.js +148 -0
  540. package/node_modules/hast-util-to-html/lib/omission/util/siblings.js +50 -0
  541. package/node_modules/hast-util-to-html/license +22 -0
  542. package/node_modules/hast-util-to-html/package.json +99 -0
  543. package/node_modules/hast-util-to-html/readme.md +486 -0
  544. package/node_modules/hast-util-whitespace/index.js +1 -0
  545. package/node_modules/hast-util-whitespace/lib/index.js +34 -0
  546. package/node_modules/hast-util-whitespace/license +22 -0
  547. package/node_modules/hast-util-whitespace/package.json +75 -0
  548. package/node_modules/hast-util-whitespace/readme.md +231 -0
  549. package/node_modules/html-void-elements/index.js +27 -0
  550. package/node_modules/html-void-elements/license +22 -0
  551. package/node_modules/html-void-elements/package.json +70 -0
  552. package/node_modules/html-void-elements/readme.md +164 -0
  553. package/node_modules/mdast-util-to-hast/index.js +7 -0
  554. package/node_modules/mdast-util-to-hast/lib/footer.js +250 -0
  555. package/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +27 -0
  556. package/node_modules/mdast-util-to-hast/lib/handlers/break.js +22 -0
  557. package/node_modules/mdast-util-to-hast/lib/handlers/code.js +49 -0
  558. package/node_modules/mdast-util-to-hast/lib/handlers/delete.js +27 -0
  559. package/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +27 -0
  560. package/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +70 -0
  561. package/node_modules/mdast-util-to-hast/lib/handlers/heading.js +27 -0
  562. package/node_modules/mdast-util-to-hast/lib/handlers/html.js +28 -0
  563. package/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +39 -0
  564. package/node_modules/mdast-util-to-hast/lib/handlers/image.js +35 -0
  565. package/node_modules/mdast-util-to-hast/lib/handlers/index.js +68 -0
  566. package/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +31 -0
  567. package/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +44 -0
  568. package/node_modules/mdast-util-to-hast/lib/handlers/link.js +36 -0
  569. package/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +119 -0
  570. package/node_modules/mdast-util-to-hast/lib/handlers/list.js +52 -0
  571. package/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +27 -0
  572. package/node_modules/mdast-util-to-hast/lib/handlers/root.js +22 -0
  573. package/node_modules/mdast-util-to-hast/lib/handlers/strong.js +27 -0
  574. package/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +29 -0
  575. package/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +63 -0
  576. package/node_modules/mdast-util-to-hast/lib/handlers/table.js +61 -0
  577. package/node_modules/mdast-util-to-hast/lib/handlers/text.js +24 -0
  578. package/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +27 -0
  579. package/node_modules/mdast-util-to-hast/lib/index.js +106 -0
  580. package/node_modules/mdast-util-to-hast/lib/revert.js +49 -0
  581. package/node_modules/mdast-util-to-hast/lib/state.js +476 -0
  582. package/node_modules/mdast-util-to-hast/license +22 -0
  583. package/node_modules/mdast-util-to-hast/package.json +111 -0
  584. package/node_modules/mdast-util-to-hast/readme.md +1725 -0
  585. package/node_modules/micromark-util-character/dev/index.js +252 -0
  586. package/node_modules/micromark-util-character/index.js +246 -0
  587. package/node_modules/micromark-util-character/license +22 -0
  588. package/node_modules/micromark-util-character/package.json +54 -0
  589. package/node_modules/micromark-util-character/readme.md +446 -0
  590. package/node_modules/micromark-util-encode/index.js +33 -0
  591. package/node_modules/micromark-util-encode/license +22 -0
  592. package/node_modules/micromark-util-encode/package.json +47 -0
  593. package/node_modules/micromark-util-encode/readme.md +176 -0
  594. package/node_modules/micromark-util-sanitize-uri/dev/index.js +124 -0
  595. package/node_modules/micromark-util-sanitize-uri/index.js +107 -0
  596. package/node_modules/micromark-util-sanitize-uri/license +22 -0
  597. package/node_modules/micromark-util-sanitize-uri/package.json +56 -0
  598. package/node_modules/micromark-util-sanitize-uri/readme.md +214 -0
  599. package/node_modules/micromark-util-symbol/lib/codes.js +158 -0
  600. package/node_modules/micromark-util-symbol/lib/constants.js +44 -0
  601. package/node_modules/micromark-util-symbol/lib/default.js +4 -0
  602. package/node_modules/micromark-util-symbol/lib/types.js +453 -0
  603. package/node_modules/micromark-util-symbol/lib/values.js +109 -0
  604. package/node_modules/micromark-util-symbol/license +22 -0
  605. package/node_modules/micromark-util-symbol/package.json +43 -0
  606. package/node_modules/micromark-util-symbol/readme.md +168 -0
  607. package/node_modules/micromark-util-types/index.js +2 -0
  608. package/node_modules/micromark-util-types/license +22 -0
  609. package/node_modules/micromark-util-types/package.json +71 -0
  610. package/node_modules/micromark-util-types/readme.md +151 -0
  611. package/node_modules/oniguruma-parser/LICENSE +21 -0
  612. package/node_modules/oniguruma-parser/README.md +310 -0
  613. package/node_modules/oniguruma-parser/dist/bundle.js +2 -0
  614. package/node_modules/oniguruma-parser/dist/generator/generate.js +2 -0
  615. package/node_modules/oniguruma-parser/dist/index.js +2 -0
  616. package/node_modules/oniguruma-parser/dist/oniguruma-parser.min.js +904 -0
  617. package/node_modules/oniguruma-parser/dist/optimizer/optimizations.js +2 -0
  618. package/node_modules/oniguruma-parser/dist/optimizer/optimize.js +2 -0
  619. package/node_modules/oniguruma-parser/dist/optimizer/transforms/alternation-to-class.js +2 -0
  620. package/node_modules/oniguruma-parser/dist/optimizer/transforms/expose-anchors.js +2 -0
  621. package/node_modules/oniguruma-parser/dist/optimizer/transforms/extract-prefix-2.js +2 -0
  622. package/node_modules/oniguruma-parser/dist/optimizer/transforms/extract-prefix.js +2 -0
  623. package/node_modules/oniguruma-parser/dist/optimizer/transforms/extract-suffix.js +2 -0
  624. package/node_modules/oniguruma-parser/dist/optimizer/transforms/merge-ranges.js +2 -0
  625. package/node_modules/oniguruma-parser/dist/optimizer/transforms/optionalize.js +2 -0
  626. package/node_modules/oniguruma-parser/dist/optimizer/transforms/prevent-redos.js +2 -0
  627. package/node_modules/oniguruma-parser/dist/optimizer/transforms/remove-empty-groups.js +2 -0
  628. package/node_modules/oniguruma-parser/dist/optimizer/transforms/remove-useless-flags.js +2 -0
  629. package/node_modules/oniguruma-parser/dist/optimizer/transforms/simplify-callouts.js +2 -0
  630. package/node_modules/oniguruma-parser/dist/optimizer/transforms/unnest-useless-classes.js +2 -0
  631. package/node_modules/oniguruma-parser/dist/optimizer/transforms/unwrap-negation-wrappers.js +2 -0
  632. package/node_modules/oniguruma-parser/dist/optimizer/transforms/unwrap-useless-classes.js +2 -0
  633. package/node_modules/oniguruma-parser/dist/optimizer/transforms/unwrap-useless-groups.js +2 -0
  634. package/node_modules/oniguruma-parser/dist/optimizer/transforms/use-shorthands.js +2 -0
  635. package/node_modules/oniguruma-parser/dist/optimizer/transforms/use-unicode-aliases.js +2 -0
  636. package/node_modules/oniguruma-parser/dist/optimizer/transforms/use-unicode-props.js +2 -0
  637. package/node_modules/oniguruma-parser/dist/parser/node-utils.js +2 -0
  638. package/node_modules/oniguruma-parser/dist/parser/parse.js +2 -0
  639. package/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js +34 -0
  640. package/node_modules/oniguruma-parser/dist/traverser/traverse.js +2 -0
  641. package/node_modules/oniguruma-parser/dist/unicode.js +872 -0
  642. package/node_modules/oniguruma-parser/dist/utils.js +2 -0
  643. package/node_modules/oniguruma-parser/package.json +56 -0
  644. package/node_modules/oniguruma-to-es/LICENSE +21 -0
  645. package/node_modules/oniguruma-to-es/README.md +1110 -0
  646. package/node_modules/oniguruma-to-es/dist/cjs/index.js +3145 -0
  647. package/node_modules/oniguruma-to-es/dist/cjs/package.json +1 -0
  648. package/node_modules/oniguruma-to-es/dist/esm/index.js +1878 -0
  649. package/node_modules/oniguruma-to-es/dist/esm/package.json +1 -0
  650. package/node_modules/oniguruma-to-es/dist/index.min.js +142 -0
  651. package/node_modules/oniguruma-to-es/package.json +49 -0
  652. package/node_modules/property-information/index.js +17 -0
  653. package/node_modules/property-information/lib/aria.js +61 -0
  654. package/node_modules/property-information/lib/find.js +97 -0
  655. package/node_modules/property-information/lib/hast-to-react.js +30 -0
  656. package/node_modules/property-information/lib/html.js +332 -0
  657. package/node_modules/property-information/lib/normalize.js +12 -0
  658. package/node_modules/property-information/lib/svg.js +569 -0
  659. package/node_modules/property-information/lib/util/case-insensitive-transform.js +13 -0
  660. package/node_modules/property-information/lib/util/case-sensitive-transform.js +11 -0
  661. package/node_modules/property-information/lib/util/create.js +69 -0
  662. package/node_modules/property-information/lib/util/defined-info.js +60 -0
  663. package/node_modules/property-information/lib/util/info.js +32 -0
  664. package/node_modules/property-information/lib/util/merge.js +27 -0
  665. package/node_modules/property-information/lib/util/schema.js +29 -0
  666. package/node_modules/property-information/lib/util/types.js +13 -0
  667. package/node_modules/property-information/lib/xlink.js +17 -0
  668. package/node_modules/property-information/lib/xml.js +9 -0
  669. package/node_modules/property-information/lib/xmlns.js +9 -0
  670. package/node_modules/property-information/license +22 -0
  671. package/node_modules/property-information/package.json +76 -0
  672. package/node_modules/property-information/readme.md +1073 -0
  673. package/node_modules/regex/LICENSE +21 -0
  674. package/node_modules/regex/README.md +972 -0
  675. package/node_modules/regex/dist/cjs/package.json +1 -0
  676. package/node_modules/regex/dist/cjs/regex.js +1335 -0
  677. package/node_modules/regex/dist/esm/package.json +1 -0
  678. package/node_modules/regex/dist/esm/regex.js +1313 -0
  679. package/node_modules/regex/dist/regex.min.js +76 -0
  680. package/node_modules/regex/package.json +49 -0
  681. package/node_modules/regex/src/atomic.js +224 -0
  682. package/node_modules/regex/src/backcompat.js +64 -0
  683. package/node_modules/regex/src/flag-n.js +49 -0
  684. package/node_modules/regex/src/flag-x.js +198 -0
  685. package/node_modules/regex/src/internals.js +2 -0
  686. package/node_modules/regex/src/pattern.js +45 -0
  687. package/node_modules/regex/src/regex.js +389 -0
  688. package/node_modules/regex/src/subclass.js +98 -0
  689. package/node_modules/regex/src/subroutines.js +375 -0
  690. package/node_modules/regex/src/utils-internals.js +33 -0
  691. package/node_modules/regex/src/utils.js +401 -0
  692. package/node_modules/regex-recursion/LICENSE +21 -0
  693. package/node_modules/regex-recursion/README.md +151 -0
  694. package/node_modules/regex-recursion/dist/regex-recursion.min.js +2 -0
  695. package/node_modules/regex-recursion/package.json +39 -0
  696. package/node_modules/regex-recursion/src/index.js +365 -0
  697. package/node_modules/regex-utilities/LICENSE +21 -0
  698. package/node_modules/regex-utilities/README.md +78 -0
  699. package/node_modules/regex-utilities/package.json +27 -0
  700. package/node_modules/regex-utilities/src/index.js +170 -0
  701. package/node_modules/shiki/LICENSE +22 -0
  702. package/node_modules/shiki/README.md +15 -0
  703. package/node_modules/shiki/dist/bundle-full.mjs +25 -0
  704. package/node_modules/shiki/dist/bundle-web.mjs +347 -0
  705. package/node_modules/shiki/dist/core-unwasm.mjs +10 -0
  706. package/node_modules/shiki/dist/core.mjs +3 -0
  707. package/node_modules/shiki/dist/engine-javascript.mjs +2 -0
  708. package/node_modules/shiki/dist/engine-oniguruma.mjs +8 -0
  709. package/node_modules/shiki/dist/index.mjs +8 -0
  710. package/node_modules/shiki/dist/langs/1c-query.mjs +1 -0
  711. package/node_modules/shiki/dist/langs/1c.mjs +1 -0
  712. package/node_modules/shiki/dist/langs/abap.mjs +1 -0
  713. package/node_modules/shiki/dist/langs/actionscript-3.mjs +1 -0
  714. package/node_modules/shiki/dist/langs/actionscript.mjs +1 -0
  715. package/node_modules/shiki/dist/langs/ada.mjs +1 -0
  716. package/node_modules/shiki/dist/langs/adoc.mjs +1 -0
  717. package/node_modules/shiki/dist/langs/ahk.mjs +1 -0
  718. package/node_modules/shiki/dist/langs/ahk1.mjs +1 -0
  719. package/node_modules/shiki/dist/langs/ahk2.mjs +1 -0
  720. package/node_modules/shiki/dist/langs/angular-expression.mjs +1 -0
  721. package/node_modules/shiki/dist/langs/angular-html.mjs +1 -0
  722. package/node_modules/shiki/dist/langs/angular-inline-style.mjs +1 -0
  723. package/node_modules/shiki/dist/langs/angular-inline-template.mjs +1 -0
  724. package/node_modules/shiki/dist/langs/angular-let-declaration.mjs +1 -0
  725. package/node_modules/shiki/dist/langs/angular-template-blocks.mjs +1 -0
  726. package/node_modules/shiki/dist/langs/angular-template.mjs +1 -0
  727. package/node_modules/shiki/dist/langs/angular-ts.mjs +1 -0
  728. package/node_modules/shiki/dist/langs/apache.mjs +1 -0
  729. package/node_modules/shiki/dist/langs/apex.mjs +1 -0
  730. package/node_modules/shiki/dist/langs/apl.mjs +1 -0
  731. package/node_modules/shiki/dist/langs/applescript.mjs +1 -0
  732. package/node_modules/shiki/dist/langs/ara.mjs +1 -0
  733. package/node_modules/shiki/dist/langs/as3.mjs +1 -0
  734. package/node_modules/shiki/dist/langs/asciidoc.mjs +1 -0
  735. package/node_modules/shiki/dist/langs/asm.mjs +1 -0
  736. package/node_modules/shiki/dist/langs/astro.mjs +1 -0
  737. package/node_modules/shiki/dist/langs/awk.mjs +1 -0
  738. package/node_modules/shiki/dist/langs/ballerina.mjs +1 -0
  739. package/node_modules/shiki/dist/langs/bash.mjs +1 -0
  740. package/node_modules/shiki/dist/langs/bat.mjs +1 -0
  741. package/node_modules/shiki/dist/langs/batch.mjs +1 -0
  742. package/node_modules/shiki/dist/langs/be.mjs +1 -0
  743. package/node_modules/shiki/dist/langs/beancount.mjs +1 -0
  744. package/node_modules/shiki/dist/langs/berry.mjs +1 -0
  745. package/node_modules/shiki/dist/langs/bibtex.mjs +1 -0
  746. package/node_modules/shiki/dist/langs/bicep.mjs +1 -0
  747. package/node_modules/shiki/dist/langs/bird.mjs +1 -0
  748. package/node_modules/shiki/dist/langs/bird2.mjs +1 -0
  749. package/node_modules/shiki/dist/langs/blade.mjs +1 -0
  750. package/node_modules/shiki/dist/langs/bsl.mjs +1 -0
  751. package/node_modules/shiki/dist/langs/c.mjs +1 -0
  752. package/node_modules/shiki/dist/langs/c3.mjs +1 -0
  753. package/node_modules/shiki/dist/langs/cadence.mjs +1 -0
  754. package/node_modules/shiki/dist/langs/cairo.mjs +1 -0
  755. package/node_modules/shiki/dist/langs/cdc.mjs +1 -0
  756. package/node_modules/shiki/dist/langs/chapel.mjs +1 -0
  757. package/node_modules/shiki/dist/langs/chpl.mjs +1 -0
  758. package/node_modules/shiki/dist/langs/cjs.mjs +1 -0
  759. package/node_modules/shiki/dist/langs/clarity.mjs +1 -0
  760. package/node_modules/shiki/dist/langs/clj.mjs +1 -0
  761. package/node_modules/shiki/dist/langs/clojure.mjs +1 -0
  762. package/node_modules/shiki/dist/langs/closure-templates.mjs +1 -0
  763. package/node_modules/shiki/dist/langs/cmake.mjs +1 -0
  764. package/node_modules/shiki/dist/langs/cmd.mjs +1 -0
  765. package/node_modules/shiki/dist/langs/cobol.mjs +1 -0
  766. package/node_modules/shiki/dist/langs/codeowners.mjs +1 -0
  767. package/node_modules/shiki/dist/langs/codeql.mjs +1 -0
  768. package/node_modules/shiki/dist/langs/coffee.mjs +1 -0
  769. package/node_modules/shiki/dist/langs/coffeescript.mjs +1 -0
  770. package/node_modules/shiki/dist/langs/common-lisp.mjs +1 -0
  771. package/node_modules/shiki/dist/langs/console.mjs +1 -0
  772. package/node_modules/shiki/dist/langs/coq.mjs +1 -0
  773. package/node_modules/shiki/dist/langs/cpp-macro.mjs +1 -0
  774. package/node_modules/shiki/dist/langs/cpp.mjs +1 -0
  775. package/node_modules/shiki/dist/langs/cql.mjs +1 -0
  776. package/node_modules/shiki/dist/langs/crystal.mjs +1 -0
  777. package/node_modules/shiki/dist/langs/cs.mjs +1 -0
  778. package/node_modules/shiki/dist/langs/csharp.mjs +1 -0
  779. package/node_modules/shiki/dist/langs/css.mjs +1 -0
  780. package/node_modules/shiki/dist/langs/csv.mjs +1 -0
  781. package/node_modules/shiki/dist/langs/cts.mjs +1 -0
  782. package/node_modules/shiki/dist/langs/cue.mjs +1 -0
  783. package/node_modules/shiki/dist/langs/cypher.mjs +1 -0
  784. package/node_modules/shiki/dist/langs/d.mjs +1 -0
  785. package/node_modules/shiki/dist/langs/dart.mjs +1 -0
  786. package/node_modules/shiki/dist/langs/dax.mjs +1 -0
  787. package/node_modules/shiki/dist/langs/desktop.mjs +1 -0
  788. package/node_modules/shiki/dist/langs/diff.mjs +1 -0
  789. package/node_modules/shiki/dist/langs/docker.mjs +1 -0
  790. package/node_modules/shiki/dist/langs/dockerfile.mjs +1 -0
  791. package/node_modules/shiki/dist/langs/dotenv.mjs +1 -0
  792. package/node_modules/shiki/dist/langs/dream-maker.mjs +1 -0
  793. package/node_modules/shiki/dist/langs/edge.mjs +1 -0
  794. package/node_modules/shiki/dist/langs/elisp.mjs +1 -0
  795. package/node_modules/shiki/dist/langs/elixir.mjs +1 -0
  796. package/node_modules/shiki/dist/langs/elm.mjs +1 -0
  797. package/node_modules/shiki/dist/langs/emacs-lisp.mjs +1 -0
  798. package/node_modules/shiki/dist/langs/erb.mjs +1 -0
  799. package/node_modules/shiki/dist/langs/erl.mjs +1 -0
  800. package/node_modules/shiki/dist/langs/erlang.mjs +1 -0
  801. package/node_modules/shiki/dist/langs/es-tag-css.mjs +1 -0
  802. package/node_modules/shiki/dist/langs/es-tag-glsl.mjs +1 -0
  803. package/node_modules/shiki/dist/langs/es-tag-html.mjs +1 -0
  804. package/node_modules/shiki/dist/langs/es-tag-sql.mjs +1 -0
  805. package/node_modules/shiki/dist/langs/es-tag-xml.mjs +1 -0
  806. package/node_modules/shiki/dist/langs/f.mjs +1 -0
  807. package/node_modules/shiki/dist/langs/f03.mjs +1 -0
  808. package/node_modules/shiki/dist/langs/f08.mjs +1 -0
  809. package/node_modules/shiki/dist/langs/f18.mjs +1 -0
  810. package/node_modules/shiki/dist/langs/f77.mjs +1 -0
  811. package/node_modules/shiki/dist/langs/f90.mjs +1 -0
  812. package/node_modules/shiki/dist/langs/f95.mjs +1 -0
  813. package/node_modules/shiki/dist/langs/fennel.mjs +1 -0
  814. package/node_modules/shiki/dist/langs/fish.mjs +1 -0
  815. package/node_modules/shiki/dist/langs/fluent.mjs +1 -0
  816. package/node_modules/shiki/dist/langs/for.mjs +1 -0
  817. package/node_modules/shiki/dist/langs/fortran-fixed-form.mjs +1 -0
  818. package/node_modules/shiki/dist/langs/fortran-free-form.mjs +1 -0
  819. package/node_modules/shiki/dist/langs/fs.mjs +1 -0
  820. package/node_modules/shiki/dist/langs/fsharp.mjs +1 -0
  821. package/node_modules/shiki/dist/langs/fsl.mjs +1 -0
  822. package/node_modules/shiki/dist/langs/ftl.mjs +1 -0
  823. package/node_modules/shiki/dist/langs/gd.mjs +1 -0
  824. package/node_modules/shiki/dist/langs/gdresource.mjs +1 -0
  825. package/node_modules/shiki/dist/langs/gdscript.mjs +1 -0
  826. package/node_modules/shiki/dist/langs/gdshader.mjs +1 -0
  827. package/node_modules/shiki/dist/langs/genie.mjs +1 -0
  828. package/node_modules/shiki/dist/langs/gherkin.mjs +1 -0
  829. package/node_modules/shiki/dist/langs/git-commit.mjs +1 -0
  830. package/node_modules/shiki/dist/langs/git-rebase.mjs +1 -0
  831. package/node_modules/shiki/dist/langs/gjs.mjs +1 -0
  832. package/node_modules/shiki/dist/langs/gleam.mjs +1 -0
  833. package/node_modules/shiki/dist/langs/glimmer-js.mjs +1 -0
  834. package/node_modules/shiki/dist/langs/glimmer-ts.mjs +1 -0
  835. package/node_modules/shiki/dist/langs/glsl.mjs +1 -0
  836. package/node_modules/shiki/dist/langs/gn.mjs +1 -0
  837. package/node_modules/shiki/dist/langs/gnuplot.mjs +1 -0
  838. package/node_modules/shiki/dist/langs/go.mjs +1 -0
  839. package/node_modules/shiki/dist/langs/gql.mjs +1 -0
  840. package/node_modules/shiki/dist/langs/graphql.mjs +1 -0
  841. package/node_modules/shiki/dist/langs/groovy.mjs +1 -0
  842. package/node_modules/shiki/dist/langs/gts.mjs +1 -0
  843. package/node_modules/shiki/dist/langs/hack.mjs +1 -0
  844. package/node_modules/shiki/dist/langs/haml.mjs +1 -0
  845. package/node_modules/shiki/dist/langs/handlebars.mjs +1 -0
  846. package/node_modules/shiki/dist/langs/haskell.mjs +1 -0
  847. package/node_modules/shiki/dist/langs/haxe.mjs +1 -0
  848. package/node_modules/shiki/dist/langs/hbs.mjs +1 -0
  849. package/node_modules/shiki/dist/langs/hcl.mjs +1 -0
  850. package/node_modules/shiki/dist/langs/hjson.mjs +1 -0
  851. package/node_modules/shiki/dist/langs/hlsl.mjs +1 -0
  852. package/node_modules/shiki/dist/langs/hs.mjs +1 -0
  853. package/node_modules/shiki/dist/langs/html-derivative.mjs +1 -0
  854. package/node_modules/shiki/dist/langs/html.mjs +1 -0
  855. package/node_modules/shiki/dist/langs/http.mjs +1 -0
  856. package/node_modules/shiki/dist/langs/hurl.mjs +1 -0
  857. package/node_modules/shiki/dist/langs/hxml.mjs +1 -0
  858. package/node_modules/shiki/dist/langs/hy.mjs +1 -0
  859. package/node_modules/shiki/dist/langs/imba.mjs +1 -0
  860. package/node_modules/shiki/dist/langs/ini.mjs +1 -0
  861. package/node_modules/shiki/dist/langs/jade.mjs +1 -0
  862. package/node_modules/shiki/dist/langs/java.mjs +1 -0
  863. package/node_modules/shiki/dist/langs/javascript.mjs +1 -0
  864. package/node_modules/shiki/dist/langs/jinja-html.mjs +1 -0
  865. package/node_modules/shiki/dist/langs/jinja.mjs +1 -0
  866. package/node_modules/shiki/dist/langs/jison.mjs +1 -0
  867. package/node_modules/shiki/dist/langs/jl.mjs +1 -0
  868. package/node_modules/shiki/dist/langs/js.mjs +1 -0
  869. package/node_modules/shiki/dist/langs/json.mjs +1 -0
  870. package/node_modules/shiki/dist/langs/json5.mjs +1 -0
  871. package/node_modules/shiki/dist/langs/jsonc.mjs +1 -0
  872. package/node_modules/shiki/dist/langs/jsonl.mjs +1 -0
  873. package/node_modules/shiki/dist/langs/jsonnet.mjs +1 -0
  874. package/node_modules/shiki/dist/langs/jssm.mjs +1 -0
  875. package/node_modules/shiki/dist/langs/jsx.mjs +1 -0
  876. package/node_modules/shiki/dist/langs/julia.mjs +1 -0
  877. package/node_modules/shiki/dist/langs/just.mjs +1 -0
  878. package/node_modules/shiki/dist/langs/justfile.mjs +1 -0
  879. package/node_modules/shiki/dist/langs/kdl.mjs +1 -0
  880. package/node_modules/shiki/dist/langs/kotlin.mjs +1 -0
  881. package/node_modules/shiki/dist/langs/kql.mjs +1 -0
  882. package/node_modules/shiki/dist/langs/kt.mjs +1 -0
  883. package/node_modules/shiki/dist/langs/kts.mjs +1 -0
  884. package/node_modules/shiki/dist/langs/kusto.mjs +1 -0
  885. package/node_modules/shiki/dist/langs/latex.mjs +1 -0
  886. package/node_modules/shiki/dist/langs/lean.mjs +1 -0
  887. package/node_modules/shiki/dist/langs/lean4.mjs +1 -0
  888. package/node_modules/shiki/dist/langs/less.mjs +1 -0
  889. package/node_modules/shiki/dist/langs/liquid.mjs +1 -0
  890. package/node_modules/shiki/dist/langs/lisp.mjs +1 -0
  891. package/node_modules/shiki/dist/langs/lit.mjs +1 -0
  892. package/node_modules/shiki/dist/langs/llvm.mjs +1 -0
  893. package/node_modules/shiki/dist/langs/log.mjs +1 -0
  894. package/node_modules/shiki/dist/langs/logo.mjs +1 -0
  895. package/node_modules/shiki/dist/langs/lua.mjs +1 -0
  896. package/node_modules/shiki/dist/langs/luau.mjs +1 -0
  897. package/node_modules/shiki/dist/langs/make.mjs +1 -0
  898. package/node_modules/shiki/dist/langs/makefile.mjs +1 -0
  899. package/node_modules/shiki/dist/langs/markdown-nix.mjs +1 -0
  900. package/node_modules/shiki/dist/langs/markdown-vue.mjs +1 -0
  901. package/node_modules/shiki/dist/langs/markdown.mjs +1 -0
  902. package/node_modules/shiki/dist/langs/marko.mjs +1 -0
  903. package/node_modules/shiki/dist/langs/matlab.mjs +1 -0
  904. package/node_modules/shiki/dist/langs/mbt.mjs +1 -0
  905. package/node_modules/shiki/dist/langs/mbti.mjs +1 -0
  906. package/node_modules/shiki/dist/langs/md.mjs +1 -0
  907. package/node_modules/shiki/dist/langs/mdc.mjs +1 -0
  908. package/node_modules/shiki/dist/langs/mdx.mjs +1 -0
  909. package/node_modules/shiki/dist/langs/mediawiki.mjs +1 -0
  910. package/node_modules/shiki/dist/langs/mermaid.mjs +1 -0
  911. package/node_modules/shiki/dist/langs/mips.mjs +1 -0
  912. package/node_modules/shiki/dist/langs/mipsasm.mjs +1 -0
  913. package/node_modules/shiki/dist/langs/mjs.mjs +1 -0
  914. package/node_modules/shiki/dist/langs/mmd.mjs +1 -0
  915. package/node_modules/shiki/dist/langs/mojo.mjs +1 -0
  916. package/node_modules/shiki/dist/langs/moonbit.mjs +1 -0
  917. package/node_modules/shiki/dist/langs/move.mjs +1 -0
  918. package/node_modules/shiki/dist/langs/mts.mjs +1 -0
  919. package/node_modules/shiki/dist/langs/nar.mjs +1 -0
  920. package/node_modules/shiki/dist/langs/narrat.mjs +1 -0
  921. package/node_modules/shiki/dist/langs/nextflow-groovy.mjs +1 -0
  922. package/node_modules/shiki/dist/langs/nextflow.mjs +1 -0
  923. package/node_modules/shiki/dist/langs/nf.mjs +1 -0
  924. package/node_modules/shiki/dist/langs/nginx.mjs +1 -0
  925. package/node_modules/shiki/dist/langs/nim.mjs +1 -0
  926. package/node_modules/shiki/dist/langs/nix.mjs +1 -0
  927. package/node_modules/shiki/dist/langs/nsis.mjs +1 -0
  928. package/node_modules/shiki/dist/langs/nu.mjs +1 -0
  929. package/node_modules/shiki/dist/langs/nushell.mjs +1 -0
  930. package/node_modules/shiki/dist/langs/objc.mjs +1 -0
  931. package/node_modules/shiki/dist/langs/objective-c.mjs +1 -0
  932. package/node_modules/shiki/dist/langs/objective-cpp.mjs +1 -0
  933. package/node_modules/shiki/dist/langs/ocaml.mjs +1 -0
  934. package/node_modules/shiki/dist/langs/odin.mjs +1 -0
  935. package/node_modules/shiki/dist/langs/openscad.mjs +1 -0
  936. package/node_modules/shiki/dist/langs/org.mjs +1 -0
  937. package/node_modules/shiki/dist/langs/pascal.mjs +1 -0
  938. package/node_modules/shiki/dist/langs/perl.mjs +1 -0
  939. package/node_modules/shiki/dist/langs/perl6.mjs +1 -0
  940. package/node_modules/shiki/dist/langs/php.mjs +1 -0
  941. package/node_modules/shiki/dist/langs/pkl.mjs +1 -0
  942. package/node_modules/shiki/dist/langs/plsql.mjs +1 -0
  943. package/node_modules/shiki/dist/langs/po.mjs +1 -0
  944. package/node_modules/shiki/dist/langs/polar.mjs +1 -0
  945. package/node_modules/shiki/dist/langs/postcss.mjs +1 -0
  946. package/node_modules/shiki/dist/langs/pot.mjs +1 -0
  947. package/node_modules/shiki/dist/langs/potx.mjs +1 -0
  948. package/node_modules/shiki/dist/langs/powerquery.mjs +1 -0
  949. package/node_modules/shiki/dist/langs/powershell.mjs +1 -0
  950. package/node_modules/shiki/dist/langs/prisma.mjs +1 -0
  951. package/node_modules/shiki/dist/langs/prolog.mjs +1 -0
  952. package/node_modules/shiki/dist/langs/properties.mjs +1 -0
  953. package/node_modules/shiki/dist/langs/proto.mjs +1 -0
  954. package/node_modules/shiki/dist/langs/protobuf.mjs +1 -0
  955. package/node_modules/shiki/dist/langs/ps.mjs +1 -0
  956. package/node_modules/shiki/dist/langs/ps1.mjs +1 -0
  957. package/node_modules/shiki/dist/langs/pug.mjs +1 -0
  958. package/node_modules/shiki/dist/langs/puppet.mjs +1 -0
  959. package/node_modules/shiki/dist/langs/purescript.mjs +1 -0
  960. package/node_modules/shiki/dist/langs/pwsh.mjs +1 -0
  961. package/node_modules/shiki/dist/langs/py.mjs +1 -0
  962. package/node_modules/shiki/dist/langs/python.mjs +1 -0
  963. package/node_modules/shiki/dist/langs/ql.mjs +1 -0
  964. package/node_modules/shiki/dist/langs/qml.mjs +1 -0
  965. package/node_modules/shiki/dist/langs/qmldir.mjs +1 -0
  966. package/node_modules/shiki/dist/langs/qss.mjs +1 -0
  967. package/node_modules/shiki/dist/langs/r.mjs +1 -0
  968. package/node_modules/shiki/dist/langs/racket.mjs +1 -0
  969. package/node_modules/shiki/dist/langs/raku.mjs +1 -0
  970. package/node_modules/shiki/dist/langs/razor.mjs +1 -0
  971. package/node_modules/shiki/dist/langs/rb.mjs +1 -0
  972. package/node_modules/shiki/dist/langs/rbs.mjs +1 -0
  973. package/node_modules/shiki/dist/langs/reg.mjs +1 -0
  974. package/node_modules/shiki/dist/langs/regex.mjs +1 -0
  975. package/node_modules/shiki/dist/langs/regexp.mjs +1 -0
  976. package/node_modules/shiki/dist/langs/rel.mjs +1 -0
  977. package/node_modules/shiki/dist/langs/riscv.mjs +1 -0
  978. package/node_modules/shiki/dist/langs/ron.mjs +1 -0
  979. package/node_modules/shiki/dist/langs/rosmsg.mjs +1 -0
  980. package/node_modules/shiki/dist/langs/rs.mjs +1 -0
  981. package/node_modules/shiki/dist/langs/rst.mjs +1 -0
  982. package/node_modules/shiki/dist/langs/ruby-signature.mjs +1 -0
  983. package/node_modules/shiki/dist/langs/ruby.mjs +1 -0
  984. package/node_modules/shiki/dist/langs/rust.mjs +1 -0
  985. package/node_modules/shiki/dist/langs/sas.mjs +1 -0
  986. package/node_modules/shiki/dist/langs/sass.mjs +1 -0
  987. package/node_modules/shiki/dist/langs/scad.mjs +1 -0
  988. package/node_modules/shiki/dist/langs/scala.mjs +1 -0
  989. package/node_modules/shiki/dist/langs/scheme.mjs +1 -0
  990. package/node_modules/shiki/dist/langs/scss.mjs +1 -0
  991. package/node_modules/shiki/dist/langs/sdbl.mjs +1 -0
  992. package/node_modules/shiki/dist/langs/sh.mjs +1 -0
  993. package/node_modules/shiki/dist/langs/shader.mjs +1 -0
  994. package/node_modules/shiki/dist/langs/shaderlab.mjs +1 -0
  995. package/node_modules/shiki/dist/langs/shell.mjs +1 -0
  996. package/node_modules/shiki/dist/langs/shellscript.mjs +1 -0
  997. package/node_modules/shiki/dist/langs/shellsession.mjs +1 -0
  998. package/node_modules/shiki/dist/langs/smalltalk.mjs +1 -0
  999. package/node_modules/shiki/dist/langs/smithy.mjs +1 -0
  1000. package/node_modules/shiki/dist/langs/solidity.mjs +1 -0
  1001. package/node_modules/shiki/dist/langs/soy.mjs +1 -0
  1002. package/node_modules/shiki/dist/langs/sparql.mjs +1 -0
  1003. package/node_modules/shiki/dist/langs/spl.mjs +1 -0
  1004. package/node_modules/shiki/dist/langs/splunk.mjs +1 -0
  1005. package/node_modules/shiki/dist/langs/sql.mjs +1 -0
  1006. package/node_modules/shiki/dist/langs/ssh-config.mjs +1 -0
  1007. package/node_modules/shiki/dist/langs/stata.mjs +1 -0
  1008. package/node_modules/shiki/dist/langs/styl.mjs +1 -0
  1009. package/node_modules/shiki/dist/langs/stylus.mjs +1 -0
  1010. package/node_modules/shiki/dist/langs/surql.mjs +1 -0
  1011. package/node_modules/shiki/dist/langs/surrealql.mjs +1 -0
  1012. package/node_modules/shiki/dist/langs/svelte.mjs +1 -0
  1013. package/node_modules/shiki/dist/langs/swift.mjs +1 -0
  1014. package/node_modules/shiki/dist/langs/system-verilog.mjs +1 -0
  1015. package/node_modules/shiki/dist/langs/systemd.mjs +1 -0
  1016. package/node_modules/shiki/dist/langs/talon.mjs +1 -0
  1017. package/node_modules/shiki/dist/langs/talonscript.mjs +1 -0
  1018. package/node_modules/shiki/dist/langs/tasl.mjs +1 -0
  1019. package/node_modules/shiki/dist/langs/tcl.mjs +1 -0
  1020. package/node_modules/shiki/dist/langs/templ.mjs +1 -0
  1021. package/node_modules/shiki/dist/langs/terraform.mjs +1 -0
  1022. package/node_modules/shiki/dist/langs/tex.mjs +1 -0
  1023. package/node_modules/shiki/dist/langs/tf.mjs +1 -0
  1024. package/node_modules/shiki/dist/langs/tfvars.mjs +1 -0
  1025. package/node_modules/shiki/dist/langs/toml.mjs +1 -0
  1026. package/node_modules/shiki/dist/langs/tres.mjs +1 -0
  1027. package/node_modules/shiki/dist/langs/ts-tags.mjs +1 -0
  1028. package/node_modules/shiki/dist/langs/ts.mjs +1 -0
  1029. package/node_modules/shiki/dist/langs/tscn.mjs +1 -0
  1030. package/node_modules/shiki/dist/langs/tsp.mjs +1 -0
  1031. package/node_modules/shiki/dist/langs/tsv.mjs +1 -0
  1032. package/node_modules/shiki/dist/langs/tsx.mjs +1 -0
  1033. package/node_modules/shiki/dist/langs/turtle.mjs +1 -0
  1034. package/node_modules/shiki/dist/langs/twig.mjs +1 -0
  1035. package/node_modules/shiki/dist/langs/typ.mjs +1 -0
  1036. package/node_modules/shiki/dist/langs/typescript.mjs +1 -0
  1037. package/node_modules/shiki/dist/langs/typespec.mjs +1 -0
  1038. package/node_modules/shiki/dist/langs/typst.mjs +1 -0
  1039. package/node_modules/shiki/dist/langs/v.mjs +1 -0
  1040. package/node_modules/shiki/dist/langs/vala.mjs +1 -0
  1041. package/node_modules/shiki/dist/langs/vb.mjs +1 -0
  1042. package/node_modules/shiki/dist/langs/verilog.mjs +1 -0
  1043. package/node_modules/shiki/dist/langs/vhdl.mjs +1 -0
  1044. package/node_modules/shiki/dist/langs/vim.mjs +1 -0
  1045. package/node_modules/shiki/dist/langs/viml.mjs +1 -0
  1046. package/node_modules/shiki/dist/langs/vimscript.mjs +1 -0
  1047. package/node_modules/shiki/dist/langs/vue-directives.mjs +1 -0
  1048. package/node_modules/shiki/dist/langs/vue-html.mjs +1 -0
  1049. package/node_modules/shiki/dist/langs/vue-interpolations.mjs +1 -0
  1050. package/node_modules/shiki/dist/langs/vue-sfc-style-variable-injection.mjs +1 -0
  1051. package/node_modules/shiki/dist/langs/vue-vine.mjs +1 -0
  1052. package/node_modules/shiki/dist/langs/vue.mjs +1 -0
  1053. package/node_modules/shiki/dist/langs/vy.mjs +1 -0
  1054. package/node_modules/shiki/dist/langs/vyper.mjs +1 -0
  1055. package/node_modules/shiki/dist/langs/wasm.mjs +1 -0
  1056. package/node_modules/shiki/dist/langs/wenyan.mjs +1 -0
  1057. package/node_modules/shiki/dist/langs/wgsl.mjs +1 -0
  1058. package/node_modules/shiki/dist/langs/wiki.mjs +1 -0
  1059. package/node_modules/shiki/dist/langs/wikitext.mjs +1 -0
  1060. package/node_modules/shiki/dist/langs/wit.mjs +1 -0
  1061. package/node_modules/shiki/dist/langs/wl.mjs +1 -0
  1062. package/node_modules/shiki/dist/langs/wolfram.mjs +1 -0
  1063. package/node_modules/shiki/dist/langs/xml.mjs +1 -0
  1064. package/node_modules/shiki/dist/langs/xsl.mjs +1 -0
  1065. package/node_modules/shiki/dist/langs/yaml.mjs +1 -0
  1066. package/node_modules/shiki/dist/langs/yml.mjs +1 -0
  1067. package/node_modules/shiki/dist/langs/zenscript.mjs +1 -0
  1068. package/node_modules/shiki/dist/langs/zig.mjs +1 -0
  1069. package/node_modules/shiki/dist/langs/zsh.mjs +1 -0
  1070. package/node_modules/shiki/dist/langs-bundle-full-xQVO1Cek.mjs +1326 -0
  1071. package/node_modules/shiki/dist/langs.mjs +2 -0
  1072. package/node_modules/shiki/dist/onig.wasm +0 -0
  1073. package/node_modules/shiki/dist/rolldown-runtime-BBjsoOtd.mjs +27 -0
  1074. package/node_modules/shiki/dist/textmate.mjs +2 -0
  1075. package/node_modules/shiki/dist/themes/andromeeda.mjs +1 -0
  1076. package/node_modules/shiki/dist/themes/aurora-x.mjs +1 -0
  1077. package/node_modules/shiki/dist/themes/ayu-dark.mjs +1 -0
  1078. package/node_modules/shiki/dist/themes/ayu-light.mjs +1 -0
  1079. package/node_modules/shiki/dist/themes/ayu-mirage.mjs +1 -0
  1080. package/node_modules/shiki/dist/themes/catppuccin-frappe.mjs +1 -0
  1081. package/node_modules/shiki/dist/themes/catppuccin-latte.mjs +1 -0
  1082. package/node_modules/shiki/dist/themes/catppuccin-macchiato.mjs +1 -0
  1083. package/node_modules/shiki/dist/themes/catppuccin-mocha.mjs +1 -0
  1084. package/node_modules/shiki/dist/themes/dark-plus.mjs +1 -0
  1085. package/node_modules/shiki/dist/themes/dracula-soft.mjs +1 -0
  1086. package/node_modules/shiki/dist/themes/dracula.mjs +1 -0
  1087. package/node_modules/shiki/dist/themes/everforest-dark.mjs +1 -0
  1088. package/node_modules/shiki/dist/themes/everforest-light.mjs +1 -0
  1089. package/node_modules/shiki/dist/themes/github-dark-default.mjs +1 -0
  1090. package/node_modules/shiki/dist/themes/github-dark-dimmed.mjs +1 -0
  1091. package/node_modules/shiki/dist/themes/github-dark-high-contrast.mjs +1 -0
  1092. package/node_modules/shiki/dist/themes/github-dark.mjs +1 -0
  1093. package/node_modules/shiki/dist/themes/github-light-default.mjs +1 -0
  1094. package/node_modules/shiki/dist/themes/github-light-high-contrast.mjs +1 -0
  1095. package/node_modules/shiki/dist/themes/github-light.mjs +1 -0
  1096. package/node_modules/shiki/dist/themes/gruvbox-dark-hard.mjs +1 -0
  1097. package/node_modules/shiki/dist/themes/gruvbox-dark-medium.mjs +1 -0
  1098. package/node_modules/shiki/dist/themes/gruvbox-dark-soft.mjs +1 -0
  1099. package/node_modules/shiki/dist/themes/gruvbox-light-hard.mjs +1 -0
  1100. package/node_modules/shiki/dist/themes/gruvbox-light-medium.mjs +1 -0
  1101. package/node_modules/shiki/dist/themes/gruvbox-light-soft.mjs +1 -0
  1102. package/node_modules/shiki/dist/themes/horizon-bright.mjs +1 -0
  1103. package/node_modules/shiki/dist/themes/horizon.mjs +1 -0
  1104. package/node_modules/shiki/dist/themes/houston.mjs +1 -0
  1105. package/node_modules/shiki/dist/themes/kanagawa-dragon.mjs +1 -0
  1106. package/node_modules/shiki/dist/themes/kanagawa-lotus.mjs +1 -0
  1107. package/node_modules/shiki/dist/themes/kanagawa-wave.mjs +1 -0
  1108. package/node_modules/shiki/dist/themes/laserwave.mjs +1 -0
  1109. package/node_modules/shiki/dist/themes/light-plus.mjs +1 -0
  1110. package/node_modules/shiki/dist/themes/material-theme-darker.mjs +1 -0
  1111. package/node_modules/shiki/dist/themes/material-theme-lighter.mjs +1 -0
  1112. package/node_modules/shiki/dist/themes/material-theme-ocean.mjs +1 -0
  1113. package/node_modules/shiki/dist/themes/material-theme-palenight.mjs +1 -0
  1114. package/node_modules/shiki/dist/themes/material-theme.mjs +1 -0
  1115. package/node_modules/shiki/dist/themes/min-dark.mjs +1 -0
  1116. package/node_modules/shiki/dist/themes/min-light.mjs +1 -0
  1117. package/node_modules/shiki/dist/themes/monokai.mjs +1 -0
  1118. package/node_modules/shiki/dist/themes/night-owl-light.mjs +1 -0
  1119. package/node_modules/shiki/dist/themes/night-owl.mjs +1 -0
  1120. package/node_modules/shiki/dist/themes/nord.mjs +1 -0
  1121. package/node_modules/shiki/dist/themes/one-dark-pro.mjs +1 -0
  1122. package/node_modules/shiki/dist/themes/one-light.mjs +1 -0
  1123. package/node_modules/shiki/dist/themes/plastic.mjs +1 -0
  1124. package/node_modules/shiki/dist/themes/poimandres.mjs +1 -0
  1125. package/node_modules/shiki/dist/themes/red.mjs +1 -0
  1126. package/node_modules/shiki/dist/themes/rose-pine-dawn.mjs +1 -0
  1127. package/node_modules/shiki/dist/themes/rose-pine-moon.mjs +1 -0
  1128. package/node_modules/shiki/dist/themes/rose-pine.mjs +1 -0
  1129. package/node_modules/shiki/dist/themes/slack-dark.mjs +1 -0
  1130. package/node_modules/shiki/dist/themes/slack-ochin.mjs +1 -0
  1131. package/node_modules/shiki/dist/themes/snazzy-light.mjs +1 -0
  1132. package/node_modules/shiki/dist/themes/solarized-dark.mjs +1 -0
  1133. package/node_modules/shiki/dist/themes/solarized-light.mjs +1 -0
  1134. package/node_modules/shiki/dist/themes/synthwave-84.mjs +1 -0
  1135. package/node_modules/shiki/dist/themes/tokyo-night.mjs +1 -0
  1136. package/node_modules/shiki/dist/themes/vesper.mjs +1 -0
  1137. package/node_modules/shiki/dist/themes/vitesse-black.mjs +1 -0
  1138. package/node_modules/shiki/dist/themes/vitesse-dark.mjs +1 -0
  1139. package/node_modules/shiki/dist/themes/vitesse-light.mjs +1 -0
  1140. package/node_modules/shiki/dist/themes.mjs +396 -0
  1141. package/node_modules/shiki/dist/types.mjs +1 -0
  1142. package/node_modules/shiki/dist/wasm.mjs +3 -0
  1143. package/node_modules/shiki/package.json +67 -0
  1144. package/node_modules/space-separated-tokens/index.js +24 -0
  1145. package/node_modules/space-separated-tokens/license +22 -0
  1146. package/node_modules/space-separated-tokens/package.json +59 -0
  1147. package/node_modules/space-separated-tokens/readme.md +156 -0
  1148. package/node_modules/stringify-entities/index.js +6 -0
  1149. package/node_modules/stringify-entities/lib/constant/dangerous.js +16 -0
  1150. package/node_modules/stringify-entities/lib/core.js +117 -0
  1151. package/node_modules/stringify-entities/lib/index.js +36 -0
  1152. package/node_modules/stringify-entities/lib/util/format-basic.js +9 -0
  1153. package/node_modules/stringify-entities/lib/util/format-smart.js +69 -0
  1154. package/node_modules/stringify-entities/lib/util/to-decimal.js +16 -0
  1155. package/node_modules/stringify-entities/lib/util/to-hexadecimal.js +16 -0
  1156. package/node_modules/stringify-entities/lib/util/to-named.js +57 -0
  1157. package/node_modules/stringify-entities/license +22 -0
  1158. package/node_modules/stringify-entities/package.json +77 -0
  1159. package/node_modules/stringify-entities/readme.md +233 -0
  1160. package/node_modules/trim-lines/index.js +69 -0
  1161. package/node_modules/trim-lines/license +22 -0
  1162. package/node_modules/trim-lines/package.json +58 -0
  1163. package/node_modules/trim-lines/readme.md +125 -0
  1164. package/node_modules/unist-util-is/index.js +7 -0
  1165. package/node_modules/unist-util-is/lib/index.js +296 -0
  1166. package/node_modules/unist-util-is/license +22 -0
  1167. package/node_modules/unist-util-is/package.json +95 -0
  1168. package/node_modules/unist-util-is/readme.md +351 -0
  1169. package/node_modules/unist-util-position/index.js +1 -0
  1170. package/node_modules/unist-util-position/lib/index.js +95 -0
  1171. package/node_modules/unist-util-position/license +22 -0
  1172. package/node_modules/unist-util-position/package.json +68 -0
  1173. package/node_modules/unist-util-position/readme.md +243 -0
  1174. package/node_modules/unist-util-stringify-position/index.js +1 -0
  1175. package/node_modules/unist-util-stringify-position/lib/index.js +84 -0
  1176. package/node_modules/unist-util-stringify-position/license +22 -0
  1177. package/node_modules/unist-util-stringify-position/package.json +72 -0
  1178. package/node_modules/unist-util-stringify-position/readme.md +206 -0
  1179. package/node_modules/unist-util-visit/index.js +2 -0
  1180. package/node_modules/unist-util-visit/lib/index.js +312 -0
  1181. package/node_modules/unist-util-visit/license +22 -0
  1182. package/node_modules/unist-util-visit/package.json +100 -0
  1183. package/node_modules/unist-util-visit/readme.md +313 -0
  1184. package/node_modules/unist-util-visit-parents/index.js +2 -0
  1185. package/node_modules/unist-util-visit-parents/lib/color.js +7 -0
  1186. package/node_modules/unist-util-visit-parents/lib/color.node.js +7 -0
  1187. package/node_modules/unist-util-visit-parents/lib/index.js +399 -0
  1188. package/node_modules/unist-util-visit-parents/license +22 -0
  1189. package/node_modules/unist-util-visit-parents/package.json +98 -0
  1190. package/node_modules/unist-util-visit-parents/readme.md +388 -0
  1191. package/node_modules/vfile/index.js +2 -0
  1192. package/node_modules/vfile/lib/index.js +643 -0
  1193. package/node_modules/vfile/lib/minpath.browser.js +426 -0
  1194. package/node_modules/vfile/lib/minpath.js +1 -0
  1195. package/node_modules/vfile/lib/minproc.browser.js +8 -0
  1196. package/node_modules/vfile/lib/minproc.js +1 -0
  1197. package/node_modules/vfile/lib/minurl.browser.js +76 -0
  1198. package/node_modules/vfile/lib/minurl.js +2 -0
  1199. package/node_modules/vfile/lib/minurl.shared.js +31 -0
  1200. package/node_modules/vfile/license +21 -0
  1201. package/node_modules/vfile/package.json +126 -0
  1202. package/node_modules/vfile/readme.md +785 -0
  1203. package/node_modules/vfile-message/index.js +5 -0
  1204. package/node_modules/vfile-message/lib/index.js +314 -0
  1205. package/node_modules/vfile-message/license +22 -0
  1206. package/node_modules/vfile-message/package.json +72 -0
  1207. package/node_modules/vfile-message/readme.md +252 -0
  1208. package/node_modules/zwitch/index.js +118 -0
  1209. package/node_modules/zwitch/license +22 -0
  1210. package/node_modules/zwitch/package.json +64 -0
  1211. package/node_modules/zwitch/readme.md +226 -0
  1212. package/package.json +93 -3
@@ -0,0 +1,3145 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/index.js
20
+ var index_exports = {};
21
+ __export(index_exports, {
22
+ EmulatedRegExp: () => EmulatedRegExp,
23
+ toRegExp: () => toRegExp,
24
+ toRegExpDetails: () => toRegExpDetails
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/utils.js
29
+ var cp = String.fromCodePoint;
30
+ var r = String.raw;
31
+ var envFlags = {};
32
+ var globalRegExp = globalThis.RegExp;
33
+ envFlags.flagGroups = (() => {
34
+ try {
35
+ new globalRegExp("(?i:)");
36
+ } catch {
37
+ return false;
38
+ }
39
+ return true;
40
+ })();
41
+ envFlags.unicodeSets = (() => {
42
+ try {
43
+ new globalRegExp("[[]]", "v");
44
+ } catch {
45
+ return false;
46
+ }
47
+ return true;
48
+ })();
49
+ envFlags.bugFlagVLiteralHyphenIsRange = envFlags.unicodeSets ? (() => {
50
+ try {
51
+ new globalRegExp(r`[\d\-a]`, "v");
52
+ } catch {
53
+ return true;
54
+ }
55
+ return false;
56
+ })() : false;
57
+ envFlags.bugNestedClassIgnoresNegation = envFlags.unicodeSets && new globalRegExp("[[^a]]", "v").test("a");
58
+ function getNewCurrentFlags(current, { enable, disable }) {
59
+ return {
60
+ dotAll: !disable?.dotAll && !!(enable?.dotAll || current.dotAll),
61
+ ignoreCase: !disable?.ignoreCase && !!(enable?.ignoreCase || current.ignoreCase)
62
+ };
63
+ }
64
+ function getOrInsert(map, key, defaultValue) {
65
+ if (!map.has(key)) {
66
+ map.set(key, defaultValue);
67
+ }
68
+ return map.get(key);
69
+ }
70
+ function isMinTarget(target, min) {
71
+ return EsVersion[target] >= EsVersion[min];
72
+ }
73
+ function throwIfNullish(value, msg) {
74
+ if (value == null) {
75
+ throw new Error(msg ?? "Value expected");
76
+ }
77
+ return value;
78
+ }
79
+
80
+ // src/options.js
81
+ var EsVersion = {
82
+ ES2025: 2025,
83
+ ES2024: 2024,
84
+ ES2018: 2018
85
+ };
86
+ var Target = (
87
+ /** @type {const} */
88
+ {
89
+ auto: "auto",
90
+ ES2025: "ES2025",
91
+ ES2024: "ES2024",
92
+ ES2018: "ES2018"
93
+ }
94
+ );
95
+ function getOptions(options = {}) {
96
+ if ({}.toString.call(options) !== "[object Object]") {
97
+ throw new Error("Unexpected options");
98
+ }
99
+ if (options.target !== void 0 && !Target[options.target]) {
100
+ throw new Error(`Unexpected target "${options.target}"`);
101
+ }
102
+ const opts = {
103
+ // Sets the level of emulation rigor/strictness.
104
+ accuracy: "default",
105
+ // Disables advanced emulation that relies on returning a `RegExp` subclass, resulting in
106
+ // certain patterns not being emulatable.
107
+ avoidSubclass: false,
108
+ // Oniguruma flags; a string with `i`, `m`, `x`, `D`, `S`, `W`, `y{g}` in any order (all
109
+ // optional). Oniguruma's `m` is equivalent to JavaScript's `s` (`dotAll`).
110
+ flags: "",
111
+ // Include JavaScript flag `g` (`global`) in the result.
112
+ global: false,
113
+ // Include JavaScript flag `d` (`hasIndices`) in the result.
114
+ hasIndices: false,
115
+ // Delay regex construction until first use if the transpiled pattern is at least this length.
116
+ lazyCompileLength: Infinity,
117
+ // JavaScript version used for generated regexes. Using `auto` detects the best value based on
118
+ // your environment. Later targets allow faster processing, simpler generated source, and
119
+ // support for additional features.
120
+ target: "auto",
121
+ // Disables minifications that simplify the pattern without changing the meaning.
122
+ verbose: false,
123
+ ...options,
124
+ // Advanced options that override standard behavior, error checking, and flags when enabled.
125
+ rules: {
126
+ // Useful with TextMate grammars that merge backreferences across patterns.
127
+ allowOrphanBackrefs: false,
128
+ // Use ASCII `\b` and `\B`, which increases search performance of generated regexes.
129
+ asciiWordBoundaries: false,
130
+ // Allow unnamed captures and numbered calls (backreferences and subroutines) when using
131
+ // named capture. This is Oniguruma option `ONIG_OPTION_CAPTURE_GROUP`; on by default in
132
+ // `vscode-oniguruma`.
133
+ captureGroup: false,
134
+ // Change the recursion depth limit from Oniguruma's `20` to an integer `2`–`20`.
135
+ recursionLimit: 20,
136
+ // `^` as `\A`; `$` as`\Z`. Improves search performance of generated regexes without changing
137
+ // the meaning if searching line by line. This is Oniguruma option `ONIG_OPTION_SINGLELINE`.
138
+ singleline: false,
139
+ ...options.rules
140
+ }
141
+ };
142
+ if (opts.target === "auto") {
143
+ opts.target = envFlags.flagGroups ? "ES2025" : envFlags.unicodeSets ? "ES2024" : "ES2018";
144
+ }
145
+ return opts;
146
+ }
147
+
148
+ // node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/utils.js
149
+ function r2(e) {
150
+ if ([...e].length !== 1) throw new Error(`Expected "${e}" to be a single code point`);
151
+ return e.codePointAt(0);
152
+ }
153
+ function l(e, t, n) {
154
+ return e.has(t) || e.set(t, n), e.get(t);
155
+ }
156
+ var i = /* @__PURE__ */ new Set(["alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"]);
157
+ var o = String.raw;
158
+ function u(e, t) {
159
+ if (e == null) throw new Error(t ?? "Value expected");
160
+ return e;
161
+ }
162
+
163
+ // node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js
164
+ var m = o`\[\^?`;
165
+ var b = `c.? | C(?:-.?)?|${o`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${o`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${o`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${o`o\{[^\}]*\}?`}|${o`\d{1,3}`}`;
166
+ var y = /[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/;
167
+ var C = new RegExp(o`
168
+ \\ (?:
169
+ ${b}
170
+ | [gk]<[^>]*>?
171
+ | [gk]'[^']*'?
172
+ | .
173
+ )
174
+ | \( (?:
175
+ \? (?:
176
+ [:=!>({]
177
+ | <[=!]
178
+ | <[^>]*>
179
+ | '[^']*'
180
+ | ~\|?
181
+ | #(?:[^)\\]|\\.?)*
182
+ | [^:)]*[:)]
183
+ )?
184
+ | \*[^\)]*\)?
185
+ )?
186
+ | (?:${y.source})+
187
+ | ${m}
188
+ | .
189
+ `.replace(/\s+/g, ""), "gsu");
190
+ var T = new RegExp(o`
191
+ \\ (?:
192
+ ${b}
193
+ | .
194
+ )
195
+ | \[:(?:\^?\p{Alpha}+|\^):\]
196
+ | ${m}
197
+ | &&
198
+ | .
199
+ `.replace(/\s+/g, ""), "gsu");
200
+ function M(e, n = {}) {
201
+ const t = { flags: "", ...n, rules: { captureGroup: false, singleline: false, ...n.rules } };
202
+ if (typeof e != "string") throw new Error("String expected as pattern");
203
+ const o3 = Y(t.flags), s2 = [o3.extended], a2 = { captureGroup: t.rules.captureGroup, getCurrentModX() {
204
+ return s2.at(-1);
205
+ }, numOpenGroups: 0, popModX() {
206
+ s2.pop();
207
+ }, pushModX(u2) {
208
+ s2.push(u2);
209
+ }, replaceCurrentModX(u2) {
210
+ s2[s2.length - 1] = u2;
211
+ }, singleline: t.rules.singleline };
212
+ let r4 = [], i2;
213
+ for (C.lastIndex = 0; i2 = C.exec(e); ) {
214
+ const u2 = F(a2, e, i2[0], C.lastIndex);
215
+ u2.tokens ? r4.push(...u2.tokens) : u2.token && r4.push(u2.token), u2.lastIndex !== void 0 && (C.lastIndex = u2.lastIndex);
216
+ }
217
+ const l3 = [];
218
+ let c = 0;
219
+ r4.filter((u2) => u2.type === "GroupOpen").forEach((u2) => {
220
+ u2.kind === "capturing" ? u2.number = ++c : u2.raw === "(" && l3.push(u2);
221
+ }), c || l3.forEach((u2, S2) => {
222
+ u2.kind = "capturing", u2.number = S2 + 1;
223
+ });
224
+ const g = c || l3.length;
225
+ return { tokens: r4.map((u2) => u2.type === "EscapedNumber" ? ee(u2, g) : u2).flat(), flags: o3 };
226
+ }
227
+ function F(e, n, t, o3) {
228
+ const [s2, a2] = t;
229
+ if (t === "[" || t === "[^") {
230
+ const r4 = K(n, t, o3);
231
+ return { tokens: r4.tokens, lastIndex: r4.lastIndex };
232
+ }
233
+ if (s2 === "\\") {
234
+ if ("AbBGyYzZ".includes(a2)) return { token: w(t, t) };
235
+ if (/^\\g[<']/.test(t)) {
236
+ if (!/^\\g(?:<[^>]+>|'[^']+')$/.test(t)) throw new Error(`Invalid group name "${t}"`);
237
+ return { token: R(t) };
238
+ }
239
+ if (/^\\k[<']/.test(t)) {
240
+ if (!/^\\k(?:<[^>]+>|'[^']+')$/.test(t)) throw new Error(`Invalid group name "${t}"`);
241
+ return { token: A(t) };
242
+ }
243
+ if (a2 === "K") return { token: I("keep", t) };
244
+ if (a2 === "N" || a2 === "R") return { token: k("newline", t, { negate: a2 === "N" }) };
245
+ if (a2 === "O") return { token: k("any", t) };
246
+ if (a2 === "X") return { token: k("text_segment", t) };
247
+ const r4 = x(t, { inCharClass: false });
248
+ return Array.isArray(r4) ? { tokens: r4 } : { token: r4 };
249
+ }
250
+ if (s2 === "(") {
251
+ if (a2 === "*") return { token: j(t) };
252
+ if (t === "(?{") throw new Error(`Unsupported callout "${t}"`);
253
+ if (t.startsWith("(?#")) {
254
+ if (n[o3] !== ")") throw new Error('Unclosed comment group "(?#"');
255
+ return { lastIndex: o3 + 1 };
256
+ }
257
+ if (/^\(\?[-imx]+[:)]$/.test(t)) return { token: L(t, e) };
258
+ if (e.pushModX(e.getCurrentModX()), e.numOpenGroups++, t === "(" && !e.captureGroup || t === "(?:") return { token: f("group", t) };
259
+ if (t === "(?>") return { token: f("atomic", t) };
260
+ if (t === "(?=" || t === "(?!" || t === "(?<=" || t === "(?<!") return { token: f(t[2] === "<" ? "lookbehind" : "lookahead", t, { negate: t.endsWith("!") }) };
261
+ if (t === "(" && e.captureGroup || t.startsWith("(?<") && t.endsWith(">") || t.startsWith("(?'") && t.endsWith("'")) return { token: f("capturing", t, { ...t !== "(" && { name: t.slice(3, -1) } }) };
262
+ if (t.startsWith("(?~")) {
263
+ if (t === "(?~|") throw new Error(`Unsupported absence function kind "${t}"`);
264
+ return { token: f("absence_repeater", t) };
265
+ }
266
+ throw t === "(?(" ? new Error(`Unsupported conditional "${t}"`) : new Error(`Invalid or unsupported group option "${t}"`);
267
+ }
268
+ if (t === ")") {
269
+ if (e.popModX(), e.numOpenGroups--, e.numOpenGroups < 0) throw new Error('Unmatched ")"');
270
+ return { token: Q(t) };
271
+ }
272
+ if (e.getCurrentModX()) {
273
+ if (t === "#") {
274
+ const r4 = n.indexOf(`
275
+ `, o3);
276
+ return { lastIndex: r4 === -1 ? n.length : r4 };
277
+ }
278
+ if (/^\s$/.test(t)) {
279
+ const r4 = /\s+/y;
280
+ return r4.lastIndex = o3, { lastIndex: r4.exec(n) ? r4.lastIndex : o3 };
281
+ }
282
+ }
283
+ if (t === ".") return { token: k("dot", t) };
284
+ if (t === "^" || t === "$") {
285
+ const r4 = e.singleline ? { "^": o`\A`, $: o`\Z` }[t] : t;
286
+ return { token: w(r4, t) };
287
+ }
288
+ return t === "|" ? { token: P(t) } : y.test(t) ? { tokens: te(t) } : { token: d(r2(t), t) };
289
+ }
290
+ function K(e, n, t) {
291
+ const o3 = [E(n[1] === "^", n)];
292
+ let s2 = 1, a2;
293
+ for (T.lastIndex = t; a2 = T.exec(e); ) {
294
+ const r4 = a2[0];
295
+ if (r4[0] === "[" && r4[1] !== ":") s2++, o3.push(E(r4[1] === "^", r4));
296
+ else if (r4 === "]") {
297
+ if (o3.at(-1).type === "CharacterClassOpen") o3.push(d(93, r4));
298
+ else if (s2--, o3.push(z(r4)), !s2) break;
299
+ } else {
300
+ const i2 = X(r4);
301
+ Array.isArray(i2) ? o3.push(...i2) : o3.push(i2);
302
+ }
303
+ }
304
+ return { tokens: o3, lastIndex: T.lastIndex || e.length };
305
+ }
306
+ function X(e) {
307
+ if (e[0] === "\\") return x(e, { inCharClass: true });
308
+ if (e[0] === "[") {
309
+ const n = /\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);
310
+ if (!n || !i.has(n.groups.name)) throw new Error(`Invalid POSIX class "${e}"`);
311
+ return k("posix", e, { value: n.groups.name, negate: !!n.groups.negate });
312
+ }
313
+ return e === "-" ? U(e) : e === "&&" ? H(e) : d(r2(e), e);
314
+ }
315
+ function x(e, { inCharClass: n }) {
316
+ const t = e[1];
317
+ if (t === "c" || t === "C") return Z(e);
318
+ if ("dDhHsSwW".includes(t)) return q(e);
319
+ if (e.startsWith(o`\o{`)) throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);
320
+ if (/^\\[pP]\{/.test(e)) {
321
+ if (e.length === 3) throw new Error(`Incomplete or invalid Unicode property "${e}"`);
322
+ return V(e);
323
+ }
324
+ if (/^\\x[89A-Fa-f]\p{AHex}/u.test(e)) try {
325
+ const o3 = e.split(/\\x/).slice(1).map((i2) => parseInt(i2, 16)), s2 = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }).decode(new Uint8Array(o3)), a2 = new TextEncoder();
326
+ return [...s2].map((i2) => {
327
+ const l3 = [...a2.encode(i2)].map((c) => `\\x${c.toString(16)}`).join("");
328
+ return d(r2(i2), l3);
329
+ });
330
+ } catch {
331
+ throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`);
332
+ }
333
+ if (t === "u" || t === "x") return d(J(e), e);
334
+ if ($.has(t)) return d($.get(t), e);
335
+ if (/\d/.test(t)) return W(n, e);
336
+ if (e === "\\") throw new Error(o`Incomplete escape "\"`);
337
+ if (t === "M") throw new Error(`Unsupported meta "${e}"`);
338
+ if ([...e].length === 2) return d(e.codePointAt(1), e);
339
+ throw new Error(`Unexpected escape "${e}"`);
340
+ }
341
+ function P(e) {
342
+ return { type: "Alternator", raw: e };
343
+ }
344
+ function w(e, n) {
345
+ return { type: "Assertion", kind: e, raw: n };
346
+ }
347
+ function A(e) {
348
+ return { type: "Backreference", raw: e };
349
+ }
350
+ function d(e, n) {
351
+ return { type: "Character", value: e, raw: n };
352
+ }
353
+ function z(e) {
354
+ return { type: "CharacterClassClose", raw: e };
355
+ }
356
+ function U(e) {
357
+ return { type: "CharacterClassHyphen", raw: e };
358
+ }
359
+ function H(e) {
360
+ return { type: "CharacterClassIntersector", raw: e };
361
+ }
362
+ function E(e, n) {
363
+ return { type: "CharacterClassOpen", negate: e, raw: n };
364
+ }
365
+ function k(e, n, t = {}) {
366
+ return { type: "CharacterSet", kind: e, ...t, raw: n };
367
+ }
368
+ function I(e, n, t = {}) {
369
+ return e === "keep" ? { type: "Directive", kind: e, raw: n } : { type: "Directive", kind: e, flags: u(t.flags), raw: n };
370
+ }
371
+ function W(e, n) {
372
+ return { type: "EscapedNumber", inCharClass: e, raw: n };
373
+ }
374
+ function Q(e) {
375
+ return { type: "GroupClose", raw: e };
376
+ }
377
+ function f(e, n, t = {}) {
378
+ return { type: "GroupOpen", kind: e, ...t, raw: n };
379
+ }
380
+ function D(e, n, t, o3) {
381
+ return { type: "NamedCallout", kind: e, tag: n, arguments: t, raw: o3 };
382
+ }
383
+ function _(e, n, t, o3) {
384
+ return { type: "Quantifier", kind: e, min: n, max: t, raw: o3 };
385
+ }
386
+ function R(e) {
387
+ return { type: "Subroutine", raw: e };
388
+ }
389
+ var B = /* @__PURE__ */ new Set(["COUNT", "CMP", "ERROR", "FAIL", "MAX", "MISMATCH", "SKIP", "TOTAL_COUNT"]);
390
+ var $ = /* @__PURE__ */ new Map([["a", 7], ["b", 8], ["e", 27], ["f", 12], ["n", 10], ["r", 13], ["t", 9], ["v", 11]]);
391
+ function Z(e) {
392
+ const n = e[1] === "c" ? e[2] : e[3];
393
+ if (!n || !/[A-Za-z]/.test(n)) throw new Error(`Unsupported control character "${e}"`);
394
+ return d(r2(n.toUpperCase()) - 64, e);
395
+ }
396
+ function L(e, n) {
397
+ let { on: t, off: o3 } = /^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;
398
+ o3 ??= "";
399
+ const s2 = (n.getCurrentModX() || t.includes("x")) && !o3.includes("x"), a2 = v(t), r4 = v(o3), i2 = {};
400
+ if (a2 && (i2.enable = a2), r4 && (i2.disable = r4), e.endsWith(")")) return n.replaceCurrentModX(s2), I("flags", e, { flags: i2 });
401
+ if (e.endsWith(":")) return n.pushModX(s2), n.numOpenGroups++, f("group", e, { ...(a2 || r4) && { flags: i2 } });
402
+ throw new Error(`Unexpected flag modifier "${e}"`);
403
+ }
404
+ function j(e) {
405
+ const n = /\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);
406
+ if (!n) throw new Error(`Incomplete or invalid named callout "${e}"`);
407
+ const { name: t, tag: o3, args: s2 } = n.groups;
408
+ if (!t) throw new Error(`Invalid named callout "${e}"`);
409
+ if (o3 === "") throw new Error(`Named callout tag with empty value not allowed "${e}"`);
410
+ const a2 = s2 ? s2.split(",").filter((g) => g !== "").map((g) => /^[+-]?\d+$/.test(g) ? +g : g) : [], [r4, i2, l3] = a2, c = B.has(t) ? t.toLowerCase() : "custom";
411
+ switch (c) {
412
+ case "fail":
413
+ case "mismatch":
414
+ case "skip":
415
+ if (a2.length > 0) throw new Error(`Named callout arguments not allowed "${a2}"`);
416
+ break;
417
+ case "error":
418
+ if (a2.length > 1) throw new Error(`Named callout allows only one argument "${a2}"`);
419
+ if (typeof r4 == "string") throw new Error(`Named callout argument must be a number "${r4}"`);
420
+ break;
421
+ case "max":
422
+ if (!a2.length || a2.length > 2) throw new Error(`Named callout must have one or two arguments "${a2}"`);
423
+ if (typeof r4 == "string" && !/^[A-Za-z_]\w*$/.test(r4)) throw new Error(`Named callout argument one must be a tag or number "${r4}"`);
424
+ if (a2.length === 2 && (typeof i2 == "number" || !/^[<>X]$/.test(i2))) throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${i2}"`);
425
+ break;
426
+ case "count":
427
+ case "total_count":
428
+ if (a2.length > 1) throw new Error(`Named callout allows only one argument "${a2}"`);
429
+ if (a2.length === 1 && (typeof r4 == "number" || !/^[<>X]$/.test(r4))) throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${r4}"`);
430
+ break;
431
+ case "cmp":
432
+ if (a2.length !== 3) throw new Error(`Named callout must have three arguments "${a2}"`);
433
+ if (typeof r4 == "string" && !/^[A-Za-z_]\w*$/.test(r4)) throw new Error(`Named callout argument one must be a tag or number "${r4}"`);
434
+ if (typeof i2 == "number" || !/^(?:[<>!=]=|[<>])$/.test(i2)) throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${i2}"`);
435
+ if (typeof l3 == "string" && !/^[A-Za-z_]\w*$/.test(l3)) throw new Error(`Named callout argument three must be a tag or number "${l3}"`);
436
+ break;
437
+ case "custom":
438
+ throw new Error(`Undefined callout name "${t}"`);
439
+ default:
440
+ throw new Error(`Unexpected named callout kind "${c}"`);
441
+ }
442
+ return D(c, o3 ?? null, s2?.split(",") ?? null, e);
443
+ }
444
+ function O(e) {
445
+ let n = null, t, o3;
446
+ if (e[0] === "{") {
447
+ const { minStr: s2, maxStr: a2 } = /^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups, r4 = 1e5;
448
+ if (+s2 > r4 || a2 && +a2 > r4) throw new Error("Quantifier value unsupported in Oniguruma");
449
+ if (t = +s2, o3 = a2 === void 0 ? +s2 : a2 === "" ? 1 / 0 : +a2, t > o3 && (n = "possessive", [t, o3] = [o3, t]), e.endsWith("?")) {
450
+ if (n === "possessive") throw new Error('Unsupported possessive interval quantifier chain with "?"');
451
+ n = "lazy";
452
+ } else n || (n = "greedy");
453
+ } else t = e[0] === "+" ? 1 : 0, o3 = e[0] === "?" ? 1 : 1 / 0, n = e[1] === "+" ? "possessive" : e[1] === "?" ? "lazy" : "greedy";
454
+ return _(n, t, o3, e);
455
+ }
456
+ function q(e) {
457
+ const n = e[1].toLowerCase();
458
+ return k({ d: "digit", h: "hex", s: "space", w: "word" }[n], e, { negate: e[1] !== n });
459
+ }
460
+ function V(e) {
461
+ const { p: n, neg: t, value: o3 } = /^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;
462
+ return k("property", e, { value: o3, negate: n === "P" && !t || n === "p" && !!t });
463
+ }
464
+ function v(e) {
465
+ const n = {};
466
+ return e.includes("i") && (n.ignoreCase = true), e.includes("m") && (n.dotAll = true), e.includes("x") && (n.extended = true), Object.keys(n).length ? n : null;
467
+ }
468
+ function Y(e) {
469
+ const n = { ignoreCase: false, dotAll: false, extended: false, digitIsAscii: false, posixIsAscii: false, spaceIsAscii: false, wordIsAscii: false, textSegmentMode: null };
470
+ for (let t = 0; t < e.length; t++) {
471
+ const o3 = e[t];
472
+ if (!"imxDPSWy".includes(o3)) throw new Error(`Invalid flag "${o3}"`);
473
+ if (o3 === "y") {
474
+ if (!/^y{[gw]}/.test(e.slice(t))) throw new Error('Invalid or unspecified flag "y" mode');
475
+ n.textSegmentMode = e[t + 2] === "g" ? "grapheme" : "word", t += 3;
476
+ continue;
477
+ }
478
+ n[{ i: "ignoreCase", m: "dotAll", x: "extended", D: "digitIsAscii", P: "posixIsAscii", S: "spaceIsAscii", W: "wordIsAscii" }[o3]] = true;
479
+ }
480
+ return n;
481
+ }
482
+ function J(e) {
483
+ if (/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e)) throw new Error(`Incomplete or invalid escape "${e}"`);
484
+ const n = e[2] === "{" ? /^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex : e.slice(2);
485
+ return parseInt(n, 16);
486
+ }
487
+ function ee(e, n) {
488
+ const { raw: t, inCharClass: o3 } = e, s2 = t.slice(1);
489
+ if (!o3 && (s2 !== "0" && s2.length === 1 || s2[0] !== "0" && +s2 <= n)) return [A(t)];
490
+ const a2 = [], r4 = s2.match(/^[0-7]+|\d/g);
491
+ for (let i2 = 0; i2 < r4.length; i2++) {
492
+ const l3 = r4[i2];
493
+ let c;
494
+ if (i2 === 0 && l3 !== "8" && l3 !== "9") {
495
+ if (c = parseInt(l3, 8), c > 127) throw new Error(o`Octal encoded byte above 177 unsupported "${t}"`);
496
+ } else c = r2(l3);
497
+ a2.push(d(c, (i2 === 0 ? "\\" : "") + l3));
498
+ }
499
+ return a2;
500
+ }
501
+ function te(e) {
502
+ const n = [], t = new RegExp(y, "gy");
503
+ let o3;
504
+ for (; o3 = t.exec(e); ) {
505
+ const s2 = o3[0];
506
+ if (s2[0] === "{") {
507
+ const a2 = /^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s2);
508
+ if (a2) {
509
+ const { min: r4, max: i2 } = a2.groups;
510
+ if (+r4 > +i2 && s2.endsWith("?")) {
511
+ t.lastIndex--, n.push(O(s2.slice(0, -1)));
512
+ continue;
513
+ }
514
+ }
515
+ }
516
+ n.push(O(s2));
517
+ }
518
+ return n;
519
+ }
520
+
521
+ // node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/parser/node-utils.js
522
+ function o2(e, t) {
523
+ if (!Array.isArray(e.body)) throw new Error("Expected node with body array");
524
+ if (e.body.length !== 1) return false;
525
+ const r4 = e.body[0];
526
+ return !t || Object.keys(t).every((n) => t[n] === r4[n]);
527
+ }
528
+ function s(e) {
529
+ return y2.has(e.type);
530
+ }
531
+ var y2 = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
532
+
533
+ // node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/parser/parse.js
534
+ function J2(e, r4 = {}) {
535
+ const n = { flags: "", normalizeUnknownPropertyNames: false, skipBackrefValidation: false, skipLookbehindValidation: false, skipPropertyNameValidation: false, unicodePropertyMap: null, ...r4, rules: { captureGroup: false, singleline: false, ...r4.rules } }, o3 = M(e, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), i2 = (p, N) => {
536
+ const u2 = o3.tokens[t.nextIndex];
537
+ switch (t.parent = p, t.nextIndex++, u2.type) {
538
+ case "Alternator":
539
+ return b2();
540
+ case "Assertion":
541
+ return W2(u2);
542
+ case "Backreference":
543
+ return X2(u2, t);
544
+ case "Character":
545
+ return m2(u2.value, { useLastValid: !!N.isCheckingRangeEnd });
546
+ case "CharacterClassHyphen":
547
+ return ee2(u2, t, N);
548
+ case "CharacterClassOpen":
549
+ return re(u2, t, N);
550
+ case "CharacterSet":
551
+ return ne(u2, t);
552
+ case "Directive":
553
+ return I2(u2.kind, { flags: u2.flags });
554
+ case "GroupOpen":
555
+ return te2(u2, t, N);
556
+ case "NamedCallout":
557
+ return U2(u2.kind, u2.tag, u2.arguments);
558
+ case "Quantifier":
559
+ return oe(u2, t);
560
+ case "Subroutine":
561
+ return ae(u2, t);
562
+ default:
563
+ throw new Error(`Unexpected token type "${u2.type}"`);
564
+ }
565
+ }, t = { capturingGroups: [], hasNumberedRef: false, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: o3.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: i2 }, d2 = B2(T2(o3.flags));
566
+ let s2 = d2.body[0];
567
+ for (; t.nextIndex < o3.tokens.length; ) {
568
+ const p = i2(s2, {});
569
+ p.type === "Alternative" ? (d2.body.push(p), s2 = p) : s2.body.push(p);
570
+ }
571
+ const { capturingGroups: a2, hasNumberedRef: l3, namedGroupsByName: c, subroutines: f2 } = t;
572
+ if (l3 && c.size && !n.rules.captureGroup) throw new Error("Numbered backref/subroutine not allowed when using named capture");
573
+ for (const { ref: p } of f2) if (typeof p == "number") {
574
+ if (p > a2.length) throw new Error("Subroutine uses a group number that's not defined");
575
+ p && (a2[p - 1].isSubroutined = true);
576
+ } else if (c.has(p)) {
577
+ if (c.get(p).length > 1) throw new Error(o`Subroutine uses a duplicate group name "\g<${p}>"`);
578
+ c.get(p)[0].isSubroutined = true;
579
+ } else throw new Error(o`Subroutine uses a group name that's not defined "\g<${p}>"`);
580
+ return d2;
581
+ }
582
+ function W2({ kind: e }) {
583
+ return F2(u({ "^": "line_start", $: "line_end", "\\A": "string_start", "\\b": "word_boundary", "\\B": "word_boundary", "\\G": "search_start", "\\y": "text_segment_boundary", "\\Y": "text_segment_boundary", "\\z": "string_end", "\\Z": "string_end_newline" }[e], `Unexpected assertion kind "${e}"`), { negate: e === o`\B` || e === o`\Y` });
584
+ }
585
+ function X2({ raw: e }, r4) {
586
+ const n = /^\\k[<']/.test(e), o3 = n ? e.slice(3, -1) : e.slice(1), i2 = (t, d2 = false) => {
587
+ const s2 = r4.capturingGroups.length;
588
+ let a2 = false;
589
+ if (t > s2) if (r4.skipBackrefValidation) a2 = true;
590
+ else throw new Error(`Not enough capturing groups defined to the left "${e}"`);
591
+ return r4.hasNumberedRef = true, k2(d2 ? s2 + 1 - t : t, { orphan: a2 });
592
+ };
593
+ if (n) {
594
+ const t = /^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(o3);
595
+ if (t) return i2(+t.groups.num, !!t.groups.sign);
596
+ if (/[-+]/.test(o3)) throw new Error(`Invalid backref name "${e}"`);
597
+ if (!r4.namedGroupsByName.has(o3)) throw new Error(`Group name not defined to the left "${e}"`);
598
+ return k2(o3);
599
+ }
600
+ return i2(+o3);
601
+ }
602
+ function ee2(e, r4, n) {
603
+ const { tokens: o3, walk: i2 } = r4, t = r4.parent, d2 = t.body.at(-1), s2 = o3[r4.nextIndex];
604
+ if (!n.isCheckingRangeEnd && d2 && d2.type !== "CharacterClass" && d2.type !== "CharacterClassRange" && s2 && s2.type !== "CharacterClassOpen" && s2.type !== "CharacterClassClose" && s2.type !== "CharacterClassIntersector") {
605
+ const a2 = i2(t, { ...n, isCheckingRangeEnd: true });
606
+ if (d2.type === "Character" && a2.type === "Character") return t.body.pop(), L2(d2, a2);
607
+ throw new Error("Invalid character class range");
608
+ }
609
+ return m2(r2("-"));
610
+ }
611
+ function re({ negate: e }, r4, n) {
612
+ const { tokens: o3, walk: i2 } = r4, t = [C2()], d2 = o3[r4.nextIndex];
613
+ let s2 = z2(d2);
614
+ for (; s2.type !== "CharacterClassClose"; ) {
615
+ if (s2.type === "CharacterClassIntersector") t.push(C2()), r4.nextIndex++;
616
+ else {
617
+ const l3 = t.at(-1);
618
+ l3.body.push(i2(l3, n));
619
+ }
620
+ s2 = z2(o3[r4.nextIndex], d2);
621
+ }
622
+ const a2 = C2({ negate: e });
623
+ return t.length === 1 ? a2.body = t[0].body : (a2.kind = "intersection", a2.body = t.map((l3) => l3.body.length === 1 ? l3.body[0] : l3)), r4.nextIndex++, a2;
624
+ }
625
+ function ne({ kind: e, negate: r4, value: n }, o3) {
626
+ const { normalizeUnknownPropertyNames: i2, skipPropertyNameValidation: t, unicodePropertyMap: d2 } = o3;
627
+ if (e === "property") {
628
+ const s2 = w2(n);
629
+ if (i.has(s2) && !d2?.has(s2)) e = "posix", n = s2;
630
+ else return Q2(n, { negate: r4, normalizeUnknownPropertyNames: i2, skipPropertyNameValidation: t, unicodePropertyMap: d2 });
631
+ }
632
+ return e === "posix" ? R2(n, { negate: r4 }) : E2(e, { negate: r4 });
633
+ }
634
+ function te2(e, r4, n) {
635
+ const { tokens: o3, capturingGroups: i2, namedGroupsByName: t, skipLookbehindValidation: d2, walk: s2 } = r4, a2 = ie(e), l3 = a2.type === "AbsenceFunction", c = $2(a2), f2 = c && a2.negate;
636
+ if (a2.type === "CapturingGroup" && (i2.push(a2), a2.name && l(t, a2.name, []).push(a2)), l3 && n.isInAbsenceFunction) throw new Error("Nested absence function not supported by Oniguruma");
637
+ let p = D2(o3[r4.nextIndex]);
638
+ for (; p.type !== "GroupClose"; ) {
639
+ if (p.type === "Alternator") a2.body.push(b2()), r4.nextIndex++;
640
+ else {
641
+ const N = a2.body.at(-1), u2 = s2(N, { ...n, isInAbsenceFunction: n.isInAbsenceFunction || l3, isInLookbehind: n.isInLookbehind || c, isInNegLookbehind: n.isInNegLookbehind || f2 });
642
+ if (N.body.push(u2), (c || n.isInLookbehind) && !d2) {
643
+ const v2 = "Lookbehind includes a pattern not allowed by Oniguruma";
644
+ if (f2 || n.isInNegLookbehind) {
645
+ if (M2(u2) || u2.type === "CapturingGroup") throw new Error(v2);
646
+ } else if (M2(u2) || $2(u2) && u2.negate) throw new Error(v2);
647
+ }
648
+ }
649
+ p = D2(o3[r4.nextIndex]);
650
+ }
651
+ return r4.nextIndex++, a2;
652
+ }
653
+ function oe({ kind: e, min: r4, max: n }, o3) {
654
+ const i2 = o3.parent, t = i2.body.at(-1);
655
+ if (!t || !s(t)) throw new Error("Quantifier requires a repeatable token");
656
+ const d2 = _2(e, r4, n, t);
657
+ return i2.body.pop(), d2;
658
+ }
659
+ function ae({ raw: e }, r4) {
660
+ const { capturingGroups: n, subroutines: o3 } = r4;
661
+ let i2 = e.slice(3, -1);
662
+ const t = /^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i2);
663
+ if (t) {
664
+ const s2 = +t.groups.num, a2 = n.length;
665
+ if (r4.hasNumberedRef = true, i2 = { "": s2, "+": a2 + s2, "-": a2 + 1 - s2 }[t.groups.sign], i2 < 1) throw new Error("Invalid subroutine number");
666
+ } else i2 === "0" && (i2 = 0);
667
+ const d2 = O2(i2);
668
+ return o3.push(d2), d2;
669
+ }
670
+ function G(e, r4) {
671
+ if (e !== "repeater") throw new Error(`Unexpected absence function kind "${e}"`);
672
+ return { type: "AbsenceFunction", kind: e, body: h(r4?.body) };
673
+ }
674
+ function b2(e) {
675
+ return { type: "Alternative", body: V2(e?.body) };
676
+ }
677
+ function F2(e, r4) {
678
+ const n = { type: "Assertion", kind: e };
679
+ return (e === "word_boundary" || e === "text_segment_boundary") && (n.negate = !!r4?.negate), n;
680
+ }
681
+ function k2(e, r4) {
682
+ const n = !!r4?.orphan;
683
+ return { type: "Backreference", ref: e, ...n && { orphan: n } };
684
+ }
685
+ function P2(e, r4) {
686
+ const n = { name: void 0, isSubroutined: false, ...r4 };
687
+ if (n.name !== void 0 && !se(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
688
+ return { type: "CapturingGroup", number: e, ...n.name && { name: n.name }, ...n.isSubroutined && { isSubroutined: n.isSubroutined }, body: h(r4?.body) };
689
+ }
690
+ function m2(e, r4) {
691
+ const n = { useLastValid: false, ...r4 };
692
+ if (e > 1114111) {
693
+ const o3 = e.toString(16);
694
+ if (n.useLastValid) e = 1114111;
695
+ else throw e > 1310719 ? new Error(`Invalid code point out of range "\\x{${o3}}"`) : new Error(`Invalid code point out of range in JS "\\x{${o3}}"`);
696
+ }
697
+ return { type: "Character", value: e };
698
+ }
699
+ function C2(e) {
700
+ const r4 = { kind: "union", negate: false, ...e };
701
+ return { type: "CharacterClass", kind: r4.kind, negate: r4.negate, body: V2(e?.body) };
702
+ }
703
+ function L2(e, r4) {
704
+ if (r4.value < e.value) throw new Error("Character class range out of order");
705
+ return { type: "CharacterClassRange", min: e, max: r4 };
706
+ }
707
+ function E2(e, r4) {
708
+ const n = !!r4?.negate, o3 = { type: "CharacterSet", kind: e };
709
+ return (e === "digit" || e === "hex" || e === "newline" || e === "space" || e === "word") && (o3.negate = n), (e === "text_segment" || e === "newline" && !n) && (o3.variableLength = true), o3;
710
+ }
711
+ function I2(e, r4 = {}) {
712
+ if (e === "keep") return { type: "Directive", kind: e };
713
+ if (e === "flags") return { type: "Directive", kind: e, flags: u(r4.flags) };
714
+ throw new Error(`Unexpected directive kind "${e}"`);
715
+ }
716
+ function T2(e) {
717
+ return { type: "Flags", ...e };
718
+ }
719
+ function A2(e) {
720
+ const r4 = e?.atomic, n = e?.flags;
721
+ if (r4 && n) throw new Error("Atomic group cannot have flags");
722
+ return { type: "Group", ...r4 && { atomic: r4 }, ...n && { flags: n }, body: h(e?.body) };
723
+ }
724
+ function K2(e) {
725
+ const r4 = { behind: false, negate: false, ...e };
726
+ return { type: "LookaroundAssertion", kind: r4.behind ? "lookbehind" : "lookahead", negate: r4.negate, body: h(e?.body) };
727
+ }
728
+ function U2(e, r4, n) {
729
+ return { type: "NamedCallout", kind: e, tag: r4, arguments: n };
730
+ }
731
+ function R2(e, r4) {
732
+ const n = !!r4?.negate;
733
+ if (!i.has(e)) throw new Error(`Invalid POSIX class "${e}"`);
734
+ return { type: "CharacterSet", kind: "posix", value: e, negate: n };
735
+ }
736
+ function _2(e, r4, n, o3) {
737
+ if (r4 > n) throw new Error("Invalid reversed quantifier range");
738
+ return { type: "Quantifier", kind: e, min: r4, max: n, body: o3 };
739
+ }
740
+ function B2(e, r4) {
741
+ return { type: "Regex", body: h(r4?.body), flags: e };
742
+ }
743
+ function O2(e) {
744
+ return { type: "Subroutine", ref: e };
745
+ }
746
+ function Q2(e, r4) {
747
+ const n = { negate: false, normalizeUnknownPropertyNames: false, skipPropertyNameValidation: false, unicodePropertyMap: null, ...r4 };
748
+ let o3 = n.unicodePropertyMap?.get(w2(e));
749
+ if (!o3) {
750
+ if (n.normalizeUnknownPropertyNames) o3 = de(e);
751
+ else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw new Error(o`Invalid Unicode property "\p{${e}}"`);
752
+ }
753
+ return { type: "CharacterSet", kind: "property", value: o3 ?? e, negate: n.negate };
754
+ }
755
+ function ie({ flags: e, kind: r4, name: n, negate: o3, number: i2 }) {
756
+ switch (r4) {
757
+ case "absence_repeater":
758
+ return G("repeater");
759
+ case "atomic":
760
+ return A2({ atomic: true });
761
+ case "capturing":
762
+ return P2(i2, { name: n });
763
+ case "group":
764
+ return A2({ flags: e });
765
+ case "lookahead":
766
+ case "lookbehind":
767
+ return K2({ behind: r4 === "lookbehind", negate: o3 });
768
+ default:
769
+ throw new Error(`Unexpected group kind "${r4}"`);
770
+ }
771
+ }
772
+ function h(e) {
773
+ if (e === void 0) e = [b2()];
774
+ else if (!Array.isArray(e) || !e.length || !e.every((r4) => r4.type === "Alternative")) throw new Error("Invalid body; expected array of one or more Alternative nodes");
775
+ return e;
776
+ }
777
+ function V2(e) {
778
+ if (e === void 0) e = [];
779
+ else if (!Array.isArray(e) || !e.every((r4) => !!r4.type)) throw new Error("Invalid body; expected array of nodes");
780
+ return e;
781
+ }
782
+ function M2(e) {
783
+ return e.type === "LookaroundAssertion" && e.kind === "lookahead";
784
+ }
785
+ function $2(e) {
786
+ return e.type === "LookaroundAssertion" && e.kind === "lookbehind";
787
+ }
788
+ function se(e) {
789
+ return /^[\p{Alpha}\p{Pc}][^)]*$/u.test(e);
790
+ }
791
+ function de(e) {
792
+ return e.trim().replace(/[- _]+/g, "_").replace(/[A-Z][a-z]+(?=[A-Z])/g, "$&_").replace(/[A-Za-z]+/g, (r4) => r4[0].toUpperCase() + r4.slice(1).toLowerCase());
793
+ }
794
+ function w2(e) {
795
+ return e.replace(/[- _]+/g, "").toLowerCase();
796
+ }
797
+ function z2(e, r4) {
798
+ const n = r4;
799
+ return u(e, `Unclosed character class${n?.type === "Character" && n.value === 93 && n.raw === "]" ? ' (started with "]")' : ""}`);
800
+ }
801
+ function D2(e) {
802
+ return u(e, "Unclosed group");
803
+ }
804
+
805
+ // src/unicode.js
806
+ var asciiSpaceChar = "[ -\r ]";
807
+ var CharsWithoutIgnoreCaseExpansion = /* @__PURE__ */ new Set([
808
+ cp(304),
809
+ // İ
810
+ cp(305)
811
+ // ı
812
+ ]);
813
+ var defaultWordChar = r`[\p{L}\p{M}\p{N}\p{Pc}]`;
814
+ function getIgnoreCaseMatchChars(char) {
815
+ if (CharsWithoutIgnoreCaseExpansion.has(char)) {
816
+ return [char];
817
+ }
818
+ const set = /* @__PURE__ */ new Set();
819
+ const lower = char.toLowerCase();
820
+ const upper = lower.toUpperCase();
821
+ const title = LowerToTitleCaseMap.get(lower);
822
+ const altLower = LowerToAlternativeLowerCaseMap.get(lower);
823
+ const altUpper = LowerToAlternativeUpperCaseMap.get(lower);
824
+ if ([...upper].length === 1) {
825
+ set.add(upper);
826
+ }
827
+ altUpper && set.add(altUpper);
828
+ title && set.add(title);
829
+ set.add(lower);
830
+ altLower && set.add(altLower);
831
+ return [...set];
832
+ }
833
+ var JsUnicodePropertyMap = /* @__PURE__ */ new Map(
834
+ `C Other
835
+ Cc Control cntrl
836
+ Cf Format
837
+ Cn Unassigned
838
+ Co Private_Use
839
+ Cs Surrogate
840
+ L Letter
841
+ LC Cased_Letter
842
+ Ll Lowercase_Letter
843
+ Lm Modifier_Letter
844
+ Lo Other_Letter
845
+ Lt Titlecase_Letter
846
+ Lu Uppercase_Letter
847
+ M Mark Combining_Mark
848
+ Mc Spacing_Mark
849
+ Me Enclosing_Mark
850
+ Mn Nonspacing_Mark
851
+ N Number
852
+ Nd Decimal_Number digit
853
+ Nl Letter_Number
854
+ No Other_Number
855
+ P Punctuation punct
856
+ Pc Connector_Punctuation
857
+ Pd Dash_Punctuation
858
+ Pe Close_Punctuation
859
+ Pf Final_Punctuation
860
+ Pi Initial_Punctuation
861
+ Po Other_Punctuation
862
+ Ps Open_Punctuation
863
+ S Symbol
864
+ Sc Currency_Symbol
865
+ Sk Modifier_Symbol
866
+ Sm Math_Symbol
867
+ So Other_Symbol
868
+ Z Separator
869
+ Zl Line_Separator
870
+ Zp Paragraph_Separator
871
+ Zs Space_Separator
872
+ ASCII
873
+ ASCII_Hex_Digit AHex
874
+ Alphabetic Alpha
875
+ Any
876
+ Assigned
877
+ Bidi_Control Bidi_C
878
+ Bidi_Mirrored Bidi_M
879
+ Case_Ignorable CI
880
+ Cased
881
+ Changes_When_Casefolded CWCF
882
+ Changes_When_Casemapped CWCM
883
+ Changes_When_Lowercased CWL
884
+ Changes_When_NFKC_Casefolded CWKCF
885
+ Changes_When_Titlecased CWT
886
+ Changes_When_Uppercased CWU
887
+ Dash
888
+ Default_Ignorable_Code_Point DI
889
+ Deprecated Dep
890
+ Diacritic Dia
891
+ Emoji
892
+ Emoji_Component EComp
893
+ Emoji_Modifier EMod
894
+ Emoji_Modifier_Base EBase
895
+ Emoji_Presentation EPres
896
+ Extended_Pictographic ExtPict
897
+ Extender Ext
898
+ Grapheme_Base Gr_Base
899
+ Grapheme_Extend Gr_Ext
900
+ Hex_Digit Hex
901
+ IDS_Binary_Operator IDSB
902
+ IDS_Trinary_Operator IDST
903
+ ID_Continue IDC
904
+ ID_Start IDS
905
+ Ideographic Ideo
906
+ Join_Control Join_C
907
+ Logical_Order_Exception LOE
908
+ Lowercase Lower
909
+ Math
910
+ Noncharacter_Code_Point NChar
911
+ Pattern_Syntax Pat_Syn
912
+ Pattern_White_Space Pat_WS
913
+ Quotation_Mark QMark
914
+ Radical
915
+ Regional_Indicator RI
916
+ Sentence_Terminal STerm
917
+ Soft_Dotted SD
918
+ Terminal_Punctuation Term
919
+ Unified_Ideograph UIdeo
920
+ Uppercase Upper
921
+ Variation_Selector VS
922
+ White_Space space
923
+ XID_Continue XIDC
924
+ XID_Start XIDS`.split(/\s/).map((p) => [w2(p), p])
925
+ );
926
+ var LowerToAlternativeLowerCaseMap = /* @__PURE__ */ new Map([
927
+ ["s", cp(383)],
928
+ // s, ſ
929
+ [cp(383), "s"]
930
+ // ſ, s
931
+ ]);
932
+ var LowerToAlternativeUpperCaseMap = /* @__PURE__ */ new Map([
933
+ [cp(223), cp(7838)],
934
+ // ß, ẞ
935
+ [cp(107), cp(8490)],
936
+ // k, K (Kelvin)
937
+ [cp(229), cp(8491)],
938
+ // å, Å (Angstrom)
939
+ [cp(969), cp(8486)]
940
+ // ω, Ω (Ohm)
941
+ ]);
942
+ var LowerToTitleCaseMap = new Map([
943
+ titleEntry(453),
944
+ titleEntry(456),
945
+ titleEntry(459),
946
+ titleEntry(498),
947
+ ...titleRange(8072, 8079),
948
+ ...titleRange(8088, 8095),
949
+ ...titleRange(8104, 8111),
950
+ titleEntry(8124),
951
+ titleEntry(8140),
952
+ titleEntry(8188)
953
+ ]);
954
+ var PosixClassMap = /* @__PURE__ */ new Map([
955
+ ["alnum", r`[\p{Alpha}\p{Nd}]`],
956
+ ["alpha", r`\p{Alpha}`],
957
+ ["ascii", r`\p{ASCII}`],
958
+ ["blank", r`[\p{Zs}\t]`],
959
+ ["cntrl", r`\p{Cc}`],
960
+ ["digit", r`\p{Nd}`],
961
+ ["graph", r`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],
962
+ ["lower", r`\p{Lower}`],
963
+ ["print", r`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],
964
+ ["punct", r`[\p{P}\p{S}]`],
965
+ // Updated value from Onig 6.9.9; changed from Unicode `\p{punct}`
966
+ ["space", r`\p{space}`],
967
+ ["upper", r`\p{Upper}`],
968
+ ["word", r`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
969
+ ["xdigit", r`\p{AHex}`]
970
+ ]);
971
+ function range(start, end) {
972
+ const range2 = [];
973
+ for (let i2 = start; i2 <= end; i2++) {
974
+ range2.push(i2);
975
+ }
976
+ return range2;
977
+ }
978
+ function titleEntry(codePoint) {
979
+ const char = cp(codePoint);
980
+ return [char.toLowerCase(), char];
981
+ }
982
+ function titleRange(start, end) {
983
+ return range(start, end).map((codePoint) => titleEntry(codePoint));
984
+ }
985
+ var UnicodePropertiesWithSpecificCase = /* @__PURE__ */ new Set([
986
+ "Lower",
987
+ "Lowercase",
988
+ "Upper",
989
+ "Uppercase",
990
+ "Ll",
991
+ "Lowercase_Letter",
992
+ "Lt",
993
+ "Titlecase_Letter",
994
+ "Lu",
995
+ "Uppercase_Letter"
996
+ // The `Changes_When_*` properties (and their aliases) could be included, but they're very rare.
997
+ // Some other properties include a handful of chars with specific cases only, but these chars are
998
+ // generally extreme edge cases and using such properties case insensitively generally produces
999
+ // undesired behavior anyway
1000
+ ]);
1001
+
1002
+ // node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/traverser/traverse.js
1003
+ function S(a2, v2, N = null) {
1004
+ function b3(e, s2) {
1005
+ for (let t = 0; t < e.length; t++) {
1006
+ const r4 = n(e[t], s2, t, e);
1007
+ t = Math.max(-1, t + r4);
1008
+ }
1009
+ }
1010
+ function n(e, s2 = null, t = null, r4 = null) {
1011
+ let i2 = 0, c = false;
1012
+ const d2 = { node: e, parent: s2, key: t, container: r4, root: a2, remove() {
1013
+ x2(r4).splice(Math.max(0, l2(t) + i2), 1), i2--, c = true;
1014
+ }, removeAllNextSiblings() {
1015
+ return x2(r4).splice(l2(t) + 1);
1016
+ }, removeAllPrevSiblings() {
1017
+ const o3 = l2(t) + i2;
1018
+ return i2 -= o3, x2(r4).splice(0, Math.max(0, o3));
1019
+ }, replaceWith(o3, m3 = {}) {
1020
+ const y3 = !!m3.traverse;
1021
+ r4 ? r4[Math.max(0, l2(t) + i2)] = o3 : u(s2, "Can't replace root node")[t] = o3, y3 && n(o3, s2, t, r4), c = true;
1022
+ }, replaceWithMultiple(o3, m3 = {}) {
1023
+ const y3 = !!m3.traverse;
1024
+ if (x2(r4).splice(Math.max(0, l2(t) + i2), 1, ...o3), i2 += o3.length - 1, y3) {
1025
+ let g = 0;
1026
+ for (let p = 0; p < o3.length; p++) g += n(o3[p], s2, l2(t) + p + g, r4);
1027
+ }
1028
+ c = true;
1029
+ }, skip() {
1030
+ c = true;
1031
+ } }, { type: f2 } = e, u2 = v2["*"], h2 = v2[f2], R3 = typeof u2 == "function" ? u2 : u2?.enter, P3 = typeof h2 == "function" ? h2 : h2?.enter;
1032
+ if (R3?.(d2, N), P3?.(d2, N), !c) switch (f2) {
1033
+ case "AbsenceFunction":
1034
+ case "Alternative":
1035
+ case "CapturingGroup":
1036
+ case "CharacterClass":
1037
+ case "Group":
1038
+ case "LookaroundAssertion":
1039
+ b3(e.body, e);
1040
+ break;
1041
+ case "Assertion":
1042
+ case "Backreference":
1043
+ case "Character":
1044
+ case "CharacterSet":
1045
+ case "Directive":
1046
+ case "Flags":
1047
+ case "NamedCallout":
1048
+ case "Subroutine":
1049
+ break;
1050
+ case "CharacterClassRange":
1051
+ n(e.min, e, "min"), n(e.max, e, "max");
1052
+ break;
1053
+ case "Quantifier":
1054
+ n(e.body, e, "body");
1055
+ break;
1056
+ case "Regex":
1057
+ b3(e.body, e), n(e.flags, e, "flags");
1058
+ break;
1059
+ default:
1060
+ throw new Error(`Unexpected node type "${f2}"`);
1061
+ }
1062
+ return h2?.exit?.(d2, N), u2?.exit?.(d2, N), i2;
1063
+ }
1064
+ return n(a2), a2;
1065
+ }
1066
+ function x2(a2) {
1067
+ if (!Array.isArray(a2)) throw new Error("Container expected");
1068
+ return a2;
1069
+ }
1070
+ function l2(a2) {
1071
+ if (typeof a2 != "number") throw new Error("Numeric key expected");
1072
+ return a2;
1073
+ }
1074
+
1075
+ // src/transform.js
1076
+ function transform(ast, options) {
1077
+ const opts = {
1078
+ // A couple edge cases exist where options `accuracy` and `bestEffortTarget` are used:
1079
+ // - `CharacterSet` kind `text_segment` (`\X`): An exact representation would require heavy
1080
+ // Unicode data; a best-effort approximation requires knowing the target.
1081
+ // - `CharacterSet` kind `posix` with values `graph` and `print`: Their complex Unicode
1082
+ // representations would be hard to change to ASCII versions after the fact in the generator
1083
+ // based on `target`/`accuracy`, so produce the appropriate structure here.
1084
+ accuracy: "default",
1085
+ asciiWordBoundaries: false,
1086
+ avoidSubclass: false,
1087
+ bestEffortTarget: "ES2025",
1088
+ ...options
1089
+ };
1090
+ addParentProperties(ast);
1091
+ const firstPassState = {
1092
+ accuracy: opts.accuracy,
1093
+ asciiWordBoundaries: opts.asciiWordBoundaries,
1094
+ avoidSubclass: opts.avoidSubclass,
1095
+ flagDirectivesByAlt: /* @__PURE__ */ new Map(),
1096
+ jsGroupNameMap: /* @__PURE__ */ new Map(),
1097
+ minTargetEs2024: isMinTarget(opts.bestEffortTarget, "ES2024"),
1098
+ passedLookbehind: false,
1099
+ strategy: null,
1100
+ // Subroutines can appear before the groups they ref, so collect reffed nodes for a second pass
1101
+ subroutineRefMap: /* @__PURE__ */ new Map(),
1102
+ supportedGNodes: /* @__PURE__ */ new Set(),
1103
+ digitIsAscii: ast.flags.digitIsAscii,
1104
+ spaceIsAscii: ast.flags.spaceIsAscii,
1105
+ wordIsAscii: ast.flags.wordIsAscii
1106
+ };
1107
+ S(ast, FirstPassVisitor, firstPassState);
1108
+ const globalFlags = {
1109
+ dotAll: ast.flags.dotAll,
1110
+ ignoreCase: ast.flags.ignoreCase
1111
+ };
1112
+ const secondPassState = {
1113
+ currentFlags: globalFlags,
1114
+ prevFlags: null,
1115
+ globalFlags,
1116
+ groupOriginByCopy: /* @__PURE__ */ new Map(),
1117
+ groupsByName: /* @__PURE__ */ new Map(),
1118
+ multiplexCapturesToLeftByRef: /* @__PURE__ */ new Map(),
1119
+ openRefs: /* @__PURE__ */ new Map(),
1120
+ reffedNodesByReferencer: /* @__PURE__ */ new Map(),
1121
+ subroutineRefMap: firstPassState.subroutineRefMap
1122
+ };
1123
+ S(ast, SecondPassVisitor, secondPassState);
1124
+ const thirdPassState = {
1125
+ groupsByName: secondPassState.groupsByName,
1126
+ highestOrphanBackref: 0,
1127
+ numCapturesToLeft: 0,
1128
+ reffedNodesByReferencer: secondPassState.reffedNodesByReferencer
1129
+ };
1130
+ S(ast, ThirdPassVisitor, thirdPassState);
1131
+ ast._originMap = secondPassState.groupOriginByCopy;
1132
+ ast._strategy = firstPassState.strategy;
1133
+ return ast;
1134
+ }
1135
+ var FirstPassVisitor = {
1136
+ AbsenceFunction({ node, parent, replaceWith }) {
1137
+ const { body, kind } = node;
1138
+ if (kind === "repeater") {
1139
+ const innerGroup = A2();
1140
+ innerGroup.body[0].body.push(
1141
+ // Insert own alts as `body`
1142
+ K2({ negate: true, body }),
1143
+ Q2("Any")
1144
+ );
1145
+ const outerGroup = A2();
1146
+ outerGroup.body[0].body.push(
1147
+ _2("greedy", 0, Infinity, innerGroup)
1148
+ );
1149
+ replaceWith(setParentDeep(outerGroup, parent), { traverse: true });
1150
+ } else {
1151
+ throw new Error(`Unsupported absence function "(?~|"`);
1152
+ }
1153
+ },
1154
+ Alternative: {
1155
+ enter({ node, parent, key }, { flagDirectivesByAlt }) {
1156
+ const flagDirectives = node.body.filter((el) => el.kind === "flags");
1157
+ for (let i2 = key + 1; i2 < parent.body.length; i2++) {
1158
+ const forwardSiblingAlt = parent.body[i2];
1159
+ getOrInsert(flagDirectivesByAlt, forwardSiblingAlt, []).push(...flagDirectives);
1160
+ }
1161
+ },
1162
+ exit({ node }, { flagDirectivesByAlt }) {
1163
+ if (flagDirectivesByAlt.get(node)?.length) {
1164
+ const flags = getCombinedFlagModsFromFlagNodes(flagDirectivesByAlt.get(node));
1165
+ if (flags) {
1166
+ const flagGroup = A2({ flags });
1167
+ flagGroup.body[0].body = node.body;
1168
+ node.body = [setParentDeep(flagGroup, node)];
1169
+ }
1170
+ }
1171
+ }
1172
+ },
1173
+ Assertion({ node, parent, key, container, root, remove, replaceWith }, state) {
1174
+ const { kind, negate } = node;
1175
+ const { asciiWordBoundaries, avoidSubclass, supportedGNodes, wordIsAscii } = state;
1176
+ if (kind === "text_segment_boundary") {
1177
+ throw new Error(`Unsupported text segment boundary "\\${negate ? "Y" : "y"}"`);
1178
+ } else if (kind === "line_end") {
1179
+ replaceWith(setParentDeep(K2({ body: [
1180
+ b2({ body: [F2("string_end")] }),
1181
+ b2({ body: [m2(10)] })
1182
+ // `\n`
1183
+ ] }), parent));
1184
+ } else if (kind === "line_start") {
1185
+ replaceWith(setParentDeep(parseFragment(r`(?<=\A|\n(?!\z))`, { skipLookbehindValidation: true }), parent));
1186
+ } else if (kind === "search_start") {
1187
+ if (supportedGNodes.has(node)) {
1188
+ root.flags.sticky = true;
1189
+ remove();
1190
+ } else {
1191
+ const prev = container[key - 1];
1192
+ if (prev && isAlwaysNonZeroLength(prev)) {
1193
+ replaceWith(setParentDeep(K2({ negate: true }), parent));
1194
+ } else if (avoidSubclass) {
1195
+ throw new Error(r`Uses "\G" in a way that requires a subclass`);
1196
+ } else {
1197
+ replaceWith(setParent(F2("string_start"), parent));
1198
+ state.strategy = "clip_search";
1199
+ }
1200
+ }
1201
+ } else if (kind === "string_end" || kind === "string_start") {
1202
+ } else if (kind === "string_end_newline") {
1203
+ replaceWith(setParentDeep(parseFragment(r`(?=\n?\z)`), parent));
1204
+ } else if (kind === "word_boundary") {
1205
+ if (!wordIsAscii && !asciiWordBoundaries) {
1206
+ const b3 = `(?:(?<=${defaultWordChar})(?!${defaultWordChar})|(?<!${defaultWordChar})(?=${defaultWordChar}))`;
1207
+ const B3 = `(?:(?<=${defaultWordChar})(?=${defaultWordChar})|(?<!${defaultWordChar})(?!${defaultWordChar}))`;
1208
+ replaceWith(setParentDeep(parseFragment(negate ? B3 : b3), parent));
1209
+ }
1210
+ } else {
1211
+ throw new Error(`Unexpected assertion kind "${kind}"`);
1212
+ }
1213
+ },
1214
+ Backreference({ node }, { jsGroupNameMap }) {
1215
+ let { ref } = node;
1216
+ if (typeof ref === "string" && !isValidJsGroupName(ref)) {
1217
+ ref = getAndStoreJsGroupName(ref, jsGroupNameMap);
1218
+ node.ref = ref;
1219
+ }
1220
+ },
1221
+ CapturingGroup({ node }, { jsGroupNameMap, subroutineRefMap }) {
1222
+ let { name } = node;
1223
+ if (name && !isValidJsGroupName(name)) {
1224
+ name = getAndStoreJsGroupName(name, jsGroupNameMap);
1225
+ node.name = name;
1226
+ }
1227
+ subroutineRefMap.set(node.number, node);
1228
+ if (name) {
1229
+ subroutineRefMap.set(name, node);
1230
+ }
1231
+ },
1232
+ CharacterClassRange({ node, parent, replaceWith }) {
1233
+ if (parent.kind === "intersection") {
1234
+ const cc = C2({ body: [node] });
1235
+ replaceWith(setParentDeep(cc, parent), { traverse: true });
1236
+ }
1237
+ },
1238
+ CharacterSet({ node, parent, replaceWith }, { accuracy, minTargetEs2024, digitIsAscii, spaceIsAscii, wordIsAscii }) {
1239
+ const { kind, negate, value } = node;
1240
+ if (digitIsAscii && (kind === "digit" || value === "digit")) {
1241
+ replaceWith(setParent(E2("digit", { negate }), parent));
1242
+ return;
1243
+ }
1244
+ if (spaceIsAscii && (kind === "space" || value === "space")) {
1245
+ replaceWith(setParentDeep(setNegate(parseFragment(asciiSpaceChar), negate), parent));
1246
+ return;
1247
+ }
1248
+ if (wordIsAscii && (kind === "word" || value === "word")) {
1249
+ replaceWith(setParent(E2("word", { negate }), parent));
1250
+ return;
1251
+ }
1252
+ if (kind === "any") {
1253
+ replaceWith(setParent(Q2("Any"), parent));
1254
+ } else if (kind === "digit") {
1255
+ replaceWith(setParent(Q2("Nd", { negate }), parent));
1256
+ } else if (kind === "dot") {
1257
+ } else if (kind === "text_segment") {
1258
+ if (accuracy === "strict") {
1259
+ throw new Error(r`Use of "\X" requires non-strict accuracy`);
1260
+ }
1261
+ const eBase = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?";
1262
+ const emoji = r`\p{RI}{2}|${eBase}(?:\u200D${eBase})*`;
1263
+ replaceWith(setParentDeep(parseFragment(
1264
+ // Close approximation of an extended grapheme cluster; see <unicode.org/reports/tr29/>
1265
+ r`(?>\r\n|${minTargetEs2024 ? r`\p{RGI_Emoji}` : emoji}|\P{M}\p{M}*)`,
1266
+ // Allow JS property `RGI_Emoji` through
1267
+ { skipPropertyNameValidation: true }
1268
+ ), parent));
1269
+ } else if (kind === "hex") {
1270
+ replaceWith(setParent(Q2("AHex", { negate }), parent));
1271
+ } else if (kind === "newline") {
1272
+ replaceWith(setParentDeep(parseFragment(negate ? "[^\n]" : "(?>\r\n?|[\n\v\f\x85\u2028\u2029])"), parent));
1273
+ } else if (kind === "posix") {
1274
+ if (!minTargetEs2024 && (value === "graph" || value === "print")) {
1275
+ if (accuracy === "strict") {
1276
+ throw new Error(`POSIX class "${value}" requires min target ES2024 or non-strict accuracy`);
1277
+ }
1278
+ let ascii = {
1279
+ graph: "!-~",
1280
+ print: " -~"
1281
+ }[value];
1282
+ if (negate) {
1283
+ ascii = `\0-${cp(ascii.codePointAt(0) - 1)}${cp(ascii.codePointAt(2) + 1)}-\u{10FFFF}`;
1284
+ }
1285
+ replaceWith(setParentDeep(parseFragment(`[${ascii}]`), parent));
1286
+ } else {
1287
+ replaceWith(setParentDeep(setNegate(parseFragment(PosixClassMap.get(value)), negate), parent));
1288
+ }
1289
+ } else if (kind === "property") {
1290
+ if (!JsUnicodePropertyMap.has(w2(value))) {
1291
+ node.key = "sc";
1292
+ }
1293
+ } else if (kind === "space") {
1294
+ replaceWith(setParent(Q2("space", { negate }), parent));
1295
+ } else if (kind === "word") {
1296
+ replaceWith(setParentDeep(setNegate(parseFragment(defaultWordChar), negate), parent));
1297
+ } else {
1298
+ throw new Error(`Unexpected character set kind "${kind}"`);
1299
+ }
1300
+ },
1301
+ Directive({ node, parent, root, remove, replaceWith, removeAllPrevSiblings, removeAllNextSiblings }) {
1302
+ const { kind, flags } = node;
1303
+ if (kind === "flags") {
1304
+ if (!flags.enable && !flags.disable) {
1305
+ remove();
1306
+ } else {
1307
+ const flagGroup = A2({ flags });
1308
+ flagGroup.body[0].body = removeAllNextSiblings();
1309
+ replaceWith(setParentDeep(flagGroup, parent), { traverse: true });
1310
+ }
1311
+ } else if (kind === "keep") {
1312
+ const firstAlt = root.body[0];
1313
+ const hasWrapperGroup = root.body.length === 1 && // Not emulatable if within a `CapturingGroup`
1314
+ o2(firstAlt, { type: "Group" }) && firstAlt.body[0].body.length === 1;
1315
+ const topLevel = hasWrapperGroup ? firstAlt.body[0] : root;
1316
+ if (parent.parent !== topLevel || topLevel.body.length > 1) {
1317
+ throw new Error(r`Uses "\K" in a way that's unsupported`);
1318
+ }
1319
+ const lookbehind = K2({ behind: true });
1320
+ lookbehind.body[0].body = removeAllPrevSiblings();
1321
+ replaceWith(setParentDeep(lookbehind, parent));
1322
+ } else {
1323
+ throw new Error(`Unexpected directive kind "${kind}"`);
1324
+ }
1325
+ },
1326
+ Flags({ node, parent }) {
1327
+ if (node.posixIsAscii) {
1328
+ throw new Error('Unsupported flag "P"');
1329
+ }
1330
+ if (node.textSegmentMode === "word") {
1331
+ throw new Error('Unsupported flag "y{w}"');
1332
+ }
1333
+ [
1334
+ "digitIsAscii",
1335
+ // Flag D
1336
+ "extended",
1337
+ // Flag x
1338
+ "posixIsAscii",
1339
+ // Flag P
1340
+ "spaceIsAscii",
1341
+ // Flag S
1342
+ "wordIsAscii",
1343
+ // Flag W
1344
+ "textSegmentMode"
1345
+ // Flag y{g} or y{w}
1346
+ ].forEach((f2) => delete node[f2]);
1347
+ Object.assign(node, {
1348
+ // JS flag g; no Onig equiv
1349
+ global: false,
1350
+ // JS flag d; no Onig equiv
1351
+ hasIndices: false,
1352
+ // JS flag m; no Onig equiv but its behavior is always on in Onig. Onig's only line break
1353
+ // char is line feed, unlike JS, so this flag isn't used since it would produce inaccurate
1354
+ // results (also allows `^` and `$` to be used in the generator for string start and end)
1355
+ multiline: false,
1356
+ // JS flag y; no Onig equiv, but used for `\G` emulation
1357
+ sticky: node.sticky ?? false
1358
+ // Note: Regex+ doesn't allow explicitly adding flags it handles implicitly, so leave out
1359
+ // properties `unicode` (JS flag u) and `unicodeSets` (JS flag v). Keep the existing values
1360
+ // for `ignoreCase` (flag i) and `dotAll` (JS flag s, but Onig flag m)
1361
+ });
1362
+ parent.options = {
1363
+ disable: {
1364
+ // Onig uses different rules for flag x than Regex+, so disable the implicit flag
1365
+ x: true,
1366
+ // Onig has no flag to control "named capture only" mode but contextually applies its
1367
+ // behavior when named capturing is used, so disable Regex+'s implicit flag for it
1368
+ n: true
1369
+ },
1370
+ force: {
1371
+ // Always add flag v because we're generating an AST that relies on it (it enables JS
1372
+ // support for Onig features nested classes, intersection, Unicode properties, etc.).
1373
+ // However, the generator might disable flag v based on its `target` option
1374
+ v: true
1375
+ }
1376
+ };
1377
+ },
1378
+ Group({ node }) {
1379
+ if (!node.flags) {
1380
+ return;
1381
+ }
1382
+ const { enable, disable } = node.flags;
1383
+ enable?.extended && delete enable.extended;
1384
+ disable?.extended && delete disable.extended;
1385
+ enable?.dotAll && disable?.dotAll && delete enable.dotAll;
1386
+ enable?.ignoreCase && disable?.ignoreCase && delete enable.ignoreCase;
1387
+ enable && !Object.keys(enable).length && delete node.flags.enable;
1388
+ disable && !Object.keys(disable).length && delete node.flags.disable;
1389
+ !node.flags.enable && !node.flags.disable && delete node.flags;
1390
+ },
1391
+ LookaroundAssertion({ node }, state) {
1392
+ const { kind } = node;
1393
+ if (kind === "lookbehind") {
1394
+ state.passedLookbehind = true;
1395
+ }
1396
+ },
1397
+ NamedCallout({ node, parent, replaceWith }) {
1398
+ const { kind } = node;
1399
+ if (kind === "fail") {
1400
+ replaceWith(setParentDeep(K2({ negate: true }), parent));
1401
+ } else {
1402
+ throw new Error(`Unsupported named callout "(*${kind.toUpperCase()}"`);
1403
+ }
1404
+ },
1405
+ Quantifier({ node }) {
1406
+ if (node.body.type === "Quantifier") {
1407
+ const group = A2();
1408
+ group.body[0].body.push(node.body);
1409
+ node.body = setParentDeep(group, node);
1410
+ }
1411
+ },
1412
+ Regex: {
1413
+ enter({ node }, { supportedGNodes }) {
1414
+ const leadingGs = [];
1415
+ let hasAltWithLeadG = false;
1416
+ let hasAltWithoutLeadG = false;
1417
+ for (const alt of node.body) {
1418
+ if (alt.body.length === 1 && alt.body[0].kind === "search_start") {
1419
+ alt.body.pop();
1420
+ } else {
1421
+ const leadingG = getLeadingG(alt.body);
1422
+ if (leadingG) {
1423
+ hasAltWithLeadG = true;
1424
+ Array.isArray(leadingG) ? leadingGs.push(...leadingG) : leadingGs.push(leadingG);
1425
+ } else {
1426
+ hasAltWithoutLeadG = true;
1427
+ }
1428
+ }
1429
+ }
1430
+ if (hasAltWithLeadG && !hasAltWithoutLeadG) {
1431
+ leadingGs.forEach((g) => supportedGNodes.add(g));
1432
+ }
1433
+ },
1434
+ exit(_3, { accuracy, passedLookbehind, strategy }) {
1435
+ if (accuracy === "strict" && passedLookbehind && strategy) {
1436
+ throw new Error(r`Uses "\G" in a way that requires non-strict accuracy`);
1437
+ }
1438
+ }
1439
+ },
1440
+ Subroutine({ node }, { jsGroupNameMap }) {
1441
+ let { ref } = node;
1442
+ if (typeof ref === "string" && !isValidJsGroupName(ref)) {
1443
+ ref = getAndStoreJsGroupName(ref, jsGroupNameMap);
1444
+ node.ref = ref;
1445
+ }
1446
+ }
1447
+ };
1448
+ var SecondPassVisitor = {
1449
+ Backreference({ node }, { multiplexCapturesToLeftByRef, reffedNodesByReferencer }) {
1450
+ const { orphan, ref } = node;
1451
+ if (!orphan) {
1452
+ reffedNodesByReferencer.set(node, [...multiplexCapturesToLeftByRef.get(ref).map(({ node: node2 }) => node2)]);
1453
+ }
1454
+ },
1455
+ CapturingGroup: {
1456
+ enter({
1457
+ node,
1458
+ parent,
1459
+ replaceWith,
1460
+ skip
1461
+ }, {
1462
+ groupOriginByCopy,
1463
+ groupsByName,
1464
+ multiplexCapturesToLeftByRef,
1465
+ openRefs,
1466
+ reffedNodesByReferencer
1467
+ }) {
1468
+ const origin = groupOriginByCopy.get(node);
1469
+ if (origin && openRefs.has(node.number)) {
1470
+ const recursion2 = setParent(createRecursion(node.number), parent);
1471
+ reffedNodesByReferencer.set(recursion2, openRefs.get(node.number));
1472
+ replaceWith(recursion2);
1473
+ return;
1474
+ }
1475
+ openRefs.set(node.number, node);
1476
+ multiplexCapturesToLeftByRef.set(node.number, []);
1477
+ if (node.name) {
1478
+ getOrInsert(multiplexCapturesToLeftByRef, node.name, []);
1479
+ }
1480
+ const multiplexNodes = multiplexCapturesToLeftByRef.get(node.name ?? node.number);
1481
+ for (let i2 = 0; i2 < multiplexNodes.length; i2++) {
1482
+ const multiplex = multiplexNodes[i2];
1483
+ if (
1484
+ // This group is from subroutine expansion, and there's a multiplex value from either the
1485
+ // origin node or a prior subroutine expansion group with the same origin
1486
+ origin === multiplex.node || origin && origin === multiplex.origin || // This group is not from subroutine expansion, and it comes after a subroutine expansion
1487
+ // group that refers to this group
1488
+ node === multiplex.origin
1489
+ ) {
1490
+ multiplexNodes.splice(i2, 1);
1491
+ break;
1492
+ }
1493
+ }
1494
+ multiplexCapturesToLeftByRef.get(node.number).push({ node, origin });
1495
+ if (node.name) {
1496
+ multiplexCapturesToLeftByRef.get(node.name).push({ node, origin });
1497
+ }
1498
+ if (node.name) {
1499
+ const groupsWithSameName = getOrInsert(groupsByName, node.name, /* @__PURE__ */ new Map());
1500
+ let hasDuplicateNameToRemove = false;
1501
+ if (origin) {
1502
+ hasDuplicateNameToRemove = true;
1503
+ } else {
1504
+ for (const groupInfo of groupsWithSameName.values()) {
1505
+ if (!groupInfo.hasDuplicateNameToRemove) {
1506
+ hasDuplicateNameToRemove = true;
1507
+ break;
1508
+ }
1509
+ }
1510
+ }
1511
+ groupsByName.get(node.name).set(node, { node, hasDuplicateNameToRemove });
1512
+ }
1513
+ },
1514
+ exit({ node }, { openRefs }) {
1515
+ if (openRefs.get(node.number) === node) {
1516
+ openRefs.delete(node.number);
1517
+ }
1518
+ }
1519
+ },
1520
+ Group: {
1521
+ enter({ node }, state) {
1522
+ state.prevFlags = state.currentFlags;
1523
+ if (node.flags) {
1524
+ state.currentFlags = getNewCurrentFlags(state.currentFlags, node.flags);
1525
+ }
1526
+ },
1527
+ exit(_3, state) {
1528
+ state.currentFlags = state.prevFlags;
1529
+ }
1530
+ },
1531
+ Subroutine({ node, parent, replaceWith }, state) {
1532
+ const { isRecursive, ref } = node;
1533
+ if (isRecursive) {
1534
+ let reffed = parent;
1535
+ while (reffed = reffed.parent) {
1536
+ if (reffed.type === "CapturingGroup" && (reffed.name === ref || reffed.number === ref)) {
1537
+ break;
1538
+ }
1539
+ }
1540
+ state.reffedNodesByReferencer.set(node, reffed);
1541
+ return;
1542
+ }
1543
+ const reffedGroupNode = state.subroutineRefMap.get(ref);
1544
+ const isGlobalRecursion = ref === 0;
1545
+ const expandedSubroutine = isGlobalRecursion ? createRecursion(0) : (
1546
+ // The reffed group might itself contain subroutines, which are expanded during sub-traversal
1547
+ cloneCapturingGroup(reffedGroupNode, state.groupOriginByCopy, null)
1548
+ );
1549
+ let replacement = expandedSubroutine;
1550
+ if (!isGlobalRecursion) {
1551
+ const reffedGroupFlagMods = getCombinedFlagModsFromFlagNodes(getAllParents(
1552
+ reffedGroupNode,
1553
+ (p) => p.type === "Group" && !!p.flags
1554
+ ));
1555
+ const reffedGroupFlags = reffedGroupFlagMods ? getNewCurrentFlags(state.globalFlags, reffedGroupFlagMods) : state.globalFlags;
1556
+ if (!areFlagsEqual(reffedGroupFlags, state.currentFlags)) {
1557
+ replacement = A2({
1558
+ flags: getFlagModsFromFlags(reffedGroupFlags)
1559
+ });
1560
+ replacement.body[0].body.push(expandedSubroutine);
1561
+ }
1562
+ }
1563
+ replaceWith(setParentDeep(replacement, parent), { traverse: !isGlobalRecursion });
1564
+ }
1565
+ };
1566
+ var ThirdPassVisitor = {
1567
+ Backreference({ node, parent, replaceWith }, state) {
1568
+ if (node.orphan) {
1569
+ state.highestOrphanBackref = Math.max(state.highestOrphanBackref, node.ref);
1570
+ return;
1571
+ }
1572
+ const reffedNodes = state.reffedNodesByReferencer.get(node);
1573
+ const participants = reffedNodes.filter((reffed) => canParticipateWithNode(reffed, node));
1574
+ if (!participants.length) {
1575
+ replaceWith(setParentDeep(K2({ negate: true }), parent));
1576
+ } else if (participants.length > 1) {
1577
+ const group = A2({
1578
+ atomic: true,
1579
+ body: participants.reverse().map((reffed) => b2({
1580
+ body: [k2(reffed.number)]
1581
+ }))
1582
+ });
1583
+ replaceWith(setParentDeep(group, parent));
1584
+ } else {
1585
+ node.ref = participants[0].number;
1586
+ }
1587
+ },
1588
+ CapturingGroup({ node }, state) {
1589
+ node.number = ++state.numCapturesToLeft;
1590
+ if (node.name) {
1591
+ if (state.groupsByName.get(node.name).get(node).hasDuplicateNameToRemove) {
1592
+ delete node.name;
1593
+ }
1594
+ }
1595
+ },
1596
+ Regex: {
1597
+ exit({ node }, state) {
1598
+ const numCapsNeeded = Math.max(state.highestOrphanBackref - state.numCapturesToLeft, 0);
1599
+ for (let i2 = 0; i2 < numCapsNeeded; i2++) {
1600
+ const emptyCapture = P2();
1601
+ node.body.at(-1).body.push(emptyCapture);
1602
+ }
1603
+ }
1604
+ },
1605
+ Subroutine({ node }, state) {
1606
+ if (!node.isRecursive || node.ref === 0) {
1607
+ return;
1608
+ }
1609
+ node.ref = state.reffedNodesByReferencer.get(node).number;
1610
+ }
1611
+ };
1612
+ function addParentProperties(root) {
1613
+ S(root, {
1614
+ "*"({ node, parent }) {
1615
+ node.parent = parent;
1616
+ }
1617
+ });
1618
+ }
1619
+ function areFlagsEqual(a2, b3) {
1620
+ return a2.dotAll === b3.dotAll && a2.ignoreCase === b3.ignoreCase;
1621
+ }
1622
+ function canParticipateWithNode(capture, node) {
1623
+ let rightmostPoint = node;
1624
+ do {
1625
+ if (rightmostPoint.type === "Regex") {
1626
+ return false;
1627
+ }
1628
+ if (rightmostPoint.type === "Alternative") {
1629
+ continue;
1630
+ }
1631
+ if (rightmostPoint === capture) {
1632
+ return false;
1633
+ }
1634
+ const kidsOfParent = getKids(rightmostPoint.parent);
1635
+ for (const kid of kidsOfParent) {
1636
+ if (kid === rightmostPoint) {
1637
+ break;
1638
+ }
1639
+ if (kid === capture || isAncestorOf(kid, capture)) {
1640
+ return true;
1641
+ }
1642
+ }
1643
+ } while (rightmostPoint = rightmostPoint.parent);
1644
+ throw new Error("Unexpected path");
1645
+ }
1646
+ function cloneCapturingGroup(obj, originMap, up, up2) {
1647
+ const store = Array.isArray(obj) ? [] : {};
1648
+ for (const [key, value] of Object.entries(obj)) {
1649
+ if (key === "parent") {
1650
+ store.parent = Array.isArray(up) ? up2 : up;
1651
+ } else if (value && typeof value === "object") {
1652
+ store[key] = cloneCapturingGroup(value, originMap, store, up);
1653
+ } else {
1654
+ if (key === "type" && value === "CapturingGroup") {
1655
+ originMap.set(store, originMap.get(obj) ?? obj);
1656
+ }
1657
+ store[key] = value;
1658
+ }
1659
+ }
1660
+ return store;
1661
+ }
1662
+ function createRecursion(ref) {
1663
+ const node = O2(ref);
1664
+ node.isRecursive = true;
1665
+ return node;
1666
+ }
1667
+ function getAllParents(node, filterFn) {
1668
+ const results = [];
1669
+ while (node = node.parent) {
1670
+ if (!filterFn || filterFn(node)) {
1671
+ results.push(node);
1672
+ }
1673
+ }
1674
+ return results;
1675
+ }
1676
+ function getAndStoreJsGroupName(name, map) {
1677
+ if (map.has(name)) {
1678
+ return map.get(name);
1679
+ }
1680
+ const jsName = `$${map.size}_${name.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug, "_")}`;
1681
+ map.set(name, jsName);
1682
+ return jsName;
1683
+ }
1684
+ function getCombinedFlagModsFromFlagNodes(flagNodes) {
1685
+ const flagProps = ["dotAll", "ignoreCase"];
1686
+ const combinedFlags = { enable: {}, disable: {} };
1687
+ flagNodes.forEach(({ flags }) => {
1688
+ flagProps.forEach((prop) => {
1689
+ if (flags.enable?.[prop]) {
1690
+ delete combinedFlags.disable[prop];
1691
+ combinedFlags.enable[prop] = true;
1692
+ }
1693
+ if (flags.disable?.[prop]) {
1694
+ combinedFlags.disable[prop] = true;
1695
+ }
1696
+ });
1697
+ });
1698
+ if (!Object.keys(combinedFlags.enable).length) {
1699
+ delete combinedFlags.enable;
1700
+ }
1701
+ if (!Object.keys(combinedFlags.disable).length) {
1702
+ delete combinedFlags.disable;
1703
+ }
1704
+ if (combinedFlags.enable || combinedFlags.disable) {
1705
+ return combinedFlags;
1706
+ }
1707
+ return null;
1708
+ }
1709
+ function getFlagModsFromFlags({ dotAll, ignoreCase }) {
1710
+ const mods = {};
1711
+ if (dotAll || ignoreCase) {
1712
+ mods.enable = {};
1713
+ dotAll && (mods.enable.dotAll = true);
1714
+ ignoreCase && (mods.enable.ignoreCase = true);
1715
+ }
1716
+ if (!dotAll || !ignoreCase) {
1717
+ mods.disable = {};
1718
+ !dotAll && (mods.disable.dotAll = true);
1719
+ !ignoreCase && (mods.disable.ignoreCase = true);
1720
+ }
1721
+ return mods;
1722
+ }
1723
+ function getKids(node) {
1724
+ if (!node) {
1725
+ throw new Error("Node expected");
1726
+ }
1727
+ const { body } = node;
1728
+ return Array.isArray(body) ? body : body ? [body] : null;
1729
+ }
1730
+ function getLeadingG(els) {
1731
+ const firstToConsider = els.find((el) => el.kind === "search_start" || isLoneGLookaround(el, { negate: false }) || !isAlwaysZeroLength(el));
1732
+ if (!firstToConsider) {
1733
+ return null;
1734
+ }
1735
+ if (firstToConsider.kind === "search_start") {
1736
+ return firstToConsider;
1737
+ }
1738
+ if (firstToConsider.type === "LookaroundAssertion") {
1739
+ return firstToConsider.body[0].body[0];
1740
+ }
1741
+ if (firstToConsider.type === "CapturingGroup" || firstToConsider.type === "Group") {
1742
+ const gNodesForGroup = [];
1743
+ for (const alt of firstToConsider.body) {
1744
+ const leadingG = getLeadingG(alt.body);
1745
+ if (!leadingG) {
1746
+ return null;
1747
+ }
1748
+ Array.isArray(leadingG) ? gNodesForGroup.push(...leadingG) : gNodesForGroup.push(leadingG);
1749
+ }
1750
+ return gNodesForGroup;
1751
+ }
1752
+ return null;
1753
+ }
1754
+ function isAncestorOf(node, descendant) {
1755
+ const kids = getKids(node) ?? [];
1756
+ for (const kid of kids) {
1757
+ if (kid === descendant || isAncestorOf(kid, descendant)) {
1758
+ return true;
1759
+ }
1760
+ }
1761
+ return false;
1762
+ }
1763
+ function isAlwaysZeroLength({ type }) {
1764
+ return type === "Assertion" || type === "Directive" || type === "LookaroundAssertion";
1765
+ }
1766
+ function isAlwaysNonZeroLength(node) {
1767
+ const types = [
1768
+ "Character",
1769
+ "CharacterClass",
1770
+ "CharacterSet"
1771
+ ];
1772
+ return types.includes(node.type) || node.type === "Quantifier" && node.min && types.includes(node.body.type);
1773
+ }
1774
+ function isLoneGLookaround(node, options) {
1775
+ const opts = {
1776
+ negate: null,
1777
+ ...options
1778
+ };
1779
+ return node.type === "LookaroundAssertion" && (opts.negate === null || node.negate === opts.negate) && node.body.length === 1 && o2(node.body[0], {
1780
+ type: "Assertion",
1781
+ kind: "search_start"
1782
+ });
1783
+ }
1784
+ function isValidJsGroupName(name) {
1785
+ return /^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(name);
1786
+ }
1787
+ function parseFragment(pattern, options) {
1788
+ const ast = J2(pattern, {
1789
+ ...options,
1790
+ // Providing a custom set of Unicode property names avoids converting some JS Unicode
1791
+ // properties (ex: `\p{Alpha}`) to Onig POSIX classes
1792
+ unicodePropertyMap: JsUnicodePropertyMap
1793
+ });
1794
+ const alts = ast.body;
1795
+ if (alts.length > 1 || alts[0].body.length > 1) {
1796
+ return A2({ body: alts });
1797
+ }
1798
+ return alts[0].body[0];
1799
+ }
1800
+ function setNegate(node, negate) {
1801
+ node.negate = negate;
1802
+ return node;
1803
+ }
1804
+ function setParent(node, parent) {
1805
+ node.parent = parent;
1806
+ return node;
1807
+ }
1808
+ function setParentDeep(node, parent) {
1809
+ addParentProperties(node);
1810
+ node.parent = parent;
1811
+ return node;
1812
+ }
1813
+
1814
+ // src/generate.js
1815
+ function generate(ast, options) {
1816
+ const opts = getOptions(options);
1817
+ const minTargetEs2024 = isMinTarget(opts.target, "ES2024");
1818
+ const minTargetEs2025 = isMinTarget(opts.target, "ES2025");
1819
+ const recursionLimit = opts.rules.recursionLimit;
1820
+ if (!Number.isInteger(recursionLimit) || recursionLimit < 2 || recursionLimit > 20) {
1821
+ throw new Error("Invalid recursionLimit; use 2-20");
1822
+ }
1823
+ let hasCaseInsensitiveNode = null;
1824
+ let hasCaseSensitiveNode = null;
1825
+ if (!minTargetEs2025) {
1826
+ const iStack = [ast.flags.ignoreCase];
1827
+ S(ast, FlagModifierVisitor, {
1828
+ getCurrentModI: () => iStack.at(-1),
1829
+ popModI() {
1830
+ iStack.pop();
1831
+ },
1832
+ pushModI(isIOn) {
1833
+ iStack.push(isIOn);
1834
+ },
1835
+ setHasCasedChar() {
1836
+ if (iStack.at(-1)) {
1837
+ hasCaseInsensitiveNode = true;
1838
+ } else {
1839
+ hasCaseSensitiveNode = true;
1840
+ }
1841
+ }
1842
+ });
1843
+ }
1844
+ const appliedGlobalFlags = {
1845
+ dotAll: ast.flags.dotAll,
1846
+ // - Turn global flag i on if a case insensitive node was used and no case sensitive nodes were
1847
+ // used (to avoid unnecessary node expansion).
1848
+ // - Turn global flag i off if a case sensitive node was used (since case sensitivity can't be
1849
+ // forced without the use of ES2025 flag groups)
1850
+ ignoreCase: !!((ast.flags.ignoreCase || hasCaseInsensitiveNode) && !hasCaseSensitiveNode)
1851
+ };
1852
+ let lastNode = ast;
1853
+ const state = {
1854
+ accuracy: opts.accuracy,
1855
+ appliedGlobalFlags,
1856
+ captureMap: /* @__PURE__ */ new Map(),
1857
+ currentFlags: {
1858
+ dotAll: ast.flags.dotAll,
1859
+ ignoreCase: ast.flags.ignoreCase
1860
+ },
1861
+ inCharClass: false,
1862
+ lastNode,
1863
+ originMap: ast._originMap,
1864
+ recursionLimit,
1865
+ useAppliedIgnoreCase: !!(!minTargetEs2025 && hasCaseInsensitiveNode && hasCaseSensitiveNode),
1866
+ useFlagMods: minTargetEs2025,
1867
+ useFlagV: minTargetEs2024,
1868
+ verbose: opts.verbose
1869
+ };
1870
+ function gen(node) {
1871
+ state.lastNode = lastNode;
1872
+ lastNode = node;
1873
+ const fn = throwIfNullish(generator[node.type], `Unexpected node type "${node.type}"`);
1874
+ return fn(node, state, gen);
1875
+ }
1876
+ const result = {
1877
+ pattern: ast.body.map(gen).join("|"),
1878
+ // Could reset `lastNode` at this point via `lastNode = ast`, but it isn't needed by flags
1879
+ flags: gen(ast.flags),
1880
+ options: { ...ast.options }
1881
+ };
1882
+ if (!minTargetEs2024) {
1883
+ delete result.options.force.v;
1884
+ result.options.disable.v = true;
1885
+ result.options.unicodeSetsPlugin = null;
1886
+ }
1887
+ result._captureTransfers = /* @__PURE__ */ new Map();
1888
+ result._hiddenCaptures = [];
1889
+ state.captureMap.forEach((value, key) => {
1890
+ if (value.hidden) {
1891
+ result._hiddenCaptures.push(key);
1892
+ }
1893
+ if (value.transferTo) {
1894
+ getOrInsert(result._captureTransfers, value.transferTo, []).push(key);
1895
+ }
1896
+ });
1897
+ return result;
1898
+ }
1899
+ var FlagModifierVisitor = {
1900
+ "*": {
1901
+ enter({ node }, state) {
1902
+ if (isAnyGroup(node)) {
1903
+ const currentModI = state.getCurrentModI();
1904
+ state.pushModI(
1905
+ node.flags ? getNewCurrentFlags({ ignoreCase: currentModI }, node.flags).ignoreCase : currentModI
1906
+ );
1907
+ }
1908
+ },
1909
+ exit({ node }, state) {
1910
+ if (isAnyGroup(node)) {
1911
+ state.popModI();
1912
+ }
1913
+ }
1914
+ },
1915
+ Backreference(_3, state) {
1916
+ state.setHasCasedChar();
1917
+ },
1918
+ Character({ node }, state) {
1919
+ if (charHasCase(cp(node.value))) {
1920
+ state.setHasCasedChar();
1921
+ }
1922
+ },
1923
+ CharacterClassRange({ node, skip }, state) {
1924
+ skip();
1925
+ if (getCasesOutsideCharClassRange(node, { firstOnly: true }).length) {
1926
+ state.setHasCasedChar();
1927
+ }
1928
+ },
1929
+ CharacterSet({ node }, state) {
1930
+ if (node.kind === "property" && UnicodePropertiesWithSpecificCase.has(node.value)) {
1931
+ state.setHasCasedChar();
1932
+ }
1933
+ }
1934
+ };
1935
+ var generator = {
1936
+ /**
1937
+ @param {AlternativeNode} node
1938
+ */
1939
+ Alternative({ body }, _3, gen) {
1940
+ return body.map(gen).join("");
1941
+ },
1942
+ /**
1943
+ @param {AssertionNode} node
1944
+ */
1945
+ Assertion({ kind, negate }) {
1946
+ if (kind === "string_end") {
1947
+ return "$";
1948
+ }
1949
+ if (kind === "string_start") {
1950
+ return "^";
1951
+ }
1952
+ if (kind === "word_boundary") {
1953
+ return negate ? r`\B` : r`\b`;
1954
+ }
1955
+ throw new Error(`Unexpected assertion kind "${kind}"`);
1956
+ },
1957
+ /**
1958
+ @param {BackreferenceNode} node
1959
+ */
1960
+ Backreference({ ref }, state) {
1961
+ if (typeof ref !== "number") {
1962
+ throw new Error("Unexpected named backref in transformed AST");
1963
+ }
1964
+ if (!state.useFlagMods && state.accuracy === "strict" && state.currentFlags.ignoreCase && !state.captureMap.get(ref).ignoreCase) {
1965
+ throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");
1966
+ }
1967
+ return "\\" + ref;
1968
+ },
1969
+ /**
1970
+ @param {CapturingGroupNode} node
1971
+ */
1972
+ CapturingGroup(node, state, gen) {
1973
+ const { body, name, number } = node;
1974
+ const data = { ignoreCase: state.currentFlags.ignoreCase };
1975
+ const origin = state.originMap.get(node);
1976
+ if (origin) {
1977
+ data.hidden = true;
1978
+ if (number > origin.number) {
1979
+ data.transferTo = origin.number;
1980
+ }
1981
+ }
1982
+ state.captureMap.set(number, data);
1983
+ return `(${name ? `?<${name}>` : ""}${body.map(gen).join("|")})`;
1984
+ },
1985
+ /**
1986
+ @param {CharacterNode} node
1987
+ */
1988
+ Character({ value }, state) {
1989
+ const char = cp(value);
1990
+ const escaped = getCharEscape(value, {
1991
+ escDigit: state.lastNode.type === "Backreference",
1992
+ inCharClass: state.inCharClass,
1993
+ useFlagV: state.useFlagV
1994
+ });
1995
+ if (escaped !== char) {
1996
+ return escaped;
1997
+ }
1998
+ if (state.useAppliedIgnoreCase && state.currentFlags.ignoreCase && charHasCase(char)) {
1999
+ const cases = getIgnoreCaseMatchChars(char);
2000
+ return state.inCharClass ? cases.join("") : cases.length > 1 ? `[${cases.join("")}]` : cases[0];
2001
+ }
2002
+ return char;
2003
+ },
2004
+ /**
2005
+ @param {CharacterClassNode} node
2006
+ */
2007
+ CharacterClass(node, state, gen) {
2008
+ const { kind, negate, parent } = node;
2009
+ let { body } = node;
2010
+ if (kind === "intersection" && !state.useFlagV) {
2011
+ throw new Error("Use of character class intersection requires min target ES2024");
2012
+ }
2013
+ if (envFlags.bugFlagVLiteralHyphenIsRange && state.useFlagV && body.some(isLiteralHyphen)) {
2014
+ body = [m2(45), ...body.filter((kid) => !isLiteralHyphen(kid))];
2015
+ }
2016
+ const genClass = () => `[${negate ? "^" : ""}${body.map(gen).join(kind === "intersection" ? "&&" : "")}]`;
2017
+ if (!state.inCharClass) {
2018
+ if (
2019
+ // Already established `kind !== 'intersection'` if `!state.useFlagV`; don't check again
2020
+ (!state.useFlagV || envFlags.bugNestedClassIgnoresNegation) && !negate
2021
+ ) {
2022
+ const negatedChildClasses = body.filter(
2023
+ (kid) => kid.type === "CharacterClass" && kid.kind === "union" && kid.negate
2024
+ );
2025
+ if (negatedChildClasses.length) {
2026
+ const group = A2();
2027
+ const groupFirstAlt = group.body[0];
2028
+ group.parent = parent;
2029
+ groupFirstAlt.parent = group;
2030
+ body = body.filter((kid) => !negatedChildClasses.includes(kid));
2031
+ node.body = body;
2032
+ if (body.length) {
2033
+ node.parent = groupFirstAlt;
2034
+ groupFirstAlt.body.push(node);
2035
+ } else {
2036
+ group.body.pop();
2037
+ }
2038
+ negatedChildClasses.forEach((cc) => {
2039
+ const newAlt = b2({ body: [cc] });
2040
+ cc.parent = newAlt;
2041
+ newAlt.parent = group;
2042
+ group.body.push(newAlt);
2043
+ });
2044
+ return gen(group);
2045
+ }
2046
+ }
2047
+ state.inCharClass = true;
2048
+ const result = genClass();
2049
+ state.inCharClass = false;
2050
+ return result;
2051
+ }
2052
+ const firstEl = body[0];
2053
+ if (
2054
+ // Already established that the parent is a char class via `inCharClass`; don't check again
2055
+ kind === "union" && !negate && firstEl && // Allows many nested classes to work with `target` ES2018 which doesn't support nesting
2056
+ ((!state.useFlagV || !state.verbose) && parent.kind === "union" && !(envFlags.bugFlagVLiteralHyphenIsRange && state.useFlagV) || !state.verbose && parent.kind === "intersection" && // JS doesn't allow intersection with union or ranges
2057
+ body.length === 1 && firstEl.type !== "CharacterClassRange")
2058
+ ) {
2059
+ return body.map(gen).join("");
2060
+ }
2061
+ if (!state.useFlagV && parent.type === "CharacterClass") {
2062
+ throw new Error("Uses nested character class in a way that requires min target ES2024");
2063
+ }
2064
+ return genClass();
2065
+ },
2066
+ /**
2067
+ @param {CharacterClassRangeNode} node
2068
+ */
2069
+ CharacterClassRange(node, state) {
2070
+ const min = node.min.value;
2071
+ const max = node.max.value;
2072
+ const escOpts = {
2073
+ escDigit: false,
2074
+ inCharClass: true,
2075
+ useFlagV: state.useFlagV
2076
+ };
2077
+ const minStr = getCharEscape(min, escOpts);
2078
+ const maxStr = getCharEscape(max, escOpts);
2079
+ const extraChars = /* @__PURE__ */ new Set();
2080
+ if (state.useAppliedIgnoreCase && state.currentFlags.ignoreCase) {
2081
+ const charsOutsideRange = getCasesOutsideCharClassRange(node);
2082
+ const ranges = getCodePointRangesFromChars(charsOutsideRange);
2083
+ ranges.forEach((value) => {
2084
+ extraChars.add(
2085
+ Array.isArray(value) ? `${getCharEscape(value[0], escOpts)}-${getCharEscape(value[1], escOpts)}` : getCharEscape(value, escOpts)
2086
+ );
2087
+ });
2088
+ }
2089
+ return `${minStr}-${maxStr}${[...extraChars].join("")}`;
2090
+ },
2091
+ /**
2092
+ @param {CharacterSetNode} node
2093
+ */
2094
+ CharacterSet({ kind, negate, value, key }, state) {
2095
+ if (kind === "dot") {
2096
+ return state.currentFlags.dotAll ? state.appliedGlobalFlags.dotAll || state.useFlagMods ? "." : "[^]" : (
2097
+ // Onig's only line break char is line feed, unlike JS
2098
+ r`[^\n]`
2099
+ );
2100
+ }
2101
+ if (kind === "digit") {
2102
+ return negate ? r`\D` : r`\d`;
2103
+ }
2104
+ if (kind === "property") {
2105
+ if (state.useAppliedIgnoreCase && state.currentFlags.ignoreCase && UnicodePropertiesWithSpecificCase.has(value)) {
2106
+ throw new Error(`Unicode property "${value}" can't be case-insensitive when other chars have specific case`);
2107
+ }
2108
+ return `${negate ? r`\P` : r`\p`}{${key ? `${key}=` : ""}${value}}`;
2109
+ }
2110
+ if (kind === "word") {
2111
+ return negate ? r`\W` : r`\w`;
2112
+ }
2113
+ throw new Error(`Unexpected character set kind "${kind}"`);
2114
+ },
2115
+ /**
2116
+ @param {FlagsNode} node
2117
+ */
2118
+ Flags(node, state) {
2119
+ return (
2120
+ // The transformer should never turn on the properties for flags d, g, m since Onig doesn't
2121
+ // have equivs. Flag m is never used since Onig uses different line break chars than JS
2122
+ // (node.hasIndices ? 'd' : '') +
2123
+ // (node.global ? 'g' : '') +
2124
+ // (node.multiline ? 'm' : '') +
2125
+ (state.appliedGlobalFlags.ignoreCase ? "i" : "") + (node.dotAll ? "s" : "") + (node.sticky ? "y" : "")
2126
+ );
2127
+ },
2128
+ /**
2129
+ @param {GroupNode} node
2130
+ */
2131
+ Group({ atomic: atomic2, body, flags, parent }, state, gen) {
2132
+ const currentFlags = state.currentFlags;
2133
+ if (flags) {
2134
+ state.currentFlags = getNewCurrentFlags(currentFlags, flags);
2135
+ }
2136
+ const contents = body.map(gen).join("|");
2137
+ const result = !state.verbose && body.length === 1 && // Single alt
2138
+ parent.type !== "Quantifier" && !atomic2 && (!state.useFlagMods || !flags) ? contents : `(?${getGroupPrefix(atomic2, flags, state.useFlagMods)}${contents})`;
2139
+ state.currentFlags = currentFlags;
2140
+ return result;
2141
+ },
2142
+ /**
2143
+ @param {LookaroundAssertionNode} node
2144
+ */
2145
+ LookaroundAssertion({ body, kind, negate }, _3, gen) {
2146
+ const prefix = `${kind === "lookahead" ? "" : "<"}${negate ? "!" : "="}`;
2147
+ return `(?${prefix}${body.map(gen).join("|")})`;
2148
+ },
2149
+ /**
2150
+ @param {QuantifierNode} node
2151
+ */
2152
+ Quantifier(node, _3, gen) {
2153
+ return gen(node.body) + getQuantifierStr(node);
2154
+ },
2155
+ /**
2156
+ @param {SubroutineNode & {isRecursive: true}} node
2157
+ */
2158
+ Subroutine({ isRecursive, ref }, state) {
2159
+ if (!isRecursive) {
2160
+ throw new Error("Unexpected non-recursive subroutine in transformed AST");
2161
+ }
2162
+ const limit = state.recursionLimit;
2163
+ return ref === 0 ? `(?R=${limit})` : r`\g<${ref}&R=${limit}>`;
2164
+ }
2165
+ };
2166
+ var BaseEscapeChars = /* @__PURE__ */ new Set([
2167
+ "$",
2168
+ "(",
2169
+ ")",
2170
+ "*",
2171
+ "+",
2172
+ ".",
2173
+ "?",
2174
+ "[",
2175
+ "\\",
2176
+ "]",
2177
+ "^",
2178
+ "{",
2179
+ "|",
2180
+ "}"
2181
+ ]);
2182
+ var CharClassEscapeChars = /* @__PURE__ */ new Set([
2183
+ "-",
2184
+ "\\",
2185
+ "]",
2186
+ "^",
2187
+ // Literal `[` doesn't require escaping with flag u, but this can help work around regex source
2188
+ // linters and regex syntax processors that expect unescaped `[` to create a nested class
2189
+ "["
2190
+ ]);
2191
+ var CharClassEscapeCharsFlagV = /* @__PURE__ */ new Set([
2192
+ "(",
2193
+ ")",
2194
+ "-",
2195
+ "/",
2196
+ "[",
2197
+ "\\",
2198
+ "]",
2199
+ "^",
2200
+ "{",
2201
+ "|",
2202
+ "}",
2203
+ // Double punctuators; also includes already-listed `-` and `^`
2204
+ "!",
2205
+ "#",
2206
+ "$",
2207
+ "%",
2208
+ "&",
2209
+ "*",
2210
+ "+",
2211
+ ",",
2212
+ ".",
2213
+ ":",
2214
+ ";",
2215
+ "<",
2216
+ "=",
2217
+ ">",
2218
+ "?",
2219
+ "@",
2220
+ "`",
2221
+ "~"
2222
+ ]);
2223
+ var CharCodeEscapeMap = /* @__PURE__ */ new Map([
2224
+ [9, r`\t`],
2225
+ // horizontal tab
2226
+ [10, r`\n`],
2227
+ // line feed
2228
+ [11, r`\v`],
2229
+ // vertical tab
2230
+ [12, r`\f`],
2231
+ // form feed
2232
+ [13, r`\r`],
2233
+ // carriage return
2234
+ [8232, r`\u2028`],
2235
+ // line separator
2236
+ [8233, r`\u2029`],
2237
+ // paragraph separator
2238
+ [65279, r`\uFEFF`]
2239
+ // ZWNBSP/BOM
2240
+ ]);
2241
+ var casedRe = /^\p{Cased}$/u;
2242
+ function charHasCase(char) {
2243
+ return casedRe.test(char);
2244
+ }
2245
+ function getCasesOutsideCharClassRange(node, options) {
2246
+ const firstOnly = !!options?.firstOnly;
2247
+ const min = node.min.value;
2248
+ const max = node.max.value;
2249
+ const found = [];
2250
+ if (min < 65 && (max === 65535 || max >= 131071) || min === 65536 && max >= 131071) {
2251
+ return found;
2252
+ }
2253
+ for (let i2 = min; i2 <= max; i2++) {
2254
+ const char = cp(i2);
2255
+ if (!charHasCase(char)) {
2256
+ continue;
2257
+ }
2258
+ const charsOutsideRange = getIgnoreCaseMatchChars(char).filter((caseOfChar) => {
2259
+ const num = caseOfChar.codePointAt(0);
2260
+ return num < min || num > max;
2261
+ });
2262
+ if (charsOutsideRange.length) {
2263
+ found.push(...charsOutsideRange);
2264
+ if (firstOnly) {
2265
+ break;
2266
+ }
2267
+ }
2268
+ }
2269
+ return found;
2270
+ }
2271
+ function getCharEscape(codePoint, { escDigit, inCharClass, useFlagV }) {
2272
+ if (CharCodeEscapeMap.has(codePoint)) {
2273
+ return CharCodeEscapeMap.get(codePoint);
2274
+ }
2275
+ if (
2276
+ // Control chars, etc.; condition modeled on the Chrome developer console's display for strings
2277
+ codePoint < 32 || codePoint > 126 && codePoint < 160 || // Unicode planes 4-16; unassigned, special purpose, and private use area
2278
+ codePoint > 262143 || // Avoid corrupting a preceding backref by immediately following it with a literal digit
2279
+ escDigit && isDigitCharCode(codePoint)
2280
+ ) {
2281
+ return codePoint > 255 ? `\\u{${codePoint.toString(16).toUpperCase()}}` : `\\x${codePoint.toString(16).toUpperCase().padStart(2, "0")}`;
2282
+ }
2283
+ const escapeChars = inCharClass ? useFlagV ? CharClassEscapeCharsFlagV : CharClassEscapeChars : BaseEscapeChars;
2284
+ const char = cp(codePoint);
2285
+ return (escapeChars.has(char) ? "\\" : "") + char;
2286
+ }
2287
+ function getCodePointRangesFromChars(chars) {
2288
+ const codePoints = chars.map((char) => char.codePointAt(0)).sort((a2, b3) => a2 - b3);
2289
+ const values = [];
2290
+ let start = null;
2291
+ for (let i2 = 0; i2 < codePoints.length; i2++) {
2292
+ if (codePoints[i2 + 1] === codePoints[i2] + 1) {
2293
+ start ??= codePoints[i2];
2294
+ } else if (start === null) {
2295
+ values.push(codePoints[i2]);
2296
+ } else {
2297
+ values.push([start, codePoints[i2]]);
2298
+ start = null;
2299
+ }
2300
+ }
2301
+ return values;
2302
+ }
2303
+ function getGroupPrefix(atomic2, flagMods, useFlagMods) {
2304
+ if (atomic2) {
2305
+ return ">";
2306
+ }
2307
+ let mods = "";
2308
+ if (flagMods && useFlagMods) {
2309
+ const { enable, disable } = flagMods;
2310
+ mods = (enable?.ignoreCase ? "i" : "") + (enable?.dotAll ? "s" : "") + (disable ? "-" : "") + (disable?.ignoreCase ? "i" : "") + (disable?.dotAll ? "s" : "");
2311
+ }
2312
+ return `${mods}:`;
2313
+ }
2314
+ function getQuantifierStr({ kind, max, min }) {
2315
+ let base;
2316
+ if (!min && max === 1) {
2317
+ base = "?";
2318
+ } else if (!min && max === Infinity) {
2319
+ base = "*";
2320
+ } else if (min === 1 && max === Infinity) {
2321
+ base = "+";
2322
+ } else if (min === max) {
2323
+ base = `{${min}}`;
2324
+ } else {
2325
+ base = `{${min},${max === Infinity ? "" : max}}`;
2326
+ }
2327
+ return base + {
2328
+ greedy: "",
2329
+ lazy: "?",
2330
+ possessive: "+"
2331
+ }[kind];
2332
+ }
2333
+ function isAnyGroup({ type }) {
2334
+ return type === "CapturingGroup" || type === "Group" || type === "LookaroundAssertion";
2335
+ }
2336
+ function isDigitCharCode(value) {
2337
+ return value > 47 && value < 58;
2338
+ }
2339
+ function isLiteralHyphen({ type, value }) {
2340
+ return type === "Character" && value === 45;
2341
+ }
2342
+
2343
+ // src/subclass.js
2344
+ var EmulatedRegExp = class _EmulatedRegExp extends RegExp {
2345
+ /**
2346
+ @type {Map<number, {
2347
+ hidden?: true;
2348
+ transferTo?: number;
2349
+ }>}
2350
+ */
2351
+ #captureMap = /* @__PURE__ */ new Map();
2352
+ /**
2353
+ @type {RegExp | EmulatedRegExp | null}
2354
+ */
2355
+ #compiled = null;
2356
+ /**
2357
+ @type {string}
2358
+ */
2359
+ #pattern;
2360
+ /**
2361
+ @type {Map<number, string>?}
2362
+ */
2363
+ #nameMap = null;
2364
+ /**
2365
+ @type {string?}
2366
+ */
2367
+ #strategy = null;
2368
+ /**
2369
+ Can be used to serialize the instance.
2370
+ @type {EmulatedRegExpOptions}
2371
+ */
2372
+ rawOptions = {};
2373
+ // Override the getter with one that works with lazy-compiled regexes
2374
+ get source() {
2375
+ return this.#pattern || "(?:)";
2376
+ }
2377
+ /**
2378
+ @overload
2379
+ @param {string} pattern
2380
+ @param {string} [flags]
2381
+ @param {EmulatedRegExpOptions} [options]
2382
+ */
2383
+ /**
2384
+ @overload
2385
+ @param {EmulatedRegExp} pattern
2386
+ @param {string} [flags]
2387
+ */
2388
+ constructor(pattern, flags, options) {
2389
+ const lazyCompile = !!options?.lazyCompile;
2390
+ if (pattern instanceof RegExp) {
2391
+ if (options) {
2392
+ throw new Error("Cannot provide options when copying a regexp");
2393
+ }
2394
+ const re2 = pattern;
2395
+ super(re2, flags);
2396
+ this.#pattern = re2.source;
2397
+ if (re2 instanceof _EmulatedRegExp) {
2398
+ this.#captureMap = re2.#captureMap;
2399
+ this.#nameMap = re2.#nameMap;
2400
+ this.#strategy = re2.#strategy;
2401
+ this.rawOptions = re2.rawOptions;
2402
+ }
2403
+ } else {
2404
+ const opts = {
2405
+ hiddenCaptures: [],
2406
+ strategy: null,
2407
+ transfers: [],
2408
+ ...options
2409
+ };
2410
+ super(lazyCompile ? "" : pattern, flags);
2411
+ this.#pattern = pattern;
2412
+ this.#captureMap = createCaptureMap(opts.hiddenCaptures, opts.transfers);
2413
+ this.#strategy = opts.strategy;
2414
+ this.rawOptions = options ?? {};
2415
+ }
2416
+ if (!lazyCompile) {
2417
+ this.#compiled = this;
2418
+ }
2419
+ }
2420
+ /**
2421
+ Called internally by all String/RegExp methods that use regexes.
2422
+ @override
2423
+ @param {string} str
2424
+ @returns {RegExpExecArray?}
2425
+ */
2426
+ exec(str) {
2427
+ if (!this.#compiled) {
2428
+ const { lazyCompile, ...rest } = this.rawOptions;
2429
+ this.#compiled = new _EmulatedRegExp(this.#pattern, this.flags, rest);
2430
+ }
2431
+ const useLastIndex = this.global || this.sticky;
2432
+ const pos = this.lastIndex;
2433
+ if (this.#strategy === "clip_search" && useLastIndex && pos) {
2434
+ this.lastIndex = 0;
2435
+ const match = this.#execCore(str.slice(pos));
2436
+ if (match) {
2437
+ adjustMatchDetailsForOffset(match, pos, str, this.hasIndices);
2438
+ this.lastIndex += pos;
2439
+ }
2440
+ return match;
2441
+ }
2442
+ return this.#execCore(str);
2443
+ }
2444
+ /**
2445
+ Adds support for hidden and transfer captures.
2446
+ @param {string} str
2447
+ @returns
2448
+ */
2449
+ #execCore(str) {
2450
+ this.#compiled.lastIndex = this.lastIndex;
2451
+ const match = super.exec.call(this.#compiled, str);
2452
+ this.lastIndex = this.#compiled.lastIndex;
2453
+ if (!match || !this.#captureMap.size) {
2454
+ return match;
2455
+ }
2456
+ const matchCopy = [...match];
2457
+ match.length = 1;
2458
+ let indicesCopy;
2459
+ if (this.hasIndices) {
2460
+ indicesCopy = [...match.indices];
2461
+ match.indices.length = 1;
2462
+ }
2463
+ const mappedNums = [0];
2464
+ for (let i2 = 1; i2 < matchCopy.length; i2++) {
2465
+ const { hidden, transferTo } = this.#captureMap.get(i2) ?? {};
2466
+ if (hidden) {
2467
+ mappedNums.push(null);
2468
+ } else {
2469
+ mappedNums.push(match.length);
2470
+ match.push(matchCopy[i2]);
2471
+ if (this.hasIndices) {
2472
+ match.indices.push(indicesCopy[i2]);
2473
+ }
2474
+ }
2475
+ if (transferTo && matchCopy[i2] !== void 0) {
2476
+ const to = mappedNums[transferTo];
2477
+ if (!to) {
2478
+ throw new Error(`Invalid capture transfer to "${to}"`);
2479
+ }
2480
+ match[to] = matchCopy[i2];
2481
+ if (this.hasIndices) {
2482
+ match.indices[to] = indicesCopy[i2];
2483
+ }
2484
+ if (match.groups) {
2485
+ if (!this.#nameMap) {
2486
+ this.#nameMap = createNameMap(this.source);
2487
+ }
2488
+ const name = this.#nameMap.get(transferTo);
2489
+ if (name) {
2490
+ match.groups[name] = matchCopy[i2];
2491
+ if (this.hasIndices) {
2492
+ match.indices.groups[name] = indicesCopy[i2];
2493
+ }
2494
+ }
2495
+ }
2496
+ }
2497
+ }
2498
+ return match;
2499
+ }
2500
+ };
2501
+ function adjustMatchDetailsForOffset(match, offset, input, hasIndices) {
2502
+ match.index += offset;
2503
+ match.input = input;
2504
+ if (hasIndices) {
2505
+ const indices = match.indices;
2506
+ for (let i2 = 0; i2 < indices.length; i2++) {
2507
+ const arr = indices[i2];
2508
+ if (arr) {
2509
+ indices[i2] = [arr[0] + offset, arr[1] + offset];
2510
+ }
2511
+ }
2512
+ const groupIndices = indices.groups;
2513
+ if (groupIndices) {
2514
+ Object.keys(groupIndices).forEach((key) => {
2515
+ const arr = groupIndices[key];
2516
+ if (arr) {
2517
+ groupIndices[key] = [arr[0] + offset, arr[1] + offset];
2518
+ }
2519
+ });
2520
+ }
2521
+ }
2522
+ }
2523
+ function createCaptureMap(hiddenCaptures, transfers) {
2524
+ const captureMap = /* @__PURE__ */ new Map();
2525
+ for (const num of hiddenCaptures) {
2526
+ captureMap.set(num, {
2527
+ hidden: true
2528
+ });
2529
+ }
2530
+ for (const [to, from] of transfers) {
2531
+ for (const num of from) {
2532
+ getOrInsert(captureMap, num, {}).transferTo = to;
2533
+ }
2534
+ }
2535
+ return captureMap;
2536
+ }
2537
+ function createNameMap(pattern) {
2538
+ const re2 = /(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu;
2539
+ const map = /* @__PURE__ */ new Map();
2540
+ let numCharClassesOpen = 0;
2541
+ let numCaptures = 0;
2542
+ let match;
2543
+ while (match = re2.exec(pattern)) {
2544
+ const { 0: m3, groups: { capture, name } } = match;
2545
+ if (m3 === "[") {
2546
+ numCharClassesOpen++;
2547
+ } else if (!numCharClassesOpen) {
2548
+ if (capture) {
2549
+ numCaptures++;
2550
+ if (name) {
2551
+ map.set(numCaptures, name);
2552
+ }
2553
+ }
2554
+ } else if (m3 === "]") {
2555
+ numCharClassesOpen--;
2556
+ }
2557
+ }
2558
+ return map;
2559
+ }
2560
+
2561
+ // node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/utils-internals.js
2562
+ var noncapturingDelim = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
2563
+ function incrementIfAtLeast(arr, threshold) {
2564
+ for (let i2 = 0; i2 < arr.length; i2++) {
2565
+ if (arr[i2] >= threshold) {
2566
+ arr[i2]++;
2567
+ }
2568
+ }
2569
+ }
2570
+ function spliceStr(str, pos, oldValue, newValue) {
2571
+ return str.slice(0, pos) + newValue + str.slice(pos + oldValue.length);
2572
+ }
2573
+
2574
+ // node_modules/.pnpm/regex-utilities@2.3.0/node_modules/regex-utilities/src/index.js
2575
+ var Context = Object.freeze({
2576
+ DEFAULT: "DEFAULT",
2577
+ CHAR_CLASS: "CHAR_CLASS"
2578
+ });
2579
+ function replaceUnescaped(expression, needle, replacement, context) {
2580
+ const re2 = new RegExp(String.raw`${needle}|(?<$skip>\[\^?|\\?.)`, "gsu");
2581
+ const negated = [false];
2582
+ let numCharClassesOpen = 0;
2583
+ let result = "";
2584
+ for (const match of expression.matchAll(re2)) {
2585
+ const { 0: m3, groups: { $skip } } = match;
2586
+ if (!$skip && (!context || context === Context.DEFAULT === !numCharClassesOpen)) {
2587
+ if (replacement instanceof Function) {
2588
+ result += replacement(match, {
2589
+ context: numCharClassesOpen ? Context.CHAR_CLASS : Context.DEFAULT,
2590
+ negated: negated[negated.length - 1]
2591
+ });
2592
+ } else {
2593
+ result += replacement;
2594
+ }
2595
+ continue;
2596
+ }
2597
+ if (m3[0] === "[") {
2598
+ numCharClassesOpen++;
2599
+ negated.push(m3[1] === "^");
2600
+ } else if (m3 === "]" && numCharClassesOpen) {
2601
+ numCharClassesOpen--;
2602
+ negated.pop();
2603
+ }
2604
+ result += m3;
2605
+ }
2606
+ return result;
2607
+ }
2608
+ function forEachUnescaped(expression, needle, callback, context) {
2609
+ replaceUnescaped(expression, needle, callback, context);
2610
+ }
2611
+ function execUnescaped(expression, needle, pos = 0, context) {
2612
+ if (!new RegExp(needle, "su").test(expression)) {
2613
+ return null;
2614
+ }
2615
+ const re2 = new RegExp(`${needle}|(?<$skip>\\\\?.)`, "gsu");
2616
+ re2.lastIndex = pos;
2617
+ let numCharClassesOpen = 0;
2618
+ let match;
2619
+ while (match = re2.exec(expression)) {
2620
+ const { 0: m3, groups: { $skip } } = match;
2621
+ if (!$skip && (!context || context === Context.DEFAULT === !numCharClassesOpen)) {
2622
+ return match;
2623
+ }
2624
+ if (m3 === "[") {
2625
+ numCharClassesOpen++;
2626
+ } else if (m3 === "]" && numCharClassesOpen) {
2627
+ numCharClassesOpen--;
2628
+ }
2629
+ if (re2.lastIndex == match.index) {
2630
+ re2.lastIndex++;
2631
+ }
2632
+ }
2633
+ return null;
2634
+ }
2635
+ function hasUnescaped(expression, needle, context) {
2636
+ return !!execUnescaped(expression, needle, 0, context);
2637
+ }
2638
+ function getGroupContents(expression, contentsStartPos) {
2639
+ const token2 = /\\?./gsu;
2640
+ token2.lastIndex = contentsStartPos;
2641
+ let contentsEndPos = expression.length;
2642
+ let numCharClassesOpen = 0;
2643
+ let numGroupsOpen = 1;
2644
+ let match;
2645
+ while (match = token2.exec(expression)) {
2646
+ const [m3] = match;
2647
+ if (m3 === "[") {
2648
+ numCharClassesOpen++;
2649
+ } else if (!numCharClassesOpen) {
2650
+ if (m3 === "(") {
2651
+ numGroupsOpen++;
2652
+ } else if (m3 === ")") {
2653
+ numGroupsOpen--;
2654
+ if (!numGroupsOpen) {
2655
+ contentsEndPos = match.index;
2656
+ break;
2657
+ }
2658
+ }
2659
+ } else if (m3 === "]") {
2660
+ numCharClassesOpen--;
2661
+ }
2662
+ }
2663
+ return expression.slice(contentsStartPos, contentsEndPos);
2664
+ }
2665
+
2666
+ // node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/atomic.js
2667
+ var atomicPluginToken = new RegExp(String.raw`(?<noncapturingStart>${noncapturingDelim})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
2668
+ function atomic(expression, data) {
2669
+ const hiddenCaptures = data?.hiddenCaptures ?? [];
2670
+ let captureTransfers = data?.captureTransfers ?? /* @__PURE__ */ new Map();
2671
+ if (!/\(\?>/.test(expression)) {
2672
+ return {
2673
+ pattern: expression,
2674
+ captureTransfers,
2675
+ hiddenCaptures
2676
+ };
2677
+ }
2678
+ const aGDelim = "(?>";
2679
+ const emulatedAGDelim = "(?:(?=(";
2680
+ const captureNumMap = [0];
2681
+ const addedHiddenCaptures = [];
2682
+ let numCapturesBeforeAG = 0;
2683
+ let numAGs = 0;
2684
+ let aGPos = NaN;
2685
+ let hasProcessedAG;
2686
+ do {
2687
+ hasProcessedAG = false;
2688
+ let numCharClassesOpen = 0;
2689
+ let numGroupsOpenInAG = 0;
2690
+ let inAG = false;
2691
+ let match;
2692
+ atomicPluginToken.lastIndex = Number.isNaN(aGPos) ? 0 : aGPos + emulatedAGDelim.length;
2693
+ while (match = atomicPluginToken.exec(expression)) {
2694
+ const { 0: m3, index, groups: { capturingStart, noncapturingStart } } = match;
2695
+ if (m3 === "[") {
2696
+ numCharClassesOpen++;
2697
+ } else if (!numCharClassesOpen) {
2698
+ if (m3 === aGDelim && !inAG) {
2699
+ aGPos = index;
2700
+ inAG = true;
2701
+ } else if (inAG && noncapturingStart) {
2702
+ numGroupsOpenInAG++;
2703
+ } else if (capturingStart) {
2704
+ if (inAG) {
2705
+ numGroupsOpenInAG++;
2706
+ } else {
2707
+ numCapturesBeforeAG++;
2708
+ captureNumMap.push(numCapturesBeforeAG + numAGs);
2709
+ }
2710
+ } else if (m3 === ")" && inAG) {
2711
+ if (!numGroupsOpenInAG) {
2712
+ numAGs++;
2713
+ const addedCaptureNum = numCapturesBeforeAG + numAGs;
2714
+ expression = `${expression.slice(0, aGPos)}${emulatedAGDelim}${expression.slice(aGPos + aGDelim.length, index)}))<$$${addedCaptureNum}>)${expression.slice(index + 1)}`;
2715
+ hasProcessedAG = true;
2716
+ addedHiddenCaptures.push(addedCaptureNum);
2717
+ incrementIfAtLeast(hiddenCaptures, addedCaptureNum);
2718
+ if (captureTransfers.size) {
2719
+ const newCaptureTransfers = /* @__PURE__ */ new Map();
2720
+ captureTransfers.forEach((from, to) => {
2721
+ newCaptureTransfers.set(
2722
+ to >= addedCaptureNum ? to + 1 : to,
2723
+ from.map((f2) => f2 >= addedCaptureNum ? f2 + 1 : f2)
2724
+ );
2725
+ });
2726
+ captureTransfers = newCaptureTransfers;
2727
+ }
2728
+ break;
2729
+ }
2730
+ numGroupsOpenInAG--;
2731
+ }
2732
+ } else if (m3 === "]") {
2733
+ numCharClassesOpen--;
2734
+ }
2735
+ }
2736
+ } while (hasProcessedAG);
2737
+ hiddenCaptures.push(...addedHiddenCaptures);
2738
+ expression = replaceUnescaped(
2739
+ expression,
2740
+ String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,
2741
+ ({ 0: m3, groups: { backrefNum, wrappedBackrefNum } }) => {
2742
+ if (backrefNum) {
2743
+ const bNum = +backrefNum;
2744
+ if (bNum > captureNumMap.length - 1) {
2745
+ throw new Error(`Backref "${m3}" greater than number of captures`);
2746
+ }
2747
+ return `\\${captureNumMap[bNum]}`;
2748
+ }
2749
+ return `\\${wrappedBackrefNum}`;
2750
+ },
2751
+ Context.DEFAULT
2752
+ );
2753
+ return {
2754
+ pattern: expression,
2755
+ captureTransfers,
2756
+ hiddenCaptures
2757
+ };
2758
+ }
2759
+ var baseQuantifier = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`;
2760
+ var possessivePluginToken = new RegExp(String.raw`
2761
+ \\(?: \d+
2762
+ | c[A-Za-z]
2763
+ | [gk]<[^>]+>
2764
+ | [pPu]\{[^\}]+\}
2765
+ | u[A-Fa-f\d]{4}
2766
+ | x[A-Fa-f\d]{2}
2767
+ )
2768
+ | \((?: \? (?: [:=!>]
2769
+ | <(?:[=!]|[^>]+>)
2770
+ | [A-Za-z\-]+:
2771
+ | \(DEFINE\)
2772
+ ))?
2773
+ | (?<qBase>${baseQuantifier})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
2774
+ | \\?.
2775
+ `.replace(/\s+/g, ""), "gsu");
2776
+ function possessive(expression) {
2777
+ if (!new RegExp(`${baseQuantifier}\\+`).test(expression)) {
2778
+ return {
2779
+ pattern: expression
2780
+ };
2781
+ }
2782
+ const openGroupIndices = [];
2783
+ let lastGroupIndex = null;
2784
+ let lastCharClassIndex = null;
2785
+ let lastToken = "";
2786
+ let numCharClassesOpen = 0;
2787
+ let match;
2788
+ possessivePluginToken.lastIndex = 0;
2789
+ while (match = possessivePluginToken.exec(expression)) {
2790
+ const { 0: m3, index, groups: { qBase, qMod, invalidQ } } = match;
2791
+ if (m3 === "[") {
2792
+ if (!numCharClassesOpen) {
2793
+ lastCharClassIndex = index;
2794
+ }
2795
+ numCharClassesOpen++;
2796
+ } else if (m3 === "]") {
2797
+ if (numCharClassesOpen) {
2798
+ numCharClassesOpen--;
2799
+ } else {
2800
+ lastCharClassIndex = null;
2801
+ }
2802
+ } else if (!numCharClassesOpen) {
2803
+ if (qMod === "+" && lastToken && !lastToken.startsWith("(")) {
2804
+ if (invalidQ) {
2805
+ throw new Error(`Invalid quantifier "${m3}"`);
2806
+ }
2807
+ let charsAdded = -1;
2808
+ if (/^\{\d+\}$/.test(qBase)) {
2809
+ expression = spliceStr(expression, index + qBase.length, qMod, "");
2810
+ } else {
2811
+ if (lastToken === ")" || lastToken === "]") {
2812
+ const nodeIndex = lastToken === ")" ? lastGroupIndex : lastCharClassIndex;
2813
+ if (nodeIndex === null) {
2814
+ throw new Error(`Invalid unmatched "${lastToken}"`);
2815
+ }
2816
+ expression = `${expression.slice(0, nodeIndex)}(?>${expression.slice(nodeIndex, index)}${qBase})${expression.slice(index + m3.length)}`;
2817
+ } else {
2818
+ expression = `${expression.slice(0, index - lastToken.length)}(?>${lastToken}${qBase})${expression.slice(index + m3.length)}`;
2819
+ }
2820
+ charsAdded += 4;
2821
+ }
2822
+ possessivePluginToken.lastIndex += charsAdded;
2823
+ } else if (m3[0] === "(") {
2824
+ openGroupIndices.push(index);
2825
+ } else if (m3 === ")") {
2826
+ lastGroupIndex = openGroupIndices.length ? openGroupIndices.pop() : null;
2827
+ }
2828
+ }
2829
+ lastToken = m3;
2830
+ }
2831
+ return {
2832
+ pattern: expression
2833
+ };
2834
+ }
2835
+
2836
+ // node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-recursion/src/index.js
2837
+ var r3 = String.raw;
2838
+ var gRToken = r3`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`;
2839
+ var recursiveToken = r3`\(\?R=(?<rDepth>[^\)]+)\)|${gRToken}`;
2840
+ var namedCaptureDelim = r3`\(\?<(?![=!])(?<captureName>[^>]+)>`;
2841
+ var captureDelim = r3`${namedCaptureDelim}|(?<unnamed>\()(?!\?)`;
2842
+ var token = new RegExp(r3`${namedCaptureDelim}|${recursiveToken}|\(\?|\\?.`, "gsu");
2843
+ var overlappingRecursionMsg = "Cannot use multiple overlapping recursions";
2844
+ function recursion(pattern, data) {
2845
+ const { hiddenCaptures, mode } = {
2846
+ hiddenCaptures: [],
2847
+ mode: "plugin",
2848
+ ...data
2849
+ };
2850
+ let captureTransfers = data?.captureTransfers ?? /* @__PURE__ */ new Map();
2851
+ if (!new RegExp(recursiveToken, "su").test(pattern)) {
2852
+ return {
2853
+ pattern,
2854
+ captureTransfers,
2855
+ hiddenCaptures
2856
+ };
2857
+ }
2858
+ if (mode === "plugin" && hasUnescaped(pattern, r3`\(\?\(DEFINE\)`, Context.DEFAULT)) {
2859
+ throw new Error("DEFINE groups cannot be used with recursion");
2860
+ }
2861
+ const addedHiddenCaptures = [];
2862
+ const hasNumberedBackref = hasUnescaped(pattern, r3`\\[1-9]`, Context.DEFAULT);
2863
+ const groupContentsStartPos = /* @__PURE__ */ new Map();
2864
+ const openGroups = [];
2865
+ let hasRecursed = false;
2866
+ let numCharClassesOpen = 0;
2867
+ let numCapturesPassed = 0;
2868
+ let match;
2869
+ token.lastIndex = 0;
2870
+ while (match = token.exec(pattern)) {
2871
+ const { 0: m3, groups: { captureName, rDepth, gRNameOrNum, gRDepth } } = match;
2872
+ if (m3 === "[") {
2873
+ numCharClassesOpen++;
2874
+ } else if (!numCharClassesOpen) {
2875
+ if (rDepth) {
2876
+ assertMaxInBounds(rDepth);
2877
+ if (hasRecursed) {
2878
+ throw new Error(overlappingRecursionMsg);
2879
+ }
2880
+ if (hasNumberedBackref) {
2881
+ throw new Error(
2882
+ // When used in `external` mode by transpilers other than Regex+, backrefs might have
2883
+ // gone through conversion from named to numbered, so avoid a misleading error
2884
+ `${mode === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with global recursion`
2885
+ );
2886
+ }
2887
+ const left = pattern.slice(0, match.index);
2888
+ const right = pattern.slice(token.lastIndex);
2889
+ if (hasUnescaped(right, recursiveToken, Context.DEFAULT)) {
2890
+ throw new Error(overlappingRecursionMsg);
2891
+ }
2892
+ const reps = +rDepth - 1;
2893
+ pattern = makeRecursive(
2894
+ left,
2895
+ right,
2896
+ reps,
2897
+ false,
2898
+ hiddenCaptures,
2899
+ addedHiddenCaptures,
2900
+ numCapturesPassed
2901
+ );
2902
+ captureTransfers = mapCaptureTransfers(
2903
+ captureTransfers,
2904
+ left,
2905
+ reps,
2906
+ addedHiddenCaptures.length,
2907
+ 0,
2908
+ numCapturesPassed
2909
+ );
2910
+ break;
2911
+ } else if (gRNameOrNum) {
2912
+ assertMaxInBounds(gRDepth);
2913
+ let isWithinReffedGroup = false;
2914
+ for (const g of openGroups) {
2915
+ if (g.name === gRNameOrNum || g.num === +gRNameOrNum) {
2916
+ isWithinReffedGroup = true;
2917
+ if (g.hasRecursedWithin) {
2918
+ throw new Error(overlappingRecursionMsg);
2919
+ }
2920
+ break;
2921
+ }
2922
+ }
2923
+ if (!isWithinReffedGroup) {
2924
+ throw new Error(r3`Recursive \g cannot be used outside the referenced group "${mode === "external" ? gRNameOrNum : r3`\g<${gRNameOrNum}&R=${gRDepth}>`}"`);
2925
+ }
2926
+ const startPos = groupContentsStartPos.get(gRNameOrNum);
2927
+ const groupContents = getGroupContents(pattern, startPos);
2928
+ if (hasNumberedBackref && hasUnescaped(groupContents, r3`${namedCaptureDelim}|\((?!\?)`, Context.DEFAULT)) {
2929
+ throw new Error(
2930
+ // When used in `external` mode by transpilers other than Regex+, backrefs might have
2931
+ // gone through conversion from named to numbered, so avoid a misleading error
2932
+ `${mode === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with recursion of capturing groups`
2933
+ );
2934
+ }
2935
+ const groupContentsLeft = pattern.slice(startPos, match.index);
2936
+ const groupContentsRight = groupContents.slice(groupContentsLeft.length + m3.length);
2937
+ const numAddedHiddenCapturesPreExpansion = addedHiddenCaptures.length;
2938
+ const reps = +gRDepth - 1;
2939
+ const expansion = makeRecursive(
2940
+ groupContentsLeft,
2941
+ groupContentsRight,
2942
+ reps,
2943
+ true,
2944
+ hiddenCaptures,
2945
+ addedHiddenCaptures,
2946
+ numCapturesPassed
2947
+ );
2948
+ captureTransfers = mapCaptureTransfers(
2949
+ captureTransfers,
2950
+ groupContentsLeft,
2951
+ reps,
2952
+ addedHiddenCaptures.length - numAddedHiddenCapturesPreExpansion,
2953
+ numAddedHiddenCapturesPreExpansion,
2954
+ numCapturesPassed
2955
+ );
2956
+ const pre = pattern.slice(0, startPos);
2957
+ const post = pattern.slice(startPos + groupContents.length);
2958
+ pattern = `${pre}${expansion}${post}`;
2959
+ token.lastIndex += expansion.length - m3.length - groupContentsLeft.length - groupContentsRight.length;
2960
+ openGroups.forEach((g) => g.hasRecursedWithin = true);
2961
+ hasRecursed = true;
2962
+ } else if (captureName) {
2963
+ numCapturesPassed++;
2964
+ groupContentsStartPos.set(String(numCapturesPassed), token.lastIndex);
2965
+ groupContentsStartPos.set(captureName, token.lastIndex);
2966
+ openGroups.push({
2967
+ num: numCapturesPassed,
2968
+ name: captureName
2969
+ });
2970
+ } else if (m3[0] === "(") {
2971
+ const isUnnamedCapture = m3 === "(";
2972
+ if (isUnnamedCapture) {
2973
+ numCapturesPassed++;
2974
+ groupContentsStartPos.set(String(numCapturesPassed), token.lastIndex);
2975
+ }
2976
+ openGroups.push(isUnnamedCapture ? { num: numCapturesPassed } : {});
2977
+ } else if (m3 === ")") {
2978
+ openGroups.pop();
2979
+ }
2980
+ } else if (m3 === "]") {
2981
+ numCharClassesOpen--;
2982
+ }
2983
+ }
2984
+ hiddenCaptures.push(...addedHiddenCaptures);
2985
+ return {
2986
+ pattern,
2987
+ captureTransfers,
2988
+ hiddenCaptures
2989
+ };
2990
+ }
2991
+ function assertMaxInBounds(max) {
2992
+ const errMsg = `Max depth must be integer between 2 and 100; used ${max}`;
2993
+ if (!/^[1-9]\d*$/.test(max)) {
2994
+ throw new Error(errMsg);
2995
+ }
2996
+ max = +max;
2997
+ if (max < 2 || max > 100) {
2998
+ throw new Error(errMsg);
2999
+ }
3000
+ }
3001
+ function makeRecursive(left, right, reps, isSubpattern, hiddenCaptures, addedHiddenCaptures, numCapturesPassed) {
3002
+ const namesInRecursed = /* @__PURE__ */ new Set();
3003
+ if (isSubpattern) {
3004
+ forEachUnescaped(left + right, namedCaptureDelim, ({ groups: { captureName } }) => {
3005
+ namesInRecursed.add(captureName);
3006
+ }, Context.DEFAULT);
3007
+ }
3008
+ const rest = [
3009
+ reps,
3010
+ isSubpattern ? namesInRecursed : null,
3011
+ hiddenCaptures,
3012
+ addedHiddenCaptures,
3013
+ numCapturesPassed
3014
+ ];
3015
+ return `${left}${repeatWithDepth(`(?:${left}`, "forward", ...rest)}(?:)${repeatWithDepth(`${right})`, "backward", ...rest)}${right}`;
3016
+ }
3017
+ function repeatWithDepth(pattern, direction, reps, namesInRecursed, hiddenCaptures, addedHiddenCaptures, numCapturesPassed) {
3018
+ const startNum = 2;
3019
+ const getDepthNum = (i2) => direction === "forward" ? i2 + startNum : reps - i2 + startNum - 1;
3020
+ let result = "";
3021
+ for (let i2 = 0; i2 < reps; i2++) {
3022
+ const depthNum = getDepthNum(i2);
3023
+ result += replaceUnescaped(
3024
+ pattern,
3025
+ r3`${captureDelim}|\\k<(?<backref>[^>]+)>`,
3026
+ ({ 0: m3, groups: { captureName, unnamed, backref } }) => {
3027
+ if (backref && namesInRecursed && !namesInRecursed.has(backref)) {
3028
+ return m3;
3029
+ }
3030
+ const suffix = `_$${depthNum}`;
3031
+ if (unnamed || captureName) {
3032
+ const addedCaptureNum = numCapturesPassed + addedHiddenCaptures.length + 1;
3033
+ addedHiddenCaptures.push(addedCaptureNum);
3034
+ incrementIfAtLeast2(hiddenCaptures, addedCaptureNum);
3035
+ return unnamed ? m3 : `(?<${captureName}${suffix}>`;
3036
+ }
3037
+ return r3`\k<${backref}${suffix}>`;
3038
+ },
3039
+ Context.DEFAULT
3040
+ );
3041
+ }
3042
+ return result;
3043
+ }
3044
+ function incrementIfAtLeast2(arr, threshold) {
3045
+ for (let i2 = 0; i2 < arr.length; i2++) {
3046
+ if (arr[i2] >= threshold) {
3047
+ arr[i2]++;
3048
+ }
3049
+ }
3050
+ }
3051
+ function mapCaptureTransfers(captureTransfers, left, reps, numCapturesAddedInExpansion, numAddedHiddenCapturesPreExpansion, numCapturesPassed) {
3052
+ if (captureTransfers.size && numCapturesAddedInExpansion) {
3053
+ let numCapturesInLeft = 0;
3054
+ forEachUnescaped(left, captureDelim, () => numCapturesInLeft++, Context.DEFAULT);
3055
+ const recursionDelimCaptureNum = numCapturesPassed - numCapturesInLeft + numAddedHiddenCapturesPreExpansion;
3056
+ const newCaptureTransfers = /* @__PURE__ */ new Map();
3057
+ captureTransfers.forEach((from, to) => {
3058
+ const numCapturesInRight = (numCapturesAddedInExpansion - numCapturesInLeft * reps) / reps;
3059
+ const numCapturesAddedInLeft = numCapturesInLeft * reps;
3060
+ const newTo = to > recursionDelimCaptureNum + numCapturesInLeft ? to + numCapturesAddedInExpansion : to;
3061
+ const newFrom = [];
3062
+ for (const f2 of from) {
3063
+ if (f2 <= recursionDelimCaptureNum) {
3064
+ newFrom.push(f2);
3065
+ } else if (f2 > recursionDelimCaptureNum + numCapturesInLeft + numCapturesInRight) {
3066
+ newFrom.push(f2 + numCapturesAddedInExpansion);
3067
+ } else if (f2 <= recursionDelimCaptureNum + numCapturesInLeft) {
3068
+ for (let i2 = 0; i2 <= reps; i2++) {
3069
+ newFrom.push(f2 + numCapturesInLeft * i2);
3070
+ }
3071
+ } else {
3072
+ for (let i2 = 0; i2 <= reps; i2++) {
3073
+ newFrom.push(f2 + numCapturesAddedInLeft + numCapturesInRight * i2);
3074
+ }
3075
+ }
3076
+ }
3077
+ newCaptureTransfers.set(newTo, newFrom);
3078
+ });
3079
+ return newCaptureTransfers;
3080
+ }
3081
+ return captureTransfers;
3082
+ }
3083
+
3084
+ // src/index.js
3085
+ function toRegExp(pattern, options) {
3086
+ const d2 = toRegExpDetails(pattern, options);
3087
+ if (d2.options) {
3088
+ return new EmulatedRegExp(d2.pattern, d2.flags, d2.options);
3089
+ }
3090
+ return new RegExp(d2.pattern, d2.flags);
3091
+ }
3092
+ function toRegExpDetails(pattern, options) {
3093
+ const opts = getOptions(options);
3094
+ const onigurumaAst = J2(pattern, {
3095
+ flags: opts.flags,
3096
+ normalizeUnknownPropertyNames: true,
3097
+ rules: {
3098
+ captureGroup: opts.rules.captureGroup,
3099
+ singleline: opts.rules.singleline
3100
+ },
3101
+ skipBackrefValidation: opts.rules.allowOrphanBackrefs,
3102
+ unicodePropertyMap: JsUnicodePropertyMap
3103
+ });
3104
+ const regexPlusAst = transform(onigurumaAst, {
3105
+ accuracy: opts.accuracy,
3106
+ asciiWordBoundaries: opts.rules.asciiWordBoundaries,
3107
+ avoidSubclass: opts.avoidSubclass,
3108
+ bestEffortTarget: opts.target
3109
+ });
3110
+ const generated = generate(regexPlusAst, opts);
3111
+ const recursionResult = recursion(generated.pattern, {
3112
+ captureTransfers: generated._captureTransfers,
3113
+ hiddenCaptures: generated._hiddenCaptures,
3114
+ mode: "external"
3115
+ });
3116
+ const possessiveResult = possessive(recursionResult.pattern);
3117
+ const atomicResult = atomic(possessiveResult.pattern, {
3118
+ captureTransfers: recursionResult.captureTransfers,
3119
+ hiddenCaptures: recursionResult.hiddenCaptures
3120
+ });
3121
+ const details = {
3122
+ pattern: atomicResult.pattern,
3123
+ flags: `${opts.hasIndices ? "d" : ""}${opts.global ? "g" : ""}${generated.flags}${generated.options.disable.v ? "u" : "v"}`
3124
+ };
3125
+ if (opts.avoidSubclass) {
3126
+ if (opts.lazyCompileLength !== Infinity) {
3127
+ throw new Error("Lazy compilation requires subclass");
3128
+ }
3129
+ } else {
3130
+ const hiddenCaptures = atomicResult.hiddenCaptures.sort((a2, b3) => a2 - b3);
3131
+ const transfers = Array.from(atomicResult.captureTransfers);
3132
+ const strategy = regexPlusAst._strategy;
3133
+ const lazyCompile = details.pattern.length >= opts.lazyCompileLength;
3134
+ if (hiddenCaptures.length || transfers.length || strategy || lazyCompile) {
3135
+ details.options = {
3136
+ ...hiddenCaptures.length && { hiddenCaptures },
3137
+ ...transfers.length && { transfers },
3138
+ ...strategy && { strategy },
3139
+ ...lazyCompile && { lazyCompile }
3140
+ };
3141
+ }
3142
+ }
3143
+ return details;
3144
+ }
3145
+ //# sourceMappingURL=index.js.map