@alivault/pico 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/.output/nitro.json +17 -0
  2. package/.output/public/apple-touch-icon.png +0 -0
  3. package/.output/public/assets/abap-smLpETzL.js +1 -0
  4. package/.output/public/assets/actionscript-3-o-aRvjY5.js +1 -0
  5. package/.output/public/assets/ada-D5RRX1i4.js +1 -0
  6. package/.output/public/assets/andromeeda-N4z3YzmR.js +1 -0
  7. package/.output/public/assets/angular-html-BZNntD0J.js +1 -0
  8. package/.output/public/assets/angular-ts-SQQMYL2C.js +1 -0
  9. package/.output/public/assets/apache-DttKlSqg.js +1 -0
  10. package/.output/public/assets/apex-DL7j-a2n.js +1 -0
  11. package/.output/public/assets/apl-D5V6uPDr.js +1 -0
  12. package/.output/public/assets/applescript-DCbL_2FX.js +1 -0
  13. package/.output/public/assets/ara-DqheWJCe.js +1 -0
  14. package/.output/public/assets/asciidoc-BH2sf2K4.js +1 -0
  15. package/.output/public/assets/asm-rfjOMz3U.js +1 -0
  16. package/.output/public/assets/astro-DeXKSaFP.js +1 -0
  17. package/.output/public/assets/aurora-x-CND-FqEb.js +1 -0
  18. package/.output/public/assets/awk-CMV5n9Z7.js +1 -0
  19. package/.output/public/assets/ayu-dark-on7xzq_B.js +1 -0
  20. package/.output/public/assets/ayu-light-DnGeGGc2.js +1 -0
  21. package/.output/public/assets/ayu-mirage-DG3LlYC_.js +1 -0
  22. package/.output/public/assets/ballerina-BjMqJjlr.js +1 -0
  23. package/.output/public/assets/bat-BaVbo_qw.js +1 -0
  24. package/.output/public/assets/beancount-DBt5Mbc_.js +1 -0
  25. package/.output/public/assets/berry-Cyjuxiss.js +1 -0
  26. package/.output/public/assets/bibtex-BV_0nsPq.js +1 -0
  27. package/.output/public/assets/bicep-C2gEwu4J.js +1 -0
  28. package/.output/public/assets/bird2-BRyaEJd0.js +1 -0
  29. package/.output/public/assets/blade-Bu5re0Vg.js +1 -0
  30. package/.output/public/assets/bsl-B1qbqNES.js +1 -0
  31. package/.output/public/assets/c-Nc9zJT78.js +1 -0
  32. package/.output/public/assets/c3-DTTbp5N2.js +1 -0
  33. package/.output/public/assets/cadence-CPz83cmI.js +1 -0
  34. package/.output/public/assets/cairo-BDj8wWhy.js +1 -0
  35. package/.output/public/assets/catppuccin-frappe-Dr22sraq.js +1 -0
  36. package/.output/public/assets/catppuccin-latte-C57EeX8c.js +1 -0
  37. package/.output/public/assets/catppuccin-macchiato-CpheI4uD.js +1 -0
  38. package/.output/public/assets/catppuccin-mocha-D8Lmdks_.js +1 -0
  39. package/.output/public/assets/clarity-CFJ2Yc3q.js +1 -0
  40. package/.output/public/assets/clojure-6R01QgJC.js +1 -0
  41. package/.output/public/assets/cmake-D5rSbMir.js +1 -0
  42. package/.output/public/assets/cobol-nvZDS9LT.js +1 -0
  43. package/.output/public/assets/codeowners-_3A-ClkN.js +1 -0
  44. package/.output/public/assets/codeql-DlIhJTR7.js +1 -0
  45. package/.output/public/assets/coffee-BKLOTq4e.js +1 -0
  46. package/.output/public/assets/common-lisp-BvQzz173.js +1 -0
  47. package/.output/public/assets/coq-DTNXReIC.js +1 -0
  48. package/.output/public/assets/cpp-D6g1DVNt.js +1 -0
  49. package/.output/public/assets/crystal-DfoZI57w.js +1 -0
  50. package/.output/public/assets/csharp-BDKQY1K9.js +1 -0
  51. package/.output/public/assets/css-DRmnABqB.js +1 -0
  52. package/.output/public/assets/csv-DNUpVBxl.js +1 -0
  53. package/.output/public/assets/cue-DDdBc2s3.js +1 -0
  54. package/.output/public/assets/cypher-CguaznO2.js +1 -0
  55. package/.output/public/assets/d-CHcoyjv3.js +1 -0
  56. package/.output/public/assets/dark-plus-CqeW_0kH.js +1 -0
  57. package/.output/public/assets/dart-RM3aRphk.js +1 -0
  58. package/.output/public/assets/dax-nbnY1d79.js +1 -0
  59. package/.output/public/assets/desktop-BD76cvxT.js +1 -0
  60. package/.output/public/assets/diff-CdkWtnkL.js +1 -0
  61. package/.output/public/assets/docker-ZyPHc6zB.js +1 -0
  62. package/.output/public/assets/dotenv-BdJZEwA6.js +1 -0
  63. package/.output/public/assets/dracula-CtqCPLGa.js +1 -0
  64. package/.output/public/assets/dracula-soft-DmBpwRAy.js +1 -0
  65. package/.output/public/assets/dream-maker-BJL4qlg3.js +1 -0
  66. package/.output/public/assets/edge-DwocGnOF.js +1 -0
  67. package/.output/public/assets/elixir-Dtbfds1r.js +1 -0
  68. package/.output/public/assets/elm-CpPtm471.js +1 -0
  69. package/.output/public/assets/emacs-lisp-_LyYa2Ky.js +1 -0
  70. package/.output/public/assets/erb--z3IM9Cb.js +1 -0
  71. package/.output/public/assets/erlang-Bc4hQuqa.js +1 -0
  72. package/.output/public/assets/everforest-dark-CrbyKk4n.js +1 -0
  73. package/.output/public/assets/everforest-light-DRbSh8Tm.js +1 -0
  74. package/.output/public/assets/fennel-CC2BkRsS.js +1 -0
  75. package/.output/public/assets/fish-D2ZCzqcE.js +1 -0
  76. package/.output/public/assets/fluent-DKAm3m7q.js +1 -0
  77. package/.output/public/assets/fortran-fixed-form-B02FOYI-.js +1 -0
  78. package/.output/public/assets/fortran-free-form-BPTf0lbT.js +1 -0
  79. package/.output/public/assets/fsharp-DhdR18vN.js +1 -0
  80. package/.output/public/assets/gdresource-DgnrMPIx.js +1 -0
  81. package/.output/public/assets/gdscript-CsadCSaZ.js +1 -0
  82. package/.output/public/assets/gdshader-PfnN_8tR.js +1 -0
  83. package/.output/public/assets/genie-Bj-orPAV.js +1 -0
  84. package/.output/public/assets/gherkin-COVWpJ-Q.js +1 -0
  85. package/.output/public/assets/git-commit-DGJi7qBD.js +1 -0
  86. package/.output/public/assets/git-rebase-Ce47xoa6.js +1 -0
  87. package/.output/public/assets/github-dark-default-DX3IG_X0.js +1 -0
  88. package/.output/public/assets/github-dark-dimmed-CH6p_7ez.js +1 -0
  89. package/.output/public/assets/github-dark-high-contrast-Bg2sSao5.js +1 -0
  90. package/.output/public/assets/github-dark-ipGuFGYC.js +1 -0
  91. package/.output/public/assets/github-light-BxjqOQl0.js +1 -0
  92. package/.output/public/assets/github-light-default-DwpDd1IQ.js +1 -0
  93. package/.output/public/assets/github-light-high-contrast-C0QeixPf.js +1 -0
  94. package/.output/public/assets/gleam-BF2NigGj.js +1 -0
  95. package/.output/public/assets/glimmer-js-C0BuzxQC.js +1 -0
  96. package/.output/public/assets/glimmer-ts-irOZ-cAQ.js +1 -0
  97. package/.output/public/assets/glsl-JAhLUe0P.js +1 -0
  98. package/.output/public/assets/gn-CMIt9roj.js +1 -0
  99. package/.output/public/assets/gnuplot-DgWlRTEj.js +1 -0
  100. package/.output/public/assets/go-DLnOLj8q.js +1 -0
  101. package/.output/public/assets/graphql-D2ba3BkR.js +1 -0
  102. package/.output/public/assets/groovy-B9qLWIkE.js +1 -0
  103. package/.output/public/assets/gruvbox-dark-hard-BIMX9ePb.js +1 -0
  104. package/.output/public/assets/gruvbox-dark-medium-DxuwyVzM.js +1 -0
  105. package/.output/public/assets/gruvbox-dark-soft-ba2fjht0.js +1 -0
  106. package/.output/public/assets/gruvbox-light-hard-DAJK2PqC.js +1 -0
  107. package/.output/public/assets/gruvbox-light-medium-WRifDAJD.js +1 -0
  108. package/.output/public/assets/gruvbox-light-soft-B0dBOoVB.js +1 -0
  109. package/.output/public/assets/hack-CgzUpY8l.js +1 -0
  110. package/.output/public/assets/haml-C-oIZcDo.js +1 -0
  111. package/.output/public/assets/handlebars-CbP-Mhzf.js +1 -0
  112. package/.output/public/assets/haskell-BaGpmm_c.js +1 -0
  113. package/.output/public/assets/haxe-DfXTCEOz.js +1 -0
  114. package/.output/public/assets/hcl-CbCtpSbi.js +1 -0
  115. package/.output/public/assets/hjson-_4-w-pHU.js +1 -0
  116. package/.output/public/assets/hlsl-DpuYn7pp.js +1 -0
  117. package/.output/public/assets/horizon-C5RtD1fY.js +1 -0
  118. package/.output/public/assets/horizon-bright-pEOice34.js +1 -0
  119. package/.output/public/assets/houston-A0zg9vNP.js +1 -0
  120. package/.output/public/assets/html-ddqpqPg0.js +1 -0
  121. package/.output/public/assets/html-derivative-DWGxf_At.js +1 -0
  122. package/.output/public/assets/http-Bg1nG1nG.js +1 -0
  123. package/.output/public/assets/hurl-zm47Pi1n.js +1 -0
  124. package/.output/public/assets/hxml-adC65L_J.js +1 -0
  125. package/.output/public/assets/hy-t9zDXBje.js +1 -0
  126. package/.output/public/assets/imba-Bxu-TDfw.js +1 -0
  127. package/.output/public/assets/index-CthXqlK7.js +53 -0
  128. package/.output/public/assets/ini-D-v34c8N.js +1 -0
  129. package/.output/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  130. package/.output/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  131. package/.output/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  132. package/.output/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  133. package/.output/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  134. package/.output/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  135. package/.output/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  136. package/.output/public/assets/java-DVLnIrqC.js +1 -0
  137. package/.output/public/assets/javascript-Cop1kpy_.js +1 -0
  138. package/.output/public/assets/jinja-Bnj4awH5.js +1 -0
  139. package/.output/public/assets/jison-CuCNs9Q3.js +1 -0
  140. package/.output/public/assets/json-CTw4n7kn.js +1 -0
  141. package/.output/public/assets/json5-D0XL1D5m.js +1 -0
  142. package/.output/public/assets/jsonc-BBgf3TX3.js +1 -0
  143. package/.output/public/assets/jsonl-KrKLbtB7.js +1 -0
  144. package/.output/public/assets/jsonnet-B2ZwWMOt.js +1 -0
  145. package/.output/public/assets/jssm-ByRpI9-B.js +1 -0
  146. package/.output/public/assets/jsx-0oMUGqZj.js +1 -0
  147. package/.output/public/assets/julia-DNYHzXlE.js +1 -0
  148. package/.output/public/assets/just-BlWkkmf2.js +1 -0
  149. package/.output/public/assets/kanagawa-dragon-CtPmcCMp.js +1 -0
  150. package/.output/public/assets/kanagawa-lotus-DpOXEGCa.js +1 -0
  151. package/.output/public/assets/kanagawa-wave-CLVCyc-n.js +1 -0
  152. package/.output/public/assets/kdl-6FPPEH4H.js +1 -0
  153. package/.output/public/assets/kotlin-D4L3Nd2D.js +1 -0
  154. package/.output/public/assets/kusto-D-mmc07O.js +1 -0
  155. package/.output/public/assets/laserwave-7fEj4XGb.js +1 -0
  156. package/.output/public/assets/latex-DqPzjMIt.js +1 -0
  157. package/.output/public/assets/lean-BMVMuP2E.js +1 -0
  158. package/.output/public/assets/less-C95PyOu0.js +1 -0
  159. package/.output/public/assets/light-plus-DHI2dh3p.js +1 -0
  160. package/.output/public/assets/liquid-BURJK16h.js +1 -0
  161. package/.output/public/assets/llvm-Dy3qORTl.js +1 -0
  162. package/.output/public/assets/log-BQop7fzg.js +1 -0
  163. package/.output/public/assets/logo-DKtnYmrp.js +1 -0
  164. package/.output/public/assets/lua-31hdJClp.js +1 -0
  165. package/.output/public/assets/luau-Dha4KG0q.js +1 -0
  166. package/.output/public/assets/make-DfmS6buu.js +1 -0
  167. package/.output/public/assets/markdown-BaI9LyM4.js +1 -0
  168. package/.output/public/assets/marko-C2ZcdSLh.js +1 -0
  169. package/.output/public/assets/material-theme-Dm6ETY8i.js +1 -0
  170. package/.output/public/assets/material-theme-darker-BeyjmM5Z.js +1 -0
  171. package/.output/public/assets/material-theme-lighter-CCOYYzKL.js +1 -0
  172. package/.output/public/assets/material-theme-ocean-CUtPiiX3.js +1 -0
  173. package/.output/public/assets/material-theme-palenight-2L4zMwIM.js +1 -0
  174. package/.output/public/assets/matlab-BT79Cq_j.js +1 -0
  175. package/.output/public/assets/mdc-N1ii9pk5.js +1 -0
  176. package/.output/public/assets/mdx-CxGBwLNt.js +1 -0
  177. package/.output/public/assets/mermaid-DLf3axBN.js +1 -0
  178. package/.output/public/assets/min-dark-B8TUPGHg.js +1 -0
  179. package/.output/public/assets/min-light-BDOoBxcA.js +1 -0
  180. package/.output/public/assets/mipsasm-DXuU_0cI.js +1 -0
  181. package/.output/public/assets/mojo-1Omp2pIo.js +1 -0
  182. package/.output/public/assets/monokai-E_VBmXGZ.js +1 -0
  183. package/.output/public/assets/moonbit-DZzq699o.js +1 -0
  184. package/.output/public/assets/move-DxDAOJVd.js +1 -0
  185. package/.output/public/assets/narrat-CxDcPPb9.js +1 -0
  186. package/.output/public/assets/nextflow-JEyYUlIq.js +1 -0
  187. package/.output/public/assets/nextflow-groovy-wvmJO4hi.js +1 -0
  188. package/.output/public/assets/nginx-BuomO0W8.js +1 -0
  189. package/.output/public/assets/night-owl-DefhalNX.js +1 -0
  190. package/.output/public/assets/night-owl-light-byb3AbEn.js +1 -0
  191. package/.output/public/assets/nim-hKoEPsYL.js +1 -0
  192. package/.output/public/assets/nix-DsFTDHWT.js +1 -0
  193. package/.output/public/assets/nord-D5rQzHT-.js +1 -0
  194. package/.output/public/assets/nushell-BQ_rO0AM.js +1 -0
  195. package/.output/public/assets/objective-c-BMq6JT_m.js +1 -0
  196. package/.output/public/assets/objective-cpp-DRwojuGv.js +1 -0
  197. package/.output/public/assets/ocaml-e4_gKO6E.js +1 -0
  198. package/.output/public/assets/odin-mdTPwYOg.js +1 -0
  199. package/.output/public/assets/one-dark-pro-DxXww9jg.js +1 -0
  200. package/.output/public/assets/one-light-D9c03w7t.js +1 -0
  201. package/.output/public/assets/openscad-D2aTdNfr.js +1 -0
  202. package/.output/public/assets/pascal-D4n_G8vj.js +1 -0
  203. package/.output/public/assets/perl-CAGVW6Ra.js +1 -0
  204. package/.output/public/assets/php-BycclmzS.js +1 -0
  205. package/.output/public/assets/pierre-dark-CizZ1Z5z.js +1 -0
  206. package/.output/public/assets/pierre-light-CHMWfAMe.js +1 -0
  207. package/.output/public/assets/pkl-DcjhAp0L.js +1 -0
  208. package/.output/public/assets/plastic-uOsw7z1x.js +1 -0
  209. package/.output/public/assets/plsql-BSy3Ag0J.js +1 -0
  210. package/.output/public/assets/po-Be96RYkA.js +1 -0
  211. package/.output/public/assets/poimandres-CyO4HORD.js +1 -0
  212. package/.output/public/assets/polar-BmhMKWum.js +1 -0
  213. package/.output/public/assets/postcss-BTQso3H9.js +1 -0
  214. package/.output/public/assets/powerquery-DVyQv3M2.js +1 -0
  215. package/.output/public/assets/powershell-BmtCGJVD.js +1 -0
  216. package/.output/public/assets/prisma-CCFA9rEj.js +1 -0
  217. package/.output/public/assets/prolog-DWGEEo78.js +1 -0
  218. package/.output/public/assets/proto-C3eop1kM.js +1 -0
  219. package/.output/public/assets/pug-4maJHz9G.js +1 -0
  220. package/.output/public/assets/puppet-C0_7Nv5A.js +1 -0
  221. package/.output/public/assets/purescript-Bv-B8yRw.js +1 -0
  222. package/.output/public/assets/python-CKg5r0C3.js +1 -0
  223. package/.output/public/assets/qml-JLIQfzyb.js +1 -0
  224. package/.output/public/assets/qmldir-Cqfb4Lox.js +1 -0
  225. package/.output/public/assets/qss-Csho9BH8.js +1 -0
  226. package/.output/public/assets/r-UcxRcvcA.js +1 -0
  227. package/.output/public/assets/racket-D8-uWeQH.js +1 -0
  228. package/.output/public/assets/raku-Cj4JSa8p.js +1 -0
  229. package/.output/public/assets/razor-P8rbooCh.js +1 -0
  230. package/.output/public/assets/red-z4H4llUY.js +1 -0
  231. package/.output/public/assets/reg-DXGFiJSl.js +1 -0
  232. package/.output/public/assets/regexp-3-A0406L.js +1 -0
  233. package/.output/public/assets/rel-CunnVTBK.js +1 -0
  234. package/.output/public/assets/riscv-C8BcOCkS.js +1 -0
  235. package/.output/public/assets/rolldown-runtime-S-ySWqyJ.js +1 -0
  236. package/.output/public/assets/ron-DiDyR9oa.js +1 -0
  237. package/.output/public/assets/rose-pine-BADquuIH.js +1 -0
  238. package/.output/public/assets/rose-pine-dawn-BLcEeBoh.js +1 -0
  239. package/.output/public/assets/rose-pine-moon-BK_tLY1Y.js +1 -0
  240. package/.output/public/assets/rosmsg-CHmL1Uyj.js +1 -0
  241. package/.output/public/assets/routes-Bp0r03R8.js +2147 -0
  242. package/.output/public/assets/rst-C6GHyL-N.js +1 -0
  243. package/.output/public/assets/ruby-Cl8PVkbY.js +1 -0
  244. package/.output/public/assets/rust-DjJFInu3.js +1 -0
  245. package/.output/public/assets/sas-CXoVwlZN.js +1 -0
  246. package/.output/public/assets/sass-D3xZ5o-v.js +1 -0
  247. package/.output/public/assets/scala-B0IRml5w.js +1 -0
  248. package/.output/public/assets/scheme-BhwcV3Av.js +1 -0
  249. package/.output/public/assets/scss-DNczJ95n.js +1 -0
  250. package/.output/public/assets/sdbl-BmWYR-pI.js +1 -0
  251. package/.output/public/assets/shaderlab-DZ3Lsiak.js +1 -0
  252. package/.output/public/assets/shellscript-DaVPunOM.js +1 -0
  253. package/.output/public/assets/shellsession-COm1V40U.js +1 -0
  254. package/.output/public/assets/slack-dark-DOnVms5P.js +1 -0
  255. package/.output/public/assets/slack-ochin-DcRTft4q.js +1 -0
  256. package/.output/public/assets/smalltalk-DVQuUMII.js +1 -0
  257. package/.output/public/assets/snazzy-light-x9CLJ1W9.js +1 -0
  258. package/.output/public/assets/solarized-dark-BB1sh-pe.js +1 -0
  259. package/.output/public/assets/solarized-light-9-RPS998.js +1 -0
  260. package/.output/public/assets/solidity-gQ4WXILB.js +1 -0
  261. package/.output/public/assets/soy-DwewhJ_3.js +1 -0
  262. package/.output/public/assets/sparql-B9c85a_o.js +1 -0
  263. package/.output/public/assets/splunk-OB48_RcD.js +1 -0
  264. package/.output/public/assets/sql-CrTmZCMa.js +1 -0
  265. package/.output/public/assets/ssh-config-DA9YMRGV.js +1 -0
  266. package/.output/public/assets/stata-Bl--TAbZ.js +1 -0
  267. package/.output/public/assets/styles-DEX5mU_p.css +2 -0
  268. package/.output/public/assets/stylus-sKwvsUaC.js +1 -0
  269. package/.output/public/assets/surrealql-BW79EE-U.js +1 -0
  270. package/.output/public/assets/svelte-ziMErdPi.js +1 -0
  271. package/.output/public/assets/swift-C72NbAtg.js +1 -0
  272. package/.output/public/assets/synthwave-84-eJ9uRN_S.js +1 -0
  273. package/.output/public/assets/system-verilog-CnWMF7Nq.js +1 -0
  274. package/.output/public/assets/systemd-DMzItW5N.js +1 -0
  275. package/.output/public/assets/talonscript-DopQCWDL.js +1 -0
  276. package/.output/public/assets/tasl-C28SYKbq.js +1 -0
  277. package/.output/public/assets/tcl-DHq7zmoF.js +1 -0
  278. package/.output/public/assets/templ-C_9I6ncv.js +1 -0
  279. package/.output/public/assets/terraform-CogS1YKX.js +1 -0
  280. package/.output/public/assets/tex-D8LVuLf5.js +1 -0
  281. package/.output/public/assets/tokyo-night-B9N7LyrF.js +1 -0
  282. package/.output/public/assets/toml-BH_iPsgK.js +1 -0
  283. package/.output/public/assets/ts-tags-DKuFCGsc.js +1 -0
  284. package/.output/public/assets/tsv-BIkdBZX1.js +1 -0
  285. package/.output/public/assets/tsx-BjkCKOtw.js +1 -0
  286. package/.output/public/assets/turtle-CqNXyJWZ.js +1 -0
  287. package/.output/public/assets/twig-Bs1kcsO6.js +1 -0
  288. package/.output/public/assets/typescript-BoHeP9q1.js +1 -0
  289. package/.output/public/assets/typespec-CQ9LYD_e.js +1 -0
  290. package/.output/public/assets/typst-T-Fsk-Sv.js +1 -0
  291. package/.output/public/assets/v-BhMEOw9x.js +1 -0
  292. package/.output/public/assets/vala-DzajMnwt.js +1 -0
  293. package/.output/public/assets/vb-7Xr8dEYW.js +1 -0
  294. package/.output/public/assets/verilog-AvXtwZir.js +1 -0
  295. package/.output/public/assets/vesper-CtgQQ2sf.js +1 -0
  296. package/.output/public/assets/vhdl-BHu0zg1P.js +1 -0
  297. package/.output/public/assets/viml-Di0QpLfC.js +1 -0
  298. package/.output/public/assets/vitesse-black-jXdfyqgD.js +1 -0
  299. package/.output/public/assets/vitesse-dark-B88PxG1r.js +1 -0
  300. package/.output/public/assets/vitesse-light-BXxZh2iV.js +1 -0
  301. package/.output/public/assets/vue-Dnf0y5RU.js +1 -0
  302. package/.output/public/assets/vue-html-CRtKS76J.js +1 -0
  303. package/.output/public/assets/vue-vine-BxjPqU7T.js +1 -0
  304. package/.output/public/assets/vyper-C3R5yXgx.js +1 -0
  305. package/.output/public/assets/wasm-CEUrWlVz.js +1 -0
  306. package/.output/public/assets/wasm-Chsuwt1A.js +1 -0
  307. package/.output/public/assets/wenyan-BonVcr2i.js +1 -0
  308. package/.output/public/assets/wgsl-D59WYmNq.js +1 -0
  309. package/.output/public/assets/wikitext-ariTI2Wk.js +1 -0
  310. package/.output/public/assets/wit-EA4fa3Dt.js +1 -0
  311. package/.output/public/assets/wolfram-DDp7LhyU.js +1 -0
  312. package/.output/public/assets/xml-eU7M3iZJ.js +1 -0
  313. package/.output/public/assets/xsl-DSqe4nTO.js +1 -0
  314. package/.output/public/assets/yaml-BTD1XHJG.js +1 -0
  315. package/.output/public/assets/zenscript-4WaROUyc.js +1 -0
  316. package/.output/public/assets/zig-CJoLJGwV.js +1 -0
  317. package/.output/public/favicon.png +0 -0
  318. package/.output/public/favicon.svg +7 -0
  319. package/.output/public/manifest.json +28 -0
  320. package/.output/public/robots.txt +3 -0
  321. package/.output/public/screenshots/pico-workspace-alt.png +0 -0
  322. package/.output/public/screenshots/pico-workspace.png +0 -0
  323. package/.output/public/sounds/session-done.mp3 +0 -0
  324. package/.output/server/__23tanstack-start-plugin-adapters-y_fshQDY.mjs +5 -0
  325. package/.output/server/_chunks/ssr-renderer.mjs +15 -0
  326. package/.output/server/_libs/@base-ui/react+[...].mjs +14407 -0
  327. package/.output/server/_libs/@dnd-kit/core+[...].mjs +2748 -0
  328. package/.output/server/_libs/@pierre/diffs+[...].mjs +19074 -0
  329. package/.output/server/_libs/@pierre/trees+[...].mjs +9236 -0
  330. package/.output/server/_libs/@radix-ui/react-dialog+[...].mjs +1789 -0
  331. package/.output/server/_libs/@radix-ui/react-primitive+[...].mjs +136 -0
  332. package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +196 -0
  333. package/.output/server/_libs/@tanstack/hotkeys+[...].mjs +1607 -0
  334. package/.output/server/_libs/@tanstack/react-router+[...].mjs +13950 -0
  335. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +90 -0
  336. package/.output/server/_libs/bail.mjs +13 -0
  337. package/.output/server/_libs/character-entities.mjs +2135 -0
  338. package/.output/server/_libs/class-variance-authority+clsx.mjs +69 -0
  339. package/.output/server/_libs/cmdk.mjs +473 -0
  340. package/.output/server/_libs/decode-named-character-reference+[...].mjs +19 -0
  341. package/.output/server/_libs/devlop.mjs +5 -0
  342. package/.output/server/_libs/diff.mjs +732 -0
  343. package/.output/server/_libs/dnd-kit__accessibility.mjs +46 -0
  344. package/.output/server/_libs/dnd-kit__sortable.mjs +400 -0
  345. package/.output/server/_libs/escape-string-regexp.mjs +7 -0
  346. package/.output/server/_libs/estree-util-is-identifier-name.mjs +20 -0
  347. package/.output/server/_libs/extend.mjs +75 -0
  348. package/.output/server/_libs/h3+rou3+srvx.mjs +1210 -0
  349. package/.output/server/_libs/hast-util-to-jsx-runtime+[...].mjs +1244 -0
  350. package/.output/server/_libs/hookable.mjs +41 -0
  351. package/.output/server/_libs/html-url-attributes.mjs +44 -0
  352. package/.output/server/_libs/is-plain-obj.mjs +8 -0
  353. package/.output/server/_libs/longest-streak.mjs +29 -0
  354. package/.output/server/_libs/lucide-react.mjs +632 -0
  355. package/.output/server/_libs/markdown-table.mjs +289 -0
  356. package/.output/server/_libs/mdast-util-find-and-replace+[...].mjs +636 -0
  357. package/.output/server/_libs/mdast-util-from-markdown+[...].mjs +8409 -0
  358. package/.output/server/_libs/mdast-util-gfm+[...].mjs +2346 -0
  359. package/.output/server/_libs/mdast-util-to-hast+[...].mjs +1772 -0
  360. package/.output/server/_libs/micromark-extension-gfm+[...].mjs +2234 -0
  361. package/.output/server/_libs/next-themes.mjs +124 -0
  362. package/.output/server/_libs/pierre__theme.mjs +10 -0
  363. package/.output/server/_libs/radix-ui__primitive.mjs +9 -0
  364. package/.output/server/_libs/radix-ui__react-compose-refs.mjs +30 -0
  365. package/.output/server/_libs/radix-ui__react-context.mjs +88 -0
  366. package/.output/server/_libs/react-markdown+[...].mjs +2316 -0
  367. package/.output/server/_libs/remark-gfm.mjs +34 -0
  368. package/.output/server/_libs/shiki.mjs +16 -0
  369. package/.output/server/_libs/shikijs__langs.mjs +1355 -0
  370. package/.output/server/_libs/shikijs__themes.mjs +262 -0
  371. package/.output/server/_libs/sonner.mjs +908 -0
  372. package/.output/server/_libs/sugar-high.mjs +1036 -0
  373. package/.output/server/_libs/tailwind-merge.mjs +1962 -0
  374. package/.output/server/_libs/tanstack__history.mjs +342 -0
  375. package/.output/server/_libs/tanstack__pacer.mjs +1111 -0
  376. package/.output/server/_libs/tanstack__query-core.mjs +2202 -0
  377. package/.output/server/_libs/tanstack__react-hotkeys.mjs +152 -0
  378. package/.output/server/_libs/tanstack__react-query.mjs +180 -0
  379. package/.output/server/_libs/tanstack__react-store.mjs +39 -0
  380. package/.output/server/_libs/tanstack__router-core.mjs +6 -0
  381. package/.output/server/_libs/tanstack__store.mjs +28 -0
  382. package/.output/server/_libs/ufo.mjs +64 -0
  383. package/.output/server/_libs/unctx.mjs +82 -0
  384. package/.output/server/_libs/ungap__structured-clone.mjs +197 -0
  385. package/.output/server/_libs/vaul.mjs +1250 -0
  386. package/.output/server/_libs/zod.mjs +3341 -0
  387. package/.output/server/_runtime.mjs +35 -0
  388. package/.output/server/_ssr/router-Bz70uQ0p.mjs +7231 -0
  389. package/.output/server/_ssr/routes-C7oV8l68.mjs +21622 -0
  390. package/.output/server/_ssr/routes-DGvt0TQ-.mjs +1275 -0
  391. package/.output/server/_ssr/ssr.mjs +5176 -0
  392. package/.output/server/_ssr/start-C9AjCGlr.mjs +4 -0
  393. package/.output/server/_tanstack-start-manifest_v-D0yEuwRY.mjs +65 -0
  394. package/.output/server/index.mjs +2563 -0
  395. package/.output/server/node_modules/tslib/modules/index.js +70 -0
  396. package/.output/server/node_modules/tslib/modules/package.json +3 -0
  397. package/.output/server/node_modules/tslib/package.json +47 -0
  398. package/.output/server/node_modules/tslib/tslib.js +484 -0
  399. package/.output/server/package.json +9 -0
  400. package/LICENSE +8 -0
  401. package/README.md +111 -0
  402. package/bin/pico.mjs +206 -0
  403. package/package.json +105 -0
  404. package/public/screenshots/pico-workspace-alt.png +0 -0
  405. package/public/screenshots/pico-workspace.png +0 -0
  406. package/scripts/patch-react-jsx-dev-runtime.mjs +93 -0
@@ -0,0 +1,2346 @@
1
+ import { o as ccount } from "./@pierre/diffs+[...].mjs";
2
+ import "./devlop.mjs";
3
+ import { _ as toString, f as unicodePunctuation, i as classifyCharacter, m as normalizeIdentifier, p as unicodeWhitespace } from "./mdast-util-from-markdown+[...].mjs";
4
+ import { n as visitParents, r as convert, t as findAndReplace } from "./mdast-util-find-and-replace+[...].mjs";
5
+ import { t as markdownTable } from "./markdown-table.mjs";
6
+ import { t as longestStreak } from "./longest-streak.mjs";
7
+ //#region node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.js
8
+ /**
9
+ * @import {Node as UnistNode, Parent as UnistParent} from 'unist'
10
+ * @import {VisitorResult} from 'unist-util-visit-parents'
11
+ */
12
+ /**
13
+ * @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test
14
+ * Test from `unist-util-is`.
15
+ *
16
+ * Note: we have remove and add `undefined`, because otherwise when generating
17
+ * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
18
+ * which doesn’t work when publishing on npm.
19
+ */
20
+ /**
21
+ * @typedef {(
22
+ * Fn extends (value: any) => value is infer Thing
23
+ * ? Thing
24
+ * : Fallback
25
+ * )} Predicate
26
+ * Get the value of a type guard `Fn`.
27
+ * @template Fn
28
+ * Value; typically function that is a type guard (such as `(x): x is Y`).
29
+ * @template Fallback
30
+ * Value to yield if `Fn` is not a type guard.
31
+ */
32
+ /**
33
+ * @typedef {(
34
+ * Check extends null | undefined // No test.
35
+ * ? Value
36
+ * : Value extends {type: Check} // String (type) test.
37
+ * ? Value
38
+ * : Value extends Check // Partial test.
39
+ * ? Value
40
+ * : Check extends Function // Function test.
41
+ * ? Predicate<Check, Value> extends Value
42
+ * ? Predicate<Check, Value>
43
+ * : never
44
+ * : never // Some other test?
45
+ * )} MatchesOne
46
+ * Check whether a node matches a primitive check in the type system.
47
+ * @template Value
48
+ * Value; typically unist `Node`.
49
+ * @template Check
50
+ * Value; typically `unist-util-is`-compatible test, but not arrays.
51
+ */
52
+ /**
53
+ * @typedef {(
54
+ * Check extends ReadonlyArray<any>
55
+ * ? MatchesOne<Value, Check[number]>
56
+ * : MatchesOne<Value, Check>
57
+ * )} Matches
58
+ * Check whether a node matches a check in the type system.
59
+ * @template Value
60
+ * Value; typically unist `Node`.
61
+ * @template Check
62
+ * Value; typically `unist-util-is`-compatible test.
63
+ */
64
+ /**
65
+ * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint
66
+ * Number; capped reasonably.
67
+ */
68
+ /**
69
+ * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment
70
+ * Increment a number in the type system.
71
+ * @template {Uint} [I=0]
72
+ * Index.
73
+ */
74
+ /**
75
+ * @typedef {(
76
+ * Node extends UnistParent
77
+ * ? Node extends {children: Array<infer Children>}
78
+ * ? Child extends Children ? Node : never
79
+ * : never
80
+ * : never
81
+ * )} InternalParent
82
+ * Collect nodes that can be parents of `Child`.
83
+ * @template {UnistNode} Node
84
+ * All node types in a tree.
85
+ * @template {UnistNode} Child
86
+ * Node to search for.
87
+ */
88
+ /**
89
+ * @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent
90
+ * Collect nodes in `Tree` that can be parents of `Child`.
91
+ * @template {UnistNode} Tree
92
+ * All node types in a tree.
93
+ * @template {UnistNode} Child
94
+ * Node to search for.
95
+ */
96
+ /**
97
+ * @typedef {(
98
+ * Depth extends Max
99
+ * ? never
100
+ * :
101
+ * | InternalParent<Node, Child>
102
+ * | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>
103
+ * )} InternalAncestor
104
+ * Collect nodes in `Tree` that can be ancestors of `Child`.
105
+ * @template {UnistNode} Node
106
+ * All node types in a tree.
107
+ * @template {UnistNode} Child
108
+ * Node to search for.
109
+ * @template {Uint} [Max=10]
110
+ * Max; searches up to this depth.
111
+ * @template {Uint} [Depth=0]
112
+ * Current depth.
113
+ */
114
+ /**
115
+ * @typedef {(
116
+ * Tree extends UnistParent
117
+ * ? Depth extends Max
118
+ * ? Tree
119
+ * : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>
120
+ * : Tree
121
+ * )} InclusiveDescendant
122
+ * Collect all (inclusive) descendants of `Tree`.
123
+ *
124
+ * > 👉 **Note**: for performance reasons, this seems to be the fastest way to
125
+ * > recurse without actually running into an infinite loop, which the
126
+ * > previous version did.
127
+ * >
128
+ * > Practically, a max of `2` is typically enough assuming a `Root` is
129
+ * > passed, but it doesn’t improve performance.
130
+ * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.
131
+ * > Using up to `10` doesn’t hurt or help either.
132
+ * @template {UnistNode} Tree
133
+ * Tree type.
134
+ * @template {Uint} [Max=10]
135
+ * Max; searches up to this depth.
136
+ * @template {Uint} [Depth=0]
137
+ * Current depth.
138
+ */
139
+ /**
140
+ * @callback Visitor
141
+ * Handle a node (matching `test`, if given).
142
+ *
143
+ * Visitors are free to transform `node`.
144
+ * They can also transform `parent`.
145
+ *
146
+ * Replacing `node` itself, if `SKIP` is not returned, still causes its
147
+ * descendants to be walked (which is a bug).
148
+ *
149
+ * When adding or removing previous siblings of `node` (or next siblings, in
150
+ * case of reverse), the `Visitor` should return a new `Index` to specify the
151
+ * sibling to traverse after `node` is traversed.
152
+ * Adding or removing next siblings of `node` (or previous siblings, in case
153
+ * of reverse) is handled as expected without needing to return a new `Index`.
154
+ *
155
+ * Removing the children property of `parent` still results in them being
156
+ * traversed.
157
+ * @param {Visited} node
158
+ * Found node.
159
+ * @param {Visited extends UnistNode ? number | undefined : never} index
160
+ * Index of `node` in `parent`.
161
+ * @param {Ancestor extends UnistParent ? Ancestor | undefined : never} parent
162
+ * Parent of `node`.
163
+ * @returns {VisitorResult}
164
+ * What to do next.
165
+ *
166
+ * An `Index` is treated as a tuple of `[CONTINUE, Index]`.
167
+ * An `Action` is treated as a tuple of `[Action]`.
168
+ *
169
+ * Passing a tuple back only makes sense if the `Action` is `SKIP`.
170
+ * When the `Action` is `EXIT`, that action can be returned.
171
+ * When the `Action` is `CONTINUE`, `Index` can be returned.
172
+ * @template {UnistNode} [Visited=UnistNode]
173
+ * Visited node type.
174
+ * @template {UnistParent} [Ancestor=UnistParent]
175
+ * Ancestor type.
176
+ */
177
+ /**
178
+ * @typedef {Visitor<Visited, Parent<Ancestor, Visited>>} BuildVisitorFromMatch
179
+ * Build a typed `Visitor` function from a node and all possible parents.
180
+ *
181
+ * It will infer which values are passed as `node` and which as `parent`.
182
+ * @template {UnistNode} Visited
183
+ * Node type.
184
+ * @template {UnistParent} Ancestor
185
+ * Parent type.
186
+ */
187
+ /**
188
+ * @typedef {(
189
+ * BuildVisitorFromMatch<
190
+ * Matches<Descendant, Check>,
191
+ * Extract<Descendant, UnistParent>
192
+ * >
193
+ * )} BuildVisitorFromDescendants
194
+ * Build a typed `Visitor` function from a list of descendants and a test.
195
+ *
196
+ * It will infer which values are passed as `node` and which as `parent`.
197
+ * @template {UnistNode} Descendant
198
+ * Node type.
199
+ * @template {Test} Check
200
+ * Test type.
201
+ */
202
+ /**
203
+ * @typedef {(
204
+ * BuildVisitorFromDescendants<
205
+ * InclusiveDescendant<Tree>,
206
+ * Check
207
+ * >
208
+ * )} BuildVisitor
209
+ * Build a typed `Visitor` function from a tree and a test.
210
+ *
211
+ * It will infer which values are passed as `node` and which as `parent`.
212
+ * @template {UnistNode} [Tree=UnistNode]
213
+ * Node type.
214
+ * @template {Test} [Check=Test]
215
+ * Test type.
216
+ */
217
+ /**
218
+ * Visit nodes.
219
+ *
220
+ * This algorithm performs *depth-first* *tree traversal* in *preorder*
221
+ * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).
222
+ *
223
+ * You can choose for which nodes `visitor` is called by passing a `test`.
224
+ * For complex tests, you should test yourself in `visitor`, as it will be
225
+ * faster and will have improved type information.
226
+ *
227
+ * Walking the tree is an intensive task.
228
+ * Make use of the return values of the visitor when possible.
229
+ * Instead of walking a tree multiple times, walk it once, use `unist-util-is`
230
+ * to check if a node matches, and then perform different operations.
231
+ *
232
+ * You can change the tree.
233
+ * See `Visitor` for more info.
234
+ *
235
+ * @overload
236
+ * @param {Tree} tree
237
+ * @param {Check} check
238
+ * @param {BuildVisitor<Tree, Check>} visitor
239
+ * @param {boolean | null | undefined} [reverse]
240
+ * @returns {undefined}
241
+ *
242
+ * @overload
243
+ * @param {Tree} tree
244
+ * @param {BuildVisitor<Tree>} visitor
245
+ * @param {boolean | null | undefined} [reverse]
246
+ * @returns {undefined}
247
+ *
248
+ * @param {UnistNode} tree
249
+ * Tree to traverse.
250
+ * @param {Visitor | Test} testOrVisitor
251
+ * `unist-util-is`-compatible test (optional, omit to pass a visitor).
252
+ * @param {Visitor | boolean | null | undefined} [visitorOrReverse]
253
+ * Handle each node (when test is omitted, pass `reverse`).
254
+ * @param {boolean | null | undefined} [maybeReverse=false]
255
+ * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).
256
+ * @returns {undefined}
257
+ * Nothing.
258
+ *
259
+ * @template {UnistNode} Tree
260
+ * Node type.
261
+ * @template {Test} Check
262
+ * `unist-util-is`-compatible test.
263
+ */
264
+ function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
265
+ /** @type {boolean | null | undefined} */
266
+ let reverse;
267
+ /** @type {Test} */
268
+ let test;
269
+ /** @type {Visitor} */
270
+ let visitor;
271
+ if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
272
+ test = void 0;
273
+ visitor = testOrVisitor;
274
+ reverse = visitorOrReverse;
275
+ } else {
276
+ test = testOrVisitor;
277
+ visitor = visitorOrReverse;
278
+ reverse = maybeReverse;
279
+ }
280
+ visitParents(tree, test, overload, reverse);
281
+ /**
282
+ * @param {UnistNode} node
283
+ * @param {Array<UnistParent>} parents
284
+ */
285
+ function overload(node, parents) {
286
+ const parent = parents[parents.length - 1];
287
+ const index = parent ? parent.children.indexOf(node) : void 0;
288
+ return visitor(node, index, parent);
289
+ }
290
+ }
291
+ //#endregion
292
+ //#region node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
293
+ /**
294
+ * @import {RegExpMatchObject, ReplaceFunction} from 'mdast-util-find-and-replace'
295
+ * @import {CompileContext, Extension as FromMarkdownExtension, Handle as FromMarkdownHandle, Transform as FromMarkdownTransform} from 'mdast-util-from-markdown'
296
+ * @import {ConstructName, Options as ToMarkdownExtension} from 'mdast-util-to-markdown'
297
+ * @import {Link, PhrasingContent} from 'mdast'
298
+ */
299
+ /** @type {ConstructName} */
300
+ var inConstruct = "phrasing";
301
+ /** @type {Array<ConstructName>} */
302
+ var notInConstruct = [
303
+ "autolink",
304
+ "link",
305
+ "image",
306
+ "label"
307
+ ];
308
+ /**
309
+ * Create an extension for `mdast-util-from-markdown` to enable GFM autolink
310
+ * literals in markdown.
311
+ *
312
+ * @returns {FromMarkdownExtension}
313
+ * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.
314
+ */
315
+ function gfmAutolinkLiteralFromMarkdown() {
316
+ return {
317
+ transforms: [transformGfmAutolinkLiterals],
318
+ enter: {
319
+ literalAutolink: enterLiteralAutolink,
320
+ literalAutolinkEmail: enterLiteralAutolinkValue,
321
+ literalAutolinkHttp: enterLiteralAutolinkValue,
322
+ literalAutolinkWww: enterLiteralAutolinkValue
323
+ },
324
+ exit: {
325
+ literalAutolink: exitLiteralAutolink,
326
+ literalAutolinkEmail: exitLiteralAutolinkEmail,
327
+ literalAutolinkHttp: exitLiteralAutolinkHttp,
328
+ literalAutolinkWww: exitLiteralAutolinkWww
329
+ }
330
+ };
331
+ }
332
+ /**
333
+ * Create an extension for `mdast-util-to-markdown` to enable GFM autolink
334
+ * literals in markdown.
335
+ *
336
+ * @returns {ToMarkdownExtension}
337
+ * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.
338
+ */
339
+ function gfmAutolinkLiteralToMarkdown() {
340
+ return { unsafe: [
341
+ {
342
+ character: "@",
343
+ before: "[+\\-.\\w]",
344
+ after: "[\\-.\\w]",
345
+ inConstruct,
346
+ notInConstruct
347
+ },
348
+ {
349
+ character: ".",
350
+ before: "[Ww]",
351
+ after: "[\\-.\\w]",
352
+ inConstruct,
353
+ notInConstruct
354
+ },
355
+ {
356
+ character: ":",
357
+ before: "[ps]",
358
+ after: "\\/",
359
+ inConstruct,
360
+ notInConstruct
361
+ }
362
+ ] };
363
+ }
364
+ /**
365
+ * @this {CompileContext}
366
+ * @type {FromMarkdownHandle}
367
+ */
368
+ function enterLiteralAutolink(token) {
369
+ this.enter({
370
+ type: "link",
371
+ title: null,
372
+ url: "",
373
+ children: []
374
+ }, token);
375
+ }
376
+ /**
377
+ * @this {CompileContext}
378
+ * @type {FromMarkdownHandle}
379
+ */
380
+ function enterLiteralAutolinkValue(token) {
381
+ this.config.enter.autolinkProtocol.call(this, token);
382
+ }
383
+ /**
384
+ * @this {CompileContext}
385
+ * @type {FromMarkdownHandle}
386
+ */
387
+ function exitLiteralAutolinkHttp(token) {
388
+ this.config.exit.autolinkProtocol.call(this, token);
389
+ }
390
+ /**
391
+ * @this {CompileContext}
392
+ * @type {FromMarkdownHandle}
393
+ */
394
+ function exitLiteralAutolinkWww(token) {
395
+ this.config.exit.data.call(this, token);
396
+ const node = this.stack[this.stack.length - 1];
397
+ node.type;
398
+ node.url = "http://" + this.sliceSerialize(token);
399
+ }
400
+ /**
401
+ * @this {CompileContext}
402
+ * @type {FromMarkdownHandle}
403
+ */
404
+ function exitLiteralAutolinkEmail(token) {
405
+ this.config.exit.autolinkEmail.call(this, token);
406
+ }
407
+ /**
408
+ * @this {CompileContext}
409
+ * @type {FromMarkdownHandle}
410
+ */
411
+ function exitLiteralAutolink(token) {
412
+ this.exit(token);
413
+ }
414
+ /** @type {FromMarkdownTransform} */
415
+ function transformGfmAutolinkLiterals(tree) {
416
+ findAndReplace(tree, [[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl], [/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, findEmail]], { ignore: ["link", "linkReference"] });
417
+ }
418
+ /**
419
+ * @type {ReplaceFunction}
420
+ * @param {string} _
421
+ * @param {string} protocol
422
+ * @param {string} domain
423
+ * @param {string} path
424
+ * @param {RegExpMatchObject} match
425
+ * @returns {Array<PhrasingContent> | Link | false}
426
+ */
427
+ function findUrl(_, protocol, domain, path, match) {
428
+ let prefix = "";
429
+ if (!previous(match)) return false;
430
+ if (/^w/i.test(protocol)) {
431
+ domain = protocol + domain;
432
+ protocol = "";
433
+ prefix = "http://";
434
+ }
435
+ if (!isCorrectDomain(domain)) return false;
436
+ const parts = splitUrl(domain + path);
437
+ if (!parts[0]) return false;
438
+ /** @type {Link} */
439
+ const result = {
440
+ type: "link",
441
+ title: null,
442
+ url: prefix + protocol + parts[0],
443
+ children: [{
444
+ type: "text",
445
+ value: protocol + parts[0]
446
+ }]
447
+ };
448
+ if (parts[1]) return [result, {
449
+ type: "text",
450
+ value: parts[1]
451
+ }];
452
+ return result;
453
+ }
454
+ /**
455
+ * @type {ReplaceFunction}
456
+ * @param {string} _
457
+ * @param {string} atext
458
+ * @param {string} label
459
+ * @param {RegExpMatchObject} match
460
+ * @returns {Link | false}
461
+ */
462
+ function findEmail(_, atext, label, match) {
463
+ if (!previous(match, true) || /[-\d_]$/.test(label)) return false;
464
+ return {
465
+ type: "link",
466
+ title: null,
467
+ url: "mailto:" + atext + "@" + label,
468
+ children: [{
469
+ type: "text",
470
+ value: atext + "@" + label
471
+ }]
472
+ };
473
+ }
474
+ /**
475
+ * @param {string} domain
476
+ * @returns {boolean}
477
+ */
478
+ function isCorrectDomain(domain) {
479
+ const parts = domain.split(".");
480
+ if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[a-zA-Z\d]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[a-zA-Z\d]/.test(parts[parts.length - 2]))) return false;
481
+ return true;
482
+ }
483
+ /**
484
+ * @param {string} url
485
+ * @returns {[string, string | undefined]}
486
+ */
487
+ function splitUrl(url) {
488
+ const trailExec = /[!"&'),.:;<>?\]}]+$/.exec(url);
489
+ if (!trailExec) return [url, void 0];
490
+ url = url.slice(0, trailExec.index);
491
+ let trail = trailExec[0];
492
+ let closingParenIndex = trail.indexOf(")");
493
+ const openingParens = ccount(url, "(");
494
+ let closingParens = ccount(url, ")");
495
+ while (closingParenIndex !== -1 && openingParens > closingParens) {
496
+ url += trail.slice(0, closingParenIndex + 1);
497
+ trail = trail.slice(closingParenIndex + 1);
498
+ closingParenIndex = trail.indexOf(")");
499
+ closingParens++;
500
+ }
501
+ return [url, trail];
502
+ }
503
+ /**
504
+ * @param {RegExpMatchObject} match
505
+ * @param {boolean | null | undefined} [email=false]
506
+ * @returns {boolean}
507
+ */
508
+ function previous(match, email) {
509
+ const code = match.input.charCodeAt(match.index - 1);
510
+ return (match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code)) && (!email || code !== 47);
511
+ }
512
+ //#endregion
513
+ //#region node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js
514
+ /**
515
+ * @import {
516
+ * CompileContext,
517
+ * Extension as FromMarkdownExtension,
518
+ * Handle as FromMarkdownHandle
519
+ * } from 'mdast-util-from-markdown'
520
+ * @import {ToMarkdownOptions} from 'mdast-util-gfm-footnote'
521
+ * @import {
522
+ * Handle as ToMarkdownHandle,
523
+ * Map,
524
+ * Options as ToMarkdownExtension
525
+ * } from 'mdast-util-to-markdown'
526
+ * @import {FootnoteDefinition, FootnoteReference} from 'mdast'
527
+ */
528
+ footnoteReference.peek = footnoteReferencePeek;
529
+ /**
530
+ * @this {CompileContext}
531
+ * @type {FromMarkdownHandle}
532
+ */
533
+ function enterFootnoteCallString() {
534
+ this.buffer();
535
+ }
536
+ /**
537
+ * @this {CompileContext}
538
+ * @type {FromMarkdownHandle}
539
+ */
540
+ function enterFootnoteCall(token) {
541
+ this.enter({
542
+ type: "footnoteReference",
543
+ identifier: "",
544
+ label: ""
545
+ }, token);
546
+ }
547
+ /**
548
+ * @this {CompileContext}
549
+ * @type {FromMarkdownHandle}
550
+ */
551
+ function enterFootnoteDefinitionLabelString() {
552
+ this.buffer();
553
+ }
554
+ /**
555
+ * @this {CompileContext}
556
+ * @type {FromMarkdownHandle}
557
+ */
558
+ function enterFootnoteDefinition(token) {
559
+ this.enter({
560
+ type: "footnoteDefinition",
561
+ identifier: "",
562
+ label: "",
563
+ children: []
564
+ }, token);
565
+ }
566
+ /**
567
+ * @this {CompileContext}
568
+ * @type {FromMarkdownHandle}
569
+ */
570
+ function exitFootnoteCallString(token) {
571
+ const label = this.resume();
572
+ const node = this.stack[this.stack.length - 1];
573
+ node.type;
574
+ node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();
575
+ node.label = label;
576
+ }
577
+ /**
578
+ * @this {CompileContext}
579
+ * @type {FromMarkdownHandle}
580
+ */
581
+ function exitFootnoteCall(token) {
582
+ this.exit(token);
583
+ }
584
+ /**
585
+ * @this {CompileContext}
586
+ * @type {FromMarkdownHandle}
587
+ */
588
+ function exitFootnoteDefinitionLabelString(token) {
589
+ const label = this.resume();
590
+ const node = this.stack[this.stack.length - 1];
591
+ node.type;
592
+ node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();
593
+ node.label = label;
594
+ }
595
+ /**
596
+ * @this {CompileContext}
597
+ * @type {FromMarkdownHandle}
598
+ */
599
+ function exitFootnoteDefinition(token) {
600
+ this.exit(token);
601
+ }
602
+ /** @type {ToMarkdownHandle} */
603
+ function footnoteReferencePeek() {
604
+ return "[";
605
+ }
606
+ /**
607
+ * @type {ToMarkdownHandle}
608
+ * @param {FootnoteReference} node
609
+ */
610
+ function footnoteReference(node, _, state, info) {
611
+ const tracker = state.createTracker(info);
612
+ let value = tracker.move("[^");
613
+ const exit = state.enter("footnoteReference");
614
+ const subexit = state.enter("reference");
615
+ value += tracker.move(state.safe(state.associationId(node), {
616
+ after: "]",
617
+ before: value
618
+ }));
619
+ subexit();
620
+ exit();
621
+ value += tracker.move("]");
622
+ return value;
623
+ }
624
+ /**
625
+ * Create an extension for `mdast-util-from-markdown` to enable GFM footnotes
626
+ * in markdown.
627
+ *
628
+ * @returns {FromMarkdownExtension}
629
+ * Extension for `mdast-util-from-markdown`.
630
+ */
631
+ function gfmFootnoteFromMarkdown() {
632
+ return {
633
+ enter: {
634
+ gfmFootnoteCallString: enterFootnoteCallString,
635
+ gfmFootnoteCall: enterFootnoteCall,
636
+ gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,
637
+ gfmFootnoteDefinition: enterFootnoteDefinition
638
+ },
639
+ exit: {
640
+ gfmFootnoteCallString: exitFootnoteCallString,
641
+ gfmFootnoteCall: exitFootnoteCall,
642
+ gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,
643
+ gfmFootnoteDefinition: exitFootnoteDefinition
644
+ }
645
+ };
646
+ }
647
+ /**
648
+ * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes
649
+ * in markdown.
650
+ *
651
+ * @param {ToMarkdownOptions | null | undefined} [options]
652
+ * Configuration (optional).
653
+ * @returns {ToMarkdownExtension}
654
+ * Extension for `mdast-util-to-markdown`.
655
+ */
656
+ function gfmFootnoteToMarkdown(options) {
657
+ let firstLineBlank = false;
658
+ if (options && options.firstLineBlank) firstLineBlank = true;
659
+ return {
660
+ handlers: {
661
+ footnoteDefinition,
662
+ footnoteReference
663
+ },
664
+ unsafe: [{
665
+ character: "[",
666
+ inConstruct: [
667
+ "label",
668
+ "phrasing",
669
+ "reference"
670
+ ]
671
+ }]
672
+ };
673
+ /**
674
+ * @type {ToMarkdownHandle}
675
+ * @param {FootnoteDefinition} node
676
+ */
677
+ function footnoteDefinition(node, _, state, info) {
678
+ const tracker = state.createTracker(info);
679
+ let value = tracker.move("[^");
680
+ const exit = state.enter("footnoteDefinition");
681
+ const subexit = state.enter("label");
682
+ value += tracker.move(state.safe(state.associationId(node), {
683
+ before: value,
684
+ after: "]"
685
+ }));
686
+ subexit();
687
+ value += tracker.move("]:");
688
+ if (node.children && node.children.length > 0) {
689
+ tracker.shift(4);
690
+ value += tracker.move((firstLineBlank ? "\n" : " ") + state.indentLines(state.containerFlow(node, tracker.current()), firstLineBlank ? mapAll : mapExceptFirst));
691
+ }
692
+ exit();
693
+ return value;
694
+ }
695
+ }
696
+ /** @type {Map} */
697
+ function mapExceptFirst(line, index, blank) {
698
+ return index === 0 ? line : mapAll(line, index, blank);
699
+ }
700
+ /** @type {Map} */
701
+ function mapAll(line, index, blank) {
702
+ return (blank ? "" : " ") + line;
703
+ }
704
+ //#endregion
705
+ //#region node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.js
706
+ /**
707
+ * @typedef {import('mdast').Delete} Delete
708
+ *
709
+ * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
710
+ * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
711
+ * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
712
+ *
713
+ * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName
714
+ * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
715
+ * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
716
+ */
717
+ /**
718
+ * List of constructs that occur in phrasing (paragraphs, headings), but cannot
719
+ * contain strikethrough.
720
+ * So they sort of cancel each other out.
721
+ * Note: could use a better name.
722
+ *
723
+ * Note: keep in sync with: <https://github.com/syntax-tree/mdast-util-to-markdown/blob/8ce8dbf/lib/unsafe.js#L14>
724
+ *
725
+ * @type {Array<ConstructName>}
726
+ */
727
+ var constructsWithoutStrikethrough = [
728
+ "autolink",
729
+ "destinationLiteral",
730
+ "destinationRaw",
731
+ "reference",
732
+ "titleQuote",
733
+ "titleApostrophe"
734
+ ];
735
+ handleDelete.peek = peekDelete;
736
+ /**
737
+ * Create an extension for `mdast-util-from-markdown` to enable GFM
738
+ * strikethrough in markdown.
739
+ *
740
+ * @returns {FromMarkdownExtension}
741
+ * Extension for `mdast-util-from-markdown` to enable GFM strikethrough.
742
+ */
743
+ function gfmStrikethroughFromMarkdown() {
744
+ return {
745
+ canContainEols: ["delete"],
746
+ enter: { strikethrough: enterStrikethrough },
747
+ exit: { strikethrough: exitStrikethrough }
748
+ };
749
+ }
750
+ /**
751
+ * Create an extension for `mdast-util-to-markdown` to enable GFM
752
+ * strikethrough in markdown.
753
+ *
754
+ * @returns {ToMarkdownExtension}
755
+ * Extension for `mdast-util-to-markdown` to enable GFM strikethrough.
756
+ */
757
+ function gfmStrikethroughToMarkdown() {
758
+ return {
759
+ unsafe: [{
760
+ character: "~",
761
+ inConstruct: "phrasing",
762
+ notInConstruct: constructsWithoutStrikethrough
763
+ }],
764
+ handlers: { delete: handleDelete }
765
+ };
766
+ }
767
+ /**
768
+ * @this {CompileContext}
769
+ * @type {FromMarkdownHandle}
770
+ */
771
+ function enterStrikethrough(token) {
772
+ this.enter({
773
+ type: "delete",
774
+ children: []
775
+ }, token);
776
+ }
777
+ /**
778
+ * @this {CompileContext}
779
+ * @type {FromMarkdownHandle}
780
+ */
781
+ function exitStrikethrough(token) {
782
+ this.exit(token);
783
+ }
784
+ /**
785
+ * @type {ToMarkdownHandle}
786
+ * @param {Delete} node
787
+ */
788
+ function handleDelete(node, _, state, info) {
789
+ const tracker = state.createTracker(info);
790
+ const exit = state.enter("strikethrough");
791
+ let value = tracker.move("~~");
792
+ value += state.containerPhrasing(node, {
793
+ ...tracker.current(),
794
+ before: value,
795
+ after: "~"
796
+ });
797
+ value += tracker.move("~~");
798
+ exit();
799
+ return value;
800
+ }
801
+ /** @type {ToMarkdownHandle} */
802
+ function peekDelete() {
803
+ return "~";
804
+ }
805
+ //#endregion
806
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js
807
+ /**
808
+ * @import {Blockquote, Parents} from 'mdast'
809
+ * @import {Info, Map, State} from 'mdast-util-to-markdown'
810
+ */
811
+ /**
812
+ * @param {Blockquote} node
813
+ * @param {Parents | undefined} _
814
+ * @param {State} state
815
+ * @param {Info} info
816
+ * @returns {string}
817
+ */
818
+ function blockquote(node, _, state, info) {
819
+ const exit = state.enter("blockquote");
820
+ const tracker = state.createTracker(info);
821
+ tracker.move("> ");
822
+ tracker.shift(2);
823
+ const value = state.indentLines(state.containerFlow(node, tracker.current()), map$1);
824
+ exit();
825
+ return value;
826
+ }
827
+ /** @type {Map} */
828
+ function map$1(line, _, blank) {
829
+ return ">" + (blank ? "" : " ") + line;
830
+ }
831
+ //#endregion
832
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js
833
+ /**
834
+ * @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'
835
+ */
836
+ /**
837
+ * @param {Array<ConstructName>} stack
838
+ * @param {Unsafe} pattern
839
+ * @returns {boolean}
840
+ */
841
+ function patternInScope(stack, pattern) {
842
+ return listInScope(stack, pattern.inConstruct, true) && !listInScope(stack, pattern.notInConstruct, false);
843
+ }
844
+ /**
845
+ * @param {Array<ConstructName>} stack
846
+ * @param {Unsafe['inConstruct']} list
847
+ * @param {boolean} none
848
+ * @returns {boolean}
849
+ */
850
+ function listInScope(stack, list, none) {
851
+ if (typeof list === "string") list = [list];
852
+ if (!list || list.length === 0) return none;
853
+ let index = -1;
854
+ while (++index < list.length) if (stack.includes(list[index])) return true;
855
+ return false;
856
+ }
857
+ //#endregion
858
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.js
859
+ /**
860
+ * @import {Break, Parents} from 'mdast'
861
+ * @import {Info, State} from 'mdast-util-to-markdown'
862
+ */
863
+ /**
864
+ * @param {Break} _
865
+ * @param {Parents | undefined} _1
866
+ * @param {State} state
867
+ * @param {Info} info
868
+ * @returns {string}
869
+ */
870
+ function hardBreak(_, _1, state, info) {
871
+ let index = -1;
872
+ while (++index < state.unsafe.length) if (state.unsafe[index].character === "\n" && patternInScope(state.stack, state.unsafe[index])) return /[ \t]/.test(info.before) ? "" : " ";
873
+ return "\\\n";
874
+ }
875
+ //#endregion
876
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js
877
+ /**
878
+ * @import {State} from 'mdast-util-to-markdown'
879
+ * @import {Code} from 'mdast'
880
+ */
881
+ /**
882
+ * @param {Code} node
883
+ * @param {State} state
884
+ * @returns {boolean}
885
+ */
886
+ function formatCodeAsIndented(node, state) {
887
+ return Boolean(state.options.fences === false && node.value && !node.lang && /[^ \r\n]/.test(node.value) && !/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(node.value));
888
+ }
889
+ //#endregion
890
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.js
891
+ /**
892
+ * @import {Options, State} from 'mdast-util-to-markdown'
893
+ */
894
+ /**
895
+ * @param {State} state
896
+ * @returns {Exclude<Options['fence'], null | undefined>}
897
+ */
898
+ function checkFence(state) {
899
+ const marker = state.options.fence || "`";
900
+ if (marker !== "`" && marker !== "~") throw new Error("Cannot serialize code with `" + marker + "` for `options.fence`, expected `` ` `` or `~`");
901
+ return marker;
902
+ }
903
+ //#endregion
904
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.js
905
+ /**
906
+ * @import {Info, Map, State} from 'mdast-util-to-markdown'
907
+ * @import {Code, Parents} from 'mdast'
908
+ */
909
+ /**
910
+ * @param {Code} node
911
+ * @param {Parents | undefined} _
912
+ * @param {State} state
913
+ * @param {Info} info
914
+ * @returns {string}
915
+ */
916
+ function code(node, _, state, info) {
917
+ const marker = checkFence(state);
918
+ const raw = node.value || "";
919
+ const suffix = marker === "`" ? "GraveAccent" : "Tilde";
920
+ if (formatCodeAsIndented(node, state)) {
921
+ const exit = state.enter("codeIndented");
922
+ const value = state.indentLines(raw, map);
923
+ exit();
924
+ return value;
925
+ }
926
+ const tracker = state.createTracker(info);
927
+ const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3));
928
+ const exit = state.enter("codeFenced");
929
+ let value = tracker.move(sequence);
930
+ if (node.lang) {
931
+ const subexit = state.enter(`codeFencedLang${suffix}`);
932
+ value += tracker.move(state.safe(node.lang, {
933
+ before: value,
934
+ after: " ",
935
+ encode: ["`"],
936
+ ...tracker.current()
937
+ }));
938
+ subexit();
939
+ }
940
+ if (node.lang && node.meta) {
941
+ const subexit = state.enter(`codeFencedMeta${suffix}`);
942
+ value += tracker.move(" ");
943
+ value += tracker.move(state.safe(node.meta, {
944
+ before: value,
945
+ after: "\n",
946
+ encode: ["`"],
947
+ ...tracker.current()
948
+ }));
949
+ subexit();
950
+ }
951
+ value += tracker.move("\n");
952
+ if (raw) value += tracker.move(raw + "\n");
953
+ value += tracker.move(sequence);
954
+ exit();
955
+ return value;
956
+ }
957
+ /** @type {Map} */
958
+ function map(line, _, blank) {
959
+ return (blank ? "" : " ") + line;
960
+ }
961
+ //#endregion
962
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.js
963
+ /**
964
+ * @import {Options, State} from 'mdast-util-to-markdown'
965
+ */
966
+ /**
967
+ * @param {State} state
968
+ * @returns {Exclude<Options['quote'], null | undefined>}
969
+ */
970
+ function checkQuote(state) {
971
+ const marker = state.options.quote || "\"";
972
+ if (marker !== "\"" && marker !== "'") throw new Error("Cannot serialize title with `" + marker + "` for `options.quote`, expected `\"`, or `'`");
973
+ return marker;
974
+ }
975
+ //#endregion
976
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.js
977
+ /**
978
+ * @import {Info, State} from 'mdast-util-to-markdown'
979
+ * @import {Definition, Parents} from 'mdast'
980
+ */
981
+ /**
982
+ * @param {Definition} node
983
+ * @param {Parents | undefined} _
984
+ * @param {State} state
985
+ * @param {Info} info
986
+ * @returns {string}
987
+ */
988
+ function definition(node, _, state, info) {
989
+ const quote = checkQuote(state);
990
+ const suffix = quote === "\"" ? "Quote" : "Apostrophe";
991
+ const exit = state.enter("definition");
992
+ let subexit = state.enter("label");
993
+ const tracker = state.createTracker(info);
994
+ let value = tracker.move("[");
995
+ value += tracker.move(state.safe(state.associationId(node), {
996
+ before: value,
997
+ after: "]",
998
+ ...tracker.current()
999
+ }));
1000
+ value += tracker.move("]: ");
1001
+ subexit();
1002
+ if (!node.url || /[\0- \u007F]/.test(node.url)) {
1003
+ subexit = state.enter("destinationLiteral");
1004
+ value += tracker.move("<");
1005
+ value += tracker.move(state.safe(node.url, {
1006
+ before: value,
1007
+ after: ">",
1008
+ ...tracker.current()
1009
+ }));
1010
+ value += tracker.move(">");
1011
+ } else {
1012
+ subexit = state.enter("destinationRaw");
1013
+ value += tracker.move(state.safe(node.url, {
1014
+ before: value,
1015
+ after: node.title ? " " : "\n",
1016
+ ...tracker.current()
1017
+ }));
1018
+ }
1019
+ subexit();
1020
+ if (node.title) {
1021
+ subexit = state.enter(`title${suffix}`);
1022
+ value += tracker.move(" " + quote);
1023
+ value += tracker.move(state.safe(node.title, {
1024
+ before: value,
1025
+ after: quote,
1026
+ ...tracker.current()
1027
+ }));
1028
+ value += tracker.move(quote);
1029
+ subexit();
1030
+ }
1031
+ exit();
1032
+ return value;
1033
+ }
1034
+ //#endregion
1035
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js
1036
+ /**
1037
+ * @import {Options, State} from 'mdast-util-to-markdown'
1038
+ */
1039
+ /**
1040
+ * @param {State} state
1041
+ * @returns {Exclude<Options['emphasis'], null | undefined>}
1042
+ */
1043
+ function checkEmphasis(state) {
1044
+ const marker = state.options.emphasis || "*";
1045
+ if (marker !== "*" && marker !== "_") throw new Error("Cannot serialize emphasis with `" + marker + "` for `options.emphasis`, expected `*`, or `_`");
1046
+ return marker;
1047
+ }
1048
+ //#endregion
1049
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js
1050
+ /**
1051
+ * Encode a code point as a character reference.
1052
+ *
1053
+ * @param {number} code
1054
+ * Code point to encode.
1055
+ * @returns {string}
1056
+ * Encoded character reference.
1057
+ */
1058
+ function encodeCharacterReference(code) {
1059
+ return "&#x" + code.toString(16).toUpperCase() + ";";
1060
+ }
1061
+ //#endregion
1062
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.js
1063
+ /**
1064
+ * @import {EncodeSides} from '../types.js'
1065
+ */
1066
+ /**
1067
+ * Check whether to encode (as a character reference) the characters
1068
+ * surrounding an attention run.
1069
+ *
1070
+ * Which characters are around an attention run influence whether it works or
1071
+ * not.
1072
+ *
1073
+ * See <https://github.com/orgs/syntax-tree/discussions/60> for more info.
1074
+ * See this markdown in a particular renderer to see what works:
1075
+ *
1076
+ * ```markdown
1077
+ * | | A (letter inside) | B (punctuation inside) | C (whitespace inside) | D (nothing inside) |
1078
+ * | ----------------------- | ----------------- | ---------------------- | --------------------- | ------------------ |
1079
+ * | 1 (letter outside) | x*y*z | x*.*z | x* *z | x**z |
1080
+ * | 2 (punctuation outside) | .*y*. | .*.*. | .* *. | .**. |
1081
+ * | 3 (whitespace outside) | x *y* z | x *.* z | x * * z | x ** z |
1082
+ * | 4 (nothing outside) | *x* | *.* | * * | ** |
1083
+ * ```
1084
+ *
1085
+ * @param {number} outside
1086
+ * Code point on the outer side of the run.
1087
+ * @param {number} inside
1088
+ * Code point on the inner side of the run.
1089
+ * @param {'*' | '_'} marker
1090
+ * Marker of the run.
1091
+ * Underscores are handled more strictly (they form less often) than
1092
+ * asterisks.
1093
+ * @returns {EncodeSides}
1094
+ * Whether to encode characters.
1095
+ */
1096
+ function encodeInfo(outside, inside, marker) {
1097
+ const outsideKind = classifyCharacter(outside);
1098
+ const insideKind = classifyCharacter(inside);
1099
+ if (outsideKind === void 0) return insideKind === void 0 ? marker === "_" ? {
1100
+ inside: true,
1101
+ outside: true
1102
+ } : {
1103
+ inside: false,
1104
+ outside: false
1105
+ } : insideKind === 1 ? {
1106
+ inside: true,
1107
+ outside: true
1108
+ } : {
1109
+ inside: false,
1110
+ outside: true
1111
+ };
1112
+ if (outsideKind === 1) return insideKind === void 0 ? {
1113
+ inside: false,
1114
+ outside: false
1115
+ } : insideKind === 1 ? {
1116
+ inside: true,
1117
+ outside: true
1118
+ } : {
1119
+ inside: false,
1120
+ outside: false
1121
+ };
1122
+ return insideKind === void 0 ? {
1123
+ inside: false,
1124
+ outside: false
1125
+ } : insideKind === 1 ? {
1126
+ inside: true,
1127
+ outside: false
1128
+ } : {
1129
+ inside: false,
1130
+ outside: false
1131
+ };
1132
+ }
1133
+ //#endregion
1134
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js
1135
+ /**
1136
+ * @import {Info, State} from 'mdast-util-to-markdown'
1137
+ * @import {Emphasis, Parents} from 'mdast'
1138
+ */
1139
+ emphasis.peek = emphasisPeek;
1140
+ /**
1141
+ * @param {Emphasis} node
1142
+ * @param {Parents | undefined} _
1143
+ * @param {State} state
1144
+ * @param {Info} info
1145
+ * @returns {string}
1146
+ */
1147
+ function emphasis(node, _, state, info) {
1148
+ const marker = checkEmphasis(state);
1149
+ const exit = state.enter("emphasis");
1150
+ const tracker = state.createTracker(info);
1151
+ const before = tracker.move(marker);
1152
+ let between = tracker.move(state.containerPhrasing(node, {
1153
+ after: marker,
1154
+ before,
1155
+ ...tracker.current()
1156
+ }));
1157
+ const betweenHead = between.charCodeAt(0);
1158
+ const open = encodeInfo(info.before.charCodeAt(info.before.length - 1), betweenHead, marker);
1159
+ if (open.inside) between = encodeCharacterReference(betweenHead) + between.slice(1);
1160
+ const betweenTail = between.charCodeAt(between.length - 1);
1161
+ const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker);
1162
+ if (close.inside) between = between.slice(0, -1) + encodeCharacterReference(betweenTail);
1163
+ const after = tracker.move(marker);
1164
+ exit();
1165
+ state.attentionEncodeSurroundingInfo = {
1166
+ after: close.outside,
1167
+ before: open.outside
1168
+ };
1169
+ return before + between + after;
1170
+ }
1171
+ /**
1172
+ * @param {Emphasis} _
1173
+ * @param {Parents | undefined} _1
1174
+ * @param {State} state
1175
+ * @returns {string}
1176
+ */
1177
+ function emphasisPeek(_, _1, state) {
1178
+ return state.options.emphasis || "*";
1179
+ }
1180
+ //#endregion
1181
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js
1182
+ /**
1183
+ * @import {State} from 'mdast-util-to-markdown'
1184
+ * @import {Heading} from 'mdast'
1185
+ */
1186
+ /**
1187
+ * @param {Heading} node
1188
+ * @param {State} state
1189
+ * @returns {boolean}
1190
+ */
1191
+ function formatHeadingAsSetext(node, state) {
1192
+ let literalWithBreak = false;
1193
+ visit(node, function(node) {
1194
+ if ("value" in node && /\r?\n|\r/.test(node.value) || node.type === "break") {
1195
+ literalWithBreak = true;
1196
+ return false;
1197
+ }
1198
+ });
1199
+ return Boolean((!node.depth || node.depth < 3) && toString(node) && (state.options.setext || literalWithBreak));
1200
+ }
1201
+ //#endregion
1202
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.js
1203
+ /**
1204
+ * @import {Info, State} from 'mdast-util-to-markdown'
1205
+ * @import {Heading, Parents} from 'mdast'
1206
+ */
1207
+ /**
1208
+ * @param {Heading} node
1209
+ * @param {Parents | undefined} _
1210
+ * @param {State} state
1211
+ * @param {Info} info
1212
+ * @returns {string}
1213
+ */
1214
+ function heading(node, _, state, info) {
1215
+ const rank = Math.max(Math.min(6, node.depth || 1), 1);
1216
+ const tracker = state.createTracker(info);
1217
+ if (formatHeadingAsSetext(node, state)) {
1218
+ const exit = state.enter("headingSetext");
1219
+ const subexit = state.enter("phrasing");
1220
+ const value = state.containerPhrasing(node, {
1221
+ ...tracker.current(),
1222
+ before: "\n",
1223
+ after: "\n"
1224
+ });
1225
+ subexit();
1226
+ exit();
1227
+ return value + "\n" + (rank === 1 ? "=" : "-").repeat(value.length - (Math.max(value.lastIndexOf("\r"), value.lastIndexOf("\n")) + 1));
1228
+ }
1229
+ const sequence = "#".repeat(rank);
1230
+ const exit = state.enter("headingAtx");
1231
+ const subexit = state.enter("phrasing");
1232
+ tracker.move(sequence + " ");
1233
+ let value = state.containerPhrasing(node, {
1234
+ before: "# ",
1235
+ after: "\n",
1236
+ ...tracker.current()
1237
+ });
1238
+ if (/^[\t ]/.test(value)) value = encodeCharacterReference(value.charCodeAt(0)) + value.slice(1);
1239
+ value = value ? sequence + " " + value : sequence;
1240
+ if (state.options.closeAtx) value += " " + sequence;
1241
+ subexit();
1242
+ exit();
1243
+ return value;
1244
+ }
1245
+ //#endregion
1246
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.js
1247
+ /**
1248
+ * @import {Html} from 'mdast'
1249
+ */
1250
+ html.peek = htmlPeek;
1251
+ /**
1252
+ * @param {Html} node
1253
+ * @returns {string}
1254
+ */
1255
+ function html(node) {
1256
+ return node.value || "";
1257
+ }
1258
+ /**
1259
+ * @returns {string}
1260
+ */
1261
+ function htmlPeek() {
1262
+ return "<";
1263
+ }
1264
+ //#endregion
1265
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.js
1266
+ /**
1267
+ * @import {Info, State} from 'mdast-util-to-markdown'
1268
+ * @import {Image, Parents} from 'mdast'
1269
+ */
1270
+ image.peek = imagePeek;
1271
+ /**
1272
+ * @param {Image} node
1273
+ * @param {Parents | undefined} _
1274
+ * @param {State} state
1275
+ * @param {Info} info
1276
+ * @returns {string}
1277
+ */
1278
+ function image(node, _, state, info) {
1279
+ const quote = checkQuote(state);
1280
+ const suffix = quote === "\"" ? "Quote" : "Apostrophe";
1281
+ const exit = state.enter("image");
1282
+ let subexit = state.enter("label");
1283
+ const tracker = state.createTracker(info);
1284
+ let value = tracker.move("![");
1285
+ value += tracker.move(state.safe(node.alt, {
1286
+ before: value,
1287
+ after: "]",
1288
+ ...tracker.current()
1289
+ }));
1290
+ value += tracker.move("](");
1291
+ subexit();
1292
+ if (!node.url && node.title || /[\0- \u007F]/.test(node.url)) {
1293
+ subexit = state.enter("destinationLiteral");
1294
+ value += tracker.move("<");
1295
+ value += tracker.move(state.safe(node.url, {
1296
+ before: value,
1297
+ after: ">",
1298
+ ...tracker.current()
1299
+ }));
1300
+ value += tracker.move(">");
1301
+ } else {
1302
+ subexit = state.enter("destinationRaw");
1303
+ value += tracker.move(state.safe(node.url, {
1304
+ before: value,
1305
+ after: node.title ? " " : ")",
1306
+ ...tracker.current()
1307
+ }));
1308
+ }
1309
+ subexit();
1310
+ if (node.title) {
1311
+ subexit = state.enter(`title${suffix}`);
1312
+ value += tracker.move(" " + quote);
1313
+ value += tracker.move(state.safe(node.title, {
1314
+ before: value,
1315
+ after: quote,
1316
+ ...tracker.current()
1317
+ }));
1318
+ value += tracker.move(quote);
1319
+ subexit();
1320
+ }
1321
+ value += tracker.move(")");
1322
+ exit();
1323
+ return value;
1324
+ }
1325
+ /**
1326
+ * @returns {string}
1327
+ */
1328
+ function imagePeek() {
1329
+ return "!";
1330
+ }
1331
+ //#endregion
1332
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js
1333
+ /**
1334
+ * @import {Info, State} from 'mdast-util-to-markdown'
1335
+ * @import {ImageReference, Parents} from 'mdast'
1336
+ */
1337
+ imageReference.peek = imageReferencePeek;
1338
+ /**
1339
+ * @param {ImageReference} node
1340
+ * @param {Parents | undefined} _
1341
+ * @param {State} state
1342
+ * @param {Info} info
1343
+ * @returns {string}
1344
+ */
1345
+ function imageReference(node, _, state, info) {
1346
+ const type = node.referenceType;
1347
+ const exit = state.enter("imageReference");
1348
+ let subexit = state.enter("label");
1349
+ const tracker = state.createTracker(info);
1350
+ let value = tracker.move("![");
1351
+ const alt = state.safe(node.alt, {
1352
+ before: value,
1353
+ after: "]",
1354
+ ...tracker.current()
1355
+ });
1356
+ value += tracker.move(alt + "][");
1357
+ subexit();
1358
+ const stack = state.stack;
1359
+ state.stack = [];
1360
+ subexit = state.enter("reference");
1361
+ const reference = state.safe(state.associationId(node), {
1362
+ before: value,
1363
+ after: "]",
1364
+ ...tracker.current()
1365
+ });
1366
+ subexit();
1367
+ state.stack = stack;
1368
+ exit();
1369
+ if (type === "full" || !alt || alt !== reference) value += tracker.move(reference + "]");
1370
+ else if (type === "shortcut") value = value.slice(0, -1);
1371
+ else value += tracker.move("]");
1372
+ return value;
1373
+ }
1374
+ /**
1375
+ * @returns {string}
1376
+ */
1377
+ function imageReferencePeek() {
1378
+ return "!";
1379
+ }
1380
+ //#endregion
1381
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
1382
+ /**
1383
+ * @import {State} from 'mdast-util-to-markdown'
1384
+ * @import {InlineCode, Parents} from 'mdast'
1385
+ */
1386
+ inlineCode.peek = inlineCodePeek;
1387
+ /**
1388
+ * @param {InlineCode} node
1389
+ * @param {Parents | undefined} _
1390
+ * @param {State} state
1391
+ * @returns {string}
1392
+ */
1393
+ function inlineCode(node, _, state) {
1394
+ let value = node.value || "";
1395
+ let sequence = "`";
1396
+ let index = -1;
1397
+ while (new RegExp("(^|[^`])" + sequence + "([^`]|$)").test(value)) sequence += "`";
1398
+ if (/[^ \r\n]/.test(value) && (/^[ \r\n]/.test(value) && /[ \r\n]$/.test(value) || /^`|`$/.test(value))) value = " " + value + " ";
1399
+ while (++index < state.unsafe.length) {
1400
+ const pattern = state.unsafe[index];
1401
+ const expression = state.compilePattern(pattern);
1402
+ /** @type {RegExpExecArray | null} */
1403
+ let match;
1404
+ if (!pattern.atBreak) continue;
1405
+ while (match = expression.exec(value)) {
1406
+ let position = match.index;
1407
+ if (value.charCodeAt(position) === 10 && value.charCodeAt(position - 1) === 13) position--;
1408
+ value = value.slice(0, position) + " " + value.slice(match.index + 1);
1409
+ }
1410
+ }
1411
+ return sequence + value + sequence;
1412
+ }
1413
+ /**
1414
+ * @returns {string}
1415
+ */
1416
+ function inlineCodePeek() {
1417
+ return "`";
1418
+ }
1419
+ //#endregion
1420
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js
1421
+ /**
1422
+ * @import {State} from 'mdast-util-to-markdown'
1423
+ * @import {Link} from 'mdast'
1424
+ */
1425
+ /**
1426
+ * @param {Link} node
1427
+ * @param {State} state
1428
+ * @returns {boolean}
1429
+ */
1430
+ function formatLinkAsAutolink(node, state) {
1431
+ const raw = toString(node);
1432
+ return Boolean(!state.options.resourceLink && node.url && !node.title && node.children && node.children.length === 1 && node.children[0].type === "text" && (raw === node.url || "mailto:" + raw === node.url) && /^[a-z][a-z+.-]+:/i.test(node.url) && !/[\0- <>\u007F]/.test(node.url));
1433
+ }
1434
+ //#endregion
1435
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.js
1436
+ /**
1437
+ * @import {Info, State} from 'mdast-util-to-markdown'
1438
+ * @import {Link, Parents} from 'mdast'
1439
+ * @import {Exit} from '../types.js'
1440
+ */
1441
+ link.peek = linkPeek;
1442
+ /**
1443
+ * @param {Link} node
1444
+ * @param {Parents | undefined} _
1445
+ * @param {State} state
1446
+ * @param {Info} info
1447
+ * @returns {string}
1448
+ */
1449
+ function link(node, _, state, info) {
1450
+ const quote = checkQuote(state);
1451
+ const suffix = quote === "\"" ? "Quote" : "Apostrophe";
1452
+ const tracker = state.createTracker(info);
1453
+ /** @type {Exit} */
1454
+ let exit;
1455
+ /** @type {Exit} */
1456
+ let subexit;
1457
+ if (formatLinkAsAutolink(node, state)) {
1458
+ const stack = state.stack;
1459
+ state.stack = [];
1460
+ exit = state.enter("autolink");
1461
+ let value = tracker.move("<");
1462
+ value += tracker.move(state.containerPhrasing(node, {
1463
+ before: value,
1464
+ after: ">",
1465
+ ...tracker.current()
1466
+ }));
1467
+ value += tracker.move(">");
1468
+ exit();
1469
+ state.stack = stack;
1470
+ return value;
1471
+ }
1472
+ exit = state.enter("link");
1473
+ subexit = state.enter("label");
1474
+ let value = tracker.move("[");
1475
+ value += tracker.move(state.containerPhrasing(node, {
1476
+ before: value,
1477
+ after: "](",
1478
+ ...tracker.current()
1479
+ }));
1480
+ value += tracker.move("](");
1481
+ subexit();
1482
+ if (!node.url && node.title || /[\0- \u007F]/.test(node.url)) {
1483
+ subexit = state.enter("destinationLiteral");
1484
+ value += tracker.move("<");
1485
+ value += tracker.move(state.safe(node.url, {
1486
+ before: value,
1487
+ after: ">",
1488
+ ...tracker.current()
1489
+ }));
1490
+ value += tracker.move(">");
1491
+ } else {
1492
+ subexit = state.enter("destinationRaw");
1493
+ value += tracker.move(state.safe(node.url, {
1494
+ before: value,
1495
+ after: node.title ? " " : ")",
1496
+ ...tracker.current()
1497
+ }));
1498
+ }
1499
+ subexit();
1500
+ if (node.title) {
1501
+ subexit = state.enter(`title${suffix}`);
1502
+ value += tracker.move(" " + quote);
1503
+ value += tracker.move(state.safe(node.title, {
1504
+ before: value,
1505
+ after: quote,
1506
+ ...tracker.current()
1507
+ }));
1508
+ value += tracker.move(quote);
1509
+ subexit();
1510
+ }
1511
+ value += tracker.move(")");
1512
+ exit();
1513
+ return value;
1514
+ }
1515
+ /**
1516
+ * @param {Link} node
1517
+ * @param {Parents | undefined} _
1518
+ * @param {State} state
1519
+ * @returns {string}
1520
+ */
1521
+ function linkPeek(node, _, state) {
1522
+ return formatLinkAsAutolink(node, state) ? "<" : "[";
1523
+ }
1524
+ //#endregion
1525
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js
1526
+ /**
1527
+ * @import {Info, State} from 'mdast-util-to-markdown'
1528
+ * @import {LinkReference, Parents} from 'mdast'
1529
+ */
1530
+ linkReference.peek = linkReferencePeek;
1531
+ /**
1532
+ * @param {LinkReference} node
1533
+ * @param {Parents | undefined} _
1534
+ * @param {State} state
1535
+ * @param {Info} info
1536
+ * @returns {string}
1537
+ */
1538
+ function linkReference(node, _, state, info) {
1539
+ const type = node.referenceType;
1540
+ const exit = state.enter("linkReference");
1541
+ let subexit = state.enter("label");
1542
+ const tracker = state.createTracker(info);
1543
+ let value = tracker.move("[");
1544
+ const text = state.containerPhrasing(node, {
1545
+ before: value,
1546
+ after: "]",
1547
+ ...tracker.current()
1548
+ });
1549
+ value += tracker.move(text + "][");
1550
+ subexit();
1551
+ const stack = state.stack;
1552
+ state.stack = [];
1553
+ subexit = state.enter("reference");
1554
+ const reference = state.safe(state.associationId(node), {
1555
+ before: value,
1556
+ after: "]",
1557
+ ...tracker.current()
1558
+ });
1559
+ subexit();
1560
+ state.stack = stack;
1561
+ exit();
1562
+ if (type === "full" || !text || text !== reference) value += tracker.move(reference + "]");
1563
+ else if (type === "shortcut") value = value.slice(0, -1);
1564
+ else value += tracker.move("]");
1565
+ return value;
1566
+ }
1567
+ /**
1568
+ * @returns {string}
1569
+ */
1570
+ function linkReferencePeek() {
1571
+ return "[";
1572
+ }
1573
+ //#endregion
1574
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js
1575
+ /**
1576
+ * @import {Options, State} from 'mdast-util-to-markdown'
1577
+ */
1578
+ /**
1579
+ * @param {State} state
1580
+ * @returns {Exclude<Options['bullet'], null | undefined>}
1581
+ */
1582
+ function checkBullet(state) {
1583
+ const marker = state.options.bullet || "*";
1584
+ if (marker !== "*" && marker !== "+" && marker !== "-") throw new Error("Cannot serialize items with `" + marker + "` for `options.bullet`, expected `*`, `+`, or `-`");
1585
+ return marker;
1586
+ }
1587
+ //#endregion
1588
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js
1589
+ /**
1590
+ * @import {Options, State} from 'mdast-util-to-markdown'
1591
+ */
1592
+ /**
1593
+ * @param {State} state
1594
+ * @returns {Exclude<Options['bullet'], null | undefined>}
1595
+ */
1596
+ function checkBulletOther(state) {
1597
+ const bullet = checkBullet(state);
1598
+ const bulletOther = state.options.bulletOther;
1599
+ if (!bulletOther) return bullet === "*" ? "-" : "*";
1600
+ if (bulletOther !== "*" && bulletOther !== "+" && bulletOther !== "-") throw new Error("Cannot serialize items with `" + bulletOther + "` for `options.bulletOther`, expected `*`, `+`, or `-`");
1601
+ if (bulletOther === bullet) throw new Error("Expected `bullet` (`" + bullet + "`) and `bulletOther` (`" + bulletOther + "`) to be different");
1602
+ return bulletOther;
1603
+ }
1604
+ //#endregion
1605
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js
1606
+ /**
1607
+ * @import {Options, State} from 'mdast-util-to-markdown'
1608
+ */
1609
+ /**
1610
+ * @param {State} state
1611
+ * @returns {Exclude<Options['bulletOrdered'], null | undefined>}
1612
+ */
1613
+ function checkBulletOrdered(state) {
1614
+ const marker = state.options.bulletOrdered || ".";
1615
+ if (marker !== "." && marker !== ")") throw new Error("Cannot serialize items with `" + marker + "` for `options.bulletOrdered`, expected `.` or `)`");
1616
+ return marker;
1617
+ }
1618
+ //#endregion
1619
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.js
1620
+ /**
1621
+ * @import {Options, State} from 'mdast-util-to-markdown'
1622
+ */
1623
+ /**
1624
+ * @param {State} state
1625
+ * @returns {Exclude<Options['rule'], null | undefined>}
1626
+ */
1627
+ function checkRule(state) {
1628
+ const marker = state.options.rule || "*";
1629
+ if (marker !== "*" && marker !== "-" && marker !== "_") throw new Error("Cannot serialize rules with `" + marker + "` for `options.rule`, expected `*`, `-`, or `_`");
1630
+ return marker;
1631
+ }
1632
+ //#endregion
1633
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.js
1634
+ /**
1635
+ * @import {Info, State} from 'mdast-util-to-markdown'
1636
+ * @import {List, Parents} from 'mdast'
1637
+ */
1638
+ /**
1639
+ * @param {List} node
1640
+ * @param {Parents | undefined} parent
1641
+ * @param {State} state
1642
+ * @param {Info} info
1643
+ * @returns {string}
1644
+ */
1645
+ function list(node, parent, state, info) {
1646
+ const exit = state.enter("list");
1647
+ const bulletCurrent = state.bulletCurrent;
1648
+ /** @type {string} */
1649
+ let bullet = node.ordered ? checkBulletOrdered(state) : checkBullet(state);
1650
+ /** @type {string} */
1651
+ const bulletOther = node.ordered ? bullet === "." ? ")" : "." : checkBulletOther(state);
1652
+ let useDifferentMarker = parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false;
1653
+ if (!node.ordered) {
1654
+ const firstListItem = node.children ? node.children[0] : void 0;
1655
+ if ((bullet === "*" || bullet === "-") && firstListItem && (!firstListItem.children || !firstListItem.children[0]) && state.stack[state.stack.length - 1] === "list" && state.stack[state.stack.length - 2] === "listItem" && state.stack[state.stack.length - 3] === "list" && state.stack[state.stack.length - 4] === "listItem" && state.indexStack[state.indexStack.length - 1] === 0 && state.indexStack[state.indexStack.length - 2] === 0 && state.indexStack[state.indexStack.length - 3] === 0) useDifferentMarker = true;
1656
+ if (checkRule(state) === bullet && firstListItem) {
1657
+ let index = -1;
1658
+ while (++index < node.children.length) {
1659
+ const item = node.children[index];
1660
+ if (item && item.type === "listItem" && item.children && item.children[0] && item.children[0].type === "thematicBreak") {
1661
+ useDifferentMarker = true;
1662
+ break;
1663
+ }
1664
+ }
1665
+ }
1666
+ }
1667
+ if (useDifferentMarker) bullet = bulletOther;
1668
+ state.bulletCurrent = bullet;
1669
+ const value = state.containerFlow(node, info);
1670
+ state.bulletLastUsed = bullet;
1671
+ state.bulletCurrent = bulletCurrent;
1672
+ exit();
1673
+ return value;
1674
+ }
1675
+ //#endregion
1676
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js
1677
+ /**
1678
+ * @import {Options, State} from 'mdast-util-to-markdown'
1679
+ */
1680
+ /**
1681
+ * @param {State} state
1682
+ * @returns {Exclude<Options['listItemIndent'], null | undefined>}
1683
+ */
1684
+ function checkListItemIndent(state) {
1685
+ const style = state.options.listItemIndent || "one";
1686
+ if (style !== "tab" && style !== "one" && style !== "mixed") throw new Error("Cannot serialize items with `" + style + "` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");
1687
+ return style;
1688
+ }
1689
+ //#endregion
1690
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.js
1691
+ /**
1692
+ * @import {Info, Map, State} from 'mdast-util-to-markdown'
1693
+ * @import {ListItem, Parents} from 'mdast'
1694
+ */
1695
+ /**
1696
+ * @param {ListItem} node
1697
+ * @param {Parents | undefined} parent
1698
+ * @param {State} state
1699
+ * @param {Info} info
1700
+ * @returns {string}
1701
+ */
1702
+ function listItem(node, parent, state, info) {
1703
+ const listItemIndent = checkListItemIndent(state);
1704
+ let bullet = state.bulletCurrent || checkBullet(state);
1705
+ if (parent && parent.type === "list" && parent.ordered) bullet = (typeof parent.start === "number" && parent.start > -1 ? parent.start : 1) + (state.options.incrementListMarker === false ? 0 : parent.children.indexOf(node)) + bullet;
1706
+ let size = bullet.length + 1;
1707
+ if (listItemIndent === "tab" || listItemIndent === "mixed" && (parent && parent.type === "list" && parent.spread || node.spread)) size = Math.ceil(size / 4) * 4;
1708
+ const tracker = state.createTracker(info);
1709
+ tracker.move(bullet + " ".repeat(size - bullet.length));
1710
+ tracker.shift(size);
1711
+ const exit = state.enter("listItem");
1712
+ const value = state.indentLines(state.containerFlow(node, tracker.current()), map);
1713
+ exit();
1714
+ return value;
1715
+ /** @type {Map} */
1716
+ function map(line, index, blank) {
1717
+ if (index) return (blank ? "" : " ".repeat(size)) + line;
1718
+ return (blank ? bullet : bullet + " ".repeat(size - bullet.length)) + line;
1719
+ }
1720
+ }
1721
+ //#endregion
1722
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js
1723
+ /**
1724
+ * @import {Info, State} from 'mdast-util-to-markdown'
1725
+ * @import {Paragraph, Parents} from 'mdast'
1726
+ */
1727
+ /**
1728
+ * @param {Paragraph} node
1729
+ * @param {Parents | undefined} _
1730
+ * @param {State} state
1731
+ * @param {Info} info
1732
+ * @returns {string}
1733
+ */
1734
+ function paragraph(node, _, state, info) {
1735
+ const exit = state.enter("paragraph");
1736
+ const subexit = state.enter("phrasing");
1737
+ const value = state.containerPhrasing(node, info);
1738
+ subexit();
1739
+ exit();
1740
+ return value;
1741
+ }
1742
+ //#endregion
1743
+ //#region node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.js
1744
+ /**
1745
+ * @typedef {import('mdast').Html} Html
1746
+ * @typedef {import('mdast').PhrasingContent} PhrasingContent
1747
+ */
1748
+ /**
1749
+ * Check if the given value is *phrasing content*.
1750
+ *
1751
+ * > 👉 **Note**: Excludes `html`, which can be both phrasing or flow.
1752
+ *
1753
+ * @param node
1754
+ * Thing to check, typically `Node`.
1755
+ * @returns
1756
+ * Whether `value` is phrasing content.
1757
+ */
1758
+ var phrasing = convert([
1759
+ "break",
1760
+ "delete",
1761
+ "emphasis",
1762
+ "footnote",
1763
+ "footnoteReference",
1764
+ "image",
1765
+ "imageReference",
1766
+ "inlineCode",
1767
+ "inlineMath",
1768
+ "link",
1769
+ "linkReference",
1770
+ "mdxJsxTextElement",
1771
+ "mdxTextExpression",
1772
+ "strong",
1773
+ "text",
1774
+ "textDirective"
1775
+ ]);
1776
+ //#endregion
1777
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.js
1778
+ /**
1779
+ * @import {Info, State} from 'mdast-util-to-markdown'
1780
+ * @import {Parents, Root} from 'mdast'
1781
+ */
1782
+ /**
1783
+ * @param {Root} node
1784
+ * @param {Parents | undefined} _
1785
+ * @param {State} state
1786
+ * @param {Info} info
1787
+ * @returns {string}
1788
+ */
1789
+ function root(node, _, state, info) {
1790
+ return (node.children.some(function(d) {
1791
+ return phrasing(d);
1792
+ }) ? state.containerPhrasing : state.containerFlow).call(state, node, info);
1793
+ }
1794
+ //#endregion
1795
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.js
1796
+ /**
1797
+ * @import {Options, State} from 'mdast-util-to-markdown'
1798
+ */
1799
+ /**
1800
+ * @param {State} state
1801
+ * @returns {Exclude<Options['strong'], null | undefined>}
1802
+ */
1803
+ function checkStrong(state) {
1804
+ const marker = state.options.strong || "*";
1805
+ if (marker !== "*" && marker !== "_") throw new Error("Cannot serialize strong with `" + marker + "` for `options.strong`, expected `*`, or `_`");
1806
+ return marker;
1807
+ }
1808
+ //#endregion
1809
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.js
1810
+ /**
1811
+ * @import {Info, State} from 'mdast-util-to-markdown'
1812
+ * @import {Parents, Strong} from 'mdast'
1813
+ */
1814
+ strong.peek = strongPeek;
1815
+ /**
1816
+ * @param {Strong} node
1817
+ * @param {Parents | undefined} _
1818
+ * @param {State} state
1819
+ * @param {Info} info
1820
+ * @returns {string}
1821
+ */
1822
+ function strong(node, _, state, info) {
1823
+ const marker = checkStrong(state);
1824
+ const exit = state.enter("strong");
1825
+ const tracker = state.createTracker(info);
1826
+ const before = tracker.move(marker + marker);
1827
+ let between = tracker.move(state.containerPhrasing(node, {
1828
+ after: marker,
1829
+ before,
1830
+ ...tracker.current()
1831
+ }));
1832
+ const betweenHead = between.charCodeAt(0);
1833
+ const open = encodeInfo(info.before.charCodeAt(info.before.length - 1), betweenHead, marker);
1834
+ if (open.inside) between = encodeCharacterReference(betweenHead) + between.slice(1);
1835
+ const betweenTail = between.charCodeAt(between.length - 1);
1836
+ const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker);
1837
+ if (close.inside) between = between.slice(0, -1) + encodeCharacterReference(betweenTail);
1838
+ const after = tracker.move(marker + marker);
1839
+ exit();
1840
+ state.attentionEncodeSurroundingInfo = {
1841
+ after: close.outside,
1842
+ before: open.outside
1843
+ };
1844
+ return before + between + after;
1845
+ }
1846
+ /**
1847
+ * @param {Strong} _
1848
+ * @param {Parents | undefined} _1
1849
+ * @param {State} state
1850
+ * @returns {string}
1851
+ */
1852
+ function strongPeek(_, _1, state) {
1853
+ return state.options.strong || "*";
1854
+ }
1855
+ //#endregion
1856
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.js
1857
+ /**
1858
+ * @import {Info, State} from 'mdast-util-to-markdown'
1859
+ * @import {Parents, Text} from 'mdast'
1860
+ */
1861
+ /**
1862
+ * @param {Text} node
1863
+ * @param {Parents | undefined} _
1864
+ * @param {State} state
1865
+ * @param {Info} info
1866
+ * @returns {string}
1867
+ */
1868
+ function text(node, _, state, info) {
1869
+ return state.safe(node.value, info);
1870
+ }
1871
+ //#endregion
1872
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js
1873
+ /**
1874
+ * @import {Options, State} from 'mdast-util-to-markdown'
1875
+ */
1876
+ /**
1877
+ * @param {State} state
1878
+ * @returns {Exclude<Options['ruleRepetition'], null | undefined>}
1879
+ */
1880
+ function checkRuleRepetition(state) {
1881
+ const repetition = state.options.ruleRepetition || 3;
1882
+ if (repetition < 3) throw new Error("Cannot serialize rules with repetition `" + repetition + "` for `options.ruleRepetition`, expected `3` or more");
1883
+ return repetition;
1884
+ }
1885
+ //#endregion
1886
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js
1887
+ /**
1888
+ * @import {State} from 'mdast-util-to-markdown'
1889
+ * @import {Parents, ThematicBreak} from 'mdast'
1890
+ */
1891
+ /**
1892
+ * @param {ThematicBreak} _
1893
+ * @param {Parents | undefined} _1
1894
+ * @param {State} state
1895
+ * @returns {string}
1896
+ */
1897
+ function thematicBreak(_, _1, state) {
1898
+ const value = (checkRule(state) + (state.options.ruleSpaces ? " " : "")).repeat(checkRuleRepetition(state));
1899
+ return state.options.ruleSpaces ? value.slice(0, -1) : value;
1900
+ }
1901
+ //#endregion
1902
+ //#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.js
1903
+ /**
1904
+ * Default (CommonMark) handlers.
1905
+ */
1906
+ var handle = {
1907
+ blockquote,
1908
+ break: hardBreak,
1909
+ code,
1910
+ definition,
1911
+ emphasis,
1912
+ hardBreak,
1913
+ heading,
1914
+ html,
1915
+ image,
1916
+ imageReference,
1917
+ inlineCode,
1918
+ link,
1919
+ linkReference,
1920
+ list,
1921
+ listItem,
1922
+ paragraph,
1923
+ root,
1924
+ strong,
1925
+ text,
1926
+ thematicBreak
1927
+ };
1928
+ //#endregion
1929
+ //#region node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js
1930
+ /**
1931
+ * @typedef {import('mdast').InlineCode} InlineCode
1932
+ * @typedef {import('mdast').Table} Table
1933
+ * @typedef {import('mdast').TableCell} TableCell
1934
+ * @typedef {import('mdast').TableRow} TableRow
1935
+ *
1936
+ * @typedef {import('markdown-table').Options} MarkdownTableOptions
1937
+ *
1938
+ * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
1939
+ * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
1940
+ * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
1941
+ *
1942
+ * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
1943
+ * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
1944
+ * @typedef {import('mdast-util-to-markdown').State} State
1945
+ * @typedef {import('mdast-util-to-markdown').Info} Info
1946
+ */
1947
+ /**
1948
+ * @typedef Options
1949
+ * Configuration.
1950
+ * @property {boolean | null | undefined} [tableCellPadding=true]
1951
+ * Whether to add a space of padding between delimiters and cells (default:
1952
+ * `true`).
1953
+ * @property {boolean | null | undefined} [tablePipeAlign=true]
1954
+ * Whether to align the delimiters (default: `true`).
1955
+ * @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]
1956
+ * Function to detect the length of table cell content, used when aligning
1957
+ * the delimiters between cells (optional).
1958
+ */
1959
+ /**
1960
+ * Create an extension for `mdast-util-from-markdown` to enable GFM tables in
1961
+ * markdown.
1962
+ *
1963
+ * @returns {FromMarkdownExtension}
1964
+ * Extension for `mdast-util-from-markdown` to enable GFM tables.
1965
+ */
1966
+ function gfmTableFromMarkdown() {
1967
+ return {
1968
+ enter: {
1969
+ table: enterTable,
1970
+ tableData: enterCell,
1971
+ tableHeader: enterCell,
1972
+ tableRow: enterRow
1973
+ },
1974
+ exit: {
1975
+ codeText: exitCodeText,
1976
+ table: exitTable,
1977
+ tableData: exit,
1978
+ tableHeader: exit,
1979
+ tableRow: exit
1980
+ }
1981
+ };
1982
+ }
1983
+ /**
1984
+ * @this {CompileContext}
1985
+ * @type {FromMarkdownHandle}
1986
+ */
1987
+ function enterTable(token) {
1988
+ const align = token._align;
1989
+ this.enter({
1990
+ type: "table",
1991
+ align: align.map(function(d) {
1992
+ return d === "none" ? null : d;
1993
+ }),
1994
+ children: []
1995
+ }, token);
1996
+ this.data.inTable = true;
1997
+ }
1998
+ /**
1999
+ * @this {CompileContext}
2000
+ * @type {FromMarkdownHandle}
2001
+ */
2002
+ function exitTable(token) {
2003
+ this.exit(token);
2004
+ this.data.inTable = void 0;
2005
+ }
2006
+ /**
2007
+ * @this {CompileContext}
2008
+ * @type {FromMarkdownHandle}
2009
+ */
2010
+ function enterRow(token) {
2011
+ this.enter({
2012
+ type: "tableRow",
2013
+ children: []
2014
+ }, token);
2015
+ }
2016
+ /**
2017
+ * @this {CompileContext}
2018
+ * @type {FromMarkdownHandle}
2019
+ */
2020
+ function exit(token) {
2021
+ this.exit(token);
2022
+ }
2023
+ /**
2024
+ * @this {CompileContext}
2025
+ * @type {FromMarkdownHandle}
2026
+ */
2027
+ function enterCell(token) {
2028
+ this.enter({
2029
+ type: "tableCell",
2030
+ children: []
2031
+ }, token);
2032
+ }
2033
+ /**
2034
+ * @this {CompileContext}
2035
+ * @type {FromMarkdownHandle}
2036
+ */
2037
+ function exitCodeText(token) {
2038
+ let value = this.resume();
2039
+ if (this.data.inTable) value = value.replace(/\\([\\|])/g, replace);
2040
+ const node = this.stack[this.stack.length - 1];
2041
+ node.type;
2042
+ node.value = value;
2043
+ this.exit(token);
2044
+ }
2045
+ /**
2046
+ * @param {string} $0
2047
+ * @param {string} $1
2048
+ * @returns {string}
2049
+ */
2050
+ function replace($0, $1) {
2051
+ return $1 === "|" ? $1 : $0;
2052
+ }
2053
+ /**
2054
+ * Create an extension for `mdast-util-to-markdown` to enable GFM tables in
2055
+ * markdown.
2056
+ *
2057
+ * @param {Options | null | undefined} [options]
2058
+ * Configuration.
2059
+ * @returns {ToMarkdownExtension}
2060
+ * Extension for `mdast-util-to-markdown` to enable GFM tables.
2061
+ */
2062
+ function gfmTableToMarkdown(options) {
2063
+ const settings = options || {};
2064
+ const padding = settings.tableCellPadding;
2065
+ const alignDelimiters = settings.tablePipeAlign;
2066
+ const stringLength = settings.stringLength;
2067
+ const around = padding ? " " : "|";
2068
+ return {
2069
+ unsafe: [
2070
+ {
2071
+ character: "\r",
2072
+ inConstruct: "tableCell"
2073
+ },
2074
+ {
2075
+ character: "\n",
2076
+ inConstruct: "tableCell"
2077
+ },
2078
+ {
2079
+ atBreak: true,
2080
+ character: "|",
2081
+ after: "[ :-]"
2082
+ },
2083
+ {
2084
+ character: "|",
2085
+ inConstruct: "tableCell"
2086
+ },
2087
+ {
2088
+ atBreak: true,
2089
+ character: ":",
2090
+ after: "-"
2091
+ },
2092
+ {
2093
+ atBreak: true,
2094
+ character: "-",
2095
+ after: "[:|-]"
2096
+ }
2097
+ ],
2098
+ handlers: {
2099
+ inlineCode: inlineCodeWithTable,
2100
+ table: handleTable,
2101
+ tableCell: handleTableCell,
2102
+ tableRow: handleTableRow
2103
+ }
2104
+ };
2105
+ /**
2106
+ * @type {ToMarkdownHandle}
2107
+ * @param {Table} node
2108
+ */
2109
+ function handleTable(node, _, state, info) {
2110
+ return serializeData(handleTableAsData(node, state, info), node.align);
2111
+ }
2112
+ /**
2113
+ * This function isn’t really used normally, because we handle rows at the
2114
+ * table level.
2115
+ * But, if someone passes in a table row, this ensures we make somewhat sense.
2116
+ *
2117
+ * @type {ToMarkdownHandle}
2118
+ * @param {TableRow} node
2119
+ */
2120
+ function handleTableRow(node, _, state, info) {
2121
+ const value = serializeData([handleTableRowAsData(node, state, info)]);
2122
+ return value.slice(0, value.indexOf("\n"));
2123
+ }
2124
+ /**
2125
+ * @type {ToMarkdownHandle}
2126
+ * @param {TableCell} node
2127
+ */
2128
+ function handleTableCell(node, _, state, info) {
2129
+ const exit = state.enter("tableCell");
2130
+ const subexit = state.enter("phrasing");
2131
+ const value = state.containerPhrasing(node, {
2132
+ ...info,
2133
+ before: around,
2134
+ after: around
2135
+ });
2136
+ subexit();
2137
+ exit();
2138
+ return value;
2139
+ }
2140
+ /**
2141
+ * @param {Array<Array<string>>} matrix
2142
+ * @param {Array<string | null | undefined> | null | undefined} [align]
2143
+ */
2144
+ function serializeData(matrix, align) {
2145
+ return markdownTable(matrix, {
2146
+ align,
2147
+ alignDelimiters,
2148
+ padding,
2149
+ stringLength
2150
+ });
2151
+ }
2152
+ /**
2153
+ * @param {Table} node
2154
+ * @param {State} state
2155
+ * @param {Info} info
2156
+ */
2157
+ function handleTableAsData(node, state, info) {
2158
+ const children = node.children;
2159
+ let index = -1;
2160
+ /** @type {Array<Array<string>>} */
2161
+ const result = [];
2162
+ const subexit = state.enter("table");
2163
+ while (++index < children.length) result[index] = handleTableRowAsData(children[index], state, info);
2164
+ subexit();
2165
+ return result;
2166
+ }
2167
+ /**
2168
+ * @param {TableRow} node
2169
+ * @param {State} state
2170
+ * @param {Info} info
2171
+ */
2172
+ function handleTableRowAsData(node, state, info) {
2173
+ const children = node.children;
2174
+ let index = -1;
2175
+ /** @type {Array<string>} */
2176
+ const result = [];
2177
+ const subexit = state.enter("tableRow");
2178
+ while (++index < children.length) result[index] = handleTableCell(children[index], node, state, info);
2179
+ subexit();
2180
+ return result;
2181
+ }
2182
+ /**
2183
+ * @type {ToMarkdownHandle}
2184
+ * @param {InlineCode} node
2185
+ */
2186
+ function inlineCodeWithTable(node, parent, state) {
2187
+ let value = handle.inlineCode(node, parent, state);
2188
+ if (state.stack.includes("tableCell")) value = value.replace(/\|/g, "\\$&");
2189
+ return value;
2190
+ }
2191
+ }
2192
+ //#endregion
2193
+ //#region node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js
2194
+ /**
2195
+ * @typedef {import('mdast').ListItem} ListItem
2196
+ * @typedef {import('mdast').Paragraph} Paragraph
2197
+ * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
2198
+ * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
2199
+ * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
2200
+ * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
2201
+ * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
2202
+ */
2203
+ /**
2204
+ * Create an extension for `mdast-util-from-markdown` to enable GFM task
2205
+ * list items in markdown.
2206
+ *
2207
+ * @returns {FromMarkdownExtension}
2208
+ * Extension for `mdast-util-from-markdown` to enable GFM task list items.
2209
+ */
2210
+ function gfmTaskListItemFromMarkdown() {
2211
+ return { exit: {
2212
+ taskListCheckValueChecked: exitCheck,
2213
+ taskListCheckValueUnchecked: exitCheck,
2214
+ paragraph: exitParagraphWithTaskListItem
2215
+ } };
2216
+ }
2217
+ /**
2218
+ * Create an extension for `mdast-util-to-markdown` to enable GFM task list
2219
+ * items in markdown.
2220
+ *
2221
+ * @returns {ToMarkdownExtension}
2222
+ * Extension for `mdast-util-to-markdown` to enable GFM task list items.
2223
+ */
2224
+ function gfmTaskListItemToMarkdown() {
2225
+ return {
2226
+ unsafe: [{
2227
+ atBreak: true,
2228
+ character: "-",
2229
+ after: "[:|-]"
2230
+ }],
2231
+ handlers: { listItem: listItemWithTaskListItem }
2232
+ };
2233
+ }
2234
+ /**
2235
+ * @this {CompileContext}
2236
+ * @type {FromMarkdownHandle}
2237
+ */
2238
+ function exitCheck(token) {
2239
+ const node = this.stack[this.stack.length - 2];
2240
+ node.type;
2241
+ node.checked = token.type === "taskListCheckValueChecked";
2242
+ }
2243
+ /**
2244
+ * @this {CompileContext}
2245
+ * @type {FromMarkdownHandle}
2246
+ */
2247
+ function exitParagraphWithTaskListItem(token) {
2248
+ const parent = this.stack[this.stack.length - 2];
2249
+ if (parent && parent.type === "listItem" && typeof parent.checked === "boolean") {
2250
+ const node = this.stack[this.stack.length - 1];
2251
+ node.type;
2252
+ const head = node.children[0];
2253
+ if (head && head.type === "text") {
2254
+ const siblings = parent.children;
2255
+ let index = -1;
2256
+ /** @type {Paragraph | undefined} */
2257
+ let firstParaghraph;
2258
+ while (++index < siblings.length) {
2259
+ const sibling = siblings[index];
2260
+ if (sibling.type === "paragraph") {
2261
+ firstParaghraph = sibling;
2262
+ break;
2263
+ }
2264
+ }
2265
+ if (firstParaghraph === node) {
2266
+ head.value = head.value.slice(1);
2267
+ if (head.value.length === 0) node.children.shift();
2268
+ else if (node.position && head.position && typeof head.position.start.offset === "number") {
2269
+ head.position.start.column++;
2270
+ head.position.start.offset++;
2271
+ node.position.start = Object.assign({}, head.position.start);
2272
+ }
2273
+ }
2274
+ }
2275
+ }
2276
+ this.exit(token);
2277
+ }
2278
+ /**
2279
+ * @type {ToMarkdownHandle}
2280
+ * @param {ListItem} node
2281
+ */
2282
+ function listItemWithTaskListItem(node, parent, state, info) {
2283
+ const head = node.children[0];
2284
+ const checkable = typeof node.checked === "boolean" && head && head.type === "paragraph";
2285
+ const checkbox = "[" + (node.checked ? "x" : " ") + "] ";
2286
+ const tracker = state.createTracker(info);
2287
+ if (checkable) tracker.move(checkbox);
2288
+ let value = handle.listItem(node, parent, state, {
2289
+ ...info,
2290
+ ...tracker.current()
2291
+ });
2292
+ if (checkable) value = value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, check);
2293
+ return value;
2294
+ /**
2295
+ * @param {string} $0
2296
+ * @returns {string}
2297
+ */
2298
+ function check($0) {
2299
+ return $0 + checkbox;
2300
+ }
2301
+ }
2302
+ //#endregion
2303
+ //#region node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js
2304
+ /**
2305
+ * @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'
2306
+ * @import {Options} from 'mdast-util-gfm'
2307
+ * @import {Options as ToMarkdownExtension} from 'mdast-util-to-markdown'
2308
+ */
2309
+ /**
2310
+ * Create an extension for `mdast-util-from-markdown` to enable GFM (autolink
2311
+ * literals, footnotes, strikethrough, tables, tasklists).
2312
+ *
2313
+ * @returns {Array<FromMarkdownExtension>}
2314
+ * Extension for `mdast-util-from-markdown` to enable GFM (autolink literals,
2315
+ * footnotes, strikethrough, tables, tasklists).
2316
+ */
2317
+ function gfmFromMarkdown() {
2318
+ return [
2319
+ gfmAutolinkLiteralFromMarkdown(),
2320
+ gfmFootnoteFromMarkdown(),
2321
+ gfmStrikethroughFromMarkdown(),
2322
+ gfmTableFromMarkdown(),
2323
+ gfmTaskListItemFromMarkdown()
2324
+ ];
2325
+ }
2326
+ /**
2327
+ * Create an extension for `mdast-util-to-markdown` to enable GFM (autolink
2328
+ * literals, footnotes, strikethrough, tables, tasklists).
2329
+ *
2330
+ * @param {Options | null | undefined} [options]
2331
+ * Configuration (optional).
2332
+ * @returns {ToMarkdownExtension}
2333
+ * Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,
2334
+ * footnotes, strikethrough, tables, tasklists).
2335
+ */
2336
+ function gfmToMarkdown(options) {
2337
+ return { extensions: [
2338
+ gfmAutolinkLiteralToMarkdown(),
2339
+ gfmFootnoteToMarkdown(options),
2340
+ gfmStrikethroughToMarkdown(),
2341
+ gfmTableToMarkdown(options),
2342
+ gfmTaskListItemToMarkdown()
2343
+ ] };
2344
+ }
2345
+ //#endregion
2346
+ export { gfmToMarkdown as n, visit as r, gfmFromMarkdown as t };