@akairos/pipeline 0.18.1 → 0.19.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 (217) hide show
  1. package/ARTICLE-THEMES.md +2 -0
  2. package/README.md +27 -4
  3. package/package.json +7 -5
  4. package/src/adapter-loader.ts +24 -4
  5. package/src/adapter-types.ts +14 -0
  6. package/src/article-theme.test.ts +55 -0
  7. package/src/article-theme.ts +10 -2
  8. package/src/commands/article-theme.ts +1 -1
  9. package/src/commands/init.ts +2 -0
  10. package/src/commands/publish.ts +1 -1
  11. package/src/commands/typeset-assets-sync.test.ts +12 -1
  12. package/src/commands/wechat-export.ts +9 -4
  13. package/src/plugin-runner.ts +10 -4
  14. package/src/plugin-runtime.test.ts +19 -0
  15. package/src/plugin-runtime.ts +11 -2
  16. package/src/providers/index.ts +4 -2
  17. package/src/runtime-package.ts +13 -6
  18. package/src/wechat-preview/assets/browser-dist/.vite/manifest.json +1280 -5
  19. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  20. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  21. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  22. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  23. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  24. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  25. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  26. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  27. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  28. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  29. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  30. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  31. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  32. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  33. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  34. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  35. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  36. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  37. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  38. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  39. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  40. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  41. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  42. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  43. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  44. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  45. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  46. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  47. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  48. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  49. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  50. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  51. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  52. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  53. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  54. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  55. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  56. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  57. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  58. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  59. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  60. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  61. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  62. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  63. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  64. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  65. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  66. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  67. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  68. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  69. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  70. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  71. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  72. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  73. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  74. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  75. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  76. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  77. package/src/wechat-preview/assets/browser-dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  78. package/src/wechat-preview/assets/browser-dist/assets/apl-B4CMkyY2.js +1 -0
  79. package/src/wechat-preview/assets/browser-dist/assets/asciiarmor-Df11BRmG.js +1 -0
  80. package/src/wechat-preview/assets/browser-dist/assets/asn1-EdZsLKOL.js +1 -0
  81. package/src/wechat-preview/assets/browser-dist/assets/asterisk-B-8jnY81.js +1 -0
  82. package/src/wechat-preview/assets/browser-dist/assets/brainfuck-C4LP7Hcl.js +1 -0
  83. package/src/wechat-preview/assets/browser-dist/assets/clike-B9uivgTg.js +1 -0
  84. package/src/wechat-preview/assets/browser-dist/assets/clojure-BMjYHr_A.js +1 -0
  85. package/src/wechat-preview/assets/browser-dist/assets/cmake-BQqOBYOt.js +1 -0
  86. package/src/wechat-preview/assets/browser-dist/assets/cobol-CWcv1MsR.js +1 -0
  87. package/src/wechat-preview/assets/browser-dist/assets/coffeescript-S37ZYGWr.js +1 -0
  88. package/src/wechat-preview/assets/browser-dist/assets/commonlisp-DBKNyK5s.js +1 -0
  89. package/src/wechat-preview/assets/browser-dist/assets/crystal-SjHAIU92.js +1 -0
  90. package/src/wechat-preview/assets/browser-dist/assets/css-BnMrqG3P.js +1 -0
  91. package/src/wechat-preview/assets/browser-dist/assets/cypher-C_CwsFkJ.js +1 -0
  92. package/src/wechat-preview/assets/browser-dist/assets/d-pRatUO7H.js +1 -0
  93. package/src/wechat-preview/assets/browser-dist/assets/diff-DbItnlRl.js +1 -0
  94. package/src/wechat-preview/assets/browser-dist/assets/dockerfile-BKs6k2Af.js +1 -0
  95. package/src/wechat-preview/assets/browser-dist/assets/dtd-DF_7sFjM.js +1 -0
  96. package/src/wechat-preview/assets/browser-dist/assets/dylan-DwRh75JA.js +1 -0
  97. package/src/wechat-preview/assets/browser-dist/assets/ebnf-CDyGwa7X.js +1 -0
  98. package/src/wechat-preview/assets/browser-dist/assets/ecl-Cabwm37j.js +1 -0
  99. package/src/wechat-preview/assets/browser-dist/assets/eiffel-CnydiIhH.js +1 -0
  100. package/src/wechat-preview/assets/browser-dist/assets/elm-vLlmbW-K.js +1 -0
  101. package/src/wechat-preview/assets/browser-dist/assets/erlang-BNw1qcRV.js +1 -0
  102. package/src/wechat-preview/assets/browser-dist/assets/factor-kuTfRLto.js +1 -0
  103. package/src/wechat-preview/assets/browser-dist/assets/fcl-Kvtd6kyn.js +1 -0
  104. package/src/wechat-preview/assets/browser-dist/assets/forth-Ffai-XNe.js +1 -0
  105. package/src/wechat-preview/assets/browser-dist/assets/fortran-DYz_wnZ1.js +1 -0
  106. package/src/wechat-preview/assets/browser-dist/assets/gas-Bneqetm1.js +1 -0
  107. package/src/wechat-preview/assets/browser-dist/assets/gherkin-heZmZLOM.js +1 -0
  108. package/src/wechat-preview/assets/browser-dist/assets/groovy-D9Dt4D0W.js +1 -0
  109. package/src/wechat-preview/assets/browser-dist/assets/haskell-Cw1EW3IL.js +1 -0
  110. package/src/wechat-preview/assets/browser-dist/assets/haxe-H-WmDvRZ.js +1 -0
  111. package/src/wechat-preview/assets/browser-dist/assets/http-DBlCnlav.js +1 -0
  112. package/src/wechat-preview/assets/browser-dist/assets/idl-BEugSyMb.js +1 -0
  113. package/src/wechat-preview/assets/browser-dist/assets/index-B13lCSuc.js +1 -0
  114. package/src/wechat-preview/assets/browser-dist/assets/index-BDdU9pNh.js +1 -0
  115. package/src/wechat-preview/assets/browser-dist/assets/index-BFLGVgsp.js +1 -0
  116. package/src/wechat-preview/assets/browser-dist/assets/index-BHJY0B4E.js +8 -0
  117. package/src/wechat-preview/assets/browser-dist/assets/index-BOnKEJxh.js +7 -0
  118. package/src/wechat-preview/assets/browser-dist/assets/index-BPmBcGI-.js +1 -0
  119. package/src/wechat-preview/assets/browser-dist/assets/index-BTVIa90Y.js +1 -0
  120. package/src/wechat-preview/assets/browser-dist/assets/index-BYV6TA8f.js +1 -0
  121. package/src/wechat-preview/assets/browser-dist/assets/index-BlVpb0dF.js +1 -0
  122. package/src/wechat-preview/assets/browser-dist/assets/index-BqKARoyW.js +1 -0
  123. package/src/wechat-preview/assets/browser-dist/assets/index-BzHql5Rp.js +20 -0
  124. package/src/wechat-preview/assets/browser-dist/assets/index-CPFEJ9fX.js +1 -0
  125. package/src/wechat-preview/assets/browser-dist/assets/index-CdxKyTX6.js +1 -0
  126. package/src/wechat-preview/assets/browser-dist/assets/index-CyXDvcwY.js +1 -0
  127. package/src/wechat-preview/assets/browser-dist/assets/index-DA7Z4paG.js +13 -0
  128. package/src/wechat-preview/assets/browser-dist/assets/index-DDQGWU_D.js +3 -0
  129. package/src/wechat-preview/assets/browser-dist/assets/index-DENMoE5l.js +1 -0
  130. package/src/wechat-preview/assets/browser-dist/assets/index-D_EI5vFS.js +1 -0
  131. package/src/wechat-preview/assets/browser-dist/assets/index-DpuVrwze.js +1 -0
  132. package/src/wechat-preview/assets/browser-dist/assets/index-IBlhKHQr.js +8 -0
  133. package/src/wechat-preview/assets/browser-dist/assets/index-ifI5svkD.js +2 -0
  134. package/src/wechat-preview/assets/browser-dist/assets/index-vRiJxvj2.js +1 -0
  135. package/src/wechat-preview/assets/browser-dist/assets/javascript-iXu5QeM3.js +1 -0
  136. package/src/wechat-preview/assets/browser-dist/assets/julia-DuME0IfC.js +1 -0
  137. package/src/wechat-preview/assets/browser-dist/assets/livescript-BwQOo05w.js +1 -0
  138. package/src/wechat-preview/assets/browser-dist/assets/lua-VAEuO923.js +1 -0
  139. package/src/wechat-preview/assets/browser-dist/assets/mathematica-DTrFuWx2.js +1 -0
  140. package/src/wechat-preview/assets/browser-dist/assets/mbox-CNhZ1qSd.js +1 -0
  141. package/src/wechat-preview/assets/browser-dist/assets/mirc-CjQqDB4T.js +1 -0
  142. package/src/wechat-preview/assets/browser-dist/assets/mllike-CXdrOF99.js +1 -0
  143. package/src/wechat-preview/assets/browser-dist/assets/modelica-Dc1JOy9r.js +1 -0
  144. package/src/wechat-preview/assets/browser-dist/assets/mscgen-BA5vi2Kp.js +1 -0
  145. package/src/wechat-preview/assets/browser-dist/assets/mumps-BT43cFF4.js +1 -0
  146. package/src/wechat-preview/assets/browser-dist/assets/nginx-DdIZxoE0.js +1 -0
  147. package/src/wechat-preview/assets/browser-dist/assets/nsis-LY0VT_u5.js +1 -0
  148. package/src/wechat-preview/assets/browser-dist/assets/ntriples-BfvgReVJ.js +1 -0
  149. package/src/wechat-preview/assets/browser-dist/assets/octave-Ck1zUtKM.js +1 -0
  150. package/src/wechat-preview/assets/browser-dist/assets/oz-BzwKVEFT.js +1 -0
  151. package/src/wechat-preview/assets/browser-dist/assets/pascal--L3eBynH.js +1 -0
  152. package/src/wechat-preview/assets/browser-dist/assets/perl-CdXCOZ3F.js +1 -0
  153. package/src/wechat-preview/assets/browser-dist/assets/pig-CevX1Tat.js +1 -0
  154. package/src/wechat-preview/assets/browser-dist/assets/powershell-CFHJl5sT.js +1 -0
  155. package/src/wechat-preview/assets/browser-dist/assets/properties-C78fOPTZ.js +1 -0
  156. package/src/wechat-preview/assets/browser-dist/assets/protobuf-ChK-085T.js +1 -0
  157. package/src/wechat-preview/assets/browser-dist/assets/pug-DeIclll2.js +1 -0
  158. package/src/wechat-preview/assets/browser-dist/assets/puppet-DMA9R1ak.js +1 -0
  159. package/src/wechat-preview/assets/browser-dist/assets/python-BuPzkPfP.js +1 -0
  160. package/src/wechat-preview/assets/browser-dist/assets/q-pXgVlZs6.js +1 -0
  161. package/src/wechat-preview/assets/browser-dist/assets/r-B6wPVr8A.js +1 -0
  162. package/src/wechat-preview/assets/browser-dist/assets/rpm-CTu-6PCP.js +1 -0
  163. package/src/wechat-preview/assets/browser-dist/assets/ruby-BK5aLJev.js +1 -0
  164. package/src/wechat-preview/assets/browser-dist/assets/sas-B4kiWyti.js +1 -0
  165. package/src/wechat-preview/assets/browser-dist/assets/scheme-C41bIUwD.js +1 -0
  166. package/src/wechat-preview/assets/browser-dist/assets/shell-CjFT_Tl9.js +1 -0
  167. package/src/wechat-preview/assets/browser-dist/assets/sieve-C3Gn_uJK.js +1 -0
  168. package/src/wechat-preview/assets/browser-dist/assets/simple-mode-GW_nhZxv.js +1 -0
  169. package/src/wechat-preview/assets/browser-dist/assets/smalltalk-CnHTOXQT.js +1 -0
  170. package/src/wechat-preview/assets/browser-dist/assets/solr-DehyRSwq.js +1 -0
  171. package/src/wechat-preview/assets/browser-dist/assets/sparql-DkYu6x3z.js +1 -0
  172. package/src/wechat-preview/assets/browser-dist/assets/spreadsheet-BCZA_wO0.js +1 -0
  173. package/src/wechat-preview/assets/browser-dist/assets/sql-D0XecflT.js +1 -0
  174. package/src/wechat-preview/assets/browser-dist/assets/stex-C3f8Ysf7.js +1 -0
  175. package/src/wechat-preview/assets/browser-dist/assets/style-Cif_gYUW.css +1 -0
  176. package/src/wechat-preview/assets/browser-dist/assets/stylus-B533Al4x.js +1 -0
  177. package/src/wechat-preview/assets/browser-dist/assets/swift-BzpIVaGY.js +1 -0
  178. package/src/wechat-preview/assets/browser-dist/assets/tcl-DVfN8rqt.js +1 -0
  179. package/src/wechat-preview/assets/browser-dist/assets/textile-CnDTJFAw.js +1 -0
  180. package/src/wechat-preview/assets/browser-dist/assets/tiddlywiki-DO-Gjzrf.js +1 -0
  181. package/src/wechat-preview/assets/browser-dist/assets/tiki-DGYXhP31.js +1 -0
  182. package/src/wechat-preview/assets/browser-dist/assets/toml-Bm5Em-hy.js +1 -0
  183. package/src/wechat-preview/assets/browser-dist/assets/troff-wAsdV37c.js +1 -0
  184. package/src/wechat-preview/assets/browser-dist/assets/ttcn-CfJYG6tj.js +1 -0
  185. package/src/wechat-preview/assets/browser-dist/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  186. package/src/wechat-preview/assets/browser-dist/assets/turtle-B1tBg_DP.js +1 -0
  187. package/src/wechat-preview/assets/browser-dist/assets/vb-CmGdzxic.js +1 -0
  188. package/src/wechat-preview/assets/browser-dist/assets/vbscript-BuJXcnF6.js +1 -0
  189. package/src/wechat-preview/assets/browser-dist/assets/velocity-D8B20fx6.js +1 -0
  190. package/src/wechat-preview/assets/browser-dist/assets/verilog-C6RDOZhf.js +1 -0
  191. package/src/wechat-preview/assets/browser-dist/assets/vhdl-lSbBsy5d.js +1 -0
  192. package/src/wechat-preview/assets/browser-dist/assets/webidl-ZXfAyPTL.js +1 -0
  193. package/src/wechat-preview/assets/browser-dist/assets/{wechat-renderer-GgNrlSLi.js → wechat-renderer-CcHuq7M-.js} +83 -61
  194. package/src/wechat-preview/assets/browser-dist/assets/xquery-DzFWVndE.js +1 -0
  195. package/src/wechat-preview/assets/browser-dist/assets/yacas-BJ4BC0dw.js +1 -0
  196. package/src/wechat-preview/assets/browser-dist/assets/z80-Hz9HOZM7.js +1 -0
  197. package/src/wechat-preview/assets/browser-dist/editor-export.js +1 -1
  198. package/src/wechat-preview/assets/browser-dist/src/wechat-preview/browser/studio/studio.html +215 -165
  199. package/src/wechat-preview/assets/browser-dist/studio.js +1148 -237
  200. package/src/wechat-preview/browser/studio/color-palettes.ts +28 -0
  201. package/src/wechat-preview/browser/studio/config-manager.ts +49 -0
  202. package/src/wechat-preview/browser/studio/milkdown-article-menu.ts +251 -0
  203. package/src/wechat-preview/browser/studio/myno-editor.ts +122 -0
  204. package/src/wechat-preview/browser/studio/studio.css +493 -250
  205. package/src/wechat-preview/browser/studio/studio.html +213 -163
  206. package/src/wechat-preview/browser/studio/studio.ts +684 -211
  207. package/src/wechat-preview/browser/studio/style-packs.ts +201 -0
  208. package/src/wechat-preview/browser/studio/syntax-presets.test.ts +10 -32
  209. package/src/wechat-preview/browser/studio/syntax-presets.ts +19 -357
  210. package/src/wechat-preview/fixtures/all-nodes.md +2 -11
  211. package/src/wechat-preview/index.ts +35 -14
  212. package/src/wechat-preview/server/http.ts +64 -8
  213. package/src/wechat-preview/server/studio.test.ts +60 -1
  214. package/src/wechat-preview/wechat-export.integration.test.ts +49 -8
  215. package/src/wechat-preview/wechat-renderer.ts +134 -11
  216. package/src/workflow.test.ts +2 -0
  217. package/src/wechat-preview/assets/browser-dist/assets/style-C9-YtTIm.css +0 -1
@@ -1,54 +1,54 @@
1
- var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=(e,t,n)=>(Ff(e,t,"read from private field"),n?n.call(e):t.get(e)),Re=(e,t,n)=>t.has(e)?Pf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Yr=(e,t,n,r)=>(Ff(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Pt=(function(e){return e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e})({}),Ft=class extends Error{constructor(e,t){super(t),this.name="MilkdownError",this.code=e}},n2=(e,t)=>typeof t=="function"?"[Function]":t,Ta=e=>JSON.stringify(e,n2);function r2(e){return new Ft(Pt.docTypeError,`Doc type error, unsupported type: ${Ta(e)}`)}function i2(e){return new Ft(Pt.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function u2(e){return new Ft(Pt.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function Ca(){return new Ft(Pt.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function s2(e,t,n){const r=`Cannot create node for ${"name"in e?e.name:e}`,i=s=>{if(s==null)return"null";if(Array.isArray(s))return`[${s.map(i).join(", ")}]`;if(typeof s=="object")return"toJSON"in s&&typeof s.toJSON=="function"?JSON.stringify(s.toJSON()):"spec"in s?JSON.stringify(s.spec):JSON.stringify(s);if(typeof s=="string"||typeof s=="number"||typeof s=="boolean")return JSON.stringify(s);if(typeof s=="function")return`[Function: ${s.name||"anonymous"}]`;try{return String(s)}catch{return"[Unserializable]"}},u=[["[Description]",r],["[Attributes]",t],["[Content]",(n??[]).map(s=>s?typeof s=="object"&&"type"in s?`${s}`:i(s):"null")]].reduce((s,[a,o])=>{const l=`${a}: ${i(o)}.`;return s.concat(l)},[]);return new Ft(Pt.createNodeInParserFail,u.join(`
2
- `))}function Zp(){return new Ft(Pt.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function a2(e){return new Ft(Pt.parserMatchError,`Cannot match target parser for node: ${Ta(e)}.`)}function o2(e){return new Ft(Pt.serializerMatchError,`Cannot match target serializer for node: ${Ta(e)}.`)}function un(e){return new Ft(Pt.expectDomTypeError,`Expect to be a dom, but get: ${Ta(e)}.`)}function ja(){return new Ft(Pt.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function l2(e){return new Ft(Pt.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function c2(e){return new Ft(Pt.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}var Xp=class{constructor(){this.sliceMap=new Map,this.get=e=>{const t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);if(!t)throw i2(typeof e=="string"?e:e.name);return t},this.remove=e=>{const t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);t&&this.sliceMap.delete(t.type.id)},this.has=e=>typeof e=="string"?[...this.sliceMap.values()].some(t=>t.type.name===e):this.sliceMap.has(e.id)}},d2=class{#t=[];#e;#r=()=>{this.#t.forEach(t=>t(this.#e))};constructor(t,n,r){this.set=i=>{this.#e=i,this.#r()},this.get=()=>this.#e,this.update=i=>{this.#e=i(this.#e),this.#r()},this.type=r,this.#e=n,t.set(r.id,this)}on(t){return this.#t.push(t),()=>{this.#t=this.#t.filter(n=>n!==t)}}once(t){const n=this.on(r=>{t(r),n()});return n}off(t){this.#t=this.#t.filter(n=>n!==t)}offAll(){this.#t=[]}},f2=class{constructor(e,t){this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw Ca()}}create(e,t=this._defaultValue){return new d2(e,t,this)}},he=(e,t)=>new f2(e,t),h2=class{#t;#e;#r;#n=new Set;#a=new Set;#u=new Map;#i=new Map;constructor(e,t,n){this.read=()=>({metadata:this.#t,injectedSlices:[...this.#n].map(r=>({name:typeof r=="string"?r:r.name,value:this.#s(r)})),consumedSlices:[...this.#a].map(r=>({name:typeof r=="string"?r:r.name,value:this.#s(r)})),recordedTimers:[...this.#u].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#o(r)})),waitTimers:[...this.#i].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#o(r)}))}),this.onRecord=r=>{this.#u.set(r,{start:Date.now(),duration:0})},this.onClear=r=>{this.#u.delete(r)},this.onDone=r=>{const i=this.#u.get(r);i&&(i.duration=Date.now()-i.start)},this.onWait=(r,i)=>{const u=Date.now();i.finally(()=>{this.#i.set(r,{duration:Date.now()-u})}).catch(console.error)},this.onInject=r=>{this.#n.add(r)},this.onRemove=r=>{this.#n.delete(r)},this.onUse=r=>{this.#a.add(r)},this.#e=e,this.#r=t,this.#t=n}#s=e=>this.#e.get(e).get();#o=e=>this.#r.get(e).status},p2=class $p{#t;#e;#r;#n;constructor(t,n,r){this.produce=i=>i&&Object.keys(i).length?new $p(this.#t,this.#e,{...i}):this,this.inject=(i,u)=>{const s=i.create(this.#t.sliceMap);return u!=null&&s.set(u),this.#n?.onInject(i),this},this.remove=i=>(this.#t.remove(i),this.#n?.onRemove(i),this),this.record=i=>(i.create(this.#e.store),this.#n?.onRecord(i),this),this.clearTimer=i=>(this.#e.remove(i),this.#n?.onClear(i),this),this.isInjected=i=>this.#t.has(i),this.isRecorded=i=>this.#e.has(i),this.use=i=>(this.#n?.onUse(i),this.#t.get(i)),this.get=i=>this.use(i).get(),this.set=(i,u)=>this.use(i).set(u),this.update=(i,u)=>this.use(i).update(u),this.timer=i=>this.#e.get(i),this.done=i=>{this.timer(i).done(),this.#n?.onDone(i)},this.wait=i=>{const u=this.timer(i).start();return this.#n?.onWait(i,u),u},this.waitTimers=async i=>{await Promise.all(this.get(i).map(u=>this.wait(u)))},this.#t=t,this.#e=n,this.#r=r,r&&(this.#n=new h2(t,n,r))}get meta(){return this.#r}get inspector(){return this.#n}},m2=class{constructor(){this.store=new Map,this.get=e=>{const t=this.store.get(e.id);if(!t)throw u2(e.name);return t},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}},A2=class{#t=null;#e=null;#r;#n="pending";constructor(e,t){this.start=()=>(this.#t??=new Promise((n,r)=>{this.#e=i=>{i instanceof CustomEvent&&i.detail.id===this.#r&&(this.#n="resolved",this.#a(),i.stopImmediatePropagation(),n())},this.#u(()=>{this.#n==="pending"&&(this.#n="rejected"),this.#a(),r(new Error(`Timing ${this.type.name} timeout.`))}),this.#n="pending",addEventListener(this.type.name,this.#e)}),this.#t),this.done=()=>{const n=new CustomEvent(this.type.name,{detail:{id:this.#r}});dispatchEvent(n)},this.#r=Symbol(t.name),this.type=t,e.set(t.id,this)}get status(){return this.#n}#a=()=>{this.#e&&removeEventListener(this.type.name,this.#e)};#u=e=>{setTimeout(()=>{e()},this.type.timeout)}},g2=class{constructor(e,t=3e3){this.create=n=>new A2(n,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}},sn=(e,t=3e3)=>new g2(e,t);const b2={};function Sc(e,t){const n=b2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return em(e,r,i)}function em(e,t,n){if(E2(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Hf(e.children,t,n)}return Array.isArray(e)?Hf(e,t,n):""}function Hf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=em(e[i],t,n);return r.join("")}function E2(e){return!!(e&&typeof e=="object")}const Uf=document.createElement("i");function Nc(e){const t="&"+e+";";Uf.innerHTML=t;const n=Uf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function $e(e,t,n,r){const i=e.length;let u=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);u<r.length;)s=r.slice(u,u+1e4),s.unshift(t,0),e.splice(...s),u+=1e4,t+=1e4}function Ot(e,t){return e.length>0?($e(e,e.length,0,t),e):t}const Wf={}.hasOwnProperty;function tm(e){const t={};let n=-1;for(;++n<e.length;)y2(t,e[n]);return t}function y2(e,t){let n;for(n in t){const i=(Wf.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let s;if(u)for(s in u){Wf.call(i,s)||(i[s]=[]);const a=u[s];T2(i[s],Array.isArray(a)?a:a?[a]:[])}}}function T2(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);$e(e,0,0,r)}function nm(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Qt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const st=rr(/[A-Za-z]/),pt=rr(/[\dA-Za-z]/),C2=rr(/[#-'*+\--9=?A-Z^-~]/);function Fs(e){return e!==null&&(e<32||e===127)}const Cl=rr(/\d/),x2=rr(/[\dA-Fa-f]/),k2=rr(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function ke(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const xa=rr(new RegExp("\\p{P}|\\p{S}","u")),_r=rr(/\s/);function rr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function pe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let u=0;return s;function s(o){return de(o)?(e.enter(n),a(o)):t(o)}function a(o){return de(o)&&u++<i?(e.consume(o),a):(e.exit(n),t(o))}}const w2={tokenize:I2};function I2(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),pe(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),u(a)}function u(a){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return X(a)?(e.consume(a),e.exit("chunkText"),u):(e.consume(a),s)}}const S2={tokenize:N2},Kf={tokenize:D2};function N2(e){const t=this,n=[];let r=0,i,u,s;return a;function a(w){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,o,l)(w)}return l(w)}function o(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&N();const _=t.events.length;let S=_,k;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){k=t.events[S][1].end;break}g(r);let R=_;for(;R<t.events.length;)t.events[R][1].end={...k},R++;return $e(t.events,S+1,0,t.events.slice(_)),t.events.length=R,l(w)}return a(w)}function l(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Kf,c,d)(w)}function c(w){return i&&N(),g(r),f(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(w)}function f(w){return t.containerState={},e.attempt(Kf,p,m)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function m(w){if(w===null){i&&N(),g(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:u}),A(w)}function A(w){if(w===null){E(e.exit("chunkFlow"),!0),g(0),e.consume(w);return}return X(w)?(e.consume(w),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(w),A)}function E(w,_){const S=t.sliceStream(w);if(_&&S.push(null),w.previous=u,u&&(u.next=w),u=w,i.defineSkip(w.start),i.write(S),t.parser.lazy[w.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<s&&(!i.events[k][1].end||i.events[k][1].end.offset>s))return;const R=t.events.length;let Q=R,O,x;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){if(O){x=t.events[Q][1].end;break}O=!0}for(g(r),k=R;k<t.events.length;)t.events[k][1].end={...x},k++;$e(t.events,Q+1,0,t.events.slice(R)),t.events.length=k}}function g(w){let _=n.length;for(;_-- >w;){const S=n[_];t.containerState=S[1],S[0].exit.call(t,e)}n.length=w}function N(){i.write([null]),u=void 0,i=void 0,t.containerState._closeFlow=void 0}}function D2(e,t,n){return pe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $n(e){if(e===null||ke(e)||_r(e))return 1;if(xa(e))return 2}function Lu(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const u=e[i].resolveAll;u&&!r.includes(u)&&(t=u(t,n),r.push(u))}return t}const xl={name:"attention",resolveAll:_2,tokenize:O2};function _2(e,t){let n=-1,r,i,u,s,a,o,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Qf(d,-o),Qf(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},u={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ot(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Ot(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",u,t]]),l=Ot(l,Lu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Ot(l,[["exit",u,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=Ot(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,$e(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function O2(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=$n(r);let u;return s;function s(o){return u=o,e.enter("attentionSequence"),a(o)}function a(o){if(o===u)return e.consume(o),a;const l=e.exit("attentionSequence"),c=$n(o),d=!c||c===2&&i||n.includes(o),f=!i||i===2&&c||n.includes(r);return l._open=!!(u===42?d:d&&(i||!f)),l._close=!!(u===42?f:f&&(c||!d)),t(o)}}function Qf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const R2={name:"autolink",tokenize:M2};function M2(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(p){return st(p)?(e.consume(p),s):p===64?n(p):l(p)}function s(p){return p===43||p===45||p===46||pt(p)?(r=1,a(p)):l(p)}function a(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||pt(p))&&r++<32?(e.consume(p),a):(r=0,l(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Fs(p)?n(p):(e.consume(p),o)}function l(p){return p===64?(e.consume(p),c):C2(p)?(e.consume(p),l):n(p)}function c(p){return pt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||pt(p))&&r++<63){const m=p===45?f:d;return e.consume(p),m}return n(p)}}const vu={partial:!0,tokenize:B2};function B2(e,t,n){return r;function r(u){return de(u)?pe(e,i,"linePrefix")(u):i(u)}function i(u){return u===null||X(u)?t(u):n(u)}}const rm={continuation:{tokenize:v2},exit:P2,name:"blockQuote",tokenize:L2};function L2(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),u}return n(s)}function u(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function v2(e,t,n){const r=this;return i;function i(s){return de(s)?pe(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):u(s)}function u(s){return e.attempt(rm,t,n)(s)}}function P2(e){e.exit("blockQuote")}const im={name:"characterEscape",tokenize:F2};function F2(e,t,n){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),i}function i(u){return k2(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const um={name:"characterReference",tokenize:H2};function H2(e,t,n){const r=this;let i=0,u,s;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),u=31,s=pt,c(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,s=x2,c):(e.enter("characterReferenceValue"),u=7,s=Cl,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===pt&&!Nc(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<u?(e.consume(d),c):n(d)}}const zf={partial:!0,tokenize:W2},Yf={concrete:!0,name:"codeFenced",tokenize:U2};function U2(e,t,n){const r=this,i={partial:!0,tokenize:S};let u=0,s=0,a;return o;function o(k){return l(k)}function l(k){const R=r.events[r.events.length-1];return u=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(k)}function c(k){return k===a?(s++,e.consume(k),c):s<3?n(k):(e.exit("codeFencedFenceSequence"),de(k)?pe(e,d,"whitespace")(k):d(k))}function d(k){return k===null||X(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(zf,A,_)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===null||X(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(k)):de(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pe(e,p,"whitespace")(k)):k===96&&k===a?n(k):(e.consume(k),f)}function p(k){return k===null||X(k)?d(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(k))}function m(k){return k===null||X(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(k)):k===96&&k===a?n(k):(e.consume(k),m)}function A(k){return e.attempt(i,_,E)(k)}function E(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),g}function g(k){return u>0&&de(k)?pe(e,N,"linePrefix",u+1)(k):N(k)}function N(k){return k===null||X(k)?e.check(zf,A,_)(k):(e.enter("codeFlowValue"),w(k))}function w(k){return k===null||X(k)?(e.exit("codeFlowValue"),N(k)):(e.consume(k),w)}function _(k){return e.exit("codeFenced"),t(k)}function S(k,R,Q){let O=0;return x;function x(V){return k.enter("lineEnding"),k.consume(V),k.exit("lineEnding"),B}function B(V){return k.enter("codeFencedFence"),de(V)?pe(k,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):P(V)}function P(V){return V===a?(k.enter("codeFencedFenceSequence"),G(V)):Q(V)}function G(V){return V===a?(O++,k.consume(V),G):O>=s?(k.exit("codeFencedFenceSequence"),de(V)?pe(k,J,"whitespace")(V):J(V)):Q(V)}function J(V){return V===null||X(V)?(k.exit("codeFencedFence"),R(V)):Q(V)}}}function W2(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),u)}function u(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Za={name:"codeIndented",tokenize:Q2},K2={partial:!0,tokenize:z2};function Q2(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),pe(e,u,"linePrefix",5)(l)}function u(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):X(l)?e.attempt(K2,s,o)(l):(e.enter("codeFlowValue"),a(l))}function a(l){return l===null||X(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),a)}function o(l){return e.exit("codeIndented"),t(l)}}function z2(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):X(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):pe(e,u,"linePrefix",5)(s)}function u(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):X(s)?i(s):n(s)}}const Y2={name:"codeText",previous:q2,resolve:G2,tokenize:V2};function G2(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function q2(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function V2(e,t,n){let r=0,i,u;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(u=e.enter("codeTextSequence"),i=0,c(d)):X(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||X(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),l)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(u.type="codeTextData",l(d))}}class J2{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Di(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Di(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Di(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Di(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Di(this.left,n.reverse())}}}function Di(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function sm(e){const t={};let n=-1,r,i,u,s,a,o,l;const c=new J2(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,u=0,u<o.length&&o[u][1].type==="lineEndingBlank"&&(u+=2),u<o.length&&o[u][1].type==="content"))for(;++u<o.length&&o[u][1].type!=="content";)o[u][1].type==="chunkText"&&(o[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,j2(c,n)),n=t[n],l=!0);else if(r[1]._container){for(u=n,i=void 0;u--;)if(s=c.get(u),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=u);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return $e(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function j2(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const u=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,o=[],l={};let c,d,f=-1,p=n,m=0,A=0;const E=[A];for(;p;){for(;e.get(++i)[1]!==p;);u.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(A=f+1,E.push(A),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):E.pop(),f=E.length;f--;){const g=a.slice(E[f],E[f+1]),N=u.pop();o.push([N,N+g.length-1]),e.splice(N,2,g)}for(o.reverse(),f=-1;++f<o.length;)l[m+o[f][0]]=m+o[f][1],m+=o[f][1]-o[f][0]-1;return l}const Z2={resolve:$2,tokenize:eE},X2={partial:!0,tokenize:tE};function $2(e){return sm(e),e}function eE(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?u(a):X(a)?e.check(X2,s,u)(a):(e.consume(a),i)}function u(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function tE(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),pe(e,u,"linePrefix")}function u(s){if(s===null||X(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function am(e,t,n,r,i,u,s,a,o){const l=o||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(u),e.consume(g),e.exit(u),f):g===null||g===32||g===41||Fs(g)?n(g):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),A(g))}function f(g){return g===62?(e.enter(u),e.consume(g),e.exit(u),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(a),f(g)):g===null||g===60||X(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function A(g){return!c&&(g===null||g===41||ke(g))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(g)):c<l&&g===40?(e.consume(g),c++,A):g===41?(e.consume(g),c--,A):g===null||g===32||g===40||Fs(g)?n(g):(e.consume(g),g===92?E:A)}function E(g){return g===40||g===41||g===92?(e.consume(g),A):A(g)}}function om(e,t,n,r,i,u){const s=this;let a=0,o;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(u),c}function c(p){return a>999||p===null||p===91||p===93&&!o||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(u),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):X(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||X(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),o||(o=!de(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function lm(e,t,n,r,i,u){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(u),l(f))}function l(f){return f===s?(e.exit(u),o(s)):f===null?n(f):X(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),pe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||X(f)?(e.exit("chunkString"),l(f)):(e.consume(f),f===92?d:c)}function d(f){return f===s||f===92?(e.consume(f),c):c(f)}}function Gi(e,t){let n;return r;function r(i){return X(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):de(i)?pe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const nE={name:"definition",tokenize:iE},rE={partial:!0,tokenize:uE};function iE(e,t,n){const r=this;let i;return u;function u(p){return e.enter("definition"),s(p)}function s(p){return om.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return ke(p)?Gi(e,l)(p):l(p)}function l(p){return am(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(rE,d,d)(p)}function d(p){return de(p)?pe(e,f,"whitespace")(p):f(p)}function f(p){return p===null||X(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function uE(e,t,n){return r;function r(a){return ke(a)?Gi(e,i)(a):n(a)}function i(a){return lm(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function u(a){return de(a)?pe(e,s,"whitespace")(a):s(a)}function s(a){return a===null||X(a)?t(a):n(a)}}const sE={name:"hardBreakEscape",tokenize:aE};function aE(e,t,n){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),i}function i(u){return X(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const oE={name:"headingAtx",resolve:lE,tokenize:cE};function lE(e,t){let n=e.length-2,r=3,i,u;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},u={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},$e(e,r,n-r+1,[["enter",i,t],["enter",u,t],["exit",u,t],["exit",i,t]])),e}function cE(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),u(c)}function u(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||ke(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),o(c)):c===null||X(c)?(e.exit("atxHeading"),t(c)):de(c)?pe(e,a,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function o(c){return c===35?(e.consume(c),o):(e.exit("atxHeadingSequence"),a(c))}function l(c){return c===null||c===35||ke(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),l)}}const dE=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gf=["pre","script","style","textarea"],fE={concrete:!0,name:"htmlFlow",resolveTo:mE,tokenize:AE},hE={partial:!0,tokenize:bE},pE={partial:!0,tokenize:gE};function mE(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function AE(e,t,n){const r=this;let i,u,s,a,o;return l;function l(I){return c(I)}function c(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),d}function d(I){return I===33?(e.consume(I),f):I===47?(e.consume(I),u=!0,A):I===63?(e.consume(I),i=3,r.interrupt?t:C):st(I)?(e.consume(I),s=String.fromCharCode(I),E):n(I)}function f(I){return I===45?(e.consume(I),i=2,p):I===91?(e.consume(I),i=5,a=0,m):st(I)?(e.consume(I),i=4,r.interrupt?t:C):n(I)}function p(I){return I===45?(e.consume(I),r.interrupt?t:C):n(I)}function m(I){const it="CDATA[";return I===it.charCodeAt(a++)?(e.consume(I),a===it.length?r.interrupt?t:P:m):n(I)}function A(I){return st(I)?(e.consume(I),s=String.fromCharCode(I),E):n(I)}function E(I){if(I===null||I===47||I===62||ke(I)){const it=I===47,Wt=s.toLowerCase();return!it&&!u&&Gf.includes(Wt)?(i=1,r.interrupt?t(I):P(I)):dE.includes(s.toLowerCase())?(i=6,it?(e.consume(I),g):r.interrupt?t(I):P(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):u?N(I):w(I))}return I===45||pt(I)?(e.consume(I),s+=String.fromCharCode(I),E):n(I)}function g(I){return I===62?(e.consume(I),r.interrupt?t:P):n(I)}function N(I){return de(I)?(e.consume(I),N):x(I)}function w(I){return I===47?(e.consume(I),x):I===58||I===95||st(I)?(e.consume(I),_):de(I)?(e.consume(I),w):x(I)}function _(I){return I===45||I===46||I===58||I===95||pt(I)?(e.consume(I),_):S(I)}function S(I){return I===61?(e.consume(I),k):de(I)?(e.consume(I),S):w(I)}function k(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),o=I,R):de(I)?(e.consume(I),k):Q(I)}function R(I){return I===o?(e.consume(I),o=null,O):I===null||X(I)?n(I):(e.consume(I),R)}function Q(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ke(I)?S(I):(e.consume(I),Q)}function O(I){return I===47||I===62||de(I)?w(I):n(I)}function x(I){return I===62?(e.consume(I),B):n(I)}function B(I){return I===null||X(I)?P(I):de(I)?(e.consume(I),B):n(I)}function P(I){return I===45&&i===2?(e.consume(I),se):I===60&&i===1?(e.consume(I),W):I===62&&i===4?(e.consume(I),oe):I===63&&i===3?(e.consume(I),C):I===93&&i===5?(e.consume(I),we):X(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(hE,_e,G)(I)):I===null||X(I)?(e.exit("htmlFlowData"),G(I)):(e.consume(I),P)}function G(I){return e.check(pE,J,_e)(I)}function J(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),V}function V(I){return I===null||X(I)?G(I):(e.enter("htmlFlowData"),P(I))}function se(I){return I===45?(e.consume(I),C):P(I)}function W(I){return I===47?(e.consume(I),s="",q):P(I)}function q(I){if(I===62){const it=s.toLowerCase();return Gf.includes(it)?(e.consume(I),oe):P(I)}return st(I)&&s.length<8?(e.consume(I),s+=String.fromCharCode(I),q):P(I)}function we(I){return I===93?(e.consume(I),C):P(I)}function C(I){return I===62?(e.consume(I),oe):I===45&&i===2?(e.consume(I),C):P(I)}function oe(I){return I===null||X(I)?(e.exit("htmlFlowData"),_e(I)):(e.consume(I),oe)}function _e(I){return e.exit("htmlFlow"),t(I)}}function gE(e,t,n){const r=this;return i;function i(s){return X(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),u):n(s)}function u(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function bE(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(vu,t,n)}}const EE={name:"htmlText",tokenize:yE};function yE(e,t,n){const r=this;let i,u,s;return a;function a(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),o}function o(C){return C===33?(e.consume(C),l):C===47?(e.consume(C),S):C===63?(e.consume(C),w):st(C)?(e.consume(C),Q):n(C)}function l(C){return C===45?(e.consume(C),c):C===91?(e.consume(C),u=0,m):st(C)?(e.consume(C),N):n(C)}function c(C){return C===45?(e.consume(C),p):n(C)}function d(C){return C===null?n(C):C===45?(e.consume(C),f):X(C)?(s=d,W(C)):(e.consume(C),d)}function f(C){return C===45?(e.consume(C),p):d(C)}function p(C){return C===62?se(C):C===45?f(C):d(C)}function m(C){const oe="CDATA[";return C===oe.charCodeAt(u++)?(e.consume(C),u===oe.length?A:m):n(C)}function A(C){return C===null?n(C):C===93?(e.consume(C),E):X(C)?(s=A,W(C)):(e.consume(C),A)}function E(C){return C===93?(e.consume(C),g):A(C)}function g(C){return C===62?se(C):C===93?(e.consume(C),g):A(C)}function N(C){return C===null||C===62?se(C):X(C)?(s=N,W(C)):(e.consume(C),N)}function w(C){return C===null?n(C):C===63?(e.consume(C),_):X(C)?(s=w,W(C)):(e.consume(C),w)}function _(C){return C===62?se(C):w(C)}function S(C){return st(C)?(e.consume(C),k):n(C)}function k(C){return C===45||pt(C)?(e.consume(C),k):R(C)}function R(C){return X(C)?(s=R,W(C)):de(C)?(e.consume(C),R):se(C)}function Q(C){return C===45||pt(C)?(e.consume(C),Q):C===47||C===62||ke(C)?O(C):n(C)}function O(C){return C===47?(e.consume(C),se):C===58||C===95||st(C)?(e.consume(C),x):X(C)?(s=O,W(C)):de(C)?(e.consume(C),O):se(C)}function x(C){return C===45||C===46||C===58||C===95||pt(C)?(e.consume(C),x):B(C)}function B(C){return C===61?(e.consume(C),P):X(C)?(s=B,W(C)):de(C)?(e.consume(C),B):O(C)}function P(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),i=C,G):X(C)?(s=P,W(C)):de(C)?(e.consume(C),P):(e.consume(C),J)}function G(C){return C===i?(e.consume(C),i=void 0,V):C===null?n(C):X(C)?(s=G,W(C)):(e.consume(C),G)}function J(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||ke(C)?O(C):(e.consume(C),J)}function V(C){return C===47||C===62||ke(C)?O(C):n(C)}function se(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function W(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),q}function q(C){return de(C)?pe(e,we,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):we(C)}function we(C){return e.enter("htmlTextData"),s(C)}}const Dc={name:"labelEnd",resolveAll:kE,resolveTo:wE,tokenize:IE},TE={tokenize:SE},CE={tokenize:NE},xE={tokenize:DE};function kE(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&$e(e,0,e.length,n),e}function wE(e,t){let n=e.length,r=0,i,u,s,a;for(;n--;)if(i=e[n][1],u){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(u=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[u][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[u+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",o,t],["enter",l,t]],a=Ot(a,e.slice(u+1,u+r+3)),a=Ot(a,[["enter",c,t]]),a=Ot(a,Lu(t.parser.constructs.insideSpan.null,e.slice(u+r+4,s-3),t)),a=Ot(a,[["exit",c,t],e[s-2],e[s-1],["exit",l,t]]),a=Ot(a,e.slice(s+1)),a=Ot(a,[["exit",o,t]]),$e(e,u,e.length,a),e}function IE(e,t,n){const r=this;let i=r.events.length,u,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){u=r.events[i][1];break}return a;function a(f){return u?u._inactive?d(f):(s=r.parser.defined.includes(Qt(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(TE,c,s?c:d)(f):f===91?e.attempt(CE,c,s?l:d)(f):s?c(f):d(f)}function l(f){return e.attempt(xE,c,d)(f)}function c(f){return t(f)}function d(f){return u._balanced=!0,n(f)}}function SE(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ke(d)?Gi(e,u)(d):u(d)}function u(d){return d===41?c(d):am(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ke(d)?Gi(e,o)(d):c(d)}function a(d){return n(d)}function o(d){return d===34||d===39||d===40?lm(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function l(d){return ke(d)?Gi(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function NE(e,t,n){const r=this;return i;function i(a){return om.call(r,e,u,s,"reference","referenceMarker","referenceString")(a)}function u(a){return r.parser.defined.includes(Qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function DE(e,t,n){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),i}function i(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const _E={name:"labelStartImage",resolveAll:Dc.resolveAll,tokenize:OE};function OE(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),u}function u(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const RE={name:"labelStartLink",resolveAll:Dc.resolveAll,tokenize:ME};function ME(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),u}function u(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Xa={name:"lineEnding",tokenize:BE};function BE(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),pe(e,t,"linePrefix")}}const ks={name:"thematicBreak",tokenize:LE};function LE(e,t,n){let r=0,i;return u;function u(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,a(l)}function a(l){return l===i?(e.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||X(l))?(e.exit("thematicBreak"),t(l)):n(l)}function o(l){return l===i?(e.consume(l),r++,o):(e.exit("thematicBreakSequence"),de(l)?pe(e,a,"whitespace")(l):a(l))}}const dt={continuation:{tokenize:HE},exit:WE,name:"list",tokenize:FE},vE={partial:!0,tokenize:KE},PE={partial:!0,tokenize:UE};function FE(e,t,n){const r=this,i=r.events[r.events.length-1];let u=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Cl(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(ks,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return Cl(p)&&++s<10?(e.consume(p),o):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(vu,r.interrupt?n:c,e.attempt(vE,f,d))}function c(p){return r.containerState.initialBlankLine=!0,u++,f(p)}function d(p){return de(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function HE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(vu,i,u);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pe(e,t,"listItemIndent",r.containerState.size+1)(a)}function u(a){return r.containerState.furtherBlankLines||!de(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(PE,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,pe(e,e.attempt(dt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function UE(e,t,n){const r=this;return pe(e,i,"listItemIndent",r.containerState.size+1);function i(u){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(u):n(u)}}function WE(e){e.exit(this.containerState.type)}function KE(e,t,n){const r=this;return pe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(u){const s=r.events[r.events.length-1];return!de(u)&&s&&s[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const qf={name:"setextUnderline",resolveTo:QE,tokenize:zE};function QE(e,t){let n=e.length,r,i,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",u?(e.splice(i,0,["enter",s,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end={...e[u][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function zE(e,t,n){const r=this;let i;return u;function u(l){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(e.consume(l),a):(e.exit("setextHeadingLineSequence"),de(l)?pe(e,o,"lineSuffix")(l):o(l))}function o(l){return l===null||X(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const YE={tokenize:GE};function GE(e){const t=this,n=e.attempt(vu,r,e.attempt(this.parser.constructs.flowInitial,i,pe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Z2,i)),"linePrefix")));return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const qE={resolveAll:dm()},VE=cm("string"),JE=cm("text");function cm(e){return{resolveAll:dm(e==="text"?jE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],u=n.attempt(i,s,a);return s;function s(c){return l(c)?u(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),o}function o(c){return l(c)?(n.exit("data"),u(c)):(n.consume(c),o)}function l(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function dm(e){return t;function t(n,r){let i=-1,u;for(;++i<=n.length;)u===void 0?n[i]&&n[i][1].type==="data"&&(u=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==u+2&&(n[u][1].end=n[i-1][1].end,n.splice(u+2,i-u-2),i=u+2),u=void 0);return e?e(n,r):n}}function jE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let u=i.length,s=-1,a=0,o;for(;u--;){const l=i[u];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)o=!0,a++;else if(l!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const l={type:n===e.length||o||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?s:r.start._bufferIndex+s,_index:r.start._index+u,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const ZE={42:dt,43:dt,45:dt,48:dt,49:dt,50:dt,51:dt,52:dt,53:dt,54:dt,55:dt,56:dt,57:dt,62:rm},XE={91:nE},$E={[-2]:Za,[-1]:Za,32:Za},ey={35:oE,42:ks,45:[qf,ks],60:fE,61:qf,95:ks,96:Yf,126:Yf},ty={38:um,92:im},ny={[-5]:Xa,[-4]:Xa,[-3]:Xa,33:_E,38:um,42:xl,60:[R2,EE],91:RE,92:[sE,im],93:Dc,95:xl,96:Y2},ry={null:[xl,qE]},iy={null:[42,95]},uy={null:[]},sy=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:iy,contentInitial:XE,disable:uy,document:ZE,flow:ey,flowInitial:$E,insideSpan:ry,string:ty,text:ny},Symbol.toStringTag,{value:"Module"}));function ay(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},u=[];let s=[],a=[];const o={attempt:R(S),check:R(k),consume:N,enter:w,exit:_,interrupt:R(k,{interrupt:!0})},l={code:null,containerState:{},defineSkip:A,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let c=t.tokenize.call(l,o);return t.resolveAll&&u.push(t),l;function d(B){return s=Ot(s,B),E(),s[s.length-1]!==null?[]:(Q(t,0),l.events=Lu(u,l.events,l),l.events)}function f(B,P){return ly(p(B),P)}function p(B){return oy(s,B)}function m(){const{_bufferIndex:B,_index:P,line:G,column:J,offset:V}=r;return{_bufferIndex:B,_index:P,line:G,column:J,offset:V}}function A(B){i[B.line]=B.column,x()}function E(){let B;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<P.length;)g(P.charCodeAt(r._bufferIndex));else g(P)}}function g(B){c=c(B)}function N(B){X(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,x()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=B}function w(B,P){const G=P||{};return G.type=B,G.start=m(),l.events.push(["enter",G,l]),a.push(G),G}function _(B){const P=a.pop();return P.end=m(),l.events.push(["exit",P,l]),P}function S(B,P){Q(B,P.from)}function k(B,P){P.restore()}function R(B,P){return G;function G(J,V,se){let W,q,we,C;return Array.isArray(J)?_e(J):"tokenize"in J?_e([J]):oe(J);function oe(Fe){return Gt;function Gt(qt){const on=qt!==null&&Fe[qt],ln=qt!==null&&Fe.null,Ee=[...Array.isArray(on)?on:on?[on]:[],...Array.isArray(ln)?ln:ln?[ln]:[]];return _e(Ee)(qt)}}function _e(Fe){return W=Fe,q=0,Fe.length===0?se:I(Fe[q])}function I(Fe){return Gt;function Gt(qt){return C=O(),we=Fe,Fe.partial||(l.currentConstruct=Fe),Fe.name&&l.parser.constructs.disable.null.includes(Fe.name)?Wt():Fe.tokenize.call(P?Object.assign(Object.create(l),P):l,o,it,Wt)(qt)}}function it(Fe){return B(we,C),V}function Wt(Fe){return C.restore(),++q<W.length?I(W[q]):se}}}function Q(B,P){B.resolveAll&&!u.includes(B)&&u.push(B),B.resolve&&$e(l.events,P,l.events.length-P,B.resolve(l.events.slice(P),l)),B.resolveTo&&(l.events=B.resolveTo(l.events,l))}function O(){const B=m(),P=l.previous,G=l.currentConstruct,J=l.events.length,V=Array.from(a);return{from:J,restore:se};function se(){r=B,l.previous=P,l.currentConstruct=G,l.events.length=J,a=V,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function oy(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,u=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,u)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}u>0&&s.push(e[i].slice(0,u))}return s}function ly(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const u=e[n];let s;if(typeof u=="string")s=u;else switch(u){case-5:{s="\r";break}case-4:{s=`
1
+ var Hf=e=>{throw TypeError(e)};var Uf=(e,t,n)=>t.has(e)||Hf("Cannot "+n);var re=(e,t,n)=>(Uf(e,t,"read from private field"),n?n.call(e):t.get(e)),Me=(e,t,n)=>t.has(e)?Hf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ie=(e,t,n,r)=>(Uf(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var ft=(function(e){return e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e.aiProviderError="aiProviderError",e.aiBuildContextError="aiBuildContextError",e})({}),ht=class extends Error{constructor(e,t,n){super(t,n),this.name="MilkdownError",this.code=e,n?.cause!==void 0&&(this.cause=n.cause)}},N2=(e,t)=>typeof t=="function"?"[Function]":t,qu=e=>JSON.stringify(e,N2);function D2(e){return new ht(ft.docTypeError,`Doc type error, unsupported type: ${qu(e)}`)}function _2(e){return new ht(ft.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function O2(e){return new ht(ft.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function Na(){return new ht(ft.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function R2(e,t,n){const r=`Cannot create node for ${"name"in e?e.name:e}`,i=s=>{if(s==null)return"null";if(Array.isArray(s))return`[${s.map(i).join(", ")}]`;if(typeof s=="object")return"toJSON"in s&&typeof s.toJSON=="function"?JSON.stringify(s.toJSON()):"spec"in s?JSON.stringify(s.spec):JSON.stringify(s);if(typeof s=="string"||typeof s=="number"||typeof s=="boolean")return JSON.stringify(s);if(typeof s=="function")return`[Function: ${s.name||"anonymous"}]`;try{return String(s)}catch{return"[Unserializable]"}},u=[["[Description]",r],["[Attributes]",t],["[Content]",(n??[]).map(s=>s?typeof s=="object"&&"type"in s?`${s}`:i(s):"null")]].reduce((s,[a,o])=>{const l=`${a}: ${i(o)}.`;return s.concat(l)},[]);return new ht(ft.createNodeInParserFail,u.join(`
2
+ `))}function sm(){return new ht(ft.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function M2(e){return new ht(ft.parserMatchError,`Cannot match target parser for node: ${qu(e)}.`)}function B2(e){return new ht(ft.serializerMatchError,`Cannot match target serializer for node: ${qu(e)}.`)}function v2(e,t){return new ht(ft.getAtomFromSchemaFail,`Cannot get ${e}: ${t} from schema.`)}function on(e){return new ht(ft.expectDomTypeError,`Expect to be a dom, but get: ${qu(e)}.`)}function ro(){return new ht(ft.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function L2(e){return new ht(ft.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function P2(e){return new ht(ft.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}function am(e){try{return qu(e)}catch{return"[Unserializable]"}}function fM(e){const t=e instanceof Error?e.message:am(e);return new ht(ft.aiProviderError,`AI provider error: ${t}`,{cause:e})}function hM(e){const t=e instanceof Error?e.message:am(e);return new ht(ft.aiBuildContextError,`AI buildContext failed: ${t}`,{cause:e})}var om=class{constructor(){this.sliceMap=new Map,this.get=e=>{const t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);if(!t){const n=typeof e=="string"?e:e.name;throw _2(n)}return t},this.remove=e=>{const t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);t&&this.sliceMap.delete(t.type.id)},this.has=e=>typeof e=="string"?[...this.sliceMap.values()].some(t=>t.type.name===e):this.sliceMap.has(e.id)}},F2=class{#t;#e;#r;constructor(t,n,r){this.#t=[],this.#r=()=>{this.#t.forEach(i=>i(this.#e))},this.set=i=>{this.#e=i,this.#r()},this.get=()=>this.#e,this.update=i=>{this.#e=i(this.#e),this.#r()},this.type=r,this.#e=n,t.set(r.id,this)}on(t){return this.#t.push(t),()=>{this.#t=this.#t.filter(n=>n!==t)}}once(t){const n=this.on(r=>{t(r),n()});return n}off(t){this.#t=this.#t.filter(n=>n!==t)}offAll(){this.#t=[]}},H2=class{constructor(e,t){this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw Na()}}create(e,t=this._defaultValue){return new F2(e,t,this)}},he=(e,t)=>new H2(e,t),U2=class{#t;#e;#r;#n;#u;#s;#i;constructor(e,t,n){this.#n=new Set,this.#u=new Set,this.#s=new Map,this.#i=new Map,this.read=()=>({metadata:this.#t,injectedSlices:[...this.#n].map(r=>({name:typeof r=="string"?r:r.name,value:this.#a(r)})),consumedSlices:[...this.#u].map(r=>({name:typeof r=="string"?r:r.name,value:this.#a(r)})),recordedTimers:[...this.#s].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#o(r)})),waitTimers:[...this.#i].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#o(r)}))}),this.onRecord=r=>{this.#s.set(r,{start:Date.now(),duration:0})},this.onClear=r=>{this.#s.delete(r)},this.onDone=r=>{const i=this.#s.get(r);i&&(i.duration=Date.now()-i.start)},this.onWait=(r,i)=>{const u=Date.now();i.finally(()=>{this.#i.set(r,{duration:Date.now()-u})}).catch(console.error)},this.onInject=r=>{this.#n.add(r)},this.onRemove=r=>{this.#n.delete(r)},this.onUse=r=>{this.#u.add(r)},this.#a=r=>this.#e.get(r).get(),this.#o=r=>this.#r.get(r).status,this.#e=e,this.#r=t,this.#t=n}#a;#o},W2=class lm{#t;#e;#r;#n;constructor(t,n,r){this.produce=i=>i&&Object.keys(i).length?new lm(this.#t,this.#e,{...i}):this,this.inject=(i,u)=>{const s=i.create(this.#t.sliceMap);return u!=null&&s.set(u),this.#n?.onInject(i),this},this.remove=i=>(this.#t.remove(i),this.#n?.onRemove(i),this),this.record=i=>(i.create(this.#e.store),this.#n?.onRecord(i),this),this.clearTimer=i=>(this.#e.remove(i),this.#n?.onClear(i),this),this.isInjected=i=>this.#t.has(i),this.isRecorded=i=>this.#e.has(i),this.use=i=>(this.#n?.onUse(i),this.#t.get(i)),this.get=i=>this.use(i).get(),this.set=(i,u)=>this.use(i).set(u),this.update=(i,u)=>this.use(i).update(u),this.timer=i=>this.#e.get(i),this.done=i=>{this.timer(i).done(),this.#n?.onDone(i)},this.wait=i=>{const u=this.timer(i).start();return this.#n?.onWait(i,u),u},this.waitTimers=async i=>{await Promise.all(this.get(i).map(u=>this.wait(u)))},this.#t=t,this.#e=n,this.#r=r,r&&(this.#n=new U2(t,n,r))}get meta(){return this.#r}get inspector(){return this.#n}},K2=class{constructor(){this.store=new Map,this.get=e=>{const t=this.store.get(e.id);if(!t)throw O2(e.name);return t},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}},z2=class{#t;#e;#r;#n;#u;constructor(e,t){this.#t=null,this.#e=null,this.#n="pending",this.#u=null,this.start=()=>(this.#t??=new Promise((n,r)=>{this.#e=i=>{i instanceof CustomEvent&&i.detail.id===this.#r&&(this.#n="resolved",this.#s(),i.stopImmediatePropagation(),n())},this.#i(()=>{this.#n==="pending"&&(this.#n="rejected"),this.#s(),r(new Error(`Timing ${this.type.name} timeout.`))}),this.#n="pending",addEventListener(this.type.name,this.#e)}),this.#t),this.done=()=>{const n=new CustomEvent(this.type.name,{detail:{id:this.#r}});dispatchEvent(n)},this.#s=()=>{this.#u!==null&&(clearTimeout(this.#u),this.#u=null),this.#e&&removeEventListener(this.type.name,this.#e)},this.#i=n=>{this.#u=setTimeout(()=>{this.#u=null,n()},this.type.timeout)},this.#r=Symbol(t.name),this.type=t,e.set(t.id,this)}get status(){return this.#n}#s;#i},Q2=class{constructor(e,t=3e3){this.create=n=>new z2(n,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}},ln=(e,t=3e3)=>new Q2(e,t);const Y2={};function _c(e,t){const n=Y2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return cm(e,r,i)}function cm(e,t,n){if(q2(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Wf(e.children,t,n)}return Array.isArray(e)?Wf(e,t,n):""}function Wf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=cm(e[i],t,n);return r.join("")}function q2(e){return!!(e&&typeof e=="object")}const Kf=document.createElement("i");function Oc(e){const t="&"+e+";";Kf.innerHTML=t;const n=Kf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function et(e,t,n,r){const i=e.length;let u=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);u<r.length;)s=r.slice(u,u+1e4),s.unshift(t,0),e.splice(...s),u+=1e4,t+=1e4}function vt(e,t){return e.length>0?(et(e,e.length,0,t),e):t}const zf={}.hasOwnProperty;function dm(e){const t={};let n=-1;for(;++n<e.length;)G2(t,e[n]);return t}function G2(e,t){let n;for(n in t){const i=(zf.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let s;if(u)for(s in u){zf.call(i,s)||(i[s]=[]);const a=u[s];V2(i[s],Array.isArray(a)?a:a?[a]:[])}}}function V2(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);et(e,0,0,r)}function fm(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Yt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ot=sr(/[A-Za-z]/),Tt=sr(/[\dA-Za-z]/),J2=sr(/[#-'*+\--9=?A-Z^-~]/);function Zs(e){return e!==null&&(e<32||e===127)}const Nl=sr(/\d/),j2=sr(/[\dA-Fa-f]/),Z2=sr(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function xe(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const Da=sr(new RegExp("\\p{P}|\\p{S}","u")),Mr=sr(/\s/);function sr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function pe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let u=0;return s;function s(o){return de(o)?(e.enter(n),a(o)):t(o)}function a(o){return de(o)&&u++<i?(e.consume(o),a):(e.exit(n),t(o))}}const X2={tokenize:$2};function $2(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),pe(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),u(a)}function u(a){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return X(a)?(e.consume(a),e.exit("chunkText"),u):(e.consume(a),s)}}const eE={tokenize:tE},Qf={tokenize:nE};function tE(e){const t=this,n=[];let r=0,i,u,s;return a;function a(w){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,o,l)(w)}return l(w)}function o(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&N();const _=t.events.length;let S=_,x;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){x=t.events[S][1].end;break}g(r);let O=_;for(;O<t.events.length;)t.events[O][1].end={...x},O++;return et(t.events,S+1,0,t.events.slice(_)),t.events.length=O,l(w)}return a(w)}function l(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qf,c,d)(w)}function c(w){return i&&N(),g(r),f(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(w)}function f(w){return t.containerState={},e.attempt(Qf,p,m)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function m(w){if(w===null){i&&N(),g(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:u}),A(w)}function A(w){if(w===null){E(e.exit("chunkFlow"),!0),g(0),e.consume(w);return}return X(w)?(e.consume(w),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(w),A)}function E(w,_){const S=t.sliceStream(w);if(_&&S.push(null),w.previous=u,u&&(u.next=w),u=w,i.defineSkip(w.start),i.write(S),t.parser.lazy[w.start.line]){let x=i.events.length;for(;x--;)if(i.events[x][1].start.offset<s&&(!i.events[x][1].end||i.events[x][1].end.offset>s))return;const O=t.events.length;let z=O,R,k;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(R){k=t.events[z][1].end;break}R=!0}for(g(r),x=O;x<t.events.length;)t.events[x][1].end={...k},x++;et(t.events,z+1,0,t.events.slice(O)),t.events.length=x}}function g(w){let _=n.length;for(;_-- >w;){const S=n[_];t.containerState=S[1],S[0].exit.call(t,e)}n.length=w}function N(){i.write([null]),u=void 0,i=void 0,t.containerState._closeFlow=void 0}}function nE(e,t,n){return pe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tr(e){if(e===null||xe(e)||Mr(e))return 1;if(Da(e))return 2}function Gu(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const u=e[i].resolveAll;u&&!r.includes(u)&&(t=u(t,n),r.push(u))}return t}const Dl={name:"attention",resolveAll:rE,tokenize:iE};function rE(e,t){let n=-1,r,i,u,s,a,o,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Yf(d,-o),Yf(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},u={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=vt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=vt(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",u,t]]),l=vt(l,Gu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=vt(l,[["exit",u,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=vt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,et(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function iE(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=tr(r);let u;return s;function s(o){return u=o,e.enter("attentionSequence"),a(o)}function a(o){if(o===u)return e.consume(o),a;const l=e.exit("attentionSequence"),c=tr(o),d=!c||c===2&&i||n.includes(o),f=!i||i===2&&c||n.includes(r);return l._open=!!(u===42?d:d&&(i||!f)),l._close=!!(u===42?f:f&&(c||!d)),t(o)}}function Yf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const uE={name:"autolink",tokenize:sE};function sE(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(p){return ot(p)?(e.consume(p),s):p===64?n(p):l(p)}function s(p){return p===43||p===45||p===46||Tt(p)?(r=1,a(p)):l(p)}function a(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||Tt(p))&&r++<32?(e.consume(p),a):(r=0,l(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Zs(p)?n(p):(e.consume(p),o)}function l(p){return p===64?(e.consume(p),c):J2(p)?(e.consume(p),l):n(p)}function c(p){return Tt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Tt(p))&&r++<63){const m=p===45?f:d;return e.consume(p),m}return n(p)}}const Vu={partial:!0,tokenize:aE};function aE(e,t,n){return r;function r(u){return de(u)?pe(e,i,"linePrefix")(u):i(u)}function i(u){return u===null||X(u)?t(u):n(u)}}const hm={continuation:{tokenize:lE},exit:cE,name:"blockQuote",tokenize:oE};function oE(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),u}return n(s)}function u(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function lE(e,t,n){const r=this;return i;function i(s){return de(s)?pe(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):u(s)}function u(s){return e.attempt(hm,t,n)(s)}}function cE(e){e.exit("blockQuote")}const pm={name:"characterEscape",tokenize:dE};function dE(e,t,n){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),i}function i(u){return Z2(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const mm={name:"characterReference",tokenize:fE};function fE(e,t,n){const r=this;let i=0,u,s;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),u=31,s=Tt,c(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,s=j2,c):(e.enter("characterReferenceValue"),u=7,s=Nl,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===Tt&&!Oc(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<u?(e.consume(d),c):n(d)}}const qf={partial:!0,tokenize:pE},Gf={concrete:!0,name:"codeFenced",tokenize:hE};function hE(e,t,n){const r=this,i={partial:!0,tokenize:S};let u=0,s=0,a;return o;function o(x){return l(x)}function l(x){const O=r.events[r.events.length-1];return u=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,a=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(x)}function c(x){return x===a?(s++,e.consume(x),c):s<3?n(x):(e.exit("codeFencedFenceSequence"),de(x)?pe(e,d,"whitespace")(x):d(x))}function d(x){return x===null||X(x)?(e.exit("codeFencedFence"),r.interrupt?t(x):e.check(qf,A,_)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(x))}function f(x){return x===null||X(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(x)):de(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pe(e,p,"whitespace")(x)):x===96&&x===a?n(x):(e.consume(x),f)}function p(x){return x===null||X(x)?d(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||X(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(x)):x===96&&x===a?n(x):(e.consume(x),m)}function A(x){return e.attempt(i,_,E)(x)}function E(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g}function g(x){return u>0&&de(x)?pe(e,N,"linePrefix",u+1)(x):N(x)}function N(x){return x===null||X(x)?e.check(qf,A,_)(x):(e.enter("codeFlowValue"),w(x))}function w(x){return x===null||X(x)?(e.exit("codeFlowValue"),N(x)):(e.consume(x),w)}function _(x){return e.exit("codeFenced"),t(x)}function S(x,O,z){let R=0;return k;function k(V){return x.enter("lineEnding"),x.consume(V),x.exit("lineEnding"),B}function B(V){return x.enter("codeFencedFence"),de(V)?pe(x,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):P(V)}function P(V){return V===a?(x.enter("codeFencedFenceSequence"),q(V)):z(V)}function q(V){return V===a?(R++,x.consume(V),q):R>=s?(x.exit("codeFencedFenceSequence"),de(V)?pe(x,J,"whitespace")(V):J(V)):z(V)}function J(V){return V===null||X(V)?(x.exit("codeFencedFence"),O(V)):z(V)}}}function pE(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),u)}function u(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const io={name:"codeIndented",tokenize:AE},mE={partial:!0,tokenize:gE};function AE(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),pe(e,u,"linePrefix",5)(l)}function u(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):X(l)?e.attempt(mE,s,o)(l):(e.enter("codeFlowValue"),a(l))}function a(l){return l===null||X(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),a)}function o(l){return e.exit("codeIndented"),t(l)}}function gE(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):X(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):pe(e,u,"linePrefix",5)(s)}function u(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):X(s)?i(s):n(s)}}const bE={name:"codeText",previous:yE,resolve:EE,tokenize:TE};function EE(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function yE(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function TE(e,t,n){let r=0,i,u;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(u=e.enter("codeTextSequence"),i=0,c(d)):X(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||X(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),l)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(u.type="codeTextData",l(d))}}class CE{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&vi(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),vi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),vi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);vi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);vi(this.left,n.reverse())}}}function vi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Am(e){const t={};let n=-1,r,i,u,s,a,o,l;const c=new CE(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,u=0,u<o.length&&o[u][1].type==="lineEndingBlank"&&(u+=2),u<o.length&&o[u][1].type==="content"))for(;++u<o.length&&o[u][1].type!=="content";)o[u][1].type==="chunkText"&&(o[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,kE(c,n)),n=t[n],l=!0);else if(r[1]._container){for(u=n,i=void 0;u--;)if(s=c.get(u),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=u);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return et(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function kE(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const u=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,o=[],l={};let c,d,f=-1,p=n,m=0,A=0;const E=[A];for(;p;){for(;e.get(++i)[1]!==p;);u.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(A=f+1,E.push(A),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):E.pop(),f=E.length;f--;){const g=a.slice(E[f],E[f+1]),N=u.pop();o.push([N,N+g.length-1]),e.splice(N,2,g)}for(o.reverse(),f=-1;++f<o.length;)l[m+o[f][0]]=m+o[f][1],m+=o[f][1]-o[f][0]-1;return l}const xE={resolve:IE,tokenize:SE},wE={partial:!0,tokenize:NE};function IE(e){return Am(e),e}function SE(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?u(a):X(a)?e.check(wE,s,u)(a):(e.consume(a),i)}function u(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function NE(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),pe(e,u,"linePrefix")}function u(s){if(s===null||X(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function gm(e,t,n,r,i,u,s,a,o){const l=o||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(u),e.consume(g),e.exit(u),f):g===null||g===32||g===41||Zs(g)?n(g):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),A(g))}function f(g){return g===62?(e.enter(u),e.consume(g),e.exit(u),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(a),f(g)):g===null||g===60||X(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function A(g){return!c&&(g===null||g===41||xe(g))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(g)):c<l&&g===40?(e.consume(g),c++,A):g===41?(e.consume(g),c--,A):g===null||g===32||g===40||Zs(g)?n(g):(e.consume(g),g===92?E:A)}function E(g){return g===40||g===41||g===92?(e.consume(g),A):A(g)}}function bm(e,t,n,r,i,u){const s=this;let a=0,o;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(u),c}function c(p){return a>999||p===null||p===91||p===93&&!o||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(u),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):X(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||X(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),o||(o=!de(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function Em(e,t,n,r,i,u){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(u),l(f))}function l(f){return f===s?(e.exit(u),o(s)):f===null?n(f):X(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),pe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||X(f)?(e.exit("chunkString"),l(f)):(e.consume(f),f===92?d:c)}function d(f){return f===s||f===92?(e.consume(f),c):c(f)}}function Xi(e,t){let n;return r;function r(i){return X(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):de(i)?pe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const DE={name:"definition",tokenize:OE},_E={partial:!0,tokenize:RE};function OE(e,t,n){const r=this;let i;return u;function u(p){return e.enter("definition"),s(p)}function s(p){return bm.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return xe(p)?Xi(e,l)(p):l(p)}function l(p){return gm(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(_E,d,d)(p)}function d(p){return de(p)?pe(e,f,"whitespace")(p):f(p)}function f(p){return p===null||X(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function RE(e,t,n){return r;function r(a){return xe(a)?Xi(e,i)(a):n(a)}function i(a){return Em(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function u(a){return de(a)?pe(e,s,"whitespace")(a):s(a)}function s(a){return a===null||X(a)?t(a):n(a)}}const ME={name:"hardBreakEscape",tokenize:BE};function BE(e,t,n){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),i}function i(u){return X(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const vE={name:"headingAtx",resolve:LE,tokenize:PE};function LE(e,t){let n=e.length-2,r=3,i,u;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},u={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},et(e,r,n-r+1,[["enter",i,t],["enter",u,t],["exit",u,t],["exit",i,t]])),e}function PE(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),u(c)}function u(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||xe(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),o(c)):c===null||X(c)?(e.exit("atxHeading"),t(c)):de(c)?pe(e,a,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function o(c){return c===35?(e.consume(c),o):(e.exit("atxHeadingSequence"),a(c))}function l(c){return c===null||c===35||xe(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),l)}}const FE=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Vf=["pre","script","style","textarea"],HE={concrete:!0,name:"htmlFlow",resolveTo:KE,tokenize:zE},UE={partial:!0,tokenize:YE},WE={partial:!0,tokenize:QE};function KE(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function zE(e,t,n){const r=this;let i,u,s,a,o;return l;function l(I){return c(I)}function c(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),d}function d(I){return I===33?(e.consume(I),f):I===47?(e.consume(I),u=!0,A):I===63?(e.consume(I),i=3,r.interrupt?t:C):ot(I)?(e.consume(I),s=String.fromCharCode(I),E):n(I)}function f(I){return I===45?(e.consume(I),i=2,p):I===91?(e.consume(I),i=5,a=0,m):ot(I)?(e.consume(I),i=4,r.interrupt?t:C):n(I)}function p(I){return I===45?(e.consume(I),r.interrupt?t:C):n(I)}function m(I){const ut="CDATA[";return I===ut.charCodeAt(a++)?(e.consume(I),a===ut.length?r.interrupt?t:P:m):n(I)}function A(I){return ot(I)?(e.consume(I),s=String.fromCharCode(I),E):n(I)}function E(I){if(I===null||I===47||I===62||xe(I)){const ut=I===47,Kt=s.toLowerCase();return!ut&&!u&&Vf.includes(Kt)?(i=1,r.interrupt?t(I):P(I)):FE.includes(s.toLowerCase())?(i=6,ut?(e.consume(I),g):r.interrupt?t(I):P(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):u?N(I):w(I))}return I===45||Tt(I)?(e.consume(I),s+=String.fromCharCode(I),E):n(I)}function g(I){return I===62?(e.consume(I),r.interrupt?t:P):n(I)}function N(I){return de(I)?(e.consume(I),N):k(I)}function w(I){return I===47?(e.consume(I),k):I===58||I===95||ot(I)?(e.consume(I),_):de(I)?(e.consume(I),w):k(I)}function _(I){return I===45||I===46||I===58||I===95||Tt(I)?(e.consume(I),_):S(I)}function S(I){return I===61?(e.consume(I),x):de(I)?(e.consume(I),S):w(I)}function x(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),o=I,O):de(I)?(e.consume(I),x):z(I)}function O(I){return I===o?(e.consume(I),o=null,R):I===null||X(I)?n(I):(e.consume(I),O)}function z(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||xe(I)?S(I):(e.consume(I),z)}function R(I){return I===47||I===62||de(I)?w(I):n(I)}function k(I){return I===62?(e.consume(I),B):n(I)}function B(I){return I===null||X(I)?P(I):de(I)?(e.consume(I),B):n(I)}function P(I){return I===45&&i===2?(e.consume(I),oe):I===60&&i===1?(e.consume(I),W):I===62&&i===4?(e.consume(I),le):I===63&&i===3?(e.consume(I),C):I===93&&i===5?(e.consume(I),we):X(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(UE,Oe,q)(I)):I===null||X(I)?(e.exit("htmlFlowData"),q(I)):(e.consume(I),P)}function q(I){return e.check(WE,J,Oe)(I)}function J(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),V}function V(I){return I===null||X(I)?q(I):(e.enter("htmlFlowData"),P(I))}function oe(I){return I===45?(e.consume(I),C):P(I)}function W(I){return I===47?(e.consume(I),s="",G):P(I)}function G(I){if(I===62){const ut=s.toLowerCase();return Vf.includes(ut)?(e.consume(I),le):P(I)}return ot(I)&&s.length<8?(e.consume(I),s+=String.fromCharCode(I),G):P(I)}function we(I){return I===93?(e.consume(I),C):P(I)}function C(I){return I===62?(e.consume(I),le):I===45&&i===2?(e.consume(I),C):P(I)}function le(I){return I===null||X(I)?(e.exit("htmlFlowData"),Oe(I)):(e.consume(I),le)}function Oe(I){return e.exit("htmlFlow"),t(I)}}function QE(e,t,n){const r=this;return i;function i(s){return X(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),u):n(s)}function u(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function YE(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Vu,t,n)}}const qE={name:"htmlText",tokenize:GE};function GE(e,t,n){const r=this;let i,u,s;return a;function a(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),o}function o(C){return C===33?(e.consume(C),l):C===47?(e.consume(C),S):C===63?(e.consume(C),w):ot(C)?(e.consume(C),z):n(C)}function l(C){return C===45?(e.consume(C),c):C===91?(e.consume(C),u=0,m):ot(C)?(e.consume(C),N):n(C)}function c(C){return C===45?(e.consume(C),p):n(C)}function d(C){return C===null?n(C):C===45?(e.consume(C),f):X(C)?(s=d,W(C)):(e.consume(C),d)}function f(C){return C===45?(e.consume(C),p):d(C)}function p(C){return C===62?oe(C):C===45?f(C):d(C)}function m(C){const le="CDATA[";return C===le.charCodeAt(u++)?(e.consume(C),u===le.length?A:m):n(C)}function A(C){return C===null?n(C):C===93?(e.consume(C),E):X(C)?(s=A,W(C)):(e.consume(C),A)}function E(C){return C===93?(e.consume(C),g):A(C)}function g(C){return C===62?oe(C):C===93?(e.consume(C),g):A(C)}function N(C){return C===null||C===62?oe(C):X(C)?(s=N,W(C)):(e.consume(C),N)}function w(C){return C===null?n(C):C===63?(e.consume(C),_):X(C)?(s=w,W(C)):(e.consume(C),w)}function _(C){return C===62?oe(C):w(C)}function S(C){return ot(C)?(e.consume(C),x):n(C)}function x(C){return C===45||Tt(C)?(e.consume(C),x):O(C)}function O(C){return X(C)?(s=O,W(C)):de(C)?(e.consume(C),O):oe(C)}function z(C){return C===45||Tt(C)?(e.consume(C),z):C===47||C===62||xe(C)?R(C):n(C)}function R(C){return C===47?(e.consume(C),oe):C===58||C===95||ot(C)?(e.consume(C),k):X(C)?(s=R,W(C)):de(C)?(e.consume(C),R):oe(C)}function k(C){return C===45||C===46||C===58||C===95||Tt(C)?(e.consume(C),k):B(C)}function B(C){return C===61?(e.consume(C),P):X(C)?(s=B,W(C)):de(C)?(e.consume(C),B):R(C)}function P(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),i=C,q):X(C)?(s=P,W(C)):de(C)?(e.consume(C),P):(e.consume(C),J)}function q(C){return C===i?(e.consume(C),i=void 0,V):C===null?n(C):X(C)?(s=q,W(C)):(e.consume(C),q)}function J(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||xe(C)?R(C):(e.consume(C),J)}function V(C){return C===47||C===62||xe(C)?R(C):n(C)}function oe(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function W(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),G}function G(C){return de(C)?pe(e,we,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):we(C)}function we(C){return e.enter("htmlTextData"),s(C)}}const Rc={name:"labelEnd",resolveAll:ZE,resolveTo:XE,tokenize:$E},VE={tokenize:ey},JE={tokenize:ty},jE={tokenize:ny};function ZE(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&et(e,0,e.length,n),e}function XE(e,t){let n=e.length,r=0,i,u,s,a;for(;n--;)if(i=e[n][1],u){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(u=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[u][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[u+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",o,t],["enter",l,t]],a=vt(a,e.slice(u+1,u+r+3)),a=vt(a,[["enter",c,t]]),a=vt(a,Gu(t.parser.constructs.insideSpan.null,e.slice(u+r+4,s-3),t)),a=vt(a,[["exit",c,t],e[s-2],e[s-1],["exit",l,t]]),a=vt(a,e.slice(s+1)),a=vt(a,[["exit",o,t]]),et(e,u,e.length,a),e}function $E(e,t,n){const r=this;let i=r.events.length,u,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){u=r.events[i][1];break}return a;function a(f){return u?u._inactive?d(f):(s=r.parser.defined.includes(Yt(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(VE,c,s?c:d)(f):f===91?e.attempt(JE,c,s?l:d)(f):s?c(f):d(f)}function l(f){return e.attempt(jE,c,d)(f)}function c(f){return t(f)}function d(f){return u._balanced=!0,n(f)}}function ey(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return xe(d)?Xi(e,u)(d):u(d)}function u(d){return d===41?c(d):gm(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return xe(d)?Xi(e,o)(d):c(d)}function a(d){return n(d)}function o(d){return d===34||d===39||d===40?Em(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function l(d){return xe(d)?Xi(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function ty(e,t,n){const r=this;return i;function i(a){return bm.call(r,e,u,s,"reference","referenceMarker","referenceString")(a)}function u(a){return r.parser.defined.includes(Yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function ny(e,t,n){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),i}function i(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const ry={name:"labelStartImage",resolveAll:Rc.resolveAll,tokenize:iy};function iy(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),u}function u(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const uy={name:"labelStartLink",resolveAll:Rc.resolveAll,tokenize:sy};function sy(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),u}function u(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const uo={name:"lineEnding",tokenize:ay};function ay(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),pe(e,t,"linePrefix")}}const Ls={name:"thematicBreak",tokenize:oy};function oy(e,t,n){let r=0,i;return u;function u(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,a(l)}function a(l){return l===i?(e.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||X(l))?(e.exit("thematicBreak"),t(l)):n(l)}function o(l){return l===i?(e.consume(l),r++,o):(e.exit("thematicBreakSequence"),de(l)?pe(e,a,"whitespace")(l):a(l))}}const bt={continuation:{tokenize:fy},exit:py,name:"list",tokenize:dy},ly={partial:!0,tokenize:my},cy={partial:!0,tokenize:hy};function dy(e,t,n){const r=this,i=r.events[r.events.length-1];let u=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Nl(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ls,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return Nl(p)&&++s<10?(e.consume(p),o):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Vu,r.interrupt?n:c,e.attempt(ly,f,d))}function c(p){return r.containerState.initialBlankLine=!0,u++,f(p)}function d(p){return de(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function fy(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Vu,i,u);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pe(e,t,"listItemIndent",r.containerState.size+1)(a)}function u(a){return r.containerState.furtherBlankLines||!de(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(cy,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,pe(e,e.attempt(bt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function hy(e,t,n){const r=this;return pe(e,i,"listItemIndent",r.containerState.size+1);function i(u){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(u):n(u)}}function py(e){e.exit(this.containerState.type)}function my(e,t,n){const r=this;return pe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(u){const s=r.events[r.events.length-1];return!de(u)&&s&&s[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const Jf={name:"setextUnderline",resolveTo:Ay,tokenize:gy};function Ay(e,t){let n=e.length,r,i,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",u?(e.splice(i,0,["enter",s,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end={...e[u][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function gy(e,t,n){const r=this;let i;return u;function u(l){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(e.consume(l),a):(e.exit("setextHeadingLineSequence"),de(l)?pe(e,o,"lineSuffix")(l):o(l))}function o(l){return l===null||X(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const by={tokenize:Ey};function Ey(e){const t=this,n=e.attempt(Vu,r,e.attempt(this.parser.constructs.flowInitial,i,pe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(xE,i)),"linePrefix")));return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const yy={resolveAll:Tm()},Ty=ym("string"),Cy=ym("text");function ym(e){return{resolveAll:Tm(e==="text"?ky:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],u=n.attempt(i,s,a);return s;function s(c){return l(c)?u(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),o}function o(c){return l(c)?(n.exit("data"),u(c)):(n.consume(c),o)}function l(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Tm(e){return t;function t(n,r){let i=-1,u;for(;++i<=n.length;)u===void 0?n[i]&&n[i][1].type==="data"&&(u=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==u+2&&(n[u][1].end=n[i-1][1].end,n.splice(u+2,i-u-2),i=u+2),u=void 0);return e?e(n,r):n}}function ky(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let u=i.length,s=-1,a=0,o;for(;u--;){const l=i[u];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)o=!0,a++;else if(l!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const l={type:n===e.length||o||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?s:r.start._bufferIndex+s,_index:r.start._index+u,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const xy={42:bt,43:bt,45:bt,48:bt,49:bt,50:bt,51:bt,52:bt,53:bt,54:bt,55:bt,56:bt,57:bt,62:hm},wy={91:DE},Iy={[-2]:io,[-1]:io,32:io},Sy={35:vE,42:Ls,45:[Jf,Ls],60:HE,61:Jf,95:Ls,96:Gf,126:Gf},Ny={38:mm,92:pm},Dy={[-5]:uo,[-4]:uo,[-3]:uo,33:ry,38:mm,42:Dl,60:[uE,qE],91:uy,92:[ME,pm],93:Rc,95:Dl,96:bE},_y={null:[Dl,yy]},Oy={null:[42,95]},Ry={null:[]},My=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Oy,contentInitial:wy,disable:Ry,document:xy,flow:Sy,flowInitial:Iy,insideSpan:_y,string:Ny,text:Dy},Symbol.toStringTag,{value:"Module"}));function By(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},u=[];let s=[],a=[];const o={attempt:O(S),check:O(x),consume:N,enter:w,exit:_,interrupt:O(x,{interrupt:!0})},l={code:null,containerState:{},defineSkip:A,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let c=t.tokenize.call(l,o);return t.resolveAll&&u.push(t),l;function d(B){return s=vt(s,B),E(),s[s.length-1]!==null?[]:(z(t,0),l.events=Gu(u,l.events,l),l.events)}function f(B,P){return Ly(p(B),P)}function p(B){return vy(s,B)}function m(){const{_bufferIndex:B,_index:P,line:q,column:J,offset:V}=r;return{_bufferIndex:B,_index:P,line:q,column:J,offset:V}}function A(B){i[B.line]=B.column,k()}function E(){let B;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<P.length;)g(P.charCodeAt(r._bufferIndex));else g(P)}}function g(B){c=c(B)}function N(B){X(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,k()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=B}function w(B,P){const q=P||{};return q.type=B,q.start=m(),l.events.push(["enter",q,l]),a.push(q),q}function _(B){const P=a.pop();return P.end=m(),l.events.push(["exit",P,l]),P}function S(B,P){z(B,P.from)}function x(B,P){P.restore()}function O(B,P){return q;function q(J,V,oe){let W,G,we,C;return Array.isArray(J)?Oe(J):"tokenize"in J?Oe([J]):le(J);function le(He){return jt;function jt(Zt){const dn=Zt!==null&&He[Zt],fn=Zt!==null&&He.null,Ee=[...Array.isArray(dn)?dn:dn?[dn]:[],...Array.isArray(fn)?fn:fn?[fn]:[]];return Oe(Ee)(Zt)}}function Oe(He){return W=He,G=0,He.length===0?oe:I(He[G])}function I(He){return jt;function jt(Zt){return C=R(),we=He,He.partial||(l.currentConstruct=He),He.name&&l.parser.constructs.disable.null.includes(He.name)?Kt():He.tokenize.call(P?Object.assign(Object.create(l),P):l,o,ut,Kt)(Zt)}}function ut(He){return B(we,C),V}function Kt(He){return C.restore(),++G<W.length?I(W[G]):oe}}}function z(B,P){B.resolveAll&&!u.includes(B)&&u.push(B),B.resolve&&et(l.events,P,l.events.length-P,B.resolve(l.events.slice(P),l)),B.resolveTo&&(l.events=B.resolveTo(l.events,l))}function R(){const B=m(),P=l.previous,q=l.currentConstruct,J=l.events.length,V=Array.from(a);return{from:J,restore:oe};function oe(){r=B,l.previous=P,l.currentConstruct=q,l.events.length=J,a=V,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function vy(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,u=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,u)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}u>0&&s.push(e[i].slice(0,u))}return s}function Ly(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const u=e[n];let s;if(typeof u=="string")s=u;else switch(u){case-5:{s="\r";break}case-4:{s=`
3
3
  `;break}case-3:{s=`\r
4
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(u)}i=u===-2,r.push(s)}return r.join("")}function cy(e){const r={constructs:tm([sy,...(e||{}).extensions||[]]),content:i(w2),defined:[],document:i(S2),flow:i(YE),lazy:{},string:i(VE),text:i(JE)};return r;function i(u){return s;function s(a){return ay(r,u,a)}}}function dy(e){for(;!sm(e););return e}const Vf=/[\0\t\n\r]/g;function fy(){let e=1,t="",n=!0,r;return i;function i(u,s,a){const o=[];let l,c,d,f,p;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(s||void 0).decode(u)),d=0,t="",n&&(u.charCodeAt(0)===65279&&d++,n=void 0);d<u.length;){if(Vf.lastIndex=d,l=Vf.exec(u),f=l&&l.index!==void 0?l.index:u.length,p=u.charCodeAt(f),!l){t=u.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(u.slice(d,f)),e+=f-d),p){case 0:{o.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,o.push(-2);e++<c;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return a&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const hy=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fm(e){return e.replace(hy,py)}function py(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),u=i===120||i===88;return nm(n.slice(u?2:1),u?16:10)}return Nc(n)||e}function qi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jf(e.position):"start"in e||"end"in e?Jf(e):"line"in e||"column"in e?kl(e):""}function kl(e){return jf(e&&e.line)+":"+jf(e&&e.column)}function Jf(e){return kl(e&&e.start)+"-"+kl(e&&e.end)}function jf(e){return e&&typeof e=="number"?e:1}const hm={}.hasOwnProperty;function my(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ay(n)(dy(cy(n).document().write(fy()(e,t,!0))))}function Ay(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ii),autolinkProtocol:O,autolinkEmail:O,atxHeading:u(is),blockQuote:u(ln),characterEscape:O,characterReference:O,codeFenced:u(Ee),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:u(Ee,s),codeText:u(wi,s),codeTextData:O,data:O,codeFlowValue:O,definition:u(cn),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:u(rs),hardBreakEscape:u(us),hardBreakTrailing:u(us),htmlFlow:u(ss,s),htmlFlowData:O,htmlText:u(ss,s),htmlTextData:O,image:u(Ja),label:s,link:u(Ii),listItem:u(dn),listItemValue:f,listOrdered:u(Ze,d),listUnordered:u(Ze),paragraph:u(He),reference:I,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:u(is),strong:u(ut),thematicBreak:u(lt)},exit:{atxHeading:o(),atxHeadingSequence:S,autolink:o(),autolinkEmail:on,autolinkProtocol:qt,blockQuote:o(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:Wt,characterReferenceMarkerNumeric:Wt,characterReferenceValue:Fe,characterReference:Gt,codeFenced:o(E),codeFencedFence:A,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:x,codeIndented:o(g),codeText:o(V),codeTextData:x,data:x,definition:o(),definitionDestinationString:_,definitionLabelString:N,definitionTitleString:w,emphasis:o(),hardBreakEscape:o(P),hardBreakTrailing:o(P),htmlFlow:o(G),htmlFlowData:x,htmlText:o(J),htmlTextData:x,image:o(W),label:we,labelText:q,lineEnding:B,link:o(se),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:it,resourceDestinationString:C,resourceTitleString:oe,resource:_e,setextHeading:o(Q),setextHeadingLineSequence:R,setextHeadingText:k,strong:o(),thematicBreak:o()}};pm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let z={type:"root",children:[]};const j={stack:[z],tokenStack:[],config:t,enter:a,exit:l,buffer:s,resume:c,data:n},te=[];let be=-1;for(;++be<L.length;)if(L[be][1].type==="listOrdered"||L[be][1].type==="listUnordered")if(L[be][0]==="enter")te.push(be);else{const Kt=te.pop();be=i(L,Kt,be)}for(be=-1;++be<L.length;){const Kt=t[L[be][0]];hm.call(Kt,L[be][1].type)&&Kt[L[be][1].type].call(Object.assign({sliceSerialize:L[be][2].sliceSerialize},j),L[be][1])}if(j.tokenStack.length>0){const Kt=j.tokenStack[j.tokenStack.length-1];(Kt[1]||Zf).call(j,void 0,Kt[0])}for(z.position={start:vn(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:vn(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<t.transforms.length;)z=t.transforms[be](z)||z;return z}function i(L,z,j){let te=z-1,be=-1,Kt=!1,dr,fn,Si,Ni;for(;++te<=j;){const Et=L[te];switch(Et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Et[0]==="enter"?be++:be--,Ni=void 0;break}case"lineEndingBlank":{Et[0]==="enter"&&(dr&&!Ni&&!be&&!Si&&(Si=te),Ni=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ni=void 0}if(!be&&Et[0]==="enter"&&Et[1].type==="listItemPrefix"||be===-1&&Et[0]==="exit"&&(Et[1].type==="listUnordered"||Et[1].type==="listOrdered")){if(dr){let zr=te;for(fn=void 0;zr--;){const hn=L[zr];if(hn[1].type==="lineEnding"||hn[1].type==="lineEndingBlank"){if(hn[0]==="exit")continue;fn&&(L[fn][1].type="lineEndingBlank",Kt=!0),hn[1].type="lineEnding",fn=zr}else if(!(hn[1].type==="linePrefix"||hn[1].type==="blockQuotePrefix"||hn[1].type==="blockQuotePrefixWhitespace"||hn[1].type==="blockQuoteMarker"||hn[1].type==="listItemIndent"))break}Si&&(!fn||Si<fn)&&(dr._spread=!0),dr.end=Object.assign({},fn?L[fn][1].start:Et[1].end),L.splice(fn||te,0,["exit",dr,Et[2]]),te++,j++}if(Et[1].type==="listItemPrefix"){const zr={type:"listItem",_spread:!1,start:Object.assign({},Et[1].start),end:void 0};dr=zr,L.splice(te,0,["enter",zr,Et[2]]),te++,j++,Si=void 0,Ni=!0}}}return L[z][1]._spread=Kt,j}function u(L,z){return j;function j(te){a.call(this,L(te),te),z&&z.call(this,te)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(L,z,j){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([z,j||void 0]),L.position={start:vn(z.start),end:void 0}}function o(L){return z;function z(j){L&&L.call(this,j),l.call(this,j)}}function l(L,z){const j=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==L.type&&(z?z.call(this,L,te[0]):(te[1]||Zf).call(this,L,te[0]));else throw new Error("Cannot close `"+L.type+"` ("+qi({start:L.start,end:L.end})+"): it’s not open");j.position.end=vn(L.end)}function c(){return Sc(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(L){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function p(){const L=this.resume(),z=this.stack[this.stack.length-1];z.lang=L}function m(){const L=this.resume(),z=this.stack[this.stack.length-1];z.meta=L}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const L=this.resume(),z=this.stack[this.stack.length-1];z.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const L=this.resume(),z=this.stack[this.stack.length-1];z.value=L.replace(/(\r?\n|\r)$/g,"")}function N(L){const z=this.resume(),j=this.stack[this.stack.length-1];j.label=z,j.identifier=Qt(this.sliceSerialize(L)).toLowerCase()}function w(){const L=this.resume(),z=this.stack[this.stack.length-1];z.title=L}function _(){const L=this.resume(),z=this.stack[this.stack.length-1];z.url=L}function S(L){const z=this.stack[this.stack.length-1];if(!z.depth){const j=this.sliceSerialize(L).length;z.depth=j}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function R(L){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function Q(){this.data.setextHeadingSlurpLineEnding=void 0}function O(L){const j=this.stack[this.stack.length-1].children;let te=j[j.length-1];(!te||te.type!=="text")&&(te=Le(),te.position={start:vn(L.start),end:void 0},j.push(te)),this.stack.push(te)}function x(L){const z=this.stack.pop();z.value+=this.sliceSerialize(L),z.position.end=vn(L.end)}function B(L){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const j=z.children[z.children.length-1];j.position.end=vn(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(O.call(this,L),x.call(this,L))}function P(){this.data.atHardBreak=!0}function G(){const L=this.resume(),z=this.stack[this.stack.length-1];z.value=L}function J(){const L=this.resume(),z=this.stack[this.stack.length-1];z.value=L}function V(){const L=this.resume(),z=this.stack[this.stack.length-1];z.value=L}function se(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=z,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function W(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=z,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function q(L){const z=this.sliceSerialize(L),j=this.stack[this.stack.length-2];j.label=fm(z),j.identifier=Qt(z).toLowerCase()}function we(){const L=this.stack[this.stack.length-1],z=this.resume(),j=this.stack[this.stack.length-1];if(this.data.inReference=!0,j.type==="link"){const te=L.children;j.children=te}else j.alt=z}function C(){const L=this.resume(),z=this.stack[this.stack.length-1];z.url=L}function oe(){const L=this.resume(),z=this.stack[this.stack.length-1];z.title=L}function _e(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function it(L){const z=this.resume(),j=this.stack[this.stack.length-1];j.label=z,j.identifier=Qt(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function Wt(L){this.data.characterReferenceType=L.type}function Fe(L){const z=this.sliceSerialize(L),j=this.data.characterReferenceType;let te;j?(te=nm(z,j==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Nc(z);const be=this.stack[this.stack.length-1];be.value+=te}function Gt(L){const z=this.stack.pop();z.position.end=vn(L.end)}function qt(L){x.call(this,L);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(L)}function on(L){x.call(this,L);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(L)}function ln(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function wi(){return{type:"inlineCode",value:""}}function cn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function rs(){return{type:"emphasis",children:[]}}function is(){return{type:"heading",depth:0,children:[]}}function us(){return{type:"break"}}function ss(){return{type:"html",value:""}}function Ja(){return{type:"image",title:null,url:"",alt:null}}function Ii(){return{type:"link",title:null,url:"",children:[]}}function Ze(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function dn(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function He(){return{type:"paragraph",children:[]}}function ut(){return{type:"strong",children:[]}}function Le(){return{type:"text",value:""}}function lt(){return{type:"thematicBreak"}}}function vn(e){return{line:e.line,column:e.column,offset:e.offset}}function pm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?pm(e,r):gy(e,r)}}function gy(e,t){let n;for(n in t)if(hm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Zf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qi({start:t.start,end:t.end})+") is still open")}function wl(e){const t=this;t.parser=n;function n(r){return my(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const Xf={}.hasOwnProperty;function by(e,t){const n=t||{};function r(i,...u){let s=r.invalid;const a=r.handlers;if(i&&Xf.call(i,e)){const o=String(i[e]);s=Xf.call(a,o)?a[o]:r.unknown}if(s)return s.call(this,i,...u)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ey={}.hasOwnProperty;function mm(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)mm(e,t.extensions[n]);for(r in t)if(Ey.call(t,r))switch(r){case"extensions":break;case"unsafe":{$f(e[r],t[r]);break}case"join":{$f(e[r],t[r]);break}case"handlers":{yy(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function $f(e,t){t&&e.push(...t)}function yy(e,t){t&&Object.assign(e,t)}function Ty(e,t,n,r){const i=n.enter("blockquote"),u=n.createTracker(r);u.move("> "),u.shift(2);const s=n.indentLines(n.containerFlow(e,u.current()),Cy);return i(),s}function Cy(e,t,n){return">"+(n?"":" ")+e}function Am(e,t){return eh(e,t.inConstruct,!0)&&!eh(e,t.notInConstruct,!1)}function eh(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function th(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
5
- `&&Am(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
6
- `}function xy(e,t){const n=String(e);let r=n.indexOf(t),i=r,u=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++u>s&&(s=u):u=1,i=r+t.length,r=n.indexOf(t,i);return s}function Il(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ky(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function wy(e,t,n,r){const i=ky(n),u=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Il(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(u,Iy);return d(),f}const a=n.createTracker(r),o=i.repeat(Math.max(xy(u,i)+1,3)),l=n.enter("codeFenced");let c=a.move(o);if(e.lang){const d=n.enter(`codeFencedLang${s}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:`
4
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(u)}i=u===-2,r.push(s)}return r.join("")}function Py(e){const r={constructs:dm([My,...(e||{}).extensions||[]]),content:i(X2),defined:[],document:i(eE),flow:i(by),lazy:{},string:i(Ty),text:i(Cy)};return r;function i(u){return s;function s(a){return By(r,u,a)}}}function Fy(e){for(;!Am(e););return e}const jf=/[\0\t\n\r]/g;function Hy(){let e=1,t="",n=!0,r;return i;function i(u,s,a){const o=[];let l,c,d,f,p;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(s||void 0).decode(u)),d=0,t="",n&&(u.charCodeAt(0)===65279&&d++,n=void 0);d<u.length;){if(jf.lastIndex=d,l=jf.exec(u),f=l&&l.index!==void 0?l.index:u.length,p=u.charCodeAt(f),!l){t=u.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(u.slice(d,f)),e+=f-d),p){case 0:{o.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,o.push(-2);e++<c;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return a&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const Uy=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Cm(e){return e.replace(Uy,Wy)}function Wy(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),u=i===120||i===88;return fm(n.slice(u?2:1),u?16:10)}return Oc(n)||e}function $i(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Zf(e.position):"start"in e||"end"in e?Zf(e):"line"in e||"column"in e?_l(e):""}function _l(e){return Xf(e&&e.line)+":"+Xf(e&&e.column)}function Zf(e){return _l(e&&e.start)+"-"+_l(e&&e.end)}function Xf(e){return e&&typeof e=="number"?e:1}const km={}.hasOwnProperty;function Ky(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),zy(n)(Fy(Py(n).document().write(Hy()(e,t,!0))))}function zy(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ri),autolinkProtocol:R,autolinkEmail:R,atxHeading:u(gs),blockQuote:u(fn),characterEscape:R,characterReference:R,codeFenced:u(Ee),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:u(Ee,s),codeText:u(Oi,s),codeTextData:R,data:R,codeFlowValue:R,definition:u(hn),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:u(As),hardBreakEscape:u(bs),hardBreakTrailing:u(bs),htmlFlow:u(Es,s),htmlFlowData:R,htmlText:u(Es,s),htmlTextData:R,image:u(no),label:s,link:u(Ri),listItem:u(pn),listItemValue:f,listOrdered:u(Xe,d),listUnordered:u(Xe),paragraph:u(Ue),reference:I,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:u(gs),strong:u(st),thematicBreak:u(At)},exit:{atxHeading:o(),atxHeadingSequence:S,autolink:o(),autolinkEmail:dn,autolinkProtocol:Zt,blockQuote:o(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Kt,characterReferenceMarkerNumeric:Kt,characterReferenceValue:He,characterReference:jt,codeFenced:o(E),codeFencedFence:A,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:k,codeIndented:o(g),codeText:o(V),codeTextData:k,data:k,definition:o(),definitionDestinationString:_,definitionLabelString:N,definitionTitleString:w,emphasis:o(),hardBreakEscape:o(P),hardBreakTrailing:o(P),htmlFlow:o(q),htmlFlowData:k,htmlText:o(J),htmlTextData:k,image:o(W),label:we,labelText:G,lineEnding:B,link:o(oe),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:ut,resourceDestinationString:C,resourceTitleString:le,resource:Oe,setextHeading:o(z),setextHeadingLineSequence:O,setextHeadingText:x,strong:o(),thematicBreak:o()}};xm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(v){let Q={type:"root",children:[]};const j={stack:[Q],tokenStack:[],config:t,enter:a,exit:l,buffer:s,resume:c,data:n},te=[];let be=-1;for(;++be<v.length;)if(v[be][1].type==="listOrdered"||v[be][1].type==="listUnordered")if(v[be][0]==="enter")te.push(be);else{const zt=te.pop();be=i(v,zt,be)}for(be=-1;++be<v.length;){const zt=t[v[be][0]];km.call(zt,v[be][1].type)&&zt[v[be][1].type].call(Object.assign({sliceSerialize:v[be][2].sliceSerialize},j),v[be][1])}if(j.tokenStack.length>0){const zt=j.tokenStack[j.tokenStack.length-1];(zt[1]||$f).call(j,void 0,zt[0])}for(Q.position={start:Pn(v.length>0?v[0][1].start:{line:1,column:1,offset:0}),end:Pn(v.length>0?v[v.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<t.transforms.length;)Q=t.transforms[be](Q)||Q;return Q}function i(v,Q,j){let te=Q-1,be=-1,zt=!1,pr,mn,Mi,Bi;for(;++te<=j;){const wt=v[te];switch(wt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{wt[0]==="enter"?be++:be--,Bi=void 0;break}case"lineEndingBlank":{wt[0]==="enter"&&(pr&&!Bi&&!be&&!Mi&&(Mi=te),Bi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bi=void 0}if(!be&&wt[0]==="enter"&&wt[1].type==="listItemPrefix"||be===-1&&wt[0]==="exit"&&(wt[1].type==="listUnordered"||wt[1].type==="listOrdered")){if(pr){let Yr=te;for(mn=void 0;Yr--;){const An=v[Yr];if(An[1].type==="lineEnding"||An[1].type==="lineEndingBlank"){if(An[0]==="exit")continue;mn&&(v[mn][1].type="lineEndingBlank",zt=!0),An[1].type="lineEnding",mn=Yr}else if(!(An[1].type==="linePrefix"||An[1].type==="blockQuotePrefix"||An[1].type==="blockQuotePrefixWhitespace"||An[1].type==="blockQuoteMarker"||An[1].type==="listItemIndent"))break}Mi&&(!mn||Mi<mn)&&(pr._spread=!0),pr.end=Object.assign({},mn?v[mn][1].start:wt[1].end),v.splice(mn||te,0,["exit",pr,wt[2]]),te++,j++}if(wt[1].type==="listItemPrefix"){const Yr={type:"listItem",_spread:!1,start:Object.assign({},wt[1].start),end:void 0};pr=Yr,v.splice(te,0,["enter",Yr,wt[2]]),te++,j++,Mi=void 0,Bi=!0}}}return v[Q][1]._spread=zt,j}function u(v,Q){return j;function j(te){a.call(this,v(te),te),Q&&Q.call(this,te)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(v,Q,j){this.stack[this.stack.length-1].children.push(v),this.stack.push(v),this.tokenStack.push([Q,j||void 0]),v.position={start:Pn(Q.start),end:void 0}}function o(v){return Q;function Q(j){v&&v.call(this,j),l.call(this,j)}}function l(v,Q){const j=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==v.type&&(Q?Q.call(this,v,te[0]):(te[1]||$f).call(this,v,te[0]));else throw new Error("Cannot close `"+v.type+"` ("+$i({start:v.start,end:v.end})+"): it’s not open");j.position.end=Pn(v.end)}function c(){return _c(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(v){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize(v),10),this.data.expectingFirstListItemValue=void 0}}function p(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=v}function m(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=v}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.value=v.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.value=v.replace(/(\r?\n|\r)$/g,"")}function N(v){const Q=this.resume(),j=this.stack[this.stack.length-1];j.label=Q,j.identifier=Yt(this.sliceSerialize(v)).toLowerCase()}function w(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.title=v}function _(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.url=v}function S(v){const Q=this.stack[this.stack.length-1];if(!Q.depth){const j=this.sliceSerialize(v).length;Q.depth=j}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function O(v){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize(v).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function R(v){const j=this.stack[this.stack.length-1].children;let te=j[j.length-1];(!te||te.type!=="text")&&(te=Le(),te.position={start:Pn(v.start),end:void 0},j.push(te)),this.stack.push(te)}function k(v){const Q=this.stack.pop();Q.value+=this.sliceSerialize(v),Q.position.end=Pn(v.end)}function B(v){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const j=Q.children[Q.children.length-1];j.position.end=Pn(v.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(R.call(this,v),k.call(this,v))}function P(){this.data.atHardBreak=!0}function q(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.value=v}function J(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.value=v}function V(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.value=v}function oe(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=Q,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function W(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=Q,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function G(v){const Q=this.sliceSerialize(v),j=this.stack[this.stack.length-2];j.label=Cm(Q),j.identifier=Yt(Q).toLowerCase()}function we(){const v=this.stack[this.stack.length-1],Q=this.resume(),j=this.stack[this.stack.length-1];if(this.data.inReference=!0,j.type==="link"){const te=v.children;j.children=te}else j.alt=Q}function C(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.url=v}function le(){const v=this.resume(),Q=this.stack[this.stack.length-1];Q.title=v}function Oe(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ut(v){const Q=this.resume(),j=this.stack[this.stack.length-1];j.label=Q,j.identifier=Yt(this.sliceSerialize(v)).toLowerCase(),this.data.referenceType="full"}function Kt(v){this.data.characterReferenceType=v.type}function He(v){const Q=this.sliceSerialize(v),j=this.data.characterReferenceType;let te;j?(te=fm(Q,j==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Oc(Q);const be=this.stack[this.stack.length-1];be.value+=te}function jt(v){const Q=this.stack.pop();Q.position.end=Pn(v.end)}function Zt(v){k.call(this,v);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize(v)}function dn(v){k.call(this,v);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize(v)}function fn(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function Oi(){return{type:"inlineCode",value:""}}function hn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function As(){return{type:"emphasis",children:[]}}function gs(){return{type:"heading",depth:0,children:[]}}function bs(){return{type:"break"}}function Es(){return{type:"html",value:""}}function no(){return{type:"image",title:null,url:"",alt:null}}function Ri(){return{type:"link",title:null,url:"",children:[]}}function Xe(v){return{type:"list",ordered:v.type==="listOrdered",start:null,spread:v._spread,children:[]}}function pn(v){return{type:"listItem",spread:v._spread,checked:null,children:[]}}function Ue(){return{type:"paragraph",children:[]}}function st(){return{type:"strong",children:[]}}function Le(){return{type:"text",value:""}}function At(){return{type:"thematicBreak"}}}function Pn(e){return{line:e.line,column:e.column,offset:e.offset}}function xm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?xm(e,r):Qy(e,r)}}function Qy(e,t){let n;for(n in t)if(km.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function $f(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$i({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$i({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$i({start:t.start,end:t.end})+") is still open")}function Ol(e){const t=this;t.parser=n;function n(r){return Ky(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const eh={}.hasOwnProperty;function Yy(e,t){const n=t||{};function r(i,...u){let s=r.invalid;const a=r.handlers;if(i&&eh.call(i,e)){const o=String(i[e]);s=eh.call(a,o)?a[o]:r.unknown}if(s)return s.call(this,i,...u)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const qy={}.hasOwnProperty;function wm(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)wm(e,t.extensions[n]);for(r in t)if(qy.call(t,r))switch(r){case"extensions":break;case"unsafe":{th(e[r],t[r]);break}case"join":{th(e[r],t[r]);break}case"handlers":{Gy(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function th(e,t){t&&e.push(...t)}function Gy(e,t){t&&Object.assign(e,t)}function Vy(e,t,n,r){const i=n.enter("blockquote"),u=n.createTracker(r);u.move("> "),u.shift(2);const s=n.indentLines(n.containerFlow(e,u.current()),Jy);return i(),s}function Jy(e,t,n){return">"+(n?"":" ")+e}function Im(e,t){return nh(e,t.inConstruct,!0)&&!nh(e,t.notInConstruct,!1)}function nh(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function rh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
5
+ `&&Im(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
6
+ `}function jy(e,t){const n=String(e);let r=n.indexOf(t),i=r,u=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++u>s&&(s=u):u=1,i=r+t.length,r=n.indexOf(t,i);return s}function Rl(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Zy(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Xy(e,t,n,r){const i=Zy(n),u=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Rl(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(u,$y);return d(),f}const a=n.createTracker(r),o=i.repeat(Math.max(jy(u,i)+1,3)),l=n.enter("codeFenced");let c=a.move(o);if(e.lang){const d=n.enter(`codeFencedLang${s}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:`
7
7
  `,encode:["`"],...a.current()})),d()}return c+=a.move(`
8
8
  `),u&&(c+=a.move(u+`
9
- `)),c+=a.move(o),l(),c}function Iy(e,t,n){return(n?"":" ")+e}function _c(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Sy(e,t,n,r){const i=_c(n),u=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");return l+=o.move(n.safe(n.associationId(e),{before:l,after:"]",...o.current()})),l+=o.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(a=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":`
10
- `,...o.current()}))),a(),e.title&&(a=n.enter(`title${u}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),a()),s(),l}function Ny(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function er(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Hs(e,t,n){const r=$n(e),i=$n(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gm.peek=Dy;function gm(e,t,n,r){const i=Ny(n),u=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const l=o.charCodeAt(0),c=Hs(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(o=er(l)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Hs(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+er(d));const p=s.move(i);return u(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+o+p}function Dy(e,t,n){return n.options.emphasis||"*"}const ka=(function(e){if(e==null)return My;if(typeof e=="function")return wa(e);if(typeof e=="object")return Array.isArray(e)?_y(e):Oy(e);if(typeof e=="string")return Ry(e);throw new Error("Expected function, string, or object as test")});function _y(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ka(e[n]);return wa(r);function r(...i){let u=-1;for(;++u<t.length;)if(t[u].apply(this,i))return!0;return!1}}function Oy(e){const t=e;return wa(n);function n(r){const i=r;let u;for(u in e)if(i[u]!==t[u])return!1;return!0}}function Ry(e){return wa(t);function t(n){return n&&n.type===e}}function wa(e){return t;function t(n,r,i){return!!(By(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function My(){return!0}function By(e){return e!==null&&typeof e=="object"&&"type"in e}const bm=[],Ly=!0,Sl=!1,Nl="skip";function Oc(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const u=ka(i),s=r?-1:1;a(e,void 0,[])();function a(o,l,c){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=bm,m,A,E;if((!t||u(o,l,c[c.length-1]||void 0))&&(p=vy(n(o,c)),p[0]===Sl))return p;if("children"in o&&o.children){const g=o;if(g.children&&p[0]!==Nl)for(A=(r?g.children.length:-1)+s,E=c.concat(g);A>-1&&A<g.children.length;){const N=g.children[A];if(m=a(N,A,E)(),m[0]===Sl)return m;A=typeof m[1]=="number"?m[1]:A+s}}return p}}}function vy(e){return Array.isArray(e)?e:typeof e=="number"?[Ly,e]:e==null?bm:[e]}function mi(e,t,n,r){let i,u,s;typeof t=="function"&&typeof n!="function"?(u=void 0,s=t,i=n):(u=t,s=n,i=r),Oc(e,u,a,i);function a(o,l){const c=l[l.length-1],d=c?c.children.indexOf(o):void 0;return s(o,d,c)}}function Em(e,t){let n=!1;return mi(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Sl}),!!((!e.depth||e.depth<3)&&Sc(e)&&(t.options.setext||n))}function Py(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(r);if(Em(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...u.current(),before:`
9
+ `)),c+=a.move(o),l(),c}function $y(e,t,n){return(n?"":" ")+e}function Mc(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function e3(e,t,n,r){const i=Mc(n),u=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");return l+=o.move(n.safe(n.associationId(e),{before:l,after:"]",...o.current()})),l+=o.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(a=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":`
10
+ `,...o.current()}))),a(),e.title&&(a=n.enter(`title${u}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),a()),s(),l}function t3(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function nr(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xs(e,t,n){const r=tr(e),i=tr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Sm.peek=n3;function Sm(e,t,n,r){const i=t3(n),u=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const l=o.charCodeAt(0),c=Xs(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(o=nr(l)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Xs(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+nr(d));const p=s.move(i);return u(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+o+p}function n3(e,t,n){return n.options.emphasis||"*"}const _a=(function(e){if(e==null)return s3;if(typeof e=="function")return Oa(e);if(typeof e=="object")return Array.isArray(e)?r3(e):i3(e);if(typeof e=="string")return u3(e);throw new Error("Expected function, string, or object as test")});function r3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_a(e[n]);return Oa(r);function r(...i){let u=-1;for(;++u<t.length;)if(t[u].apply(this,i))return!0;return!1}}function i3(e){const t=e;return Oa(n);function n(r){const i=r;let u;for(u in e)if(i[u]!==t[u])return!1;return!0}}function u3(e){return Oa(t);function t(n){return n&&n.type===e}}function Oa(e){return t;function t(n,r,i){return!!(a3(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function s3(){return!0}function a3(e){return e!==null&&typeof e=="object"&&"type"in e}const Nm=[],o3=!0,Ml=!1,$s="skip";function Bc(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const u=_a(i),s=r?-1:1;a(e,void 0,[])();function a(o,l,c){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Nm,m,A,E;if((!t||u(o,l,c[c.length-1]||void 0))&&(p=l3(n(o,c)),p[0]===Ml))return p;if("children"in o&&o.children){const g=o;if(g.children&&p[0]!==$s)for(A=(r?g.children.length:-1)+s,E=c.concat(g);A>-1&&A<g.children.length;){const N=g.children[A];if(m=a(N,A,E)(),m[0]===Ml)return m;A=typeof m[1]=="number"?m[1]:A+s}}return p}}}function l3(e){return Array.isArray(e)?e:typeof e=="number"?[o3,e]:e==null?Nm:[e]}function Ti(e,t,n,r){let i,u,s;typeof t=="function"&&typeof n!="function"?(u=void 0,s=t,i=n):(u=t,s=n,i=r),Bc(e,u,a,i);function a(o,l){const c=l[l.length-1],d=c?c.children.indexOf(o):void 0;return s(o,d,c)}}function Dm(e,t){let n=!1;return Ti(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ml}),!!((!e.depth||e.depth<3)&&_c(e)&&(t.options.setext||n))}function c3(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(r);if(Dm(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...u.current(),before:`
11
11
  `,after:`
12
12
  `});return d(),c(),f+`
13
13
  `+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
14
14
  `))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),o=n.enter("phrasing");u.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
15
- `,...u.current()});return/^[\t ]/.test(l)&&(l=er(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),o(),a(),l}ym.peek=Fy;function ym(e){return e.value||""}function Fy(){return"<"}Tm.peek=Hy;function Tm(e,t,n,r){const i=_c(n),u=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");return l+=o.move(n.safe(e.alt,{before:l,after:"]",...o.current()})),l+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(a=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${u}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),a()),l+=o.move(")"),s(),l}function Hy(){return"!"}Cm.peek=Uy;function Cm(e,t,n,r){const i=e.referenceType,u=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let o=a.move("![");const l=n.safe(e.alt,{before:o,after:"]",...a.current()});o+=a.move(l+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return s(),n.stack=c,u(),i==="full"||!l||l!==d?o+=a.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function Uy(){return"!"}xm.peek=Wy;function xm(e,t,n){let r=e.value||"",i="`",u=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<n.unsafe.length;){const s=n.unsafe[u],a=n.compilePattern(s);let o;if(s.atBreak)for(;o=a.exec(r);){let l=o.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(o.index+1)}}return i+r+i}function Wy(){return"`"}function km(e,t){const n=Sc(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}wm.peek=Ky;function wm(e,t,n,r){const i=_c(n),u=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,o;if(km(e,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),a(),n.stack=c,d}a=n.enter("link"),o=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(o=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${u}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),o()),l+=s.move(")"),a(),l}function Ky(e,t,n){return km(e,n)?"<":"["}Im.peek=Qy;function Im(e,t,n,r){const i=e.referenceType,u=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let o=a.move("[");const l=n.containerPhrasing(e,{before:o,after:"]",...a.current()});o+=a.move(l+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return s(),n.stack=c,u(),i==="full"||!l||l!==d?o+=a.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function Qy(){return"["}function Rc(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function zy(e){const t=Rc(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Yy(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Sm(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Gy(e,t,n,r){const i=n.enter("list"),u=n.bulletCurrent;let s=e.ordered?Yy(n):Rc(n);const a=e.ordered?s==="."?")":".":zy(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),Sm(n)===s&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=a),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=u,i(),l}function qy(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Vy(e,t,n,r){const i=qy(n);let u=n.bulletCurrent||Rc(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let s=u.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(u+" ".repeat(s-u.length)),a.shift(s);const o=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,a.current()),c);return o(),l;function c(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?u:u+" ".repeat(s-u.length))+d}}function Jy(e,t,n,r){const i=n.enter("paragraph"),u=n.enter("phrasing"),s=n.containerPhrasing(e,r);return u(),i(),s}const jy=ka(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Zy(e,t,n,r){return(e.children.some(function(s){return jy(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Xy(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Nm.peek=$y;function Nm(e,t,n,r){const i=Xy(n),u=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const l=o.charCodeAt(0),c=Hs(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(o=er(l)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Hs(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+er(d));const p=s.move(i+i);return u(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+o+p}function $y(e,t,n){return n.options.strong||"*"}function e3(e,t,n,r){return n.safe(e.value,r)}function t3(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function n3(e,t,n){const r=(Sm(n)+(n.options.ruleSpaces?" ":"")).repeat(t3(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Mc={blockquote:Ty,break:th,code:wy,definition:Sy,emphasis:gm,hardBreak:th,heading:Py,html:ym,image:Tm,imageReference:Cm,inlineCode:xm,link:wm,linkReference:Im,list:Gy,listItem:Vy,paragraph:Jy,root:Zy,strong:Nm,text:e3,thematicBreak:n3},r3=[i3];function i3(e,t,n,r){if(t.type==="code"&&Il(t,r)&&(e.type==="list"||e.type===t.type&&Il(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Em(t,r))?void 0:n.spread?1:0}const fr=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],u3=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
16
- `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:fr},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
17
- ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:fr},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
18
- *])`},{character:"*",inConstruct:"phrasing",notInConstruct:fr},{atBreak:!0,character:"+",after:`(?:[ \r
15
+ `,...u.current()});return/^[\t ]/.test(l)&&(l=nr(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),o(),a(),l}_m.peek=d3;function _m(e){return e.value||""}function d3(){return"<"}Om.peek=f3;function Om(e,t,n,r){const i=Mc(n),u=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");return l+=o.move(n.safe(e.alt,{before:l,after:"]",...o.current()})),l+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(a=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${u}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),a()),l+=o.move(")"),s(),l}function f3(){return"!"}Rm.peek=h3;function Rm(e,t,n,r){const i=e.referenceType,u=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let o=a.move("![");const l=n.safe(e.alt,{before:o,after:"]",...a.current()});o+=a.move(l+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return s(),n.stack=c,u(),i==="full"||!l||l!==d?o+=a.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function h3(){return"!"}Mm.peek=p3;function Mm(e,t,n){let r=e.value||"",i="`",u=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<n.unsafe.length;){const s=n.unsafe[u],a=n.compilePattern(s);let o;if(s.atBreak)for(;o=a.exec(r);){let l=o.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(o.index+1)}}return i+r+i}function p3(){return"`"}function Bm(e,t){const n=_c(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}vm.peek=m3;function vm(e,t,n,r){const i=Mc(n),u=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,o;if(Bm(e,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),a(),n.stack=c,d}a=n.enter("link"),o=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(o=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${u}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),o()),l+=s.move(")"),a(),l}function m3(e,t,n){return Bm(e,n)?"<":"["}Lm.peek=A3;function Lm(e,t,n,r){const i=e.referenceType,u=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let o=a.move("[");const l=n.containerPhrasing(e,{before:o,after:"]",...a.current()});o+=a.move(l+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return s(),n.stack=c,u(),i==="full"||!l||l!==d?o+=a.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function A3(){return"["}function vc(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function g3(e){const t=vc(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function b3(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Pm(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function E3(e,t,n,r){const i=n.enter("list"),u=n.bulletCurrent;let s=e.ordered?b3(n):vc(n);const a=e.ordered?s==="."?")":".":g3(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),Pm(n)===s&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=a),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=u,i(),l}function y3(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function T3(e,t,n,r){const i=y3(n);let u=n.bulletCurrent||vc(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let s=u.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(u+" ".repeat(s-u.length)),a.shift(s);const o=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,a.current()),c);return o(),l;function c(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?u:u+" ".repeat(s-u.length))+d}}function C3(e,t,n,r){const i=n.enter("paragraph"),u=n.enter("phrasing"),s=n.containerPhrasing(e,r);return u(),i(),s}const k3=_a(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function x3(e,t,n,r){return(e.children.some(function(s){return k3(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function w3(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Fm.peek=I3;function Fm(e,t,n,r){const i=w3(n),u=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const l=o.charCodeAt(0),c=Xs(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(o=nr(l)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Xs(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+nr(d));const p=s.move(i+i);return u(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+o+p}function I3(e,t,n){return n.options.strong||"*"}function S3(e,t,n,r){return n.safe(e.value,r)}function N3(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function D3(e,t,n){const r=(Pm(n)+(n.options.ruleSpaces?" ":"")).repeat(N3(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Lc={blockquote:Vy,break:rh,code:Xy,definition:e3,emphasis:Sm,hardBreak:rh,heading:c3,html:_m,image:Om,imageReference:Rm,inlineCode:Mm,link:vm,linkReference:Lm,list:E3,listItem:T3,paragraph:C3,root:x3,strong:Fm,text:S3,thematicBreak:D3},_3=[O3];function O3(e,t,n,r){if(t.type==="code"&&Rl(t,r)&&(e.type==="list"||e.type===t.type&&Rl(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Dm(t,r))?void 0:n.spread?1:0}const mr=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],R3=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
16
+ `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:mr},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
17
+ ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:mr},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
18
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:mr},{atBreak:!0,character:"+",after:`(?:[ \r
19
19
  ])`},{atBreak:!0,character:"-",after:`(?:[ \r
20
20
  -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
21
- ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:fr},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:fr},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:fr},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:fr},{atBreak:!0,character:"~"}];function s3(e){return e.label||!e.identifier?e.label||"":fm(e.identifier)}function a3(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function o3(e,t,n){const r=t.indexStack,i=e.children||[],u=[];let s=-1,a=n.before,o;r.push(-1);let l=t.createTracker(n);for(;++s<i.length;){const c=i[s];let d;if(r[r.length-1]=s,s+1<i.length){let m=t.handle.handlers[i[s+1].type];m&&m.peek&&(m=m.peek),d=m?m(i[s+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else d=n.after;u.length>0&&(a==="\r"||a===`
22
- `)&&c.type==="html"&&(u[u.length-1]=u[u.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(u.join("")));let f=t.handle(c,e,t,{...l.current(),after:d,before:a});o&&o===f.slice(0,1)&&(f=er(o.charCodeAt(0))+f.slice(1));const p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,o=void 0,p&&(u.length>0&&p.before&&a===u[u.length-1].slice(-1)&&(u[u.length-1]=u[u.length-1].slice(0,-1)+er(a.charCodeAt(0))),p.after&&(o=d)),l.move(f),u.push(f),a=f.slice(-1)}return r.pop(),u.join("")}function l3(e,t,n){const r=t.indexStack,i=e.children||[],u=t.createTracker(n),s=[];let a=-1;for(r.push(-1);++a<i.length;){const o=i[a];r[r.length-1]=a,s.push(u.move(t.handle(o,e,t,{before:`
21
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:mr},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:mr},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:mr},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:mr},{atBreak:!0,character:"~"}];function M3(e){return e.label||!e.identifier?e.label||"":Cm(e.identifier)}function B3(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function v3(e,t,n){const r=t.indexStack,i=e.children||[],u=[];let s=-1,a=n.before,o;r.push(-1);let l=t.createTracker(n);for(;++s<i.length;){const c=i[s];let d;if(r[r.length-1]=s,s+1<i.length){let m=t.handle.handlers[i[s+1].type];m&&m.peek&&(m=m.peek),d=m?m(i[s+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else d=n.after;u.length>0&&(a==="\r"||a===`
22
+ `)&&c.type==="html"&&(u[u.length-1]=u[u.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(u.join("")));let f=t.handle(c,e,t,{...l.current(),after:d,before:a});o&&o===f.slice(0,1)&&(f=nr(o.charCodeAt(0))+f.slice(1));const p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,o=void 0,p&&(u.length>0&&p.before&&a===u[u.length-1].slice(-1)&&(u[u.length-1]=u[u.length-1].slice(0,-1)+nr(a.charCodeAt(0))),p.after&&(o=d)),l.move(f),u.push(f),a=f.slice(-1)}return r.pop(),u.join("")}function L3(e,t,n){const r=t.indexStack,i=e.children||[],u=t.createTracker(n),s=[];let a=-1;for(r.push(-1);++a<i.length;){const o=i[a];r[r.length-1]=a,s.push(u.move(t.handle(o,e,t,{before:`
23
23
  `,after:`
24
- `,...u.current()}))),o.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&s.push(u.move(c3(o,i[a+1],e,t)))}return r.pop(),s.join("")}function c3(e,t,n,r){let i=r.join.length;for(;i--;){const u=r.join[i](e,t,n,r);if(u===!0||u===1)break;if(typeof u=="number")return`
24
+ `,...u.current()}))),o.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&s.push(u.move(P3(o,i[a+1],e,t)))}return r.pop(),s.join("")}function P3(e,t,n,r){let i=r.join.length;for(;i--;){const u=r.join[i](e,t,n,r);if(u===!0||u===1)break;if(typeof u=="number")return`
25
25
  `.repeat(1+u);if(u===!1)return`
26
26
 
27
27
  <!---->
28
28
 
29
29
  `}return`
30
30
 
31
- `}const d3=/\r?\n|\r/g;function f3(e,t){const n=[];let r=0,i=0,u;for(;u=d3.exec(e);)s(e.slice(r,u.index)),n.push(u[0]),r=u.index+u[0].length,i++;return s(e.slice(r)),n.join("");function s(a){n.push(t(a,i,!a))}}function h3(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],u=[],s={};let a=-1;for(;++a<e.unsafe.length;){const c=e.unsafe[a];if(!Am(e.stack,c))continue;const d=e.compilePattern(c);let f;for(;f=d.exec(r);){const p="before"in c||!!c.atBreak,m="after"in c,A=f.index+(p?f[1].length:0);i.includes(A)?(s[A].before&&!p&&(s[A].before=!1),s[A].after&&!m&&(s[A].after=!1)):(i.push(A),s[A]={before:p,after:m})}}i.sort(p3);let o=n.before?n.before.length:0;const l=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const c=i[a];c<o||c>=l||c+1<l&&i[a+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[a-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(o!==c&&u.push(nh(r.slice(o,c),"\\")),o=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?u.push("\\"):(u.push(er(r.charCodeAt(c))),o++))}return u.push(nh(r.slice(o,l),n.after)),u.join("")}function p3(e,t){return e-t}function nh(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],u=e+t;let s=-1,a=0,o;for(;o=n.exec(u);)r.push(o.index);for(;++s<r.length;)a!==r[s]&&i.push(e.slice(a,r[s])),i.push("\\"),a=r[s];return i.push(e.slice(a)),i.join("")}function m3(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,u=n.column||1;return{move:o,current:s,shift:a};function s(){return{now:{line:i,column:u},lineShift:r}}function a(l){r+=l}function o(l){const c=l||"",d=c.split(/\r?\n|\r/g),f=d[d.length-1];return i+=d.length-1,u=d.length===1?u+f.length:1+f.length+r,c}}function A3(e,t){const n=t||{},r={associationId:s3,containerPhrasing:y3,containerFlow:T3,createTracker:m3,compilePattern:a3,enter:u,handlers:{...Mc},handle:void 0,indentLines:f3,indexStack:[],join:[...r3],options:{},safe:C3,stack:[],unsafe:[...u3]};mm(r,n),r.options.tightDefinitions&&r.join.push(E3),r.handle=by("type",{invalid:g3,unknown:b3,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
31
+ `}const F3=/\r?\n|\r/g;function H3(e,t){const n=[];let r=0,i=0,u;for(;u=F3.exec(e);)s(e.slice(r,u.index)),n.push(u[0]),r=u.index+u[0].length,i++;return s(e.slice(r)),n.join("");function s(a){n.push(t(a,i,!a))}}function U3(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],u=[],s={};let a=-1;for(;++a<e.unsafe.length;){const c=e.unsafe[a];if(!Im(e.stack,c))continue;const d=e.compilePattern(c);let f;for(;f=d.exec(r);){const p="before"in c||!!c.atBreak,m="after"in c,A=f.index+(p?f[1].length:0);i.includes(A)?(s[A].before&&!p&&(s[A].before=!1),s[A].after&&!m&&(s[A].after=!1)):(i.push(A),s[A]={before:p,after:m})}}i.sort(W3);let o=n.before?n.before.length:0;const l=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const c=i[a];c<o||c>=l||c+1<l&&i[a+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[a-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(o!==c&&u.push(ih(r.slice(o,c),"\\")),o=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?u.push("\\"):(u.push(nr(r.charCodeAt(c))),o++))}return u.push(ih(r.slice(o,l),n.after)),u.join("")}function W3(e,t){return e-t}function ih(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],u=e+t;let s=-1,a=0,o;for(;o=n.exec(u);)r.push(o.index);for(;++s<r.length;)a!==r[s]&&i.push(e.slice(a,r[s])),i.push("\\"),a=r[s];return i.push(e.slice(a)),i.join("")}function K3(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,u=n.column||1;return{move:o,current:s,shift:a};function s(){return{now:{line:i,column:u},lineShift:r}}function a(l){r+=l}function o(l){const c=l||"",d=c.split(/\r?\n|\r/g),f=d[d.length-1];return i+=d.length-1,u=d.length===1?u+f.length:1+f.length+r,c}}function z3(e,t){const n=t||{},r={associationId:M3,containerPhrasing:G3,containerFlow:V3,createTracker:K3,compilePattern:B3,enter:u,handlers:{...Lc},handle:void 0,indentLines:H3,indexStack:[],join:[..._3],options:{},safe:J3,stack:[],unsafe:[...R3]};wm(r,n),r.options.tightDefinitions&&r.join.push(q3),r.handle=Yy("type",{invalid:Q3,unknown:Y3,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
32
32
  `,after:`
33
33
  `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
34
- `),i;function u(s){return r.stack.push(s),a;function a(){r.stack.pop()}}}function g3(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function b3(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function E3(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function y3(e,t){return o3(e,this,t)}function T3(e,t){return l3(e,this,t)}function C3(e,t){return h3(this,e,t)}function Dl(e){const t=this;t.compiler=n;function n(r){return A3(r,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function rh(e){if(e)throw e}function Bc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function x3(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var $a,ih;function k3(){if(ih)return $a;ih=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},u=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var c=e.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!d)return!1;var f;for(f in l);return typeof f>"u"||e.call(l,f)},s=function(l,c){n&&c.name==="__proto__"?n(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},a=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(r)return r(l,c).value}else return;return l[c]};return $a=function o(){var l,c,d,f,p,m,A=arguments[0],E=1,g=arguments.length,N=!1;for(typeof A=="boolean"&&(N=A,A=arguments[1]||{},E=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});E<g;++E)if(l=arguments[E],l!=null)for(c in l)d=a(A,c),f=a(l,c),A!==f&&(N&&f&&(u(f)||(p=i(f)))?(p?(p=!1,m=d&&i(d)?d:[]):m=d&&u(d)?d:{},s(A,{name:c,newValue:o(N,m,f)})):typeof f<"u"&&s(A,{name:c,newValue:f}));return A},$a}var w3=k3();const eo=Bc(w3);function _l(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function I3(){const e=[],t={run:n,use:r};return t;function n(...i){let u=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(o,...l){const c=e[++u];let d=-1;if(o){s(o);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,c?S3(c,a)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function S3(e,t){let n;return r;function r(...s){const a=e.length>s.length;let o;a&&s.push(i);try{o=e.apply(this,s)}catch(l){const c=l;if(a&&n)throw c;return i(c)}a||(o&&o.then&&typeof o.then=="function"?o.then(u,i):o instanceof Error?i(o):u(o))}function i(s,...a){n||(n=!0,t(s,...a))}function u(s){i(null,s)}}class gt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",u={},s=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?i=t:!u.cause&&t&&(s=!0,i=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?u.ruleId=r:(u.source=r.slice(0,o),u.ruleId=r.slice(o+1))}if(!u.place&&u.ancestors&&u.ancestors){const o=u.ancestors[u.ancestors.length-1];o&&(u.place=o.position)}const a=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=qi(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=s&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gt.prototype.file="";gt.prototype.name="";gt.prototype.reason="";gt.prototype.message="";gt.prototype.stack="";gt.prototype.column=void 0;gt.prototype.line=void 0;gt.prototype.ancestors=void 0;gt.prototype.cause=void 0;gt.prototype.fatal=void 0;gt.prototype.place=void 0;gt.prototype.ruleId=void 0;gt.prototype.source=void 0;const Vt={basename:N3,dirname:D3,extname:_3,join:O3,sep:"/"};function N3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pu(e);let n=0,r=-1,i=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(u){n=i+1;break}}else r<0&&(u=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(u){n=i+1;break}}else s<0&&(u=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function D3(e){if(Pu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function _3(e){Pu(e);let t=e.length,n=-1,r=0,i=-1,u=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:u!==1&&(u=1):i>-1&&(u=-1)}return i<0||n<0||u===0||u===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function O3(...e){let t=-1,n;for(;++t<e.length;)Pu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":R3(n)}function R3(e){Pu(e);const t=e.codePointAt(0)===47;let n=M3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function M3(e,t){let n="",r=0,i=-1,u=0,s=-1,a,o;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||u===1))if(i!==s-1&&u===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,u=0;continue}}else if(n.length>0){n="",r=0,i=s,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,u=0}else a===46&&u>-1?u++:u=-1}return n}function Pu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const B3={cwd:L3};function L3(){return"/"}function Ol(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function v3(e){if(typeof e=="string")e=new URL(e);else if(!Ol(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return P3(e)}function P3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const to=["history","path","basename","stem","extname","dirname"];class F3{constructor(t){let n;t?Ol(t)?n={path:t}:typeof t=="string"||H3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":B3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<to.length;){const u=to[r];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let i;for(i in n)to.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Vt.basename(this.path):void 0}set basename(t){ro(t,"basename"),no(t,"basename"),this.path=Vt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vt.dirname(this.path):void 0}set dirname(t){uh(this.basename,"dirname"),this.path=Vt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vt.extname(this.path):void 0}set extname(t){if(no(t,"extname"),uh(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ol(t)&&(t=v3(t)),ro(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vt.basename(this.path,this.extname):void 0}set stem(t){ro(t,"stem"),no(t,"stem"),this.path=Vt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new gt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function no(e,t){if(e&&e.includes(Vt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vt.sep+"`")}function ro(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function uh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function H3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const U3=(function(e){const r=this.constructor.prototype,i=r[e],u=function(){return i.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),W3={}.hasOwnProperty;class Lc extends U3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=I3()}copy(){const t=new Lc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(eo(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(so("data",this.frozen),this.namespace[t]=n,this):W3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(so("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=as(t),r=this.parser||this.Parser;return io("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),io("process",this.parser||this.Parser),uo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(u,s){const a=as(t),o=r.parse(a);r.run(o,a,function(c,d,f){if(c||!d||!f)return l(c);const p=d,m=r.stringify(p,f);Q3(m)?f.value=m:f.result=m,l(c,f)});function l(c,d){c||!d?s(c):u?u(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),io("processSync",this.parser||this.Parser),uo("processSync",this.compiler||this.Compiler),this.process(t,i),ah("processSync","process",n),r;function i(u,s){n=!0,rh(u),r=s}}run(t,n,r){sh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?u(void 0,r):new Promise(u);function u(s,a){const o=as(n);i.run(t,o,l);function l(c,d,f){const p=d||t;c?a(c):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,u),ah("runSync","run",r),i;function u(s,a){rh(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=as(n),i=this.compiler||this.Compiler;return uo("stringify",i),sh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(so("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...d]=l;o(c,d)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=eo(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const d=l[c];u(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,c){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===l){f=d;break}if(f===-1)r.push([l,...c]);else if(c.length>0){let[p,...m]=c;const A=r[f][1];_l(A)&&_l(p)&&(p=eo(!0,A,p)),r[f]=[l,p,...m]}}}}const Rl=new Lc().freeze();function io(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function so(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function sh(e){if(!_l(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ah(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function as(e){return K3(e)?e:new F3(e)}function K3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Q3(e){return typeof e=="string"||z3(e)}function z3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Ge(e){this.content=e}Ge.prototype={constructor:Ge,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),u=r.content.slice();return i==-1?u.push(n||e,t):(u[i+1]=t,n&&(u[i]=n)),new Ge(u)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Ge(n)},addToStart:function(e,t){return new Ge([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Ge(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),u=r.find(e);return i.splice(u==-1?i.length:u,0,t,n),new Ge(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Ge.from(e),e.size?new Ge(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Ge.from(e),e.size?new Ge(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Ge.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Ge.from=function(e){if(e instanceof Ge)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ge(t)};function Dm(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),u=t.child(r);if(i==u){n+=i.nodeSize;continue}if(!i.sameMarkup(u))return n;if(i.isText&&i.text!=u.text){for(let s=0;i.text[s]==u.text[s];s++)n++;return n}if(i.content.size||u.content.size){let s=Dm(i.content,u.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function _m(e,t,n,r){for(let i=e.childCount,u=t.childCount;;){if(i==0||u==0)return i==u?null:{a:n,b:r};let s=e.child(--i),a=t.child(--u),o=s.nodeSize;if(s==a){n-=o,r-=o;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let l=0,c=Math.min(s.text.length,a.text.length);for(;l<c&&s.text[s.text.length-l-1]==a.text[a.text.length-l-1];)l++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let l=_m(s.content,a.content,n-1,r-1);if(l)return l}n-=o,r-=o}}class H{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,u){for(let s=0,a=0;a<n;s++){let o=this.content[s],l=a+o.nodeSize;if(l>t&&r(o,i+a,u||null,s)!==!1&&o.content.size){let c=a+1;o.nodesBetween(Math.max(0,t-c),Math.min(o.content.size,n-c),r,i+c)}a=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let u="",s=!0;return this.nodesBetween(t,n,(a,o)=>{let l=a.isText?a.text.slice(Math.max(t,o)-o,n-o):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&l||a.isTextblock)&&r&&(s?s=!1:u+=r),u+=l},0),u}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),u=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),u=1);u<t.content.length;u++)i.push(t.content[u]);return new H(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let u=0,s=0;s<n;u++){let a=this.content[u],o=s+a.nodeSize;o>t&&((s<t||o>n)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=o}return new H(r,i)}cutByIndex(t,n){return t==n?H.empty:t==0&&n==this.content.length?this:new H(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),u=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new H(i,u)}addToStart(t){return new H([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new H(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return Dm(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return _m(this,t,n,r)}findIndex(t){if(t==0)return ls(0,t);if(t==this.size)return ls(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),u=r+i.nodeSize;if(u>=t)return u==t?ls(n+1,u):ls(n,r);r=u}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return H.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new H(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return H.empty;let n,r=0;for(let i=0;i<t.length;i++){let u=t[i];r+=u.nodeSize,i&&u.isText&&t[i-1].sameMarkup(u)?(n||(n=t.slice(0,i)),n[n.length-1]=u.withText(n[n.length-1].text+u.text)):n&&n.push(u)}return new H(n||t,r)}static from(t){if(!t)return H.empty;if(t instanceof H)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new H([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}H.empty=new H([],0);const ao={index:0,offset:0};function ls(e,t){return ao.index=e,ao.offset=t,ao}function Us(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Us(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Us(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class me{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let u=t[i];if(this.eq(u))return t;if(this.type.excludes(u.type))n||(n=t.slice(0,i));else{if(u.type.excludes(this.type))return t;!r&&u.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(u)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Us(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return me.none;if(t instanceof me)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}me.none=[];class Ws extends Error{}class Y{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Rm(this.content,t+this.openStart,n);return r&&new Y(r,this.openStart,this.openEnd)}removeBetween(t,n){return new Y(Om(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return Y.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Y(H.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let u=t.firstChild;u&&!u.isLeaf&&(n||!u.type.spec.isolating);u=u.firstChild)r++;for(let u=t.lastChild;u&&!u.isLeaf&&(n||!u.type.spec.isolating);u=u.lastChild)i++;return new Y(t,r,i)}}Y.empty=new Y(H.empty,0,0);function Om(e,t,n){let{index:r,offset:i}=e.findIndex(t),u=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||u.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,u.copy(Om(u.content,t-i-1,n-i-1)))}function Rm(e,t,n,r){let{index:i,offset:u}=e.findIndex(t),s=e.maybeChild(i);if(u==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=Rm(s.content,t-u-1,n,s);return a&&e.replaceChild(i,s.copy(a))}function Y3(e,t,n){if(n.openStart>e.depth)throw new Ws("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ws("Inconsistent open depths");return Mm(e,t,n,0)}function Mm(e,t,n,r){let i=e.index(r),u=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=Mm(e,t,n,r+1);return u.copy(u.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let s=e.parent,a=s.content;return Tr(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=G3(n,e);return Tr(u,Lm(e,s,a,t,r))}else return Tr(u,Ks(e,t,r))}function Bm(e,t){if(!t.type.compatibleContent(e.type))throw new Ws("Cannot join "+t.type.name+" onto "+e.type.name)}function Ml(e,t,n){let r=e.node(n);return Bm(r,t.node(n)),r}function yr(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Vi(e,t,n,r){let i=(t||e).node(n),u=0,s=t?t.index(n):i.childCount;e&&(u=e.index(n),e.depth>n?u++:e.textOffset&&(yr(e.nodeAfter,r),u++));for(let a=u;a<s;a++)yr(i.child(a),r);t&&t.depth==n&&t.textOffset&&yr(t.nodeBefore,r)}function Tr(e,t){return e.type.checkContent(t),e.copy(t)}function Lm(e,t,n,r,i){let u=e.depth>i&&Ml(e,t,i+1),s=r.depth>i&&Ml(n,r,i+1),a=[];return Vi(null,e,i,a),u&&s&&t.index(i)==n.index(i)?(Bm(u,s),yr(Tr(u,Lm(e,t,n,r,i+1)),a)):(u&&yr(Tr(u,Ks(e,t,i+1)),a),Vi(t,n,i,a),s&&yr(Tr(s,Ks(n,r,i+1)),a)),Vi(r,null,i,a),new H(a)}function Ks(e,t,n){let r=[];if(Vi(null,e,n,r),e.depth>n){let i=Ml(e,t,n+1);yr(Tr(i,Ks(e,t,n+1)),r)}return Vi(t,null,n,r),new H(r)}function G3(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let u=n-1;u>=0;u--)i=t.node(u).copy(H.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class du{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let u=0;u<t;u++)i+=r.child(u).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return me.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let u=r.marks;for(var s=0;s<u.length;s++)u[s].type.spec.inclusive===!1&&(!i||!u[s].isInSet(i.marks))&&(u=u[s--].removeFromSet(u));return u}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var u=0;u<r.length;u++)r[u].type.spec.inclusive===!1&&(!i||!r[u].isInSet(i.marks))&&(r=r[u--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new vm(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,u=n;for(let s=t;;){let{index:a,offset:o}=s.content.findIndex(u),l=u-o;if(r.push(s,a,i+o),!l||(s=s.child(a),s.isText))break;u=l-1,i+=o+1}return new du(n,r,u)}static resolveCached(t,n){let r=oh.get(t);if(r)for(let u=0;u<r.elts.length;u++){let s=r.elts[u];if(s.pos==n)return s}else oh.set(t,r=new q3);let i=r.elts[r.i]=du.resolve(t,n);return r.i=(r.i+1)%V3,i}}class q3{constructor(){this.elts=[],this.i=0}}const V3=12,oh=new WeakMap;class vm{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const J3=Object.create(null);let kn=class Bl{constructor(t,n,r,i=me.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||H.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Us(this.attrs,n||t.defaultAttrs||J3)&&me.sameSet(this.marks,r||me.none)}copy(t=null){return t==this.content?this:new Bl(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Bl(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return Y.empty;let i=this.resolve(t),u=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,u.pos-a);return new Y(l,i.depth-s,u.depth-s)}replace(t,n,r){return Y3(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return du.resolveCached(this,t)}resolveNoCache(t){return du.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,u=>(r.isInSet(u.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),Pm(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=H.empty,i=0,u=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,u),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let o=i;o<u;o++)if(!this.type.allowsMarks(r.child(o).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let u=this.contentMatchAt(t).matchType(r),s=u&&u.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=me.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!me.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=H.fromJSON(t,n.content),u=t.nodeType(n.type).create(n.attrs,i,r);return u.type.checkAttrs(u.attrs),u}};kn.prototype.text=void 0;class Qs extends kn{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Pm(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Qs(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Qs(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function Pm(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Or{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new j3(t,n);if(r.next==null)return Or.empty;let i=Fm(r);r.next&&r.err("Unexpected trailing text");let u=rT(nT(i));return iT(u,r),u}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let u=n;i&&u<r;u++)i=i.matchType(t.child(u).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function u(s,a){let o=s.matchFragment(t,r);if(o&&(!n||o.validEnd))return H.from(a.map(l=>l.createAndFill()));for(let l=0;l<s.next.length;l++){let{type:c,next:d}=s.next[l];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=u(d,a.concat(c));if(f)return f}}return null}return u(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),u=i.match;if(u.matchType(t)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<u.next.length;s++){let{type:a,next:o}=u.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||o.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let u=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)u+=(s?", ":"")+r.next[s].type.name+"->"+t.indexOf(r.next[s].next);return u}).join(`
35
- `)}}Or.empty=new Or(!0);class j3{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function Fm(e){let t=[];do t.push(Z3(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Z3(e){let t=[];do t.push(X3(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function X3(e){let t=tT(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=$3(e,t);else break;return t}function lh(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function $3(e,t){let n=lh(e),r=n;return e.eat(",")&&(e.next!="}"?r=lh(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function eT(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let u in n){let s=n[u];s.isInGroup(t)&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function tT(e){if(e.eat("(")){let t=Fm(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=eT(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function nT(e){let t=[[]];return i(u(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,o){let l={term:o,to:a};return t[s].push(l),l}function i(s,a){s.forEach(o=>o.to=a)}function u(s,a){if(s.type=="choice")return s.exprs.reduce((o,l)=>o.concat(u(l,a)),[]);if(s.type=="seq")for(let o=0;;o++){let l=u(s.exprs[o],a);if(o==s.exprs.length-1)return l;i(l,a=n())}else if(s.type=="star"){let o=n();return r(a,o),i(u(s.expr,o),o),[r(o)]}else if(s.type=="plus"){let o=n();return i(u(s.expr,a),o),i(u(s.expr,o),o),[r(o)]}else{if(s.type=="opt")return[r(a)].concat(u(s.expr,a));if(s.type=="range"){let o=a;for(let l=0;l<s.min;l++){let c=n();i(u(s.expr,o),c),o=c}if(s.max==-1)i(u(s.expr,o),o);else for(let l=s.min;l<s.max;l++){let c=n();r(o,c),i(u(s.expr,o),c),o=c}return[r(o)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Hm(e,t){return t-e}function ch(e,t){let n=[];return r(t),n.sort(Hm);function r(i){let u=e[i];if(u.length==1&&!u[0].term)return r(u[0].to);n.push(i);for(let s=0;s<u.length;s++){let{term:a,to:o}=u[s];!a&&n.indexOf(o)==-1&&r(o)}}}function rT(e){let t=Object.create(null);return n(ch(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:o})=>{if(!a)return;let l;for(let c=0;c<i.length;c++)i[c][0]==a&&(l=i[c][1]);ch(e,o).forEach(c=>{l||i.push([a,l=[]]),l.indexOf(c)==-1&&l.push(c)})})});let u=t[r.join(",")]=new Or(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(Hm);u.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return u}}function iT(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],u=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:o,next:l}=i.next[a];s.push(o.name),u&&!(o.isText||o.hasRequiredAttrs())&&(u=!1),r.indexOf(l)==-1&&r.push(l)}u&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Um(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Wm(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let u=e[r];if(u.hasDefault)i=u.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Km(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let u=e[i];u.validate&&u.validate(t[i])}}function Qm(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new sT(e,r,t[r]);return n}let dh=class zm{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Qm(t,r.attrs),this.defaultAttrs=Um(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Or.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Wm(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new kn(this,this.computeAttrs(t),H.from(n),me.setFrom(r))}createChecked(t=null,n,r){return n=H.from(n),this.checkContent(n),new kn(this,this.computeAttrs(t),n,me.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=H.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),u=i&&i.fillBefore(H.empty,!0);return u?new kn(this,t,n.append(u),me.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){Km(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:me.none:t}static compile(t,n){let r=Object.create(null);t.forEach((u,s)=>r[u]=new zm(u,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let u in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function uT(e,t,n){let r=n.split("|");return i=>{let u=i===null?"null":typeof i;if(r.indexOf(u)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${u}`)}}class sT{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?uT(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ia{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=Qm(t,i.attrs),this.excluded=null;let u=Um(this.attrs);this.instance=u?new me(this,u):null}create(t=null){return!t&&this.instance?this.instance:new me(this,Wm(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((u,s)=>r[u]=new Ia(u,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){Km(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class aT{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=Ge.from(t.nodes),n.marks=Ge.from(t.marks||{}),this.nodes=dh.compile(this.spec.nodes,this),this.marks=Ia.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let u=this.nodes[i],s=u.spec.content||"",a=u.spec.marks;if(u.contentMatch=r[s]||(r[s]=Or.parse(s,this.nodes)),u.inlineContent=u.contentMatch.inlineContent,u.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!u.isInline||!u.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=u}u.markSet=a=="_"?null:a?fh(this,a.split(" ")):a==""||!u.inlineContent?[]:null}for(let i in this.marks){let u=this.marks[i],s=u.spec.excludes;u.excluded=s==null?[u]:s==""?[]:fh(this,s.split(" "))}this.nodeFromJSON=i=>kn.fromJSON(this,i),this.markFromJSON=i=>me.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof dh){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new Qs(r,r.defaultAttrs,t,me.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function fh(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],u=e.marks[i],s=u;if(u)n.push(u);else for(let a in e.marks){let o=e.marks[a];(i=="_"||o.spec.group&&o.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=o)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function oT(e){return e.tag!=null}function lT(e){return e.style!=null}let vc=class Ll{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(oT(i))this.tags.push(i);else if(lT(i)){let u=/[^=]*/.exec(i.style)[0];r.indexOf(u)<0&&r.push(u),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let u=t.nodes[i.node];return u.contentMatch.matchType(u)})}parse(t,n={}){let r=new ph(this,n,!1);return r.addAll(t,me.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new ph(this,n,!0);return r.addAll(t,me.none,n.from,n.to),Y.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let u=this.tags[i];if(fT(t,u.tag)&&(u.namespace===void 0||t.namespaceURI==u.namespace)&&(!u.context||n.matchesContext(u.context))){if(u.getAttrs){let s=u.getAttrs(t);if(s===!1)continue;u.attrs=s||void 0}return u}}}matchStyle(t,n,r,i){for(let u=i?this.styles.indexOf(i)+1:0;u<this.styles.length;u++){let s=this.styles[u],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let o=s.getAttrs(n);if(o===!1)continue;s.attrs=o||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let u=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<u)break}n.splice(s,0,i)}for(let i in t.marks){let u=t.marks[i].spec.parseDOM;u&&u.forEach(s=>{r(s=mh(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let u=t.nodes[i].spec.parseDOM;u&&u.forEach(s=>{r(s=mh(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Ll(t,Ll.schemaRules(t)))}};const Ym={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},cT={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Gm={ol:!0,ul:!0},fu=1,vl=2,Ji=4;function hh(e,t,n){return t!=null?(t?fu:0)|(t==="full"?vl:0):e&&e.whitespace=="pre"?fu|vl:n&~Ji}class cs{constructor(t,n,r,i,u,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=me.none,this.match=u||(s&Ji?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(H.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&fu)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let u=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=u.withText(u.text.slice(0,u.text.length-i[0].length))}}let n=H.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(H.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Ym.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class ph{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,u,s=hh(null,n.preserveWhitespace,0)|(r?Ji:0);i?u=new cs(i.type,i.attrs,me.none,!0,n.topMatch||i.type.contentMatch,s):r?u=new cs(null,null,me.none,!0,null,s):u=new cs(t.schema.topNodeType,null,me.none,!0,null,s),this.nodes=[u],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,u=i.options&vl?"full":this.localPreserveWS||(i.options&fu)>0,{schema:s}=this.parser;if(u==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(u)if(u==="full")r=r.replace(/\r\n?/g,`
36
- `);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let o=0;o<a.length;o++)o&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[o]&&this.insertNode(s.text(a[o]),n,!/\S/.test(a[o]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],o=t.previousSibling;(!a||o&&o.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,u=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;Gm.hasOwnProperty(s)&&this.parser.normalizeLists&&dT(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(o?o.ignore:cT.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let l,c=this.needsBlock;if(Ym.hasOwnProperty(s))u.content.length&&u.content[0].isInline&&this.open&&(this.open--,u=this.top),l=!0,u.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=o&&o.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),l&&this.sync(u),this.needsBlock=c}else{let l=this.readStyles(t,n);l&&this.addElementByRule(t,o,l,o.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
37
- `),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let u=this.parser.matchedStyles[i],s=r.getPropertyValue(u);if(s)for(let a=void 0;;){let o=this.parser.matchStyle(u,s,this,a);if(!o)break;if(o.ignore)return null;if(o.clearMark?n=n.filter(l=>!o.clearMark(l)):n=n.concat(this.parser.schema.marks[o.mark].create(o.attrs)),o.consuming===!1)a=o;else break}}return n}addElementByRule(t,n,r,i){let u,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let o=this.enter(s,n.attrs||null,r,n.preserveWhitespace);o&&(u=!0,r=o)}else{let o=this.parser.schema.marks[n.mark];r=r.concat(o.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(o=>this.insertNode(o,r,!1));else{let o=t;typeof n.contentElement=="string"?o=t.querySelector(n.contentElement):typeof n.contentElement=="function"?o=n.contentElement(t):n.contentElement&&(o=n.contentElement),this.findAround(t,o,!0),this.addAll(o,r),this.findAround(t,o,!1)}u&&this.sync(a)&&this.open--}addAll(t,n,r,i){let u=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++u)this.findAtPoint(t,u),this.addDOM(s,n);this.findAtPoint(t,u)}findPlace(t,n,r){let i,u;for(let s=this.open,a=0;s>=0;s--){let o=this.nodes[s],l=o.findWrapping(t);if(l&&(!i||i.length>l.length+a)&&(i=l,u=o,!l.length))break;if(o.solid){if(r)break;a+=2}}if(!i)return null;this.sync(u);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let u=this.textblockFromContext();u&&(n=this.enterInner(u,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let u=this.top;u.match&&(u.match=u.match.matchType(t.type));let s=me.none;for(let a of i.concat(t.marks))(u.type?u.type.allowsMarkType(a.type):Ah(a.type,t.type))&&(s=a.addToSet(s));return u.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let u=this.findPlace(t.create(n),r,!1);return u&&(u=this.enterInner(t,n,r,!0,i)),u}enterInner(t,n,r,i=!1,u){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=hh(t,u,s.options);s.options&Ji&&s.content.length==0&&(a|=Ji);let o=me.none;return r=r.filter(l=>(s.type?s.type.allowsMarkType(l.type):Ah(l.type,t))?(o=l.addToSet(o),!1):!0),this.nodes.push(new cs(t,n,o,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=fu)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),u=-(r?r.depth+1:0)+(i?0:1),s=(a,o)=>{for(;a>=0;a--){let l=n[a];if(l==""){if(a==n.length-1||a==0)continue;for(;o>=u;o--)if(s(a-1,o))return!0;return!1}else{let c=o>0||o==0&&i?this.nodes[o].type:r&&o>=u?r.node(o-u).type:null;if(!c||c.name!=l&&!c.isInGroup(l))return!1;o--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function dT(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&Gm.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function fT(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function mh(e){let t={};for(let n in e)t[n]=e[n];return t}function Ah(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let u=[],s=a=>{u.push(a);for(let o=0;o<a.edgeCount;o++){let{type:l,next:c}=a.edge(o);if(l==t||u.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class Ur{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=oo(n).createDocumentFragment());let i=r,u=[];return t.forEach(s=>{if(u.length||s.marks.length){let a=0,o=0;for(;a<u.length&&o<s.marks.length;){let l=s.marks[o];if(!this.marks[l.type.name]){o++;continue}if(!l.eq(u[a][0])||l.type.spec.spanning===!1)break;a++,o++}for(;a<u.length;)i=u.pop()[1];for(;o<s.marks.length;){let l=s.marks[o++],c=this.serializeMark(l,s.isInline,n);c&&(u.push([l,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=ws(oo(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let u=this.serializeMark(t.marks[i],t.isInline,n);u&&((u.contentDOM||u.dom).appendChild(r),r=u.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&ws(oo(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return ws(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Ur(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=gh(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return gh(t.marks)}}function gh(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function oo(e){return e.document||window.document}const bh=new WeakMap;function hT(e){let t=bh.get(e);return t===void 0&&bh.set(e,t=pT(e)),t}function pT(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function ws(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],u;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(u=hT(r))&&u.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let a,o=n?e.createElementNS(n,i):e.createElement(i),l=t[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let d in l)if(l[d]!=null){let f=d.indexOf(" ");f>0?o.setAttributeNS(d.slice(0,f),d.slice(f+1),l[d]):d=="style"&&o.style?o.style.cssText=l[d]:o.setAttribute(d,l[d])}}for(let d=c;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:o,contentDOM:o}}else{let{dom:p,contentDOM:m}=ws(e,f,n,r);if(o.appendChild(p),m){if(a)throw new RangeError("Multiple content holes");a=m}}}return{dom:o,contentDOM:a}}const qm=65535,Vm=Math.pow(2,16);function mT(e,t){return e+t*Vm}function Eh(e){return e&qm}function AT(e){return(e-(e&qm))/Vm}const Jm=1,jm=2,Is=4,Zm=8;class Pl{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Zm)>0}get deletedBefore(){return(this.delInfo&(Jm|Is))>0}get deletedAfter(){return(this.delInfo&(jm|Is))>0}get deletedAcross(){return(this.delInfo&Is)>0}}class Tt{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Tt.empty)return Tt.empty}recover(t){let n=0,r=Eh(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+AT(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,u=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let o=this.ranges[a]-(this.inverted?i:0);if(o>t)break;let l=this.ranges[a+u],c=this.ranges[a+s],d=o+l;if(t<=d){let f=l?t==o?-1:t==d?1:n:n,p=o+i+(f<0?0:c);if(r)return p;let m=t==(n<0?o:d)?null:mT(a/3,t-o),A=t==o?jm:t==d?Jm:Is;return(n<0?t!=o:t!=d)&&(A|=Zm),new Pl(p,A,m)}i+=c-l}return r?t+i:new Pl(t+i,0,null)}touches(t,n){let r=0,i=Eh(n),u=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let o=this.ranges[a]-(this.inverted?r:0);if(o>t)break;let l=this.ranges[a+u],c=o+l;if(t<=c&&a==i*3)return!0;r+=this.ranges[a+s]-l}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,u=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?u:0),o=s+(this.inverted?0:u),l=this.ranges[i+n],c=this.ranges[i+r];t(a,a+l,o,o+c),u+=c-l}}invert(){return new Tt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Tt.empty:new Tt(t<0?[0,-t,0]:[0,0,t])}}Tt.empty=new Tt([]);class zs{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new zs(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new zs;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let u=this.from;u<this.to;u++){let s=this._maps[u],a=s.mapResult(t,n);if(a.recover!=null){let o=this.getMirror(u);if(o!=null&&o>u&&o<this.to){u=o,t=this._maps[o].recover(a.recover);continue}}i|=a.delInfo,t=a.pos}return r?t:new Pl(t,i,null)}}const lo=Object.create(null);class nt{getMap(){return Tt.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=lo[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in lo)throw new RangeError("Duplicate use of step JSON ID "+t);return lo[t]=n,n.prototype.jsonID=t,n}}class Pe{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Pe(t,null)}static fail(t){return new Pe(null,t)}static fromReplace(t,n,r,i){try{return Pe.ok(t.replace(n,r,i))}catch(u){if(u instanceof Ws)return Pe.fail(u.message);throw u}}}function Pc(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let u=e.child(i);u.content.size&&(u=u.copy(Pc(u.content,t,u))),u.isInline&&(u=t(u,n,i)),r.push(u)}return H.fromArray(r)}class Cn extends nt{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),u=new Y(Pc(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return Pe.fromReplace(t,this.from,this.to,u)}invert(){return new $t(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Cn(n.pos,r.pos,this.mark)}merge(t){return t instanceof Cn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Cn(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Cn(n.from,n.to,t.markFromJSON(n.mark))}}nt.jsonID("addMark",Cn);class $t extends nt{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new Y(Pc(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return Pe.fromReplace(t,this.from,this.to,r)}invert(){return new Cn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new $t(n.pos,r.pos,this.mark)}merge(t){return t instanceof $t&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new $t(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $t(n.from,n.to,t.markFromJSON(n.mark))}}nt.jsonID("removeMark",$t);class zn extends nt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Pe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Pe.fromReplace(t,this.pos,this.pos+1,new Y(H.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new zn(this.pos,n.marks[i]);return new zn(this.pos,this.mark)}}return new Rr(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new zn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new zn(n.pos,t.markFromJSON(n.mark))}}nt.jsonID("addNodeMark",zn);class Rr extends nt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Pe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Pe.fromReplace(t,this.pos,this.pos+1,new Y(H.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new zn(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Rr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Rr(n.pos,t.markFromJSON(n.mark))}}nt.jsonID("removeNodeMark",Rr);class ve extends nt{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&Fl(t,this.from,this.to)?Pe.fail("Structure replace would overwrite content"):Pe.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Tt([this.from,this.to-this.from,this.slice.size])}invert(t){return new ve(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&ve.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new ve(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof ve)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?Y.empty:new Y(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new ve(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?Y.empty:new Y(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new ve(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ve(n.from,n.to,Y.fromJSON(t,n.slice),!!n.structure)}}ve.MAP_BIAS=1;nt.jsonID("replace",ve);class et extends nt{constructor(t,n,r,i,u,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=u,this.insert=s,this.structure=a}apply(t){if(this.structure&&(Fl(t,this.from,this.gapFrom)||Fl(t,this.gapTo,this.to)))return Pe.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Pe.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Pe.fromReplace(t,this.from,this.to,r):Pe.fail("Content does not fit in gap")}getMap(){return new Tt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new et(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),u=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||u>r.pos?null:new et(n.pos,r.pos,i,u,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new et(n.from,n.to,n.gapFrom,n.gapTo,Y.fromJSON(t,n.slice),n.insert,!!n.structure)}}nt.jsonID("replaceAround",et);function Fl(e,t,n){let r=e.resolve(t),i=n-t,u=r.depth;for(;i>0&&u>0&&r.indexAfter(u)==r.node(u).childCount;)u--,i--;if(i>0){let s=r.node(u).maybeChild(r.indexAfter(u));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function gT(e,t,n,r){let i=[],u=[],s,a;e.doc.nodesBetween(t,n,(o,l,c)=>{if(!o.isInline)return;let d=o.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(l,t),p=Math.min(l+o.nodeSize,n),m=r.addToSet(d);for(let A=0;A<d.length;A++)d[A].isInSet(m)||(s&&s.to==f&&s.mark.eq(d[A])?s.to=p:i.push(s=new $t(f,p,d[A])));a&&a.to==f?a.to=p:u.push(a=new Cn(f,p,r))}}),i.forEach(o=>e.step(o)),u.forEach(o=>e.step(o))}function bT(e,t,n,r){let i=[],u=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;u++;let o=null;if(r instanceof Ia){let l=s.marks,c;for(;c=r.isInSet(l);)(o||(o=[])).push(c),l=c.removeFromSet(l)}else r?r.isInSet(s.marks)&&(o=[r]):o=s.marks;if(o&&o.length){let l=Math.min(a+s.nodeSize,n);for(let c=0;c<o.length;c++){let d=o[c],f;for(let p=0;p<i.length;p++){let m=i[p];m.step==u-1&&d.eq(i[p].style)&&(f=m)}f?(f.to=l,f.step=u):i.push({style:d,from:Math.max(a,t),to:l,step:u})}}}),i.forEach(s=>e.step(new $t(s.from,s.to,s.style)))}function Fc(e,t,n,r=n.contentMatch,i=!0){let u=e.doc.nodeAt(t),s=[],a=t+1;for(let o=0;o<u.childCount;o++){let l=u.child(o),c=a+l.nodeSize,d=r.matchType(l.type);if(!d)s.push(new ve(a,c,Y.empty));else{r=d;for(let f=0;f<l.marks.length;f++)n.allowsMarkType(l.marks[f].type)||e.step(new $t(a,c,l.marks[f]));if(i&&l.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,m;for(;f=p.exec(l.text);)m||(m=new Y(H.from(n.schema.text(" ",n.allowedMarks(l.marks))),0,0)),s.push(new ve(a+f.index,a+f.index+f[0].length,m))}}a=c}if(!r.validEnd){let o=r.fillBefore(H.empty,!0);e.replace(a,a,new Y(o,0,0))}for(let o=s.length-1;o>=0;o--)e.step(s[o])}function ET(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Sa(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,i=0,u=0;;--r){let s=e.$from.node(r),a=e.$from.index(r)+i,o=e.$to.indexAfter(r)-u;if(r<e.depth&&s.canReplace(a,o,n))return r;if(r==0||s.type.spec.isolating||!ET(s,a,o))break;a&&(i=1),o<s.childCount&&(u=1)}return null}function yT(e,t,n){let{$from:r,$to:i,depth:u}=t,s=r.before(u+1),a=i.after(u+1),o=s,l=a,c=H.empty,d=0;for(let m=u,A=!1;m>n;m--)A||r.index(m)>0?(A=!0,c=H.from(r.node(m).copy(c)),d++):o--;let f=H.empty,p=0;for(let m=u,A=!1;m>n;m--)A||i.after(m+1)<i.end(m)?(A=!0,f=H.from(i.node(m).copy(f)),p++):l++;e.step(new et(o,l,s,a,new Y(c.append(f),d,p),c.size-d,!0))}function Hc(e,t,n=null,r=e){let i=TT(e,t),u=i&&CT(r,t);return u?i.map(yh).concat({type:t,attrs:n}).concat(u.map(yh)):null}function yh(e){return{type:e,attrs:null}}function TT(e,t){let{parent:n,startIndex:r,endIndex:i}=e,u=n.contentMatchAt(r).findWrapping(t);if(!u)return null;let s=u.length?u[0]:t;return n.canReplaceWith(r,i,s)?u:null}function CT(e,t){let{parent:n,startIndex:r,endIndex:i}=e,u=n.child(r),s=t.contentMatch.findWrapping(u.type);if(!s)return null;let o=(s.length?s[s.length-1]:t).contentMatch;for(let l=r;o&&l<i;l++)o=o.matchType(n.child(l).type);return!o||!o.validEnd?null:s}function xT(e,t,n){let r=H.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=H.from(n[s].type.create(n[s].attrs,r))}let i=t.start,u=t.end;e.step(new et(i,u,i,u,new Y(r,0,0),n.length,!0))}function kT(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let u=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let o=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,o)&&wT(e.doc,e.mapping.slice(u).map(a),r)){let l=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?l=!1:!p&&m&&(l=!0)}l===!1&&$m(e,s,a,u),Fc(e,e.mapping.slice(u).map(a,1),r,void 0,l===null);let c=e.mapping.slice(u),d=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new et(d,f,d+1,f-1,new Y(H.from(r.create(o,null,s.marks)),0,0),1,!0)),l===!0&&Xm(e,s,a,u),!1}})}function Xm(e,t,n,r){t.forEach((i,u)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let o=e.mapping.slice(r).map(n+1+u+s.index);e.replaceWith(o,o+1,t.type.schema.linebreakReplacement.create())}}})}function $m(e,t,n,r){t.forEach((i,u)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+u);e.replaceWith(s,s+1,t.type.schema.text(`
38
- `))}})}function wT(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function IT(e,t,n,r,i){let u=e.doc.nodeAt(t);if(!u)throw new RangeError("No node at given position");n||(n=u.type);let s=n.create(r,null,i||u.marks);if(u.isLeaf)return e.replaceWith(t,t+u.nodeSize,s);if(!n.validContent(u.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new et(t,t+u.nodeSize,t+1,t+u.nodeSize-1,new Y(H.from(s),0,0),1,!0))}function ji(e,t,n=1,r){let i=e.resolve(t),u=i.depth-n,s=r&&r[r.length-1]||i.parent;if(u<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let l=i.depth-1,c=n-2;l>u;l--,c--){let d=i.node(l),f=i.index(l);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),m=r&&r[c+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let A=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!A.type.validContent(p))return!1}let a=i.indexAfter(u),o=r&&r[0];return i.node(u).canReplaceWith(a,a,o?o.type:i.node(u+1).type)}function ST(e,t,n=1,r){let i=e.doc.resolve(t),u=H.empty,s=H.empty;for(let a=i.depth,o=i.depth-n,l=n-1;a>o;a--,l--){u=H.from(i.node(a).copy(u));let c=r&&r[l];s=H.from(c?c.type.create(c.attrs,s):i.node(a).copy(s))}e.step(new ve(t,t,new Y(u.append(s),n,n),!0))}function Na(e,t){let n=e.resolve(t),r=n.index();return DT(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function NT(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let u=t.child(i),s=u.type==r?e.type.schema.nodes.text:u.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(u.marks))return!1}return n.validEnd}function DT(e,t){return!!(e&&t&&!e.isLeaf&&NT(e,t))}function _T(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,u=e.doc.resolve(t-n),s=u.node().type;if(i&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(i);c&&!d?r=!1:!c&&d&&(r=!0)}let a=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);$m(e,c.node(),c.before(),a)}s.inlineContent&&Fc(e,t+n-1,s,u.node().contentMatchAt(u.index()),r==null);let o=e.mapping.slice(a),l=o.map(t-n);if(e.step(new ve(l,o.map(t+n,-1),Y.empty,!0)),r===!0){let c=e.doc.resolve(l);Xm(e,c.node(),c.before(),e.steps.length)}return e}function OT(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let u=r.index(i);if(r.node(i).canReplaceWith(u,u,n))return r.before(i+1);if(u>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let u=r.indexAfter(i);if(r.node(i).canReplaceWith(u,u,n))return r.after(i+1);if(u<r.node(i).childCount)return null}return null}function RT(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let u=0;u<n.openStart;u++)i=i.firstChild.content;for(let u=1;u<=(n.openStart==0&&n.size?2:1);u++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,o=r.index(s)+(a>0?1:0),l=r.node(s),c=!1;if(u==1)c=l.canReplace(o,o,i);else{let d=l.contentMatchAt(o).findWrapping(i.firstChild.type);c=d&&l.canReplaceWith(o,o,d[0])}if(c)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Da(e,t,n=t,r=Y.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),u=e.resolve(n);return e1(i,u,r)?new ve(t,n,r):new MT(i,u,r).fit()}function e1(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class MT{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=H.empty;for(let i=0;i<=t.depth;i++){let u=t.node(i);this.frontier.push({type:u.type,match:u.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=H.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let l=this.findFittable();l?this.placeNodes(l):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let u=this.placed,s=r.depth,a=i.depth;for(;s&&a&&u.childCount==1;)u=u.firstChild.content,s--,a--;let o=new Y(u,s,a);return t>-1?new et(r.pos,t,this.$to.pos,this.$to.end(),o,n):o.size||r.pos!=this.$to.pos?new ve(r.pos,i.pos,o):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let u=n.firstChild;if(n.childCount>1&&(i=0),u.type.spec.isolating&&i<=r){t=r;break}n=u.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,u=null;r?(u=co(this.unplaced.content,r-1).firstChild,i=u.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:o,match:l}=this.frontier[a],c,d=null;if(n==1&&(s?l.matchType(s.type)||(d=l.fillBefore(H.from(s),!1)):u&&o.compatibleContent(u.type)))return{sliceDepth:r,frontierDepth:a,parent:u,inject:d};if(n==2&&s&&(c=l.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:u,wrap:c};if(u&&l.matchType(u.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=co(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new Y(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=co(t,n);if(i.childCount<=1&&n>0){let u=t.size-n<=n+i.size;this.unplaced=new Y(Wi(t,n-1,1),n-1,u?n-1:r)}else this.unplaced=new Y(Wi(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:u}){for(;this.depth>n;)this.closeFrontierNode();if(u)for(let A=0;A<u.length;A++)this.openFrontierNode(u[A]);let s=this.unplaced,a=r?r.content:s.content,o=s.openStart-t,l=0,c=[],{match:d,type:f}=this.frontier[n];if(i){for(let A=0;A<i.childCount;A++)c.push(i.child(A));d=d.matchFragment(i)}let p=a.size+t-(s.content.size-s.openEnd);for(;l<a.childCount;){let A=a.child(l),E=d.matchType(A.type);if(!E)break;l++,(l>1||o==0||A.content.size)&&(d=E,c.push(t1(A.mark(f.allowedMarks(A.marks)),l==1?o:0,l==a.childCount?p:-1)))}let m=l==a.childCount;m||(p=-1),this.placed=Ki(this.placed,n,H.from(c)),this.frontier[n].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let A=0,E=a;A<p;A++){let g=E.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),E=g.content}this.unplaced=m?t==0?Y.empty:new Y(Wi(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new Y(Wi(s.content,t,l),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!fo(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],u=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=fo(t,n,i,r,u);if(s){for(let a=n-1;a>=0;a--){let{match:o,type:l}=this.frontier[a],c=fo(t,a,l,o,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:u?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Ki(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),u=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,u)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Ki(this.placed,this.depth,H.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(H.empty,!0);n.childCount&&(this.placed=Ki(this.placed,this.frontier.length,n))}}function Wi(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Wi(e.firstChild.content,t-1,n)))}function Ki(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Ki(e.lastChild.content,t-1,n)))}function co(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function t1(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,t1(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(H.empty,!0)))),e.copy(r)}function fo(e,t,n,r,i){let u=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==u.childCount&&!n.compatibleContent(u.type))return null;let a=r.fillBefore(u.content,!0,s);return a&&!BT(n,u.content,s)?a:null}function BT(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function LT(e){return e.spec.defining||e.spec.definingForContent}function vT(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),u=e.doc.resolve(n);if(e1(i,u,r))return e.step(new ve(t,n,r));let s=r1(i,u);s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let f=i.depth,p=i.pos-1;f>0;f--,p--){let m=i.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(f)>-1?a=f:i.before(f)==p&&s.splice(1,0,-f)}let o=s.indexOf(a),l=[],c=r.openStart;for(let f=r.content,p=0;;p++){let m=f.firstChild;if(l.push(m),p==r.openStart)break;f=m.content}for(let f=c-1;f>=0;f--){let p=l[f],m=LT(p.type);if(m&&!p.sameMarkup(i.node(Math.abs(a)-1)))c=f;else if(m||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),m=l[p];if(m)for(let A=0;A<s.length;A++){let E=s[(A+o)%s.length],g=!0;E<0&&(g=!1,E=-E);let N=i.node(E-1),w=i.index(E-1);if(N.canReplaceWith(w,w,m.type,m.marks))return e.replace(i.before(E),g?u.after(E):n,new Y(n1(r.content,0,r.openStart,p),p,r.openEnd))}}let d=e.steps.length;for(let f=s.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=s[f];p<0||(t=i.before(p),n=u.after(p))}}function n1(e,t,n,r,i){if(t<n){let u=e.firstChild;e=e.replaceChild(0,u.copy(n1(u.content,t+1,n,r,u)))}if(t>r){let u=i.contentMatchAt(0),s=u.fillBefore(e).append(e);e=s.append(u.matchFragment(s).fillBefore(H.empty,!0))}return e}function PT(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=OT(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new Y(H.from(r),0,0))}function FT(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let s=r.sharedDepth(n),a=!1;for(let o=r.depth;o>s;o--)r.node(o).type.spec.isolating&&(a=!0);for(let o=i.depth;o>s;o--)i.node(o).type.spec.isolating&&(a=!0);if(!a){for(let o=r.depth;o>0&&t==r.start(o);o--)t=r.before(o);for(let o=i.depth;o>0&&n==i.start(o);o--)n=i.before(o);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let u=r1(r,i);for(let s=0;s<u.length;s++){let a=u[s],o=s==u.length-1;if(o&&a==0||r.node(a).type.contentMatch.validEnd)return e.delete(r.start(a),i.end(a));if(a>0&&(o||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function r1(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let u=e.start(i);if(u<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(u==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==u-1)&&n.push(i)}return n}class ti extends nt{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Pe.fail("No node at attribute step's position");let r=Object.create(null);for(let u in n.attrs)r[u]=n.attrs[u];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Pe.fromReplace(t,this.pos,this.pos+1,new Y(H.from(i),0,n.isLeaf?0:1))}getMap(){return Tt.empty}invert(t){return new ti(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new ti(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new ti(n.pos,n.attr,n.value)}}nt.jsonID("attr",ti);class hu extends nt{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return Pe.ok(r)}getMap(){return Tt.empty}invert(t){return new hu(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new hu(n.attr,n.value)}}nt.jsonID("docAttr",hu);let ai=class extends Error{};ai=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};ai.prototype=Object.create(Error.prototype);ai.prototype.constructor=ai;ai.prototype.name="TransformError";class i1{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new zs}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new ai(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(t=i.map(t,1),n=i.map(n,-1)),i.forEach((u,s,a,o)=>{t=Math.min(t,a),n=Math.max(n,o)})}return t==1e9?null:{from:t,to:n}}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=Y.empty){let i=Da(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new Y(H.from(r),0,0))}delete(t,n){return this.replace(t,n,Y.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return vT(this,t,n,r),this}replaceRangeWith(t,n,r){return PT(this,t,n,r),this}deleteRange(t,n){return FT(this,t,n),this}lift(t,n){return yT(this,t,n),this}join(t,n=1){return _T(this,t,n),this}wrap(t,n){return xT(this,t,n),this}setBlockType(t,n=t,r,i=null){return kT(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return IT(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new ti(t,n,r)),this}setDocAttribute(t,n){return this.step(new hu(t,n)),this}addNodeMark(t,n){return this.step(new zn(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof me)n.isInSet(r.marks)&&this.step(new Rr(t,n));else{let i=r.marks,u,s=[];for(;u=n.isInSet(i);)s.push(new Rr(t,u)),i=u.removeFromSet(i);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return ST(this,t,n,r),this}addMark(t,n,r){return gT(this,t,n,r),this}removeMark(t,n,r){return bT(this,t,n,r),this}clearIncompatible(t,n,r){return Fc(this,t,n,r),this}}const ho=Object.create(null);class ue{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new u1(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=Y.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let u=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:o,$to:l}=s[a],c=t.mapping.slice(u);t.replaceRange(c.map(o.pos),c.map(l.pos),a?Y.empty:n),a==0&&xh(t,u,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let u=0;u<i.length;u++){let{$from:s,$to:a}=i[u],o=t.mapping.slice(r),l=o.map(s.pos),c=o.map(a.pos);u?t.deleteRange(l,c):(t.replaceRangeWith(l,c,n),xh(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new ae(t):Jr(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let u=t.depth-1;u>=0;u--){let s=n<0?Jr(t.node(0),t.node(u),t.before(u+1),t.index(u),n,r):Jr(t.node(0),t.node(u),t.after(u+1),t.index(u)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new xt(t.node(0))}static atStart(t){return Jr(t,t,0,0,1)||new xt(t)}static atEnd(t){return Jr(t,t,t.content.size,t.childCount,-1)||new xt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ho[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in ho)throw new RangeError("Duplicate use of selection JSON ID "+t);return ho[t]=n,n.prototype.jsonID=t,n}getBookmark(){return ae.between(this.$anchor,this.$head).getBookmark()}}ue.prototype.visible=!0;class u1{constructor(t,n){this.$from=t,this.$to=n}}let Th=!1;function Ch(e){!Th&&!e.parent.inlineContent&&(Th=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ae extends ue{constructor(t,n=t){Ch(t),Ch(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return ue.near(r);let i=t.resolve(n.map(this.anchor));return new ae(i.parent.inlineContent?i:r,r)}replace(t,n=Y.empty){if(super.replace(t,n),n==Y.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof ae&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new _a(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ae(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let u=ue.findFrom(n,r,!0)||ue.findFrom(n,-r,!0);if(u)n=u.$head;else return ue.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(ue.findFrom(t,-r,!0)||ue.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new ae(t,n)}}ue.jsonID("text",ae);class _a{constructor(t,n){this.anchor=t,this.head=n}map(t){return new _a(t.map(this.anchor),t.map(this.head))}resolve(t){return ae.between(t.resolve(this.anchor),t.resolve(this.head))}}class re extends ue{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),u=t.resolve(i);return r?ue.near(u):new re(u)}content(){return new Y(H.from(this.node),0,0)}eq(t){return t instanceof re&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Uc(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new re(t.resolve(n.anchor))}static create(t,n){return new re(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}re.prototype.visible=!1;ue.jsonID("node",re);class Uc{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new _a(r,r):new Uc(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&re.isSelectable(r)?new re(n):ue.near(n)}}class xt extends ue{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=Y.empty){if(n==Y.empty){t.delete(0,t.doc.content.size);let r=ue.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new xt(t)}map(t){return new xt(t)}eq(t){return t instanceof xt}getBookmark(){return HT}}ue.jsonID("all",xt);const HT={map(){return this},resolve(e){return new xt(e)}};function Jr(e,t,n,r,i,u=!1){if(t.inlineContent)return ae.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let a=t.child(s);if(a.isAtom){if(!u&&re.isSelectable(a))return re.create(e,n-(i<0?a.nodeSize:0))}else{let o=Jr(e,a,n+i,i<0?a.childCount:0,i,u);if(o)return o}n+=a.nodeSize*i}return null}function xh(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof ve||i instanceof et))return;let u=e.mapping.maps[r],s;u.forEach((a,o,l,c)=>{s==null&&(s=c)}),e.setSelection(ue.near(e.doc.resolve(s),n))}const kh=1,ds=2,wh=4;class UT extends i1{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|kh)&~ds,this.storedMarks=null,this}get selectionSet(){return(this.updated&kh)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=ds,this}ensureMarks(t){return me.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&ds)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~ds,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||me.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let u=this.storedMarks;if(!u){let s=this.doc.resolve(n);u=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,u)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(ue.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=wh,this}get scrolledIntoView(){return(this.updated&wh)>0}}function Ih(e,t){return!t||!e?e:e.bind(t)}class Qi{constructor(t,n,r){this.name=t,this.init=Ih(n.init,r),this.apply=Ih(n.apply,r)}}const WT=[new Qi("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Qi("selection",{init(e,t){return e.selection||ue.atStart(t.doc)},apply(e){return e.selection}}),new Qi("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Qi("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class po{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=WT.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Qi(r.key,r.spec.state,r))})}}class ei{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),i=null;for(;;){let u=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let o=i?i[s].n:0,l=i?i[s].state:this,c=o<n.length&&a.spec.appendTransaction.call(a,o?n.slice(o):n,l,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",t),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),u=!0}i&&(i[s]={state:r,n:n.length})}}if(!u)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new ei(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let u=r[i];n[u.name]=u.apply(t,this[u.name],this,n)}return n}get tr(){return new UT(this)}static create(t){let n=new po(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new ei(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new po(this.schema,t.plugins),r=n.fields,i=new ei(n);for(let u=0;u<r.length;u++){let s=r[u].name;i[s]=this.hasOwnProperty(s)?this[s]:r[u].init(t,i)}return i}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],u=i.spec.state;u&&u.toJSON&&(n[r]=u.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new po(t.schema,t.plugins),u=new ei(i);return i.fields.forEach(s=>{if(s.name=="doc")u.doc=kn.fromJSON(t.schema,n.doc);else if(s.name=="selection")u.selection=ue.fromJSON(u.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(u.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let o=r[a],l=o.spec.state;if(o.key==s.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){u[s.name]=l.fromJSON.call(o,t,n[a],u);return}}u[s.name]=s.init(t,u)}}),u}}function s1(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=s1(i,t,{})),n[r]=i}return n}class kt{constructor(t){this.spec=t,this.props={},t.props&&s1(t.props,this,this.props),this.key=t.key?t.key.key:a1("plugin")}getState(t){return t[this.key]}}const mo=Object.create(null);function a1(e){return e in mo?e+"$"+ ++mo[e]:(mo[e]=0,e+"$")}class wt{constructor(t="key"){this.key=a1(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Wc=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function o1(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const l1=(e,t,n)=>{let r=o1(e,n);if(!r)return!1;let i=Kc(r);if(!i){let s=r.blockRange(),a=s&&Sa(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let u=i.nodeBefore;if(f1(e,i,t,-1))return!0;if(r.parent.content.size==0&&(oi(u,"end")||re.isSelectable(u)))for(let s=r.depth;;s--){let a=Da(e.doc,r.before(s),r.after(s),Y.empty);if(a&&a.slice.size<a.to-a.from){if(t){let o=e.tr.step(a);o.setSelection(oi(u,"end")?ue.findFrom(o.doc.resolve(o.mapping.map(i.pos,-1)),-1):re.create(o.doc,i.pos-u.nodeSize)),t(o.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return u.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-u.nodeSize,i.pos).scrollIntoView()),!0):!1},KT=(e,t,n)=>{let r=o1(e,n);if(!r)return!1;let i=Kc(r);return i?QT(e,i,t):!1};function QT(e,t,n){let r=t.nodeBefore,i=r,u=t.pos-1;for(;!i.isTextblock;u--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let s=t.nodeAfter,a=s,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let l=Da(e.doc,u,o,Y.empty);if(!l||l.from!=u||l instanceof ve&&l.slice.size>=o-u)return!1;if(n){let c=e.tr.step(l);c.setSelection(ae.create(c.doc,u)),n(c.scrollIntoView())}return!0}function oi(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const c1=(e,t,n)=>{let{$head:r,empty:i}=e.selection,u=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;u=Kc(r)}let s=u&&u.nodeBefore;return!s||!re.isSelectable(s)?!1:(t&&t(e.tr.setSelection(re.create(e.doc,u.pos-s.nodeSize)).scrollIntoView()),!0)};function Kc(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function zT(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const YT=(e,t,n)=>{let r=zT(e,n);if(!r)return!1;let i=d1(r);if(!i)return!1;let u=i.nodeAfter;if(f1(e,i,t,1))return!0;if(r.parent.content.size==0&&(oi(u,"start")||re.isSelectable(u))){let s=Da(e.doc,r.before(),r.after(),Y.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(oi(u,"start")?ue.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):re.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return u.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+u.nodeSize).scrollIntoView()),!0):!1},GT=(e,t,n)=>{let{$head:r,empty:i}=e.selection,u=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;u=d1(r)}let s=u&&u.nodeAfter;return!s||!re.isSelectable(s)?!1:(t&&t(e.tr.setSelection(re.create(e.doc,u.pos)).scrollIntoView()),!0)};function d1(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const qT=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
39
- `).scrollIntoView()),!0)};function Qc(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const VT=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),u=n.indexAfter(-1),s=Qc(i.contentMatchAt(u));if(!s||!i.canReplaceWith(u,u,s))return!1;if(t){let a=n.after(),o=e.tr.replaceWith(a,a,s.createAndFill());o.setSelection(ue.near(o.doc.resolve(a),1)),t(o.scrollIntoView())}return!0},JT=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof xt||r.parent.inlineContent||i.parent.inlineContent)return!1;let u=Qc(i.parent.contentMatchAt(i.indexAfter()));if(!u||!u.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,u.createAndFill());a.setSelection(ae.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},jT=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let u=n.before();if(ji(e.doc,u))return t&&t(e.tr.split(u).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Sa(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function ZT(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof re&&t.selection.node.isBlock)return!r.parentOffset||!ji(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let u=[],s,a,o=!1,l=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){o=r.end(p)==r.pos+(r.depth-p),l=r.start(p)==r.pos-(r.depth-p),a=Qc(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),u.unshift(o&&a?{type:a}:null),s=p;break}else{if(p==1)return!1;u.unshift(null)}let c=t.tr;(t.selection instanceof ae||t.selection instanceof xt)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=ji(c.doc,d,u.length,u);if(f||(u[0]=a?{type:a}:null,f=ji(c.doc,d,u.length,u)),!f)return!1;if(c.split(d,u.length,u),!o&&l&&r.node(s).type!=a){let p=c.mapping.map(r.before(s)),m=c.doc.resolve(p);a&&r.node(s-1).canReplaceWith(m.index(),m.index()+1,a)&&c.setNodeMarkup(c.mapping.map(r.before(s)),a)}return n&&n(c.scrollIntoView()),!0}}const XT=ZT(),$T=(e,t)=>(t&&t(e.tr.setSelection(new xt(e.doc))),!0);function eC(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,u=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(u-1,u)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(u,u+1)||!(i.isTextblock||Na(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function f1(e,t,n,r){let i=t.nodeBefore,u=t.nodeAfter,s,a,o=i.type.spec.isolating||u.type.spec.isolating;if(!o&&eC(e,t,n))return!0;let l=!o&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(u.type))&&a.matchType(s[0]||u.type).validEnd){if(n){let p=t.pos+u.nodeSize,m=H.empty;for(let g=s.length-1;g>=0;g--)m=H.from(s[g].create(null,m));m=H.from(i.copy(m));let A=e.tr.step(new et(t.pos-1,p,t.pos,p,new Y(m,1,0),s.length,!0)),E=A.doc.resolve(p+2*s.length);E.nodeAfter&&E.nodeAfter.type==i.type&&Na(A.doc,E.pos)&&A.join(E.pos),n(A.scrollIntoView())}return!0}let c=u.type.spec.isolating||r>0&&o?null:ue.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Sa(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&oi(u,"start",!0)&&oi(i,"end")){let p=i,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let A=u,E=1;for(;!A.isTextblock;A=A.firstChild)E++;if(p.canReplace(p.childCount,p.childCount,A.content)){if(n){let g=H.empty;for(let w=m.length-1;w>=0;w--)g=H.from(m[w].copy(g));let N=e.tr.step(new et(t.pos-m.length,t.pos+u.nodeSize,t.pos+E,t.pos+u.nodeSize-E,new Y(g,m.length,0),0,!0));n(N.scrollIntoView())}return!0}}return!1}function h1(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,u=i.depth;for(;i.node(u).isInline;){if(!u)return!1;u--}return i.node(u).isTextblock?(n&&n(t.tr.setSelection(ae.create(t.doc,e<0?i.start(u):i.end(u)))),!0):!1}}const tC=h1(-1),nC=h1(1);function zc(e,t=null){return function(n,r){let{$from:i,$to:u}=n.selection,s=i.blockRange(u),a=s&&Hc(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function pu(e,t=null){return function(n,r){let i=!1;for(let u=0;u<n.selection.ranges.length&&!i;u++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[u];n.doc.nodesBetween(s,a,(o,l)=>{if(i)return!1;if(!(!o.isTextblock||o.hasMarkup(e,t)))if(o.type==e)i=!0;else{let c=n.doc.resolve(l),d=c.index();i=c.parent.canReplaceWith(d,d+1,e)}})}if(!i)return!1;if(r){let u=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[s];u.setBlockType(a,o,e,t)}r(u.scrollIntoView())}return!0}}function rC(e,t,n,r){for(let i=0;i<t.length;i++){let{$from:u,$to:s}=t[i],a=u.depth==0?e.inlineContent&&e.type.allowsMarkType(n):!1;if(e.nodesBetween(u.pos,s.pos,(o,l)=>{if(a)return!1;a=o.inlineContent&&o.type.allowsMarkType(n)}),a)return!0}return!1}function Oa(e,t=null,n){return function(r,i){let{empty:u,$cursor:s,ranges:a}=r.selection;if(u&&!s||!rC(r.doc,a,e))return!1;if(i)if(s)e.isInSet(r.storedMarks||s.marks())?i(r.tr.removeStoredMark(e)):i(r.tr.addStoredMark(e.create(t)));else{let o,l=r.tr;o=!a.some(c=>r.doc.rangeHasMark(c.$from.pos,c.$to.pos,e));for(let c=0;c<a.length;c++){let{$from:d,$to:f}=a[c];if(!o)l.removeMark(d.pos,f.pos,e);else{let p=d.pos,m=f.pos,A=d.nodeAfter,E=f.nodeBefore,g=A&&A.isText?/^\s*/.exec(A.text)[0].length:0,N=E&&E.isText?/\s*$/.exec(E.text)[0].length:0;p+g<m&&(p+=g,m-=N),l.addMark(p,m,e.create(t))}}i(l.scrollIntoView())}return!0}}function Ai(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let Ao=Ai(Wc,l1,c1),Sh=Ai(Wc,YT,GT);const En={Enter:Ai(qT,JT,jT,XT),"Mod-Enter":VT,Backspace:Ao,"Mod-Backspace":Ao,"Shift-Backspace":Ao,Delete:Sh,"Mod-Delete":Sh,"Mod-a":$T},p1={"Ctrl-h":En.Backspace,"Alt-Backspace":En["Mod-Backspace"],"Ctrl-d":En.Delete,"Ctrl-Alt-Backspace":En["Mod-Delete"],"Alt-Delete":En["Mod-Delete"],"Alt-d":En["Mod-Delete"],"Ctrl-a":tC,"Ctrl-e":nC};for(let e in En)p1[e]=En[e];const iC=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,uC=iC?p1:En;class It{constructor(t,n,r={}){this.match=t,this.match=t,this.handler=typeof n=="string"?sC(n):n,this.undoable=r.undoable!==!1,this.inCode=r.inCode||!1,this.inCodeMark=r.inCodeMark!==!1}}function sC(e){return function(t,n,r,i){let u=e;if(n[1]){let s=n[0].lastIndexOf(n[1]);u+=n[0].slice(s+n[1].length),r+=s;let a=r-i;a>0&&(u=n[0].slice(s-a,s)+u,r=i)}return t.tr.insertText(u,r,i)}}const aC=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let i=n[r],u;if(i.spec.isInputRules&&(u=i.getState(e))){if(t){let s=e.tr,a=u.transform;for(let o=a.steps.length-1;o>=0;o--)s.step(a.steps[o].invert(a.docs[o]));if(u.text){let o=s.doc.resolve(u.from).marks();s.replaceWith(u.from,u.to,e.schema.text(u.text,o))}else s.delete(u.from,u.to);t(s)}return!0}}return!1};new It(/--$/,"—",{inCodeMark:!1});new It(/\.\.\.$/,"…",{inCodeMark:!1});new It(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1});new It(/"$/,"”",{inCodeMark:!1});new It(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1});new It(/'$/,"’",{inCodeMark:!1});function Yc(e,t,n=null,r){return new It(e,(i,u,s,a)=>{let o=n instanceof Function?n(u):n,l=i.tr.delete(s,a),c=l.doc.resolve(s),d=c.blockRange(),f=d&&Hc(d,t,o);if(!f)return null;l.wrap(d,f);let p=l.doc.resolve(s-1).nodeBefore;return p&&p.type==t&&Na(l.doc,s-1)&&(!r||r(u,p))&&l.join(s-1),l})}function m1(e,t,n=null){return new It(e,(r,i,u,s)=>{let a=r.doc.resolve(u),o=n instanceof Function?n(i):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?r.tr.delete(u,s).setBlockType(u,u,t,o):null})}const tr=typeof navigator<"u"?navigator:null,Nh=typeof document<"u"?document:null,ir=tr&&tr.userAgent||"",Hl=/Edge\/(\d+)/.exec(ir),A1=/MSIE \d/.exec(ir),Ul=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ir),Gc=!!(A1||Ul||Hl);A1?document.documentMode:Ul?+Ul[1]:Hl&&+Hl[1];const oC=!Gc&&/gecko\/(\d+)/i.test(ir);oC&&+(/Firefox\/(\d+)/.exec(ir)||[0,0])[1];const Wl=!Gc&&/Chrome\/(\d+)/.exec(ir),lC=!!Wl;Wl&&+Wl[1];const cC=!Gc&&!!tr&&/Apple Computer/.test(tr.vendor),dC=cC&&(/Mobile\/\w+/.test(ir)||!!tr&&tr.maxTouchPoints>2);dC||tr&&/Mac/.test(tr.platform);const fC=/Android \d/.test(ir),hC=!!Nh&&"webkitFontSmoothing"in Nh.documentElement.style;hC&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];function go(e,t,n,r,i,u){if(e.composing)return!1;const s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;const o=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,void 0,"")+r;for(let l of i){const c=l,d=c.match.exec(o),f=d&&d[0]&&c.handler(s,d,t-(d[0].length-r.length),n);if(f)return c.undoable!==!1&&f.setMeta(u,{transform:f,from:t,to:n,text:r}),e.dispatch(f),!0}return!1}const pC=new wt("MILKDOWN_CUSTOM_INPUTRULES");function mC({rules:e}){const t=new kt({key:pC,isInputRules:!0,state:{init(){return null},apply(n,r){const i=n.getMeta(this);return i||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,i,u){return go(n,r,i,u,e,t)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:r}=n.state.selection;r&&go(n,r.pos,r.pos,"",e,t)}),!1),keydown:(n,r)=>!(fC&&lC&&r.key==="Enter")||n.composing?!1:n.someProp("handleKeyDown",i=>i(n,r))?(r.preventDefault(),!0):!1},handleKeyDown(n,r){if(r.key!=="Enter")return!1;const{$cursor:i}=n.state.selection;return i?go(n,i.pos,i.pos,`
40
- `,e,t):!1}}});return t}function Fu(e,t,n={}){return new It(e,(r,i,u,s)=>{var a,o,l,c;const{tr:d}=r,f=i.length;let p=i[f-1],m=i[0],A=[],E;const g={group:p,fullMatch:m,start:u,end:s},N=(a=n.updateCaptured)==null?void 0:a.call(n,g);if(Object.assign(g,N),{group:p,fullMatch:m,start:u,end:s}=g,m===null||p?.trim()==="")return null;if(p){const w=m.search(/\S/),_=u+m.indexOf(p),S=_+p.length;A=(o=d.storedMarks)!=null?o:[],S<s&&d.delete(S,s),_>u&&d.delete(u+w,_),E=u+w+p.length;const k=(l=n.getAttr)==null?void 0:l.call(n,i);d.addMark(u,E,t.create(k)),d.setStoredMarks(A),(c=n.beforeDispatch)==null||c.call(n,{match:i,start:u,end:s,tr:d})}return d})}function g1(e){return Object.assign(Object.create(e),e).setTime(Date.now())}function AC(e,t){return Array.isArray(e)&&e.includes(t.type)||t.type===e}function gC(e){return t=>{for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r)){const i=t.before(n),u=t.after(n);return{from:i,to:u,node:r}}}}}function bC(e,t){return gC(n=>n.type===t)(e)}function EC(e){return t=>{for(let n=t.depth;n>0;n--){const r=t.node(n);if(e(r))return{pos:t.before(n),start:t.start(n),depth:n,node:r}}}}function yC(e,t){if(!(e instanceof re))return;const{node:n,$from:r}=e;if(AC(t,n))return{node:n,pos:r.pos,start:r.start(r.depth),depth:r.depth}}const TC=(e,t)=>{const{selection:n,doc:r}=e;if(n instanceof re)return{hasNode:n.node.type===t,pos:n.from,target:n.node};const{from:i,to:u}=n;let s=!1,a=-1,o=null;return r.nodesBetween(i,u,(l,c)=>o?!1:l.type===t?(s=!0,a=c,o=l,!1):!0),{hasNode:s,pos:a,target:o}};var nr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ys={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},CC=typeof navigator<"u"&&/Mac/.test(navigator.platform),xC=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var qe=0;qe<10;qe++)nr[48+qe]=nr[96+qe]=String(qe);for(var qe=1;qe<=24;qe++)nr[qe+111]="F"+qe;for(var qe=65;qe<=90;qe++)nr[qe]=String.fromCharCode(qe+32),Ys[qe]=String.fromCharCode(qe);for(var bo in nr)Ys.hasOwnProperty(bo)||(Ys[bo]=nr[bo]);function kC(e){var t=CC&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||xC&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Ys:nr)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const wC=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),IC=typeof navigator<"u"&&/Win/.test(navigator.platform);function SC(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,u,s;for(let a=0;a<t.length-1;a++){let o=t[a];if(/^(cmd|meta|m)$/i.test(o))s=!0;else if(/^a(lt)?$/i.test(o))r=!0;else if(/^(c|ctrl|control)$/i.test(o))i=!0;else if(/^s(hift)?$/i.test(o))u=!0;else if(/^mod$/i.test(o))wC?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+o)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),u&&(n="Shift-"+n),n}function NC(e){let t=Object.create(null);for(let n in e)t[SC(n)]=e[n];return t}function Eo(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function DC(e){return new kt({props:{handleKeyDown:b1(e)}})}function b1(e){let t=NC(e);return function(n,r){let i=kC(r),u,s=t[Eo(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=t[Eo(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(IC&&r.ctrlKey&&r.altKey)&&(u=nr[r.keyCode])&&u!=i){let a=t[Eo(u,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var E1=class{},y1=class{constructor(){this.elements=[],this.size=()=>this.elements.length,this.top=()=>this.elements.at(-1),this.push=e=>{this.top()?.push(e)},this.open=e=>{this.elements.push(e)},this.close=()=>{const e=this.elements.pop();if(!e)throw Zp();return e}}},_C=class T1 extends E1{constructor(t,n,r){super(),this.type=t,this.content=n,this.attrs=r}push(t,...n){this.content.push(t,...n)}pop(){return this.content.pop()}static create(t,n,r){return new T1(t,n,r)}},Jt,Nu,fa,ha,pa,Du,_u,Sr,OC=(Sr=class extends y1{constructor(n){super();Re(this,Jt,me.none);Re(this,Nu,n=>n.isText);Re(this,fa,(n,r)=>{if(le(this,Nu).call(this,n)&&le(this,Nu).call(this,r)&&me.sameSet(n.marks,r.marks))return this.schema.text(n.text+r.text,n.marks)});Re(this,ha,n=>{const r=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.parseMarkdown.match(n));if(!r)throw a2(n);return r});Re(this,pa,n=>{const r=le(this,ha).call(this,n);r.spec.parseMarkdown.runner(this,n,r)});Re(this,Du,()=>{Yr(this,Jt,me.none);const n=this.close();return le(this,_u).call(this,n.type,n.attrs,n.content)});Re(this,_u,(n,r,i)=>{const u=n.createAndFill(r,i,le(this,Jt));if(!u)throw s2(n,r,i);return this.push(u),u});this.injectRoot=(r,i,u)=>(this.openNode(i,u),this.next(r.children),this),this.openNode=(r,i)=>(this.open(_C.create(r,[],i)),this),this.closeNode=()=>{try{le(this,Du).call(this)}catch(r){console.error(r)}return this},this.addNode=(r,i,u)=>{try{le(this,_u).call(this,r,i,u)}catch(s){console.error(s)}return this},this.openMark=(r,i)=>(Yr(this,Jt,r.create(i).addToSet(le(this,Jt))),this),this.closeMark=r=>(Yr(this,Jt,r.removeFromSet(le(this,Jt))),this),this.addText=r=>{try{const i=this.top();if(!i)throw Zp();const u=i.pop(),s=this.schema.text(r,le(this,Jt));if(!u)return i.push(s),this;const a=le(this,fa).call(this,u,s);return a?(i.push(a),this):(i.push(u,s),this)}catch(i){return console.error(i),this}},this.build=()=>{let r;do r=le(this,Du).call(this);while(this.size());return r},this.next=(r=[])=>([r].flat().forEach(i=>le(this,pa).call(this,i)),this),this.toDoc=()=>this.build(),this.run=(r,i)=>{const u=r.runSync(r.parse(i),i);return this.next(u),this},this.schema=n}},Jt=new WeakMap,Nu=new WeakMap,fa=new WeakMap,ha=new WeakMap,pa=new WeakMap,Du=new WeakMap,_u=new WeakMap,Sr.create=(n,r)=>{const i=new Sr(n);return u=>(i.run(r,u),i.toDoc())},Sr),Nr,Dh=(Nr=class extends E1{constructor(t,n,r,i={}){super(),this.type=t,this.children=n,this.value=r,this.props=i,this.push=(u,...s)=>{this.children||(this.children=[]),this.children.push(u,...s)},this.pop=()=>this.children?.pop()}},Nr.create=(t,n,r,i={})=>new Nr(t,n,r,i),Nr),RC=e=>Object.prototype.hasOwnProperty.call(e,"size"),yn,Ou,ma,Aa,Ru,ga,Mu,ba,Ea,si,Er,ya,Bu,Dr,MC=(Dr=class extends y1{constructor(n){super();Re(this,yn,me.none);Re(this,Ou,n=>{const r=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.toMarkdown.match(n));if(!r)throw o2(n.type);return r});Re(this,ma,n=>le(this,Ou).call(this,n).spec.toMarkdown.runner(this,n));Re(this,Aa,(n,r)=>le(this,Ou).call(this,n).spec.toMarkdown.runner(this,n,r));Re(this,Ru,n=>{const{marks:r}=n,i=u=>u.type.spec.priority??50;[...r].sort((u,s)=>i(u)-i(s)).every(u=>!le(this,Aa).call(this,u,n))&&le(this,ma).call(this,n),r.forEach(u=>le(this,Bu).call(this,u))});Re(this,ga,(n,r)=>{if(n.type===r||n.children?.length!==1)return n;const i=o=>{if(o.type===r)return o.value!=null?null:o;if(o.children?.length!==1)return null;const[l]=o.children;return l?i(l):null},u=i(n);if(!u)return n;const s=u.children?[...u.children]:void 0,a={...n,children:s};return a.children=s,u.children=[a],u});Re(this,Mu,n=>{const{children:r}=n;return r&&(n.children=r.reduce((i,u,s)=>{if(s===0)return[u];const a=i.at(-1);if(a&&a.isMark&&u.isMark){u=le(this,ga).call(this,u,a.type);const{children:o,...l}=u,{children:c,...d}=a;if(u.type===a.type&&o&&c&&JSON.stringify(l)===JSON.stringify(d)){const f={...d,children:[...c,...o]};return i.slice(0,-1).concat(le(this,Mu).call(this,f))}}return i.concat(u)},[])),n});Re(this,ba,n=>{const r={...n.props,type:n.type};return n.children&&(r.children=n.children),n.value&&(r.value=n.value),r});Re(this,Ea,(n,r)=>{let i="",u="";const s=n.children;let a=-1,o=-1;const l=d=>{d&&d.forEach((f,p)=>{f.type==="text"&&f.value&&(a<0&&(a=p),o=p)})};if(s){l(s);const d=s?.[o],f=s?.[a];if(d&&d.value.endsWith(" ")){const p=d.value,m=p.trimEnd();u=p.slice(m.length),d.value=m}if(f&&f.value.startsWith(" ")){const p=f.value,m=p.trimStart();i=p.slice(0,p.length-m.length),f.value=m}}i.length&&le(this,Er).call(this,"text",void 0,i);const c=r();return u.length&&le(this,Er).call(this,"text",void 0,u),c});Re(this,si,(n=!1)=>{const r=this.close(),i=()=>le(this,Er).call(this,r.type,r.children,r.value,r.props);return n?le(this,Ea).call(this,r,i):i()});Re(this,Er,(n,r,i,u)=>{const s=Dh.create(n,r,i,u),a=le(this,Mu).call(this,le(this,ba).call(this,s));return this.push(a),a});Re(this,ya,(n,r,i,u)=>n.isInSet(le(this,yn))?this:(Yr(this,yn,n.addToSet(le(this,yn))),this.openNode(r,i,{...u,isMark:!0})));Re(this,Bu,n=>{n.isInSet(le(this,yn))&&(Yr(this,yn,n.type.removeFromSet(le(this,yn))),le(this,si).call(this,!0))});this.openNode=(r,i,u)=>(this.open(Dh.create(r,void 0,i,u)),this),this.closeNode=()=>(le(this,si).call(this),this),this.addNode=(r,i,u,s)=>(le(this,Er).call(this,r,i,u,s),this),this.withMark=(r,i,u,s)=>(le(this,ya).call(this,r,i,u,s),this),this.closeMark=r=>(le(this,Bu).call(this,r),this),this.build=()=>{let r=null;do r=le(this,si).call(this);while(this.size());return r},this.next=r=>RC(r)?(r.forEach(i=>{le(this,Ru).call(this,i)}),this):(le(this,Ru).call(this,r),this),this.toString=r=>r.stringify(this.build()),this.run=r=>(this.next(r),this),this.schema=n}},yn=new WeakMap,Ou=new WeakMap,ma=new WeakMap,Aa=new WeakMap,Ru=new WeakMap,ga=new WeakMap,Mu=new WeakMap,ba=new WeakMap,Ea=new WeakMap,si=new WeakMap,Er=new WeakMap,ya=new WeakMap,Bu=new WeakMap,Dr.create=(n,r)=>{const i=new Dr(n);return u=>(i.run(u),i.toString(r))},Dr);const Ve=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},li=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let Kl=null;const gn=function(e,t,n){let r=Kl||(Kl=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},BC=function(){Kl=null},Mr=function(e,t,n,r){return n&&(_h(e,t,n,r,-1)||_h(e,t,n,r,1))},LC=/^(img|br|input|textarea|hr)$/i;function _h(e,t,n,r,i){for(var u;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Rt(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Hu(e)||LC.test(e.nodeName)||e.contentEditable=="false")return!1;t=Ve(e)+(i<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((u=s.pmViewDesc)===null||u===void 0)&&u.ignoreForSelection)t+=i;else return!1;else e=s,t=i<0?Rt(e):0}else return!1}}function Rt(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function vC(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Rt(e)}else if(e.parentNode&&!Hu(e))t=Ve(e),e=e.parentNode;else return null}}function PC(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Hu(e))t=Ve(e)+1,e=e.parentNode;else return null}}function FC(e,t,n){for(let r=t==0,i=t==Rt(e);r||i;){if(e==n)return!0;let u=Ve(e);if(e=e.parentNode,!e)return!1;r=r&&u==0,i=i&&u==Rt(e)}}function Hu(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Ra=function(e){return e.focusNode&&Mr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function mr(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function HC(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function UC(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(Rt(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(Rt(r.startContainer),r.startOffset)}}}const tn=typeof navigator<"u"?navigator:null,Oh=typeof document<"u"?document:null,ur=tn&&tn.userAgent||"",Ql=/Edge\/(\d+)/.exec(ur),C1=/MSIE \d/.exec(ur),zl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ur),mt=!!(C1||zl||Ql),jn=C1?document.documentMode:zl?+zl[1]:Ql?+Ql[1]:0,Mt=!mt&&/gecko\/(\d+)/i.test(ur);Mt&&+(/Firefox\/(\d+)/.exec(ur)||[0,0])[1];const Yl=!mt&&/Chrome\/(\d+)/.exec(ur),Je=!!Yl,x1=Yl?+Yl[1]:0,tt=!mt&&!!tn&&/Apple Computer/.test(tn.vendor),ci=tt&&(/Mobile\/\w+/.test(ur)||!!tn&&tn.maxTouchPoints>2),Dt=ci||(tn?/Mac/.test(tn.platform):!1),k1=tn?/Win/.test(tn.platform):!1,xn=/Android \d/.test(ur),Uu=!!Oh&&"webkitFontSmoothing"in Oh.documentElement.style,WC=Uu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function KC(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function pn(e,t){return typeof e=="number"?e:e[t]}function QC(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Rh(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,u=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=li(s);continue}let a=s,o=a==u.body,l=o?KC(u):QC(a),c=0,d=0;if(t.top<l.top+pn(r,"top")?d=-(l.top-t.top+pn(i,"top")):t.bottom>l.bottom-pn(r,"bottom")&&(d=t.bottom-t.top>l.bottom-l.top?t.top+pn(i,"top")-l.top:t.bottom-l.bottom+pn(i,"bottom")),t.left<l.left+pn(r,"left")?c=-(l.left-t.left+pn(i,"left")):t.right>l.right-pn(r,"right")&&(c=t.right-l.right+pn(i,"right")),c||d)if(o)u.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,m=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let A=a.scrollLeft-p,E=a.scrollTop-m;t={left:t.left-A,top:t.top-E,right:t.right-A,bottom:t.bottom-E}}let f=o?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:li(s)}}function zC(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let u=(t.left+t.right)/2,s=n+1;s<Math.min(innerHeight,t.bottom);s+=5){let a=e.root.elementFromPoint(u,s);if(!a||a==e.dom||!e.dom.contains(a))continue;let o=a.getBoundingClientRect();if(o.top>=n-20){r=a,i=o.top;break}}return{refDOM:r,refTop:i,stack:w1(e.dom)}}function w1(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=li(r));return t}function YC({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;I1(n,r==0?0:r-t)}function I1(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:u}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=u&&(r.scrollLeft=u)}}let Gr=null;function GC(e){if(e.setActive)return e.setActive();if(Gr)return e.focus(Gr);let t=w1(e);e.focus(Gr==null?{get preventScroll(){return Gr={preventScroll:!0},!0}}:void 0),Gr||(Gr=!1,I1(t,0))}function S1(e,t){let n,r=2e8,i,u=0,s=t.top,a=t.top,o,l;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=gn(c).getClientRects();else continue;for(let p=0;p<f.length;p++){let m=f[p];if(m.top<=s&&m.bottom>=a){s=Math.max(m.bottom,s),a=Math.min(m.top,a);let A=m.left>t.left?m.left-t.left:m.right<t.left?t.left-m.right:0;if(A<r){n=c,r=A,i=A&&n.nodeType==3?{left:m.right<t.left?m.right:m.left,top:t.top}:t,c.nodeType==1&&A&&(u=d+(t.left>=(m.left+m.right)/2?1:0));continue}}else m.top>t.top&&!o&&m.left<=t.left&&m.right>=t.left&&(o=c,l={left:Math.max(m.left,Math.min(m.right,t.left)),top:m.top});!n&&(t.left>=m.right&&t.top>=m.top||t.left>=m.left&&t.top>=m.bottom)&&(u=d+1)}}return!n&&o&&(n=o,i=l,r=0),n&&n.nodeType==3?qC(n,i):!n||r&&n.nodeType==1?{node:e,offset:u}:S1(n,i)}function qC(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let u=0;u<n;u++){r.setEnd(e,u+1),r.setStart(e,u);let s=Pn(r,1);if(s.top!=s.bottom&&qc(t,s)){i={node:e,offset:u+(t.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),i||{node:e,offset:0}}function qc(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function VC(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function JC(e,t,n){let{node:r,offset:i}=S1(t,n),u=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();u=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,i,u)}function jC(e,t,n,r){let i=-1;for(let u=t,s=!1;u!=e.dom;){let a=e.docView.nearestDesc(u,!0),o;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((o=a.dom.getBoundingClientRect()).width||o.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&o.left>r.left||o.top>r.top?i=a.posBefore:(!s&&o.right<r.left||o.bottom<r.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?a.posBefore:a.posAfter;u=a.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function N1(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),u=i;;){let s=e.childNodes[u];if(s.nodeType==1){let a=s.getClientRects();for(let o=0;o<a.length;o++){let l=a[o];if(qc(t,l))return N1(s,t,l)}}if((u=(u+1)%r)==i)break}return e}function ZC(e,t){let n=e.dom.ownerDocument,r,i=0,u=UC(n,t.left,t.top);u&&({node:r,offset:i}=u);let s=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),a;if(!s||!e.dom.contains(s.nodeType!=1?s.parentNode:s)){let l=e.dom.getBoundingClientRect();if(!qc(t,l)||(s=N1(e.dom,t,l),!s))return null}if(tt)for(let l=s;r&&l;l=li(l))l.draggable&&(r=void 0);if(s=VC(s,t),r){if(Mt&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let c=r.childNodes[i],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&i++}let l;Uu&&i&&r.nodeType==1&&(l=r.childNodes[i-1]).nodeType==1&&l.contentEditable=="false"&&l.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=jC(e,r,i,t))}a==null&&(a=JC(e,s,t));let o=e.docView.nearestDesc(s,!0);return{pos:a,inside:o?o.posAtStart-o.border:-1}}function Mh(e){return e.top<e.bottom||e.left<e.right}function Pn(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(Mh(r))return r}return Array.prototype.find.call(n,Mh)||e.getBoundingClientRect()}const XC=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function D1(e,t,n){let{node:r,offset:i,atom:u}=e.docView.domFromPos(t,n<0?-1:1),s=Uu||Mt;if(r.nodeType==3)if(s&&(XC.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let o=Pn(gn(r,i,i),n);if(Mt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Pn(gn(r,i-1,i-1),-1);if(l.top==o.top){let c=Pn(gn(r,i,i+1),-1);if(c.top!=o.top)return _i(c,c.left<l.left)}}return o}else{let o=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==r.nodeValue.length?(o--,c=1):n<0?o--:l++,_i(Pn(gn(r,o,l),c),c<0)}if(!e.state.doc.resolve(t-(u||0)).parent.inlineContent){if(u==null&&i&&(n<0||i==Rt(r))){let o=r.childNodes[i-1];if(o.nodeType==1)return yo(o.getBoundingClientRect(),!1)}if(u==null&&i<Rt(r)){let o=r.childNodes[i];if(o.nodeType==1)return yo(o.getBoundingClientRect(),!0)}return yo(r.getBoundingClientRect(),n>=0)}if(u==null&&i&&(n<0||i==Rt(r))){let o=r.childNodes[i-1],l=o.nodeType==3?gn(o,Rt(o)-(s?0:1)):o.nodeType==1&&(o.nodeName!="BR"||!o.nextSibling)?o:null;if(l)return _i(Pn(l,1),!1)}if(u==null&&i<Rt(r)){let o=r.childNodes[i];for(;o.pmViewDesc&&o.pmViewDesc.ignoreForCoords;)o=o.nextSibling;let l=o?o.nodeType==3?gn(o,0,s?0:1):o.nodeType==1?o:null:null;if(l)return _i(Pn(l,-1),!0)}return _i(Pn(r.nodeType==3?gn(r):r,-n),n>=0)}function _i(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function yo(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function _1(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function $C(e,t,n){let r=t.selection,i=n=="up"?r.$from:r.$to;return _1(e,t,()=>{let{node:u}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(u,!0);if(!a)break;if(a.node.isBlock){u=a.contentDOM||a.dom;break}u=a.dom.parentNode}let s=D1(e,i.pos,1);for(let a=u.firstChild;a;a=a.nextSibling){let o;if(a.nodeType==1)o=a.getClientRects();else if(a.nodeType==3)o=gn(a,0,a.nodeValue.length).getClientRects();else continue;for(let l=0;l<o.length;l++){let c=o[l];if(c.bottom>c.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const ex=/[\u0590-\u08ac]/;function tx(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,u=!i,s=i==r.parent.content.size,a=e.domSelection();return a?!ex.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?u:s:_1(e,t,()=>{let{focusNode:o,focusOffset:l,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:m,focusOffset:A}=e.domSelectionRange(),E=m&&!p.contains(m.nodeType==1?m:m.parentNode)||o==m&&l==A;try{a.collapse(c,d),o&&(o!=c||l!=d)&&a.extend&&a.extend(o,l)}catch{}return f!=null&&(a.caretBidiLevel=f),E}):r.pos==r.start()||r.pos==r.end()}let Bh=null,Lh=null,vh=!1;function nx(e,t,n){return Bh==t&&Lh==n?vh:(Bh=t,Lh=n,vh=n=="up"||n=="down"?$C(e,t,n):tx(e,t,n))}const Bt=0,Ph=1,gr=2,nn=3;class Wu{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=Bt,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==t)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let u,s;if(t==this.contentDOM)u=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;u=t.previousSibling}for(;u&&!((s=u.pmViewDesc)&&s.parent==this);)u=u.previousSibling;return u?this.posBeforeChild(s)+s.size:this.posAtStart}else{let u,s;if(t==this.contentDOM)u=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;u=t.nextSibling}for(;u&&!((s=u.pmViewDesc)&&s.parent==this);)u=u.nextSibling;return u?this.posBeforeChild(s):this.posAtEnd}let i;if(t==this.dom&&this.contentDOM)i=n>Ve(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let u=t;;u=u.parentNode){if(u==this.dom){i=!1;break}if(u.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let u=t;;u=u.parentNode){if(u==this.dom){i=!0;break}if(u.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let u=this.getDesc(i),s;if(u&&(!n||u.node))if(r&&(s=u.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return u}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let u=this.getDesc(i);if(u)return u.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],u=r+i.size;if(r==t&&u!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(t<u)return i.descAt(t-r-i.border);r=u}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,i=0;for(let u=0;r<this.children.length;r++){let s=this.children[r],a=u+s.size;if(a>t||s instanceof R1){i=t-u;break}u=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let u;r&&!(u=this.children[r-1]).size&&u instanceof O1&&u.side>=0;r--);if(n<=0){let u,s=!0;for(;u=r?this.children[r-1]:null,!(!u||u.dom.parentNode==this.contentDOM);r--,s=!1);return u&&n&&s&&!u.border&&!u.domAtom?u.domFromPos(u.size,n):{node:this.contentDOM,offset:u?Ve(u.dom)+1:0}}else{let u,s=!0;for(;u=r<this.children.length?this.children[r]:null,!(!u||u.dom.parentNode==this.contentDOM);r++,s=!1);return u&&s&&!u.border&&!u.domAtom?u.domFromPos(0,n):{node:this.contentDOM,offset:u?Ve(u.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,u=-1;for(let s=r,a=0;;a++){let o=this.children[a],l=s+o.size;if(i==-1&&t<=l){let c=s+o.border;if(t>=c&&n<=l-o.border&&o.node&&o.contentDOM&&this.contentDOM.contains(o.contentDOM))return o.parseRange(t,n,c);t=s;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Ve(f.dom)+1;break}t-=f.size}i==-1&&(i=0)}if(i>-1&&(l>n||a==this.children.length-1)){n=l;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){u=Ve(d.dom);break}n+=d.size}u==-1&&(u=this.contentDOM.childNodes.length);break}s=l}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:u}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let u=Math.min(t,n),s=Math.max(t,n);for(let p=0,m=0;p<this.children.length;p++){let A=this.children[p],E=m+A.size;if(u>m&&s<E)return A.setSelection(t-m-A.border,n-m-A.border,r,i);m=E}let a=this.domFromPos(t,t?-1:1),o=n==t?a:this.domFromPos(n,n?-1:1),l=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((Mt||tt)&&t==n){let{node:p,offset:m}=a;if(p.nodeType==3){if(d=!!(m&&p.nodeValue[m-1]==`
41
- `),d&&m==p.nodeValue.length)for(let A=p,E;A;A=A.parentNode){if(E=A.nextSibling){E.nodeName=="BR"&&(a=o={node:E.parentNode,offset:Ve(E)+1});break}let g=A.pmViewDesc;if(g&&g.node&&g.node.isBlock)break}}else{let A=p.childNodes[m-1];d=A&&(A.nodeName=="BR"||A.contentEditable=="false")}}if(Mt&&c.focusNode&&c.focusNode!=o.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||d&&tt)&&Mr(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Mr(o.node,o.offset,c.focusNode,c.focusOffset))return;let f=!1;if((l.extend||t==n)&&!(d&&Mt)){l.collapse(a.node,a.offset);try{t!=n&&l.extend(o.node,o.offset),f=!0}catch{}}if(!f){if(t>n){let m=a;a=o,o=m}let p=document.createRange();p.setEnd(o.node,o.offset),p.setStart(a.node,a.offset),l.removeAllRanges(),l.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let u=this.children[i],s=r+u.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+u.border,o=s-u.border;if(t>=a&&n<=o){this.dirty=t==r||n==s?gr:Ph,t==a&&n==o&&(u.contentLost||u.dom.parentNode!=this.contentDOM)?u.dirty=nn:u.markDirty(t-a,n-a);return}else u.dirty=u.dom==u.contentDOM&&u.dom.parentNode==this.contentDOM&&!u.children.length?gr:nn}r=s}this.dirty=gr}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?gr:Ph;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class O1 extends Wu{constructor(t,n,r,i){let u,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!u)return i;if(u.parent)return u.parent.posBeforeChild(u)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,u=this}matchesWidget(t){return this.dirty==Bt&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class rx extends Wu{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Br extends Wu{constructor(t,n,r,i,u){super(t,[],r,i),this.mark=n,this.spec=u}static create(t,n,r,i){let u=i.nodeViews[n.type.name],s=u&&u(n,i,r);return(!s||!s.dom)&&(s=Ur.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Br(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&nn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=nn&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Bt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Bt}}slice(t,n,r){let i=Br.create(this.parent,this.mark,!0,r),u=this.children,s=this.size;n<s&&(u=ql(u,n,s,r)),t>0&&(u=ql(u,0,t,r));for(let a=0;a<u.length;a++)u[a].parent=i;return i.children=u,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Zn extends Wu{constructor(t,n,r,i,u,s,a,o,l){super(t,[],u,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,u,s){let a=u.nodeViews[n.type.name],o,l=a&&a(n,u,()=>{if(!o)return s;if(o.parent)return o.parent.posBeforeChild(o)},r,i),c=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Ur.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=L1(c,r,n),l?o=new ix(t,n,r,i,c,d||null,f,l,u,s+1):n.isText?new Ma(t,n,r,i,c,f,u):new Zn(t,n,r,i,c,d||null,f,u,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>H.empty)}return t}matchesNode(t,n,r){return this.dirty==Bt&&t.eq(this.node)&&Gs(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,u=t.composing?this.localCompositionInfo(t,n):null,s=u&&u.pos>-1?u:null,a=u&&u.pos<0,o=new sx(this,s&&s.node,t);lx(this.node,this.innerDeco,(l,c,d)=>{l.spec.marks?o.syncToMarks(l.spec.marks,r,t,c):l.type.side>=0&&!d&&o.syncToMarks(c==this.node.childCount?me.none:this.node.child(c).marks,r,t,c),o.placeWidget(l,t,i)},(l,c,d,f)=>{o.syncToMarks(l.marks,r,t,f);let p;o.findNodeMatch(l,c,d,f)||a&&t.state.selection.from>i&&t.state.selection.to<i+l.nodeSize&&(p=o.findIndexWithChild(u.node))>-1&&o.updateNodeAt(l,c,d,p,t)||o.updateNextNode(l,c,d,t,f,i)||o.addNode(l,c,d,t,i),i+=l.nodeSize}),o.syncToMarks([],r,t,0),this.node.isTextblock&&o.addTextblockHacks(),o.destroyRest(),(o.changed||this.dirty==gr)&&(s&&this.protectLocalComposition(t,s),M1(this.contentDOM,this.children,t),ci&&cx(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof ae)||r<n||i>n+this.node.content.size)return null;let u=t.input.compositionNode;if(!u||!this.dom.contains(u.parentNode))return null;if(this.node.inlineContent){let s=u.nodeValue,a=dx(this.node.content,s,r-n,i-n);return a<0?null:{node:u,pos:a,text:s}}else return{node:u,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let u=n;for(;u.parentNode!=this.contentDOM;u=u.parentNode){for(;u.previousSibling;)u.parentNode.removeChild(u.previousSibling);for(;u.nextSibling;)u.parentNode.removeChild(u.nextSibling);u.pmViewDesc&&(u.pmViewDesc=void 0)}let s=new rx(this,u,n,i);t.input.compositionNodes.push(s),this.children=ql(this.children,r,r+i.length,t,s)}update(t,n,r,i){return this.dirty==nn||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Bt}updateOuterDeco(t){if(Gs(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=B1(this.dom,this.nodeDOM,Gl(this.outerDeco,this.node,n),Gl(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Fh(e,t,n,r,i){L1(r,t,e);let u=new Zn(void 0,e,t,n,r,r,r,i,0);return u.contentDOM&&u.updateChildren(i,0),u}class Ma extends Zn{constructor(t,n,r,i,u,s,a){super(t,n,r,i,u,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return this.dirty==nn||this.dirty!=Bt&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Bt||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=Bt,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),u=document.createTextNode(i.text);return new Ma(this.parent,i,this.outerDeco,this.innerDeco,u,u,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=nn)}get domAtom(){return!1}isText(t){return this.node.text==t}}class R1 extends Wu{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Bt&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class ix extends Zn{constructor(t,n,r,i,u,s,a,o,l,c){super(t,n,r,i,u,s,a,l,c),this.spec=o}update(t,n,r,i){if(this.dirty==nn)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let u=this.spec.update(t,n,r);return u&&this.updateInner(t,n,r,i),u}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function M1(e,t,n){let r=e.firstChild,i=!1;for(let u=0;u<t.length;u++){let s=t[u],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=Hh(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof Br){let o=r?r.previousSibling:e.lastChild;M1(s.contentDOM,s.children,n),r=o?o.nextSibling:e.firstChild}}for(;r;)r=Hh(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const Zi=function(e){e&&(this.nodeName=e)};Zi.prototype=Object.create(null);const br=[new Zi];function Gl(e,t,n){if(e.length==0)return br;let r=n?br[0]:new Zi,i=[r];for(let u=0;u<e.length;u++){let s=e[u].type.attrs;if(s){s.nodeName&&i.push(r=new Zi(s.nodeName));for(let a in s){let o=s[a];o!=null&&(n&&i.length==1&&i.push(r=new Zi(t.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+o:a=="style"?r.style=(r.style?r.style+";":"")+o:a!="nodeName"&&(r[a]=o))}}}return i}function B1(e,t,n,r){if(n==br&&r==br)return t;let i=t;for(let u=0;u<r.length;u++){let s=r[u],a=n[u];if(u){let o;a&&a.nodeName==s.nodeName&&i!=e&&(o=i.parentNode)&&o.nodeName.toLowerCase()==s.nodeName||(o=document.createElement(s.nodeName),o.pmIsDeco=!0,o.appendChild(i),a=br[0]),i=o}ux(i,a||br[0],s)}return i}function ux(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let u=0;u<r.length;u++)i.indexOf(r[u])==-1&&e.classList.remove(r[u]);for(let u=0;u<i.length;u++)r.indexOf(i[u])==-1&&e.classList.add(i[u]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(t.style);)e.style.removeProperty(i[1])}n.style&&(e.style.cssText+=n.style)}}function L1(e,t,n){return B1(e,e,br,Gl(t,n,e.nodeType!=1))}function Gs(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Hh(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class sx{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=ax(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r,i){let u=0,s=this.stack.length>>1,a=Math.min(s,t.length);for(;u<a&&(u==s-1?this.top:this.stack[u+1<<1]).matchesMark(t[u])&&t[u].type.spec.spanning!==!1;)u++;for(;u<s;)this.destroyRest(),this.top.dirty=Bt,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let o=-1,l=this.top.children.length;i<this.preMatch.index&&(l=Math.min(this.index+3,l));for(let c=this.index;c<l;c++){let d=this.top.children[c];if(d.matchesMark(t[s])&&!this.isLocked(d.dom)){o=c;break}}if(o>-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let c=Br.create(this.top,t[s],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,r,i){let u=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))u=this.top.children.indexOf(s,this.index);else for(let a=this.index,o=Math.min(this.top.children.length,a+5);a<o;a++){let l=this.top.children[a];if(l.matchesNode(t,n,r)&&!this.preMatch.matched.has(l)){u=a;break}}return u<0?!1:(this.destroyBetween(this.index,u),this.index++,!0)}updateNodeAt(t,n,r,i,u){let s=this.top.children[i];return s.dirty==nn&&s.dom==s.contentDOM&&(s.dirty=gr),s.update(t,n,r,u)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=n}}updateNextNode(t,n,r,i,u,s){for(let a=this.index;a<this.top.children.length;a++){let o=this.top.children[a];if(o instanceof Zn){let l=this.preMatch.matched.get(o);if(l!=null&&l!=u)return!1;let c=o.dom,d,f=this.isLocked(c)&&!(t.isText&&o.node&&o.node.isText&&o.nodeDOM.nodeValue==t.text&&o.dirty!=nn&&Gs(n,o.outerDeco));if(!f&&o.update(t,n,r,i))return this.destroyBetween(this.index,a),o.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(o,t,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=gr,d.updateChildren(i,s+1),d.dirty=Bt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,u,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!Gs(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=Zn.create(this.top,n,r,i,u,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let o of a.children)o.parent=a}return t.destroy(),a}addNode(t,n,r,i,u){let s=Zn.create(this.top,t,n,r,i,u);s.contentDOM&&s.updateChildren(i,u+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(t)&&(t==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let u=new O1(this.top,t,n,r);this.top.children.splice(this.index++,0,u),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Br;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof Ma)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((tt||Je)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new R1(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function ax(e,t){let n=t,r=n.children.length,i=e.childCount,u=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let l=n.children[r-1];if(l instanceof Br)n=l,r=l.children.length;else{a=l,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let o=a.node;if(o){if(o!=e.child(i-1))break;--i,u.set(a,i),s.push(a)}}return{index:i,matched:u,matches:s.reverse()}}function ox(e,t){return e.type.side-t.type.side}function lx(e,t,n,r){let i=t.locals(e),u=0;if(i.length==0){for(let l=0;l<e.childCount;l++){let c=e.child(l);r(c,i,t.forChild(u,c),l),u+=c.nodeSize}return}let s=0,a=[],o=null;for(let l=0;;){let c,d;for(;s<i.length&&i[s].to==u;){let E=i[s++];E.widget&&(c?(d||(d=[c])).push(E):c=E)}if(c)if(d){d.sort(ox);for(let E=0;E<d.length;E++)n(d[E],l,!!o)}else n(c,l,!!o);let f,p;if(o)p=-1,f=o,o=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let E=0;E<a.length;E++)a[E].to<=u&&a.splice(E--,1);for(;s<i.length&&i[s].from<=u&&i[s].to>u;)a.push(i[s++]);let m=u+f.nodeSize;if(f.isText){let E=m;s<i.length&&i[s].from<E&&(E=i[s].from);for(let g=0;g<a.length;g++)a[g].to<E&&(E=a[g].to);E<m&&(o=f.cut(E-u),f=f.cut(0,E-u),m=E,p=-1)}else for(;s<i.length&&i[s].to<m;)s++;let A=f.isInline&&!f.isLeaf?a.filter(E=>!E.inline):a.slice();r(f,A,t.forChild(u,f),p),u=m}}function cx(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function dx(e,t,n,r){for(let i=0,u=0;i<e.childCount&&u<=r;){let s=e.child(i++),a=u;if(u+=s.nodeSize,!s.isText)continue;let o=s.text;for(;i<e.childCount;){let l=e.child(i++);if(u+=l.nodeSize,!l.isText)break;o+=l.text}if(u>=n){if(u>=r&&o.slice(r-t.length-a,r-a)==t)return r-t.length;let l=a<r?o.lastIndexOf(t,r-a-1):-1;if(l>=0&&l+t.length+a>=n)return a+l;if(n==r&&o.length>=r+t.length-a&&o.slice(r-a,r-a+t.length)==t)return r}}return-1}function ql(e,t,n,r,i){let u=[];for(let s=0,a=0;s<e.length;s++){let o=e[s],l=a,c=a+=o.size;l>=n||c<=t?u.push(o):(l<t&&u.push(o.slice(0,t-l,r)),i&&(u.push(i),i=void 0),c>n&&u.push(o.slice(n-l,o.size,r)))}return u}function Vc(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),u=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),o,l;if(Ra(n)){for(o=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&re.isSelectable(d)&&i.parent&&!(d.isInline&&FC(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;l=new re(s==f?a:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);d=Math.min(d,e.docView.posFromDOM(m.startContainer,m.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[o,s]=f==e.state.selection.anchor?[f,d]:[d,f],a=r.resolve(s)}else o=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(o<0)return null}let c=r.resolve(o);if(!l){let d=t=="pointer"||e.state.selection.head<a.pos&&!u?1:-1;l=Jc(e,c,a,d)}return l}function v1(e){return e.editable?e.hasFocus():F1(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function wn(e,t=!1){let n=e.state.selection;if(P1(e,n),!!v1(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Je){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Mr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)hx(e);else{let{anchor:r,head:i}=n,u,s;Uh&&!(n instanceof ae)&&(n.$from.parent.inlineContent||(u=Wh(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Wh(e,n.to))),e.docView.setSelection(r,i,e,t),Uh&&(u&&Kh(u),s&&Kh(s)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&fx(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Uh=tt||Je&&x1<63;function Wh(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,u=r?n.childNodes[r-1]:null;if(tt&&i&&i.contentEditable=="false")return To(i);if((!i||i.contentEditable=="false")&&(!u||u.contentEditable=="false")){if(i)return To(i);if(u)return To(u)}}function To(e){return e.contentEditable="true",tt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Kh(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function fx(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!v1(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function hx(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,Ve(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&mt&&jn<=11&&(n.disabled=!0,n.disabled=!1)}function P1(e,t){if(t instanceof re){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Qh(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Qh(e)}function Qh(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Jc(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||ae.between(t,n,r)}function zh(e){return e.editable&&!e.hasFocus()?!1:F1(e)}function F1(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function px(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Mr(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Vl(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),u=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return u&&ue.findFrom(u,t)}function Hn(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Yh(e,t,n){let r=e.state.selection;if(r instanceof ae)if(n.indexOf("s")>-1){let{$head:i}=r,u=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!u||u.isText||!u.isLeaf)return!1;let s=e.state.doc.resolve(i.pos+u.nodeSize*(t<0?-1:1));return Hn(e,new ae(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=Vl(e.state,t);return i&&i instanceof re?Hn(e,i):!1}else if(!(Dt&&n.indexOf("m")>-1)){let i=r.$head,u=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,s;if(!u||u.isText)return!1;let a=t<0?i.pos-u.nodeSize:i.pos;return u.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?re.isSelectable(u)?Hn(e,new re(t<0?e.state.doc.resolve(i.pos-u.nodeSize):i)):Uu?Hn(e,new ae(e.state.doc.resolve(t<0?a:a+u.nodeSize))):!1:!1}}else return!1;else{if(r instanceof re&&r.node.isInline)return Hn(e,new ae(t>0?r.$to:r.$from));{let i=Vl(e.state,t);return i?Hn(e,i):!1}}}function qs(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Xi(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function qr(e,t){return t<0?mx(e):Ax(e)}function mx(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,u,s=!1;for(Mt&&n.nodeType==1&&r<qs(n)&&Xi(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Xi(a,-1))i=n,u=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(H1(n))break;{let a=n.previousSibling;for(;a&&Xi(a,-1);)i=n.parentNode,u=Ve(a),a=a.previousSibling;if(a)n=a,r=qs(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Jl(e,n,r):i&&Jl(e,i,u)}function Ax(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=qs(n),u,s;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Xi(a,1))u=n,s=++r;else break}else{if(H1(n))break;{let a=n.nextSibling;for(;a&&Xi(a,1);)u=a.parentNode,s=Ve(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=qs(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}u&&Jl(e,u,s)}function H1(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function gx(e,t){for(;e&&t==e.childNodes.length&&!Hu(e);)t=Ve(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function bx(e,t){for(;e&&!t&&!Hu(e);)t=Ve(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function Jl(e,t,n){if(t.nodeType!=3){let u,s;(s=gx(t,n))?(t=s,n=0):(u=bx(t,n))&&(t=u,n=u.nodeValue.length)}let r=e.domSelection();if(!r)return;if(Ra(r)){let u=document.createRange();u.setEnd(t,n),u.setStart(t,n),r.removeAllRanges(),r.addRange(u)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&wn(e)},50)}function Gh(e,t){let n=e.state.doc.resolve(t);if(!(Je||k1)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let u=e.coordsAtPos(t-1),s=(u.top+u.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(u.left-i.left)>1)return u.left<i.left?"ltr":"rtl"}if(t<n.end()){let u=e.coordsAtPos(t+1),s=(u.top+u.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(u.left-i.left)>1)return u.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function qh(e,t,n){let r=e.state.selection;if(r instanceof ae&&!r.empty||n.indexOf("s")>-1||Dt&&n.indexOf("m")>-1)return!1;let{$from:i,$to:u}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Vl(e.state,t);if(s&&s instanceof re)return Hn(e,s)}if(!i.parent.inlineContent){let s=t<0?i:u,a=r instanceof xt?ue.near(s,t):ue.findFrom(s,t);return a?Hn(e,a):!1}return!1}function Vh(e,t){if(!(e.state.selection instanceof ae))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let u=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(u&&!u.isText){let s=e.state.tr;return t<0?s.delete(n.pos-u.nodeSize,n.pos):s.delete(n.pos,n.pos+u.nodeSize),e.dispatch(s),!0}return!1}function Jh(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Ex(e){if(!tt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;Jh(e,r,"true"),setTimeout(()=>Jh(e,r,"false"),20)}return!1}function yx(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function Tx(e,t){let n=t.keyCode,r=yx(t);if(n==8||Dt&&n==72&&r=="c")return Vh(e,-1)||qr(e,-1);if(n==46&&!t.shiftKey||Dt&&n==68&&r=="c")return Vh(e,1)||qr(e,1);if(n==13||n==27)return!0;if(n==37||Dt&&n==66&&r=="c"){let i=n==37?Gh(e,e.state.selection.from)=="ltr"?-1:1:-1;return Yh(e,i,r)||qr(e,i)}else if(n==39||Dt&&n==70&&r=="c"){let i=n==39?Gh(e,e.state.selection.from)=="ltr"?1:-1:1;return Yh(e,i,r)||qr(e,i)}else{if(n==38||Dt&&n==80&&r=="c")return qh(e,-1,r)||qr(e,-1);if(n==40||Dt&&n==78&&r=="c")return Ex(e)||qh(e,1,r)||qr(e,1);if(r==(Dt?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function jc(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:i,openEnd:u}=t;for(;i>1&&u>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,u--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||Ur.fromSchema(e.state.schema),a=Y1(),o=a.createElement("div");o.appendChild(s.serializeFragment(r,{document:a}));let l=o.firstChild,c,d=0;for(;l&&l.nodeType==1&&(c=z1[l.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let m=a.createElement(c[p]);for(;o.firstChild;)m.appendChild(o.firstChild);o.appendChild(m),d++}l=o.firstChild}l&&l.nodeType==1&&l.setAttribute("data-pm-slice",`${i} ${u}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
42
-
43
- `);return{dom:o,text:f,slice:t}}function U1(e,t,n,r,i){let u=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let o=!!t&&(r||u||!n);if(o){if(e.someProp("transformPastedText",f=>{t=f(t,u||r,e)}),u)return a=new Y(H.from(e.state.schema.text(t.replace(/\r\n?/g,`
44
- `))),0,0),e.someProp("transformPasted",f=>{a=f(a,e,!0)}),a;let d=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(d)a=d;else{let f=i.marks(),{schema:p}=e.state,m=Ur.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(A=>{let E=s.appendChild(document.createElement("p"));A&&E.appendChild(m.serializeNode(p.text(A,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=wx(n),Uu&&Ix(s);let l=s&&s.querySelector("[data-pm-slice]"),c=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||vc.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(o||c),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!Cx.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=Sx(jh(a,+c[1],+c[2]),c[4]);else if(a=Y.maxOpen(xx(a.content,i),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d<a.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=a.content.lastChild;f<a.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);a=jh(a,d,f)}return e.someProp("transformPasted",d=>{a=d(a,e,o)}),a}const Cx=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function xx(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),u,s=[];if(e.forEach(a=>{if(!s)return;let o=i.findWrapping(a.type),l;if(!o)return s=null;if(l=s.length&&u.length&&K1(o,u,a,s[s.length-1],0))s[s.length-1]=l;else{s.length&&(s[s.length-1]=Q1(s[s.length-1],u.length));let c=W1(a,o);s.push(c),i=i.matchType(c.type),u=o}}),s)return H.from(s)}return e}function W1(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,H.from(e));return e}function K1(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let u=K1(e,t,n,r.lastChild,i+1);if(u)return r.copy(r.content.replaceChild(r.childCount-1,u));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(H.from(W1(n,e,i+1))))}}function Q1(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,Q1(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(H.empty,!0);return e.copy(n.append(r))}function jl(e,t,n,r,i,u){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(u=0),i<r-1&&(a=jl(a,t,n,r,i+1,u)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,u<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(H.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function jh(e,t,n){return t<e.openStart&&(e=new Y(jl(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Y(jl(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const z1={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Zh=null;function Y1(){return Zh||(Zh=document.implementation.createHTMLDocument("title"))}let Co=null;function kx(e){let t=window.trustedTypes;return t?(Co||(Co=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Co.createHTML(e)):e}function wx(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=Y1().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&z1[r[1].toLowerCase()])&&(e=i.map(u=>"<"+u+">").join("")+e+i.map(u=>"</"+u+">").reverse().join("")),n.innerHTML=kx(e),i)for(let u=0;u<i.length;u++)n=n.querySelector(i[u])||n;return n}function Ix(e){let t=e.querySelectorAll(Je?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function Sx(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:u,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let o=n.nodes[r[a]];if(!o||o.hasRequiredAttrs())break;i=H.from(o.create(r[a+1],i)),u++,s++}return new Y(i,u,s)}const at={},ot={},Nx={touchstart:!0,touchmove:!0};class Dx{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function _x(e){for(let t in at){let n=at[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{Rx(e,r)&&!Zc(e,r)&&(e.editable||!(r.type in ot))&&n(e,r)},Nx[t]?{passive:!0}:void 0)}tt&&e.dom.addEventListener("input",()=>null),Zl(e)}function Yn(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Ox(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Zl(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Zc(e,r))})}function Zc(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function Rx(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Mx(e,t){!Zc(e,t)&&at[t.type]&&(e.editable||!(t.type in ot))&&at[t.type](e,t)}ot.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!q1(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(xn&&Je&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),ci&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,mr(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||Tx(e,n)?n.preventDefault():Yn(e,"key")};ot.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};ot.keypress=(e,t)=>{let n=t;if(q1(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Dt&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof ae)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),u=()=>e.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,i,u))&&e.dispatch(u()),n.preventDefault()}};function Ba(e){return{left:e.clientX,top:e.clientY}}function Bx(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Xc(e,t,n,r,i){if(r==-1)return!1;let u=e.state.doc.resolve(r);for(let s=u.depth+1;s>0;s--)if(e.someProp(t,a=>s>u.depth?a(e,n,u.nodeAfter,u.before(s),i,!0):a(e,n,u.node(s),u.before(s),i,!1)))return!0;return!1}function ni(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function Lx(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&re.isSelectable(r)?(ni(e,new re(n)),!0):!1}function vx(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof re&&(r=n.node);let u=e.state.doc.resolve(t);for(let s=u.depth+1;s>0;s--){let a=s>u.depth?u.nodeAfter:u.node(s);if(re.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&u.before(n.$from.depth+1)==n.$from.pos?i=u.before(n.$from.depth):i=u.before(s);break}}return i!=null?(ni(e,re.create(e.state.doc,i)),!0):!1}function Px(e,t,n,r,i){return Xc(e,"handleClickOn",t,n,r)||e.someProp("handleClick",u=>u(e,t,r))||(i?vx(e,n):Lx(e,n))}function Fx(e,t,n,r){return Xc(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function Hx(e,t,n,r){return Xc(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||Ux(e,n,r)}function Ux(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(ni(e,ae.create(r,0,r.content.size)),!0):!1;let i=r.resolve(t);for(let u=i.depth+1;u>0;u--){let s=u>i.depth?i.nodeAfter:i.node(u),a=i.before(u);if(s.inlineContent)ni(e,ae.create(r,a+1,a+1+s.content.size));else if(re.isSelectable(s))ni(e,re.create(r,a));else continue;return!0}}function $c(e){return Vs(e)}const G1=Dt?"metaKey":"ctrlKey";at.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=$c(e),i=Date.now(),u="singleClick";i-e.input.lastClick.time<500&&Bx(n,e.input.lastClick)&&!n[G1]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?u="doubleClick":e.input.lastClick.type=="doubleClick"&&(u="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:u,button:n.button};let s=e.posAtCoords(Ba(n));s&&(u=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Wx(e,s,n,!!r)):(u=="doubleClick"?Fx:Hx)(e,s.pos,s.inside,n)?n.preventDefault():Yn(e,"pointer"))};class Wx{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[G1],this.allowDefault=r.shiftKey;let u,s;if(n.inside>-1)u=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);u=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,o=a?t.docView.nearestDesc(a,!0):null;this.target=o&&o.nodeDOM.nodeType==1?o.nodeDOM:null;let{selection:l}=t.state;r.button==0&&(u.type.spec.draggable&&u.type.spec.selectable!==!1||l instanceof re&&l.from<=s&&l.to>s)&&(this.mightDrag={node:u,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Mt&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Yn(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>wn(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Ba(t))),this.updateAllowDefault(t),this.allowDefault||!n?Yn(this.view,"pointer"):Px(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||tt&&this.mightDrag&&!this.mightDrag.node.isAtom||Je&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ni(this.view,ue.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Yn(this.view,"pointer")}move(t){this.updateAllowDefault(t),Yn(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}at.touchstart=e=>{e.input.lastTouch=Date.now(),$c(e),Yn(e,"pointer")};at.touchmove=e=>{e.input.lastTouch=Date.now(),Yn(e,"pointer")};at.contextmenu=e=>$c(e);function q1(e,t){return e.composing?!0:tt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const Kx=xn?5e3:-1;ot.compositionstart=ot.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof ae&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Je&&k1&&Qx(e)))e.markCursor=e.state.storedMarks||n.marks(),Vs(e,!0),e.markCursor=null;else if(Vs(e,!t.selection.empty),Mt&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,u=r.focusOffset;i&&i.nodeType==1&&u!=0;){let s=u<0?i.lastChild:i.childNodes[u-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,u=-1}}e.input.composing=!0}V1(e,Kx)};function Qx(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}ot.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,V1(e,20))};function V1(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Vs(e),t))}function J1(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Yx());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function zx(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=vC(t.focusNode,t.focusOffset),r=PC(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,u=e.domObserver.lastChangedTextNode;if(n==u||r==u)return u;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function Yx(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Vs(e,t=!1){if(!(xn&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),J1(e),t||e.docView&&e.docView.dirty){let n=Vc(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function Gx(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const mu=mt&&jn<15||ci&&WC<604;at.copy=ot.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let u=mu?null:n.clipboardData,s=r.content(),{dom:a,text:o}=jc(e,s);u?(n.preventDefault(),u.clearData(),u.setData("text/html",a.innerHTML),u.setData("text/plain",o)):Gx(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function qx(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Vx(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Au(e,r.value,null,i,t):Au(e,r.textContent,r.innerHTML,i,t)},50)}function Au(e,t,n,r,i){let u=U1(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",o=>o(e,i,u||Y.empty)))return!0;if(!u)return!1;let s=qx(u),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(u);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function j1(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}ot.paste=(e,t)=>{let n=t;if(e.composing&&!xn)return;let r=mu?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Au(e,j1(r),r.getData("text/html"),i,n)?n.preventDefault():Vx(e,n)};class Z1{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const Jx=Dt?"altKey":"ctrlKey";function X1(e,t){let n;return e.someProp("dragCopies",r=>{n=n||r(t)}),n!=null?!n:!t[Jx]}at.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,u=i.empty?null:e.posAtCoords(Ba(n)),s;if(!(u&&u.pos>=i.from&&u.pos<=(i instanceof re?i.to-1:i.to))){if(r&&r.mightDrag)s=re.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=re.create(e.state.doc,d.posBefore))}}let a=(s||e.state.selection).content(),{dom:o,text:l,slice:c}=jc(e,a);(!n.dataTransfer.files.length||!Je||x1>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(mu?"Text":"text/html",o.innerHTML),n.dataTransfer.effectAllowed="copyMove",mu||n.dataTransfer.setData("text/plain",l),e.dragging=new Z1(c,X1(e,n),s)};at.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};ot.dragover=ot.dragenter=(e,t)=>t.preventDefault();ot.drop=(e,t)=>{try{jx(e,t,e.dragging)}finally{e.dragging=null}};function jx(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Ba(t));if(!r)return;let i=e.state.doc.resolve(r.pos),u=n&&n.slice;u?e.someProp("transformPasted",p=>{u=p(u,e,!1)}):u=U1(e,j1(t.dataTransfer),mu?null:t.dataTransfer.getData("text/html"),!1,i);let s=!!(n&&X1(e,t));if(e.someProp("handleDrop",p=>p(e,t,u||Y.empty,s))){t.preventDefault();return}if(!u)return;t.preventDefault();let a=u?RT(e.state.doc,i.pos,u):i.pos;a==null&&(a=i.pos);let o=e.state.tr;if(s){let{node:p}=n;p?p.replace(o):o.deleteSelection()}let l=o.mapping.map(a),c=u.openStart==0&&u.openEnd==0&&u.content.childCount==1,d=o.doc;if(c?o.replaceRangeWith(l,l,u.content.firstChild):o.replaceRange(l,l,u),o.doc.eq(d))return;let f=o.doc.resolve(l);if(c&&re.isSelectable(u.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(u.content.firstChild))o.setSelection(new re(f));else{let p=o.mapping.map(a);o.mapping.maps[o.mapping.maps.length-1].forEach((m,A,E,g)=>p=g),o.setSelection(Jc(e,f,o.doc.resolve(p)))}e.focus(),e.dispatch(o.setMeta("uiEvent","drop"))}at.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&wn(e)},20))};at.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};at.beforeinput=(e,t)=>{if(Je&&xn&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",u=>u(e,mr(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in ot)at[e]=ot[e];function gu(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Js{constructor(t,n){this.toDOM=t,this.spec=n||Cr,this.side=this.spec.side||0}map(t,n,r,i){let{pos:u,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new je(u-r,u-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Js&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&gu(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Xn{constructor(t,n){this.attrs=t,this.spec=n||Cr}map(t,n,r,i){let u=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return u>=s?null:new je(u,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Xn&&gu(this.attrs,t.attrs)&&gu(this.spec,t.spec)}static is(t){return t.type instanceof Xn}destroy(){}}class ed{constructor(t,n){this.attrs=t,this.spec=n||Cr}map(t,n,r,i){let u=t.mapResult(n.from+i,1);if(u.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=u.pos?null:new je(u.pos-r,s.pos-r,this)}valid(t,n){let{index:r,offset:i}=t.content.findIndex(n.from),u;return i==n.from&&!(u=t.child(r)).isText&&i+u.nodeSize==n.to}eq(t){return this==t||t instanceof ed&&gu(this.attrs,t.attrs)&&gu(this.spec,t.spec)}destroy(){}}class je{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new je(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new je(t,t,new Js(n,r))}static inline(t,n,r,i){return new je(t,n,new Xn(r,i))}static node(t,n,r,i){return new je(t,n,new ed(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Xn}get widget(){return this.type instanceof Js}}const jr=[],Cr={};class De{constructor(t,n){this.local=t.length?t:jr,this.children=n.length?n:jr}static create(t,n){return n.length?js(n,t,0,Cr):Xe}find(t,n,r){let i=[];return this.findInner(t??0,n??1e9,i,0,r),i}findInner(t,n,r,i,u){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!u||u(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,i+a,u)}}map(t,n,r){return this==Xe||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Cr)}mapInner(t,n,r,i,u){let s;for(let a=0;a<this.local.length;a++){let o=this.local[a].map(t,r,i);o&&o.type.valid(n,o)?(s||(s=[])).push(o):u.onRemove&&u.onRemove(this.local[a].spec)}return this.children.length?Zx(this.children,s||[],t,n,r,i,u):s?new De(s.sort(xr),jr):Xe}add(t,n){return n.length?this==Xe?De.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,u=0;t.forEach((a,o)=>{let l=o+r,c;if(c=eA(n,a,l)){for(i||(i=this.children.slice());u<i.length&&i[u]<o;)u+=3;i[u]==o?i[u+2]=i[u+2].addInner(a,c,l+1):i.splice(u,0,o,o+a.nodeSize,js(c,a,l+1,Cr)),u+=3}});let s=$1(u?tA(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new De(s.length?this.local.concat(s).sort(xr):this.local,i||this.children)}remove(t){return t.length==0||this==Xe?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let u=0;u<r.length;u+=3){let s,a=r[u]+n,o=r[u+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>a&&d.to<o&&(t[c]=null,(s||(s=[])).push(d));if(!s)continue;r==this.children&&(r=this.children.slice());let l=r[u+2].removeInner(s,a+1);l!=Xe?r[u+2]=l:(r.splice(u,3),u-=3)}if(i.length){for(let u=0,s;u<t.length;u++)if(s=t[u])for(let a=0;a<i.length;a++)i[a].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new De(i,r):Xe}forChild(t,n){if(this==Xe)return this;if(n.isLeaf)return De.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let u=t+1,s=u+n.content.size;for(let a=0;a<this.local.length;a++){let o=this.local[a];if(o.from<s&&o.to>u&&o.type instanceof Xn){let l=Math.max(u,o.from)-u,c=Math.min(s,o.to)-u;l<c&&(i||(i=[])).push(o.copy(l,c))}}if(i){let a=new De(i.sort(xr),jr);return r?new Kn([a,r]):a}return r||Xe}eq(t){if(this==t)return!0;if(!(t instanceof De)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return td(this.localsInner(t))}localsInner(t){if(this==Xe)return jr;if(t.inlineContent||!this.local.some(Xn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Xn||n.push(this.local[r]);return n}forEachSet(t){t(this)}}De.empty=new De([],[]);De.removeOverlap=td;const Xe=De.empty;class Kn{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,Cr));return Kn.from(r)}forChild(t,n){if(n.isLeaf)return De.empty;let r=[];for(let i=0;i<this.members.length;i++){let u=this.members[i].forChild(t,n);u!=Xe&&(u instanceof Kn?r=r.concat(u.members):r.push(u))}return Kn.from(r)}eq(t){if(!(t instanceof Kn)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let u=this.members[i].localsInner(t);if(u.length)if(!n)n=u;else{r&&(n=n.slice(),r=!1);for(let s=0;s<u.length;s++)n.push(u[s])}}return n?td(r?n:n.sort(xr)):jr}static from(t){switch(t.length){case 0:return Xe;case 1:return t[0];default:return new Kn(t.every(n=>n instanceof De)?t:t.reduce((n,r)=>n.concat(r instanceof De?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function Zx(e,t,n,r,i,u,s){let a=e.slice();for(let l=0,c=u;l<n.maps.length;l++){let d=0;n.maps[l].forEach((f,p,m,A)=>{let E=A-m-(p-f);for(let g=0;g<a.length;g+=3){let N=a[g+1];if(N<0||f>N+c-d)continue;let w=a[g]+c-d;p>=w?a[g+1]=f<=w?-2:-1:f>=c&&E&&(a[g]+=E,a[g+1]+=E)}d+=E}),c=n.maps[l].map(c,-1)}let o=!1;for(let l=0;l<a.length;l+=3)if(a[l+1]<0){if(a[l+1]==-2){o=!0,a[l+1]=-1;continue}let c=n.map(e[l]+u),d=c-i;if(d<0||d>=r.content.size){o=!0;continue}let f=n.map(e[l+1]+u,-1),p=f-i,{index:m,offset:A}=r.content.findIndex(d),E=r.maybeChild(m);if(E&&A==d&&A+E.nodeSize==p){let g=a[l+2].mapInner(n,E,c+1,e[l]+u+1,s);g!=Xe?(a[l]=d,a[l+1]=p,a[l+2]=g):(a[l+1]=-2,o=!0)}else o=!0}if(o){let l=Xx(a,e,t,n,i,u,s),c=js(l,r,0,s);t=c.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let p=c.children[d];for(;f<a.length&&a[f]<p;)f+=3;a.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new De(t.sort(xr),a)}function $1(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new je(i.from+t,i.to+t,i.type))}return n}function Xx(e,t,n,r,i,u,s){function a(o,l){for(let c=0;c<o.local.length;c++){let d=o.local[c].map(r,i,l);d?n.push(d):s.onRemove&&s.onRemove(o.local[c].spec)}for(let c=0;c<o.children.length;c+=3)a(o.children[c+2],o.children[c]+l+1)}for(let o=0;o<e.length;o+=3)e[o+1]==-1&&a(e[o+2],t[o]+u+1);return n}function eA(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let u=0,s;u<e.length;u++)(s=e[u])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),e[u]=null);return i}function tA(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function js(e,t,n,r){let i=[],u=!1;t.forEach((a,o)=>{let l=eA(e,a,o+n);if(l){u=!0;let c=js(l,a,n+o+1,r);c!=Xe&&i.push(o,o+a.nodeSize,c)}});let s=$1(u?tA(e):e,-n).sort(xr);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new De(s,i):Xe}function xr(e,t){return e.from-t.from||e.to-t.to}function td(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let u=t[i];if(u.from==r.from){u.to!=r.to&&(t==e&&(t=e.slice()),t[i]=u.copy(u.from,r.to),Xh(t,i+1,u.copy(r.to,u.to)));continue}else{u.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,u.from),Xh(t,i,r.copy(u.from,r.to)));break}}}return t}function Xh(e,t,n){for(;t<e.length&&xr(n,e[t])>0;)t++;e.splice(t,0,n)}function xo(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Xe&&t.push(r)}),e.cursorWrapper&&t.push(De.create(e.state.doc,[e.cursorWrapper.deco])),Kn.from(t)}const $x={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ek=mt&&jn<=11;class tk{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class nk{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new tk,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);mt&&jn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():tt&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),ek&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,$x)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(zh(this.view)){if(this.suppressingSelectionUpdates)return wn(this.view);if(mt&&jn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Mr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let u=t.focusNode;u;u=li(u))n.add(u);for(let u=t.anchorNode;u;u=li(u))if(n.has(u)){r=u;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&zh(t)&&!this.ignoreSelectionChange(r),u=-1,s=-1,a=!1,o=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],o);d&&(u=u<0?d.from:Math.min(d.from,u),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(o.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of o)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){c.parentNode.removeChild(c);break}d=d.firstChild}}}else if(Mt&&o.length){let c=o.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||uk(t,d)!=p)&&f.remove()}}}let l=null;u<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&Ra(r)&&(l=Vc(t))&&l.eq(ue.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,wn(t),this.currentSelection.set(r),t.scrollToSelection()):(u>-1||i)&&(u>-1&&(t.docView.markDirty(u,s),rk(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,sk(t,o)),this.handleDOMChange(u,s,a,o),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||wn(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,u=t.nextSibling;if(mt&&jn<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=t.addedNodes[c];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(i=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(u=f)}let s=i&&i.parentNode==t.target?Ve(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),o=u&&u.parentNode==t.target?Ve(u):t.target.childNodes.length,l=r.localPosFromDOM(t.target,o,1);return{from:a,to:l}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let $h=new WeakMap,e0=!1;function rk(e){if(!$h.has(e)&&($h.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Mt,e0)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),e0=!0}}function t0(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,u=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Mr(s.node,s.offset,i,u)&&([n,r,i,u]=[i,u,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:u}}function ik(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return t0(e,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?t0(e,n):null}function uk(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function sk(e,t){var n;let{focusNode:r,focusOffset:i}=e.domSelectionRange();for(let u of t)if(((n=u.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=u.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let a=s;for(;;){let o=a.firstChild;if(!o||o.nodeType!=1||o.contentEditable=="false"||/^(BR|IMG)$/.test(o.nodeName))break;a=o}a.insertBefore(u,a.firstChild),r==u&&e.domSelection().collapse(u,i)}else u.parentNode.removeChild(u)}}function ak(e,t,n){let{node:r,fromOffset:i,toOffset:u,from:s,to:a}=e.docView.parseRange(t,n),o=e.domSelectionRange(),l,c=o.anchorNode;if(c&&e.dom.contains(c.nodeType==1?c:c.parentNode)&&(l=[{node:c,offset:o.anchorOffset}],Ra(o)||l.push({node:o.focusNode,offset:o.focusOffset})),Je&&e.input.lastKeyCode===8)for(let E=u;E>i;E--){let g=r.childNodes[E-1],N=g.pmViewDesc;if(g.nodeName=="BR"&&!N){u=E;break}if(!N||N.size)break}let d=e.state.doc,f=e.someProp("domParser")||vc.fromSchema(e.state.schema),p=d.resolve(s),m=null,A=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:u,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:l,ruleFromNode:ok,context:p});if(l&&l[0].pos!=null){let E=l[0].pos,g=l[1]&&l[1].pos;g==null&&(g=E),m={anchor:E+s,head:g+s}}return{doc:A,sel:m,from:s,to:a}}function ok(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(tt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||tt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const lk=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function ck(e,t,n,r,i){let u=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let R=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,Q=Vc(e,R);if(Q&&!e.state.selection.eq(Q)){if(Je&&xn&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",x=>x(e,mr(13,"Enter"))))return;let O=e.state.tr.setSelection(Q);R=="pointer"?O.setMeta("pointer",!0):R=="key"&&O.scrollIntoView(),u&&O.setMeta("composition",u),e.dispatch(O)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let o=e.state.selection,l=ak(e,t,n),c=e.state.doc,d=c.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p="end"):(f=e.state.selection.from,p="start"),e.input.lastKeyCode=null;let m=hk(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(ci&&e.input.lastIOSEnter>Date.now()-225||xn)&&i.some(R=>R.nodeType==1&&!lk.test(R.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",R=>R(e,mr(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&o instanceof ae&&!o.empty&&o.$head.sameParent(o.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:o.from,endA:o.to,endB:o.to};else{if(l.sel){let R=n0(e,e.state.doc,l.sel);if(R&&!R.eq(e.state.selection)){let Q=e.state.tr.setSelection(R);u&&Q.setMeta("composition",u),e.dispatch(Q)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof ae&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),mt&&jn<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let A=l.doc.resolveNoCache(m.start-l.from),E=l.doc.resolveNoCache(m.endB-l.from),g=c.resolve(m.start),N=A.sameParent(E)&&A.parent.inlineContent&&g.end()>=m.endA;if((ci&&e.input.lastIOSEnter>Date.now()-225&&(!N||i.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!N&&A.pos<l.doc.content.size&&(!A.sameParent(E)||!A.parent.inlineContent)&&A.pos<E.pos&&!/\S/.test(l.doc.textBetween(A.pos,E.pos,"","")))&&e.someProp("handleKeyDown",R=>R(e,mr(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&fk(c,m.start,m.endA,A,E)&&e.someProp("handleKeyDown",R=>R(e,mr(8,"Backspace")))){xn&&Je&&e.domObserver.suppressSelectionUpdates();return}Je&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),xn&&!N&&A.start()!=E.start()&&E.parentOffset==0&&A.depth==E.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,E=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp("handleKeyDown",function(R){return R(e,mr(13,"Enter"))})},20));let w=m.start,_=m.endA,S=R=>{let Q=R||e.state.tr.replace(w,_,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let O=n0(e,Q.doc,l.sel);O&&!(Je&&e.composing&&O.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(O.head==w||O.head==Q.mapping.map(_)-1)||mt&&O.empty&&O.head==w)&&Q.setSelection(O)}return u&&Q.setMeta("composition",u),Q.scrollIntoView()},k;if(N)if(A.pos==E.pos){mt&&jn<=11&&A.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>wn(e),20));let R=S(e.state.tr.delete(w,_)),Q=c.resolve(m.start).marksAcross(c.resolve(m.endA));Q&&R.ensureMarks(Q),e.dispatch(R)}else if(m.endA==m.endB&&(k=dk(A.parent.content.cut(A.parentOffset,E.parentOffset),g.parent.content.cut(g.parentOffset,m.endA-g.start())))){let R=S(e.state.tr);k.type=="add"?R.addMark(w,_,k.mark):R.removeMark(w,_,k.mark),e.dispatch(R)}else if(A.parent.child(A.index()).isText&&A.index()==E.index()-(E.textOffset?0:1)){let R=A.parent.textBetween(A.parentOffset,E.parentOffset),Q=()=>S(e.state.tr.insertText(R,w,_));e.someProp("handleTextInput",O=>O(e,w,_,R,Q))||e.dispatch(Q())}else e.dispatch(S());else e.dispatch(S())}function n0(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Jc(e,t.resolve(n.anchor),t.resolve(n.head))}function dk(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,u=r,s,a,o;for(let c=0;c<r.length;c++)i=r[c].removeFromSet(i);for(let c=0;c<n.length;c++)u=n[c].removeFromSet(u);if(i.length==1&&u.length==0)a=i[0],s="add",o=c=>c.mark(a.addToSet(c.marks));else if(i.length==0&&u.length==1)a=u[0],s="remove",o=c=>c.mark(a.removeFromSet(c.marks));else return null;let l=[];for(let c=0;c<t.childCount;c++)l.push(o(t.child(c)));if(H.from(l).eq(e))return{mark:a,type:s}}function fk(e,t,n,r,i){if(n-t<=i.pos-r.pos||ko(r,!0,!1)<i.pos)return!1;let u=e.resolve(t);if(!r.parent.isTextblock){let a=u.nodeAfter;return a!=null&&n==t+a.nodeSize}if(u.parentOffset<u.parent.content.size||!u.parent.isTextblock)return!1;let s=e.resolve(ko(u,!0,!0));return!s.parent.isTextblock||s.pos>n||ko(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function ko(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let u=e.node(r).maybeChild(e.indexAfter(r));for(;u&&!u.isLeaf;)u=u.firstChild,i++}return i}function hk(e,t,n,r,i){let u=e.findDiffStart(t,n);if(u==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(i=="end"){let o=Math.max(0,u-Math.min(s,a));r-=s+o-u}if(s<u&&e.size<t.size){let o=r<=u&&r>=s?u-r:0;u-=o,u&&u<t.size&&r0(t.textBetween(u-1,u+1))&&(u+=o?1:-1),a=u+(a-s),s=u}else if(a<u){let o=r<=u&&r>=a?u-r:0;u-=o,u&&u<e.size&&r0(e.textBetween(u-1,u+1))&&(u+=o?1:-1),s=u+(s-a),a=u}return{start:u,endA:s,endB:a}}function r0(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class nA{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Dx,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(o0),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=s0(this),u0(this),this.nodeViews=a0(this),this.docView=Fh(this.state.doc,i0(this),xo(this),this.dom,this),this.domObserver=new nk(this,(r,i,u,s)=>ck(this,r,i,u,s)),this.domObserver.start(),_x(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Zl(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(o0),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,u=!1,s=!1;t.storedMarks&&this.composing&&(J1(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=a0(this);mk(p,this.nodeViews)&&(this.nodeViews=p,u=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Zl(this),this.editable=s0(this),u0(this);let o=xo(this),l=i0(this),c=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=u||!this.docView.matchesNode(t.doc,l,o);(d||!t.selection.eq(i.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&zC(this);if(s){this.domObserver.stop();let p=d&&(mt||Je)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&pk(i.selection,t.selection);if(d){let m=Je?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=zx(this)),(u||!this.docView.update(t.doc,l,o,this))&&(this.docView.updateOuterDeco(l),this.docView.destroy(),this.docView=Fh(t.doc,l,o,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&px(this))?wn(this,p):(P1(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&YC(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof re){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Rh(this,n.getBoundingClientRect(),t)}else Rh(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,i=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let u=r.from+(this.state.doc.content.size-n.doc.content.size);(u>0&&u<this.state.doc.content.size&&this.state.doc.nodeAt(u))==r.node&&(i=u)}this.dragging=new Z1(t.slice,t.move,i<0?void 0:re.create(this.state.doc,i))}someProp(t,n){let r=this._props&&this._props[t],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(i=n?n(a):a))return i}let u=this.state.plugins;if(u)for(let s=0;s<u.length;s++){let a=u[s].props[t];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(mt){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&GC(this.dom),wn(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return ZC(this,t)}coordsAtPos(t,n=1){return D1(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return nx(this,n||this.state,t)}pasteHTML(t,n){return Au(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Au(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return jc(this,t)}destroy(){this.docView&&(Ox(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],xo(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,BC())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return Mx(this,t)}domSelectionRange(){let t=this.domSelection();return t?tt&&this.root.nodeType===11&&HC(this.dom.ownerDocument)==this.dom&&ik(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}nA.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function i0(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[je.node(0,e.state.doc.content.size,t)]}function u0(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:je.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function s0(e){return!e.someProp("editable",t=>t(e.state)===!1)}function pk(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function a0(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function mk(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function o0(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}function On(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}var rA={text:(e,t,n,r)=>{const i=e.value;return/^[^*_\\]*\s+$/.test(i)?i:n.safe(i,{...r,encode:[]})},strong:(e,t,n,r)=>{const i=e.marker||n.options.strong||"*",u=n.enter("strong"),s=n.createTracker(r);let a=s.move(i+i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i+i),u(),a},emphasis:(e,t,n,r)=>{const i=e.marker||n.options.emphasis||"*",u=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i),u(),a}},In=he({},"editorView"),zi=he({},"editorState"),wo=he([],"initTimer"),l0=he({},"editor"),bu=he([],"inputRules"),Lr=he([],"prosePlugins"),Eu=he([],"remarkPlugins"),Xl=he([],"nodeView"),$l=he([],"markView"),kr=he(Rl().use(wl).use(Dl),"remark"),$i=he({handlers:rA,encode:[]},"remarkStringifyOptions"),Ss=sn("ConfigReady");function Ak(e){const t=n=>(n.record(Ss),async()=>(await e(n),n.done(Ss),()=>{n.clearTimer(Ss)}));return On(t,{displayName:"Config"}),t}var ri=sn("InitReady");function gk(e){const t=n=>(n.inject(l0,e).inject(Lr,[]).inject(Eu,[]).inject(bu,[]).inject(Xl,[]).inject($l,[]).inject($i,{handlers:rA,encode:[]}).inject(kr,Rl().use(wl).use(Dl)).inject(wo,[Ss]).record(ri),async()=>{await n.waitTimers(wo);const r=n.get($i);return n.set(kr,Rl().use(wl).use(Dl,r)),n.done(ri),()=>{n.remove(l0).remove(Lr).remove(Eu).remove(bu).remove(Xl).remove($l).remove($i).remove(kr).remove(wo).clearTimer(ri)}});return On(t,{displayName:"Init"}),t}var At=sn("SchemaReady"),Io=he([],"schemaTimer"),Sn=he({},"schema"),eu=he([],"nodes"),tu=he([],"marks");function c0(e){return{...e,parseDOM:e.parseDOM?.map(t=>({priority:e.priority,...t}))}}var iA=e=>(e.inject(Sn,{}).inject(eu,[]).inject(tu,[]).inject(Io,[ri]).record(At),async()=>{await e.waitTimers(Io);const t=e.get(kr),n=e.get(Eu).reduce((i,u)=>i.use(u.plugin,u.options),t);e.set(kr,n);const r=new aT({nodes:Object.fromEntries(e.get(eu).map(([i,u])=>[i,c0(u)])),marks:Object.fromEntries(e.get(tu).map(([i,u])=>[i,c0(u)]))});return e.set(Sn,r),e.done(At),()=>{e.remove(Sn).remove(eu).remove(tu).remove(Io).clearTimer(At)}});On(iA,{displayName:"Schema"});var uA=class{constructor(){this.setCtx=e=>{this.#e=e},this.chain=()=>{if(this.#e==null)throw ja();const e=this.#e,t=[],n=this.get.bind(this),r={run:()=>{const u=Ai(...t),s=e.get(In);return u(s.state,s.dispatch,s)},inline:u=>(t.push(u),r),pipe:i.bind(this)};function i(u,s){const a=n(u);return t.push(a(s)),r}return r}}#t=new Xp;#e=null;get ctx(){return this.#e}create(e,t){const n=e.create(this.#t.sliceMap);return n.set(t),n}get(e){return this.#t.get(e).get()}remove(e){return this.#t.remove(e)}call(e,t){if(this.#e==null)throw ja();const n=this.get(e)(t),r=this.#e.get(In);return n(r.state,r.dispatch,r)}inline(e){if(this.#e==null)throw ja();const t=this.#e.get(In);return e(t.state,t.dispatch,t)}};function bk(e="cmdKey"){return he((()=>()=>!1),e)}var Ce=he(new uA,"commands"),So=he([At],"commandsTimer"),nu=sn("CommandsReady"),sA=e=>{const t=new uA;return t.setCtx(e),e.inject(Ce,t).inject(So,[At]).record(nu),async()=>(await e.waitTimers(So),e.done(nu),()=>{e.remove(Ce).remove(So).clearTimer(nu)})};On(sA,{displayName:"Commands"});function Ek(e){return e.Backspace=Ai(aC,Wc,KT,c1),e}var aA=class{constructor(){this.setCtx=e=>{this.#t=e},this.add=e=>(this.#e.push(e),()=>{this.#e=this.#e.filter(t=>t!==e)}),this.addObjectKeymap=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{if(typeof r=="function"){const i={key:n,onRun:()=>r};this.#e.push(i),t.push(()=>{this.#e=this.#e.filter(u=>u!==i)})}else this.#e.push(r),t.push(()=>{this.#e=this.#e.filter(i=>i!==r)})}),()=>{t.forEach(n=>n())}},this.addBaseKeymap=()=>{const e=Ek(uC);return this.addObjectKeymap(e)},this.build=()=>{const e={};return this.#e.forEach(t=>{e[t.key]=[...e[t.key]||[],t]}),Object.fromEntries(Object.entries(e).map(([t,n])=>{const r=n.sort((u,s)=>(s.priority??50)-(u.priority??50));return[t,(u,s,a)=>{const o=this.#t;if(o==null)throw Ca();return Ai(...r.map(l=>l.onRun(o)))(u,s,a)}]}))}}#t=null;#e=[];get ctx(){return this.#t}},Zs=he(new aA,"keymap"),No=he([At],"keymapTimer"),ru=sn("KeymapReady"),yk=e=>{const t=new aA;return t.setCtx(e),e.inject(Zs,t).inject(No,[At]).record(ru),async()=>(await e.waitTimers(No),e.done(ru),()=>{e.remove(Zs).remove(No).clearTimer(ru)})},Ns=sn("ParserReady"),oA=(()=>{throw Ca()}),Ds=he(oA,"parser"),Do=he([],"parserTimer"),lA=e=>(e.inject(Ds,oA).inject(Do,[At]).record(Ns),async()=>{await e.waitTimers(Do);const t=e.get(kr),n=e.get(Sn);return e.set(Ds,OC.create(n,t)),e.done(Ns),()=>{e.remove(Ds).remove(Do).clearTimer(Ns)}});On(lA,{displayName:"Parser"});var _s=sn("SerializerReady"),_o=he([],"serializerTimer"),cA=(()=>{throw Ca()}),Oo=he(cA,"serializer"),dA=e=>(e.inject(Oo,cA).inject(_o,[At]).record(_s),async()=>{await e.waitTimers(_o);const t=e.get(kr),n=e.get(Sn);return e.set(Oo,MC.create(n,t)),e.done(_s),()=>{e.remove(Oo).remove(_o).clearTimer(_s)}});On(dA,{displayName:"Serializer"});var Ro=he("","defaultValue"),Mo=he(e=>e,"stateOptions"),Bo=he([],"editorStateTimer"),Os=sn("EditorStateReady");function Tk(e,t,n){if(typeof e=="string")return t(e);if(e.type==="html")return vc.fromSchema(n).parse(e.dom);if(e.type==="json")return kn.fromJSON(n,e.value);throw r2(e)}var Ck=new wt("MILKDOWN_STATE_TRACKER"),fA=e=>(e.inject(Ro,"").inject(zi,{}).inject(Mo,t=>t).inject(Bo,[Ns,_s,nu,ru]).record(Os),async()=>{await e.waitTimers(Bo);const t=e.get(Sn),n=e.get(Ds),r=e.get(bu),i=e.get(Mo),u=e.get(Lr),s=Tk(e.get(Ro),n,t),a=e.get(Zs),o=a.addBaseKeymap(),l=[...u,new kt({key:Ck,state:{init:()=>{},apply:(f,p,m,A)=>{e.set(zi,A)}}}),mC({rules:r}),DC(a.build())];e.set(Lr,l);const c=i({schema:t,doc:s,plugins:l}),d=ei.create(c);return e.set(zi,d),e.done(Os),()=>{o(),e.remove(Ro).remove(zi).remove(Mo).remove(Bo).clearTimer(Os)}});On(fA,{displayName:"EditorState"});var yu=he([],"pasteRule"),Lo=he([At],"pasteRuleTimer"),Rs=sn("PasteRuleReady"),hA=e=>(e.inject(yu,[]).inject(Lo,[At]).record(Rs),async()=>(await e.waitTimers(Lo),e.done(Rs),()=>{e.remove(yu).remove(Lo).clearTimer(Rs)}));On(hA,{displayName:"PasteRule"});var vo=sn("EditorViewReady"),Po=he([],"editorViewTimer"),Fo=he({},"editorViewOptions"),Ho=he(null,"root"),ec=he(null,"rootDOM"),tc=he({},"rootAttrs");function xk(e,t){const n=document.createElement("div");n.className="milkdown",e.appendChild(n),t.set(ec,n);const r=t.get(tc);return Object.entries(r).forEach(([i,u])=>n.setAttribute(i,u)),n}function kk(e){e.classList.add("editor"),e.setAttribute("role","textbox")}var wk=new wt("MILKDOWN_VIEW_CLEAR"),pA=e=>(e.inject(Ho,document.body).inject(In,{}).inject(Fo,{}).inject(ec,null).inject(tc,{}).inject(Po,[Os,Rs]).record(vo),async()=>{await e.wait(ri);const t=e.get(Ho)||document.body,n=typeof t=="string"?document.querySelector(t):t;e.update(Lr,s=>[new kt({key:wk,view:a=>{const o=n?xk(n,e):void 0;return(()=>{if(o&&n){const c=a.dom;n.replaceChild(o,c),o.appendChild(c)}})(),{destroy:()=>{o?.parentNode&&o?.parentNode.replaceChild(a.dom,o),o?.remove()}}}}),...s]),await e.waitTimers(Po);const r=e.get(zi),i=e.get(Fo),u=new nA(n,{state:r,nodeViews:Object.fromEntries(e.get(Xl)),markViews:Object.fromEntries(e.get($l)),transformPasted:(s,a,o)=>(e.get(yu).sort((l,c)=>(c.priority??50)-(l.priority??50)).map(l=>l.run).forEach(l=>{s=l(s,a,o)}),s),...i});return kk(u.dom),e.set(In,u),e.done(vo),()=>{u?.destroy(),e.remove(Ho).remove(In).remove(Fo).remove(ec).remove(tc).remove(Po).clearTimer(vo)}});On(pA,{displayName:"EditorView"});var Nt=(function(e){return e.Idle="Idle",e.OnCreate="OnCreate",e.Created="Created",e.OnDestroy="OnDestroy",e.Destroyed="Destroyed",e})({}),hR=class mA{constructor(){this.enableInspector=(t=!0)=>(this.#t=t,this),this.onStatusChange=t=>(this.#n=t,this),this.config=t=>(this.#r.push(t),this),this.removeConfig=t=>(this.#r=this.#r.filter(n=>n!==t),this),this.use=t=>{const n=[t].flat();return n.flat().forEach(r=>{this.#i.set(r,{ctx:void 0,handler:void 0,cleanup:void 0})}),this.#e===Nt.Created&&this.#c(n,this.#i),this},this.remove=async t=>this.#e===Nt.OnCreate?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise(n=>{setTimeout(()=>{n(this.remove(t))},50)})):(await this.#d([t].flat(),!0),this),this.create=async()=>this.#e===Nt.OnCreate?this:(this.#e===Nt.Created&&await this.destroy(),this.#l(Nt.OnCreate),this.#h(),this.#c([...this.#i.keys()],this.#i),await Promise.all([this.#f(this.#s),this.#f(this.#i)].flat()),this.#l(Nt.Created),this),this.destroy=async(t=!1)=>this.#e===Nt.Destroyed||this.#e===Nt.OnDestroy?this:this.#e===Nt.OnCreate?new Promise(n=>{setTimeout(()=>{n(this.destroy(t))},50)}):(t&&(this.#r=[]),this.#l(Nt.OnDestroy),await this.#d([...this.#i.keys()],t),await this.#p(),this.#l(Nt.Destroyed),this),this.action=t=>t(this.#o),this.inspect=()=>this.#t?[...this.#s.values(),...this.#i.values()].map(({ctx:t})=>t?.inspector?.read()).filter(t=>!!t):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new mA}#t=!1;#e=Nt.Idle;#r=[];#n=()=>{};#a=new Xp;#u=new m2;#i=new Map;#s=new Map;#o=new p2(this.#a,this.#u);#h=()=>{const t=Ak(async r=>{await Promise.all(this.#r.map(i=>Promise.resolve(i(r))))}),n=[iA,lA,dA,sA,yk,hA,fA,pA,gk(this),t];this.#c(n,this.#s)};#c=(t,n)=>{t.forEach(r=>{const i=this.#o.produce(this.#t?r.meta:void 0),u=r(i);n.set(r,{ctx:i,handler:u,cleanup:void 0})})};#d=(t,n=!1)=>Promise.all([t].flat().map(async r=>{const i=this.#i.get(r)?.cleanup;return n?this.#i.delete(r):this.#i.set(r,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof i=="function"?i():i}));#p=async()=>{await Promise.all([...this.#s.entries()].map(async([t,{cleanup:n}])=>typeof n=="function"?n():n)),this.#s.clear()};#l=t=>{this.#e=t,this.#n(t)};#f=t=>[...t.entries()].map(async([n,r])=>{const{ctx:i,handler:u}=r;if(!u)return;const s=await u();t.set(n,{ctx:i,handler:u,cleanup:s})});get ctx(){return this.#o}get status(){return this.#e}};function ie(e,t){const n=bk(e),r=i=>async()=>{r.key=n,await i.wait(nu);const u=t(i);return i.get(Ce).create(n,u),r.run=s=>i.get(Ce).call(e,s),()=>{i.get(Ce).remove(n)}};return r}function bt(e){const t=n=>async()=>{await n.wait(At);const r=e(n);return n.update(bu,i=>[...i,r]),t.inputRule=r,()=>{n.update(bu,i=>i.filter(u=>u!==r))}};return t}function Ik(e){const t=n=>async()=>{await n.wait(At);const r=e(n);return n.update(yu,i=>[...i,r]),t.pasteRule=r,()=>{n.update(yu,i=>i.filter(u=>u!==r))}};return t}function Sk(e,t){const n=r=>async()=>{const i=t(r);return r.update(tu,u=>[...u.filter(s=>s[0]!==e),[e,i]]),n.id=e,n.schema=i,()=>{r.update(tu,u=>u.filter(([s])=>s!==e))}};return n.type=r=>{const i=r.get(Sn).marks[e];if(!i)throw c2(e);return i},n}function nd(e,t){const n=r=>async()=>{const i=t(r);return r.update(eu,u=>[...u.filter(s=>s[0]!==e),[e,i]]),n.id=e,n.schema=i,()=>{r.update(eu,u=>u.filter(([s])=>s!==e))}};return n.type=r=>{const i=r.get(Sn).nodes[e];if(!i)throw l2(e);return i},n}function Rn(e){let t;const n=r=>async()=>(await r.wait(At),t=e(r),r.update(Lr,i=>[...i,t]),()=>{r.update(Lr,i=>i.filter(u=>u!==t))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function Nk(e){const t=n=>async()=>{await n.wait(ru);const r=n.get(Zs),i=e(n),u=r.addObjectKeymap(i);return t.keymap=i,()=>{u()}};return t}function sr(e,t){const n=he(e,t),r=i=>(i.inject(n),()=>()=>{i.remove(n)});return r.key=n,r}function Be(e,t){const n=sr(t,e),r=nd(e,u=>u.get(n.key)(u)),i=[n,r];return i.id=r.id,i.node=r,i.type=u=>r.type(u),i.ctx=n,i.key=n.key,i.extendSchema=u=>Be(e,u(t)),i}function Mn(e,t){const n=sr(t,e),r=Sk(e,u=>u.get(n.key)(u)),i=[n,r];return i.id=r.id,i.mark=r,i.type=u=>r.type(u),i.ctx=n,i.key=n.key,i.extendSchema=u=>Mn(e,u(t)),i}function St(e,t){const n=sr(Object.fromEntries(Object.entries(t).map(([u,{shortcuts:s,priority:a}])=>[u,{shortcuts:s,priority:a}])),`${e}Keymap`),r=Nk(u=>{const s=u.get(n.key),a=Object.entries(t).flatMap(([o,{command:l}])=>{const c=s[o],d=[c.shortcuts].flat(),f=c.priority;return d.map(p=>[p,{key:p,onRun:l,priority:f}])});return Object.fromEntries(a)}),i=[n,r];return i.ctx=n,i.shortcuts=r,i.key=n.key,i.keymap=r.keymap,i}var zt=(e,t=()=>({}))=>sr(t,`${e}Attr`),Ku=(e,t=()=>({}))=>sr(t,`${e}Attr`);function Ht(e,t,n){const r=sr({},e),i=s=>async()=>{await s.wait(ri);const a={plugin:t(s),options:s.get(r.key)};return s.update(Eu,o=>[...o,a]),()=>{s.update(Eu,o=>o.filter(l=>l!==a))}},u=[r,i];return u.id=e,u.plugin=i,u.options=r,u}function pR(){return e=>{const t=document.createElement("div"),n=e.get(Sn),r=e.get(In),i=Ur.fromSchema(n).serializeFragment(r.state.doc.content);return t.appendChild(i),t.innerHTML}}function Dk(e,t){return function(n,r){let{$from:i,$to:u,node:s}=n.selection;if(s&&s.isBlock||i.depth<2||!i.sameParent(u))return!1;let a=i.node(-1);if(a.type!=e)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=e||i.index(-2)!=i.node(-2).childCount-1)return!1;if(r){let d=H.empty,f=i.index(-1)?1:i.index(-2)?2:3;for(let g=i.depth-f;g>=i.depth-3;g--)d=H.from(i.node(g).copy(d));let p=i.indexAfter(-1)<i.node(-2).childCount?1:i.indexAfter(-2)<i.node(-3).childCount?2:3;d=d.append(H.from(e.createAndFill()));let m=i.before(i.depth-(f-1)),A=n.tr.replace(m,i.after(-p),new Y(d,4-f,0)),E=-1;A.doc.nodesBetween(m,A.doc.content.size,(g,N)=>{if(E>-1)return!1;g.isTextblock&&g.content.size==0&&(E=N+1)}),E>-1&&A.setSelection(ue.near(A.doc.resolve(E))),r(A.scrollIntoView())}return!0}let o=u.pos==i.end()?a.contentMatchAt(0).defaultType:null,l=n.tr.delete(i.pos,u.pos),c=o?[null,{type:o}]:void 0;return ji(l.doc,i.pos,2,c)?(r&&r(l.split(i.pos,2,c).scrollIntoView()),!0):!1}}function _k(e){return function(t,n){let{$from:r,$to:i}=t.selection,u=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==e);return u?n?r.node(u.depth-1).type==e?Ok(t,n,e,u):Rk(t,n,u):!0:!1}}function Ok(e,t,n,r){let i=e.tr,u=r.end,s=r.$to.end(r.depth);u<s&&(i.step(new et(u-1,s,u,s,new Y(H.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new vm(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=Sa(r);if(a==null)return!1;i.lift(r,a);let o=i.doc.resolve(i.mapping.map(u,-1)-1);return Na(i.doc,o.pos)&&o.nodeBefore.type==o.nodeAfter.type&&i.join(o.pos),t(i.scrollIntoView()),!0}function Rk(e,t,n){let r=e.tr,i=n.parent;for(let p=n.end,m=n.endIndex-1,A=n.startIndex;m>A;m--)p-=i.child(m).nodeSize,r.delete(p-1,p+1);let u=r.doc.resolve(n.start),s=u.nodeAfter;if(r.mapping.map(n.end)!=n.start+u.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,o=n.endIndex==i.childCount,l=u.node(-1),c=u.index(-1);if(!l.canReplace(c+(a?0:1),c+1,s.content.append(o?H.empty:H.from(i))))return!1;let d=u.pos,f=d+s.nodeSize;return r.step(new et(d-(a?1:0),f+(o?1:0),d+1,f-1,new Y((a?H.empty:H.from(i.copy(H.empty))).append(o?H.empty:H.from(i.copy(H.empty))),a?0:1,o?0:1),a?0:1)),t(r.scrollIntoView()),!0}function Mk(e){return function(t,n){let{$from:r,$to:i}=t.selection,u=r.blockRange(i,l=>l.childCount>0&&l.firstChild.type==e);if(!u)return!1;let s=u.startIndex;if(s==0)return!1;let a=u.parent,o=a.child(s-1);if(o.type!=e)return!1;if(n){let l=o.lastChild&&o.lastChild.type==a.type,c=H.from(l?e.create():null),d=new Y(H.from(e.create(null,H.from(a.type.create(null,c)))),l?3:1,0),f=u.start,p=u.end;n(t.tr.step(new et(f-(l?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function Bk(e){const t=new Map;if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return mi(e,"definition",function(r){const i=d0(r.identifier);i&&!t.get(i)&&t.set(i,r)}),n;function n(r){const i=d0(r);return t.get(i)}}function d0(e){return String(e||"").toUpperCase()}function Lk(){return function(e){const t=Bk(e);mi(e,function(n,r,i){if(n.type==="definition"&&i!==void 0&&typeof r=="number")return i.children.splice(r,1),[Nl,r];if(n.type==="imageReference"||n.type==="linkReference"){const u=t(n.identifier);if(u&&i&&typeof r=="number")return i.children[r]=n.type==="imageReference"?{type:"image",url:u.url,title:u.title,alt:n.alt}:{type:"link",url:u.url,title:u.title,children:n.children},[Nl,r]}})}}function AA(e,t){if(!(t.childCount>=1&&t.lastChild?.type.name==="hardbreak")){e.next(t.content);return}const n=[];t.content.forEach((r,i,u)=>{u!==t.childCount-1&&n.push(r)}),e.next(H.fromArray(n))}function v(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}var rd=Ku("emphasis");v(rd,{displayName:"Attr<emphasis>",group:"Emphasis"});var gi=Mn("emphasis",e=>({attrs:{marker:{default:e.get($i).emphasis||"*",validate:"string"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:t=>t==="italic"}],toDOM:t=>["em",e.get(rd.key)(t)],parseMarkdown:{match:t=>t.type==="emphasis",runner:(t,n,r)=>{t.openMark(r,{marker:n.marker}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="emphasis",runner:(t,n)=>{t.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));v(gi.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});v(gi.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});var id=ie("ToggleEmphasis",e=>()=>Oa(gi.type(e)));v(id,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});var gA=bt(e=>Fu(/(?:^|[^*])\*([^*]+)\*$/,gi.type(e),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:n+1}}));v(gA,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});var bA=bt(e=>Fu(/\b_(?![_\s])(.*?[^_\s])_\b/,gi.type(e),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:n+1}}));v(bA,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});var ud=St("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{const t=e.get(Ce);return()=>t.call(id.key)}}});v(ud.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});v(ud.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});var sd=Ku("strong");v(sd,{displayName:"Attr<strong>",group:"Strong"});var Qu=Mn("strong",e=>({attrs:{marker:{default:e.get($i).strong||"*",validate:"string"}},parseDOM:[{tag:"b",getAttrs:t=>t.style.fontWeight!="normal"&&null},{tag:"strong"},{style:"font-style",getAttrs:t=>t==="bold"},{style:"font-weight=400",clearMark:t=>t.type.name=="strong"},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:t=>["strong",e.get(sd.key)(t)],parseMarkdown:{match:t=>t.type==="strong",runner:(t,n,r)=>{t.openMark(r,{marker:n.marker}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strong",runner:(t,n)=>{t.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));v(Qu.mark,{displayName:"MarkSchema<strong>",group:"Strong"});v(Qu.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});var ad=ie("ToggleStrong",e=>()=>Oa(Qu.type(e)));v(ad,{displayName:"Command<toggleStrongCommand>",group:"Strong"});var EA=bt(e=>Fu(new RegExp("(?<![\\w:/])(?:\\*\\*|__)([^*_]+?)(?:\\*\\*|__)(?![\\w/])$"),Qu.type(e),{getAttr:t=>({marker:t[0].startsWith("*")?"*":"_"})}));v(EA,{displayName:"InputRule<strong>",group:"Strong"});var od=St("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{const t=e.get(Ce);return()=>t.call(ad.key)}}});v(od.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});v(od.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});var ld=Ku("inlineCode");v(ld,{displayName:"Attr<inlineCode>",group:"InlineCode"});var Gn=Mn("inlineCode",e=>({priority:100,code:!0,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(ld.key)(t)],parseMarkdown:{match:t=>t.type==="inlineCode",runner:(t,n,r)=>{t.openMark(r),t.addText(n.value),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="inlineCode",runner:(t,n,r)=>(t.withMark(n,"inlineCode",r.text||""),!0)}}));v(Gn.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});v(Gn.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});var cd=ie("ToggleInlineCode",e=>()=>(t,n)=>{const{selection:r,tr:i}=t;if(r.empty)return!1;const{from:u,to:s}=r;return t.doc.rangeHasMark(u,s,Gn.type(e))?(n?.(i.removeMark(u,s,Gn.type(e))),!0):(Object.keys(t.schema.marks).filter(a=>a!==Gn.type.name).map(a=>t.schema.marks[a]).forEach(a=>{i.removeMark(u,s,a)}),n?.(i.addMark(u,s,Gn.type(e).create())),!0)});v(cd,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});var yA=bt(e=>Fu(/(?:`)([^`]+)(?:`)$/,Gn.type(e)));v(yA,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});var dd=St("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{const t=e.get(Ce);return()=>t.call(cd.key)}}});v(dd.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});v(dd.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});var fd=Ku("link");v(fd,{displayName:"Attr<link>",group:"Link"});var ii=Mn("link",e=>({attrs:{href:{validate:"string"},title:{default:null,validate:"string|null"}},parseDOM:[{tag:"a[href]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw un(t);return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(fd.key)(t),...t.attrs}],parseMarkdown:{match:t=>t.type==="link",runner:(t,n,r)=>{const i=n.url,u=n.title;t.openMark(r,{href:i,title:u}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="link",runner:(t,n)=>{t.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));v(ii.mark,{displayName:"MarkSchema<link>",group:"Link"});var TA=ie("ToggleLink",e=>(t={})=>Oa(ii.type(e),t));v(TA,{displayName:"Command<toggleLinkCommand>",group:"Link"});var CA=ie("UpdateLink",e=>(t={})=>(n,r)=>{if(!r)return!1;let i,u=-1;const{selection:s}=n,{from:a,to:o}=s;if(n.doc.nodesBetween(a,a===o?o+1:o,(m,A)=>{if(ii.type(e).isInSet(m.marks))return i=m,u=A,!1}),!i)return!1;const l=i.marks.find(({type:m})=>m===ii.type(e));if(!l)return!1;const c=u,d=u+i.nodeSize,{tr:f}=n,p=ii.type(e).create({...l.attrs,...t});return p?(r(f.removeMark(c,d,l).addMark(c,d,p).setSelection(new ae(f.selection.$anchor)).scrollIntoView()),!0):!1});v(CA,{displayName:"Command<updateLinkCommand>",group:"Link"});var xA=nd("doc",()=>({content:"block+",parseMarkdown:{match:({type:e})=>e==="root",runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>e.type.name==="doc",runner:(e,t)=>{e.openNode("root"),e.next(t.content)}}}));v(xA,{displayName:"NodeSchema<doc>",group:"Doc"});function vk(e){return Oc(e,t=>t.type==="html"&&["<br />","<br>","<br >","<br/>"].includes(t.value?.trim()),(t,n)=>{if(!n.length)return;const r=n[n.length-1];if(!r)return;const i=r.children.indexOf(t);i!==-1&&r.children.splice(i,1)},!0)}var La=Ht("remark-preserve-empty-line",()=>()=>vk);v(La.plugin,{displayName:"Remark<remarkPreserveEmptyLine>",group:"Remark"});v(La.options,{displayName:"RemarkConfig<remarkPreserveEmptyLine>",group:"Remark"});var hd=zt("paragraph");v(hd,{displayName:"Attr<paragraph>",group:"Paragraph"});var rn=Be("paragraph",e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(hd.key)(t),0],parseMarkdown:{match:t=>t.type==="paragraph",runner:(t,n,r)=>{t.openNode(r),n.children?t.next(n.children):t.addText(n.value||""),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="paragraph",runner:(t,n)=>{const r=e.get(In).state?.doc.lastChild;t.openNode("paragraph"),(!n.content||n.content.size===0)&&n!==r&&Pk(e)?t.addNode("html",void 0,"<br />"):AA(t,n),t.closeNode()}}}));function Pk(e){let t=!1;try{e.get(La.id),t=!0}catch{t=!1}return t}v(rn.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});v(rn.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});var pd=ie("TurnIntoText",e=>()=>pu(rn.type(e)));v(pd,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});var md=St("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{const t=e.get(Ce);return()=>t.call(pd.key)}}});v(md.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});v(md.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});var Fk=Array(6).fill(0).map((e,t)=>t+1);function Hk(e){return e.textContent.toLowerCase().trim().replace(/\s+/g,"-")}var va=sr(Hk,"headingIdGenerator");v(va,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});var Ad=zt("heading");v(Ad,{displayName:"Attr<heading>",group:"Heading"});var Wr=Be("heading",e=>{const t=e.get(va.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:"",validate:"string"},level:{default:1,validate:"number"}},parseDOM:Fk.map(n=>({tag:`h${n}`,getAttrs:r=>{if(!(r instanceof HTMLElement))throw un(r);return{level:n,id:r.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...e.get(Ad.key)(n),id:n.attrs.id||t(n)},0],parseMarkdown:{match:({type:n})=>n==="heading",runner:(n,r,i)=>{const u=r.depth;n.openNode(i,{level:u}),n.next(r.children),n.closeNode()}},toMarkdown:{match:n=>n.type.name==="heading",runner:(n,r)=>{n.openNode("heading",void 0,{depth:r.attrs.level}),AA(n,r),n.closeNode()}}}});v(Wr.node,{displayName:"NodeSchema<heading>",group:"Heading"});v(Wr.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});var kA=bt(e=>m1(/^(?<hashes>#+)\s$/,Wr.type(e),t=>{const n=t.groups?.hashes?.length||0,{$from:r}=e.get(In).state.selection,i=r.node();if(i.type.name==="heading"){let u=Number(i.attrs.level)+Number(n);return u>6&&(u=6),{level:u}}return{level:n}}));v(kA,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});var Un=ie("WrapInHeading",e=>t=>(t??=1,t<1?pu(rn.type(e)):pu(Wr.type(e),{level:t})));v(Un,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});var gd=ie("DowngradeHeading",e=>()=>(t,n,r)=>{const{$from:i}=t.selection,u=i.node();if(u.type!==Wr.type(e)||!t.selection.empty||i.parentOffset!==0)return!1;const s=u.attrs.level-1;return s?(n?.(t.tr.setNodeMarkup(t.selection.$from.before(),void 0,{...u.attrs,level:s})),!0):pu(rn.type(e))(t,n,r)});v(gd,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});var bd=St("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{const t=e.get(Ce);return()=>t.call(Un.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{const t=e.get(Ce);return()=>t.call(Un.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{const t=e.get(Ce);return()=>t.call(Un.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{const t=e.get(Ce);return()=>t.call(Un.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{const t=e.get(Ce);return()=>t.call(Un.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{const t=e.get(Ce);return()=>t.call(Un.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{const t=e.get(Ce);return()=>t.call(gd.key)}}});v(bd.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});v(bd.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});var Ed=zt("blockquote");v(Ed,{displayName:"Attr<blockquote>",group:"Blockquote"});var zu=Be("blockquote",e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(Ed.key)(t),0],parseMarkdown:{match:({type:t})=>t==="blockquote",runner:(t,n,r)=>{t.openNode(r).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="blockquote",runner:(t,n)=>{t.openNode("blockquote").next(n.content).closeNode()}}}));v(zu.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});v(zu.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});var wA=bt(e=>Yc(/^\s*>\s$/,zu.type(e)));v(wA,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});var yd=ie("WrapInBlockquote",e=>()=>zc(zu.type(e)));v(yd,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});var Td=St("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{const t=e.get(Ce);return()=>t.call(yd.key)}}});v(Td.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});v(Td.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});var Cd=zt("codeBlock",()=>({pre:{},code:{}}));v(Cd,{displayName:"Attr<codeBlock>",group:"CodeBlock"});var Yu=Be("code_block",e=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:"",validate:"string"}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>{if(!(t instanceof HTMLElement))throw un(t);return{language:t.dataset.language}}}],toDOM:t=>{const n=e.get(Cd.key)(t),r=t.attrs.language,i=r&&r.length>0?{"data-language":r}:void 0;return["pre",{...n.pre,...i},["code",n.code,0]]},parseMarkdown:{match:({type:t})=>t==="code",runner:(t,n,r)=>{const i=n.lang??"",u=n.value;t.openNode(r,{language:i}),u&&t.addText(u),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="code_block",runner:(t,n)=>{t.addNode("code",void 0,n.content.firstChild?.text||"",{lang:n.attrs.language})}}}));v(Yu.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});v(Yu.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});var IA=bt(e=>m1(/^```(?<language>[a-z]*)?[\s\n]$/,Yu.type(e),t=>({language:t.groups?.language??""})));v(IA,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});var xd=ie("CreateCodeBlock",e=>(t="")=>pu(Yu.type(e),{language:t}));v(xd,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});var Uk=ie("UpdateCodeBlockLanguage",()=>({pos:e,language:t}={pos:-1,language:""})=>(n,r)=>e>=0?(r?.(n.tr.setNodeAttribute(e,"language",t)),!0):!1);v(Uk,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});var kd=St("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{const t=e.get(Ce);return()=>t.call(xd.key)}}});v(kd.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});v(kd.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});var wd=zt("image");v(wd,{displayName:"Attr<image>",group:"Image"});var bi=Be("image",e=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:"",validate:"string"},alt:{default:"",validate:"string"},title:{default:"",validate:"string"}},parseDOM:[{tag:"img[src]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw un(t);return{src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||"",title:t.getAttribute("title")||t.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(wd.key)(t),...t.attrs}],parseMarkdown:{match:({type:t})=>t==="image",runner:(t,n,r)=>{const i=n.url,u=n.alt,s=n.title;t.addNode(r,{src:i,alt:u,title:s})}},toMarkdown:{match:t=>t.type.name==="image",runner:(t,n)=>{t.addNode("image",void 0,void 0,{title:n.attrs.title,url:n.attrs.src,alt:n.attrs.alt})}}}));v(bi.node,{displayName:"NodeSchema<image>",group:"Image"});v(bi.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});var SA=ie("InsertImage",e=>(t={})=>(n,r)=>{if(!r)return!0;const{src:i="",alt:u="",title:s=""}=t,a=bi.type(e).create({src:i,alt:u,title:s});return a&&r(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});v(SA,{displayName:"Command<insertImageCommand>",group:"Image"});var NA=ie("UpdateImage",e=>(t={})=>(n,r)=>{const i=yC(n.selection,bi.type(e));if(!i)return!1;const{node:u,pos:s}=i,a={...u.attrs},{src:o,alt:l,title:c}=t;return o!==void 0&&(a.src=o),l!==void 0&&(a.alt=l),c!==void 0&&(a.title=c),r?.(n.tr.setNodeMarkup(s,void 0,a).scrollIntoView()),!0});v(NA,{displayName:"Command<updateImageCommand>",group:"Image"});var Wk=bt(e=>new It(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(t,n,r,i)=>{const[u,s,a="",o]=n;return u?t.tr.replaceWith(r,i,bi.type(e).create({src:a,alt:s,title:o})):null}));v(Wk,{displayName:"InputRule<insertImageInputRule>",group:"Image"});var Xs=zt("hardbreak",e=>({"data-type":"hardbreak","data-is-inline":e.attrs.isInline}));v(Xs,{displayName:"Attr<hardbreak>",group:"Hardbreak"});var wr=Be("hardbreak",e=>({inline:!0,group:"inline",attrs:{isInline:{default:!1,validate:"boolean"}},selectable:!1,parseDOM:[{tag:"br"},{tag:'span[data-type="hardbreak"]',getAttrs:()=>({isInline:!0})}],toDOM:t=>t.attrs.isInline?["span",e.get(Xs.key)(t)," "]:["br",e.get(Xs.key)(t)],parseMarkdown:{match:({type:t})=>t==="break",runner:(t,n,r)=>{t.addNode(r,{isInline:!!n.data?.isInline})}},leafText:()=>`
34
+ `),i;function u(s){return r.stack.push(s),a;function a(){r.stack.pop()}}}function Q3(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Y3(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function q3(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function G3(e,t){return v3(e,this,t)}function V3(e,t){return L3(e,this,t)}function J3(e,t){return U3(this,e,t)}function Bl(e){const t=this;t.compiler=n;function n(r){return z3(r,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function uh(e){if(e)throw e}function Pc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function j3(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var so,sh;function Z3(){if(sh)return so;sh=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},u=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var c=e.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!d)return!1;var f;for(f in l);return typeof f>"u"||e.call(l,f)},s=function(l,c){n&&c.name==="__proto__"?n(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},a=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(r)return r(l,c).value}else return;return l[c]};return so=function o(){var l,c,d,f,p,m,A=arguments[0],E=1,g=arguments.length,N=!1;for(typeof A=="boolean"&&(N=A,A=arguments[1]||{},E=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});E<g;++E)if(l=arguments[E],l!=null)for(c in l)d=a(A,c),f=a(l,c),A!==f&&(N&&f&&(u(f)||(p=i(f)))?(p?(p=!1,m=d&&i(d)?d:[]):m=d&&u(d)?d:{},s(A,{name:c,newValue:o(N,m,f)})):typeof f<"u"&&s(A,{name:c,newValue:f}));return A},so}var X3=Z3();const ao=Pc(X3);function mM(){}function vl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function $3(){const e=[],t={run:n,use:r};return t;function n(...i){let u=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(o,...l){const c=e[++u];let d=-1;if(o){s(o);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,c?eT(c,a)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function eT(e,t){let n;return r;function r(...s){const a=e.length>s.length;let o;a&&s.push(i);try{o=e.apply(this,s)}catch(l){const c=l;if(a&&n)throw c;return i(c)}a||(o&&o.then&&typeof o.then=="function"?o.then(u,i):o instanceof Error?i(o):u(o))}function i(s,...a){n||(n=!0,t(s,...a))}function u(s){i(null,s)}}class kt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",u={},s=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?i=t:!u.cause&&t&&(s=!0,i=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?u.ruleId=r:(u.source=r.slice(0,o),u.ruleId=r.slice(o+1))}if(!u.place&&u.ancestors&&u.ancestors){const o=u.ancestors[u.ancestors.length-1];o&&(u.place=o.position)}const a=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=$i(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=s&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}kt.prototype.file="";kt.prototype.name="";kt.prototype.reason="";kt.prototype.message="";kt.prototype.stack="";kt.prototype.column=void 0;kt.prototype.line=void 0;kt.prototype.ancestors=void 0;kt.prototype.cause=void 0;kt.prototype.fatal=void 0;kt.prototype.place=void 0;kt.prototype.ruleId=void 0;kt.prototype.source=void 0;const Xt={basename:tT,dirname:nT,extname:rT,join:iT,sep:"/"};function tT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ju(e);let n=0,r=-1,i=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(u){n=i+1;break}}else r<0&&(u=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(u){n=i+1;break}}else s<0&&(u=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function nT(e){if(Ju(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function rT(e){Ju(e);let t=e.length,n=-1,r=0,i=-1,u=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:u!==1&&(u=1):i>-1&&(u=-1)}return i<0||n<0||u===0||u===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function iT(...e){let t=-1,n;for(;++t<e.length;)Ju(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":uT(n)}function uT(e){Ju(e);const t=e.codePointAt(0)===47;let n=sT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function sT(e,t){let n="",r=0,i=-1,u=0,s=-1,a,o;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||u===1))if(i!==s-1&&u===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,u=0;continue}}else if(n.length>0){n="",r=0,i=s,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,u=0}else a===46&&u>-1?u++:u=-1}return n}function Ju(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const aT={cwd:oT};function oT(){return"/"}function Ll(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lT(e){if(typeof e=="string")e=new URL(e);else if(!Ll(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return cT(e)}function cT(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const oo=["history","path","basename","stem","extname","dirname"];class dT{constructor(t){let n;t?Ll(t)?n={path:t}:typeof t=="string"||fT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":aT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oo.length;){const u=oo[r];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let i;for(i in n)oo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Xt.basename(this.path):void 0}set basename(t){co(t,"basename"),lo(t,"basename"),this.path=Xt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Xt.dirname(this.path):void 0}set dirname(t){ah(this.basename,"dirname"),this.path=Xt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Xt.extname(this.path):void 0}set extname(t){if(lo(t,"extname"),ah(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Xt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ll(t)&&(t=lT(t)),co(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Xt.basename(this.path,this.extname):void 0}set stem(t){co(t,"stem"),lo(t,"stem"),this.path=Xt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new kt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function lo(e,t){if(e&&e.includes(Xt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Xt.sep+"`")}function co(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ah(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function fT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hT=(function(e){const r=this.constructor.prototype,i=r[e],u=function(){return i.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),pT={}.hasOwnProperty;class Fc extends hT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=$3()}copy(){const t=new Fc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ao(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(po("data",this.frozen),this.namespace[t]=n,this):pT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(po("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ys(t),r=this.parser||this.Parser;return fo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),fo("process",this.parser||this.Parser),ho("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(u,s){const a=ys(t),o=r.parse(a);r.run(o,a,function(c,d,f){if(c||!d||!f)return l(c);const p=d,m=r.stringify(p,f);AT(m)?f.value=m:f.result=m,l(c,f)});function l(c,d){c||!d?s(c):u?u(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),fo("processSync",this.parser||this.Parser),ho("processSync",this.compiler||this.Compiler),this.process(t,i),lh("processSync","process",n),r;function i(u,s){n=!0,uh(u),r=s}}run(t,n,r){oh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?u(void 0,r):new Promise(u);function u(s,a){const o=ys(n);i.run(t,o,l);function l(c,d,f){const p=d||t;c?a(c):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,u),lh("runSync","run",r),i;function u(s,a){uh(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=ys(n),i=this.compiler||this.Compiler;return ho("stringify",i),oh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(po("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...d]=l;o(c,d)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=ao(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const d=l[c];u(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,c){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===l){f=d;break}if(f===-1)r.push([l,...c]);else if(c.length>0){let[p,...m]=c;const A=r[f][1];vl(A)&&vl(p)&&(p=ao(!0,A,p)),r[f]=[l,p,...m]}}}}const Pl=new Fc().freeze();function fo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ho(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function po(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function oh(e){if(!vl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function lh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ys(e){return mT(e)?e:new dT(e)}function mT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function AT(e){return typeof e=="string"||gT(e)}function gT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Ge(e){this.content=e}Ge.prototype={constructor:Ge,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),u=r.content.slice();return i==-1?u.push(n||e,t):(u[i+1]=t,n&&(u[i]=n)),new Ge(u)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Ge(n)},addToStart:function(e,t){return new Ge([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Ge(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),u=r.find(e);return i.splice(u==-1?i.length:u,0,t,n),new Ge(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Ge.from(e),e.size?new Ge(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Ge.from(e),e.size?new Ge(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Ge.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Ge.from=function(e){if(e instanceof Ge)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ge(t)};function Hm(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),u=t.child(r);if(i==u){n+=i.nodeSize;continue}if(!i.sameMarkup(u))return n;if(i.isText&&i.text!=u.text){for(let s=0;i.text[s]==u.text[s];s++)n++;return n}if(i.content.size||u.content.size){let s=Hm(i.content,u.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function Um(e,t,n,r){for(let i=e.childCount,u=t.childCount;;){if(i==0||u==0)return i==u?null:{a:n,b:r};let s=e.child(--i),a=t.child(--u),o=s.nodeSize;if(s==a){n-=o,r-=o;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let l=0,c=Math.min(s.text.length,a.text.length);for(;l<c&&s.text[s.text.length-l-1]==a.text[a.text.length-l-1];)l++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let l=Um(s.content,a.content,n-1,r-1);if(l)return l}n-=o,r-=o}}class H{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,u){for(let s=0,a=0;a<n;s++){let o=this.content[s],l=a+o.nodeSize;if(l>t&&r(o,i+a,u||null,s)!==!1&&o.content.size){let c=a+1;o.nodesBetween(Math.max(0,t-c),Math.min(o.content.size,n-c),r,i+c)}a=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let u="",s=!0;return this.nodesBetween(t,n,(a,o)=>{let l=a.isText?a.text.slice(Math.max(t,o)-o,n-o):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&l||a.isTextblock)&&r&&(s?s=!1:u+=r),u+=l},0),u}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),u=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),u=1);u<t.content.length;u++)i.push(t.content[u]);return new H(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let u=0,s=0;s<n;u++){let a=this.content[u],o=s+a.nodeSize;o>t&&((s<t||o>n)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=o}return new H(r,i)}cutByIndex(t,n){return t==n?H.empty:t==0&&n==this.content.length?this:new H(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),u=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new H(i,u)}addToStart(t){return new H([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new H(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return Hm(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return Um(this,t,n,r)}findIndex(t){if(t==0)return Ts(0,t);if(t==this.size)return Ts(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),u=r+i.nodeSize;if(u>=t)return u==t?Ts(n+1,u):Ts(n,r);r=u}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return H.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new H(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return H.empty;let n,r=0;for(let i=0;i<t.length;i++){let u=t[i];r+=u.nodeSize,i&&u.isText&&t[i-1].sameMarkup(u)?(n||(n=t.slice(0,i)),n[n.length-1]=u.withText(n[n.length-1].text+u.text)):n&&n.push(u)}return new H(n||t,r)}static from(t){if(!t)return H.empty;if(t instanceof H)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new H([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}H.empty=new H([],0);const mo={index:0,offset:0};function Ts(e,t){return mo.index=e,mo.offset=t,mo}function ea(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!ea(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!ea(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class ge{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let u=t[i];if(this.eq(u))return t;if(this.type.excludes(u.type))n||(n=t.slice(0,i));else{if(u.type.excludes(this.type))return t;!r&&u.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(u)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&ea(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return ge.none;if(t instanceof ge)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}ge.none=[];class ta extends Error{}class Y{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Km(this.content,t+this.openStart,n);return r&&new Y(r,this.openStart,this.openEnd)}removeBetween(t,n){return new Y(Wm(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return Y.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Y(H.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let u=t.firstChild;u&&!u.isLeaf&&(n||!u.type.spec.isolating);u=u.firstChild)r++;for(let u=t.lastChild;u&&!u.isLeaf&&(n||!u.type.spec.isolating);u=u.lastChild)i++;return new Y(t,r,i)}}Y.empty=new Y(H.empty,0,0);function Wm(e,t,n){let{index:r,offset:i}=e.findIndex(t),u=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||u.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,u.copy(Wm(u.content,t-i-1,n-i-1)))}function Km(e,t,n,r){let{index:i,offset:u}=e.findIndex(t),s=e.maybeChild(i);if(u==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=Km(s.content,t-u-1,n,s);return a&&e.replaceChild(i,s.copy(a))}function bT(e,t,n){if(n.openStart>e.depth)throw new ta("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ta("Inconsistent open depths");return zm(e,t,n,0)}function zm(e,t,n,r){let i=e.index(r),u=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=zm(e,t,n,r+1);return u.copy(u.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let s=e.parent,a=s.content;return xr(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=ET(n,e);return xr(u,Ym(e,s,a,t,r))}else return xr(u,na(e,t,r))}function Qm(e,t){if(!t.type.compatibleContent(e.type))throw new ta("Cannot join "+t.type.name+" onto "+e.type.name)}function Fl(e,t,n){let r=e.node(n);return Qm(r,t.node(n)),r}function kr(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function eu(e,t,n,r){let i=(t||e).node(n),u=0,s=t?t.index(n):i.childCount;e&&(u=e.index(n),e.depth>n?u++:e.textOffset&&(kr(e.nodeAfter,r),u++));for(let a=u;a<s;a++)kr(i.child(a),r);t&&t.depth==n&&t.textOffset&&kr(t.nodeBefore,r)}function xr(e,t){return e.type.checkContent(t),e.copy(t)}function Ym(e,t,n,r,i){let u=e.depth>i&&Fl(e,t,i+1),s=r.depth>i&&Fl(n,r,i+1),a=[];return eu(null,e,i,a),u&&s&&t.index(i)==n.index(i)?(Qm(u,s),kr(xr(u,Ym(e,t,n,r,i+1)),a)):(u&&kr(xr(u,na(e,t,i+1)),a),eu(t,n,i,a),s&&kr(xr(s,na(n,r,i+1)),a)),eu(r,null,i,a),new H(a)}function na(e,t,n){let r=[];if(eu(null,e,n,r),e.depth>n){let i=Fl(e,t,n+1);kr(xr(i,na(e,t,n+1)),r)}return eu(t,null,n,r),new H(r)}function ET(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let u=n-1;u>=0;u--)i=t.node(u).copy(H.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class gu{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let u=0;u<t;u++)i+=r.child(u).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return ge.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let u=r.marks;for(var s=0;s<u.length;s++)u[s].type.spec.inclusive===!1&&(!i||!u[s].isInSet(i.marks))&&(u=u[s--].removeFromSet(u));return u}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var u=0;u<r.length;u++)r[u].type.spec.inclusive===!1&&(!i||!r[u].isInSet(i.marks))&&(r=r[u--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new qm(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,u=n;for(let s=t;;){let{index:a,offset:o}=s.content.findIndex(u),l=u-o;if(r.push(s,a,i+o),!l||(s=s.child(a),s.isText))break;u=l-1,i+=o+1}return new gu(n,r,u)}static resolveCached(t,n){let r=ch.get(t);if(r)for(let u=0;u<r.elts.length;u++){let s=r.elts[u];if(s.pos==n)return s}else ch.set(t,r=new yT);let i=r.elts[r.i]=gu.resolve(t,n);return r.i=(r.i+1)%TT,i}}class yT{constructor(){this.elts=[],this.i=0}}const TT=12,ch=new WeakMap;class qm{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const CT=Object.create(null);let In=class Hl{constructor(t,n,r,i=ge.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||H.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&ea(this.attrs,n||t.defaultAttrs||CT)&&ge.sameSet(this.marks,r||ge.none)}copy(t=null){return t==this.content?this:new Hl(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Hl(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return Y.empty;let i=this.resolve(t),u=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,u.pos-a);return new Y(l,i.depth-s,u.depth-s)}replace(t,n,r){return bT(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return gu.resolveCached(this,t)}resolveNoCache(t){return gu.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,u=>(r.isInSet(u.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),Gm(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=H.empty,i=0,u=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,u),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let o=i;o<u;o++)if(!this.type.allowsMarks(r.child(o).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let u=this.contentMatchAt(t).matchType(r),s=u&&u.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=ge.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!ge.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=H.fromJSON(t,n.content),u=t.nodeType(n.type).create(n.attrs,i,r);return u.type.checkAttrs(u.attrs),u}};In.prototype.text=void 0;class ra extends In{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Gm(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new ra(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new ra(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function Gm(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Br{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new kT(t,n);if(r.next==null)return Br.empty;let i=Vm(r);r.next&&r.err("Unexpected trailing text");let u=_T(DT(i));return OT(u,r),u}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let u=n;i&&u<r;u++)i=i.matchType(t.child(u).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function u(s,a){let o=s.matchFragment(t,r);if(o&&(!n||o.validEnd))return H.from(a.map(l=>l.createAndFill()));for(let l=0;l<s.next.length;l++){let{type:c,next:d}=s.next[l];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=u(d,a.concat(c));if(f)return f}}return null}return u(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),u=i.match;if(u.matchType(t)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<u.next.length;s++){let{type:a,next:o}=u.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||o.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let u=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)u+=(s?", ":"")+r.next[s].type.name+"->"+t.indexOf(r.next[s].next);return u}).join(`
35
+ `)}}Br.empty=new Br(!0);class kT{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function Vm(e){let t=[];do t.push(xT(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function xT(e){let t=[];do t.push(wT(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function wT(e){let t=NT(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=IT(e,t);else break;return t}function dh(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function IT(e,t){let n=dh(e),r=n;return e.eat(",")&&(e.next!="}"?r=dh(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function ST(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let u in n){let s=n[u];s.isInGroup(t)&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function NT(e){if(e.eat("(")){let t=Vm(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=ST(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function DT(e){let t=[[]];return i(u(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,o){let l={term:o,to:a};return t[s].push(l),l}function i(s,a){s.forEach(o=>o.to=a)}function u(s,a){if(s.type=="choice")return s.exprs.reduce((o,l)=>o.concat(u(l,a)),[]);if(s.type=="seq")for(let o=0;;o++){let l=u(s.exprs[o],a);if(o==s.exprs.length-1)return l;i(l,a=n())}else if(s.type=="star"){let o=n();return r(a,o),i(u(s.expr,o),o),[r(o)]}else if(s.type=="plus"){let o=n();return i(u(s.expr,a),o),i(u(s.expr,o),o),[r(o)]}else{if(s.type=="opt")return[r(a)].concat(u(s.expr,a));if(s.type=="range"){let o=a;for(let l=0;l<s.min;l++){let c=n();i(u(s.expr,o),c),o=c}if(s.max==-1)i(u(s.expr,o),o);else for(let l=s.min;l<s.max;l++){let c=n();r(o,c),i(u(s.expr,o),c),o=c}return[r(o)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Jm(e,t){return t-e}function fh(e,t){let n=[];return r(t),n.sort(Jm);function r(i){let u=e[i];if(u.length==1&&!u[0].term)return r(u[0].to);n.push(i);for(let s=0;s<u.length;s++){let{term:a,to:o}=u[s];!a&&n.indexOf(o)==-1&&r(o)}}}function _T(e){let t=Object.create(null);return n(fh(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:o})=>{if(!a)return;let l;for(let c=0;c<i.length;c++)i[c][0]==a&&(l=i[c][1]);fh(e,o).forEach(c=>{l||i.push([a,l=[]]),l.indexOf(c)==-1&&l.push(c)})})});let u=t[r.join(",")]=new Br(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(Jm);u.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return u}}function OT(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],u=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:o,next:l}=i.next[a];s.push(o.name),u&&!(o.isText||o.hasRequiredAttrs())&&(u=!1),r.indexOf(l)==-1&&r.push(l)}u&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function jm(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Zm(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let u=e[r];if(u.hasDefault)i=u.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Xm(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let u=e[i];u.validate&&u.validate(t[i])}}function $m(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new MT(e,r,t[r]);return n}let ia=class e1{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=$m(t,r.attrs),this.defaultAttrs=jm(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Br.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Zm(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new In(this,this.computeAttrs(t),H.from(n),ge.setFrom(r))}createChecked(t=null,n,r){return n=H.from(n),this.checkContent(n),new In(this,this.computeAttrs(t),n,ge.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=H.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),u=i&&i.fillBefore(H.empty,!0);return u?new In(this,t,n.append(u),ge.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){Xm(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:ge.none:t}static compile(t,n){let r=Object.create(null);t.forEach((u,s)=>r[u]=new e1(u,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let u in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function RT(e,t,n){let r=n.split("|");return i=>{let u=i===null?"null":typeof i;if(r.indexOf(u)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${u}`)}}class MT{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?RT(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ra{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=$m(t,i.attrs),this.excluded=null;let u=jm(this.attrs);this.instance=u?new ge(this,u):null}create(t=null){return!t&&this.instance?this.instance:new ge(this,Zm(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((u,s)=>r[u]=new Ra(u,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){Xm(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class BT{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=Ge.from(t.nodes),n.marks=Ge.from(t.marks||{}),this.nodes=ia.compile(this.spec.nodes,this),this.marks=Ra.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let u=this.nodes[i],s=u.spec.content||"",a=u.spec.marks;if(u.contentMatch=r[s]||(r[s]=Br.parse(s,this.nodes)),u.inlineContent=u.contentMatch.inlineContent,u.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!u.isInline||!u.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=u}u.markSet=a=="_"?null:a?hh(this,a.split(" ")):a==""||!u.inlineContent?[]:null}for(let i in this.marks){let u=this.marks[i],s=u.spec.excludes;u.excluded=s==null?[u]:s==""?[]:hh(this,s.split(" "))}this.nodeFromJSON=i=>In.fromJSON(this,i),this.markFromJSON=i=>ge.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof ia){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new ra(r,r.defaultAttrs,t,ge.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function hh(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],u=e.marks[i],s=u;if(u)n.push(u);else for(let a in e.marks){let o=e.marks[a];(i=="_"||o.spec.group&&o.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=o)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function vT(e){return e.tag!=null}function LT(e){return e.style!=null}let Hc=class Ul{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(vT(i))this.tags.push(i);else if(LT(i)){let u=/[^=]*/.exec(i.style)[0];r.indexOf(u)<0&&r.push(u),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let u=t.nodes[i.node];return u.contentMatch.matchType(u)})}parse(t,n={}){let r=new mh(this,n,!1);return r.addAll(t,ge.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new mh(this,n,!0);return r.addAll(t,ge.none,n.from,n.to),Y.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let u=this.tags[i];if(HT(t,u.tag)&&(u.namespace===void 0||t.namespaceURI==u.namespace)&&(!u.context||n.matchesContext(u.context))){if(u.getAttrs){let s=u.getAttrs(t);if(s===!1)continue;u.attrs=s||void 0}return u}}}matchStyle(t,n,r,i){for(let u=i?this.styles.indexOf(i)+1:0;u<this.styles.length;u++){let s=this.styles[u],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let o=s.getAttrs(n);if(o===!1)continue;s.attrs=o||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let u=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<u)break}n.splice(s,0,i)}for(let i in t.marks){let u=t.marks[i].spec.parseDOM;u&&u.forEach(s=>{r(s=Ah(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let u=t.nodes[i].spec.parseDOM;u&&u.forEach(s=>{r(s=Ah(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Ul(t,Ul.schemaRules(t)))}};const t1={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},PT={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},n1={ol:!0,ul:!0},bu=1,Wl=2,tu=4;function ph(e,t,n){return t!=null?(t?bu:0)|(t==="full"?Wl:0):e&&e.whitespace=="pre"?bu|Wl:n&~tu}class Cs{constructor(t,n,r,i,u,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=ge.none,this.match=u||(s&tu?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(H.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&bu)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let u=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=u.withText(u.text.slice(0,u.text.length-i[0].length))}}let n=H.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(H.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!t1.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class mh{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,u,s=ph(null,n.preserveWhitespace,0)|(r?tu:0);i?u=new Cs(i.type,i.attrs,ge.none,!0,n.topMatch||i.type.contentMatch,s):r?u=new Cs(null,null,ge.none,!0,null,s):u=new Cs(t.schema.topNodeType,null,ge.none,!0,null,s),this.nodes=[u],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,u=i.options&Wl?"full":this.localPreserveWS||(i.options&bu)>0,{schema:s}=this.parser;if(u==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(u)if(u==="full")r=r.replace(/\r\n?/g,`
36
+ `);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let o=0;o<a.length;o++)o&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[o]&&this.insertNode(s.text(a[o]),n,!/\S/.test(a[o]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],o=t.previousSibling;(!a||o&&o.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,u=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;n1.hasOwnProperty(s)&&this.parser.normalizeLists&&FT(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(o?o.ignore:PT.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let l,c=this.needsBlock;if(t1.hasOwnProperty(s))u.content.length&&u.content[0].isInline&&this.open&&(this.open--,u=this.top),l=!0,u.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=o&&o.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),l&&this.sync(u),this.needsBlock=c}else{let l=this.readStyles(t,n);l&&this.addElementByRule(t,o,l,o.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
37
+ `),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let u=this.parser.matchedStyles[i],s=r.getPropertyValue(u);if(s)for(let a=void 0;;){let o=this.parser.matchStyle(u,s,this,a);if(!o)break;if(o.ignore)return null;if(o.clearMark?n=n.filter(l=>!o.clearMark(l)):n=n.concat(this.parser.schema.marks[o.mark].create(o.attrs)),o.consuming===!1)a=o;else break}}return n}addElementByRule(t,n,r,i){let u,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let o=this.enter(s,n.attrs||null,r,n.preserveWhitespace);o&&(u=!0,r=o)}else{let o=this.parser.schema.marks[n.mark];r=r.concat(o.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(o=>this.insertNode(o,r,!1));else{let o=t;typeof n.contentElement=="string"?o=t.querySelector(n.contentElement):typeof n.contentElement=="function"?o=n.contentElement(t):n.contentElement&&(o=n.contentElement),this.findAround(t,o,!0),this.addAll(o,r),this.findAround(t,o,!1)}u&&this.sync(a)&&this.open--}addAll(t,n,r,i){let u=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++u)this.findAtPoint(t,u),this.addDOM(s,n);this.findAtPoint(t,u)}findPlace(t,n,r){let i,u;for(let s=this.open,a=0;s>=0;s--){let o=this.nodes[s],l=o.findWrapping(t);if(l&&(!i||i.length>l.length+a)&&(i=l,u=o,!l.length))break;if(o.solid){if(r)break;a+=2}}if(!i)return null;this.sync(u);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let u=this.textblockFromContext();u&&(n=this.enterInner(u,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let u=this.top;u.match&&(u.match=u.match.matchType(t.type));let s=ge.none;for(let a of i.concat(t.marks))(u.type?u.type.allowsMarkType(a.type):gh(a.type,t.type))&&(s=a.addToSet(s));return u.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let u=this.findPlace(t.create(n),r,!1);return u&&(u=this.enterInner(t,n,r,!0,i)),u}enterInner(t,n,r,i=!1,u){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=ph(t,u,s.options);s.options&tu&&s.content.length==0&&(a|=tu);let o=ge.none;return r=r.filter(l=>(s.type?s.type.allowsMarkType(l.type):gh(l.type,t))?(o=l.addToSet(o),!1):!0),this.nodes.push(new Cs(t,n,o,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=bu)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),u=-(r?r.depth+1:0)+(i?0:1),s=(a,o)=>{for(;a>=0;a--){let l=n[a];if(l==""){if(a==n.length-1||a==0)continue;for(;o>=u;o--)if(s(a-1,o))return!0;return!1}else{let c=o>0||o==0&&i?this.nodes[o].type:r&&o>=u?r.node(o-u).type:null;if(!c||c.name!=l&&!c.isInGroup(l))return!1;o--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function FT(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&n1.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function HT(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Ah(e){let t={};for(let n in e)t[n]=e[n];return t}function gh(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let u=[],s=a=>{u.push(a);for(let o=0;o<a.edgeCount;o++){let{type:l,next:c}=a.edge(o);if(l==t||u.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class ar{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Ao(n).createDocumentFragment());let i=r,u=[];return t.forEach(s=>{if(u.length||s.marks.length){let a=0,o=0;for(;a<u.length&&o<s.marks.length;){let l=s.marks[o];if(!this.marks[l.type.name]){o++;continue}if(!l.eq(u[a][0])||l.type.spec.spanning===!1)break;a++,o++}for(;a<u.length;)i=u.pop()[1];for(;o<s.marks.length;){let l=s.marks[o++],c=this.serializeMark(l,s.isInline,n);c&&(u.push([l,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=Ps(Ao(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let u=this.serializeMark(t.marks[i],t.isInline,n);u&&((u.contentDOM||u.dom).appendChild(r),r=u.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&Ps(Ao(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return Ps(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ar(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=bh(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return bh(t.marks)}}function bh(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Ao(e){return e.document||window.document}const Eh=new WeakMap;function UT(e){let t=Eh.get(e);return t===void 0&&Eh.set(e,t=WT(e)),t}function WT(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function Ps(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],u;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(u=UT(r))&&u.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let a,o=n?e.createElementNS(n,i):e.createElement(i),l=t[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let d in l)if(l[d]!=null){let f=d.indexOf(" ");f>0?o.setAttributeNS(d.slice(0,f),d.slice(f+1),l[d]):d=="style"&&o.style?o.style.cssText=l[d]:o.setAttribute(d,l[d])}}for(let d=c;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:o,contentDOM:o}}else{let{dom:p,contentDOM:m}=Ps(e,f,n,r);if(o.appendChild(p),m){if(a)throw new RangeError("Multiple content holes");a=m}}}return{dom:o,contentDOM:a}}const r1=65535,i1=Math.pow(2,16);function KT(e,t){return e+t*i1}function yh(e){return e&r1}function zT(e){return(e-(e&r1))/i1}const u1=1,s1=2,Fs=4,a1=8;class Kl{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&a1)>0}get deletedBefore(){return(this.delInfo&(u1|Fs))>0}get deletedAfter(){return(this.delInfo&(s1|Fs))>0}get deletedAcross(){return(this.delInfo&Fs)>0}}class St{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&St.empty)return St.empty}recover(t){let n=0,r=yh(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+zT(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,u=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let o=this.ranges[a]-(this.inverted?i:0);if(o>t)break;let l=this.ranges[a+u],c=this.ranges[a+s],d=o+l;if(t<=d){let f=l?t==o?-1:t==d?1:n:n,p=o+i+(f<0?0:c);if(r)return p;let m=t==(n<0?o:d)?null:KT(a/3,t-o),A=t==o?s1:t==d?u1:Fs;return(n<0?t!=o:t!=d)&&(A|=a1),new Kl(p,A,m)}i+=c-l}return r?t+i:new Kl(t+i,0,null)}touches(t,n){let r=0,i=yh(n),u=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let o=this.ranges[a]-(this.inverted?r:0);if(o>t)break;let l=this.ranges[a+u],c=o+l;if(t<=c&&a==i*3)return!0;r+=this.ranges[a+s]-l}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,u=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?u:0),o=s+(this.inverted?0:u),l=this.ranges[i+n],c=this.ranges[i+r];t(a,a+l,o,o+c),u+=c-l}}invert(){return new St(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?St.empty:new St(t<0?[0,-t,0]:[0,0,t])}}St.empty=new St([]);class ua{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new ua(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new ua;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let u=this.from;u<this.to;u++){let s=this._maps[u],a=s.mapResult(t,n);if(a.recover!=null){let o=this.getMirror(u);if(o!=null&&o>u&&o<this.to){u=o,t=this._maps[o].recover(a.recover);continue}}i|=a.delInfo,t=a.pos}return r?t:new Kl(t,i,null)}}const go=Object.create(null);class rt{getMap(){return St.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=go[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in go)throw new RangeError("Duplicate use of step JSON ID "+t);return go[t]=n,n.prototype.jsonID=t,n}}class Fe{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Fe(t,null)}static fail(t){return new Fe(null,t)}static fromReplace(t,n,r,i){try{return Fe.ok(t.replace(n,r,i))}catch(u){if(u instanceof ta)return Fe.fail(u.message);throw u}}}function Uc(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let u=e.child(i);u.content.size&&(u=u.copy(Uc(u.content,t,u))),u.isInline&&(u=t(u,n,i)),r.push(u)}return H.fromArray(r)}class xn extends rt{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),u=new Y(Uc(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return Fe.fromReplace(t,this.from,this.to,u)}invert(){return new nn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new xn(n.pos,r.pos,this.mark)}merge(t){return t instanceof xn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new xn(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new xn(n.from,n.to,t.markFromJSON(n.mark))}}rt.jsonID("addMark",xn);class nn extends rt{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new Y(Uc(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return Fe.fromReplace(t,this.from,this.to,r)}invert(){return new xn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new nn(n.pos,r.pos,this.mark)}merge(t){return t instanceof nn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new nn(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new nn(n.from,n.to,t.markFromJSON(n.mark))}}rt.jsonID("removeMark",nn);class qn extends rt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Fe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Fe.fromReplace(t,this.pos,this.pos+1,new Y(H.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new qn(this.pos,n.marks[i]);return new qn(this.pos,this.mark)}}return new vr(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new qn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new qn(n.pos,t.markFromJSON(n.mark))}}rt.jsonID("addNodeMark",qn);class vr extends rt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Fe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Fe.fromReplace(t,this.pos,this.pos+1,new Y(H.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new qn(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new vr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new vr(n.pos,t.markFromJSON(n.mark))}}rt.jsonID("removeNodeMark",vr);class Pe extends rt{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&zl(t,this.from,this.to)?Fe.fail("Structure replace would overwrite content"):Fe.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new St([this.from,this.to-this.from,this.slice.size])}invert(t){return new Pe(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&Pe.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new Pe(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof Pe)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?Y.empty:new Y(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Pe(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?Y.empty:new Y(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Pe(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Pe(n.from,n.to,Y.fromJSON(t,n.slice),!!n.structure)}}Pe.MAP_BIAS=1;rt.jsonID("replace",Pe);class tt extends rt{constructor(t,n,r,i,u,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=u,this.insert=s,this.structure=a}apply(t){if(this.structure&&(zl(t,this.from,this.gapFrom)||zl(t,this.gapTo,this.to)))return Fe.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Fe.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Fe.fromReplace(t,this.from,this.to,r):Fe.fail("Content does not fit in gap")}getMap(){return new St([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new tt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),u=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||u>r.pos?null:new tt(n.pos,r.pos,i,u,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new tt(n.from,n.to,n.gapFrom,n.gapTo,Y.fromJSON(t,n.slice),n.insert,!!n.structure)}}rt.jsonID("replaceAround",tt);function zl(e,t,n){let r=e.resolve(t),i=n-t,u=r.depth;for(;i>0&&u>0&&r.indexAfter(u)==r.node(u).childCount;)u--,i--;if(i>0){let s=r.node(u).maybeChild(r.indexAfter(u));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function QT(e,t,n,r){let i=[],u=[],s,a;e.doc.nodesBetween(t,n,(o,l,c)=>{if(!o.isInline)return;let d=o.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(l,t),p=Math.min(l+o.nodeSize,n),m=r.addToSet(d);for(let A=0;A<d.length;A++)d[A].isInSet(m)||(s&&s.to==f&&s.mark.eq(d[A])?s.to=p:i.push(s=new nn(f,p,d[A])));a&&a.to==f?a.to=p:u.push(a=new xn(f,p,r))}}),i.forEach(o=>e.step(o)),u.forEach(o=>e.step(o))}function YT(e,t,n,r){let i=[],u=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;u++;let o=null;if(r instanceof Ra){let l=s.marks,c;for(;c=r.isInSet(l);)(o||(o=[])).push(c),l=c.removeFromSet(l)}else r?r.isInSet(s.marks)&&(o=[r]):o=s.marks;if(o&&o.length){let l=Math.min(a+s.nodeSize,n);for(let c=0;c<o.length;c++){let d=o[c],f;for(let p=0;p<i.length;p++){let m=i[p];m.step==u-1&&d.eq(i[p].style)&&(f=m)}f?(f.to=l,f.step=u):i.push({style:d,from:Math.max(a,t),to:l,step:u})}}}),i.forEach(s=>e.step(new nn(s.from,s.to,s.style)))}function Wc(e,t,n,r=n.contentMatch,i=!0){let u=e.doc.nodeAt(t),s=[],a=t+1;for(let o=0;o<u.childCount;o++){let l=u.child(o),c=a+l.nodeSize,d=r.matchType(l.type);if(!d)s.push(new Pe(a,c,Y.empty));else{r=d;for(let f=0;f<l.marks.length;f++)n.allowsMarkType(l.marks[f].type)||e.step(new nn(a,c,l.marks[f]));if(i&&l.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,m;for(;f=p.exec(l.text);)m||(m=new Y(H.from(n.schema.text(" ",n.allowedMarks(l.marks))),0,0)),s.push(new Pe(a+f.index,a+f.index+f[0].length,m))}}a=c}if(!r.validEnd){let o=r.fillBefore(H.empty,!0);e.replace(a,a,new Y(o,0,0))}for(let o=s.length-1;o>=0;o--)e.step(s[o])}function qT(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ma(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,i=0,u=0;;--r){let s=e.$from.node(r),a=e.$from.index(r)+i,o=e.$to.indexAfter(r)-u;if(r<e.depth&&s.canReplace(a,o,n))return r;if(r==0||s.type.spec.isolating||!qT(s,a,o))break;a&&(i=1),o<s.childCount&&(u=1)}return null}function GT(e,t,n){let{$from:r,$to:i,depth:u}=t,s=r.before(u+1),a=i.after(u+1),o=s,l=a,c=H.empty,d=0;for(let m=u,A=!1;m>n;m--)A||r.index(m)>0?(A=!0,c=H.from(r.node(m).copy(c)),d++):o--;let f=H.empty,p=0;for(let m=u,A=!1;m>n;m--)A||i.after(m+1)<i.end(m)?(A=!0,f=H.from(i.node(m).copy(f)),p++):l++;e.step(new tt(o,l,s,a,new Y(c.append(f),d,p),c.size-d,!0))}function Kc(e,t,n=null,r=e){let i=VT(e,t),u=i&&JT(r,t);return u?i.map(Th).concat({type:t,attrs:n}).concat(u.map(Th)):null}function Th(e){return{type:e,attrs:null}}function VT(e,t){let{parent:n,startIndex:r,endIndex:i}=e,u=n.contentMatchAt(r).findWrapping(t);if(!u)return null;let s=u.length?u[0]:t;return n.canReplaceWith(r,i,s)?u:null}function JT(e,t){let{parent:n,startIndex:r,endIndex:i}=e,u=n.child(r),s=t.contentMatch.findWrapping(u.type);if(!s)return null;let o=(s.length?s[s.length-1]:t).contentMatch;for(let l=r;o&&l<i;l++)o=o.matchType(n.child(l).type);return!o||!o.validEnd?null:s}function jT(e,t,n){let r=H.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=H.from(n[s].type.create(n[s].attrs,r))}let i=t.start,u=t.end;e.step(new tt(i,u,i,u,new Y(r,0,0),n.length,!0))}function ZT(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let u=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let o=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,o)&&XT(e.doc,e.mapping.slice(u).map(a),r)){let l=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?l=!1:!p&&m&&(l=!0)}l===!1&&l1(e,s,a,u),Wc(e,e.mapping.slice(u).map(a,1),r,void 0,l===null);let c=e.mapping.slice(u),d=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new tt(d,f,d+1,f-1,new Y(H.from(r.create(o,null,s.marks)),0,0),1,!0)),l===!0&&o1(e,s,a,u),!1}})}function o1(e,t,n,r){t.forEach((i,u)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let o=e.mapping.slice(r).map(n+1+u+s.index);e.replaceWith(o,o+1,t.type.schema.linebreakReplacement.create())}}})}function l1(e,t,n,r){t.forEach((i,u)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+u);e.replaceWith(s,s+1,t.type.schema.text(`
38
+ `))}})}function XT(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function $T(e,t,n,r,i){let u=e.doc.nodeAt(t);if(!u)throw new RangeError("No node at given position");n||(n=u.type);let s=n.create(r,null,i||u.marks);if(u.isLeaf)return e.replaceWith(t,t+u.nodeSize,s);if(!n.validContent(u.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new tt(t,t+u.nodeSize,t+1,t+u.nodeSize-1,new Y(H.from(s),0,0),1,!0))}function nu(e,t,n=1,r){let i=e.resolve(t),u=i.depth-n,s=r&&r[r.length-1]||i.parent;if(u<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let l=i.depth-1,c=n-2;l>u;l--,c--){let d=i.node(l),f=i.index(l);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),m=r&&r[c+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let A=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!A.type.validContent(p))return!1}let a=i.indexAfter(u),o=r&&r[0];return i.node(u).canReplaceWith(a,a,o?o.type:i.node(u+1).type)}function eC(e,t,n=1,r){let i=e.doc.resolve(t),u=H.empty,s=H.empty;for(let a=i.depth,o=i.depth-n,l=n-1;a>o;a--,l--){u=H.from(i.node(a).copy(u));let c=r&&r[l];s=H.from(c?c.type.create(c.attrs,s):i.node(a).copy(s))}e.step(new Pe(t,t,new Y(u.append(s),n,n),!0))}function Ba(e,t){let n=e.resolve(t),r=n.index();return nC(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function tC(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let u=t.child(i),s=u.type==r?e.type.schema.nodes.text:u.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(u.marks))return!1}return n.validEnd}function nC(e,t){return!!(e&&t&&!e.isLeaf&&tC(e,t))}function rC(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,u=e.doc.resolve(t-n),s=u.node().type;if(i&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(i);c&&!d?r=!1:!c&&d&&(r=!0)}let a=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);l1(e,c.node(),c.before(),a)}s.inlineContent&&Wc(e,t+n-1,s,u.node().contentMatchAt(u.index()),r==null);let o=e.mapping.slice(a),l=o.map(t-n);if(e.step(new Pe(l,o.map(t+n,-1),Y.empty,!0)),r===!0){let c=e.doc.resolve(l);o1(e,c.node(),c.before(),e.steps.length)}return e}function iC(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let u=r.index(i);if(r.node(i).canReplaceWith(u,u,n))return r.before(i+1);if(u>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let u=r.indexAfter(i);if(r.node(i).canReplaceWith(u,u,n))return r.after(i+1);if(u<r.node(i).childCount)return null}return null}function uC(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let u=0;u<n.openStart;u++)i=i.firstChild.content;for(let u=1;u<=(n.openStart==0&&n.size?2:1);u++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,o=r.index(s)+(a>0?1:0),l=r.node(s),c=!1;if(u==1)c=l.canReplace(o,o,i);else{let d=l.contentMatchAt(o).findWrapping(i.firstChild.type);c=d&&l.canReplaceWith(o,o,d[0])}if(c)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function va(e,t,n=t,r=Y.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),u=e.resolve(n);return c1(i,u,r)?new Pe(t,n,r):new sC(i,u,r).fit()}function c1(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class sC{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=H.empty;for(let i=0;i<=t.depth;i++){let u=t.node(i);this.frontier.push({type:u.type,match:u.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=H.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let l=this.findFittable();l?this.placeNodes(l):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let u=this.placed,s=r.depth,a=i.depth;for(;s&&a&&u.childCount==1;)u=u.firstChild.content,s--,a--;let o=new Y(u,s,a);return t>-1?new tt(r.pos,t,this.$to.pos,this.$to.end(),o,n):o.size||r.pos!=this.$to.pos?new Pe(r.pos,i.pos,o):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let u=n.firstChild;if(n.childCount>1&&(i=0),u.type.spec.isolating&&i<=r){t=r;break}n=u.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,u=null;r?(u=bo(this.unplaced.content,r-1).firstChild,i=u.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:o,match:l}=this.frontier[a],c,d=null;if(n==1&&(s?l.matchType(s.type)||(d=l.fillBefore(H.from(s),!1)):u&&o.compatibleContent(u.type)))return{sliceDepth:r,frontierDepth:a,parent:u,inject:d};if(n==2&&s&&(c=l.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:u,wrap:c};if(u&&l.matchType(u.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=bo(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new Y(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=bo(t,n);if(i.childCount<=1&&n>0){let u=t.size-n<=n+i.size;this.unplaced=new Y(Gi(t,n-1,1),n-1,u?n-1:r)}else this.unplaced=new Y(Gi(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:u}){for(;this.depth>n;)this.closeFrontierNode();if(u)for(let A=0;A<u.length;A++)this.openFrontierNode(u[A]);let s=this.unplaced,a=r?r.content:s.content,o=s.openStart-t,l=0,c=[],{match:d,type:f}=this.frontier[n];if(i){for(let A=0;A<i.childCount;A++)c.push(i.child(A));d=d.matchFragment(i)}let p=a.size+t-(s.content.size-s.openEnd);for(;l<a.childCount;){let A=a.child(l),E=d.matchType(A.type);if(!E)break;l++,(l>1||o==0||A.content.size)&&(d=E,c.push(d1(A.mark(f.allowedMarks(A.marks)),l==1?o:0,l==a.childCount?p:-1)))}let m=l==a.childCount;m||(p=-1),this.placed=Vi(this.placed,n,H.from(c)),this.frontier[n].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let A=0,E=a;A<p;A++){let g=E.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),E=g.content}this.unplaced=m?t==0?Y.empty:new Y(Gi(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new Y(Gi(s.content,t,l),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!Eo(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],u=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=Eo(t,n,i,r,u);if(s){for(let a=n-1;a>=0;a--){let{match:o,type:l}=this.frontier[a],c=Eo(t,a,l,o,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:u?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Vi(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),u=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,u)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Vi(this.placed,this.depth,H.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(H.empty,!0);n.childCount&&(this.placed=Vi(this.placed,this.frontier.length,n))}}function Gi(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Gi(e.firstChild.content,t-1,n)))}function Vi(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Vi(e.lastChild.content,t-1,n)))}function bo(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function d1(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,d1(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(H.empty,!0)))),e.copy(r)}function Eo(e,t,n,r,i){let u=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==u.childCount&&!n.compatibleContent(u.type))return null;let a=r.fillBefore(u.content,!0,s);return a&&!aC(n,u.content,s)?a:null}function aC(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function oC(e){return e.spec.defining||e.spec.definingForContent}function lC(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),u=e.doc.resolve(n);if(c1(i,u,r))return e.step(new Pe(t,n,r));let s=h1(i,u);s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let f=i.depth,p=i.pos-1;f>0;f--,p--){let m=i.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(f)>-1?a=f:i.before(f)==p&&s.splice(1,0,-f)}let o=s.indexOf(a),l=[],c=r.openStart;for(let f=r.content,p=0;;p++){let m=f.firstChild;if(l.push(m),p==r.openStart)break;f=m.content}for(let f=c-1;f>=0;f--){let p=l[f],m=oC(p.type);if(m&&!p.sameMarkup(i.node(Math.abs(a)-1)))c=f;else if(m||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),m=l[p];if(m)for(let A=0;A<s.length;A++){let E=s[(A+o)%s.length],g=!0;E<0&&(g=!1,E=-E);let N=i.node(E-1),w=i.index(E-1);if(N.canReplaceWith(w,w,m.type,m.marks))return e.replace(i.before(E),g?u.after(E):n,new Y(f1(r.content,0,r.openStart,p),p,r.openEnd))}}let d=e.steps.length;for(let f=s.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=s[f];p<0||(t=i.before(p),n=u.after(p))}}function f1(e,t,n,r,i){if(t<n){let u=e.firstChild;e=e.replaceChild(0,u.copy(f1(u.content,t+1,n,r,u)))}if(t>r){let u=i.contentMatchAt(0),s=u.fillBefore(e).append(e);e=s.append(u.matchFragment(s).fillBefore(H.empty,!0))}return e}function cC(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=iC(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new Y(H.from(r),0,0))}function dC(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let s=r.sharedDepth(n),a=!1;for(let o=r.depth;o>s;o--)r.node(o).type.spec.isolating&&(a=!0);for(let o=i.depth;o>s;o--)i.node(o).type.spec.isolating&&(a=!0);if(!a){for(let o=r.depth;o>0&&t==r.start(o);o--)t=r.before(o);for(let o=i.depth;o>0&&n==i.start(o);o--)n=i.before(o);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let u=h1(r,i);for(let s=0;s<u.length;s++){let a=u[s],o=s==u.length-1;if(o&&a==0||r.node(a).type.contentMatch.validEnd)return e.delete(r.start(a),i.end(a));if(a>0&&(o||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function h1(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let u=e.start(i);if(u<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(u==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==u-1)&&n.push(i)}return n}class ti extends rt{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Fe.fail("No node at attribute step's position");let r=Object.create(null);for(let u in n.attrs)r[u]=n.attrs[u];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Fe.fromReplace(t,this.pos,this.pos+1,new Y(H.from(i),0,n.isLeaf?0:1))}getMap(){return St.empty}invert(t){return new ti(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new ti(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new ti(n.pos,n.attr,n.value)}}rt.jsonID("attr",ti);class Eu extends rt{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return Fe.ok(r)}getMap(){return St.empty}invert(t){return new Eu(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Eu(n.attr,n.value)}}rt.jsonID("docAttr",Eu);let hi=class extends Error{};hi=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};hi.prototype=Object.create(Error.prototype);hi.prototype.constructor=hi;hi.prototype.name="TransformError";class p1{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new ua}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new hi(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(t=i.map(t,1),n=i.map(n,-1)),i.forEach((u,s,a,o)=>{t=Math.min(t,a),n=Math.max(n,o)})}return t==1e9?null:{from:t,to:n}}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=Y.empty){let i=va(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new Y(H.from(r),0,0))}delete(t,n){return this.replace(t,n,Y.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return lC(this,t,n,r),this}replaceRangeWith(t,n,r){return cC(this,t,n,r),this}deleteRange(t,n){return dC(this,t,n),this}lift(t,n){return GT(this,t,n),this}join(t,n=1){return rC(this,t,n),this}wrap(t,n){return jT(this,t,n),this}setBlockType(t,n=t,r,i=null){return ZT(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return $T(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new ti(t,n,r)),this}setDocAttribute(t,n){return this.step(new Eu(t,n)),this}addNodeMark(t,n){return this.step(new qn(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof ge)n.isInSet(r.marks)&&this.step(new vr(t,n));else{let i=r.marks,u,s=[];for(;u=n.isInSet(i);)s.push(new vr(t,u)),i=u.removeFromSet(i);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return eC(this,t,n,r),this}addMark(t,n,r){return QT(this,t,n,r),this}removeMark(t,n,r){return YT(this,t,n,r),this}clearIncompatible(t,n,r){return Wc(this,t,n,r),this}}const yo=Object.create(null);class se{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new m1(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=Y.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let u=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:o,$to:l}=s[a],c=t.mapping.slice(u);t.replaceRange(c.map(o.pos),c.map(l.pos),a?Y.empty:n),a==0&&xh(t,u,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let u=0;u<i.length;u++){let{$from:s,$to:a}=i[u],o=t.mapping.slice(r),l=o.map(s.pos),c=o.map(a.pos);u?t.deleteRange(l,c):(t.replaceRangeWith(l,c,n),xh(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new ae(t):Jr(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let u=t.depth-1;u>=0;u--){let s=n<0?Jr(t.node(0),t.node(u),t.before(u+1),t.index(u),n,r):Jr(t.node(0),t.node(u),t.after(u+1),t.index(u)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Dt(t.node(0))}static atStart(t){return Jr(t,t,0,0,1)||new Dt(t)}static atEnd(t){return Jr(t,t,t.content.size,t.childCount,-1)||new Dt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=yo[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in yo)throw new RangeError("Duplicate use of selection JSON ID "+t);return yo[t]=n,n.prototype.jsonID=t,n}getBookmark(){return ae.between(this.$anchor,this.$head).getBookmark()}}se.prototype.visible=!0;class m1{constructor(t,n){this.$from=t,this.$to=n}}let Ch=!1;function kh(e){!Ch&&!e.parent.inlineContent&&(Ch=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ae extends se{constructor(t,n=t){kh(t),kh(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return se.near(r);let i=t.resolve(n.map(this.anchor));return new ae(i.parent.inlineContent?i:r,r)}replace(t,n=Y.empty){if(super.replace(t,n),n==Y.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof ae&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new La(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ae(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let u=se.findFrom(n,r,!0)||se.findFrom(n,-r,!0);if(u)n=u.$head;else return se.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(se.findFrom(t,-r,!0)||se.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new ae(t,n)}}se.jsonID("text",ae);class La{constructor(t,n){this.anchor=t,this.head=n}map(t){return new La(t.map(this.anchor),t.map(this.head))}resolve(t){return ae.between(t.resolve(this.anchor),t.resolve(this.head))}}class ie extends se{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),u=t.resolve(i);return r?se.near(u):new ie(u)}content(){return new Y(H.from(this.node),0,0)}eq(t){return t instanceof ie&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new zc(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ie(t.resolve(n.anchor))}static create(t,n){return new ie(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}ie.prototype.visible=!1;se.jsonID("node",ie);class zc{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new La(r,r):new zc(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&ie.isSelectable(r)?new ie(n):se.near(n)}}class Dt extends se{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=Y.empty){if(n==Y.empty){t.delete(0,t.doc.content.size);let r=se.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new Dt(t)}map(t){return new Dt(t)}eq(t){return t instanceof Dt}getBookmark(){return fC}}se.jsonID("all",Dt);const fC={map(){return this},resolve(e){return new Dt(e)}};function Jr(e,t,n,r,i,u=!1){if(t.inlineContent)return ae.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let a=t.child(s);if(a.isAtom){if(!u&&ie.isSelectable(a))return ie.create(e,n-(i<0?a.nodeSize:0))}else{let o=Jr(e,a,n+i,i<0?a.childCount:0,i,u);if(o)return o}n+=a.nodeSize*i}return null}function xh(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Pe||i instanceof tt))return;let u=e.mapping.maps[r],s;u.forEach((a,o,l,c)=>{s==null&&(s=c)}),e.setSelection(se.near(e.doc.resolve(s),n))}const wh=1,ks=2,Ih=4;class hC extends p1{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|wh)&~ks,this.storedMarks=null,this}get selectionSet(){return(this.updated&wh)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=ks,this}ensureMarks(t){return ge.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&ks)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~ks,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ge.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let u=this.storedMarks;if(!u){let s=this.doc.resolve(n);u=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,u)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(se.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Ih,this}get scrolledIntoView(){return(this.updated&Ih)>0}}function Sh(e,t){return!t||!e?e:e.bind(t)}class Ji{constructor(t,n,r){this.name=t,this.init=Sh(n.init,r),this.apply=Sh(n.apply,r)}}const pC=[new Ji("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Ji("selection",{init(e,t){return e.selection||se.atStart(t.doc)},apply(e){return e.selection}}),new Ji("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Ji("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class To{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=pC.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ji(r.key,r.spec.state,r))})}}class ei{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),i=null;for(;;){let u=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let o=i?i[s].n:0,l=i?i[s].state:this,c=o<n.length&&a.spec.appendTransaction.call(a,o?n.slice(o):n,l,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",t),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),u=!0}i&&(i[s]={state:r,n:n.length})}}if(!u)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new ei(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let u=r[i];n[u.name]=u.apply(t,this[u.name],this,n)}return n}get tr(){return new hC(this)}static create(t){let n=new To(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new ei(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new To(this.schema,t.plugins),r=n.fields,i=new ei(n);for(let u=0;u<r.length;u++){let s=r[u].name;i[s]=this.hasOwnProperty(s)?this[s]:r[u].init(t,i)}return i}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],u=i.spec.state;u&&u.toJSON&&(n[r]=u.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new To(t.schema,t.plugins),u=new ei(i);return i.fields.forEach(s=>{if(s.name=="doc")u.doc=In.fromJSON(t.schema,n.doc);else if(s.name=="selection")u.selection=se.fromJSON(u.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(u.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let o=r[a],l=o.spec.state;if(o.key==s.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){u[s.name]=l.fromJSON.call(o,t,n[a],u);return}}u[s.name]=s.init(t,u)}}),u}}function A1(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=A1(i,t,{})),n[r]=i}return n}class pt{constructor(t){this.spec=t,this.props={},t.props&&A1(t.props,this,this.props),this.key=t.key?t.key.key:g1("plugin")}getState(t){return t[this.key]}}const Co=Object.create(null);function g1(e){return e in Co?e+"$"+ ++Co[e]:(Co[e]=0,e+"$")}class _t{constructor(t="key"){this.key=g1(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Qc=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function b1(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const E1=(e,t,n)=>{let r=b1(e,n);if(!r)return!1;let i=Yc(r);if(!i){let s=r.blockRange(),a=s&&Ma(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let u=i.nodeBefore;if(C1(e,i,t,-1))return!0;if(r.parent.content.size==0&&(pi(u,"end")||ie.isSelectable(u)))for(let s=r.depth;;s--){let a=va(e.doc,r.before(s),r.after(s),Y.empty);if(a&&a.slice.size<a.to-a.from){if(t){let o=e.tr.step(a);o.setSelection(pi(u,"end")?se.findFrom(o.doc.resolve(o.mapping.map(i.pos,-1)),-1):ie.create(o.doc,i.pos-u.nodeSize)),t(o.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return u.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-u.nodeSize,i.pos).scrollIntoView()),!0):!1},mC=(e,t,n)=>{let r=b1(e,n);if(!r)return!1;let i=Yc(r);return i?AC(e,i,t):!1};function AC(e,t,n){let r=t.nodeBefore,i=r,u=t.pos-1;for(;!i.isTextblock;u--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let s=t.nodeAfter,a=s,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let l=va(e.doc,u,o,Y.empty);if(!l||l.from!=u||l instanceof Pe&&l.slice.size>=o-u)return!1;if(n){let c=e.tr.step(l);c.setSelection(ae.create(c.doc,u)),n(c.scrollIntoView())}return!0}function pi(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const y1=(e,t,n)=>{let{$head:r,empty:i}=e.selection,u=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;u=Yc(r)}let s=u&&u.nodeBefore;return!s||!ie.isSelectable(s)?!1:(t&&t(e.tr.setSelection(ie.create(e.doc,u.pos-s.nodeSize)).scrollIntoView()),!0)};function Yc(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function gC(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const bC=(e,t,n)=>{let r=gC(e,n);if(!r)return!1;let i=T1(r);if(!i)return!1;let u=i.nodeAfter;if(C1(e,i,t,1))return!0;if(r.parent.content.size==0&&(pi(u,"start")||ie.isSelectable(u))){let s=va(e.doc,r.before(),r.after(),Y.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(pi(u,"start")?se.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):ie.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return u.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+u.nodeSize).scrollIntoView()),!0):!1},EC=(e,t,n)=>{let{$head:r,empty:i}=e.selection,u=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;u=T1(r)}let s=u&&u.nodeAfter;return!s||!ie.isSelectable(s)?!1:(t&&t(e.tr.setSelection(ie.create(e.doc,u.pos)).scrollIntoView()),!0)};function T1(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const yC=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
39
+ `).scrollIntoView()),!0)};function qc(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const TC=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),u=n.indexAfter(-1),s=qc(i.contentMatchAt(u));if(!s||!i.canReplaceWith(u,u,s))return!1;if(t){let a=n.after(),o=e.tr.replaceWith(a,a,s.createAndFill());o.setSelection(se.near(o.doc.resolve(a),1)),t(o.scrollIntoView())}return!0},CC=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Dt||r.parent.inlineContent||i.parent.inlineContent)return!1;let u=qc(i.parent.contentMatchAt(i.indexAfter()));if(!u||!u.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,u.createAndFill());a.setSelection(ae.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},kC=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let u=n.before();if(nu(e.doc,u))return t&&t(e.tr.split(u).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Ma(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function xC(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof ie&&t.selection.node.isBlock)return!r.parentOffset||!nu(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let u=[],s,a,o=!1,l=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){o=r.end(p)==r.pos+(r.depth-p),l=r.start(p)==r.pos-(r.depth-p),a=qc(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),u.unshift(o&&a?{type:a}:null),s=p;break}else{if(p==1)return!1;u.unshift(null)}let c=t.tr;(t.selection instanceof ae||t.selection instanceof Dt)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=nu(c.doc,d,u.length,u);if(f||(u[0]=a?{type:a}:null,f=nu(c.doc,d,u.length,u)),!f)return!1;if(c.split(d,u.length,u),!o&&l&&r.node(s).type!=a){let p=c.mapping.map(r.before(s)),m=c.doc.resolve(p);a&&r.node(s-1).canReplaceWith(m.index(),m.index()+1,a)&&c.setNodeMarkup(c.mapping.map(r.before(s)),a)}return n&&n(c.scrollIntoView()),!0}}const wC=xC(),IC=(e,t)=>(t&&t(e.tr.setSelection(new Dt(e.doc))),!0);function SC(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,u=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(u-1,u)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(u,u+1)||!(i.isTextblock||Ba(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function C1(e,t,n,r){let i=t.nodeBefore,u=t.nodeAfter,s,a,o=i.type.spec.isolating||u.type.spec.isolating;if(!o&&SC(e,t,n))return!0;let l=!o&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(u.type))&&a.matchType(s[0]||u.type).validEnd){if(n){let p=t.pos+u.nodeSize,m=H.empty;for(let g=s.length-1;g>=0;g--)m=H.from(s[g].create(null,m));m=H.from(i.copy(m));let A=e.tr.step(new tt(t.pos-1,p,t.pos,p,new Y(m,1,0),s.length,!0)),E=A.doc.resolve(p+2*s.length);E.nodeAfter&&E.nodeAfter.type==i.type&&Ba(A.doc,E.pos)&&A.join(E.pos),n(A.scrollIntoView())}return!0}let c=u.type.spec.isolating||r>0&&o?null:se.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&Ma(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&pi(u,"start",!0)&&pi(i,"end")){let p=i,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let A=u,E=1;for(;!A.isTextblock;A=A.firstChild)E++;if(p.canReplace(p.childCount,p.childCount,A.content)){if(n){let g=H.empty;for(let w=m.length-1;w>=0;w--)g=H.from(m[w].copy(g));let N=e.tr.step(new tt(t.pos-m.length,t.pos+u.nodeSize,t.pos+E,t.pos+u.nodeSize-E,new Y(g,m.length,0),0,!0));n(N.scrollIntoView())}return!0}}return!1}function k1(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,u=i.depth;for(;i.node(u).isInline;){if(!u)return!1;u--}return i.node(u).isTextblock?(n&&n(t.tr.setSelection(ae.create(t.doc,e<0?i.start(u):i.end(u)))),!0):!1}}const NC=k1(-1),DC=k1(1);function Gc(e,t=null){return function(n,r){let{$from:i,$to:u}=n.selection,s=i.blockRange(u),a=s&&Kc(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function yu(e,t=null){return function(n,r){let i=!1;for(let u=0;u<n.selection.ranges.length&&!i;u++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[u];n.doc.nodesBetween(s,a,(o,l)=>{if(i)return!1;if(!(!o.isTextblock||o.hasMarkup(e,t)))if(o.type==e)i=!0;else{let c=n.doc.resolve(l),d=c.index();i=c.parent.canReplaceWith(d,d+1,e)}})}if(!i)return!1;if(r){let u=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[s];u.setBlockType(a,o,e,t)}r(u.scrollIntoView())}return!0}}function _C(e,t,n,r){for(let i=0;i<t.length;i++){let{$from:u,$to:s}=t[i],a=u.depth==0?e.inlineContent&&e.type.allowsMarkType(n):!1;if(e.nodesBetween(u.pos,s.pos,(o,l)=>{if(a)return!1;a=o.inlineContent&&o.type.allowsMarkType(n)}),a)return!0}return!1}function Pa(e,t=null,n){return function(r,i){let{empty:u,$cursor:s,ranges:a}=r.selection;if(u&&!s||!_C(r.doc,a,e))return!1;if(i)if(s)e.isInSet(r.storedMarks||s.marks())?i(r.tr.removeStoredMark(e)):i(r.tr.addStoredMark(e.create(t)));else{let o,l=r.tr;o=!a.some(c=>r.doc.rangeHasMark(c.$from.pos,c.$to.pos,e));for(let c=0;c<a.length;c++){let{$from:d,$to:f}=a[c];if(!o)l.removeMark(d.pos,f.pos,e);else{let p=d.pos,m=f.pos,A=d.nodeAfter,E=f.nodeBefore,g=A&&A.isText?/^\s*/.exec(A.text)[0].length:0,N=E&&E.isText?/\s*$/.exec(E.text)[0].length:0;p+g<m&&(p+=g,m-=N),l.addMark(p,m,e.create(t))}}i(l.scrollIntoView())}return!0}}function Ci(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let ko=Ci(Qc,E1,y1),Nh=Ci(Qc,bC,EC);const Cn={Enter:Ci(yC,CC,kC,wC),"Mod-Enter":TC,Backspace:ko,"Mod-Backspace":ko,"Shift-Backspace":ko,Delete:Nh,"Mod-Delete":Nh,"Mod-a":IC},x1={"Ctrl-h":Cn.Backspace,"Alt-Backspace":Cn["Mod-Backspace"],"Ctrl-d":Cn.Delete,"Ctrl-Alt-Backspace":Cn["Mod-Delete"],"Alt-Delete":Cn["Mod-Delete"],"Alt-d":Cn["Mod-Delete"],"Ctrl-a":NC,"Ctrl-e":DC};for(let e in Cn)x1[e]=Cn[e];const OC=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,RC=OC?x1:Cn;class mt{constructor(t,n,r={}){this.match=t,this.match=t,this.handler=typeof n=="string"?MC(n):n,this.undoable=r.undoable!==!1,this.inCode=r.inCode||!1,this.inCodeMark=r.inCodeMark!==!1}}function MC(e){return function(t,n,r,i){let u=e;if(n[1]){let s=n[0].lastIndexOf(n[1]);u+=n[0].slice(s+n[1].length),r+=s;let a=r-i;a>0&&(u=n[0].slice(s-a,s)+u,r=i)}return t.tr.insertText(u,r,i)}}const BC=500;function vC({rules:e}){let t=new pt({state:{init(){return null},apply(n,r){let i=n.getMeta(this);return i||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,i,u){return Dh(n,r,i,u,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&Dh(n,r.pos,r.pos,"",e,t)})}}},isInputRules:!0});return t}function Dh(e,t,n,r,i,u){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t),o=a.parent.textBetween(Math.max(0,a.parentOffset-BC),a.parentOffset,null,"")+r;for(let l=0;l<i.length;l++){let c=i[l];if(!c.inCodeMark&&a.marks().some(m=>m.type.spec.code))continue;if(a.parent.type.spec.code){if(!c.inCode)continue}else if(c.inCode==="only")continue;let d=c.match.exec(o);if(!d||d[0].length<r.length)continue;let f=t-(d[0].length-r.length);if(!c.inCodeMark){let m=!1;if(s.doc.nodesBetween(f,a.pos,A=>{A.isInline&&A.marks.some(E=>E.type.spec.code)&&(m=!0)}),m)continue}let p=c.handler(s,d,f,n);if(p)return c.undoable&&p.setMeta(u,{transform:p,from:t,to:n,text:r}),e.dispatch(p),!0}return!1}const LC=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let i=n[r],u;if(i.spec.isInputRules&&(u=i.getState(e))){if(t){let s=e.tr,a=u.transform;for(let o=a.steps.length-1;o>=0;o--)s.step(a.steps[o].invert(a.docs[o]));if(u.text){let o=s.doc.resolve(u.from).marks();s.replaceWith(u.from,u.to,e.schema.text(u.text,o))}else s.delete(u.from,u.to);t(s)}return!0}}return!1};new mt(/--$/,"—",{inCodeMark:!1});new mt(/\.\.\.$/,"…",{inCodeMark:!1});new mt(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1});new mt(/"$/,"”",{inCodeMark:!1});new mt(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1});new mt(/'$/,"’",{inCodeMark:!1});function Vc(e,t,n=null,r){return new mt(e,(i,u,s,a)=>{let o=n instanceof Function?n(u):n,l=i.tr.delete(s,a),c=l.doc.resolve(s),d=c.blockRange(),f=d&&Kc(d,t,o);if(!f)return null;l.wrap(d,f);let p=l.doc.resolve(s-1).nodeBefore;return p&&p.type==t&&Ba(l.doc,s-1)&&(!r||r(u,p))&&l.join(s-1),l})}function w1(e,t,n=null){return new mt(e,(r,i,u,s)=>{let a=r.doc.resolve(u),o=n instanceof Function?n(i):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?r.tr.delete(u,s).setBlockType(u,u,t,o):null})}const rr=typeof navigator<"u"?navigator:null,_h=typeof document<"u"?document:null,or=rr&&rr.userAgent||"",Ql=/Edge\/(\d+)/.exec(or),I1=/MSIE \d/.exec(or),Yl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(or),Fa=!!(I1||Yl||Ql),PC=I1?document.documentMode:Yl?+Yl[1]:Ql?+Ql[1]:0,S1=!Fa&&/gecko\/(\d+)/i.test(or),FC=S1&&+(/Firefox\/(\d+)/.exec(or)||[0,0])[1],ql=!Fa&&/Chrome\/(\d+)/.exec(or),N1=!!ql,HC=ql?+ql[1]:0,D1=!Fa&&!!rr&&/Apple Computer/.test(rr.vendor),_1=D1&&(/Mobile\/\w+/.test(or)||!!rr&&rr.maxTouchPoints>2),UC=_1||(rr?/Mac/.test(rr.platform):!1),O1=/Android \d/.test(or),R1=!!_h&&"webkitFontSmoothing"in _h.documentElement.style,WC=R1?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var AM=Object.freeze({__proto__:null,android:O1,chrome:N1,chrome_version:HC,gecko:S1,gecko_version:FC,ie:Fa,ie_version:PC,ios:_1,mac:UC,safari:D1,webkit:R1,webkit_version:WC});function xo(e,t,n,r,i,u){if(e.composing)return!1;const s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;const o=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,void 0,"")+r;for(let l of i){const c=l,d=c.match.exec(o),f=d&&d[0]&&c.handler(s,d,t-(d[0].length-r.length),n);if(f)return c.undoable!==!1&&f.setMeta(u,{transform:f,from:t,to:n,text:r}),e.dispatch(f),!0}return!1}const KC=new _t("MILKDOWN_CUSTOM_INPUTRULES");function zC({rules:e}){const t=new pt({key:KC,isInputRules:!0,state:{init(){return null},apply(n,r){const i=n.getMeta(this);return i||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,i,u){return xo(n,r,i,u,e,t)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:r}=n.state.selection;r&&xo(n,r.pos,r.pos,"",e,t)}),!1),keydown:(n,r)=>!(O1&&N1&&r.key==="Enter")||n.composing?!1:n.someProp("handleKeyDown",i=>i(n,r))?(r.preventDefault(),!0):!1},handleKeyDown(n,r){if(r.key!=="Enter")return!1;const{$cursor:i}=n.state.selection;return i?xo(n,i.pos,i.pos,`
40
+ `,e,t):!1}}});return t}function M1(e){return e.some(t=>t.type.spec.code)}function Oh(e,t,n){if(t>=n)return!1;let r=!1;return e.doc.nodesBetween(t,n,i=>(i.isInline&&M1(i.marks)&&(r=!0),!r)),r}function QC(e,t){var n;return M1((n=e.storedMarks)!=null?n:e.doc.resolve(t).marks())}function ju(e,t,n={}){return new mt(e,(r,i,u,s)=>{var a,o,l,c;const{tr:d}=r,f=i.length;let p=i[f-1],m=i[0],A=[],E;const g={group:p,fullMatch:m,start:u,end:s},N=(a=n.updateCaptured)==null?void 0:a.call(n,g);if(Object.assign(g,N),{group:p,fullMatch:m,start:u,end:s}=g,m===null||p?.trim()==="")return null;if(p){const w=m.search(/\S/),_=u+m.indexOf(p),S=_+p.length,x=Oh(r,u+w,_),O=S<s&&Oh(r,S,s);if(x||O||QC(r,s))return null;A=(o=d.storedMarks)!=null?o:[],S<s&&d.delete(S,s),_>u&&d.delete(u+w,_),E=u+w+p.length;const z=(l=n.getAttr)==null?void 0:l.call(n,i);d.addMark(u,E,t.create(z)),d.setStoredMarks(A),(c=n.beforeDispatch)==null||c.call(n,{match:i,start:u,end:s,tr:d})}return d})}function gM(e,t,n={}){return new mt(e,(r,i,u,s)=>{var a,o,l;const{tr:c}=r;let d=i[1],f=i[0];const p={group:d,fullMatch:f,start:u,end:s},m=(a=n.updateCaptured)==null?void 0:a.call(n,p);if(Object.assign(p,m),{group:d,fullMatch:f,start:u,end:s}=p,f===null||!d||d.trim()==="")return null;const A=(o=n.getAttr)==null?void 0:o.call(n,i),E=t.createAndFill(A);return E&&(c.replaceRangeWith(t.isBlock?c.doc.resolve(u).before():u,s,E),(l=n.beforeDispatch)==null||l.call(n,{match:[f,d],start:u,end:s,tr:c})),c})}var YC=Object.defineProperty,qC=Object.defineProperties,GC=Object.getOwnPropertyDescriptors,Rh=Object.getOwnPropertySymbols,VC=Object.prototype.hasOwnProperty,JC=Object.prototype.propertyIsEnumerable,Mh=(e,t,n)=>t in e?YC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jC=(e,t)=>{for(var n in t||(t={}))VC.call(t,n)&&Mh(e,n,t[n]);if(Rh)for(var n of Rh(t))JC.call(t,n)&&Mh(e,n,t[n]);return e},ZC=(e,t)=>qC(e,GC(t));function Bh(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function bM(e,t,n){const i=e.state.doc.content.size,u=Bh(t,0,i),s=Bh(n,0,i),a=e.coordsAtPos(u),o=e.coordsAtPos(s,-1),l=Math.min(a.top,o.top),c=Math.max(a.bottom,o.bottom),d=Math.min(a.left,o.left),f=Math.max(a.right,o.right),p=f-d,m=c-l,g={top:l,bottom:c,left:d,right:f,width:p,height:m,x:d,y:l};return ZC(jC({},g),{toJSON:()=>g})}function B1(e){return Object.assign(Object.create(e),e).setTime(Date.now())}function XC(e,t){return Array.isArray(e)&&e.includes(t.type)||t.type===e}function EM(e){if(e.content.childCount===1){const t=e.content.firstChild;if(t?.type.name==="text"&&t.marks.length===0)return t;if(t?.type.name==="paragraph"&&t.childCount===1){const n=t.firstChild;if(n?.type.name==="text"&&n.marks.length===0)return n}}return!1}function $C(e){return t=>{for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r)){const i=t.before(n),u=t.after(n);return{from:i,to:u,node:r}}}}}function ek(e,t){return $C(n=>n.type===t)(e)}function yM(e,t){const n=t.nodes[e];if(!n)throw v2("node",e);return n}function v1(e){return t=>{for(let n=t.depth;n>0;n--){const r=t.node(n);if(e(r))return{pos:t.before(n),start:t.start(n),depth:n,node:r}}}}function TM(e){return t=>v1(e)(t.$from)}function tk(e,t){if(!(e instanceof ie))return;const{node:n,$from:r}=e;if(XC(t,n))return{node:n,pos:r.pos,start:r.start(r.depth),depth:r.depth}}const nk=(e,t)=>{const{selection:n,doc:r}=e;if(n instanceof ie)return{hasNode:n.node.type===t,pos:n.from,target:n.node};const{from:i,to:u}=n;let s=!1,a=-1,o=null;return r.nodesBetween(i,u,(l,c)=>o?!1:l.type===t?(s=!0,a=c,o=l,!1):!0),{hasNode:s,pos:a,target:o}};var ir={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},sa={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rk=typeof navigator<"u"&&/Mac/.test(navigator.platform),ik=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ve=0;Ve<10;Ve++)ir[48+Ve]=ir[96+Ve]=String(Ve);for(var Ve=1;Ve<=24;Ve++)ir[Ve+111]="F"+Ve;for(var Ve=65;Ve<=90;Ve++)ir[Ve]=String.fromCharCode(Ve+32),sa[Ve]=String.fromCharCode(Ve);for(var wo in ir)sa.hasOwnProperty(wo)||(sa[wo]=ir[wo]);function uk(e){var t=rk&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||ik&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?sa:ir)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const sk=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),ak=typeof navigator<"u"&&/Win/.test(navigator.platform);function ok(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,u,s;for(let a=0;a<t.length-1;a++){let o=t[a];if(/^(cmd|meta|m)$/i.test(o))s=!0;else if(/^a(lt)?$/i.test(o))r=!0;else if(/^(c|ctrl|control)$/i.test(o))i=!0;else if(/^s(hift)?$/i.test(o))u=!0;else if(/^mod$/i.test(o))sk?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+o)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),u&&(n="Shift-"+n),n}function lk(e){let t=Object.create(null);for(let n in e)t[ok(n)]=e[n];return t}function Io(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function ck(e){return new pt({props:{handleKeyDown:L1(e)}})}function L1(e){let t=lk(e);return function(n,r){let i=uk(r),u,s=t[Io(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=t[Io(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(ak&&r.ctrlKey&&r.altKey)&&(u=ir[r.keyCode])&&u!=i){let a=t[Io(u,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var P1=class{},F1=class{constructor(){this.elements=[],this.size=()=>this.elements.length,this.top=()=>this.elements.at(-1),this.push=e=>{this.top()?.push(e)},this.open=e=>{this.elements.push(e)},this.close=()=>{const e=this.elements.pop();if(!e)throw sm();return e}}},dk=class H1 extends P1{constructor(t,n,r){super(),this.type=t,this.content=n,this.attrs=r}push(t,...n){this.content.push(t,...n)}pop(){return this.content.pop()}static create(t,n,r){return new H1(t,n,r)}},Qt,si,Lu,Pu,Fu,ai,oi,_r,fk=(_r=class extends F1{constructor(n){super();Me(this,Qt);Me(this,si);Me(this,Lu);Me(this,Pu);Me(this,Fu);Me(this,ai);Me(this,oi);Ie(this,Qt,ge.none),Ie(this,si,r=>r.isText),Ie(this,Lu,(r,i)=>{if(re(this,si).call(this,r)&&re(this,si).call(this,i)&&ge.sameSet(r.marks,i.marks))return this.schema.text(r.text+i.text,r.marks)}),Ie(this,Pu,r=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(u=>u.spec.parseMarkdown.match(r));if(!i)throw M2(r);return i}),Ie(this,Fu,r=>{const i=re(this,Pu).call(this,r);i.spec.parseMarkdown.runner(this,r,i)}),this.injectRoot=(r,i,u)=>(this.openNode(i,u),this.next(r.children),this),this.openNode=(r,i)=>(this.open(dk.create(r,[],i)),this),Ie(this,ai,()=>{Ie(this,Qt,ge.none);const r=this.close();return re(this,oi).call(this,r.type,r.attrs,r.content)}),this.closeNode=()=>{try{re(this,ai).call(this)}catch(r){console.error(r)}return this},Ie(this,oi,(r,i,u)=>{const s=r.createAndFill(i,u,re(this,Qt));if(!s)throw R2(r,i,u);return this.push(s),s}),this.addNode=(r,i,u)=>{try{re(this,oi).call(this,r,i,u)}catch(s){console.error(s)}return this},this.openMark=(r,i)=>{const u=r.create(i);return Ie(this,Qt,u.addToSet(re(this,Qt))),this},this.closeMark=r=>(Ie(this,Qt,r.removeFromSet(re(this,Qt))),this),this.addText=r=>{try{const i=this.top();if(!i)throw sm();const u=i.pop(),s=this.schema.text(r,re(this,Qt));if(!u)return i.push(s),this;const a=re(this,Lu).call(this,u,s);return a?(i.push(a),this):(i.push(u,s),this)}catch(i){return console.error(i),this}},this.build=()=>{let r;do r=re(this,ai).call(this);while(this.size());return r},this.next=(r=[])=>([r].flat().forEach(i=>re(this,Fu).call(this,i)),this),this.toDoc=()=>this.build(),this.run=(r,i)=>{const u=r.runSync(r.parse(i),i);return this.next(u),this},this.schema=n}},Qt=new WeakMap,si=new WeakMap,Lu=new WeakMap,Pu=new WeakMap,Fu=new WeakMap,ai=new WeakMap,oi=new WeakMap,_r.create=(n,r)=>{const i=new _r(n);return u=>(i.run(r,u),i.toDoc())},_r),Or,vh=(Or=class extends P1{constructor(t,n,r,i={}){super(),this.type=t,this.children=n,this.value=r,this.props=i,this.push=(u,...s)=>{this.children||(this.children=[]),this.children.push(u,...s)},this.pop=()=>this.children?.pop()}},Or.create=(t,n,r,i={})=>new Or(t,n,r,i),Or),hk=e=>Object.prototype.hasOwnProperty.call(e,"size"),at,li,Hu,Uu,Wu,Ku,ci,di,zu,Qu,Cr,Yn,Yu,fi,Rr,pk=(Rr=class extends F1{constructor(n){super();Me(this,at);Me(this,li);Me(this,Hu);Me(this,Uu);Me(this,Wu);Me(this,Ku);Me(this,ci);Me(this,di);Me(this,zu);Me(this,Qu);Me(this,Cr);Me(this,Yn);Me(this,Yu);Me(this,fi);Ie(this,at,[]),Ie(this,li,r=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(u=>u.spec.toMarkdown.match(r));if(!i)throw B2(r.type);return i}),Ie(this,Hu,r=>re(this,li).call(this,r).spec.toMarkdown.runner(this,r)),Ie(this,Uu,(r,i)=>re(this,li).call(this,r).spec.toMarkdown.runner(this,r,i)),Ie(this,Wu,r=>{const i=a=>a.type.spec.priority??50,u=[...r].sort((a,o)=>i(a)-i(o)),s=[];return re(this,at).forEach(({mark:a})=>{const o=u.findIndex(l=>l.eq(a));o>=0&&s.push(...u.splice(o,1))}),s.concat(u)}),Ie(this,Ku,r=>{const i=r?.marks;let u=0;for(;u<re(this,at).length;){const{mark:s,spanning:a}=re(this,at)[u];if(a&&i?.some(o=>o.eq(s)))u++;else break}for(let s=re(this,at).length-1;s>=u;s--)re(this,fi).call(this,re(this,at)[s].mark)}),Ie(this,ci,(r,i)=>{re(this,Wu).call(this,r.marks).every(u=>!re(this,Uu).call(this,u,r))&&re(this,Hu).call(this,r),re(this,Ku).call(this,i)}),Ie(this,di,r=>{const{children:i}=r;return i&&(r.children=i.reduce((u,s,a)=>{if(a===0)return[s];const o=u.at(-1);if(o&&o.isMark&&s.isMark){const{children:l,...c}=s,{children:d,...f}=o;if(s.type===o.type&&l&&d&&JSON.stringify(c)===JSON.stringify(f)){const p={...f,children:[...d,...l]};return u.slice(0,-1).concat(re(this,di).call(this,p))}}return u.concat(s)},[])),r}),Ie(this,zu,r=>{const i={...r.props,type:r.type};return r.children&&(i.children=r.children),r.value&&(i.value=r.value),i}),this.openNode=(r,i,u)=>(this.open(vh.create(r,void 0,i,u)),this),Ie(this,Qu,(r,i)=>{let u="",s="";const a=r.children;if(a){const l=a[0],c=a.at(-1);if(c&&c.type==="text"&&c.value.endsWith(" ")){const d=c.value,f=d.trimEnd();s=d.slice(f.length),c.value=f}if(l&&l.type==="text"&&l.value.startsWith(" ")){const d=l.value,f=d.trimStart();u=d.slice(0,d.length-f.length),l.value=f}}u.length&&re(this,Yn).call(this,"text",void 0,u);const o=i();return s.length&&re(this,Yn).call(this,"text",void 0,s),o}),Ie(this,Cr,(r=!1)=>{const i=this.close(),u=()=>re(this,Yn).call(this,i.type,i.children,i.value,i.props);return r?re(this,Qu).call(this,i,u):u()}),this.closeNode=()=>(re(this,Cr).call(this),this),Ie(this,Yn,(r,i,u,s)=>{const a=vh.create(r,i,u,s),o=re(this,di).call(this,re(this,zu).call(this,a));return this.push(o),o}),this.addNode=(r,i,u,s)=>(re(this,Yn).call(this,r,i,u,s),this),Ie(this,Yu,(r,i,u,s)=>re(this,at).some(a=>a.mark.eq(r))?this:(re(this,at).push({mark:r,spanning:u==null}),this.openNode(i,u,{...s,isMark:!0}))),Ie(this,fi,r=>{let i=-1;for(let u=re(this,at).length-1;u>=0;u--)if(re(this,at)[u].mark.eq(r)){i=u;break}i<0||(re(this,at).splice(i,1),re(this,Cr).call(this,!0))}),this.withMark=(r,i,u,s)=>(re(this,Yu).call(this,r,i,u,s),this),this.closeMark=r=>(re(this,fi).call(this,r),this),this.build=()=>{let r=null;do r=re(this,Cr).call(this);while(this.size());return r.children||(r.children=[]),r},this.next=r=>hk(r)?(r.forEach((i,u,s)=>{re(this,ci).call(this,i,r.maybeChild(s+1)??void 0)}),this):(re(this,ci).call(this,r),this),this.toString=r=>r.stringify(this.build()),this.run=r=>(Ie(this,at,[]),this.next(r),this),this.schema=n}},at=new WeakMap,li=new WeakMap,Hu=new WeakMap,Uu=new WeakMap,Wu=new WeakMap,Ku=new WeakMap,ci=new WeakMap,di=new WeakMap,zu=new WeakMap,Qu=new WeakMap,Cr=new WeakMap,Yn=new WeakMap,Yu=new WeakMap,fi=new WeakMap,Rr.create=(n,r)=>{const i=new Rr(n);return u=>(i.run(u),i.toString(r))},Rr);const Je=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},mi=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let Gl=null;const yn=function(e,t,n){let r=Gl||(Gl=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},mk=function(){Gl=null},Lr=function(e,t,n,r){return n&&(Lh(e,t,n,r,-1)||Lh(e,t,n,r,1))},Ak=/^(img|br|input|textarea|hr)$/i;function Lh(e,t,n,r,i){for(var u;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Lt(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Zu(e)||Ak.test(e.nodeName)||e.contentEditable=="false")return!1;t=Je(e)+(i<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((u=s.pmViewDesc)===null||u===void 0)&&u.ignoreForSelection)t+=i;else return!1;else e=s,t=i<0?Lt(e):0}else return!1}}function Lt(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function gk(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Lt(e)}else if(e.parentNode&&!Zu(e))t=Je(e),e=e.parentNode;else return null}}function bk(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Zu(e))t=Je(e)+1,e=e.parentNode;else return null}}function Ek(e,t,n){for(let r=t==0,i=t==Lt(e);r||i;){if(e==n)return!0;let u=Je(e);if(e=e.parentNode,!e)return!1;r=r&&u==0,i=i&&u==Lt(e)}}function Zu(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Ha=function(e){return e.focusNode&&Lr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function br(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function yk(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Tk(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(Lt(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(Lt(r.startContainer),r.startOffset)}}}const un=typeof navigator<"u"?navigator:null,Ph=typeof document<"u"?document:null,lr=un&&un.userAgent||"",Vl=/Edge\/(\d+)/.exec(lr),U1=/MSIE \d/.exec(lr),Jl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(lr),Ct=!!(U1||Jl||Vl),Xn=U1?document.documentMode:Jl?+Jl[1]:Vl?+Vl[1]:0,Pt=!Ct&&/gecko\/(\d+)/i.test(lr);Pt&&+(/Firefox\/(\d+)/.exec(lr)||[0,0])[1];const jl=!Ct&&/Chrome\/(\d+)/.exec(lr),je=!!jl,W1=jl?+jl[1]:0,nt=!Ct&&!!un&&/Apple Computer/.test(un.vendor),Ai=nt&&(/Mobile\/\w+/.test(lr)||!!un&&un.maxTouchPoints>2),Mt=Ai||(un?/Mac/.test(un.platform):!1),K1=un?/Win/.test(un.platform):!1,wn=/Android \d/.test(lr),Xu=!!Ph&&"webkitFontSmoothing"in Ph.documentElement.style,Ck=Xu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function kk(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function gn(e,t){return typeof e=="number"?e:e[t]}function xk(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Fh(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,u=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=mi(s);continue}let a=s,o=a==u.body,l=o?kk(u):xk(a),c=0,d=0;if(t.top<l.top+gn(r,"top")?d=-(l.top-t.top+gn(i,"top")):t.bottom>l.bottom-gn(r,"bottom")&&(d=t.bottom-t.top>l.bottom-l.top?t.top+gn(i,"top")-l.top:t.bottom-l.bottom+gn(i,"bottom")),t.left<l.left+gn(r,"left")?c=-(l.left-t.left+gn(i,"left")):t.right>l.right-gn(r,"right")&&(c=t.right-l.right+gn(i,"right")),c||d)if(o)u.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,m=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let A=a.scrollLeft-p,E=a.scrollTop-m;t={left:t.left-A,top:t.top-E,right:t.right-A,bottom:t.bottom-E}}let f=o?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:mi(s)}}function wk(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let u=(t.left+t.right)/2,s=n+1;s<Math.min(innerHeight,t.bottom);s+=5){let a=e.root.elementFromPoint(u,s);if(!a||a==e.dom||!e.dom.contains(a))continue;let o=a.getBoundingClientRect();if(o.top>=n-20){r=a,i=o.top;break}}return{refDOM:r,refTop:i,stack:z1(e.dom)}}function z1(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=mi(r));return t}function Ik({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Q1(n,r==0?0:r-t)}function Q1(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:u}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=u&&(r.scrollLeft=u)}}let qr=null;function Sk(e){if(e.setActive)return e.setActive();if(qr)return e.focus(qr);let t=z1(e);e.focus(qr==null?{get preventScroll(){return qr={preventScroll:!0},!0}}:void 0),qr||(qr=!1,Q1(t,0))}function Y1(e,t){let n,r=2e8,i,u=0,s=t.top,a=t.top,o,l;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=yn(c).getClientRects();else continue;for(let p=0;p<f.length;p++){let m=f[p];if(m.top<=s&&m.bottom>=a){s=Math.max(m.bottom,s),a=Math.min(m.top,a);let A=m.left>t.left?m.left-t.left:m.right<t.left?t.left-m.right:0;if(A<r){n=c,r=A,i=A&&n.nodeType==3?{left:m.right<t.left?m.right:m.left,top:t.top}:t,c.nodeType==1&&A&&(u=d+(t.left>=(m.left+m.right)/2?1:0));continue}}else m.top>t.top&&!o&&m.left<=t.left&&m.right>=t.left&&(o=c,l={left:Math.max(m.left,Math.min(m.right,t.left)),top:m.top});!n&&(t.left>=m.right&&t.top>=m.top||t.left>=m.left&&t.top>=m.bottom)&&(u=d+1)}}return!n&&o&&(n=o,i=l,r=0),n&&n.nodeType==3?Nk(n,i):!n||r&&n.nodeType==1?{node:e,offset:u}:Y1(n,i)}function Nk(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let u=0;u<n;u++){r.setEnd(e,u+1),r.setStart(e,u);let s=Fn(r,1);if(s.top!=s.bottom&&Jc(t,s)){i={node:e,offset:u+(t.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),i||{node:e,offset:0}}function Jc(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Dk(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function _k(e,t,n){let{node:r,offset:i}=Y1(t,n),u=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();u=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,i,u)}function Ok(e,t,n,r){let i=-1;for(let u=t,s=!1;u!=e.dom;){let a=e.docView.nearestDesc(u,!0),o;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((o=a.dom.getBoundingClientRect()).width||o.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&o.left>r.left||o.top>r.top?i=a.posBefore:(!s&&o.right<r.left||o.bottom<r.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?a.posBefore:a.posAfter;u=a.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function q1(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),u=i;;){let s=e.childNodes[u];if(s.nodeType==1){let a=s.getClientRects();for(let o=0;o<a.length;o++){let l=a[o];if(Jc(t,l))return q1(s,t,l)}}if((u=(u+1)%r)==i)break}return e}function Rk(e,t){let n=e.dom.ownerDocument,r,i=0,u=Tk(n,t.left,t.top);u&&({node:r,offset:i}=u);let s=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),a;if(!s||!e.dom.contains(s.nodeType!=1?s.parentNode:s)){let l=e.dom.getBoundingClientRect();if(!Jc(t,l)||(s=q1(e.dom,t,l),!s))return null}if(nt)for(let l=s;r&&l;l=mi(l))l.draggable&&(r=void 0);if(s=Dk(s,t),r){if(Pt&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let c=r.childNodes[i],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&i++}let l;Xu&&i&&r.nodeType==1&&(l=r.childNodes[i-1]).nodeType==1&&l.contentEditable=="false"&&l.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=Ok(e,r,i,t))}a==null&&(a=_k(e,s,t));let o=e.docView.nearestDesc(s,!0);return{pos:a,inside:o?o.posAtStart-o.border:-1}}function Hh(e){return e.top<e.bottom||e.left<e.right}function Fn(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(Hh(r))return r}return Array.prototype.find.call(n,Hh)||e.getBoundingClientRect()}const Mk=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function G1(e,t,n){let{node:r,offset:i,atom:u}=e.docView.domFromPos(t,n<0?-1:1),s=Xu||Pt;if(r.nodeType==3)if(s&&(Mk.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let o=Fn(yn(r,i,i),n);if(Pt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Fn(yn(r,i-1,i-1),-1);if(l.top==o.top){let c=Fn(yn(r,i,i+1),-1);if(c.top!=o.top)return Li(c,c.left<l.left)}}return o}else{let o=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==r.nodeValue.length?(o--,c=1):n<0?o--:l++,Li(Fn(yn(r,o,l),c),c<0)}if(!e.state.doc.resolve(t-(u||0)).parent.inlineContent){if(u==null&&i&&(n<0||i==Lt(r))){let o=r.childNodes[i-1];if(o.nodeType==1)return So(o.getBoundingClientRect(),!1)}if(u==null&&i<Lt(r)){let o=r.childNodes[i];if(o.nodeType==1)return So(o.getBoundingClientRect(),!0)}return So(r.getBoundingClientRect(),n>=0)}if(u==null&&i&&(n<0||i==Lt(r))){let o=r.childNodes[i-1],l=o.nodeType==3?yn(o,Lt(o)-(s?0:1)):o.nodeType==1&&(o.nodeName!="BR"||!o.nextSibling)?o:null;if(l)return Li(Fn(l,1),!1)}if(u==null&&i<Lt(r)){let o=r.childNodes[i];for(;o.pmViewDesc&&o.pmViewDesc.ignoreForCoords;)o=o.nextSibling;let l=o?o.nodeType==3?yn(o,0,s?0:1):o.nodeType==1?o:null:null;if(l)return Li(Fn(l,-1),!0)}return Li(Fn(r.nodeType==3?yn(r):r,-n),n>=0)}function Li(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function So(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function V1(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function Bk(e,t,n){let r=t.selection,i=n=="up"?r.$from:r.$to;return V1(e,t,()=>{let{node:u}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(u,!0);if(!a)break;if(a.node.isBlock){u=a.contentDOM||a.dom;break}u=a.dom.parentNode}let s=G1(e,i.pos,1);for(let a=u.firstChild;a;a=a.nextSibling){let o;if(a.nodeType==1)o=a.getClientRects();else if(a.nodeType==3)o=yn(a,0,a.nodeValue.length).getClientRects();else continue;for(let l=0;l<o.length;l++){let c=o[l];if(c.bottom>c.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const vk=/[\u0590-\u08ac]/;function Lk(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,u=!i,s=i==r.parent.content.size,a=e.domSelection();return a?!vk.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?u:s:V1(e,t,()=>{let{focusNode:o,focusOffset:l,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:m,focusOffset:A}=e.domSelectionRange(),E=m&&!p.contains(m.nodeType==1?m:m.parentNode)||o==m&&l==A;try{a.collapse(c,d),o&&(o!=c||l!=d)&&a.extend&&a.extend(o,l)}catch{}return f!=null&&(a.caretBidiLevel=f),E}):r.pos==r.start()||r.pos==r.end()}let Uh=null,Wh=null,Kh=!1;function Pk(e,t,n){return Uh==t&&Wh==n?Kh:(Uh=t,Wh=n,Kh=n=="up"||n=="down"?Bk(e,t,n):Lk(e,t,n))}const Ft=0,zh=1,yr=2,sn=3;class $u{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=Ft,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==t)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let u,s;if(t==this.contentDOM)u=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;u=t.previousSibling}for(;u&&!((s=u.pmViewDesc)&&s.parent==this);)u=u.previousSibling;return u?this.posBeforeChild(s)+s.size:this.posAtStart}else{let u,s;if(t==this.contentDOM)u=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;u=t.nextSibling}for(;u&&!((s=u.pmViewDesc)&&s.parent==this);)u=u.nextSibling;return u?this.posBeforeChild(s):this.posAtEnd}let i;if(t==this.dom&&this.contentDOM)i=n>Je(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let u=t;;u=u.parentNode){if(u==this.dom){i=!1;break}if(u.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let u=t;;u=u.parentNode){if(u==this.dom){i=!0;break}if(u.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let u=this.getDesc(i),s;if(u&&(!n||u.node))if(r&&(s=u.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return u}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let u=this.getDesc(i);if(u)return u.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],u=r+i.size;if(r==t&&u!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(t<u)return i.descAt(t-r-i.border);r=u}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,i=0;for(let u=0;r<this.children.length;r++){let s=this.children[r],a=u+s.size;if(a>t||s instanceof j1){i=t-u;break}u=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let u;r&&!(u=this.children[r-1]).size&&u instanceof J1&&u.side>=0;r--);if(n<=0){let u,s=!0;for(;u=r?this.children[r-1]:null,!(!u||u.dom.parentNode==this.contentDOM);r--,s=!1);return u&&n&&s&&!u.border&&!u.domAtom?u.domFromPos(u.size,n):{node:this.contentDOM,offset:u?Je(u.dom)+1:0}}else{let u,s=!0;for(;u=r<this.children.length?this.children[r]:null,!(!u||u.dom.parentNode==this.contentDOM);r++,s=!1);return u&&s&&!u.border&&!u.domAtom?u.domFromPos(0,n):{node:this.contentDOM,offset:u?Je(u.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,u=-1;for(let s=r,a=0;;a++){let o=this.children[a],l=s+o.size;if(i==-1&&t<=l){let c=s+o.border;if(t>=c&&n<=l-o.border&&o.node&&o.contentDOM&&this.contentDOM.contains(o.contentDOM))return o.parseRange(t,n,c);t=s;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Je(f.dom)+1;break}t-=f.size}i==-1&&(i=0)}if(i>-1&&(l>n||a==this.children.length-1)){n=l;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){u=Je(d.dom);break}n+=d.size}u==-1&&(u=this.contentDOM.childNodes.length);break}s=l}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:u}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let u=Math.min(t,n),s=Math.max(t,n);for(let p=0,m=0;p<this.children.length;p++){let A=this.children[p],E=m+A.size;if(u>m&&s<E)return A.setSelection(t-m-A.border,n-m-A.border,r,i);m=E}let a=this.domFromPos(t,t?-1:1),o=n==t?a:this.domFromPos(n,n?-1:1),l=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((Pt||nt)&&t==n){let{node:p,offset:m}=a;if(p.nodeType==3){if(d=!!(m&&p.nodeValue[m-1]==`
41
+ `),d&&m==p.nodeValue.length)for(let A=p,E;A;A=A.parentNode){if(E=A.nextSibling){E.nodeName=="BR"&&(a=o={node:E.parentNode,offset:Je(E)+1});break}let g=A.pmViewDesc;if(g&&g.node&&g.node.isBlock)break}}else{let A=p.childNodes[m-1];d=A&&(A.nodeName=="BR"||A.contentEditable=="false")}}if(Pt&&c.focusNode&&c.focusNode!=o.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||d&&nt)&&Lr(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Lr(o.node,o.offset,c.focusNode,c.focusOffset))return;let f=!1;if((l.extend||t==n)&&!(d&&Pt)){l.collapse(a.node,a.offset);try{t!=n&&l.extend(o.node,o.offset),f=!0}catch{}}if(!f){if(t>n){let m=a;a=o,o=m}let p=document.createRange();p.setEnd(o.node,o.offset),p.setStart(a.node,a.offset),l.removeAllRanges(),l.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let u=this.children[i],s=r+u.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+u.border,o=s-u.border;if(t>=a&&n<=o){this.dirty=t==r||n==s?yr:zh,t==a&&n==o&&(u.contentLost||u.dom.parentNode!=this.contentDOM)?u.dirty=sn:u.markDirty(t-a,n-a);return}else u.dirty=u.dom==u.contentDOM&&u.dom.parentNode==this.contentDOM&&!u.children.length?yr:sn}r=s}this.dirty=yr}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?yr:zh;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class J1 extends $u{constructor(t,n,r,i){let u,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!u)return i;if(u.parent)return u.parent.posBeforeChild(u)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,u=this}matchesWidget(t){return this.dirty==Ft&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class Fk extends $u{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Pr extends $u{constructor(t,n,r,i,u){super(t,[],r,i),this.mark=n,this.spec=u}static create(t,n,r,i){let u=i.nodeViews[n.type.name],s=u&&u(n,i,r);return(!s||!s.dom)&&(s=ar.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Pr(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&sn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=sn&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Ft){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Ft}}slice(t,n,r){let i=Pr.create(this.parent,this.mark,!0,r),u=this.children,s=this.size;n<s&&(u=Xl(u,n,s,r)),t>0&&(u=Xl(u,0,t,r));for(let a=0;a<u.length;a++)u[a].parent=i;return i.children=u,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class $n extends $u{constructor(t,n,r,i,u,s,a,o,l){super(t,[],u,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,u,s){let a=u.nodeViews[n.type.name],o,l=a&&a(n,u,()=>{if(!o)return s;if(o.parent)return o.parent.posBeforeChild(o)},r,i),c=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=ar.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=$1(c,r,n),l?o=new Hk(t,n,r,i,c,d||null,f,l,u,s+1):n.isText?new Ua(t,n,r,i,c,f,u):new $n(t,n,r,i,c,d||null,f,u,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>H.empty)}return t}matchesNode(t,n,r){return this.dirty==Ft&&t.eq(this.node)&&aa(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,u=t.composing?this.localCompositionInfo(t,n):null,s=u&&u.pos>-1?u:null,a=u&&u.pos<0,o=new Wk(this,s&&s.node,t);Qk(this.node,this.innerDeco,(l,c,d)=>{l.spec.marks?o.syncToMarks(l.spec.marks,r,t,c):l.type.side>=0&&!d&&o.syncToMarks(c==this.node.childCount?ge.none:this.node.child(c).marks,r,t,c),o.placeWidget(l,t,i)},(l,c,d,f)=>{o.syncToMarks(l.marks,r,t,f);let p;o.findNodeMatch(l,c,d,f)||a&&t.state.selection.from>i&&t.state.selection.to<i+l.nodeSize&&(p=o.findIndexWithChild(u.node))>-1&&o.updateNodeAt(l,c,d,p,t)||o.updateNextNode(l,c,d,t,f,i)||o.addNode(l,c,d,t,i),i+=l.nodeSize}),o.syncToMarks([],r,t,0),this.node.isTextblock&&o.addTextblockHacks(),o.destroyRest(),(o.changed||this.dirty==yr)&&(s&&this.protectLocalComposition(t,s),Z1(this.contentDOM,this.children,t),Ai&&Yk(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof ae)||r<n||i>n+this.node.content.size)return null;let u=t.input.compositionNode;if(!u||!this.dom.contains(u.parentNode))return null;if(this.node.inlineContent){let s=u.nodeValue,a=qk(this.node.content,s,r-n,i-n);return a<0?null:{node:u,pos:a,text:s}}else return{node:u,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let u=n;for(;u.parentNode!=this.contentDOM;u=u.parentNode){for(;u.previousSibling;)u.parentNode.removeChild(u.previousSibling);for(;u.nextSibling;)u.parentNode.removeChild(u.nextSibling);u.pmViewDesc&&(u.pmViewDesc=void 0)}let s=new Fk(this,u,n,i);t.input.compositionNodes.push(s),this.children=Xl(this.children,r,r+i.length,t,s)}update(t,n,r,i){return this.dirty==sn||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Ft}updateOuterDeco(t){if(aa(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=X1(this.dom,this.nodeDOM,Zl(this.outerDeco,this.node,n),Zl(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Qh(e,t,n,r,i){$1(r,t,e);let u=new $n(void 0,e,t,n,r,r,r,i,0);return u.contentDOM&&u.updateChildren(i,0),u}class Ua extends $n{constructor(t,n,r,i,u,s,a){super(t,n,r,i,u,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return this.dirty==sn||this.dirty!=Ft&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Ft||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=Ft,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),u=document.createTextNode(i.text);return new Ua(this.parent,i,this.outerDeco,this.innerDeco,u,u,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=sn)}get domAtom(){return!1}isText(t){return this.node.text==t}}class j1 extends $u{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Ft&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Hk extends $n{constructor(t,n,r,i,u,s,a,o,l,c){super(t,n,r,i,u,s,a,l,c),this.spec=o}update(t,n,r,i){if(this.dirty==sn)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let u=this.spec.update(t,n,r);return u&&this.updateInner(t,n,r,i),u}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function Z1(e,t,n){let r=e.firstChild,i=!1;for(let u=0;u<t.length;u++){let s=t[u],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=Yh(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof Pr){let o=r?r.previousSibling:e.lastChild;Z1(s.contentDOM,s.children,n),r=o?o.nextSibling:e.firstChild}}for(;r;)r=Yh(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const ru=function(e){e&&(this.nodeName=e)};ru.prototype=Object.create(null);const Tr=[new ru];function Zl(e,t,n){if(e.length==0)return Tr;let r=n?Tr[0]:new ru,i=[r];for(let u=0;u<e.length;u++){let s=e[u].type.attrs;if(s){s.nodeName&&i.push(r=new ru(s.nodeName));for(let a in s){let o=s[a];o!=null&&(n&&i.length==1&&i.push(r=new ru(t.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+o:a=="style"?r.style=(r.style?r.style+";":"")+o:a!="nodeName"&&(r[a]=o))}}}return i}function X1(e,t,n,r){if(n==Tr&&r==Tr)return t;let i=t;for(let u=0;u<r.length;u++){let s=r[u],a=n[u];if(u){let o;a&&a.nodeName==s.nodeName&&i!=e&&(o=i.parentNode)&&o.nodeName.toLowerCase()==s.nodeName||(o=document.createElement(s.nodeName),o.pmIsDeco=!0,o.appendChild(i),a=Tr[0]),i=o}Uk(i,a||Tr[0],s)}return i}function Uk(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let u=0;u<r.length;u++)i.indexOf(r[u])==-1&&e.classList.remove(r[u]);for(let u=0;u<i.length;u++)r.indexOf(i[u])==-1&&e.classList.add(i[u]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(t.style);)e.style.removeProperty(i[1])}n.style&&(e.style.cssText+=n.style)}}function $1(e,t,n){return X1(e,e,Tr,Zl(t,n,e.nodeType!=1))}function aa(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Yh(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Wk{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=Kk(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r,i){let u=0,s=this.stack.length>>1,a=Math.min(s,t.length);for(;u<a&&(u==s-1?this.top:this.stack[u+1<<1]).matchesMark(t[u])&&t[u].type.spec.spanning!==!1;)u++;for(;u<s;)this.destroyRest(),this.top.dirty=Ft,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let o=-1,l=this.top.children.length;i<this.preMatch.index&&(l=Math.min(this.index+3,l));for(let c=this.index;c<l;c++){let d=this.top.children[c];if(d.matchesMark(t[s])&&!this.isLocked(d.dom)){o=c;break}}if(o>-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let c=Pr.create(this.top,t[s],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,r,i){let u=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))u=this.top.children.indexOf(s,this.index);else for(let a=this.index,o=Math.min(this.top.children.length,a+5);a<o;a++){let l=this.top.children[a];if(l.matchesNode(t,n,r)&&!this.preMatch.matched.has(l)){u=a;break}}return u<0?!1:(this.destroyBetween(this.index,u),this.index++,!0)}updateNodeAt(t,n,r,i,u){let s=this.top.children[i];return s.dirty==sn&&s.dom==s.contentDOM&&(s.dirty=yr),s.update(t,n,r,u)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=n}}updateNextNode(t,n,r,i,u,s){for(let a=this.index;a<this.top.children.length;a++){let o=this.top.children[a];if(o instanceof $n){let l=this.preMatch.matched.get(o);if(l!=null&&l!=u)return!1;let c=o.dom,d,f=this.isLocked(c)&&!(t.isText&&o.node&&o.node.isText&&o.nodeDOM.nodeValue==t.text&&o.dirty!=sn&&aa(n,o.outerDeco));if(!f&&o.update(t,n,r,i))return this.destroyBetween(this.index,a),o.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(o,t,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=yr,d.updateChildren(i,s+1),d.dirty=Ft),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,u,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!aa(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=$n.create(this.top,n,r,i,u,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let o of a.children)o.parent=a}return t.destroy(),a}addNode(t,n,r,i,u){let s=$n.create(this.top,t,n,r,i,u);s.contentDOM&&s.updateChildren(i,u+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(t)&&(t==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let u=new J1(this.top,t,n,r);this.top.children.splice(this.index++,0,u),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Pr;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof Ua)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((nt||je)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new j1(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function Kk(e,t){let n=t,r=n.children.length,i=e.childCount,u=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let l=n.children[r-1];if(l instanceof Pr)n=l,r=l.children.length;else{a=l,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let o=a.node;if(o){if(o!=e.child(i-1))break;--i,u.set(a,i),s.push(a)}}return{index:i,matched:u,matches:s.reverse()}}function zk(e,t){return e.type.side-t.type.side}function Qk(e,t,n,r){let i=t.locals(e),u=0;if(i.length==0){for(let l=0;l<e.childCount;l++){let c=e.child(l);r(c,i,t.forChild(u,c),l),u+=c.nodeSize}return}let s=0,a=[],o=null;for(let l=0;;){let c,d;for(;s<i.length&&i[s].to==u;){let E=i[s++];E.widget&&(c?(d||(d=[c])).push(E):c=E)}if(c)if(d){d.sort(zk);for(let E=0;E<d.length;E++)n(d[E],l,!!o)}else n(c,l,!!o);let f,p;if(o)p=-1,f=o,o=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let E=0;E<a.length;E++)a[E].to<=u&&a.splice(E--,1);for(;s<i.length&&i[s].from<=u&&i[s].to>u;)a.push(i[s++]);let m=u+f.nodeSize;if(f.isText){let E=m;s<i.length&&i[s].from<E&&(E=i[s].from);for(let g=0;g<a.length;g++)a[g].to<E&&(E=a[g].to);E<m&&(o=f.cut(E-u),f=f.cut(0,E-u),m=E,p=-1)}else for(;s<i.length&&i[s].to<m;)s++;let A=f.isInline&&!f.isLeaf?a.filter(E=>!E.inline):a.slice();r(f,A,t.forChild(u,f),p),u=m}}function Yk(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function qk(e,t,n,r){for(let i=0,u=0;i<e.childCount&&u<=r;){let s=e.child(i++),a=u;if(u+=s.nodeSize,!s.isText)continue;let o=s.text;for(;i<e.childCount;){let l=e.child(i++);if(u+=l.nodeSize,!l.isText)break;o+=l.text}if(u>=n){if(u>=r&&o.slice(r-t.length-a,r-a)==t)return r-t.length;let l=a<r?o.lastIndexOf(t,r-a-1):-1;if(l>=0&&l+t.length+a>=n)return a+l;if(n==r&&o.length>=r+t.length-a&&o.slice(r-a,r-a+t.length)==t)return r}}return-1}function Xl(e,t,n,r,i){let u=[];for(let s=0,a=0;s<e.length;s++){let o=e[s],l=a,c=a+=o.size;l>=n||c<=t?u.push(o):(l<t&&u.push(o.slice(0,t-l,r)),i&&(u.push(i),i=void 0),c>n&&u.push(o.slice(n-l,o.size,r)))}return u}function jc(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),u=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),o,l;if(Ha(n)){for(o=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&ie.isSelectable(d)&&i.parent&&!(d.isInline&&Ek(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;l=new ie(s==f?a:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);d=Math.min(d,e.docView.posFromDOM(m.startContainer,m.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[o,s]=f==e.state.selection.anchor?[f,d]:[d,f],a=r.resolve(s)}else o=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(o<0)return null}let c=r.resolve(o);if(!l){let d=t=="pointer"||e.state.selection.head<a.pos&&!u?1:-1;l=Zc(e,c,a,d)}return l}function eA(e){return e.editable?e.hasFocus():nA(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Sn(e,t=!1){let n=e.state.selection;if(tA(e,n),!!eA(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&je){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Lr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Vk(e);else{let{anchor:r,head:i}=n,u,s;qh&&!(n instanceof ae)&&(n.$from.parent.inlineContent||(u=Gh(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Gh(e,n.to))),e.docView.setSelection(r,i,e,t),qh&&(u&&Vh(u),s&&Vh(s)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Gk(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const qh=nt||je&&W1<63;function Gh(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,u=r?n.childNodes[r-1]:null;if(nt&&i&&i.contentEditable=="false")return No(i);if((!i||i.contentEditable=="false")&&(!u||u.contentEditable=="false")){if(i)return No(i);if(u)return No(u)}}function No(e){return e.contentEditable="true",nt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Vh(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Gk(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!eA(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function Vk(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,Je(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&Ct&&Xn<=11&&(n.disabled=!0,n.disabled=!1)}function tA(e,t){if(t instanceof ie){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Jh(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Jh(e)}function Jh(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Zc(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||ae.between(t,n,r)}function jh(e){return e.editable&&!e.hasFocus()?!1:nA(e)}function nA(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function Jk(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Lr(t.node,t.offset,n.anchorNode,n.anchorOffset)}function $l(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),u=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return u&&se.findFrom(u,t)}function Un(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Zh(e,t,n){let r=e.state.selection;if(r instanceof ae)if(n.indexOf("s")>-1){let{$head:i}=r,u=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!u||u.isText||!u.isLeaf)return!1;let s=e.state.doc.resolve(i.pos+u.nodeSize*(t<0?-1:1));return Un(e,new ae(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=$l(e.state,t);return i&&i instanceof ie?Un(e,i):!1}else if(!(Mt&&n.indexOf("m")>-1)){let i=r.$head,u=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,s;if(!u||u.isText)return!1;let a=t<0?i.pos-u.nodeSize:i.pos;return u.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?ie.isSelectable(u)?Un(e,new ie(t<0?e.state.doc.resolve(i.pos-u.nodeSize):i)):Xu?Un(e,new ae(e.state.doc.resolve(t<0?a:a+u.nodeSize))):!1:!1}}else return!1;else{if(r instanceof ie&&r.node.isInline)return Un(e,new ae(t>0?r.$to:r.$from));{let i=$l(e.state,t);return i?Un(e,i):!1}}}function oa(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function iu(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Gr(e,t){return t<0?jk(e):Zk(e)}function jk(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,u,s=!1;for(Pt&&n.nodeType==1&&r<oa(n)&&iu(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(iu(a,-1))i=n,u=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(rA(n))break;{let a=n.previousSibling;for(;a&&iu(a,-1);)i=n.parentNode,u=Je(a),a=a.previousSibling;if(a)n=a,r=oa(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?ec(e,n,r):i&&ec(e,i,u)}function Zk(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=oa(n),u,s;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(iu(a,1))u=n,s=++r;else break}else{if(rA(n))break;{let a=n.nextSibling;for(;a&&iu(a,1);)u=a.parentNode,s=Je(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=oa(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}u&&ec(e,u,s)}function rA(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Xk(e,t){for(;e&&t==e.childNodes.length&&!Zu(e);)t=Je(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function $k(e,t){for(;e&&!t&&!Zu(e);)t=Je(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function ec(e,t,n){if(t.nodeType!=3){let u,s;(s=Xk(t,n))?(t=s,n=0):(u=$k(t,n))&&(t=u,n=u.nodeValue.length)}let r=e.domSelection();if(!r)return;if(Ha(r)){let u=document.createRange();u.setEnd(t,n),u.setStart(t,n),r.removeAllRanges(),r.addRange(u)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&Sn(e)},50)}function Xh(e,t){let n=e.state.doc.resolve(t);if(!(je||K1)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let u=e.coordsAtPos(t-1),s=(u.top+u.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(u.left-i.left)>1)return u.left<i.left?"ltr":"rtl"}if(t<n.end()){let u=e.coordsAtPos(t+1),s=(u.top+u.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(u.left-i.left)>1)return u.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function $h(e,t,n){let r=e.state.selection;if(r instanceof ae&&!r.empty||n.indexOf("s")>-1||Mt&&n.indexOf("m")>-1)return!1;let{$from:i,$to:u}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=$l(e.state,t);if(s&&s instanceof ie)return Un(e,s)}if(!i.parent.inlineContent){let s=t<0?i:u,a=r instanceof Dt?se.near(s,t):se.findFrom(s,t);return a?Un(e,a):!1}return!1}function e0(e,t){if(!(e.state.selection instanceof ae))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let u=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(u&&!u.isText){let s=e.state.tr;return t<0?s.delete(n.pos-u.nodeSize,n.pos):s.delete(n.pos,n.pos+u.nodeSize),e.dispatch(s),!0}return!1}function t0(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function ex(e){if(!nt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;t0(e,r,"true"),setTimeout(()=>t0(e,r,"false"),20)}return!1}function tx(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function nx(e,t){let n=t.keyCode,r=tx(t);if(n==8||Mt&&n==72&&r=="c")return e0(e,-1)||Gr(e,-1);if(n==46&&!t.shiftKey||Mt&&n==68&&r=="c")return e0(e,1)||Gr(e,1);if(n==13||n==27)return!0;if(n==37||Mt&&n==66&&r=="c"){let i=n==37?Xh(e,e.state.selection.from)=="ltr"?-1:1:-1;return Zh(e,i,r)||Gr(e,i)}else if(n==39||Mt&&n==70&&r=="c"){let i=n==39?Xh(e,e.state.selection.from)=="ltr"?1:-1:1;return Zh(e,i,r)||Gr(e,i)}else{if(n==38||Mt&&n==80&&r=="c")return $h(e,-1,r)||Gr(e,-1);if(n==40||Mt&&n==78&&r=="c")return ex(e)||$h(e,1,r)||Gr(e,1);if(r==(Mt?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Xc(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:i,openEnd:u}=t;for(;i>1&&u>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,u--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||ar.fromSchema(e.state.schema),a=lA(),o=a.createElement("div");o.appendChild(s.serializeFragment(r,{document:a}));let l=o.firstChild,c,d=0;for(;l&&l.nodeType==1&&(c=oA[l.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let m=a.createElement(c[p]);for(;o.firstChild;)m.appendChild(o.firstChild);o.appendChild(m),d++}l=o.firstChild}l&&l.nodeType==1&&l.setAttribute("data-pm-slice",`${i} ${u}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
42
+
43
+ `);return{dom:o,text:f,slice:t}}function iA(e,t,n,r,i){let u=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let o=!!t&&(r||u||!n);if(o){if(e.someProp("transformPastedText",f=>{t=f(t,u||r,e)}),u)return a=new Y(H.from(e.state.schema.text(t.replace(/\r\n?/g,`
44
+ `))),0,0),e.someProp("transformPasted",f=>{a=f(a,e,!0)}),a;let d=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(d)a=d;else{let f=i.marks(),{schema:p}=e.state,m=ar.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(A=>{let E=s.appendChild(document.createElement("p"));A&&E.appendChild(m.serializeNode(p.text(A,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=sx(n),Xu&&ax(s);let l=s&&s.querySelector("[data-pm-slice]"),c=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Hc.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(o||c),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!rx.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=ox(n0(a,+c[1],+c[2]),c[4]);else if(a=Y.maxOpen(ix(a.content,i),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d<a.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=a.content.lastChild;f<a.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);a=n0(a,d,f)}return e.someProp("transformPasted",d=>{a=d(a,e,o)}),a}const rx=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function ix(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),u,s=[];if(e.forEach(a=>{if(!s)return;let o=i.findWrapping(a.type),l;if(!o)return s=null;if(l=s.length&&u.length&&sA(o,u,a,s[s.length-1],0))s[s.length-1]=l;else{s.length&&(s[s.length-1]=aA(s[s.length-1],u.length));let c=uA(a,o);s.push(c),i=i.matchType(c.type),u=o}}),s)return H.from(s)}return e}function uA(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,H.from(e));return e}function sA(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let u=sA(e,t,n,r.lastChild,i+1);if(u)return r.copy(r.content.replaceChild(r.childCount-1,u));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(H.from(uA(n,e,i+1))))}}function aA(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,aA(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(H.empty,!0);return e.copy(n.append(r))}function tc(e,t,n,r,i,u){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(u=0),i<r-1&&(a=tc(a,t,n,r,i+1,u)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,u<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(H.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function n0(e,t,n){return t<e.openStart&&(e=new Y(tc(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Y(tc(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const oA={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let r0=null;function lA(){return r0||(r0=document.implementation.createHTMLDocument("title"))}let Do=null;function ux(e){let t=window.trustedTypes;return t?(Do||(Do=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Do.createHTML(e)):e}function sx(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=lA().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&oA[r[1].toLowerCase()])&&(e=i.map(u=>"<"+u+">").join("")+e+i.map(u=>"</"+u+">").reverse().join("")),n.innerHTML=ux(e),i)for(let u=0;u<i.length;u++)n=n.querySelector(i[u])||n;return n}function ax(e){let t=e.querySelectorAll(je?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function ox(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:u,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let o=n.nodes[r[a]];if(!o||o.hasRequiredAttrs())break;i=H.from(o.create(r[a+1],i)),u++,s++}return new Y(i,u,s)}const ct={},dt={},lx={touchstart:!0,touchmove:!0};class cx{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function dx(e){for(let t in ct){let n=ct[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{hx(e,r)&&!$c(e,r)&&(e.editable||!(r.type in dt))&&n(e,r)},lx[t]?{passive:!0}:void 0)}nt&&e.dom.addEventListener("input",()=>null),nc(e)}function Gn(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function fx(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function nc(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>$c(e,r))})}function $c(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function hx(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function px(e,t){!$c(e,t)&&ct[t.type]&&(e.editable||!(t.type in dt))&&ct[t.type](e,t)}dt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!dA(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(wn&&je&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Ai&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,br(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||nx(e,n)?n.preventDefault():Gn(e,"key")};dt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};dt.keypress=(e,t)=>{let n=t;if(dA(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Mt&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof ae)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),u=()=>e.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,i,u))&&e.dispatch(u()),n.preventDefault()}};function Wa(e){return{left:e.clientX,top:e.clientY}}function mx(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function ed(e,t,n,r,i){if(r==-1)return!1;let u=e.state.doc.resolve(r);for(let s=u.depth+1;s>0;s--)if(e.someProp(t,a=>s>u.depth?a(e,n,u.nodeAfter,u.before(s),i,!0):a(e,n,u.node(s),u.before(s),i,!1)))return!0;return!1}function ni(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function Ax(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&ie.isSelectable(r)?(ni(e,new ie(n)),!0):!1}function gx(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof ie&&(r=n.node);let u=e.state.doc.resolve(t);for(let s=u.depth+1;s>0;s--){let a=s>u.depth?u.nodeAfter:u.node(s);if(ie.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&u.before(n.$from.depth+1)==n.$from.pos?i=u.before(n.$from.depth):i=u.before(s);break}}return i!=null?(ni(e,ie.create(e.state.doc,i)),!0):!1}function bx(e,t,n,r,i){return ed(e,"handleClickOn",t,n,r)||e.someProp("handleClick",u=>u(e,t,r))||(i?gx(e,n):Ax(e,n))}function Ex(e,t,n,r){return ed(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function yx(e,t,n,r){return ed(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||Tx(e,n,r)}function Tx(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(ni(e,ae.create(r,0,r.content.size)),!0):!1;let i=r.resolve(t);for(let u=i.depth+1;u>0;u--){let s=u>i.depth?i.nodeAfter:i.node(u),a=i.before(u);if(s.inlineContent)ni(e,ae.create(r,a+1,a+1+s.content.size));else if(ie.isSelectable(s))ni(e,ie.create(r,a));else continue;return!0}}function td(e){return la(e)}const cA=Mt?"metaKey":"ctrlKey";ct.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=td(e),i=Date.now(),u="singleClick";i-e.input.lastClick.time<500&&mx(n,e.input.lastClick)&&!n[cA]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?u="doubleClick":e.input.lastClick.type=="doubleClick"&&(u="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:u,button:n.button};let s=e.posAtCoords(Wa(n));s&&(u=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Cx(e,s,n,!!r)):(u=="doubleClick"?Ex:yx)(e,s.pos,s.inside,n)?n.preventDefault():Gn(e,"pointer"))};class Cx{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[cA],this.allowDefault=r.shiftKey;let u,s;if(n.inside>-1)u=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);u=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,o=a?t.docView.nearestDesc(a,!0):null;this.target=o&&o.nodeDOM.nodeType==1?o.nodeDOM:null;let{selection:l}=t.state;r.button==0&&(u.type.spec.draggable&&u.type.spec.selectable!==!1||l instanceof ie&&l.from<=s&&l.to>s)&&(this.mightDrag={node:u,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Pt&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Gn(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Sn(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Wa(t))),this.updateAllowDefault(t),this.allowDefault||!n?Gn(this.view,"pointer"):bx(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||nt&&this.mightDrag&&!this.mightDrag.node.isAtom||je&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ni(this.view,se.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Gn(this.view,"pointer")}move(t){this.updateAllowDefault(t),Gn(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}ct.touchstart=e=>{e.input.lastTouch=Date.now(),td(e),Gn(e,"pointer")};ct.touchmove=e=>{e.input.lastTouch=Date.now(),Gn(e,"pointer")};ct.contextmenu=e=>td(e);function dA(e,t){return e.composing?!0:nt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const kx=wn?5e3:-1;dt.compositionstart=dt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof ae&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||je&&K1&&xx(e)))e.markCursor=e.state.storedMarks||n.marks(),la(e,!0),e.markCursor=null;else if(la(e,!t.selection.empty),Pt&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,u=r.focusOffset;i&&i.nodeType==1&&u!=0;){let s=u<0?i.lastChild:i.childNodes[u-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,u=-1}}e.input.composing=!0}fA(e,kx)};function xx(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}dt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,fA(e,20))};function fA(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>la(e),t))}function hA(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Ix());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function wx(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=gk(t.focusNode,t.focusOffset),r=bk(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,u=e.domObserver.lastChangedTextNode;if(n==u||r==u)return u;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function Ix(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function la(e,t=!1){if(!(wn&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),hA(e),t||e.docView&&e.docView.dirty){let n=jc(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function Sx(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const Tu=Ct&&Xn<15||Ai&&Ck<604;ct.copy=dt.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let u=Tu?null:n.clipboardData,s=r.content(),{dom:a,text:o}=Xc(e,s);u?(n.preventDefault(),u.clearData(),u.setData("text/html",a.innerHTML),u.setData("text/plain",o)):Sx(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Nx(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Dx(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Cu(e,r.value,null,i,t):Cu(e,r.textContent,r.innerHTML,i,t)},50)}function Cu(e,t,n,r,i){let u=iA(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",o=>o(e,i,u||Y.empty)))return!0;if(!u)return!1;let s=Nx(u),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(u);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function pA(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}dt.paste=(e,t)=>{let n=t;if(e.composing&&!wn)return;let r=Tu?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Cu(e,pA(r),r.getData("text/html"),i,n)?n.preventDefault():Dx(e,n)};class mA{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const _x=Mt?"altKey":"ctrlKey";function AA(e,t){let n;return e.someProp("dragCopies",r=>{n=n||r(t)}),n!=null?!n:!t[_x]}ct.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,u=i.empty?null:e.posAtCoords(Wa(n)),s;if(!(u&&u.pos>=i.from&&u.pos<=(i instanceof ie?i.to-1:i.to))){if(r&&r.mightDrag)s=ie.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=ie.create(e.state.doc,d.posBefore))}}let a=(s||e.state.selection).content(),{dom:o,text:l,slice:c}=Xc(e,a);(!n.dataTransfer.files.length||!je||W1>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Tu?"Text":"text/html",o.innerHTML),n.dataTransfer.effectAllowed="copyMove",Tu||n.dataTransfer.setData("text/plain",l),e.dragging=new mA(c,AA(e,n),s)};ct.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};dt.dragover=dt.dragenter=(e,t)=>t.preventDefault();dt.drop=(e,t)=>{try{Ox(e,t,e.dragging)}finally{e.dragging=null}};function Ox(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Wa(t));if(!r)return;let i=e.state.doc.resolve(r.pos),u=n&&n.slice;u?e.someProp("transformPasted",p=>{u=p(u,e,!1)}):u=iA(e,pA(t.dataTransfer),Tu?null:t.dataTransfer.getData("text/html"),!1,i);let s=!!(n&&AA(e,t));if(e.someProp("handleDrop",p=>p(e,t,u||Y.empty,s))){t.preventDefault();return}if(!u)return;t.preventDefault();let a=u?uC(e.state.doc,i.pos,u):i.pos;a==null&&(a=i.pos);let o=e.state.tr;if(s){let{node:p}=n;p?p.replace(o):o.deleteSelection()}let l=o.mapping.map(a),c=u.openStart==0&&u.openEnd==0&&u.content.childCount==1,d=o.doc;if(c?o.replaceRangeWith(l,l,u.content.firstChild):o.replaceRange(l,l,u),o.doc.eq(d))return;let f=o.doc.resolve(l);if(c&&ie.isSelectable(u.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(u.content.firstChild))o.setSelection(new ie(f));else{let p=o.mapping.map(a);o.mapping.maps[o.mapping.maps.length-1].forEach((m,A,E,g)=>p=g),o.setSelection(Zc(e,f,o.doc.resolve(p)))}e.focus(),e.dispatch(o.setMeta("uiEvent","drop"))}ct.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Sn(e)},20))};ct.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};ct.beforeinput=(e,t)=>{if(je&&wn&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",u=>u(e,br(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in dt)ct[e]=dt[e];function ku(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class ca{constructor(t,n){this.toDOM=t,this.spec=n||wr,this.side=this.spec.side||0}map(t,n,r,i){let{pos:u,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Ze(u-r,u-r,this)}valid(){return!0}eq(t){return this==t||t instanceof ca&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ku(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class er{constructor(t,n){this.attrs=t,this.spec=n||wr}map(t,n,r,i){let u=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return u>=s?null:new Ze(u,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof er&&ku(this.attrs,t.attrs)&&ku(this.spec,t.spec)}static is(t){return t.type instanceof er}destroy(){}}class nd{constructor(t,n){this.attrs=t,this.spec=n||wr}map(t,n,r,i){let u=t.mapResult(n.from+i,1);if(u.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=u.pos?null:new Ze(u.pos-r,s.pos-r,this)}valid(t,n){let{index:r,offset:i}=t.content.findIndex(n.from),u;return i==n.from&&!(u=t.child(r)).isText&&i+u.nodeSize==n.to}eq(t){return this==t||t instanceof nd&&ku(this.attrs,t.attrs)&&ku(this.spec,t.spec)}destroy(){}}class Ze{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new Ze(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new Ze(t,t,new ca(n,r))}static inline(t,n,r,i){return new Ze(t,n,new er(r,i))}static node(t,n,r,i){return new Ze(t,n,new nd(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof er}get widget(){return this.type instanceof ca}}const jr=[],wr={};class _e{constructor(t,n){this.local=t.length?t:jr,this.children=n.length?n:jr}static create(t,n){return n.length?da(n,t,0,wr):$e}find(t,n,r){let i=[];return this.findInner(t??0,n??1e9,i,0,r),i}findInner(t,n,r,i,u){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!u||u(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,i+a,u)}}map(t,n,r){return this==$e||t.maps.length==0?this:this.mapInner(t,n,0,0,r||wr)}mapInner(t,n,r,i,u){let s;for(let a=0;a<this.local.length;a++){let o=this.local[a].map(t,r,i);o&&o.type.valid(n,o)?(s||(s=[])).push(o):u.onRemove&&u.onRemove(this.local[a].spec)}return this.children.length?Rx(this.children,s||[],t,n,r,i,u):s?new _e(s.sort(Ir),jr):$e}add(t,n){return n.length?this==$e?_e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,u=0;t.forEach((a,o)=>{let l=o+r,c;if(c=bA(n,a,l)){for(i||(i=this.children.slice());u<i.length&&i[u]<o;)u+=3;i[u]==o?i[u+2]=i[u+2].addInner(a,c,l+1):i.splice(u,0,o,o+a.nodeSize,da(c,a,l+1,wr)),u+=3}});let s=gA(u?EA(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new _e(s.length?this.local.concat(s).sort(Ir):this.local,i||this.children)}remove(t){return t.length==0||this==$e?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let u=0;u<r.length;u+=3){let s,a=r[u]+n,o=r[u+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>a&&d.to<o&&(t[c]=null,(s||(s=[])).push(d));if(!s)continue;r==this.children&&(r=this.children.slice());let l=r[u+2].removeInner(s,a+1);l!=$e?r[u+2]=l:(r.splice(u,3),u-=3)}if(i.length){for(let u=0,s;u<t.length;u++)if(s=t[u])for(let a=0;a<i.length;a++)i[a].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new _e(i,r):$e}forChild(t,n){if(this==$e)return this;if(n.isLeaf)return _e.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let u=t+1,s=u+n.content.size;for(let a=0;a<this.local.length;a++){let o=this.local[a];if(o.from<s&&o.to>u&&o.type instanceof er){let l=Math.max(u,o.from)-u,c=Math.min(s,o.to)-u;l<c&&(i||(i=[])).push(o.copy(l,c))}}if(i){let a=new _e(i.sort(Ir),jr);return r?new zn([a,r]):a}return r||$e}eq(t){if(this==t)return!0;if(!(t instanceof _e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return rd(this.localsInner(t))}localsInner(t){if(this==$e)return jr;if(t.inlineContent||!this.local.some(er.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof er||n.push(this.local[r]);return n}forEachSet(t){t(this)}}_e.empty=new _e([],[]);_e.removeOverlap=rd;const $e=_e.empty;class zn{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,wr));return zn.from(r)}forChild(t,n){if(n.isLeaf)return _e.empty;let r=[];for(let i=0;i<this.members.length;i++){let u=this.members[i].forChild(t,n);u!=$e&&(u instanceof zn?r=r.concat(u.members):r.push(u))}return zn.from(r)}eq(t){if(!(t instanceof zn)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let u=this.members[i].localsInner(t);if(u.length)if(!n)n=u;else{r&&(n=n.slice(),r=!1);for(let s=0;s<u.length;s++)n.push(u[s])}}return n?rd(r?n:n.sort(Ir)):jr}static from(t){switch(t.length){case 0:return $e;case 1:return t[0];default:return new zn(t.every(n=>n instanceof _e)?t:t.reduce((n,r)=>n.concat(r instanceof _e?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function Rx(e,t,n,r,i,u,s){let a=e.slice();for(let l=0,c=u;l<n.maps.length;l++){let d=0;n.maps[l].forEach((f,p,m,A)=>{let E=A-m-(p-f);for(let g=0;g<a.length;g+=3){let N=a[g+1];if(N<0||f>N+c-d)continue;let w=a[g]+c-d;p>=w?a[g+1]=f<=w?-2:-1:f>=c&&E&&(a[g]+=E,a[g+1]+=E)}d+=E}),c=n.maps[l].map(c,-1)}let o=!1;for(let l=0;l<a.length;l+=3)if(a[l+1]<0){if(a[l+1]==-2){o=!0,a[l+1]=-1;continue}let c=n.map(e[l]+u),d=c-i;if(d<0||d>=r.content.size){o=!0;continue}let f=n.map(e[l+1]+u,-1),p=f-i,{index:m,offset:A}=r.content.findIndex(d),E=r.maybeChild(m);if(E&&A==d&&A+E.nodeSize==p){let g=a[l+2].mapInner(n,E,c+1,e[l]+u+1,s);g!=$e?(a[l]=d,a[l+1]=p,a[l+2]=g):(a[l+1]=-2,o=!0)}else o=!0}if(o){let l=Mx(a,e,t,n,i,u,s),c=da(l,r,0,s);t=c.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let p=c.children[d];for(;f<a.length&&a[f]<p;)f+=3;a.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new _e(t.sort(Ir),a)}function gA(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Ze(i.from+t,i.to+t,i.type))}return n}function Mx(e,t,n,r,i,u,s){function a(o,l){for(let c=0;c<o.local.length;c++){let d=o.local[c].map(r,i,l);d?n.push(d):s.onRemove&&s.onRemove(o.local[c].spec)}for(let c=0;c<o.children.length;c+=3)a(o.children[c+2],o.children[c]+l+1)}for(let o=0;o<e.length;o+=3)e[o+1]==-1&&a(e[o+2],t[o]+u+1);return n}function bA(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let u=0,s;u<e.length;u++)(s=e[u])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),e[u]=null);return i}function EA(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function da(e,t,n,r){let i=[],u=!1;t.forEach((a,o)=>{let l=bA(e,a,o+n);if(l){u=!0;let c=da(l,a,n+o+1,r);c!=$e&&i.push(o,o+a.nodeSize,c)}});let s=gA(u?EA(e):e,-n).sort(Ir);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new _e(s,i):$e}function Ir(e,t){return e.from-t.from||e.to-t.to}function rd(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let u=t[i];if(u.from==r.from){u.to!=r.to&&(t==e&&(t=e.slice()),t[i]=u.copy(u.from,r.to),i0(t,i+1,u.copy(r.to,u.to)));continue}else{u.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,u.from),i0(t,i,r.copy(u.from,r.to)));break}}}return t}function i0(e,t,n){for(;t<e.length&&Ir(n,e[t])>0;)t++;e.splice(t,0,n)}function _o(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=$e&&t.push(r)}),e.cursorWrapper&&t.push(_e.create(e.state.doc,[e.cursorWrapper.deco])),zn.from(t)}const Bx={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},vx=Ct&&Xn<=11;class Lx{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class Px{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Lx,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Ct&&Xn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():nt&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),vx&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Bx)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(jh(this.view)){if(this.suppressingSelectionUpdates)return Sn(this.view);if(Ct&&Xn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Lr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let u=t.focusNode;u;u=mi(u))n.add(u);for(let u=t.anchorNode;u;u=mi(u))if(n.has(u)){r=u;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&jh(t)&&!this.ignoreSelectionChange(r),u=-1,s=-1,a=!1,o=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],o);d&&(u=u<0?d.from:Math.min(d.from,u),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(o.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of o)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){c.parentNode.removeChild(c);break}d=d.firstChild}}}else if(Pt&&o.length){let c=o.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||Ux(t,d)!=p)&&f.remove()}}}let l=null;u<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&Ha(r)&&(l=jc(t))&&l.eq(se.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Sn(t),this.currentSelection.set(r),t.scrollToSelection()):(u>-1||i)&&(u>-1&&(t.docView.markDirty(u,s),Fx(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,Wx(t,o)),this.handleDOMChange(u,s,a,o),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Sn(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,u=t.nextSibling;if(Ct&&Xn<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=t.addedNodes[c];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(i=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(u=f)}let s=i&&i.parentNode==t.target?Je(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),o=u&&u.parentNode==t.target?Je(u):t.target.childNodes.length,l=r.localPosFromDOM(t.target,o,1);return{from:a,to:l}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let u0=new WeakMap,s0=!1;function Fx(e){if(!u0.has(e)&&(u0.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Pt,s0)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),s0=!0}}function a0(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,u=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Lr(s.node,s.offset,i,u)&&([n,r,i,u]=[i,u,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:u}}function Hx(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return a0(e,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?a0(e,n):null}function Ux(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function Wx(e,t){var n;let{focusNode:r,focusOffset:i}=e.domSelectionRange();for(let u of t)if(((n=u.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=u.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let a=s;for(;;){let o=a.firstChild;if(!o||o.nodeType!=1||o.contentEditable=="false"||/^(BR|IMG)$/.test(o.nodeName))break;a=o}a.insertBefore(u,a.firstChild),r==u&&e.domSelection().collapse(u,i)}else u.parentNode.removeChild(u)}}function Kx(e,t,n){let{node:r,fromOffset:i,toOffset:u,from:s,to:a}=e.docView.parseRange(t,n),o=e.domSelectionRange(),l,c=o.anchorNode;if(c&&e.dom.contains(c.nodeType==1?c:c.parentNode)&&(l=[{node:c,offset:o.anchorOffset}],Ha(o)||l.push({node:o.focusNode,offset:o.focusOffset})),je&&e.input.lastKeyCode===8)for(let E=u;E>i;E--){let g=r.childNodes[E-1],N=g.pmViewDesc;if(g.nodeName=="BR"&&!N){u=E;break}if(!N||N.size)break}let d=e.state.doc,f=e.someProp("domParser")||Hc.fromSchema(e.state.schema),p=d.resolve(s),m=null,A=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:u,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:l,ruleFromNode:zx,context:p});if(l&&l[0].pos!=null){let E=l[0].pos,g=l[1]&&l[1].pos;g==null&&(g=E),m={anchor:E+s,head:g+s}}return{doc:A,sel:m,from:s,to:a}}function zx(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(nt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||nt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Qx=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Yx(e,t,n,r,i){let u=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let O=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,z=jc(e,O);if(z&&!e.state.selection.eq(z)){if(je&&wn&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",k=>k(e,br(13,"Enter"))))return;let R=e.state.tr.setSelection(z);O=="pointer"?R.setMeta("pointer",!0):O=="key"&&R.scrollIntoView(),u&&R.setMeta("composition",u),e.dispatch(R)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let o=e.state.selection,l=Kx(e,t,n),c=e.state.doc,d=c.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p="end"):(f=e.state.selection.from,p="start"),e.input.lastKeyCode=null;let m=Vx(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(Ai&&e.input.lastIOSEnter>Date.now()-225||wn)&&i.some(O=>O.nodeType==1&&!Qx.test(O.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",O=>O(e,br(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&o instanceof ae&&!o.empty&&o.$head.sameParent(o.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:o.from,endA:o.to,endB:o.to};else{if(l.sel){let O=o0(e,e.state.doc,l.sel);if(O&&!O.eq(e.state.selection)){let z=e.state.tr.setSelection(O);u&&z.setMeta("composition",u),e.dispatch(z)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof ae&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),Ct&&Xn<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let A=l.doc.resolveNoCache(m.start-l.from),E=l.doc.resolveNoCache(m.endB-l.from),g=c.resolve(m.start),N=A.sameParent(E)&&A.parent.inlineContent&&g.end()>=m.endA;if((Ai&&e.input.lastIOSEnter>Date.now()-225&&(!N||i.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!N&&A.pos<l.doc.content.size&&(!A.sameParent(E)||!A.parent.inlineContent)&&A.pos<E.pos&&!/\S/.test(l.doc.textBetween(A.pos,E.pos,"","")))&&e.someProp("handleKeyDown",O=>O(e,br(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&Gx(c,m.start,m.endA,A,E)&&e.someProp("handleKeyDown",O=>O(e,br(8,"Backspace")))){wn&&je&&e.domObserver.suppressSelectionUpdates();return}je&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),wn&&!N&&A.start()!=E.start()&&E.parentOffset==0&&A.depth==E.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,E=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp("handleKeyDown",function(O){return O(e,br(13,"Enter"))})},20));let w=m.start,_=m.endA,S=O=>{let z=O||e.state.tr.replace(w,_,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let R=o0(e,z.doc,l.sel);R&&!(je&&e.composing&&R.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(R.head==w||R.head==z.mapping.map(_)-1)||Ct&&R.empty&&R.head==w)&&z.setSelection(R)}return u&&z.setMeta("composition",u),z.scrollIntoView()},x;if(N)if(A.pos==E.pos){Ct&&Xn<=11&&A.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Sn(e),20));let O=S(e.state.tr.delete(w,_)),z=c.resolve(m.start).marksAcross(c.resolve(m.endA));z&&O.ensureMarks(z),e.dispatch(O)}else if(m.endA==m.endB&&(x=qx(A.parent.content.cut(A.parentOffset,E.parentOffset),g.parent.content.cut(g.parentOffset,m.endA-g.start())))){let O=S(e.state.tr);x.type=="add"?O.addMark(w,_,x.mark):O.removeMark(w,_,x.mark),e.dispatch(O)}else if(A.parent.child(A.index()).isText&&A.index()==E.index()-(E.textOffset?0:1)){let O=A.parent.textBetween(A.parentOffset,E.parentOffset),z=()=>S(e.state.tr.insertText(O,w,_));e.someProp("handleTextInput",R=>R(e,w,_,O,z))||e.dispatch(z())}else e.dispatch(S());else e.dispatch(S())}function o0(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Zc(e,t.resolve(n.anchor),t.resolve(n.head))}function qx(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,u=r,s,a,o;for(let c=0;c<r.length;c++)i=r[c].removeFromSet(i);for(let c=0;c<n.length;c++)u=n[c].removeFromSet(u);if(i.length==1&&u.length==0)a=i[0],s="add",o=c=>c.mark(a.addToSet(c.marks));else if(i.length==0&&u.length==1)a=u[0],s="remove",o=c=>c.mark(a.removeFromSet(c.marks));else return null;let l=[];for(let c=0;c<t.childCount;c++)l.push(o(t.child(c)));if(H.from(l).eq(e))return{mark:a,type:s}}function Gx(e,t,n,r,i){if(n-t<=i.pos-r.pos||Oo(r,!0,!1)<i.pos)return!1;let u=e.resolve(t);if(!r.parent.isTextblock){let a=u.nodeAfter;return a!=null&&n==t+a.nodeSize}if(u.parentOffset<u.parent.content.size||!u.parent.isTextblock)return!1;let s=e.resolve(Oo(u,!0,!0));return!s.parent.isTextblock||s.pos>n||Oo(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Oo(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let u=e.node(r).maybeChild(e.indexAfter(r));for(;u&&!u.isLeaf;)u=u.firstChild,i++}return i}function Vx(e,t,n,r,i){let u=e.findDiffStart(t,n);if(u==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(i=="end"){let o=Math.max(0,u-Math.min(s,a));r-=s+o-u}if(s<u&&e.size<t.size){let o=r<=u&&r>=s?u-r:0;u-=o,u&&u<t.size&&l0(t.textBetween(u-1,u+1))&&(u+=o?1:-1),a=u+(a-s),s=u}else if(a<u){let o=r<=u&&r>=a?u-r:0;u-=o,u&&u<e.size&&l0(e.textBetween(u-1,u+1))&&(u+=o?1:-1),s=u+(s-a),a=u}return{start:u,endA:s,endB:a}}function l0(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class yA{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new cx,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(p0),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=f0(this),d0(this),this.nodeViews=h0(this),this.docView=Qh(this.state.doc,c0(this),_o(this),this.dom,this),this.domObserver=new Px(this,(r,i,u,s)=>Yx(this,r,i,u,s)),this.domObserver.start(),dx(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&nc(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(p0),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,u=!1,s=!1;t.storedMarks&&this.composing&&(hA(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=h0(this);jx(p,this.nodeViews)&&(this.nodeViews=p,u=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&nc(this),this.editable=f0(this),d0(this);let o=_o(this),l=c0(this),c=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=u||!this.docView.matchesNode(t.doc,l,o);(d||!t.selection.eq(i.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&wk(this);if(s){this.domObserver.stop();let p=d&&(Ct||je)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&Jx(i.selection,t.selection);if(d){let m=je?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=wx(this)),(u||!this.docView.update(t.doc,l,o,this))&&(this.docView.updateOuterDeco(l),this.docView.destroy(),this.docView=Qh(t.doc,l,o,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Jk(this))?Sn(this,p):(tA(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&Ik(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof ie){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Fh(this,n.getBoundingClientRect(),t)}else Fh(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,i=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let u=r.from+(this.state.doc.content.size-n.doc.content.size);(u>0&&u<this.state.doc.content.size&&this.state.doc.nodeAt(u))==r.node&&(i=u)}this.dragging=new mA(t.slice,t.move,i<0?void 0:ie.create(this.state.doc,i))}someProp(t,n){let r=this._props&&this._props[t],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(i=n?n(a):a))return i}let u=this.state.plugins;if(u)for(let s=0;s<u.length;s++){let a=u[s].props[t];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(Ct){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Sk(this.dom),Sn(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return Rk(this,t)}coordsAtPos(t,n=1){return G1(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return Pk(this,n||this.state,t)}pasteHTML(t,n){return Cu(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Cu(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Xc(this,t)}destroy(){this.docView&&(fx(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],_o(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,mk())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return px(this,t)}domSelectionRange(){let t=this.domSelection();return t?nt&&this.root.nodeType===11&&yk(this.dom.ownerDocument)==this.dom&&Hx(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}yA.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function c0(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Ze.node(0,e.state.doc.content.size,t)]}function d0(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Ze.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function f0(e){return!e.someProp("editable",t=>t(e.state)===!1)}function Jx(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function h0(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function jx(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function p0(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}function Rn(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}var TA={text:(e,t,n,r)=>{const i=e.value;return/^[^*_\\]*\s+$/.test(i)?i:n.safe(i,{...r,encode:[]})},strong:(e,t,n,r)=>{const i=e.marker||n.options.strong||"*",u=n.enter("strong"),s=n.createTracker(r);let a=s.move(i+i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i+i),u(),a},emphasis:(e,t,n,r)=>{const i=e.marker||n.options.emphasis||"*",u=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i),u(),a}},Nn=he({},"editorView"),ji=he({},"editorState"),Ro=he([],"initTimer"),m0=he({},"editor"),xu=he([],"inputRules"),Fr=he([],"prosePlugins"),wu=he([],"remarkPlugins"),Iu=he([],"nodeView"),Su=he([],"markView"),Sr=he(Pl().use(Ol).use(Bl),"remark"),uu=he({handlers:TA,encode:[]},"remarkStringifyOptions"),Hs=ln("ConfigReady");function Zx(e){const t=n=>(n.record(Hs),async()=>(await e(n),n.done(Hs),()=>{n.clearTimer(Hs)}));return Rn(t,{displayName:"Config"}),t}var ri=ln("InitReady");function Xx(e){const t=n=>(n.inject(m0,e).inject(Fr,[]).inject(wu,[]).inject(xu,[]).inject(Iu,[]).inject(Su,[]).inject(uu,{handlers:TA,encode:[]}).inject(Sr,Pl().use(Ol).use(Bl)).inject(Ro,[Hs]).record(ri),async()=>{await n.waitTimers(Ro);const r=n.get(uu);return n.set(Sr,Pl().use(Ol).use(Bl,r)),n.done(ri),()=>{n.remove(m0).remove(Fr).remove(wu).remove(xu).remove(Iu).remove(Su).remove(uu).remove(Sr).remove(Ro).clearTimer(ri)}});return Rn(t,{displayName:"Init"}),t}var lt=ln("SchemaReady"),Mo=he([],"schemaTimer"),qt=he({},"schema"),su=he([],"nodes"),au=he([],"marks");function A0(e){return{...e,parseDOM:e.parseDOM?.map(t=>({priority:e.priority,...t}))}}var CA=e=>(e.inject(qt,{}).inject(su,[]).inject(au,[]).inject(Mo,[ri]).record(lt),async()=>{await e.waitTimers(Mo);const t=e.get(Sr),n=e.get(wu).reduce((s,a)=>s.use(a.plugin,a.options),t);e.set(Sr,n);const r=Object.fromEntries(e.get(su).map(([s,a])=>[s,A0(a)])),i=Object.fromEntries(e.get(au).map(([s,a])=>[s,A0(a)])),u=new BT({nodes:r,marks:i});return e.set(qt,u),e.done(lt),()=>{e.remove(qt).remove(su).remove(au).remove(Mo).clearTimer(lt)}});Rn(CA,{displayName:"Schema"});var kA=class{constructor(){this.#t=new om,this.#e=null,this.setCtx=e=>{this.#e=e},this.chain=()=>{if(this.#e==null)throw ro();const e=this.#e,t=[],n=this.get.bind(this),r={run:()=>{const u=Ci(...t),s=e.get(Nn);return u(s.state,s.dispatch,s)},inline:u=>(t.push(u),r),pipe:i.bind(this)};function i(u,s){const a=n(u);return t.push(a(s)),r}return r}}#t;#e;get ctx(){return this.#e}create(e,t){const n=e.create(this.#t.sliceMap);return n.set(t),n}get(e){return this.#t.get(e).get()}remove(e){return this.#t.remove(e)}call(e,t){if(this.#e==null)throw ro();const n=this.get(e)(t),r=this.#e.get(Nn);return n(r.state,r.dispatch,r)}inline(e){if(this.#e==null)throw ro();const t=this.#e.get(Nn);return e(t.state,t.dispatch,t)}};function $x(e="cmdKey"){return he((()=>()=>!1),e)}var Ce=he(new kA,"commands"),Bo=he([lt],"commandsTimer"),ou=ln("CommandsReady"),xA=e=>{const t=new kA;return t.setCtx(e),e.inject(Ce,t).inject(Bo,[lt]).record(ou),async()=>(await e.waitTimers(Bo),e.done(ou),()=>{e.remove(Ce).remove(Bo).clearTimer(ou)})};Rn(xA,{displayName:"Commands"});function ew(e){return e.Backspace=Ci(LC,Qc,mC,y1),e}var wA=class{constructor(){this.#t=null,this.#e=[],this.setCtx=e=>{this.#t=e},this.add=e=>(this.#e.push(e),()=>{this.#e=this.#e.filter(t=>t!==e)}),this.addObjectKeymap=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{if(typeof r=="function"){const i={key:n,onRun:()=>r};this.#e.push(i),t.push(()=>{this.#e=this.#e.filter(u=>u!==i)})}else this.#e.push(r),t.push(()=>{this.#e=this.#e.filter(i=>i!==r)})}),()=>{t.forEach(n=>n())}},this.addBaseKeymap=()=>{const e=ew(RC);return this.addObjectKeymap(e)},this.build=()=>{const e={};return this.#e.forEach(t=>{e[t.key]=[...e[t.key]||[],t]}),Object.fromEntries(Object.entries(e).map(([t,n])=>{const r=n.sort((u,s)=>(s.priority??50)-(u.priority??50));return[t,(u,s,a)=>{const o=this.#t;if(o==null)throw Na();const l=r.map(c=>c.onRun(o));return Ci(...l)(u,s,a)}]}))}}#t;#e;get ctx(){return this.#t}},fa=he(new wA,"keymap"),vo=he([lt],"keymapTimer"),lu=ln("KeymapReady"),tw=e=>{const t=new wA;return t.setCtx(e),e.inject(fa,t).inject(vo,[lt]).record(lu),async()=>(await e.waitTimers(vo),e.done(lu),()=>{e.remove(fa).remove(vo).clearTimer(lu)})},Us=ln("ParserReady"),IA=(()=>{throw Na()}),Ws=he(IA,"parser"),Lo=he([],"parserTimer"),SA=e=>(e.inject(Ws,IA).inject(Lo,[lt]).record(Us),async()=>{await e.waitTimers(Lo);const t=e.get(Sr),n=e.get(qt);return e.set(Ws,fk.create(n,t)),e.done(Us),()=>{e.remove(Ws).remove(Lo).clearTimer(Us)}});Rn(SA,{displayName:"Parser"});var Ks=ln("SerializerReady"),Po=he([],"serializerTimer"),NA=(()=>{throw Na()}),zs=he(NA,"serializer"),DA=e=>(e.inject(zs,NA).inject(Po,[lt]).record(Ks),async()=>{await e.waitTimers(Po);const t=e.get(Sr),n=e.get(qt);return e.set(zs,pk.create(n,t)),e.done(Ks),()=>{e.remove(zs).remove(Po).clearTimer(Ks)}});Rn(DA,{displayName:"Serializer"});var Fo=he("","defaultValue"),Ho=he(e=>e,"stateOptions"),Uo=he([],"editorStateTimer"),Qs=ln("EditorStateReady");function nw(e,t,n){if(typeof e=="string")return t(e);if(e.type==="html")return Hc.fromSchema(n).parse(e.dom);if(e.type==="json")return In.fromJSON(n,e.value);throw D2(e)}var rw=new _t("MILKDOWN_STATE_TRACKER"),_A=e=>(e.inject(Fo,"").inject(ji,{}).inject(Ho,t=>t).inject(Uo,[Us,Ks,ou,lu]).record(Qs),async()=>{await e.waitTimers(Uo);const t=e.get(qt),n=e.get(Ws),r=e.get(xu),i=e.get(Ho),u=e.get(Fr),s=nw(e.get(Fo),n,t),a=e.get(fa),o=a.addBaseKeymap(),l=[...u,new pt({key:rw,state:{init:()=>{},apply:(f,p,m,A)=>{e.set(ji,A)}}}),zC({rules:r}),ck(a.build())];e.set(Fr,l);const c=i({schema:t,doc:s,plugins:l}),d=ei.create(c);return e.set(ji,d),e.done(Qs),()=>{o(),e.remove(Fo).remove(ji).remove(Ho).remove(Uo).clearTimer(Qs)}});Rn(_A,{displayName:"EditorState"});var Nu=he([],"pasteRule"),Wo=he([lt],"pasteRuleTimer"),Ys=ln("PasteRuleReady"),OA=e=>(e.inject(Nu,[]).inject(Wo,[lt]).record(Ys),async()=>(await e.waitTimers(Wo),e.done(Ys),()=>{e.remove(Nu).remove(Wo).clearTimer(Ys)}));Rn(OA,{displayName:"PasteRule"});var Ko=ln("EditorViewReady"),zo=he([],"editorViewTimer"),Qo=he({},"editorViewOptions"),Yo=he(null,"root"),rc=he(null,"rootDOM"),ic=he({},"rootAttrs");function iw(e,t){const n=document.createElement("div");n.className="milkdown",e.appendChild(n),t.set(rc,n);const r=t.get(ic);return Object.entries(r).forEach(([i,u])=>n.setAttribute(i,u)),n}function uw(e){e.classList.add("editor"),e.setAttribute("role","textbox")}var sw=new _t("MILKDOWN_VIEW_CLEAR"),RA=e=>(e.inject(Yo,document.body).inject(Nn,{}).inject(Qo,{}).inject(rc,null).inject(ic,{}).inject(zo,[Qs,Ys]).record(Ko),async()=>{await e.wait(ri);const t=e.get(Yo)||document.body,n=typeof t=="string"?document.querySelector(t):t;e.update(Fr,o=>[new pt({key:sw,view:l=>{const c=n?iw(n,e):void 0;return(()=>{if(c&&n){const f=l.dom;n.replaceChild(c,f),c.appendChild(f)}})(),{destroy:()=>{c?.parentNode&&c?.parentNode.replaceChild(l.dom,c),c?.remove()}}}}),...o]),await e.waitTimers(zo);const r=e.get(ji),i=e.get(Qo),u=Object.fromEntries(e.get(Iu)),s=Object.fromEntries(e.get(Su)),a=new yA(n,{state:r,nodeViews:u,markViews:s,transformPasted:(o,l,c)=>(e.get(Nu).sort((d,f)=>(f.priority??50)-(d.priority??50)).map(d=>d.run).forEach(d=>{o=d(o,l,c)}),o),...i});return uw(a.dom),e.set(Nn,a),e.done(Ko),()=>{a?.destroy(),e.remove(Yo).remove(Nn).remove(Qo).remove(rc).remove(ic).remove(zo).clearTimer(Ko)}});Rn(RA,{displayName:"EditorView"});var CM=(function(e){return e.Idle="Idle",e.OnCreate="OnCreate",e.Created="Created",e.OnDestroy="OnDestroy",e.Destroyed="Destroyed",e})({}),kM=class MA{constructor(){this.#t=!1,this.#e="Idle",this.#r=[],this.#n=()=>{},this.#u=new om,this.#s=new K2,this.#i=new Map,this.#a=new Map,this.#o=new W2(this.#u,this.#s),this.#h=()=>{const t=Zx(async r=>{await Promise.all(this.#r.map(i=>Promise.resolve(i(r))))}),n=[CA,SA,DA,xA,tw,OA,_A,RA,Xx(this),t];this.#c(n,this.#a)},this.#c=(t,n)=>{t.forEach(r=>{const i=this.#o.produce(this.#t?r.meta:void 0),u=r(i);n.set(r,{ctx:i,handler:u,cleanup:void 0})})},this.#d=(t,n=!1)=>Promise.all([t].flat().map(async r=>{const i=this.#i.get(r)?.cleanup;return n?this.#i.delete(r):this.#i.set(r,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof i=="function"?i():i})),this.#p=async()=>{await Promise.all([...this.#a.entries()].map(async([t,{cleanup:n}])=>typeof n=="function"?n():n)),this.#a.clear()},this.#l=t=>{this.#e=t,this.#n(t)},this.#f=t=>[...t.entries()].map(async([n,r])=>{const{ctx:i,handler:u}=r;if(!u)return;const s=await u();t.set(n,{ctx:i,handler:u,cleanup:s})}),this.enableInspector=(t=!0)=>(this.#t=t,this),this.onStatusChange=t=>(this.#n=t,this),this.config=t=>(this.#r.push(t),this),this.removeConfig=t=>(this.#r=this.#r.filter(n=>n!==t),this),this.use=t=>{const n=[t].flat();return n.flat().forEach(r=>{this.#i.set(r,{ctx:void 0,handler:void 0,cleanup:void 0})}),this.#e==="Created"&&this.#c(n,this.#i),this},this.remove=async t=>this.#e==="OnCreate"?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise(n=>{setTimeout(()=>{n(this.remove(t))},50)})):(await this.#d([t].flat(),!0),this),this.create=async()=>this.#e==="OnCreate"?this:(this.#e==="Created"&&await this.destroy(),this.#l("OnCreate"),this.#h(),this.#c([...this.#i.keys()],this.#i),await Promise.all([this.#f(this.#a),this.#f(this.#i)].flat()),this.#l("Created"),this),this.destroy=async(t=!1)=>this.#e==="Destroyed"||this.#e==="OnDestroy"?this:this.#e==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(t))},50)}):(t&&(this.#r=[]),this.#l("OnDestroy"),await this.#d([...this.#i.keys()],t),await this.#p(),this.#l("Destroyed"),this),this.action=t=>t(this.#o),this.inspect=()=>this.#t?[...this.#a.values(),...this.#i.values()].map(({ctx:t})=>t?.inspector?.read()).filter(t=>!!t):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new MA}#t;#e;#r;#n;#u;#s;#i;#a;#o;#h;#c;#d;#p;#l;#f;get ctx(){return this.#o}get status(){return this.#e}};let aw=e=>crypto.getRandomValues(new Uint8Array(e)),ow=(e,t,n)=>{let r=256-256%e.length;if(r===256){let i=e.length-1;return(u=t)=>{if(!u)return"";let s="";for(;;){let a=n(u),o=u|=0;for(;o--;)if(s+=e[a[o]&i],s.length>=u)return s}}}return(i=t)=>{if(!i)return"";let u="",s=Math.ceil(1.6*256*i/r);for(;;){let a=n(s),o=s;for(;o--;)if(a[o]<r&&(u+=e[a[o]%e.length],u.length>=i))return u}}},lw=(e,t=21)=>ow(e,t|0,aw);lw("abcedfghicklmn",10);function BA(e,t,n){const r=e.findIndex(([u])=>u===t);if(r===-1)return[...e,n];const i=e.slice();return i[r]=n,i}function ue(e,t){const n=$x(e),r=i=>async()=>{r.key=n,await i.wait(ou);const u=t(i);return i.get(Ce).create(n,u),r.run=s=>i.get(Ce).call(e,s),()=>{i.get(Ce).remove(n)}};return r}function xt(e){const t=n=>async()=>{await n.wait(lt);const r=e(n);return n.update(xu,i=>[...i,r]),t.inputRule=r,()=>{n.update(xu,i=>i.filter(u=>u!==r))}};return t}function cw(e){const t=n=>async()=>{await n.wait(lt);const r=e(n);return n.update(Nu,i=>[...i,r]),t.pasteRule=r,()=>{n.update(Nu,i=>i.filter(u=>u!==r))}};return t}function dw(e,t){const n=r=>async()=>{const i=t(r);return r.update(au,u=>BA(u,e,[e,i])),n.id=e,n.schema=i,()=>{r.update(au,u=>u.filter(([s])=>s!==e))}};return n.type=r=>{const i=r.get(qt).marks[e];if(!i)throw P2(e);return i},n}function id(e,t){const n=r=>async()=>{const i=t(r);return r.update(su,u=>BA(u,e,[e,i])),n.id=e,n.schema=i,()=>{r.update(su,u=>u.filter(([s])=>s!==e))}};return n.type=r=>{const i=r.get(qt).nodes[e];if(!i)throw L2(e);return i},n}function Gt(e){let t;const n=r=>async()=>(await r.wait(lt),t=e(r),r.update(Fr,i=>[...i,t]),()=>{r.update(Fr,i=>i.filter(u=>u!==t))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function fw(e){const t=n=>async()=>{await n.wait(lu);const r=n.get(fa),i=e(n),u=r.addObjectKeymap(i);return t.keymap=i,()=>{u()}};return t}function vA(e,t){const n=r=>async()=>{await r.wait(lt);const i=t(r);return e.type(r)instanceof ia?r.update(Iu,u=>[...u,[e.id,i]]):r.update(Su,u=>[...u,[e.id,i]]),n.view=i,n.type=e,()=>{e.type(r)instanceof ia?r.update(Iu,u=>u.filter(s=>s[0]!==e.id)):r.update(Su,u=>u.filter(s=>s[0]!==e.id))}};return n}function Mn(e,t){const n=he(e,t),r=i=>(i.inject(n),()=>()=>{i.remove(n)});return r.key=n,r}function ve(e,t){const n=Mn(t,e),r=id(e,u=>u.get(n.key)(u)),i=[n,r];return i.id=r.id,i.node=r,i.type=u=>r.type(u),i.ctx=n,i.key=n.key,i.extendSchema=u=>ve(e,u(t)),i}function Bn(e,t){const n=Mn(t,e),r=dw(e,u=>u.get(n.key)(u)),i=[n,r];return i.id=r.id,i.mark=r,i.type=u=>r.type(u),i.ctx=n,i.key=n.key,i.extendSchema=u=>Bn(e,u(t)),i}function Ot(e,t){const n=Mn(Object.fromEntries(Object.entries(t).map(([u,{shortcuts:s,priority:a}])=>[u,{shortcuts:s,priority:a}])),`${e}Keymap`),r=fw(u=>{const s=u.get(n.key),a=Object.entries(t).flatMap(([o,{command:l}])=>{const c=s[o],d=[c.shortcuts].flat(),f=c.priority;return d.map(p=>[p,{key:p,onRun:l,priority:f}])});return Object.fromEntries(a)}),i=[n,r];return i.ctx=n,i.shortcuts=r,i.key=n.key,i.keymap=r.keymap,i}var Vt=(e,t=()=>({}))=>Mn(t,`${e}Attr`),es=(e,t=()=>({}))=>Mn(t,`${e}Attr`);function Rt(e,t,n){const r=Mn({},e),i=s=>async()=>{await s.wait(ri);const a={plugin:t(s),options:s.get(r.key)};return s.update(wu,o=>[...o,a]),()=>{s.update(wu,o=>o.filter(l=>l!==a))}},u=[r,i];return u.id=e,u.plugin=i,u.options=r,u}function xM(){return e=>{const t=document.createElement("div"),n=e.get(qt),r=e.get(Nn),i=ar.fromSchema(n).serializeFragment(r.state.doc.content);return t.appendChild(i),t.innerHTML}}function wM(e){return t=>{const n=t.get(Nn);return t.get(qt),t.get(zs)(n.state.doc)}}function hw(e,t){return function(n,r){let{$from:i,$to:u,node:s}=n.selection;if(s&&s.isBlock||i.depth<2||!i.sameParent(u))return!1;let a=i.node(-1);if(a.type!=e)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=e||i.index(-2)!=i.node(-2).childCount-1)return!1;if(r){let d=H.empty,f=i.index(-1)?1:i.index(-2)?2:3;for(let g=i.depth-f;g>=i.depth-3;g--)d=H.from(i.node(g).copy(d));let p=i.indexAfter(-1)<i.node(-2).childCount?1:i.indexAfter(-2)<i.node(-3).childCount?2:3;d=d.append(H.from(e.createAndFill()));let m=i.before(i.depth-(f-1)),A=n.tr.replace(m,i.after(-p),new Y(d,4-f,0)),E=-1;A.doc.nodesBetween(m,A.doc.content.size,(g,N)=>{if(E>-1)return!1;g.isTextblock&&g.content.size==0&&(E=N+1)}),E>-1&&A.setSelection(se.near(A.doc.resolve(E))),r(A.scrollIntoView())}return!0}let o=u.pos==i.end()?a.contentMatchAt(0).defaultType:null,l=n.tr.delete(i.pos,u.pos),c=o?[null,{type:o}]:void 0;return nu(l.doc,i.pos,2,c)?(r&&r(l.split(i.pos,2,c).scrollIntoView()),!0):!1}}function pw(e){return function(t,n){let{$from:r,$to:i}=t.selection,u=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==e);return u?n?r.node(u.depth-1).type==e?mw(t,n,e,u):Aw(t,n,u):!0:!1}}function mw(e,t,n,r){let i=e.tr,u=r.end,s=r.$to.end(r.depth);u<s&&(i.step(new tt(u-1,s,u,s,new Y(H.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new qm(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=Ma(r);if(a==null)return!1;i.lift(r,a);let o=i.doc.resolve(i.mapping.map(u,-1)-1);return Ba(i.doc,o.pos)&&o.nodeBefore.type==o.nodeAfter.type&&i.join(o.pos),t(i.scrollIntoView()),!0}function Aw(e,t,n){let r=e.tr,i=n.parent;for(let p=n.end,m=n.endIndex-1,A=n.startIndex;m>A;m--)p-=i.child(m).nodeSize,r.delete(p-1,p+1);let u=r.doc.resolve(n.start),s=u.nodeAfter;if(r.mapping.map(n.end)!=n.start+u.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,o=n.endIndex==i.childCount,l=u.node(-1),c=u.index(-1);if(!l.canReplace(c+(a?0:1),c+1,s.content.append(o?H.empty:H.from(i))))return!1;let d=u.pos,f=d+s.nodeSize;return r.step(new tt(d-(a?1:0),f+(o?1:0),d+1,f-1,new Y((a?H.empty:H.from(i.copy(H.empty))).append(o?H.empty:H.from(i.copy(H.empty))),a?0:1,o?0:1),a?0:1)),t(r.scrollIntoView()),!0}function gw(e){return function(t,n){let{$from:r,$to:i}=t.selection,u=r.blockRange(i,l=>l.childCount>0&&l.firstChild.type==e);if(!u)return!1;let s=u.startIndex;if(s==0)return!1;let a=u.parent,o=a.child(s-1);if(o.type!=e)return!1;if(n){let l=o.lastChild&&o.lastChild.type==a.type,c=H.from(l?e.create():null),d=new Y(H.from(e.create(null,H.from(a.type.create(null,c)))),l?3:1,0),f=u.start,p=u.end;n(t.tr.step(new tt(f-(l?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function bw(e){const t=new Map;if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Ti(e,"definition",function(r){const i=g0(r.identifier);i&&!t.get(i)&&t.set(i,r)}),n;function n(r){const i=g0(r);return t.get(i)}}function g0(e){return String(e||"").toUpperCase()}function Ew(){return function(e){const t=bw(e);Ti(e,function(n,r,i){if(n.type==="definition"&&i!==void 0&&typeof r=="number")return i.children.splice(r,1),[$s,r];if(n.type==="imageReference"||n.type==="linkReference"){const u=t(n.identifier);if(u&&i&&typeof r=="number")return i.children[r]=n.type==="imageReference"?{type:"image",url:u.url,title:u.title,alt:n.alt}:{type:"link",url:u.url,title:u.title,children:n.children},[$s,r]}})}}function yw(e){const t={...e};return t.position&&(t.position={start:{...t.position.start},end:{...t.position.end}}),delete t.children,t}var Tw="<br />",Cw=/^<br\s*\/?\s*>$/i,kw=e=>typeof e=="string"&&Cw.test(e.trim());function LA(e,t){if(!(t.childCount>=1&&t.lastChild?.type.name==="hardbreak")){e.next(t.content);return}const n=[];t.content.forEach((r,i,u)=>{u!==t.childCount-1&&n.push(r)}),e.next(H.fromArray(n))}function L(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}var ud=es("emphasis");L(ud,{displayName:"Attr<emphasis>",group:"Emphasis"});var ki=Bn("emphasis",e=>({attrs:{marker:{default:e.get(uu).emphasis||"*",validate:"string"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:t=>t==="italic"}],toDOM:t=>["em",e.get(ud.key)(t)],parseMarkdown:{match:t=>t.type==="emphasis",runner:(t,n,r)=>{t.openMark(r,{marker:n.marker}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="emphasis",runner:(t,n)=>{t.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));L(ki.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});L(ki.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});var sd=ue("ToggleEmphasis",e=>()=>Pa(ki.type(e)));L(sd,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});var PA=xt(e=>ju(/(?:^|[^*])\*([^*]+)\*$/,ki.type(e),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:n+1}}));L(PA,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});var FA=xt(e=>ju(/\b_(?![_\s])(.*?[^_\s])_$/,ki.type(e),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:n+1}}));L(FA,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});var ad=Ot("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{const t=e.get(Ce);return()=>t.call(sd.key)}}});L(ad.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});L(ad.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});var od=es("strong");L(od,{displayName:"Attr<strong>",group:"Strong"});var ts=Bn("strong",e=>({attrs:{marker:{default:e.get(uu).strong||"*",validate:"string"}},parseDOM:[{tag:"b",getAttrs:t=>t.style.fontWeight!="normal"&&null},{tag:"strong"},{style:"font-style",getAttrs:t=>t==="bold"},{style:"font-weight=400",clearMark:t=>t.type.name=="strong"},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:t=>["strong",e.get(od.key)(t)],parseMarkdown:{match:t=>t.type==="strong",runner:(t,n,r)=>{t.openMark(r,{marker:n.marker}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strong",runner:(t,n)=>{t.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));L(ts.mark,{displayName:"MarkSchema<strong>",group:"Strong"});L(ts.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});var ld=ue("ToggleStrong",e=>()=>Pa(ts.type(e)));L(ld,{displayName:"Command<toggleStrongCommand>",group:"Strong"});var HA=xt(e=>ju(new RegExp("(?<![\\w:/])(?:\\*\\*|__)([^*_]+?)(?:\\*\\*|__)(?![\\w/])$"),ts.type(e),{getAttr:t=>({marker:t[0].startsWith("*")?"*":"_"})}));L(HA,{displayName:"InputRule<strong>",group:"Strong"});var cd=Ot("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{const t=e.get(Ce);return()=>t.call(ld.key)}}});L(cd.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});L(cd.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});var dd=es("inlineCode");L(dd,{displayName:"Attr<inlineCode>",group:"InlineCode"});var Vn=Bn("inlineCode",e=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(dd.key)(t)],parseMarkdown:{match:t=>t.type==="inlineCode",runner:(t,n,r)=>{t.openMark(r),t.addText(n.value),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="inlineCode",runner:(t,n,r)=>(t.withMark(n,"inlineCode",r.text||""),!0)}}));L(Vn.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});L(Vn.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});var fd=ue("ToggleInlineCode",e=>()=>(t,n)=>{const{selection:r,tr:i}=t;if(r.empty)return!1;const{from:u,to:s}=r;return t.doc.rangeHasMark(u,s,Vn.type(e))?(n?.(i.removeMark(u,s,Vn.type(e))),!0):(Object.keys(t.schema.marks).filter(a=>a!==Vn.type.name).map(a=>t.schema.marks[a]).forEach(a=>{i.removeMark(u,s,a)}),n?.(i.addMark(u,s,Vn.type(e).create())),!0)});L(fd,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});var UA=xt(e=>ju(/(?:`)([^`]+)(?:`)$/,Vn.type(e)));L(UA,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});var hd=Ot("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{const t=e.get(Ce);return()=>t.call(fd.key)}}});L(hd.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});L(hd.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});var xw=new Set(["http:","https:","mailto:","tel:","ftp:"]);function ww(e){return e<=32||e>=127&&e<=160||e>=8203&&e<=8205||e===8232||e===8233||e===65279}function Iw(e){let t="";for(const n of e)ww(n.codePointAt(0)??0)||(t+=n);return t}function Sw(e){if(typeof e!="string")return"";const t=e.trim();if(!t)return"";const n=Iw(t),r=/^([a-z][a-z0-9+.-]*):/i.exec(n)?.[1];return!r||xw.has(`${r.toLowerCase()}:`)?t:""}var pd=es("link");L(pd,{displayName:"Attr<link>",group:"Link"});var ii=Bn("link",e=>({attrs:{href:{validate:"string"},title:{default:null,validate:"string|null"}},parseDOM:[{tag:"a[href]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw on(t);return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(pd.key)(t),...t.attrs,href:Sw(t.attrs.href)}],parseMarkdown:{match:t=>t.type==="link",runner:(t,n,r)=>{const i=n.url,u=n.title;t.openMark(r,{href:i,title:u}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="link",runner:(t,n)=>{t.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));L(ii.mark,{displayName:"MarkSchema<link>",group:"Link"});var WA=ue("ToggleLink",e=>(t={})=>Pa(ii.type(e),t));L(WA,{displayName:"Command<toggleLinkCommand>",group:"Link"});var KA=ue("UpdateLink",e=>(t={})=>(n,r)=>{if(!r)return!1;let i,u=-1;const{selection:s}=n,{from:a,to:o}=s;if(n.doc.nodesBetween(a,a===o?o+1:o,(m,A)=>{if(ii.type(e).isInSet(m.marks))return i=m,u=A,!1}),!i)return!1;const l=i.marks.find(({type:m})=>m===ii.type(e));if(!l)return!1;const c=u,d=u+i.nodeSize,{tr:f}=n,p=ii.type(e).create({...l.attrs,...t});return p?(r(f.removeMark(c,d,l).addMark(c,d,p).setSelection(new ae(f.selection.$anchor)).scrollIntoView()),!0):!1});L(KA,{displayName:"Command<updateLinkCommand>",group:"Link"});var zA=id("doc",()=>({content:"block+",parseMarkdown:{match:({type:e})=>e==="root",runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>e.type.name==="doc",runner:(e,t)=>{e.openNode("root");const n=t.childCount>0?t.child(t.childCount-1):null,r=n?.type.name==="paragraph"&&n.content.size===0?t.content.cut(0,t.content.size-n.nodeSize):t.content;e.next(r)}}}));L(zA,{displayName:"NodeSchema<doc>",group:"Doc"});var QA=Object.freeze(["root","blockquote","listItem","footnoteDefinition"]),Nw=new Set(["paragraph","heading","tableCell","link","linkReference","emphasis","strong","delete","footnote"]),ha=Mn(QA,"blockContainerTypes");L(ha,{displayName:"Ctx<blockContainerTypes>",group:"Remark"});var b0=new Set;function YA(e){const t=e.isInjected(ha.key)?e.get(ha.key):QA,n=new Set;for(const r of t){if(Nw.has(r)){b0.has(r)||(b0.add(r),console.warn(`[milkdown/preset-commonmark] "${r}" holds phrasing content and cannot be a block container; it is ignored in blockContainerTypes.`));continue}n.add(r)}return n}var Dw=new Set(["paragraph","tableCell"]);function _w(e,t){return Bc(e,n=>n.type==="html"&&kw(n.value),(n,r)=>{const i=r[r.length-1];if(i){if(Dw.has(i.type)){i.children.length===1&&(i.children=[]);return}if(t.has(i.type)){const u=n;return u.children=[],delete u.value,u.type="paragraph",$s}}})}var Ka=Rt("remark-preserve-empty-line",e=>()=>t=>_w(t,YA(e)));L(Ka.plugin,{displayName:"Remark<remarkPreserveEmptyLine>",group:"Remark"});L(Ka.options,{displayName:"RemarkConfig<remarkPreserveEmptyLine>",group:"Remark"});var md=Vt("paragraph");L(md,{displayName:"Attr<paragraph>",group:"Paragraph"});var an=ve("paragraph",e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(md.key)(t),0],parseMarkdown:{match:t=>t.type==="paragraph",runner:(t,n,r)=>{t.openNode(r),n.children?t.next(n.children):t.addText(n.value||""),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="paragraph",runner:(t,n)=>{t.openNode("paragraph"),(!n.content||n.content.size===0)&&Ow(e)?t.addNode("html",void 0,Tw):LA(t,n),t.closeNode()}}}));function Ow(e){return e.isInjected(Ka.options.key)}L(an.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});L(an.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});var Ad=ue("TurnIntoText",e=>()=>yu(an.type(e)));L(Ad,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});var gd=Ot("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{const t=e.get(Ce);return()=>t.call(Ad.key)}}});L(gd.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});L(gd.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});var Rw=Array(6).fill(0).map((e,t)=>t+1);function Mw(e){return e.textContent.toLowerCase().trim().replace(/\s+/g,"-")}var za=Mn(Mw,"headingIdGenerator");L(za,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});var bd=Vt("heading");L(bd,{displayName:"Attr<heading>",group:"Heading"});var Kr=ve("heading",e=>{const t=e.get(za.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:"",validate:"string"},level:{default:1,validate:"number"}},parseDOM:Rw.map(n=>({tag:`h${n}`,getAttrs:r=>{if(!(r instanceof HTMLElement))throw on(r);return{level:n,id:r.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...e.get(bd.key)(n),id:n.attrs.id||t(n)},0],parseMarkdown:{match:({type:n})=>n==="heading",runner:(n,r,i)=>{const u=r.depth;n.openNode(i,{level:u}),n.next(r.children),n.closeNode()}},toMarkdown:{match:n=>n.type.name==="heading",runner:(n,r)=>{n.openNode("heading",void 0,{depth:r.attrs.level}),LA(n,r),n.closeNode()}}}});L(Kr.node,{displayName:"NodeSchema<heading>",group:"Heading"});L(Kr.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});var qA=xt(e=>w1(/^(?<hashes>#+)\s$/,Kr.type(e),t=>{const n=t.groups?.hashes?.length||0,{$from:r}=e.get(Nn).state.selection,i=r.node();if(i.type.name==="heading"){let u=Number(i.attrs.level)+Number(n);return u>6&&(u=6),{level:u}}return{level:n}}));L(qA,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});var Wn=ue("WrapInHeading",e=>t=>(t??=1,t<1?yu(an.type(e)):yu(Kr.type(e),{level:t})));L(Wn,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});var Ed=ue("DowngradeHeading",e=>()=>(t,n,r)=>{const{$from:i}=t.selection,u=i.node();if(u.type!==Kr.type(e)||!t.selection.empty||i.parentOffset!==0)return!1;const s=u.attrs.level-1;return s?(n?.(t.tr.setNodeMarkup(t.selection.$from.before(),void 0,{...u.attrs,level:s})),!0):yu(an.type(e))(t,n,r)});L(Ed,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});var yd=Ot("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{const t=e.get(Ce);return()=>t.call(Wn.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{const t=e.get(Ce);return()=>t.call(Wn.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{const t=e.get(Ce);return()=>t.call(Wn.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{const t=e.get(Ce);return()=>t.call(Wn.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{const t=e.get(Ce);return()=>t.call(Wn.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{const t=e.get(Ce);return()=>t.call(Wn.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{const t=e.get(Ce);return()=>t.call(Ed.key)}}});L(yd.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});L(yd.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});var Td=Vt("blockquote");L(Td,{displayName:"Attr<blockquote>",group:"Blockquote"});var ns=ve("blockquote",e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(Td.key)(t),0],parseMarkdown:{match:({type:t})=>t==="blockquote",runner:(t,n,r)=>{t.openNode(r).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="blockquote",runner:(t,n)=>{t.openNode("blockquote").next(n.content).closeNode()}}}));L(ns.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});L(ns.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});var GA=xt(e=>Vc(/^\s*>\s$/,ns.type(e)));L(GA,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});var Cd=ue("WrapInBlockquote",e=>()=>Gc(ns.type(e)));L(Cd,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});var kd=Ot("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{const t=e.get(Ce);return()=>t.call(Cd.key)}}});L(kd.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});L(kd.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});var xd=Vt("codeBlock",()=>({pre:{},code:{}}));L(xd,{displayName:"Attr<codeBlock>",group:"CodeBlock"});var rs=ve("code_block",e=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:"",validate:"string"}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>{if(!(t instanceof HTMLElement))throw on(t);return{language:t.dataset.language}}}],toDOM:t=>{const n=e.get(xd.key)(t),r=t.attrs.language,i=r&&r.length>0?{"data-language":r}:void 0;return["pre",{...n.pre,...i},["code",n.code,0]]},parseMarkdown:{match:({type:t})=>t==="code",runner:(t,n,r)=>{const i=n.lang??"",u=n.value;t.openNode(r,{language:i}),u&&t.addText(u),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="code_block",runner:(t,n)=>{t.addNode("code",void 0,n.content.firstChild?.text||"",{lang:n.attrs.language})}}}));L(rs.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});L(rs.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});var VA=xt(e=>w1(/^```(?<language>[a-z]*)?[\s\n]$/,rs.type(e),t=>({language:t.groups?.language??""})));L(VA,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});var wd=ue("CreateCodeBlock",e=>(t="")=>yu(rs.type(e),{language:t}));L(wd,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});var Bw=ue("UpdateCodeBlockLanguage",()=>({pos:e,language:t}={pos:-1,language:""})=>(n,r)=>e>=0?(r?.(n.tr.setNodeAttribute(e,"language",t)),!0):!1);L(Bw,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});var Id=Ot("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{const t=e.get(Ce);return()=>t.call(wd.key)}}});L(Id.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});L(Id.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});var Sd=Vt("image");L(Sd,{displayName:"Attr<image>",group:"Image"});var xi=ve("image",e=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:"",validate:"string"},alt:{default:"",validate:"string"},title:{default:"",validate:"string"}},parseDOM:[{tag:"img[src]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw on(t);return{src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||"",title:t.getAttribute("title")||t.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(Sd.key)(t),...t.attrs}],parseMarkdown:{match:({type:t})=>t==="image",runner:(t,n,r)=>{const i=n.url,u=n.alt??"",s=n.title??"";t.addNode(r,{src:i,alt:u,title:s})}},toMarkdown:{match:t=>t.type.name==="image",runner:(t,n)=>{t.addNode("image",void 0,void 0,{title:n.attrs.title,url:n.attrs.src,alt:n.attrs.alt})}}}));L(xi.node,{displayName:"NodeSchema<image>",group:"Image"});L(xi.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});var JA=ue("InsertImage",e=>(t={})=>(n,r)=>{if(!r)return!0;const{src:i="",alt:u="",title:s=""}=t,a=xi.type(e).create({src:i,alt:u,title:s});return a&&r(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});L(JA,{displayName:"Command<insertImageCommand>",group:"Image"});var jA=ue("UpdateImage",e=>(t={})=>(n,r)=>{const i=tk(n.selection,xi.type(e));if(!i)return!1;const{node:u,pos:s}=i,a={...u.attrs},{src:o,alt:l,title:c}=t;return o!==void 0&&(a.src=o),l!==void 0&&(a.alt=l),c!==void 0&&(a.title=c),r?.(n.tr.setNodeMarkup(s,void 0,a).scrollIntoView()),!0});L(jA,{displayName:"Command<updateImageCommand>",group:"Image"});var vw=xt(e=>new mt(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(t,n,r,i)=>{const[u,s,a="",o]=n;return u?t.tr.replaceWith(r,i,xi.type(e).create({src:a,alt:s,title:o})):null}));L(vw,{displayName:"InputRule<insertImageInputRule>",group:"Image"});var pa=Vt("hardbreak",e=>({"data-type":"hardbreak","data-is-inline":e.attrs.isInline}));L(pa,{displayName:"Attr<hardbreak>",group:"Hardbreak"});var Nr=ve("hardbreak",e=>({inline:!0,group:"inline",attrs:{isInline:{default:!1,validate:"boolean"}},selectable:!1,parseDOM:[{tag:"br"},{tag:'span[data-type="hardbreak"]',getAttrs:()=>({isInline:!0})}],toDOM:t=>t.attrs.isInline?["span",e.get(pa.key)(t)," "]:["br",e.get(pa.key)(t)],parseMarkdown:{match:({type:t})=>t==="break",runner:(t,n,r)=>{t.addNode(r,{isInline:!!n.data?.isInline})}},leafText:()=>`
45
45
  `,toMarkdown:{match:t=>t.type.name==="hardbreak",runner:(t,n)=>{n.attrs.isInline?t.addNode("text",void 0,`
46
- `):t.addNode("break")}}}));v(wr.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});v(wr.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});var Id=ie("InsertHardbreak",e=>()=>(t,n)=>{const{selection:r,tr:i}=t;if(!(r instanceof ae))return!1;if(r.empty){const u=r.$from.node();if(u.childCount>0&&u.lastChild?.type.name==="hardbreak")return n?.(i.replaceRangeWith(r.to-1,r.to,t.schema.node("paragraph")).setSelection(ue.near(i.doc.resolve(r.to))).scrollIntoView()),!0}return n?.(i.setMeta("hardbreak",!0).replaceSelectionWith(wr.type(e).create()).scrollIntoView()),!0});v(Id,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});var Sd=St("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{const t=e.get(Ce);return()=>t.call(Id.key)}}});v(Sd.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});v(Sd.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});var Nd=zt("hr");v(Nd,{displayName:"Attr<hr>",group:"Hr"});var Gu=Be("hr",e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(Nd.key)(t)],parseMarkdown:{match:({type:t})=>t==="thematicBreak",runner:(t,n,r)=>{t.addNode(r)}},toMarkdown:{match:t=>t.type.name==="hr",runner:t=>{t.addNode("thematicBreak")}}}));v(Gu.node,{displayName:"NodeSchema<hr>",group:"Hr"});v(Gu.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});var DA=bt(e=>new It(/^(?:---|___\s|\*\*\*\s)$/,(t,n,r,i)=>{const{tr:u}=t;return n[0]&&u.replaceWith(r-1,i,Gu.type(e).create()),u}));v(DA,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});var _A=ie("InsertHr",e=>()=>(t,n)=>{if(!n)return!0;const r=rn.node.type(e).create(),{tr:i,selection:u}=t,{from:s}=u,a=Gu.type(e).create();if(!a)return!0;const o=i.replaceSelectionWith(a).insert(s,r),l=ue.findFrom(o.doc.resolve(s),1,!0);return l&&n(o.setSelection(l).scrollIntoView()),!0});v(_A,{displayName:"Command<insertHrCommand>",group:"Hr"});var Dd=zt("bulletList");v(Dd,{displayName:"Attr<bulletList>",group:"BulletList"});var Ei=Be("bullet_list",e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ul",getAttrs:t=>{if(!(t instanceof HTMLElement))throw un(t);return{spread:t.dataset.spread==="true"}}}],toDOM:t=>["ul",{...e.get(Dd.key)(t),"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!n,runner:(t,n,r)=>{const i=n.spread!=null?`${n.spread}`:"false";t.openNode(r,{spread:i}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="bullet_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!1,spread:n.attrs.spread}).next(n.content).closeNode()}}}));v(Ei.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});v(Ei.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});var OA=bt(e=>Yc(/^\s*([-+*])\s$/,Ei.type(e)));v(OA,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});var _d=ie("WrapInBulletList",e=>()=>zc(Ei.type(e)));v(_d,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});var Od=St("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{const t=e.get(Ce);return()=>t.call(_d.key)}}});v(Od.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});v(Od.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});var Rd=zt("orderedList");v(Rd,{displayName:"Attr<orderedList>",group:"OrderedList"});var yi=Be("ordered_list",e=>({content:"listItem+",group:"block",attrs:{order:{default:1,validate:"number"},spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ol",getAttrs:t=>{if(!(t instanceof HTMLElement))throw un(t);return{spread:t.dataset.spread,order:t.hasAttribute("start")?Number(t.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(Rd.key)(t),...t.attrs.order===1?{}:{start:t.attrs.order},"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!!n,runner:(t,n,r)=>{const i=n.spread!=null?`${n.spread}`:"true";t.openNode(r,{spread:i,order:n.start??1}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="ordered_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!0,start:n.attrs.order??1,spread:n.attrs.spread==="true"}),t.next(n.content),t.closeNode()}}}));v(yi.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});v(yi.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});var RA=bt(e=>Yc(/^\s*(\d+)\.\s$/,yi.type(e),t=>({order:Number(t[1])}),(t,n)=>n.childCount+n.attrs.order===Number(t[1])));v(RA,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});var Md=ie("WrapInOrderedList",e=>()=>zc(yi.type(e)));v(Md,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});var Bd=St("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{const t=e.get(Ce);return()=>t.call(Md.key)}}});v(Bd.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});v(Bd.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});var Ld=zt("listItem");v(Ld,{displayName:"Attr<listItem>",group:"ListItem"});var Bn=Be("list_item",e=>({group:"listItem",content:"paragraph block*",attrs:{label:{default:"•",validate:"string"},listType:{default:"bullet",validate:"string"},spread:{default:!0,validate:"boolean"}},defining:!0,parseDOM:[{tag:"li",getAttrs:t=>{if(!(t instanceof HTMLElement))throw un(t);return{label:t.dataset.label,listType:t.dataset.listType,spread:t.dataset.spread==="true"}}}],toDOM:t=>["li",{...e.get(Ld.key)(t),"data-label":t.attrs.label,"data-list-type":t.attrs.listType,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t})=>t==="listItem",runner:(t,n,r)=>{const i=n.label!=null?`${n.label}.`:"•",u=n.label!=null?"ordered":"bullet",s=n.spread!=null?`${n.spread}`:"true";t.openNode(r,{label:i,listType:u,spread:s}),t.next(n.children),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="list_item",runner:(t,n)=>{t.openNode("listItem",void 0,{spread:n.attrs.spread}),t.next(n.content),t.closeNode()}}}));v(Bn.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});v(Bn.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});var vd=ie("SinkListItem",e=>()=>Mk(Bn.type(e)));v(vd,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});var Pd=ie("LiftListItem",e=>()=>_k(Bn.type(e)));v(Pd,{displayName:"Command<liftListItemCommand>",group:"ListItem"});var Fd=ie("SplitListItem",e=>()=>Dk(Bn.type(e)));v(Fd,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function Kk(e){return(t,n,r)=>{const{selection:i}=t;if(!(i instanceof ae))return!1;const{empty:u,$from:s}=i;return!u||s.parentOffset!==0||s.node(-1).type!==Bn.type(e)?!1:l1(t,n,r)}}var Hd=ie("LiftFirstListItem",e=>()=>Kk(e));v(Hd,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});var Ud=St("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{const t=e.get(Ce);return()=>t.call(Fd.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{const t=e.get(Ce);return()=>t.call(vd.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{const t=e.get(Ce);return()=>t.call(Pd.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{const t=e.get(Ce);return()=>t.call(Hd.key)}}});v(Ud.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});v(Ud.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});var MA=nd("text",()=>({group:"inline",parseMarkdown:{match:({type:e})=>e==="text",runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>e.type.name==="text",runner:(e,t)=>{e.addNode("text",void 0,t.text)}}}));v(MA,{displayName:"NodeSchema<text>",group:"Text"});var Wd=zt("html");v(Wd,{displayName:"Attr<html>",group:"Html"});var Kd=Be("html",e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:"",validate:"string"}},toDOM:t=>{const n=document.createElement("span"),r={...e.get(Wd.key)(t),"data-value":t.attrs.value,"data-type":"html"};return n.textContent=t.attrs.value,["span",r,t.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:t=>({value:t.dataset.value??""})}],parseMarkdown:{match:({type:t})=>t==="html",runner:(t,n,r)=>{t.addNode(r,{value:n.value})}},toMarkdown:{match:t=>t.type.name==="html",runner:(t,n)=>{t.addNode("html",void 0,n.attrs.value)}}}));v(Kd.node,{displayName:"NodeSchema<html>",group:"Html"});v(Kd.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});var Qk=[xA,hd,rn,va,Ad,Wr,Xs,wr,Ed,zu,Cd,Yu,Nd,Gu,wd,bi,Dd,Ei,Rd,yi,Ld,Bn,rd,gi,sd,Qu,ld,Gn,fd,ii,Wd,Kd,MA].flat(),zk=[wA,OA,RA,IA,DA,kA].flat(),Yk=[gA,bA,yA,EA],Gk=ie("IsMarkSelected",()=>e=>t=>{if(!e)return!1;const{doc:n,selection:r}=t;return n.rangeHasMark(r.from,r.to,e)}),qk=ie("IsNoteSelected",()=>e=>t=>e?TC(t,e).hasNode:!1),Vk=ie("ClearTextInCurrentBlock",()=>()=>(e,t)=>{let n=e.tr;const{$from:r,$to:i}=n.selection,{pos:u}=r,{pos:s}=i,a=u-r.node().content.size;return a<0?!1:(n=n.deleteRange(a,s),t?.(n),!0)}),Jk=ie("SetBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;const u=t.tr,{from:s,to:a}=u.selection;try{u.setBlockType(s,a,r,i)}catch{return!1}return n?.(u),!0}),jk=ie("WrapInBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;let u=t.tr;try{const{$from:s,$to:a}=u.selection,o=s.blockRange(a),l=o&&Hc(o,r,i);if(!l)return!1;u=u.wrap(o,l)}catch{return!1}return n?.(u),!0}),Zk=ie("AddBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;const u=t.tr;try{const s=r instanceof kn?r:r.createAndFill(i);if(!s)return!1;u.replaceSelectionWith(s)}catch{return!1}return n?.(u),!0}),Xk=ie("SelectTextNearPos",()=>e=>(t,n)=>{const{pos:r}=e??{};if(r==null)return!1;const i=(s,a,o)=>Math.min(Math.max(s,a),o),u=t.tr;try{const s=t.doc.resolve(i(r,0,t.doc.content.size));u.setSelection(ae.near(s))}catch{return!1}return n?.(u.scrollIntoView()),!0}),$k=[pd,yd,Un,gd,xd,Id,_A,SA,NA,Md,_d,vd,Fd,Pd,Hd,id,cd,ad,TA,CA,Gk,qk,Vk,Jk,jk,Zk,Xk],e6=[Td,kd,Sd,bd,Ud,Bd,Od,md,ud,dd,od].flat(),Qd=Ht("remarkAddOrderInList",()=>()=>e=>{mi(e,"list",t=>{if(t.ordered){const n=t.start??1;t.children.forEach((r,i)=>{r.label=i+n})}})});v(Qd.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});v(Qd.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});var zd=Ht("remarkLineBreak",()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;mi(e,"text",(n,r,i)=>{if(!n.value||typeof n.value!="string")return;const u=[];let s=0;t.lastIndex=0;let a=t.exec(n.value);for(;a;){const o=a.index;s!==o&&u.push({type:"text",value:n.value.slice(s,o)}),u.push({type:"break",data:{isInline:!0}}),s=o+a[0].length,a=t.exec(n.value)}if(u.length>0&&i&&typeof r=="number")return s<n.value.length&&u.push({type:"text",value:n.value.slice(s)}),i.children.splice(r,1,...u),r+u.length})});v(zd.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});v(zd.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});var Yd=Ht("remarkInlineLink",()=>Lk);v(Yd.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});v(Yd.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});var t6=e=>!!e.children,n6=e=>e.type==="html";function r6(e,t){return n(e,0,null)[0];function n(r,i,u){if(t6(r)){const s=[];for(let a=0,o=r.children.length;a<o;a++){const l=r.children[a];if(l){const c=n(l,a,r);if(c)for(let d=0,f=c.length;d<f;d++){const p=c[d];p&&s.push(p)}}}r.children=s}return t(r,i,u)}}var i6=["root","blockquote","listItem"],Gd=Ht("remarkHTMLTransformer",()=>()=>e=>{r6(e,(t,n,r)=>n6(t)?(r&&i6.includes(r.type)&&(t.children=[{...t}],delete t.value,t.type="paragraph"),[t]):[t])});v(Gd.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});v(Gd.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});var qd=Ht("remarkMarker",()=>()=>(e,t)=>{const n=r=>t.value.charAt(r.position.start.offset);mi(e,r=>["strong","emphasis"].includes(r.type),r=>{r.marker=n(r)})});v(qd.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});v(qd.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});var BA=Rn(()=>{let e=!1;const t=new kt({key:new wt("MILKDOWN_INLINE_NODES_CURSOR"),state:{init(){return!1},apply(n){if(!n.selection.empty)return!1;const r=n.selection.$from,i=r.nodeBefore,u=r.nodeAfter;return!!(i&&u&&i.isInline&&!i.isText&&u.isInline&&!u.isText)}},props:{handleDOMEvents:{compositionend:(n,r)=>e?(e=!1,requestAnimationFrame(()=>{if(t.getState(n.state)){const i=n.state.selection.from;r.preventDefault(),n.dispatch(n.state.tr.insertText(r.data||"",i))}}),!0):!1,compositionstart:n=>(t.getState(n.state)&&(e=!0),!1),beforeinput:(n,r)=>{if(t.getState(n.state)&&r instanceof InputEvent&&r.data&&!e){const i=n.state.selection.from;return r.preventDefault(),n.dispatch(n.state.tr.insertText(r.data||"",i)),!0}return!1}},decorations(n){if(t.getState(n)){const r=n.selection.$from.pos,i=document.createElement("span"),u=je.widget(r,i,{side:-1}),s=document.createElement("span"),a=je.widget(r,s);return setTimeout(()=>{i.contentEditable="true",s.contentEditable="true"}),De.create(n.doc,[u,a])}return De.empty}}});return t});v(BA,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});var LA=Rn(e=>new kt({key:new wt("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,r)=>{if(!t.length)return;const[i]=t;if(!i)return;const[u]=i.steps;if(i.getMeta("hardbreak")){if(!(u instanceof ve))return;const{from:s}=u;return r.tr.setNodeMarkup(s,wr.type(e),void 0,[])}if(u instanceof Cn){let s=r.tr;const{from:a,to:o}=u;return r.doc.nodesBetween(a,o,(l,c)=>{l.type===wr.type(e)&&(s=s.setNodeMarkup(c,wr.type(e),void 0,[]))}),s}}}));v(LA,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});var Vd=sr(["table","code_block"],"hardbreakFilterNodes");v(Vd,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});var vA=Rn(e=>{const t=e.get(Vd.key);return new kt({key:new wt("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,r)=>{const i=n.getMeta("hardbreak"),[u]=n.steps;if(i&&u){const{from:s}=u,a=r.doc.resolve(s);let o=a.depth,l=!0;for(;o>0;)t.includes(a.node(o).type.name)&&(l=!1),o--;return l}return!0}})});v(vA,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});var PA=Rn(e=>{const t=new wt("MILKDOWN_HEADING_ID"),n=r=>{if(r.composing)return;const i=e.get(va.key),u=r.state.tr.setMeta("addToHistory",!1);let s=!1;const a={};r.state.doc.descendants((o,l)=>{if(o.type===Wr.type(e)){if(o.textContent.trim().length===0)return;const c=o.attrs;let d=i(o);a[d]?(a[d]+=1,d+=`-#${a[d]}`):a[d]=1,c.id!==d&&(s=!0,u.setMeta(t,!0).setNodeMarkup(l,void 0,{...c,id:d}))}}),s&&r.dispatch(u)};return new kt({key:t,view:r=>(n(r),{update:(i,u)=>{i.state.doc.eq(u.doc)||n(i)}})})});v(PA,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});var FA=Rn(e=>{const t=(n,r,i)=>{if(!i.selection||n.some(d=>d.getMeta("addToHistory")===!1||!d.isGeneric))return null;const u=yi.type(e),s=Ei.type(e),a=Bn.type(e),o=(d,f,p=1)=>{let m=!1;const A=`${f+p}.`;return d.label!==A&&(d.label=A,m=!0),m};let l=i.tr,c=!1;return i.doc.descendants((d,f,p,m)=>{if(d.type===s){const A=d.maybeChild(0);A?.type===a&&A.attrs.listType==="ordered"&&(c=!0,l.setNodeMarkup(f,u,{spread:"true"}),d.descendants((E,g,N,w)=>{if(E.type===a){const _={...E.attrs};o(_,w)&&(l=l.setNodeMarkup(g,void 0,_))}return!1}))}else if(d.type===a&&p?.type===u){const A={...d.attrs};let E=!1;A.listType!=="ordered"&&(A.listType="ordered",E=!0),p?.maybeChild(0)&&(E=o(A,m,p?.attrs.order??1)),E&&(l=l.setNodeMarkup(f,void 0,A),c=!0)}}),c?l.setMeta("addToHistory",!1):null};return new kt({key:new wt("MILKDOWN_KEEP_LIST_ORDER"),appendTransaction:t})});v(FA,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});var u6=[LA,Vd,vA,BA,Qd,Yd,zd,Gd,qd,La,PA,FA].flat(),mR=[Qk,zk,Yk,$k,e6,u6].flat();let nc,rc;if(typeof WeakMap<"u"){let e=new WeakMap;nc=t=>e.get(t),rc=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;nc=r=>{for(let i=0;i<e.length;i+=2)if(e[i]==r)return e[i+1]},rc=(r,i)=>(n==10&&(n=0),e[n++]=r,e[n++]=i)}var Te=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,i=t/this.width|0;let u=r+1,s=i+1;for(let a=1;u<this.width&&this.map[t+a]==n;a++)u++;for(let a=1;s<this.height&&this.map[t+this.width*a]==n;a++)s++;return{left:r,top:i,right:u,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:i,top:u,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?r==0:i==this.width)?null:this.map[u*this.width+(n<0?r-1:i)]:(n<0?u==0:s==this.height)?null:this.map[r+this.width*(n<0?u-1:s)]}rectBetween(e,t){const{left:n,right:r,top:i,bottom:u}=this.findCell(e),{left:s,right:a,top:o,bottom:l}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,o),right:Math.max(r,a),bottom:Math.max(u,l)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){const u=r*this.width+i,s=this.map[u];n[s]||(n[s]=!0,!(i==e.left&&i&&this.map[u-1]==s||r==e.top&&r&&this.map[u-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){const u=i+n.child(r).nodeSize;if(r==e){let s=t+e*this.width;const a=(e+1)*this.width;for(;s<a&&this.map[s]<i;)s++;return s==a?u-1:this.map[s]}i=u}}static get(e){return nc(e)||rc(e,s6(e))}};function s6(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=a6(e),n=e.childCount,r=[];let i=0,u=null;const s=[];for(let l=0,c=t*n;l<c;l++)r[l]=0;for(let l=0,c=0;l<n;l++){const d=e.child(l);c++;for(let m=0;;m++){for(;i<r.length&&r[i]!=0;)i++;if(m==d.childCount)break;const A=d.child(m),{colspan:E,rowspan:g,colwidth:N}=A.attrs;for(let w=0;w<g;w++){if(w+l>=n){(u||(u=[])).push({type:"overlong_rowspan",pos:c,n:g-w});break}const _=i+w*t;for(let S=0;S<E;S++){r[_+S]==0?r[_+S]=c:(u||(u=[])).push({type:"collision",row:l,pos:c,n:E-S});const k=N&&N[S];if(k){const R=(_+S)%t*2,Q=s[R];Q==null||Q!=k&&s[R+1]==1?(s[R]=k,s[R+1]=1):Q==k&&s[R+1]++}}}i+=E,c+=A.nodeSize}const f=(l+1)*t;let p=0;for(;i<f;)r[i++]==0&&p++;p&&(u||(u=[])).push({type:"missing",row:l,n:p}),c++}(t===0||n===0)&&(u||(u=[])).push({type:"zero_sized"});const a=new Te(t,n,r,u);let o=!1;for(let l=0;!o&&l<s.length;l+=2)s[l]!=null&&s[l+1]<n&&(o=!0);return o&&o6(a,s,e),a}function a6(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const i=e.child(r);let u=0;if(n)for(let s=0;s<r;s++){const a=e.child(s);for(let o=0;o<a.childCount;o++){const l=a.child(o);s+l.attrs.rowspan>r&&(u+=l.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const a=i.child(s);u+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}t==-1?t=u:t!=u&&(t=Math.max(t,u))}return t}function o6(e,t,n){e.problems||(e.problems=[]);const r={};for(let i=0;i<e.map.length;i++){const u=e.map[i];if(r[u])continue;r[u]=!0;const s=n.nodeAt(u);if(!s)throw new RangeError(`No cell with offset ${u} found`);let a=null;const o=s.attrs;for(let l=0;l<o.colspan;l++){const c=t[(i+l)%e.width*2];c!=null&&(!o.colwidth||o.colwidth[l]!=c)&&((a||(a=l6(o)))[l]=c)}a&&e.problems.unshift({type:"colwidth mismatch",pos:u,colwidth:a})}}function l6(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function f0(e,t){if(typeof e=="string")return{};const n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(s=>Number(s)):null,i=Number(e.getAttribute("colspan")||1),u={colspan:i,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(const s in t){const a=t[s].getFromDOM,o=a&&a(e);o!=null&&(u[s]=o)}return u}function h0(e,t){const n={};e.attrs.colspan!=1&&(n.colspan=e.attrs.colspan),e.attrs.rowspan!=1&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const r in t){const i=t[r].setDOMAttr;i&&i(e.attrs[r],n)}return n}function c6(e){if(e!==null){if(!Array.isArray(e))throw new TypeError("colwidth must be null or an array");for(const t of e)if(typeof t!="number")throw new TypeError("colwidth must be null or an array of numbers")}}function d6(e){const t=e.cellAttributes||{},n={colspan:{default:1,validate:"number"},rowspan:{default:1,validate:"number"},colwidth:{default:null,validate:c6}};for(const r in t)n[r]={default:t[r].default,validate:t[r].validate};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:r=>f0(r,t)}],toDOM(r){return["td",h0(r,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:r=>f0(r,t)}],toDOM(r){return["th",h0(r,t),0]}}}}function vt(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}const Qn=new wt("selectingCells");function di(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Ut(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Pa(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=di(t.$head)||f6(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function f6(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ic(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function h6(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Jd(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function HA(e,t,n){const r=e.node(-1),i=Te.get(r),u=e.start(-1),s=i.nextCell(e.pos-u,t,n);return s==null?null:e.node(0).resolve(u+s)}function vr(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function p6(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(t,0,0)}return r}function m6(e,t,n){const r=vt(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var Se=class mn extends ue{constructor(t,n=t){const r=t.node(-1),i=Te.get(r),u=t.start(-1),s=i.rectBetween(t.pos-u,n.pos-u),a=t.node(0),o=i.cellsInRect(s).filter(c=>c!=n.pos-u);o.unshift(n.pos-u);const l=o.map(c=>{const d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);const f=u+c+1;return new u1(a.resolve(f),a.resolve(f+d.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=t,this.$headCell=n}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(ic(r)&&ic(i)&&Jd(r,i)){const u=this.$anchorCell.node(-1)!=r.node(-1);return u&&this.isRowSelection()?mn.rowSelection(r,i):u&&this.isColSelection()?mn.colSelection(r,i):new mn(r,i)}return ae.between(r,i)}content(){const t=this.$anchorCell.node(-1),n=Te.get(t),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),u={},s=[];for(let o=i.top;o<i.bottom;o++){const l=[];for(let c=o*n.width+i.left,d=i.left;d<i.right;d++,c++){const f=n.map[c];if(u[f])continue;u[f]=!0;const p=n.findCell(f);let m=t.nodeAt(f);if(!m)throw new RangeError(`No cell with offset ${f} found`);const A=i.left-p.left,E=p.right-i.right;if(A>0||E>0){let g=m.attrs;if(A>0&&(g=vr(g,0,A)),E>0&&(g=vr(g,g.colspan-E,E)),p.left<i.left){if(m=m.type.createAndFill(g),!m)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(g)}`)}else m=m.type.create(g,m.content)}if(p.top<i.top||p.bottom>i.bottom){const g={...m.attrs,rowspan:Math.min(p.bottom,i.bottom)-Math.max(p.top,i.top)};p.top<i.top?m=m.type.createAndFill(g):m=m.type.create(g,m.content)}l.push(m)}s.push(t.child(o).copy(H.from(l)))}const a=this.isColSelection()&&this.isRowSelection()?t:s;return new Y(H.from(a),1,1)}replace(t,n=Y.empty){const r=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:a,$to:o}=i[s],l=t.mapping.slice(r);t.replace(l.map(a.pos),l.map(o.pos),s?Y.empty:n)}const u=ue.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);u&&t.setSelection(u)}replaceWith(t,n){this.replace(t,new Y(H.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),r=Te.get(n),i=this.$anchorCell.start(-1),u=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<u.length;s++)t(n.nodeAt(u[s]),i+u[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const r=t+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const r=t.node(-1),i=Te.get(r),u=t.start(-1),s=i.findCell(t.pos-u),a=i.findCell(n.pos-u),o=t.node(0);return s.top<=a.top?(s.top>0&&(t=o.resolve(u+i.map[s.left])),a.bottom<i.height&&(n=o.resolve(u+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=o.resolve(u+i.map[a.left])),s.bottom<i.height&&(t=o.resolve(u+i.map[i.width*(i.height-1)+s.right-1]))),new mn(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=Te.get(t),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),u=n.colCount(this.$headCell.pos-r);if(Math.min(i,u)>0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,a=u+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(t){return t instanceof mn&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),i=Te.get(r),u=t.start(-1),s=i.findCell(t.pos-u),a=i.findCell(n.pos-u),o=t.node(0);return s.left<=a.left?(s.left>0&&(t=o.resolve(u+i.map[s.top*i.width])),a.right<i.width&&(n=o.resolve(u+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=o.resolve(u+i.map[a.top*i.width])),s.right<i.width&&(t=o.resolve(u+i.map[i.width*(s.top+1)-1]))),new mn(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new mn(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new mn(t.resolve(n),t.resolve(r))}getBookmark(){return new A6(this.$anchorCell.pos,this.$headCell.pos)}};Se.prototype.visible=!1;ue.jsonID("cell",Se);var A6=class UA{constructor(t,n){this.anchor=t,this.head=n}map(t){return new UA(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),r=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Jd(n,r)?new Se(n,r):ue.near(r,1)}};function g6(e){if(!(e.selection instanceof Se))return null;const t=[];return e.selection.forEachCell((n,r)=>{t.push(je.node(r,r+n.nodeSize,{class:"selectedCell"}))}),De.create(e.doc,t)}function b6({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let u=t.depth;u>=0&&!(t.before(u+1)>t.start(u));u--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function E6({$from:e,$to:t}){let n,r;for(let i=e.depth;i>0;i--){const u=e.node(i);if(u.type.spec.tableRole==="cell"||u.type.spec.tableRole==="header_cell"){n=u;break}}for(let i=t.depth;i>0;i--){const u=t.node(i);if(u.type.spec.tableRole==="cell"||u.type.spec.tableRole==="header_cell"){r=u;break}}return n!==r&&t.parentOffset===0}function y6(e,t,n){const r=(t||e).selection,i=(t||e).doc;let u,s;if(r instanceof re&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")u=Se.create(i,r.from);else if(s=="row"){const a=i.resolve(r.from+1);u=Se.rowSelection(a,a)}else if(!n){const a=Te.get(r.node),o=r.from+1,l=o+a.map[a.width*a.height-1];u=Se.create(i,o+1,l)}}else r instanceof ae&&b6(r)?u=ae.create(i,r.from):r instanceof ae&&E6(r)&&(u=ae.create(i,r.$from.start(),r.$from.end()));return u&&(t||(t=e.tr)).setSelection(u),t}const T6=new wt("fix-tables");function WA(e,t,n,r){const i=e.childCount,u=t.childCount;e:for(let s=0,a=0;s<u;s++){const o=t.child(s);for(let l=a,c=Math.min(i,s+3);l<c;l++)if(e.child(l)==o){a=l+1,n+=o.nodeSize;continue e}r(o,n),a<i&&e.child(a).sameMarkup(o)?WA(e.child(a),o,n+1,r):o.nodesBetween(0,o.content.size,r,n+1),n+=o.nodeSize}}function C6(e,t){let n;const r=(i,u)=>{i.type.spec.tableRole=="table"&&(n=x6(e,i,u,n))};return t?t.doc!=e.doc&&WA(t.doc,e.doc,0,r):e.doc.descendants(r),n}function x6(e,t,n,r){const i=Te.get(t);if(!i.problems)return r;r||(r=e.tr);const u=[];for(let o=0;o<i.height;o++)u.push(0);for(let o=0;o<i.problems.length;o++){const l=i.problems[o];if(l.type=="collision"){const c=t.nodeAt(l.pos);if(!c)continue;const d=c.attrs;for(let f=0;f<d.rowspan;f++)u[l.row+f]+=l.n;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,vr(d,d.colspan-l.n,l.n))}else if(l.type=="missing")u[l.row]+=l.n;else if(l.type=="overlong_rowspan"){const c=t.nodeAt(l.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-l.n})}else if(l.type=="colwidth mismatch"){const c=t.nodeAt(l.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,{...c.attrs,colwidth:l.colwidth})}else if(l.type=="zero_sized"){const c=r.mapping.map(n);r.delete(c,c+t.nodeSize)}}let s,a;for(let o=0;o<u.length;o++)u[o]&&(s==null&&(s=o),a=o);for(let o=0,l=n+1;o<i.height;o++){const c=t.child(o),d=l+c.nodeSize,f=u[o];if(f>0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);const m=[];for(let E=0;E<f;E++){const g=vt(e.schema)[p].createAndFill();g&&m.push(g)}const A=(o==0||s==o-1)&&a==o?l+1:d-1;r.insert(r.mapping.map(A),m)}l=d}return r.setMeta(T6,{fixTables:!0})}function KA(e){const t=Te.get(e),n=[],r=t.height,i=t.width;for(let u=0;u<r;u++){const s=[];for(let a=0;a<i;a++){const o=u*i+a,l=t.map[o];if(u>0){const c=o-i;if(l===t.map[c]){s.push(null);continue}}if(a>0){const c=o-1;if(l===t.map[c]){s.push(null);continue}}s.push(e.nodeAt(l))}n.push(s)}return n}function QA(e,t){const n=[],r=Te.get(e),i=r.height,u=r.width;for(let s=0;s<i;s++){const a=e.child(s),o=[];for(let c=0;c<u;c++){const d=t[s][c];if(!d)continue;const f=r.map[s*r.width+c],p=e.nodeAt(f);if(!p)continue;const m=p.type.createChecked(d.attrs,d.content,d.marks);o.push(m)}const l=a.type.createChecked(a.attrs,o,a.marks);n.push(l)}return e.type.createChecked(e.attrs,n,e.marks)}function zA(e,t,n,r){const i=t[0]>n[0]?-1:1,u=e.splice(t[0],t.length),s=u.length%2===0?1:0;let a;return a=i===-1?n[0]:n[n.length-1]-s,e.splice(a,0,...u),e}function qu(e){return k6(t=>t.type.spec.tableRole==="table",e)}function k6(e,t){for(let n=t.depth;n>=0;n-=1){const r=t.node(n);if(e(r))return{node:r,pos:n===0?0:t.before(n),start:t.start(n),depth:n}}return null}function Zr(e,t){const n=qu(t.$from);if(!n)return;const r=Te.get(n.node);if(!(e<0||e>r.width-1))return r.cellsInRect({left:e,right:e+1,top:0,bottom:r.height}).map(i=>{const u=n.node.nodeAt(i),s=i+n.start;return{pos:s,start:s+1,node:u,depth:n.depth+2}})}function Xr(e,t){const n=qu(t.$from);if(!n)return;const r=Te.get(n.node);if(!(e<0||e>r.height-1))return r.cellsInRect({left:0,right:r.width,top:e,bottom:e+1}).map(i=>{const u=n.node.nodeAt(i),s=i+n.start;return{pos:s,start:s+1,node:u,depth:n.depth+2}})}function p0(e,t,n=t){let r=t,i=n;for(let c=t;c>=0;c--){const d=Zr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;p>=r&&(r=c),p>i&&(i=p)})}for(let c=t;c<=i;c++){const d=Zr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;f.node.attrs.colspan>1&&p>i&&(i=p)})}const u=[];for(let c=r;c<=i;c++){const d=Zr(c,e.selection);d&&d.length>0&&u.push(c)}r=u[0],i=u[u.length-1];const s=Zr(r,e.selection),a=Xr(0,e.selection);if(!s||!a)return;const o=e.doc.resolve(s[s.length-1].pos);let l;for(let c=i;c>=r;c--){const d=Zr(c,e.selection);if(d&&d.length>0){for(let f=a.length-1;f>=0;f--)if(a[f].pos===d[0].pos){l=d[0];break}if(l)break}}if(l)return{$anchor:o,$head:e.doc.resolve(l.pos),indexes:u}}function m0(e,t,n=t){let r=t,i=n;for(let c=t;c>=0;c--){const d=Xr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.rowspan+c-1;p>=r&&(r=c),p>i&&(i=p)})}for(let c=t;c<=i;c++){const d=Xr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.rowspan+c-1;f.node.attrs.rowspan>1&&p>i&&(i=p)})}const u=[];for(let c=r;c<=i;c++){const d=Xr(c,e.selection);d&&d.length>0&&u.push(c)}r=u[0],i=u[u.length-1];const s=Xr(r,e.selection),a=Zr(0,e.selection);if(!s||!a)return;const o=e.doc.resolve(s[s.length-1].pos);let l;for(let c=i;c>=r;c--){const d=Xr(c,e.selection);if(d&&d.length>0){for(let f=a.length-1;f>=0;f--)if(a[f].pos===d[0].pos){l=d[0];break}if(l)break}}if(l)return{$anchor:o,$head:e.doc.resolve(l.pos),indexes:u}}function A0(e){return e[0].map((t,n)=>e.map(r=>r[n]))}function w6(e){var t,n;const{tr:r,originIndex:i,targetIndex:u,select:s,pos:a}=e,o=qu(r.doc.resolve(a));if(!o)return!1;const l=(t=p0(r,i))===null||t===void 0?void 0:t.indexes,c=(n=p0(r,u))===null||n===void 0?void 0:n.indexes;if(!l||!c||l.includes(u))return!1;const d=I6(o.node,l,c);if(r.replaceWith(o.pos,o.pos+o.node.nodeSize,d),!s)return!0;const f=Te.get(d),p=o.start,m=u,A=f.positionAt(f.height-1,m,d),E=r.doc.resolve(p+A),g=f.positionAt(0,m,d),N=r.doc.resolve(p+g);return r.setSelection(Se.colSelection(E,N)),!0}function I6(e,t,n,r){let i=A0(KA(e));return i=zA(i,t,n),i=A0(i),QA(e,i)}function S6(e){var t,n;const{tr:r,originIndex:i,targetIndex:u,select:s,pos:a}=e,o=qu(r.doc.resolve(a));if(!o)return!1;const l=(t=m0(r,i))===null||t===void 0?void 0:t.indexes,c=(n=m0(r,u))===null||n===void 0?void 0:n.indexes;if(!l||!c||l.includes(u))return!1;const d=N6(o.node,l,c);if(r.replaceWith(o.pos,o.pos+o.node.nodeSize,d),!s)return!0;const f=Te.get(d),p=o.start,m=u,A=f.positionAt(m,f.width-1,d),E=r.doc.resolve(p+A),g=f.positionAt(m,0,d),N=r.doc.resolve(p+g);return r.setSelection(Se.rowSelection(E,N)),!0}function N6(e,t,n,r){let i=KA(e);return i=zA(i,t,n),QA(e,i)}function ar(e){const t=e.selection,n=Pa(e),r=n.node(-1),i=n.start(-1),u=Te.get(r);return{...t instanceof Se?u.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):u.findCell(n.pos-i),tableStart:i,map:u,table:r}}function YA(e,{map:t,tableStart:n,table:r},i){let u=i>0?-1:0;m6(t,r,i+u)&&(u=i==0||i==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){const o=t.map[a],l=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,p6(l.attrs,i-t.colCount(o))),s+=l.attrs.rowspan-1}else{const o=u==null?vt(r.type.schema).cell:r.nodeAt(t.map[a+u]).type,l=t.positionAt(s,i,r);e.insert(e.mapping.map(n+l),o.createAndFill())}}return e}function D6(e,t){if(!Ut(e))return!1;if(t){const n=ar(e);t(YA(e.tr,n,n.left))}return!0}function _6(e,t){if(!Ut(e))return!1;if(t){const n=ar(e);t(YA(e.tr,n,n.right))}return!0}function O6(e,{map:t,table:n,tableStart:r},i){const u=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+i,o=t.map[a],l=n.nodeAt(o),c=l.attrs;if(i>0&&t.map[a-1]==o||i<t.width-1&&t.map[a+1]==o)e.setNodeMarkup(e.mapping.slice(u).map(r+o),null,vr(c,i-t.colCount(o)));else{const d=e.mapping.slice(u).map(r+o);e.delete(d,d+l.nodeSize)}s+=c.rowspan}}function R6(e,t){if(!Ut(e))return!1;if(t){const n=ar(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;O6(r,n,i),i!=n.left;i--){const u=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!u)throw new RangeError("No table found");n.table=u,n.map=Te.get(u)}t(r)}return!0}function M6(e,{map:t,table:n,tableStart:r},i){let u=0;for(let l=0;l<i;l++)u+=n.child(l).nodeSize;const s=u+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(u+r,s+r);const o=new Set;for(let l=0,c=i*t.width;l<t.width;l++,c++){const d=t.map[c];if(!o.has(d)){if(o.add(d),i>0&&d==t.map[c-t.width]){const f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f,rowspan:f.rowspan-1}),l+=f.colspan-1}else if(i<t.height&&d==t.map[c+t.width]){const f=n.nodeAt(d),p=f.attrs,m=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),A=t.positionAt(i+1,l,n);e.insert(e.mapping.slice(a).map(r+A),m),l+=p.colspan-1}}}}function B6(e,t){if(!Ut(e))return!1;if(t){const n=ar(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;M6(r,n,i),i!=n.top;i--){const u=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!u)throw new RangeError("No table found");n.table=u,n.map=Te.get(n.table)}t(r)}return!0}function L6(e,t){return function(n,r){if(!Ut(n))return!1;const i=Pa(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){const u=n.tr;n.selection instanceof Se?n.selection.forEachCell((s,a)=>{s.attrs[e]!==t&&u.setNodeMarkup(a,null,{...s.attrs,[e]:t})}):u.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(u)}return!0}}function v6(e){return function(t,n){if(!Ut(t))return!1;if(n){const r=vt(t.schema),i=ar(t),u=t.tr,s=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(o=>i.table.nodeAt(o));for(let o=0;o<s.length;o++)a[o].type==r.header_cell&&u.setNodeMarkup(i.tableStart+s[o],r.cell,a[o].attrs);if(u.steps.length===0)for(let o=0;o<s.length;o++)u.setNodeMarkup(i.tableStart+s[o],r.header_cell,a[o].attrs);n(u)}return!0}}function g0(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let i=0;i<r.length;i++){const u=t.table.nodeAt(r[i]);if(u&&u.type!==n.header_cell)return!1}return!0}function jd(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?v6(e):function(n,r){if(!Ut(n))return!1;if(r){const i=vt(n.schema),u=ar(n),s=n.tr,a=g0("row",u,i),o=g0("column",u,i),l=(e==="column"?a:e==="row"&&o)?1:0,c=e=="column"?{left:0,top:l,right:1,bottom:u.map.height}:e=="row"?{left:l,top:0,right:u.map.width,bottom:1}:u,d=e=="column"?o?i.cell:i.header_cell:e=="row"?a?i.cell:i.header_cell:i.cell;u.map.cellsInRect(c).forEach(f=>{const p=f+u.tableStart,m=s.doc.nodeAt(p);m&&s.setNodeMarkup(p,d,m.attrs)}),r(s)}return!0}}jd("row",{useDeprecatedLogic:!0});jd("column",{useDeprecatedLogic:!0});jd("cell",{useDeprecatedLogic:!0});function P6(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,i=e.before();r>=0;r--){const u=e.node(-1).child(r),s=u.lastChild;if(s)return i-1-s.nodeSize;i-=u.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let r=e.indexAfter(-1),i=e.after();r<n.childCount;r++){const u=n.child(r);if(u.childCount)return i+1;i+=u.nodeSize}}return null}function GA(e){return function(t,n){if(!Ut(t))return!1;const r=P6(Pa(t),e);if(r==null)return!1;if(n){const i=t.doc.resolve(r);n(t.tr.setSelection(ae.between(i,h6(i))).scrollIntoView())}return!0}}function F6(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function fs(e,t){const n=e.selection;if(!(n instanceof Se))return!1;if(t){const r=e.tr,i=vt(e.schema).cell.createAndFill().content;n.forEachCell((u,s)=>{u.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+u.nodeSize-1),new Y(i,0,0))}),r.docChanged&&t(r)}return!0}function H6(e){return(t,n)=>{const{from:r,to:i,select:u=!0,pos:s=t.selection.from}=e,a=t.tr;return S6({tr:a,originIndex:r,targetIndex:i,select:u,pos:s})?(n?.(a),!0):!1}}function U6(e){return(t,n)=>{const{from:r,to:i,select:u=!0,pos:s=t.selection.from}=e,a=t.tr;return w6({tr:a,originIndex:r,targetIndex:i,select:u,pos:s})?(n?.(a),!0):!1}}function W6(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const i=t.child(0),u=i.type.spec.tableRole,s=i.type.schema,a=[];if(u=="row")for(let o=0;o<t.childCount;o++){let l=t.child(o).content;const c=o?0:Math.max(0,n-1),d=o<t.childCount-1?0:Math.max(0,r-1);(c||d)&&(l=uc(vt(s).row,new Y(l,c,d)).content),a.push(l)}else if(u=="cell"||u=="header_cell")a.push(n||r?uc(vt(s).row,new Y(t,n,r)).content:t);else return null;return K6(s,a)}function K6(e,t){const n=[];for(let i=0;i<t.length;i++){const u=t[i];for(let s=u.childCount-1;s>=0;s--){const{rowspan:a,colspan:o}=u.child(s).attrs;for(let l=i;l<i+a;l++)n[l]=(n[l]||0)+o}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(H.empty),n[i]<r){const u=vt(e).cell.createAndFill(),s=[];for(let a=n[i];a<r;a++)s.push(u);t[i]=t[i].append(H.from(s))}return{height:t.length,width:r,rows:t}}function uc(e,t){const n=e.createAndFill();return new i1(n).replace(0,n.content.size,t).doc}function Q6({width:e,height:t,rows:n},r,i){if(e!=r){const u=[],s=[];for(let a=0;a<n.length;a++){const o=n[a],l=[];for(let c=u[a]||0,d=0;c<r;d++){let f=o.child(d%o.childCount);c+f.attrs.colspan>r&&(f=f.type.createChecked(vr(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),l.push(f),c+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)u[a+p]=(u[a+p]||0)+f.attrs.colspan}s.push(H.from(l))}n=s,e=r}if(t!=i){const u=[];for(let s=0,a=0;s<i;s++,a++){const o=[],l=n[a%t];for(let c=0;c<l.childCount;c++){let d=l.child(c);s+d.attrs.rowspan>i&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),o.push(d)}u.push(H.from(o))}n=u,t=i}return{width:e,height:t,rows:n}}function z6(e,t,n,r,i,u,s){const a=e.doc.type.schema,o=vt(a);let l,c;if(i>t.width)for(let d=0,f=0;d<t.height;d++){const p=n.child(d);f+=p.nodeSize;const m=[];let A;p.lastChild==null||p.lastChild.type==o.cell?A=l||(l=o.cell.createAndFill()):A=c||(c=o.header_cell.createAndFill());for(let E=t.width;E<i;E++)m.push(A);e.insert(e.mapping.slice(s).map(f-1+r),m)}if(u>t.height){const d=[];for(let m=0,A=(t.height-1)*t.width;m<Math.max(t.width,i);m++){const E=m>=t.width?!1:n.nodeAt(t.map[A+m]).type==o.header_cell;d.push(E?c||(c=o.header_cell.createAndFill()):l||(l=o.cell.createAndFill()))}const f=o.row.create(null,H.from(d)),p=[];for(let m=t.height;m<u;m++)p.push(f);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),p)}return!!(l||c)}function b0(e,t,n,r,i,u,s,a){if(s==0||s==t.height)return!1;let o=!1;for(let l=i;l<u;l++){const c=s*t.width+l,d=t.map[c];if(t.map[c-t.width]==d){o=!0;const f=n.nodeAt(d),{top:p,left:m}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(a).map(t.positionAt(s,m,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),l+=f.attrs.colspan-1}}return o}function E0(e,t,n,r,i,u,s,a){if(s==0||s==t.width)return!1;let o=!1;for(let l=i;l<u;l++){const c=l*t.width+s,d=t.map[c];if(t.map[c-1]==d){o=!0;const f=n.nodeAt(d),p=t.colCount(d),m=e.mapping.slice(a).map(d+r);e.setNodeMarkup(m,null,vr(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(m+f.nodeSize,f.type.createAndFill(vr(f.attrs,0,s-p))),l+=f.attrs.rowspan-1}}return o}function y0(e,t,n,r,i){let u=n?e.doc.nodeAt(n-1):e.doc;if(!u)throw new Error("No table found");let s=Te.get(u);const{top:a,left:o}=r,l=o+i.width,c=a+i.height,d=e.tr;let f=0;function p(){if(u=n?d.doc.nodeAt(n-1):d.doc,!u)throw new Error("No table found");s=Te.get(u),f=d.mapping.maps.length}z6(d,s,u,n,l,c,f)&&p(),b0(d,s,u,n,o,l,a,f)&&p(),b0(d,s,u,n,o,l,c,f)&&p(),E0(d,s,u,n,a,c,o,f)&&p(),E0(d,s,u,n,a,c,l,f)&&p();for(let m=a;m<c;m++){const A=s.positionAt(m,o,u),E=s.positionAt(m,l,u);d.replace(d.mapping.slice(f).map(A+n),d.mapping.slice(f).map(E+n),new Y(i.rows[m-a],0,0))}p(),d.setSelection(new Se(d.doc.resolve(n+s.positionAt(a,o,u)),d.doc.resolve(n+s.positionAt(c-1,l-1,u)))),t(d)}const Y6=b1({ArrowLeft:hs("horiz",-1),ArrowRight:hs("horiz",1),ArrowUp:hs("vert",-1),ArrowDown:hs("vert",1),"Shift-ArrowLeft":ps("horiz",-1),"Shift-ArrowRight":ps("horiz",1),"Shift-ArrowUp":ps("vert",-1),"Shift-ArrowDown":ps("vert",1),Backspace:fs,"Mod-Backspace":fs,Delete:fs,"Mod-Delete":fs});function Ms(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function hs(e,t){return(n,r,i)=>{if(!i)return!1;const u=n.selection;if(u instanceof Se)return Ms(n,r,ue.near(u.$headCell,t));if(e!="horiz"&&!u.empty)return!1;const s=qA(i,e,t);if(s==null)return!1;if(e=="horiz")return Ms(n,r,ue.near(n.doc.resolve(u.head+t),t));{const a=n.doc.resolve(s),o=HA(a,e,t);let l;return o?l=ue.near(o,1):t<0?l=ue.near(n.doc.resolve(a.before(-1)),-1):l=ue.near(n.doc.resolve(a.after(-1)),1),Ms(n,r,l)}}}function ps(e,t){return(n,r,i)=>{if(!i)return!1;const u=n.selection;let s;if(u instanceof Se)s=u;else{const o=qA(i,e,t);if(o==null)return!1;s=new Se(n.doc.resolve(o))}const a=HA(s.$headCell,e,t);return a?Ms(n,r,new Se(s.$anchorCell,a)):!1}}function G6(e,t){const n=e.state.doc,r=di(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new Se(r))),!0):!1}function q6(e,t,n){if(!Ut(e.state))return!1;let r=W6(n);const i=e.state.selection;if(i instanceof Se){r||(r={width:1,height:1,rows:[H.from(uc(vt(e.state.schema).cell,n))]});const u=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=Te.get(u).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=Q6(r,a.right-a.left,a.bottom-a.top),y0(e.state,e.dispatch,s,a,r),!0}else if(r){const u=Pa(e.state),s=u.start(-1);return y0(e.state,e.dispatch,s,Te.get(u.node(-1)).findCell(u.pos-s),r),!0}else return!1}function V6(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const r=T0(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof Se)u(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=di(e.state.selection.$anchor))!=null&&((n=Uo(e,t))===null||n===void 0?void 0:n.pos)!=i.pos)u(i,t),t.preventDefault();else if(!r)return;function u(o,l){let c=Uo(e,l);const d=Qn.getState(e.state)==null;if(!c||!Jd(o,c))if(d)c=o;else return;const f=new Se(o,c);if(d||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);d&&p.setMeta(Qn,o.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Qn.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Qn,-1))}function a(o){const l=o,c=Qn.getState(e.state);let d;if(c!=null)d=e.state.doc.resolve(c);else if(T0(e,l.target)!=r&&(d=Uo(e,t),!d))return s();d&&u(d,l)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function qA(e,t,n){if(!(e.state.selection instanceof ae))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const u=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:u.childCount))return null;if(u.type.spec.tableRole=="cell"||u.type.spec.tableRole=="header_cell"){const s=r.before(i),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?s:null}}return null}function T0(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Uo(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&di(e.state.doc.resolve(r))||di(e.state.doc.resolve(i))}var J6=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),sc(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,sc(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function sc(e,t,n,r,i,u){let s=0,a=!0,o=t.firstChild;const l=e.firstChild;if(l){for(let d=0,f=0;d<l.childCount;d++){const{colspan:p,colwidth:m}=l.child(d).attrs;for(let A=0;A<p;A++,f++){const E=i==f?u:m&&m[A],g=E?E+"px":"";if(s+=E||r,E||(a=!1),o)o.style.width!=g&&(o.style.width=g),o=o.nextSibling;else{const N=document.createElement("col");N.style.width=g,t.appendChild(N)}}}for(;o;){var c;const d=o.nextSibling;(c=o.parentNode)===null||c===void 0||c.removeChild(o),o=d}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const Ct=new wt("tableColumnResizing");function j6({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=J6,lastColumnResizable:i=!0}={}){const u=new kt({key:Ct,state:{init(s,a){var o;const l=(o=u.spec)===null||o===void 0||(o=o.props)===null||o===void 0?void 0:o.nodeViews,c=vt(a.schema).table.name;return r&&l&&(l[c]=(d,f)=>new r(d,n,f)),new Z6(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Ct.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{X6(s,a,e,i)},mouseleave:s=>{$6(s)},mousedown:(s,a)=>{ew(s,a,t,n)}},decorations:s=>{const a=Ct.getState(s);if(a&&a.activeHandle>-1)return uw(s,a.activeHandle)},nodeViews:{}}});return u}var Z6=class Bs{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,r=t.getMeta(Ct);if(r&&r.setHandle!=null)return new Bs(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Bs(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let i=t.mapping.map(n.activeHandle,-1);return ic(t.doc.resolve(i))||(i=-1),new Bs(i,n.dragging)}return n}};function X6(e,t,n,r){if(!e.editable)return;const i=Ct.getState(e.state);if(i&&!i.dragging){const u=nw(t.target);let s=-1;if(u){const{left:a,right:o}=u.getBoundingClientRect();t.clientX-a<=n?s=C0(e,t,"left",n):o-t.clientX<=n&&(s=C0(e,t,"right",n))}if(s!=i.activeHandle){if(!r&&s!==-1){const a=e.state.doc.resolve(s),o=a.node(-1),l=Te.get(o),c=a.start(-1);if(l.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==l.width-1)return}VA(e,s)}}}function $6(e){if(!e.editable)return;const t=Ct.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&VA(e,-1)}function ew(e,t,n,r){var i;if(!e.editable)return!1;const u=(i=e.dom.ownerDocument.defaultView)!==null&&i!==void 0?i:window,s=Ct.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=e.state.doc.nodeAt(s.activeHandle),o=tw(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(Ct,{setDragging:{startX:t.clientX,startWidth:o}}));function l(d){u.removeEventListener("mouseup",l),u.removeEventListener("mousemove",c);const f=Ct.getState(e.state);f?.dragging&&(rw(e,f.activeHandle,x0(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(Ct,{setDragging:null})))}function c(d){if(!d.which)return l(d);const f=Ct.getState(e.state);if(f&&f.dragging){const p=x0(f.dragging,d,n);k0(e,f.activeHandle,p,r)}}return k0(e,s.activeHandle,o,r),u.addEventListener("mouseup",l),u.addEventListener("mousemove",c),t.preventDefault(),!0}function tw(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const u=e.domAtPos(t);let s=u.node.childNodes[u.offset].offsetWidth,a=n;if(r)for(let o=0;o<n;o++)r[o]&&(s-=r[o],a--);return s/a}function nw(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function C0(e,t,n,r){const i=n=="right"?-r:r,u=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!u)return-1;const{pos:s}=u,a=di(e.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const o=Te.get(a.node(-1)),l=a.start(-1),c=o.map.indexOf(a.pos-l);return c%o.width==0?-1:l+o.map[c-1]}function x0(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function VA(e,t){e.dispatch(e.state.tr.setMeta(Ct,{setHandle:t}))}function rw(e,t,n){const r=e.state.doc.resolve(t),i=r.node(-1),u=Te.get(i),s=r.start(-1),a=u.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,o=e.state.tr;for(let l=0;l<u.height;l++){const c=l*u.width+a;if(l&&u.map[c]==u.map[c-u.width])continue;const d=u.map[c],f=i.nodeAt(d).attrs,p=f.colspan==1?0:a-u.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;const m=f.colwidth?f.colwidth.slice():iw(f.colspan);m[p]=n,o.setNodeMarkup(s+d,null,{...f,colwidth:m})}o.docChanged&&e.dispatch(o)}function k0(e,t,n,r){const i=e.state.doc.resolve(t),u=i.node(-1),s=i.start(-1),a=Te.get(u).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let o=e.domAtPos(i.start(-1)).node;for(;o&&o.nodeName!="TABLE";)o=o.parentNode;o&&sc(u,o.firstChild,o,r,a,n)}function iw(e){return Array(e).fill(0)}function uw(e,t){const n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return De.empty;const u=Te.get(i),s=r.start(-1),a=u.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let l=0;l<u.height;l++){const c=a+l*u.width;if((a==u.width-1||u.map[c]!=u.map[c+1])&&(l==0||u.map[c]!=u.map[c-u.width])){var o;const d=u.map[c],f=s+d+i.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((o=Ct.getState(e))===null||o===void 0)&&o.dragging&&n.push(je.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),n.push(je.widget(f,p))}}return De.create(e.doc,n)}function sw({allowTableNodeSelection:e=!1}={}){return new kt({key:Qn,state:{init(){return null},apply(t,n){const r=t.getMeta(Qn);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:i,pos:u}=t.mapping.mapResult(n);return i?null:u}},props:{decorations:g6,handleDOMEvents:{mousedown:V6},createSelectionBetween(t){return Qn.getState(t.state)!=null?t.state.selection:null},handleTripleClick:G6,handleKeyDown:Y6,handlePaste:q6},appendTransaction(t,n,r){return y6(r,C6(r,n),e)}})}var $s=typeof navigator<"u"?navigator:null,Zd=$s&&$s.userAgent||"",aw=/Edge\/(\d+)/.exec(Zd),ow=/MSIE \d/.exec(Zd),lw=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Zd),cw=!!(ow||lw||aw),dw=!cw&&!!$s&&/Apple Computer/.test($s.vendor),JA=new wt("safari-ime-span"),ac=!1,fw={key:JA,props:{decorations:hw,handleDOMEvents:{compositionstart:()=>{ac=!0},compositionend:()=>{ac=!1}}}};function hw(e){const{$from:t,$to:n,to:r}=e.selection;if(ac&&t.sameParent(n)){const i=je.widget(r,pw,{ignoreSelection:!0,key:"safari-ime-span"});return De.create(e.doc,[i])}}function pw(e){const t=e.dom.ownerDocument.createElement("span");return t.className="ProseMirror-safari-ime-span",t}var mw=new kt(dw?fw:{key:JA});function w0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Aw(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function gw(e,t,n){const i=ka((n||{}).ignore||[]),u=bw(t);let s=-1;for(;++s<u.length;)Oc(e,"text",a);function a(l,c){let d=-1,f;for(;++d<c.length;){const p=c[d],m=f?f.children:void 0;if(i(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return o(l,c)}function o(l,c){const d=c[c.length-1],f=u[s][0],p=u[s][1];let m=0;const E=d.children.indexOf(l);let g=!1,N=[];f.lastIndex=0;let w=f.exec(l.value);for(;w;){const _=w.index,S={index:w.index,input:w.input,stack:[...c,l]};let k=p(...w,S);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?f.lastIndex=_+1:(m!==_&&N.push({type:"text",value:l.value.slice(m,_)}),Array.isArray(k)?N.push(...k):k&&N.push(k),m=_+w[0].length,g=!0),!f.global)break;w=f.exec(l.value)}return g?(m<l.value.length&&N.push({type:"text",value:l.value.slice(m)}),d.children.splice(E,1,...N)):N=[l],E+N.length}}function bw(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Ew(i[0]),yw(i[1])])}return t}function Ew(e){return typeof e=="string"?new RegExp(Aw(e),"g"):e}function yw(e){return typeof e=="function"?e:function(){return e}}const Wo="phrasing",Ko=["autolink","link","image","label"];function Tw(){return{transforms:[Nw],enter:{literalAutolink:xw,literalAutolinkEmail:Qo,literalAutolinkHttp:Qo,literalAutolinkWww:Qo},exit:{literalAutolink:Sw,literalAutolinkEmail:Iw,literalAutolinkHttp:kw,literalAutolinkWww:ww}}}function Cw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Wo,notInConstruct:Ko},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Wo,notInConstruct:Ko},{character:":",before:"[ps]",after:"\\/",inConstruct:Wo,notInConstruct:Ko}]}}function xw(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Qo(e){this.config.enter.autolinkProtocol.call(this,e)}function kw(e){this.config.exit.autolinkProtocol.call(this,e)}function ww(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Iw(e){this.config.exit.autolinkEmail.call(this,e)}function Sw(e){this.exit(e)}function Nw(e){gw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Dw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),_w]],{ignore:["link","linkReference"]})}function Dw(e,t,n,r,i){let u="";if(!jA(i)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!Ow(n)))return!1;const s=Rw(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:u+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function _w(e,t,n,r){return!jA(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Ow(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Rw(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=w0(e,"(");let u=w0(e,")");for(;r!==-1&&i>u;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),u++;return[e,n]}function jA(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||_r(n)||xa(n))&&(!t||n!==47)}ZA.peek=Ww;function Mw(){this.buffer()}function Bw(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Lw(){this.buffer()}function vw(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Pw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Fw(e){this.exit(e)}function Hw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Uw(e){this.exit(e)}function Ww(){return"["}function ZA(e,t,n,r){const i=n.createTracker(r);let u=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return u+=i.move(n.safe(n.associationId(e),{after:"]",before:u})),a(),s(),u+=i.move("]"),u}function Kw(){return{enter:{gfmFootnoteCallString:Mw,gfmFootnoteCall:Bw,gfmFootnoteDefinitionLabelString:Lw,gfmFootnoteDefinition:vw},exit:{gfmFootnoteCallString:Pw,gfmFootnoteCall:Fw,gfmFootnoteDefinitionLabelString:Hw,gfmFootnoteDefinition:Uw}}}function Qw(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ZA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,u,s){const a=u.createTracker(s);let o=a.move("[^");const l=u.enter("footnoteDefinition"),c=u.enter("label");return o+=a.move(u.safe(u.associationId(r),{before:o,after:"]"})),c(),o+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),o+=a.move((t?`
47
- `:" ")+u.indentLines(u.containerFlow(r,a.current()),t?XA:zw))),l(),o}}function zw(e,t,n){return t===0?e:XA(e,t,n)}function XA(e,t,n){return(n?"":" ")+e}const Yw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$A.peek=jw;function Gw(){return{canContainEols:["delete"],enter:{strikethrough:Vw},exit:{strikethrough:Jw}}}function qw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yw}],handlers:{delete:$A}}}function Vw(e){this.enter({type:"delete",children:[]},e)}function Jw(e){this.exit(e)}function $A(e,t,n,r){const i=n.createTracker(r),u=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),u(),s}function jw(){return"~"}function Zw(e){return e.length}function Xw(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Zw,u=[],s=[],a=[],o=[];let l=0,c=-1;for(;++c<e.length;){const A=[],E=[];let g=-1;for(e[c].length>l&&(l=e[c].length);++g<e[c].length;){const N=$w(e[c][g]);if(n.alignDelimiters!==!1){const w=i(N);E[g]=w,(o[g]===void 0||w>o[g])&&(o[g]=w)}A.push(N)}s[c]=A,a[c]=E}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<l;)u[d]=I0(r[d]);else{const A=I0(r);for(;++d<l;)u[d]=A}d=-1;const f=[],p=[];for(;++d<l;){const A=u[d];let E="",g="";A===99?(E=":",g=":"):A===108?E=":":A===114&&(g=":");let N=n.alignDelimiters===!1?1:Math.max(1,o[d]-E.length-g.length);const w=E+"-".repeat(N)+g;n.alignDelimiters!==!1&&(N=E.length+N+g.length,N>o[d]&&(o[d]=N),p[d]=N),f[d]=w}s.splice(1,0,f),a.splice(1,0,p),c=-1;const m=[];for(;++c<s.length;){const A=s[c],E=a[c];d=-1;const g=[];for(;++d<l;){const N=A[d]||"";let w="",_="";if(n.alignDelimiters!==!1){const S=o[d]-(E[d]||0),k=u[d];k===114?w=" ".repeat(S):k===99?S%2?(w=" ".repeat(S/2+.5),_=" ".repeat(S/2-.5)):(w=" ".repeat(S/2),_=w):_=" ".repeat(S)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(w),g.push(N),n.alignDelimiters!==!1&&g.push(_),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==l-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
48
- `)}function $w(e){return e==null?"":String(e)}function I0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function eI(){return{enter:{table:tI,tableData:S0,tableHeader:S0,tableRow:rI},exit:{codeText:iI,table:nI,tableData:zo,tableHeader:zo,tableRow:zo}}}function tI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function nI(e){this.exit(e),this.data.inTable=void 0}function rI(e){this.enter({type:"tableRow",children:[]},e)}function zo(e){this.exit(e)}function S0(e){this.enter({type:"tableCell",children:[]},e)}function iI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,uI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function uI(e,t){return t==="|"?t:e}function sI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
46
+ `):t.addNode("break")}}}));L(Nr.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});L(Nr.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});var Nd=ue("InsertHardbreak",e=>()=>(t,n)=>{const{selection:r,tr:i}=t;if(!(r instanceof ae))return!1;if(r.empty){const u=r.$from.node();if(u.childCount>0&&u.lastChild?.type.name==="hardbreak")return n?.(i.replaceRangeWith(r.to-1,r.to,t.schema.node("paragraph")).setSelection(se.near(i.doc.resolve(r.to))).scrollIntoView()),!0}return n?.(i.setMeta("hardbreak",!0).replaceSelectionWith(Nr.type(e).create()).scrollIntoView()),!0});L(Nd,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});var Dd=Ot("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{const t=e.get(Ce);return()=>t.call(Nd.key)}}});L(Dd.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});L(Dd.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});var _d=Vt("hr");L(_d,{displayName:"Attr<hr>",group:"Hr"});var is=ve("hr",e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(_d.key)(t)],parseMarkdown:{match:({type:t})=>t==="thematicBreak",runner:(t,n,r)=>{t.addNode(r)}},toMarkdown:{match:t=>t.type.name==="hr",runner:t=>{t.addNode("thematicBreak")}}}));L(is.node,{displayName:"NodeSchema<hr>",group:"Hr"});L(is.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});var ZA=xt(e=>new mt(/^(?:---|___\s|\*\*\*\s)$/,(t,n,r,i)=>{const{tr:u}=t;return n[0]&&u.replaceWith(r-1,i,is.type(e).create()),u}));L(ZA,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});var XA=ue("InsertHr",e=>()=>(t,n)=>{if(!n)return!0;const r=an.node.type(e).create(),{tr:i,selection:u}=t,{from:s}=u,a=is.type(e).create();if(!a)return!0;const o=i.replaceSelectionWith(a).insert(s,r),l=se.findFrom(o.doc.resolve(s),1,!0);return l&&n(o.setSelection(l).scrollIntoView()),!0});L(XA,{displayName:"Command<insertHrCommand>",group:"Hr"});var Od=Vt("bulletList");L(Od,{displayName:"Attr<bulletList>",group:"BulletList"});var wi=ve("bullet_list",e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ul",getAttrs:t=>{if(!(t instanceof HTMLElement))throw on(t);return{spread:t.dataset.spread==="true"}}}],toDOM:t=>["ul",{...e.get(Od.key)(t),"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!n,runner:(t,n,r)=>{const i=n.spread??!1;t.openNode(r,{spread:i}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="bullet_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!1,spread:n.attrs.spread}).next(n.content).closeNode()}}}));L(wi.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});L(wi.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});var $A=xt(e=>Vc(/^\s*([-+*])\s$/,wi.type(e)));L($A,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});var Rd=ue("WrapInBulletList",e=>()=>Gc(wi.type(e)));L(Rd,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});var Md=Ot("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{const t=e.get(Ce);return()=>t.call(Rd.key)}}});L(Md.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});L(Md.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});var Bd=Vt("orderedList");L(Bd,{displayName:"Attr<orderedList>",group:"OrderedList"});var Ii=ve("ordered_list",e=>({content:"listItem+",group:"block",attrs:{order:{default:1,validate:"number"},spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ol",getAttrs:t=>{if(!(t instanceof HTMLElement))throw on(t);return{spread:t.dataset.spread==="true",order:t.hasAttribute("start")?Number(t.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(Bd.key)(t),...t.attrs.order===1?{}:{start:t.attrs.order},"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!!n,runner:(t,n,r)=>{const i=n.spread??!0;t.openNode(r,{spread:i,order:n.start??1}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="ordered_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!0,start:n.attrs.order??1,spread:n.attrs.spread}),t.next(n.content),t.closeNode()}}}));L(Ii.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});L(Ii.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});var eg=xt(e=>Vc(/^\s*(\d+)\.\s$/,Ii.type(e),t=>({order:Number(t[1])}),(t,n)=>n.childCount+n.attrs.order===Number(t[1])));L(eg,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});var vd=ue("WrapInOrderedList",e=>()=>Gc(Ii.type(e)));L(vd,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});var Ld=Ot("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{const t=e.get(Ce);return()=>t.call(vd.key)}}});L(Ld.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});L(Ld.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});var Pd=Vt("listItem");L(Pd,{displayName:"Attr<listItem>",group:"ListItem"});var vn=ve("list_item",e=>({group:"listItem",content:"paragraph block*",attrs:{label:{default:"•",validate:"string"},listType:{default:"bullet",validate:"string"},spread:{default:!0,validate:"boolean"}},defining:!0,parseDOM:[{tag:"li",getAttrs:t=>{if(!(t instanceof HTMLElement))throw on(t);return{label:t.dataset.label,listType:t.dataset.listType,spread:t.dataset.spread==="true"}}}],toDOM:t=>["li",{...e.get(Pd.key)(t),"data-label":t.attrs.label,"data-list-type":t.attrs.listType,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t})=>t==="listItem",runner:(t,n,r)=>{const i=n.label!=null?`${n.label}.`:"•",u=n.label!=null?"ordered":"bullet",s=n.spread??!0;t.openNode(r,{label:i,listType:u,spread:s}),t.next(n.children),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="list_item",runner:(t,n)=>{t.openNode("listItem",void 0,{spread:n.attrs.spread}),t.next(n.content),t.closeNode()}}}));L(vn.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});L(vn.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});var Fd=ue("SinkListItem",e=>()=>gw(vn.type(e)));L(Fd,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});var Hd=ue("LiftListItem",e=>()=>pw(vn.type(e)));L(Hd,{displayName:"Command<liftListItemCommand>",group:"ListItem"});var Ud=ue("SplitListItem",e=>()=>hw(vn.type(e)));L(Ud,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function Lw(e){return(t,n,r)=>{const{selection:i}=t;if(!(i instanceof ae))return!1;const{empty:u,$from:s}=i;return!u||s.parentOffset!==0||s.node(-1).type!==vn.type(e)?!1:E1(t,n,r)}}var Wd=ue("LiftFirstListItem",e=>()=>Lw(e));L(Wd,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});var Kd=Ot("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{const t=e.get(Ce);return()=>t.call(Ud.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{const t=e.get(Ce);return()=>t.call(Fd.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{const t=e.get(Ce);return()=>t.call(Hd.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{const t=e.get(Ce);return()=>t.call(Wd.key)}}});L(Kd.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});L(Kd.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});var tg=id("text",()=>({group:"inline",parseMarkdown:{match:({type:e})=>e==="text",runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>e.type.name==="text",runner:(e,t)=>{e.addNode("text",void 0,t.text)}}}));L(tg,{displayName:"NodeSchema<text>",group:"Text"});var zd=Vt("html");L(zd,{displayName:"Attr<html>",group:"Html"});var Qd=ve("html",e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:"",validate:"string"}},toDOM:t=>{const n=document.createElement("span"),r={...e.get(zd.key)(t),"data-value":t.attrs.value,"data-type":"html"};return n.textContent=t.attrs.value,["span",r,t.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:t=>({value:t.dataset.value??""})}],parseMarkdown:{match:({type:t})=>t==="html",runner:(t,n,r)=>{t.addNode(r,{value:n.value})}},toMarkdown:{match:t=>t.type.name==="html",runner:(t,n)=>{t.addNode("html",void 0,n.attrs.value)}}}));L(Qd.node,{displayName:"NodeSchema<html>",group:"Html"});L(Qd.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});var Pw=[zA,md,an,za,bd,Kr,pa,Nr,Td,ns,xd,rs,_d,is,Sd,xi,Od,wi,Bd,Ii,Pd,vn,ud,ki,od,ts,dd,Vn,pd,ii,zd,Qd,tg].flat(),Fw=[GA,$A,eg,VA,ZA,qA].flat(),Hw=[PA,FA,UA,HA],Uw=ue("IsMarkSelected",()=>e=>t=>{if(!e)return!1;const{doc:n,selection:r}=t;return n.rangeHasMark(r.from,r.to,e)}),Ww=ue("IsNoteSelected",()=>e=>t=>e?nk(t,e).hasNode:!1),Kw=ue("ClearTextInCurrentBlock",()=>()=>(e,t)=>{let n=e.tr;const{$from:r,$to:i}=n.selection,{pos:u}=r,{pos:s}=i,a=u-r.node().content.size;return a<0?!1:(n=n.deleteRange(a,s),t?.(n),!0)}),zw=ue("SetBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;const u=t.tr,{from:s,to:a}=u.selection;try{u.setBlockType(s,a,r,i)}catch{return!1}return n?.(u),!0}),Qw=ue("WrapInBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;let u=t.tr;try{const{$from:s,$to:a}=u.selection,o=s.blockRange(a),l=o&&Kc(o,r,i);if(!l)return!1;u=u.wrap(o,l)}catch{return!1}return n?.(u),!0}),Yw=ue("AddBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;const u=t.tr;try{const s=r instanceof In?r:r.createAndFill(i);if(!s)return!1;u.replaceSelectionWith(s)}catch{return!1}return n?.(u),!0}),qw=ue("SelectTextNearPos",()=>e=>(t,n)=>{const{pos:r}=e??{};if(r==null)return!1;const i=(s,a,o)=>Math.min(Math.max(s,a),o),u=t.tr;try{const s=t.doc.resolve(i(r,0,t.doc.content.size));u.setSelection(ae.near(s))}catch{return!1}return n?.(u.scrollIntoView()),!0}),Gw=[Ad,Cd,Wn,Ed,wd,Nd,XA,JA,jA,vd,Rd,Fd,Ud,Hd,Wd,sd,fd,ld,WA,KA,Uw,Ww,Kw,zw,Qw,Yw,qw],Vw=[kd,Id,Dd,yd,Kd,Ld,Md,gd,ad,hd,cd].flat(),Yd=Rt("remarkAddOrderInList",()=>()=>e=>{Ti(e,"list",t=>{if(t.ordered){const n=t.start??1;t.children.forEach((r,i)=>{r.label=i+n})}})});L(Yd.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});L(Yd.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});var qd=Rt("remarkLineBreak",()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;Ti(e,"text",(n,r,i)=>{if(!n.value||typeof n.value!="string")return;const u=[];let s=0;t.lastIndex=0;let a=t.exec(n.value);for(;a;){const o=a.index;s!==o&&u.push({type:"text",value:n.value.slice(s,o)}),u.push({type:"break",data:{isInline:!0}}),s=o+a[0].length,a=t.exec(n.value)}if(u.length>0&&i&&typeof r=="number")return s<n.value.length&&u.push({type:"text",value:n.value.slice(s)}),i.children.splice(r,1,...u),r+u.length})});L(qd.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});L(qd.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});var Gd=Rt("remarkInlineLink",()=>Ew);L(Gd.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});L(Gd.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});var Jw=e=>!!e.children,jw=e=>e.type==="html";function Zw(e,t){return n(e,0,null)[0];function n(r,i,u){if(Jw(r)){const s=[];for(let a=0,o=r.children.length;a<o;a++){const l=r.children[a];if(l){const c=n(l,a,r);if(c)for(let d=0,f=c.length;d<f;d++){const p=c[d];p&&s.push(p)}}}r.children=s}return t(r,i,u)}}var Vd=Rt("remarkHTMLTransformer",e=>()=>t=>{const n=YA(e);Zw(t,(r,i,u)=>jw(r)?(u&&n.has(u.type)&&(r.children=[yw(r)],delete r.value,r.type="paragraph"),[r]):[r])});L(Vd.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});L(Vd.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});var Jd=Rt("remarkMarker",()=>()=>(e,t)=>{const n=r=>t.value.charAt(r.position.start.offset);Ti(e,r=>["strong","emphasis"].includes(r.type),r=>{r.marker=n(r)})});L(Jd.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});L(Jd.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});var ng=Gt(()=>{let e=!1;const t=new _t("MILKDOWN_INLINE_NODES_CURSOR"),n=new pt({key:t,state:{init(){return!1},apply(r){if(!r.selection.empty)return!1;const i=r.selection.$from,u=i.nodeBefore,s=i.nodeAfter;return!!(u&&s&&u.isInline&&!u.isText&&s.isInline&&!s.isText)}},props:{handleDOMEvents:{compositionend:(r,i)=>e?(e=!1,requestAnimationFrame(()=>{if(n.getState(r.state)){const u=r.state.selection.from;i.preventDefault(),r.dispatch(r.state.tr.insertText(i.data||"",u))}}),!0):!1,compositionstart:r=>(n.getState(r.state)&&(e=!0),!1),beforeinput:(r,i)=>{if(n.getState(r.state)&&i instanceof InputEvent&&i.data&&!e){const u=r.state.selection.from;return i.preventDefault(),r.dispatch(r.state.tr.insertText(i.data||"",u)),!0}return!1}},decorations(r){if(n.getState(r)){const i=r.selection.$from.pos,u=document.createElement("span"),s=Ze.widget(i,u,{side:-1}),a=document.createElement("span"),o=Ze.widget(i,a);return setTimeout(()=>{u.contentEditable="true",a.contentEditable="true"}),_e.create(r.doc,[s,o])}return _e.empty}}});return n});L(ng,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});var rg=Gt(e=>new pt({key:new _t("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,r)=>{if(!t.length)return;const[i]=t;if(!i)return;const[u]=i.steps;if(i.getMeta("hardbreak")){if(!(u instanceof Pe))return;const{from:s}=u;return r.tr.setNodeMarkup(s,Nr.type(e),void 0,[])}if(u instanceof xn){let s=r.tr;const{from:a,to:o}=u;return r.doc.nodesBetween(a,o,(l,c)=>{l.type===Nr.type(e)&&(s=s.setNodeMarkup(c,Nr.type(e),void 0,[]))}),s}}}));L(rg,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});var jd=Mn(["table","code_block"],"hardbreakFilterNodes");L(jd,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});var ig=Gt(e=>{const t=e.get(jd.key);return new pt({key:new _t("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,r)=>{const i=n.getMeta("hardbreak"),[u]=n.steps;if(i&&u){const{from:s}=u,a=r.doc.resolve(s);let o=a.depth,l=!0;for(;o>0;)t.includes(a.node(o).type.name)&&(l=!1),o--;return l}return!0}})});L(ig,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});var ug=Gt(e=>{const t=new _t("MILKDOWN_HEADING_ID"),n=r=>{if(r.composing)return;const i=e.get(za.key),u=r.state.tr.setMeta("addToHistory",!1);let s=!1;const a={};r.state.doc.descendants((o,l)=>{if(o.type===Kr.type(e)){if(o.textContent.trim().length===0)return;const c=o.attrs;let d=i(o);a[d]?(a[d]+=1,d+=`-#${a[d]}`):a[d]=1,c.id!==d&&(s=!0,u.setMeta(t,!0).setNodeMarkup(l,void 0,{...c,id:d}))}}),s&&r.dispatch(u)};return new pt({key:t,view:r=>(n(r),{update:(i,u)=>{i.state.doc.eq(u.doc)||n(i)}})})});L(ug,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});var sg=Gt(e=>{const t=(n,r,i)=>{if(!i.selection||n.some(d=>d.getMeta("addToHistory")===!1||!d.isGeneric))return null;const u=Ii.type(e),s=wi.type(e),a=vn.type(e),o=(d,f,p=1)=>{let m=!1;const A=`${f+p}.`;return d.label!==A&&(d.label=A,m=!0),m};let l=i.tr,c=!1;return i.doc.descendants((d,f,p,m)=>{if(d.type===s){const A=d.maybeChild(0);A?.type===a&&A.attrs.listType==="ordered"&&(c=!0,l.setNodeMarkup(f,u,{spread:!0}),d.descendants((E,g,N,w)=>{if(E.type===a){const _={...E.attrs};o(_,w)&&(l=l.setNodeMarkup(g,void 0,_))}return!1}))}else if(d.type===a&&p?.type===u){const A={...d.attrs};let E=!1;A.listType!=="ordered"&&(A.listType="ordered",E=!0),p?.maybeChild(0)&&(E=o(A,m,p?.attrs.order??1)),E&&(l=l.setNodeMarkup(f,void 0,A),c=!0)}}),c?l.setMeta("addToHistory",!1):null};return new pt({key:new _t("MILKDOWN_KEEP_LIST_ORDER"),appendTransaction:t})});L(sg,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});var Xw=[rg,jd,ig,ng,ha,Yd,Gd,qd,Vd,Jd,Ka,ug,sg].flat(),IM=[Pw,Fw,Hw,Gw,Vw,Xw].flat();let uc,sc;if(typeof WeakMap<"u"){let e=new WeakMap;uc=t=>e.get(t),sc=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;uc=r=>{for(let i=0;i<e.length;i+=2)if(e[i]==r)return e[i+1]},sc=(r,i)=>(n==10&&(n=0),e[n++]=r,e[n++]=i)}var Te=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,i=t/this.width|0;let u=r+1,s=i+1;for(let a=1;u<this.width&&this.map[t+a]==n;a++)u++;for(let a=1;s<this.height&&this.map[t+this.width*a]==n;a++)s++;return{left:r,top:i,right:u,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:i,top:u,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?r==0:i==this.width)?null:this.map[u*this.width+(n<0?r-1:i)]:(n<0?u==0:s==this.height)?null:this.map[r+this.width*(n<0?u-1:s)]}rectBetween(e,t){const{left:n,right:r,top:i,bottom:u}=this.findCell(e),{left:s,right:a,top:o,bottom:l}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,o),right:Math.max(r,a),bottom:Math.max(u,l)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){const u=r*this.width+i,s=this.map[u];n[s]||(n[s]=!0,!(i==e.left&&i&&this.map[u-1]==s||r==e.top&&r&&this.map[u-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){const u=i+n.child(r).nodeSize;if(r==e){let s=t+e*this.width;const a=(e+1)*this.width;for(;s<a&&this.map[s]<i;)s++;return s==a?u-1:this.map[s]}i=u}}static get(e){return uc(e)||sc(e,$w(e))}};function $w(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=e6(e),n=e.childCount,r=[];let i=0,u=null;const s=[];for(let l=0,c=t*n;l<c;l++)r[l]=0;for(let l=0,c=0;l<n;l++){const d=e.child(l);c++;for(let m=0;;m++){for(;i<r.length&&r[i]!=0;)i++;if(m==d.childCount)break;const A=d.child(m),{colspan:E,rowspan:g,colwidth:N}=A.attrs;for(let w=0;w<g;w++){if(w+l>=n){(u||(u=[])).push({type:"overlong_rowspan",pos:c,n:g-w});break}const _=i+w*t;for(let S=0;S<E;S++){r[_+S]==0?r[_+S]=c:(u||(u=[])).push({type:"collision",row:l,pos:c,n:E-S});const x=N&&N[S];if(x){const O=(_+S)%t*2,z=s[O];z==null||z!=x&&s[O+1]==1?(s[O]=x,s[O+1]=1):z==x&&s[O+1]++}}}i+=E,c+=A.nodeSize}const f=(l+1)*t;let p=0;for(;i<f;)r[i++]==0&&p++;p&&(u||(u=[])).push({type:"missing",row:l,n:p}),c++}(t===0||n===0)&&(u||(u=[])).push({type:"zero_sized"});const a=new Te(t,n,r,u);let o=!1;for(let l=0;!o&&l<s.length;l+=2)s[l]!=null&&s[l+1]<n&&(o=!0);return o&&t6(a,s,e),a}function e6(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const i=e.child(r);let u=0;if(n)for(let s=0;s<r;s++){const a=e.child(s);for(let o=0;o<a.childCount;o++){const l=a.child(o);s+l.attrs.rowspan>r&&(u+=l.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const a=i.child(s);u+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}t==-1?t=u:t!=u&&(t=Math.max(t,u))}return t}function t6(e,t,n){e.problems||(e.problems=[]);const r={};for(let i=0;i<e.map.length;i++){const u=e.map[i];if(r[u])continue;r[u]=!0;const s=n.nodeAt(u);if(!s)throw new RangeError(`No cell with offset ${u} found`);let a=null;const o=s.attrs;for(let l=0;l<o.colspan;l++){const c=t[(i+l)%e.width*2];c!=null&&(!o.colwidth||o.colwidth[l]!=c)&&((a||(a=n6(o)))[l]=c)}a&&e.problems.unshift({type:"colwidth mismatch",pos:u,colwidth:a})}}function n6(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function E0(e,t){if(typeof e=="string")return{};const n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(s=>Number(s)):null,i=Number(e.getAttribute("colspan")||1),u={colspan:i,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(const s in t){const a=t[s].getFromDOM,o=a&&a(e);o!=null&&(u[s]=o)}return u}function y0(e,t){const n={};e.attrs.colspan!=1&&(n.colspan=e.attrs.colspan),e.attrs.rowspan!=1&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const r in t){const i=t[r].setDOMAttr;i&&i(e.attrs[r],n)}return n}function r6(e){if(e!==null){if(!Array.isArray(e))throw new TypeError("colwidth must be null or an array");for(const t of e)if(typeof t!="number")throw new TypeError("colwidth must be null or an array of numbers")}}function i6(e){const t=e.cellAttributes||{},n={colspan:{default:1,validate:"number"},rowspan:{default:1,validate:"number"},colwidth:{default:null,validate:r6}};for(const r in t)n[r]={default:t[r].default,validate:t[r].validate};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:r=>E0(r,t)}],toDOM(r){return["td",y0(r,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:r=>E0(r,t)}],toDOM(r){return["th",y0(r,t),0]}}}}function Ut(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}const Qn=new _t("selectingCells");function gi(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Wt(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Qa(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=gi(t.$head)||u6(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function u6(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ac(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function s6(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Zd(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function ag(e,t,n){const r=e.node(-1),i=Te.get(r),u=e.start(-1),s=i.nextCell(e.pos-u,t,n);return s==null?null:e.node(0).resolve(u+s)}function Hr(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function a6(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(t,0,0)}return r}function o6(e,t,n){const r=Ut(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var Ne=class bn extends se{constructor(t,n=t){const r=t.node(-1),i=Te.get(r),u=t.start(-1),s=i.rectBetween(t.pos-u,n.pos-u),a=t.node(0),o=i.cellsInRect(s).filter(c=>c!=n.pos-u);o.unshift(n.pos-u);const l=o.map(c=>{const d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);const f=u+c+1;return new m1(a.resolve(f),a.resolve(f+d.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=t,this.$headCell=n}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(ac(r)&&ac(i)&&Zd(r,i)){const u=this.$anchorCell.node(-1)!=r.node(-1);return u&&this.isRowSelection()?bn.rowSelection(r,i):u&&this.isColSelection()?bn.colSelection(r,i):new bn(r,i)}return ae.between(r,i)}content(){const t=this.$anchorCell.node(-1),n=Te.get(t),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),u={},s=[];for(let o=i.top;o<i.bottom;o++){const l=[];for(let c=o*n.width+i.left,d=i.left;d<i.right;d++,c++){const f=n.map[c];if(u[f])continue;u[f]=!0;const p=n.findCell(f);let m=t.nodeAt(f);if(!m)throw new RangeError(`No cell with offset ${f} found`);const A=i.left-p.left,E=p.right-i.right;if(A>0||E>0){let g=m.attrs;if(A>0&&(g=Hr(g,0,A)),E>0&&(g=Hr(g,g.colspan-E,E)),p.left<i.left){if(m=m.type.createAndFill(g),!m)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(g)}`)}else m=m.type.create(g,m.content)}if(p.top<i.top||p.bottom>i.bottom){const g={...m.attrs,rowspan:Math.min(p.bottom,i.bottom)-Math.max(p.top,i.top)};p.top<i.top?m=m.type.createAndFill(g):m=m.type.create(g,m.content)}l.push(m)}s.push(t.child(o).copy(H.from(l)))}const a=this.isColSelection()&&this.isRowSelection()?t:s;return new Y(H.from(a),1,1)}replace(t,n=Y.empty){const r=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:a,$to:o}=i[s],l=t.mapping.slice(r);t.replace(l.map(a.pos),l.map(o.pos),s?Y.empty:n)}const u=se.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);u&&t.setSelection(u)}replaceWith(t,n){this.replace(t,new Y(H.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),r=Te.get(n),i=this.$anchorCell.start(-1),u=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<u.length;s++)t(n.nodeAt(u[s]),i+u[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const r=t+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const r=t.node(-1),i=Te.get(r),u=t.start(-1),s=i.findCell(t.pos-u),a=i.findCell(n.pos-u),o=t.node(0);return s.top<=a.top?(s.top>0&&(t=o.resolve(u+i.map[s.left])),a.bottom<i.height&&(n=o.resolve(u+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=o.resolve(u+i.map[a.left])),s.bottom<i.height&&(t=o.resolve(u+i.map[i.width*(i.height-1)+s.right-1]))),new bn(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=Te.get(t),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),u=n.colCount(this.$headCell.pos-r);if(Math.min(i,u)>0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,a=u+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(t){return t instanceof bn&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),i=Te.get(r),u=t.start(-1),s=i.findCell(t.pos-u),a=i.findCell(n.pos-u),o=t.node(0);return s.left<=a.left?(s.left>0&&(t=o.resolve(u+i.map[s.top*i.width])),a.right<i.width&&(n=o.resolve(u+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=o.resolve(u+i.map[a.top*i.width])),s.right<i.width&&(t=o.resolve(u+i.map[i.width*(s.top+1)-1]))),new bn(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new bn(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new bn(t.resolve(n),t.resolve(r))}getBookmark(){return new l6(this.$anchorCell.pos,this.$headCell.pos)}};Ne.prototype.visible=!1;se.jsonID("cell",Ne);var l6=class og{constructor(t,n){this.anchor=t,this.head=n}map(t){return new og(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),r=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Zd(n,r)?new Ne(n,r):se.near(r,1)}};function c6(e){if(!(e.selection instanceof Ne))return null;const t=[];return e.selection.forEachCell((n,r)=>{t.push(Ze.node(r,r+n.nodeSize,{class:"selectedCell"}))}),_e.create(e.doc,t)}function d6({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let u=t.depth;u>=0&&!(t.before(u+1)>t.start(u));u--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function f6({$from:e,$to:t}){let n,r;for(let i=e.depth;i>0;i--){const u=e.node(i);if(u.type.spec.tableRole==="cell"||u.type.spec.tableRole==="header_cell"){n=u;break}}for(let i=t.depth;i>0;i--){const u=t.node(i);if(u.type.spec.tableRole==="cell"||u.type.spec.tableRole==="header_cell"){r=u;break}}return n!==r&&t.parentOffset===0}function h6(e,t,n){const r=(t||e).selection,i=(t||e).doc;let u,s;if(r instanceof ie&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")u=Ne.create(i,r.from);else if(s=="row"){const a=i.resolve(r.from+1);u=Ne.rowSelection(a,a)}else if(!n){const a=Te.get(r.node),o=r.from+1,l=o+a.map[a.width*a.height-1];u=Ne.create(i,o+1,l)}}else r instanceof ae&&d6(r)?u=ae.create(i,r.from):r instanceof ae&&f6(r)&&(u=ae.create(i,r.$from.start(),r.$from.end()));return u&&(t||(t=e.tr)).setSelection(u),t}const p6=new _t("fix-tables");function lg(e,t,n,r){const i=e.childCount,u=t.childCount;e:for(let s=0,a=0;s<u;s++){const o=t.child(s);for(let l=a,c=Math.min(i,s+3);l<c;l++)if(e.child(l)==o){a=l+1,n+=o.nodeSize;continue e}r(o,n),a<i&&e.child(a).sameMarkup(o)?lg(e.child(a),o,n+1,r):o.nodesBetween(0,o.content.size,r,n+1),n+=o.nodeSize}}function m6(e,t){let n;const r=(i,u)=>{i.type.spec.tableRole=="table"&&(n=A6(e,i,u,n))};return t?t.doc!=e.doc&&lg(t.doc,e.doc,0,r):e.doc.descendants(r),n}function A6(e,t,n,r){const i=Te.get(t);if(!i.problems)return r;r||(r=e.tr);const u=[];for(let o=0;o<i.height;o++)u.push(0);for(let o=0;o<i.problems.length;o++){const l=i.problems[o];if(l.type=="collision"){const c=t.nodeAt(l.pos);if(!c)continue;const d=c.attrs;for(let f=0;f<d.rowspan;f++)u[l.row+f]+=l.n;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,Hr(d,d.colspan-l.n,l.n))}else if(l.type=="missing")u[l.row]+=l.n;else if(l.type=="overlong_rowspan"){const c=t.nodeAt(l.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-l.n})}else if(l.type=="colwidth mismatch"){const c=t.nodeAt(l.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,{...c.attrs,colwidth:l.colwidth})}else if(l.type=="zero_sized"){const c=r.mapping.map(n);r.delete(c,c+t.nodeSize)}}let s,a;for(let o=0;o<u.length;o++)u[o]&&(s==null&&(s=o),a=o);for(let o=0,l=n+1;o<i.height;o++){const c=t.child(o),d=l+c.nodeSize,f=u[o];if(f>0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);const m=[];for(let E=0;E<f;E++){const g=Ut(e.schema)[p].createAndFill();g&&m.push(g)}const A=(o==0||s==o-1)&&a==o?l+1:d-1;r.insert(r.mapping.map(A),m)}l=d}return r.setMeta(p6,{fixTables:!0})}function cg(e){const t=Te.get(e),n=[],r=t.height,i=t.width;for(let u=0;u<r;u++){const s=[];for(let a=0;a<i;a++){const o=u*i+a,l=t.map[o];if(u>0){const c=o-i;if(l===t.map[c]){s.push(null);continue}}if(a>0){const c=o-1;if(l===t.map[c]){s.push(null);continue}}s.push(e.nodeAt(l))}n.push(s)}return n}function dg(e,t){const n=[],r=Te.get(e),i=r.height,u=r.width;for(let s=0;s<i;s++){const a=e.child(s),o=[];for(let c=0;c<u;c++){const d=t[s][c];if(!d)continue;const f=r.map[s*r.width+c],p=e.nodeAt(f);if(!p)continue;const m=p.type.createChecked(d.attrs,d.content,d.marks);o.push(m)}const l=a.type.createChecked(a.attrs,o,a.marks);n.push(l)}return e.type.createChecked(e.attrs,n,e.marks)}function fg(e,t,n,r){const i=t[0]>n[0]?-1:1,u=e.splice(t[0],t.length),s=u.length%2===0?1:0;let a;return a=i===-1?n[0]:n[n.length-1]-s,e.splice(a,0,...u),e}function us(e){return g6(t=>t.type.spec.tableRole==="table",e)}function g6(e,t){for(let n=t.depth;n>=0;n-=1){const r=t.node(n);if(e(r))return{node:r,pos:n===0?0:t.before(n),start:t.start(n),depth:n}}return null}function Zr(e,t){const n=us(t.$from);if(!n)return;const r=Te.get(n.node);if(!(e<0||e>r.width-1))return r.cellsInRect({left:e,right:e+1,top:0,bottom:r.height}).map(i=>{const u=n.node.nodeAt(i),s=i+n.start;return{pos:s,start:s+1,node:u,depth:n.depth+2}})}function Xr(e,t){const n=us(t.$from);if(!n)return;const r=Te.get(n.node);if(!(e<0||e>r.height-1))return r.cellsInRect({left:0,right:r.width,top:e,bottom:e+1}).map(i=>{const u=n.node.nodeAt(i),s=i+n.start;return{pos:s,start:s+1,node:u,depth:n.depth+2}})}function T0(e,t,n=t){let r=t,i=n;for(let c=t;c>=0;c--){const d=Zr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;p>=r&&(r=c),p>i&&(i=p)})}for(let c=t;c<=i;c++){const d=Zr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;f.node.attrs.colspan>1&&p>i&&(i=p)})}const u=[];for(let c=r;c<=i;c++){const d=Zr(c,e.selection);d&&d.length>0&&u.push(c)}r=u[0],i=u[u.length-1];const s=Zr(r,e.selection),a=Xr(0,e.selection);if(!s||!a)return;const o=e.doc.resolve(s[s.length-1].pos);let l;for(let c=i;c>=r;c--){const d=Zr(c,e.selection);if(d&&d.length>0){for(let f=a.length-1;f>=0;f--)if(a[f].pos===d[0].pos){l=d[0];break}if(l)break}}if(l)return{$anchor:o,$head:e.doc.resolve(l.pos),indexes:u}}function C0(e,t,n=t){let r=t,i=n;for(let c=t;c>=0;c--){const d=Xr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.rowspan+c-1;p>=r&&(r=c),p>i&&(i=p)})}for(let c=t;c<=i;c++){const d=Xr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.rowspan+c-1;f.node.attrs.rowspan>1&&p>i&&(i=p)})}const u=[];for(let c=r;c<=i;c++){const d=Xr(c,e.selection);d&&d.length>0&&u.push(c)}r=u[0],i=u[u.length-1];const s=Xr(r,e.selection),a=Zr(0,e.selection);if(!s||!a)return;const o=e.doc.resolve(s[s.length-1].pos);let l;for(let c=i;c>=r;c--){const d=Xr(c,e.selection);if(d&&d.length>0){for(let f=a.length-1;f>=0;f--)if(a[f].pos===d[0].pos){l=d[0];break}if(l)break}}if(l)return{$anchor:o,$head:e.doc.resolve(l.pos),indexes:u}}function k0(e){return e[0].map((t,n)=>e.map(r=>r[n]))}function b6(e){var t,n;const{tr:r,originIndex:i,targetIndex:u,select:s,pos:a}=e,o=us(r.doc.resolve(a));if(!o)return!1;const l=(t=T0(r,i))===null||t===void 0?void 0:t.indexes,c=(n=T0(r,u))===null||n===void 0?void 0:n.indexes;if(!l||!c||l.includes(u))return!1;const d=E6(o.node,l,c);if(r.replaceWith(o.pos,o.pos+o.node.nodeSize,d),!s)return!0;const f=Te.get(d),p=o.start,m=u,A=f.positionAt(f.height-1,m,d),E=r.doc.resolve(p+A),g=f.positionAt(0,m,d),N=r.doc.resolve(p+g);return r.setSelection(Ne.colSelection(E,N)),!0}function E6(e,t,n,r){let i=k0(cg(e));return i=fg(i,t,n),i=k0(i),dg(e,i)}function y6(e){var t,n;const{tr:r,originIndex:i,targetIndex:u,select:s,pos:a}=e,o=us(r.doc.resolve(a));if(!o)return!1;const l=(t=C0(r,i))===null||t===void 0?void 0:t.indexes,c=(n=C0(r,u))===null||n===void 0?void 0:n.indexes;if(!l||!c||l.includes(u))return!1;const d=T6(o.node,l,c);if(r.replaceWith(o.pos,o.pos+o.node.nodeSize,d),!s)return!0;const f=Te.get(d),p=o.start,m=u,A=f.positionAt(m,f.width-1,d),E=r.doc.resolve(p+A),g=f.positionAt(m,0,d),N=r.doc.resolve(p+g);return r.setSelection(Ne.rowSelection(E,N)),!0}function T6(e,t,n,r){let i=cg(e);return i=fg(i,t,n),dg(e,i)}function cr(e){const t=e.selection,n=Qa(e),r=n.node(-1),i=n.start(-1),u=Te.get(r);return{...t instanceof Ne?u.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):u.findCell(n.pos-i),tableStart:i,map:u,table:r}}function hg(e,{map:t,tableStart:n,table:r},i){let u=i>0?-1:0;o6(t,r,i+u)&&(u=i==0||i==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){const o=t.map[a],l=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,a6(l.attrs,i-t.colCount(o))),s+=l.attrs.rowspan-1}else{const o=u==null?Ut(r.type.schema).cell:r.nodeAt(t.map[a+u]).type,l=t.positionAt(s,i,r);e.insert(e.mapping.map(n+l),o.createAndFill())}}return e}function C6(e,t){if(!Wt(e))return!1;if(t){const n=cr(e);t(hg(e.tr,n,n.left))}return!0}function k6(e,t){if(!Wt(e))return!1;if(t){const n=cr(e);t(hg(e.tr,n,n.right))}return!0}function x6(e,{map:t,table:n,tableStart:r},i){const u=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+i,o=t.map[a],l=n.nodeAt(o),c=l.attrs;if(i>0&&t.map[a-1]==o||i<t.width-1&&t.map[a+1]==o)e.setNodeMarkup(e.mapping.slice(u).map(r+o),null,Hr(c,i-t.colCount(o)));else{const d=e.mapping.slice(u).map(r+o);e.delete(d,d+l.nodeSize)}s+=c.rowspan}}function w6(e,t){if(!Wt(e))return!1;if(t){const n=cr(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;x6(r,n,i),i!=n.left;i--){const u=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!u)throw new RangeError("No table found");n.table=u,n.map=Te.get(u)}t(r)}return!0}function I6(e,{map:t,table:n,tableStart:r},i){let u=0;for(let l=0;l<i;l++)u+=n.child(l).nodeSize;const s=u+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(u+r,s+r);const o=new Set;for(let l=0,c=i*t.width;l<t.width;l++,c++){const d=t.map[c];if(!o.has(d)){if(o.add(d),i>0&&d==t.map[c-t.width]){const f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f,rowspan:f.rowspan-1}),l+=f.colspan-1}else if(i<t.height&&d==t.map[c+t.width]){const f=n.nodeAt(d),p=f.attrs,m=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),A=t.positionAt(i+1,l,n);e.insert(e.mapping.slice(a).map(r+A),m),l+=p.colspan-1}}}}function S6(e,t){if(!Wt(e))return!1;if(t){const n=cr(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;I6(r,n,i),i!=n.top;i--){const u=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!u)throw new RangeError("No table found");n.table=u,n.map=Te.get(n.table)}t(r)}return!0}function N6(e,t){return function(n,r){if(!Wt(n))return!1;const i=Qa(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){const u=n.tr;n.selection instanceof Ne?n.selection.forEachCell((s,a)=>{s.attrs[e]!==t&&u.setNodeMarkup(a,null,{...s.attrs,[e]:t})}):u.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(u)}return!0}}function D6(e){return function(t,n){if(!Wt(t))return!1;if(n){const r=Ut(t.schema),i=cr(t),u=t.tr,s=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(o=>i.table.nodeAt(o));for(let o=0;o<s.length;o++)a[o].type==r.header_cell&&u.setNodeMarkup(i.tableStart+s[o],r.cell,a[o].attrs);if(u.steps.length===0)for(let o=0;o<s.length;o++)u.setNodeMarkup(i.tableStart+s[o],r.header_cell,a[o].attrs);n(u)}return!0}}function x0(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let i=0;i<r.length;i++){const u=t.table.nodeAt(r[i]);if(u&&u.type!==n.header_cell)return!1}return!0}function Xd(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?D6(e):function(n,r){if(!Wt(n))return!1;if(r){const i=Ut(n.schema),u=cr(n),s=n.tr,a=x0("row",u,i),o=x0("column",u,i),l=(e==="column"?a:e==="row"&&o)?1:0,c=e=="column"?{left:0,top:l,right:1,bottom:u.map.height}:e=="row"?{left:l,top:0,right:u.map.width,bottom:1}:u,d=e=="column"?o?i.cell:i.header_cell:e=="row"?a?i.cell:i.header_cell:i.cell;u.map.cellsInRect(c).forEach(f=>{const p=f+u.tableStart,m=s.doc.nodeAt(p);m&&s.setNodeMarkup(p,d,m.attrs)}),r(s)}return!0}}Xd("row",{useDeprecatedLogic:!0});Xd("column",{useDeprecatedLogic:!0});Xd("cell",{useDeprecatedLogic:!0});function _6(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,i=e.before();r>=0;r--){const u=e.node(-1).child(r),s=u.lastChild;if(s)return i-1-s.nodeSize;i-=u.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let r=e.indexAfter(-1),i=e.after();r<n.childCount;r++){const u=n.child(r);if(u.childCount)return i+1;i+=u.nodeSize}}return null}function pg(e){return function(t,n){if(!Wt(t))return!1;const r=_6(Qa(t),e);if(r==null)return!1;if(n){const i=t.doc.resolve(r);n(t.tr.setSelection(ae.between(i,s6(i))).scrollIntoView())}return!0}}function O6(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function xs(e,t){const n=e.selection;if(!(n instanceof Ne))return!1;if(t){const r=e.tr,i=Ut(e.schema).cell.createAndFill().content;n.forEachCell((u,s)=>{u.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+u.nodeSize-1),new Y(i,0,0))}),r.docChanged&&t(r)}return!0}function R6(e){return(t,n)=>{const{from:r,to:i,select:u=!0,pos:s=t.selection.from}=e,a=t.tr;return y6({tr:a,originIndex:r,targetIndex:i,select:u,pos:s})?(n?.(a),!0):!1}}function M6(e){return(t,n)=>{const{from:r,to:i,select:u=!0,pos:s=t.selection.from}=e,a=t.tr;return b6({tr:a,originIndex:r,targetIndex:i,select:u,pos:s})?(n?.(a),!0):!1}}function B6(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const i=t.child(0),u=i.type.spec.tableRole,s=i.type.schema,a=[];if(u=="row")for(let o=0;o<t.childCount;o++){let l=t.child(o).content;const c=o?0:Math.max(0,n-1),d=o<t.childCount-1?0:Math.max(0,r-1);(c||d)&&(l=oc(Ut(s).row,new Y(l,c,d)).content),a.push(l)}else if(u=="cell"||u=="header_cell")a.push(n||r?oc(Ut(s).row,new Y(t,n,r)).content:t);else return null;return v6(s,a)}function v6(e,t){const n=[];for(let i=0;i<t.length;i++){const u=t[i];for(let s=u.childCount-1;s>=0;s--){const{rowspan:a,colspan:o}=u.child(s).attrs;for(let l=i;l<i+a;l++)n[l]=(n[l]||0)+o}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(H.empty),n[i]<r){const u=Ut(e).cell.createAndFill(),s=[];for(let a=n[i];a<r;a++)s.push(u);t[i]=t[i].append(H.from(s))}return{height:t.length,width:r,rows:t}}function oc(e,t){const n=e.createAndFill();return new p1(n).replace(0,n.content.size,t).doc}function L6({width:e,height:t,rows:n},r,i){if(e!=r){const u=[],s=[];for(let a=0;a<n.length;a++){const o=n[a],l=[];for(let c=u[a]||0,d=0;c<r;d++){let f=o.child(d%o.childCount);c+f.attrs.colspan>r&&(f=f.type.createChecked(Hr(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),l.push(f),c+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)u[a+p]=(u[a+p]||0)+f.attrs.colspan}s.push(H.from(l))}n=s,e=r}if(t!=i){const u=[];for(let s=0,a=0;s<i;s++,a++){const o=[],l=n[a%t];for(let c=0;c<l.childCount;c++){let d=l.child(c);s+d.attrs.rowspan>i&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),o.push(d)}u.push(H.from(o))}n=u,t=i}return{width:e,height:t,rows:n}}function P6(e,t,n,r,i,u,s){const a=e.doc.type.schema,o=Ut(a);let l,c;if(i>t.width)for(let d=0,f=0;d<t.height;d++){const p=n.child(d);f+=p.nodeSize;const m=[];let A;p.lastChild==null||p.lastChild.type==o.cell?A=l||(l=o.cell.createAndFill()):A=c||(c=o.header_cell.createAndFill());for(let E=t.width;E<i;E++)m.push(A);e.insert(e.mapping.slice(s).map(f-1+r),m)}if(u>t.height){const d=[];for(let m=0,A=(t.height-1)*t.width;m<Math.max(t.width,i);m++){const E=m>=t.width?!1:n.nodeAt(t.map[A+m]).type==o.header_cell;d.push(E?c||(c=o.header_cell.createAndFill()):l||(l=o.cell.createAndFill()))}const f=o.row.create(null,H.from(d)),p=[];for(let m=t.height;m<u;m++)p.push(f);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),p)}return!!(l||c)}function w0(e,t,n,r,i,u,s,a){if(s==0||s==t.height)return!1;let o=!1;for(let l=i;l<u;l++){const c=s*t.width+l,d=t.map[c];if(t.map[c-t.width]==d){o=!0;const f=n.nodeAt(d),{top:p,left:m}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(a).map(t.positionAt(s,m,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),l+=f.attrs.colspan-1}}return o}function I0(e,t,n,r,i,u,s,a){if(s==0||s==t.width)return!1;let o=!1;for(let l=i;l<u;l++){const c=l*t.width+s,d=t.map[c];if(t.map[c-1]==d){o=!0;const f=n.nodeAt(d),p=t.colCount(d),m=e.mapping.slice(a).map(d+r);e.setNodeMarkup(m,null,Hr(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(m+f.nodeSize,f.type.createAndFill(Hr(f.attrs,0,s-p))),l+=f.attrs.rowspan-1}}return o}function S0(e,t,n,r,i){let u=n?e.doc.nodeAt(n-1):e.doc;if(!u)throw new Error("No table found");let s=Te.get(u);const{top:a,left:o}=r,l=o+i.width,c=a+i.height,d=e.tr;let f=0;function p(){if(u=n?d.doc.nodeAt(n-1):d.doc,!u)throw new Error("No table found");s=Te.get(u),f=d.mapping.maps.length}P6(d,s,u,n,l,c,f)&&p(),w0(d,s,u,n,o,l,a,f)&&p(),w0(d,s,u,n,o,l,c,f)&&p(),I0(d,s,u,n,a,c,o,f)&&p(),I0(d,s,u,n,a,c,l,f)&&p();for(let m=a;m<c;m++){const A=s.positionAt(m,o,u),E=s.positionAt(m,l,u);d.replace(d.mapping.slice(f).map(A+n),d.mapping.slice(f).map(E+n),new Y(i.rows[m-a],0,0))}p(),d.setSelection(new Ne(d.doc.resolve(n+s.positionAt(a,o,u)),d.doc.resolve(n+s.positionAt(c-1,l-1,u)))),t(d)}const F6=L1({ArrowLeft:ws("horiz",-1),ArrowRight:ws("horiz",1),ArrowUp:ws("vert",-1),ArrowDown:ws("vert",1),"Shift-ArrowLeft":Is("horiz",-1),"Shift-ArrowRight":Is("horiz",1),"Shift-ArrowUp":Is("vert",-1),"Shift-ArrowDown":Is("vert",1),Backspace:xs,"Mod-Backspace":xs,Delete:xs,"Mod-Delete":xs});function qs(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ws(e,t){return(n,r,i)=>{if(!i)return!1;const u=n.selection;if(u instanceof Ne)return qs(n,r,se.near(u.$headCell,t));if(e!="horiz"&&!u.empty)return!1;const s=mg(i,e,t);if(s==null)return!1;if(e=="horiz")return qs(n,r,se.near(n.doc.resolve(u.head+t),t));{const a=n.doc.resolve(s),o=ag(a,e,t);let l;return o?l=se.near(o,1):t<0?l=se.near(n.doc.resolve(a.before(-1)),-1):l=se.near(n.doc.resolve(a.after(-1)),1),qs(n,r,l)}}}function Is(e,t){return(n,r,i)=>{if(!i)return!1;const u=n.selection;let s;if(u instanceof Ne)s=u;else{const o=mg(i,e,t);if(o==null)return!1;s=new Ne(n.doc.resolve(o))}const a=ag(s.$headCell,e,t);return a?qs(n,r,new Ne(s.$anchorCell,a)):!1}}function H6(e,t){const n=e.state.doc,r=gi(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new Ne(r))),!0):!1}function U6(e,t,n){if(!Wt(e.state))return!1;let r=B6(n);const i=e.state.selection;if(i instanceof Ne){r||(r={width:1,height:1,rows:[H.from(oc(Ut(e.state.schema).cell,n))]});const u=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=Te.get(u).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=L6(r,a.right-a.left,a.bottom-a.top),S0(e.state,e.dispatch,s,a,r),!0}else if(r){const u=Qa(e.state),s=u.start(-1);return S0(e.state,e.dispatch,s,Te.get(u.node(-1)).findCell(u.pos-s),r),!0}else return!1}function W6(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const r=N0(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof Ne)u(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=gi(e.state.selection.$anchor))!=null&&((n=qo(e,t))===null||n===void 0?void 0:n.pos)!=i.pos)u(i,t),t.preventDefault();else if(!r)return;function u(o,l){let c=qo(e,l);const d=Qn.getState(e.state)==null;if(!c||!Zd(o,c))if(d)c=o;else return;const f=new Ne(o,c);if(d||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);d&&p.setMeta(Qn,o.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Qn.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Qn,-1))}function a(o){const l=o,c=Qn.getState(e.state);let d;if(c!=null)d=e.state.doc.resolve(c);else if(N0(e,l.target)!=r&&(d=qo(e,t),!d))return s();d&&u(d,l)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function mg(e,t,n){if(!(e.state.selection instanceof ae))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const u=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:u.childCount))return null;if(u.type.spec.tableRole=="cell"||u.type.spec.tableRole=="header_cell"){const s=r.before(i),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?s:null}}return null}function N0(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function qo(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&gi(e.state.doc.resolve(r))||gi(e.state.doc.resolve(i))}var K6=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),lc(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,lc(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function lc(e,t,n,r,i,u){let s=0,a=!0,o=t.firstChild;const l=e.firstChild;if(l){for(let d=0,f=0;d<l.childCount;d++){const{colspan:p,colwidth:m}=l.child(d).attrs;for(let A=0;A<p;A++,f++){const E=i==f?u:m&&m[A],g=E?E+"px":"";if(s+=E||r,E||(a=!1),o)o.style.width!=g&&(o.style.width=g),o=o.nextSibling;else{const N=document.createElement("col");N.style.width=g,t.appendChild(N)}}}for(;o;){var c;const d=o.nextSibling;(c=o.parentNode)===null||c===void 0||c.removeChild(o),o=d}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const Nt=new _t("tableColumnResizing");function z6({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=K6,lastColumnResizable:i=!0}={}){const u=new pt({key:Nt,state:{init(s,a){var o;const l=(o=u.spec)===null||o===void 0||(o=o.props)===null||o===void 0?void 0:o.nodeViews,c=Ut(a.schema).table.name;return r&&l&&(l[c]=(d,f)=>new r(d,n,f)),new Q6(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Nt.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{Y6(s,a,e,i)},mouseleave:s=>{q6(s)},mousedown:(s,a)=>{G6(s,a,t,n)}},decorations:s=>{const a=Nt.getState(s);if(a&&a.activeHandle>-1)return X6(s,a.activeHandle)},nodeViews:{}}});return u}var Q6=class Gs{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,r=t.getMeta(Nt);if(r&&r.setHandle!=null)return new Gs(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Gs(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let i=t.mapping.map(n.activeHandle,-1);return ac(t.doc.resolve(i))||(i=-1),new Gs(i,n.dragging)}return n}};function Y6(e,t,n,r){if(!e.editable)return;const i=Nt.getState(e.state);if(i&&!i.dragging){const u=J6(t.target);let s=-1;if(u){const{left:a,right:o}=u.getBoundingClientRect();t.clientX-a<=n?s=D0(e,t,"left",n):o-t.clientX<=n&&(s=D0(e,t,"right",n))}if(s!=i.activeHandle){if(!r&&s!==-1){const a=e.state.doc.resolve(s),o=a.node(-1),l=Te.get(o),c=a.start(-1);if(l.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==l.width-1)return}Ag(e,s)}}}function q6(e){if(!e.editable)return;const t=Nt.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&Ag(e,-1)}function G6(e,t,n,r){var i;if(!e.editable)return!1;const u=(i=e.dom.ownerDocument.defaultView)!==null&&i!==void 0?i:window,s=Nt.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=e.state.doc.nodeAt(s.activeHandle),o=V6(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(Nt,{setDragging:{startX:t.clientX,startWidth:o}}));function l(d){u.removeEventListener("mouseup",l),u.removeEventListener("mousemove",c);const f=Nt.getState(e.state);f?.dragging&&(j6(e,f.activeHandle,_0(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(Nt,{setDragging:null})))}function c(d){if(!d.which)return l(d);const f=Nt.getState(e.state);if(f&&f.dragging){const p=_0(f.dragging,d,n);O0(e,f.activeHandle,p,r)}}return O0(e,s.activeHandle,o,r),u.addEventListener("mouseup",l),u.addEventListener("mousemove",c),t.preventDefault(),!0}function V6(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const u=e.domAtPos(t);let s=u.node.childNodes[u.offset].offsetWidth,a=n;if(r)for(let o=0;o<n;o++)r[o]&&(s-=r[o],a--);return s/a}function J6(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function D0(e,t,n,r){const i=n=="right"?-r:r,u=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!u)return-1;const{pos:s}=u,a=gi(e.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const o=Te.get(a.node(-1)),l=a.start(-1),c=o.map.indexOf(a.pos-l);return c%o.width==0?-1:l+o.map[c-1]}function _0(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Ag(e,t){e.dispatch(e.state.tr.setMeta(Nt,{setHandle:t}))}function j6(e,t,n){const r=e.state.doc.resolve(t),i=r.node(-1),u=Te.get(i),s=r.start(-1),a=u.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,o=e.state.tr;for(let l=0;l<u.height;l++){const c=l*u.width+a;if(l&&u.map[c]==u.map[c-u.width])continue;const d=u.map[c],f=i.nodeAt(d).attrs,p=f.colspan==1?0:a-u.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;const m=f.colwidth?f.colwidth.slice():Z6(f.colspan);m[p]=n,o.setNodeMarkup(s+d,null,{...f,colwidth:m})}o.docChanged&&e.dispatch(o)}function O0(e,t,n,r){const i=e.state.doc.resolve(t),u=i.node(-1),s=i.start(-1),a=Te.get(u).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let o=e.domAtPos(i.start(-1)).node;for(;o&&o.nodeName!="TABLE";)o=o.parentNode;o&&lc(u,o.firstChild,o,r,a,n)}function Z6(e){return Array(e).fill(0)}function X6(e,t){const n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return _e.empty;const u=Te.get(i),s=r.start(-1),a=u.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let l=0;l<u.height;l++){const c=a+l*u.width;if((a==u.width-1||u.map[c]!=u.map[c+1])&&(l==0||u.map[c]!=u.map[c-u.width])){var o;const d=u.map[c],f=s+d+i.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((o=Nt.getState(e))===null||o===void 0)&&o.dragging&&n.push(Ze.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),n.push(Ze.widget(f,p))}}return _e.create(e.doc,n)}function $6({allowTableNodeSelection:e=!1}={}){return new pt({key:Qn,state:{init(){return null},apply(t,n){const r=t.getMeta(Qn);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:i,pos:u}=t.mapping.mapResult(n);return i?null:u}},props:{decorations:c6,handleDOMEvents:{mousedown:W6},createSelectionBetween(t){return Qn.getState(t.state)!=null?t.state.selection:null},handleTripleClick:H6,handleKeyDown:F6,handlePaste:U6},appendTransaction(t,n,r){return h6(r,m6(r,n),e)}})}var ma=typeof navigator<"u"?navigator:null,$d=ma&&ma.userAgent||"",eI=/Edge\/(\d+)/.exec($d),tI=/MSIE \d/.exec($d),nI=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec($d),rI=!!(tI||nI||eI),iI=!rI&&!!ma&&/Apple Computer/.test(ma.vendor),gg=new _t("safari-ime-span"),cc=!1,uI={key:gg,props:{decorations:sI,handleDOMEvents:{compositionstart:()=>{cc=!0},compositionend:()=>{cc=!1}}}};function sI(e){const{$from:t,$to:n,to:r}=e.selection;if(cc&&t.sameParent(n)){const i=Ze.widget(r,aI,{ignoreSelection:!0,key:"safari-ime-span"});return _e.create(e.doc,[i])}}function aI(e){const t=e.dom.ownerDocument.createElement("span");return t.className="ProseMirror-safari-ime-span",t}var oI=new pt(iI?uI:{key:gg});function R0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function lI(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function cI(e,t,n){const i=_a((n||{}).ignore||[]),u=dI(t);let s=-1;for(;++s<u.length;)Bc(e,"text",a);function a(l,c){let d=-1,f;for(;++d<c.length;){const p=c[d],m=f?f.children:void 0;if(i(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return o(l,c)}function o(l,c){const d=c[c.length-1],f=u[s][0],p=u[s][1];let m=0;const E=d.children.indexOf(l);let g=!1,N=[];f.lastIndex=0;let w=f.exec(l.value);for(;w;){const _=w.index,S={index:w.index,input:w.input,stack:[...c,l]};let x=p(...w,S);if(typeof x=="string"&&(x=x.length>0?{type:"text",value:x}:void 0),x===!1?f.lastIndex=_+1:(m!==_&&N.push({type:"text",value:l.value.slice(m,_)}),Array.isArray(x)?N.push(...x):x&&N.push(x),m=_+w[0].length,g=!0),!f.global)break;w=f.exec(l.value)}return g?(m<l.value.length&&N.push({type:"text",value:l.value.slice(m)}),d.children.splice(E,1,...N)):N=[l],E+N.length}}function dI(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([fI(i[0]),hI(i[1])])}return t}function fI(e){return typeof e=="string"?new RegExp(lI(e),"g"):e}function hI(e){return typeof e=="function"?e:function(){return e}}const Go="phrasing",Vo=["autolink","link","image","label"];function pI(){return{transforms:[TI],enter:{literalAutolink:AI,literalAutolinkEmail:Jo,literalAutolinkHttp:Jo,literalAutolinkWww:Jo},exit:{literalAutolink:yI,literalAutolinkEmail:EI,literalAutolinkHttp:gI,literalAutolinkWww:bI}}}function mI(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Go,notInConstruct:Vo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Go,notInConstruct:Vo},{character:":",before:"[ps]",after:"\\/",inConstruct:Go,notInConstruct:Vo}]}}function AI(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jo(e){this.config.enter.autolinkProtocol.call(this,e)}function gI(e){this.config.exit.autolinkProtocol.call(this,e)}function bI(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function EI(e){this.config.exit.autolinkEmail.call(this,e)}function yI(e){this.exit(e)}function TI(e){cI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,CI],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),kI]],{ignore:["link","linkReference"]})}function CI(e,t,n,r,i){let u="";if(!bg(i)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!xI(n)))return!1;const s=wI(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:u+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function kI(e,t,n,r){return!bg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function xI(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function wI(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=R0(e,"(");let u=R0(e,")");for(;r!==-1&&i>u;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),u++;return[e,n]}function bg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Mr(n)||Da(n))&&(!t||n!==47)}Eg.peek=BI;function II(){this.buffer()}function SI(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function NI(){this.buffer()}function DI(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _I(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function OI(e){this.exit(e)}function RI(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function MI(e){this.exit(e)}function BI(){return"["}function Eg(e,t,n,r){const i=n.createTracker(r);let u=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return u+=i.move(n.safe(n.associationId(e),{after:"]",before:u})),a(),s(),u+=i.move("]"),u}function vI(){return{enter:{gfmFootnoteCallString:II,gfmFootnoteCall:SI,gfmFootnoteDefinitionLabelString:NI,gfmFootnoteDefinition:DI},exit:{gfmFootnoteCallString:_I,gfmFootnoteCall:OI,gfmFootnoteDefinitionLabelString:RI,gfmFootnoteDefinition:MI}}}function LI(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Eg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,u,s){const a=u.createTracker(s);let o=a.move("[^");const l=u.enter("footnoteDefinition"),c=u.enter("label");return o+=a.move(u.safe(u.associationId(r),{before:o,after:"]"})),c(),o+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),o+=a.move((t?`
47
+ `:" ")+u.indentLines(u.containerFlow(r,a.current()),t?yg:PI))),l(),o}}function PI(e,t,n){return t===0?e:yg(e,t,n)}function yg(e,t,n){return(n?"":" ")+e}const FI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Tg.peek=zI;function HI(){return{canContainEols:["delete"],enter:{strikethrough:WI},exit:{strikethrough:KI}}}function UI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:FI}],handlers:{delete:Tg}}}function WI(e){this.enter({type:"delete",children:[]},e)}function KI(e){this.exit(e)}function Tg(e,t,n,r){const i=n.createTracker(r),u=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),u(),s}function zI(){return"~"}function QI(e){return e.length}function YI(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||QI,u=[],s=[],a=[],o=[];let l=0,c=-1;for(;++c<e.length;){const A=[],E=[];let g=-1;for(e[c].length>l&&(l=e[c].length);++g<e[c].length;){const N=qI(e[c][g]);if(n.alignDelimiters!==!1){const w=i(N);E[g]=w,(o[g]===void 0||w>o[g])&&(o[g]=w)}A.push(N)}s[c]=A,a[c]=E}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<l;)u[d]=M0(r[d]);else{const A=M0(r);for(;++d<l;)u[d]=A}d=-1;const f=[],p=[];for(;++d<l;){const A=u[d];let E="",g="";A===99?(E=":",g=":"):A===108?E=":":A===114&&(g=":");let N=n.alignDelimiters===!1?1:Math.max(1,o[d]-E.length-g.length);const w=E+"-".repeat(N)+g;n.alignDelimiters!==!1&&(N=E.length+N+g.length,N>o[d]&&(o[d]=N),p[d]=N),f[d]=w}s.splice(1,0,f),a.splice(1,0,p),c=-1;const m=[];for(;++c<s.length;){const A=s[c],E=a[c];d=-1;const g=[];for(;++d<l;){const N=A[d]||"";let w="",_="";if(n.alignDelimiters!==!1){const S=o[d]-(E[d]||0),x=u[d];x===114?w=" ".repeat(S):x===99?S%2?(w=" ".repeat(S/2+.5),_=" ".repeat(S/2-.5)):(w=" ".repeat(S/2),_=w):_=" ".repeat(S)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(w),g.push(N),n.alignDelimiters!==!1&&g.push(_),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==l-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
48
+ `)}function qI(e){return e==null?"":String(e)}function M0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function GI(){return{enter:{table:VI,tableData:B0,tableHeader:B0,tableRow:jI},exit:{codeText:ZI,table:JI,tableData:jo,tableHeader:jo,tableRow:jo}}}function VI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function JI(e){this.exit(e),this.data.inTable=void 0}function jI(e){this.enter({type:"tableRow",children:[]},e)}function jo(e){this.exit(e)}function B0(e){this.enter({type:"tableCell",children:[]},e)}function ZI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,XI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function XI(e,t){return t==="|"?t:e}function $I(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
49
49
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:o,tableRow:a}};function s(p,m,A,E){return l(c(p,A,E),p.align)}function a(p,m,A,E){const g=d(p,A,E),N=l([g]);return N.slice(0,N.indexOf(`
50
- `))}function o(p,m,A,E){const g=A.enter("tableCell"),N=A.enter("phrasing"),w=A.containerPhrasing(p,{...E,before:u,after:u});return N(),g(),w}function l(p,m){return Xw(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(p,m,A){const E=p.children;let g=-1;const N=[],w=m.enter("table");for(;++g<E.length;)N[g]=d(E[g],m,A);return w(),N}function d(p,m,A){const E=p.children;let g=-1;const N=[],w=m.enter("tableRow");for(;++g<E.length;)N[g]=o(E[g],p,m,A);return w(),N}function f(p,m,A){let E=Mc.inlineCode(p,m,A);return A.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function aI(){return{exit:{taskListCheckValueChecked:N0,taskListCheckValueUnchecked:N0,paragraph:lI}}}function oI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cI}}}function N0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let u=-1,s;for(;++u<i.length;){const a=i[u];if(a.type==="paragraph"){s=a;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cI(e,t,n,r){const i=e.children[0],u=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);u&&a.move(s);let o=Mc.listItem(e,t,n,{...r,...a.current()});return u&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),o;function l(c){return c+s}}function dI(){return[Tw(),Kw(),Gw(),eI(),aI()]}function fI(e){return{extensions:[Cw(),Qw(e),qw(),sI(e),oI()]}}const hI={tokenize:EI,partial:!0},eg={tokenize:yI,partial:!0},tg={tokenize:TI,partial:!0},ng={tokenize:CI,partial:!0},pI={tokenize:xI,partial:!0},rg={name:"wwwAutolink",tokenize:gI,previous:ug},ig={name:"protocolAutolink",tokenize:bI,previous:sg},Ln={name:"emailAutolink",tokenize:AI,previous:ag},an={};function mI(){return{text:an}}let hr=48;for(;hr<123;)an[hr]=Ln,hr++,hr===58?hr=65:hr===91&&(hr=97);an[43]=Ln;an[45]=Ln;an[46]=Ln;an[95]=Ln;an[72]=[Ln,ig];an[104]=[Ln,ig];an[87]=[Ln,rg];an[119]=[Ln,rg];function AI(e,t,n){const r=this;let i,u;return s;function s(d){return!oc(d)||!ag.call(r,r.previous)||Xd(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return oc(d)?(e.consume(d),a):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(pI,c,l)(d):d===45||d===95||pt(d)?(u=!0,e.consume(d),o):c(d)}function l(d){return e.consume(d),i=!0,o}function c(d){return u&&i&&st(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function gI(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!ug.call(r,r.previous)||Xd(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(hI,e.attempt(eg,e.attempt(tg,u),n),n)(s))}function u(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function bI(e,t,n){const r=this;let i="",u=!1;return s;function s(d){return(d===72||d===104)&&sg.call(r,r.previous)&&!Xd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(st(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),u?l:(u=!0,o)):n(d)}function l(d){return d===null||Fs(d)||ke(d)||_r(d)||xa(d)?n(d):e.attempt(eg,e.attempt(tg,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function EI(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),u):n(s)}function u(s){return s===null?n(s):t(s)}}function yI(e,t,n){let r,i,u;return s;function s(l){return l===46||l===95?e.check(ng,o,a)(l):l===null||ke(l)||_r(l)||l!==45&&xa(l)?o(l):(u=!0,e.consume(l),s)}function a(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function o(l){return i||r||!u?n(l):t(l)}}function TI(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?u(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(ng,t,u)(s):s===null||ke(s)||_r(s)?t(s):(e.consume(s),i)}function u(s){return s===41&&r++,e.consume(s),i}}function CI(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),u):a===93?(e.consume(a),i):a===60||a===null||ke(a)||_r(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||ke(a)||_r(a)?t(a):r(a)}function u(a){return st(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):st(a)?(e.consume(a),s):n(a)}}function xI(e,t,n){return r;function r(u){return e.consume(u),i}function i(u){return pt(u)?n(u):t(u)}}function ug(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ke(e)}function sg(e){return!st(e)}function ag(e){return!(e===47||oc(e))}function oc(e){return e===43||e===45||e===46||e===95||pt(e)}function Xd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const kI={tokenize:RI,partial:!0};function wI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:DI,continuation:{tokenize:_I},exit:OI}},text:{91:{name:"gfmFootnoteCall",tokenize:NI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:II,resolveTo:SI}}}}function II(e,t,n){const r=this;let i=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return a;function a(o){if(!s||!s._balanced)return n(o);const l=Qt(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!u.includes(l.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function SI(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",u,t],["enter",s,t],["exit",s,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function NI(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,s;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(u>999||d===93&&!s||d===null||d===91||ke(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Qt(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ke(d)||(s=!0),u++,e.consume(d),d===92?c:l}function c(d){return d===91||d===92||d===93?(e.consume(d),u++,l):l(d)}}function DI(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,s=0,a;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||ke(m))return n(m);if(m===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return u=Qt(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ke(m)||(a=!0),s++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),s++,c):c(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(u)||i.push(u),pe(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function _I(e,t,n){return e.check(vu,t,e.attempt(kI,t,n))}function OI(e){e.exit("gfmFootnoteDefinition")}function RI(e,t,n){const r=this;return pe(e,i,"gfmFootnoteDefinitionIndent",5);function i(u){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(u):n(u)}}function MI(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let l=o;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[o][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[o][1].start)},f=[["enter",c,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",d,a]],p=a.parser.constructs.insideSpan.null;p&&$e(f,f.length,0,Lu(p,s.slice(l+1,o),a)),$e(f,f.length,0,[["exit",d,a],["enter",s[o][1],a],["exit",s[o][1],a],["exit",c,a]]),$e(s,l-1,o-l+3,f),o=l+f.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function u(s,a,o){const l=this.previous,c=this.events;let d=0;return f;function f(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?o(m):(s.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const A=$n(l);if(m===126)return d>1?o(m):(s.consume(m),d++,p);if(d<2&&!n)return o(m);const E=s.exit("strikethroughSequenceTemporary"),g=$n(m);return E._open=!g||g===2&&!!A,E._close=!A||A===2&&!!g,a(m)}}}class BI{constructor(){this.map=[]}add(t,n,r){LI(this,t,n,r)}consume(t){if(this.map.sort(function(u,s){return u[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const u of i)t.push(u);i=r.pop()}this.map.length=0}}function LI(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function vI(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function PI(){return{flow:{null:{name:"table",tokenize:FI,resolveAll:HI}}}}function FI(e,t,n){const r=this;let i=0,u=0,s;return a;function a(x){let B=r.events.length-1;for(;B>-1;){const J=r.events[B][1].type;if(J==="lineEnding"||J==="linePrefix")B--;else break}const P=B>-1?r.events[B][1].type:null,G=P==="tableHead"||P==="tableRow"?k:o;return G===k&&r.parser.lazy[r.now().line]?n(x):G(x)}function o(x){return e.enter("tableHead"),e.enter("tableRow"),l(x)}function l(x){return x===124||(s=!0,u+=1),c(x)}function c(x){return x===null?n(x):X(x)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):n(x):de(x)?pe(e,c,"whitespace")(x):(u+=1,s&&(s=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(x)))}function d(x){return x===null||x===124||ke(x)?(e.exit("data"),c(x)):(e.consume(x),x===92?f:d)}function f(x){return x===92||x===124?(e.consume(x),d):d(x)}function p(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(x):(e.enter("tableDelimiterRow"),s=!1,de(x)?pe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):m(x))}function m(x){return x===45||x===58?E(x):x===124?(s=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),A):S(x)}function A(x){return de(x)?pe(e,E,"whitespace")(x):E(x)}function E(x){return x===58?(u+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),g):x===45?(u+=1,g(x)):x===null||X(x)?_(x):S(x)}function g(x){return x===45?(e.enter("tableDelimiterFiller"),N(x)):S(x)}function N(x){return x===45?(e.consume(x),N):x===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(x))}function w(x){return de(x)?pe(e,_,"whitespace")(x):_(x)}function _(x){return x===124?m(x):x===null||X(x)?!s||i!==u?S(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(x)):S(x)}function S(x){return n(x)}function k(x){return e.enter("tableRow"),R(x)}function R(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),R):x===null||X(x)?(e.exit("tableRow"),t(x)):de(x)?pe(e,R,"whitespace")(x):(e.enter("data"),Q(x))}function Q(x){return x===null||x===124||ke(x)?(e.exit("data"),R(x)):(e.consume(x),x===92?O:Q)}function O(x){return x===92||x===124?(e.consume(x),Q):Q(x)}}function HI(e,t){let n=-1,r=!0,i=0,u=[0,0,0,0],s=[0,0,0,0],a=!1,o=0,l,c,d;const f=new BI;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,o!==0&&(D0(f,t,o,l,c),c=void 0,o=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,u=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(u[1]!==0&&(s[0]=s[1],d=ms(f,t,u,i,void 0,d),u=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(s[0]=s[1],d=ms(f,t,u,i,void 0,d)),u=s,s=[u[1],n,0,0])):m.type==="tableHead"?(a=!0,o=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=n,u[1]!==0?(s[0]=s[1],d=ms(f,t,u,i,n,d)):s[1]!==0&&(d=ms(f,t,s,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&D0(f,t,o,l,c),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=vI(t.events,n))}return e}function ms(e,t,n,r,i,u){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(u.end=Object.assign({},$r(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const o=$r(t.events,n[1]);if(u={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const l=$r(t.events,n[2]),c=$r(t.events,n[3]),d={type:a,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,A=n[3]-n[2]-1;e.add(m,A,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(u.end=Object.assign({},$r(t.events,i)),e.add(i,0,[["exit",u,t]]),u=void 0),u}function D0(e,t,n,r,i){const u=[],s=$r(t.events,n);i&&(i.end=Object.assign({},s),u.push(["exit",i,t])),r.end=Object.assign({},s),u.push(["exit",r,t]),e.add(n+1,0,u)}function $r(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const UI={name:"tasklistCheck",tokenize:KI};function WI(){return{text:{91:UI}}}function KI(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),u)}function u(o){return ke(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(o)}function a(o){return X(o)?t(o):de(o)?e.check({tokenize:QI},t,n)(o):n(o)}}function QI(e,t,n){return pe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function zI(e){return tm([mI(),wI(),MI(e),PI(),WI()])}const YI={};function GI(e){const t=this,n=e||YI,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(zI(n)),u.push(dI()),s.push(fI(n))}function ee(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e}var $d=Ku("strike_through");ee($d,{displayName:"Attr<strikethrough>",group:"Strikethrough"});var Vu=Mn("strike_through",e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:t=>t==="line-through"}],toDOM:t=>["del",e.get($d.key)(t)],parseMarkdown:{match:t=>t.type==="delete",runner:(t,n,r)=>{t.openMark(r),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strike_through",runner:(t,n)=>{t.withMark(n,"delete")}}}));ee(Vu.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});ee(Vu.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});var ef=ie("ToggleStrikeThrough",e=>()=>Oa(Vu.type(e)));ee(ef,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});var og=bt(e=>Fu(new RegExp("(?<![\\w:/])(~{1,2})(.+?)\\1(?!\\w|\\/)"),Vu.type(e)));ee(og,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});var tf=St("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(Ce);return()=>t.call(ef.key)}}});ee(tf.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});ee(tf.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});var Ju=d6({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Nn=Be("table",()=>({...Ju.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="table",runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r,isHeader:s===0}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table",runner:(e,t)=>{const n=t.content.firstChild?.content;if(!n)return;const r=[];n.forEach(i=>{r.push(i.attrs.alignment)}),e.openNode("table",void 0,{align:r}),e.next(t.content),e.closeNode()}}}));ee(Nn.node,{displayName:"NodeSchema<table>",group:"Table"});ee(Nn.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});var ju=Be("table_header_row",()=>({...Ju.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"},{tag:"tr",getAttrs:e=>e instanceof HTMLElement&&e.querySelector("th")?{}:!1}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:e=>!!(e.type==="tableRow"&&e.isHeader),runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r[s],isHeader:t.isHeader}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header_row",runner:(e,t)=>{t.content.size!==0&&(e.openNode("tableRow",void 0,{isHeader:!0}),e.next(t.content),e.closeNode())}}}));ee(ju.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});ee(ju.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});var Ti=Be("table_row",()=>({...Ju.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:e=>e.type==="tableRow",runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r[s]}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_row",runner:(e,t)=>{t.content.size!==0&&(e.openNode("tableRow"),e.next(t.content),e.closeNode())}}}));ee(Ti.node,{displayName:"NodeSchema<tableRow>",group:"Table"});ee(Ti.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});var Zu=Be("table_cell",()=>({...Ju.table_cell,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>e.type.name==="table_cell",runner:(e,t)=>{e.openNode("tableCell").next(t.content).closeNode()}}}));ee(Zu.node,{displayName:"NodeSchema<tableCell>",group:"Table"});ee(Zu.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});var fi=Be("table_header",()=>({...Ju.table_header,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header",runner:(e,t)=>{e.openNode("tableCell"),e.next(t.content),e.closeNode()}}}));ee(fi.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});ee(fi.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function lg(e,t=3,n=3){const r=Array(n).fill(0).map(()=>Zu.type(e).createAndFill()),i=Array(n).fill(0).map(()=>fi.type(e).createAndFill()),u=Array(t).fill(0).map((s,a)=>a===0?ju.type(e).create(null,i):Ti.type(e).create(null,r));return Nn.type(e).create(null,u)}function cg(e){return(t,n)=>r=>{n=n??r.selection.from;const i=r.doc.resolve(n),u=EC(o=>o.type.name==="table")(i),s=u?{node:u.node,from:u.start}:void 0,a=e==="row";if(s){const o=Te.get(s.node);if(t>=0&&t<(a?o.height:o.width)){const l=o.positionAt(a?t:o.height-1,a?o.width-1:t,s.node),c=r.doc.resolve(s.from+l),d=a?Se.rowSelection:Se.colSelection,f=o.positionAt(a?t:0,a?0:t,s.node),p=r.doc.resolve(s.from+f);return g1(r.setSelection(d(c,p)))}}return r}}var qI=cg("row"),VI=cg("col");function dg(e,t,{map:n,tableStart:r,table:i},u){const s=Array(u).fill(0).reduce((o,l,c)=>o+i.child(c).nodeSize,r),a=Array(n.width).fill(0).map((o,l)=>{const c=i.nodeAt(n.map[l]);return Zu.type(e).createAndFill({alignment:c?.attrs.alignment})});return t.insert(s,Ti.type(e).create(null,a)),t}function JI(e){const t=qu(e.$from);if(!t)return;const n=Te.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(r=>{const i=t.node.nodeAt(r),u=r+t.start;return{pos:u,start:u+1,node:i}})}function jI(e){const t=JI(e.selection);if(t&&t[0]){const n=e.doc.resolve(t[0].pos),r=t[t.length-1];if(r){const i=e.doc.resolve(r.pos);return g1(e.setSelection(new Se(i,n)))}}return e}var nf=ie("GoToPrevTableCell",()=>()=>GA(-1));ee(nf,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});var rf=ie("GoToNextTableCell",()=>()=>GA(1));ee(rf,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});var uf=ie("ExitTable",e=>()=>(t,n)=>{if(!Ut(t))return!1;const{$head:r}=t.selection,i=bC(r,Nn.type(e));if(!i)return!1;const{to:u}=i,s=t.tr.replaceWith(u,u,rn.type(e).createAndFill());return s.setSelection(ue.near(s.doc.resolve(u),1)).scrollIntoView(),n?.(s),!0});ee(uf,{displayName:"Command<breakTableCommand>",group:"Table"});var fg=ie("InsertTable",e=>({row:t,col:n}={})=>(r,i)=>{const{selection:u,tr:s}=r,{from:a}=u,o=lg(e,t,n),l=s.replaceSelectionWith(o),c=ue.findFrom(l.doc.resolve(a),1,!0);return c&&l.setSelection(c),i?.(l),!0});ee(fg,{displayName:"Command<insertTableCommand>",group:"Table"});var hg=ie("MoveRow",()=>({from:e,to:t,pos:n}={})=>H6({from:e??0,to:t??0,pos:n}));ee(hg,{displayName:"Command<moveRowCommand>",group:"Table"});var pg=ie("MoveCol",()=>({from:e,to:t,pos:n}={})=>U6({from:e??0,to:t??0,pos:n}));ee(pg,{displayName:"Command<moveColCommand>",group:"Table"});var mg=ie("SelectRow",()=>(e={index:0})=>(t,n)=>{const{tr:r}=t;return!!n?.(qI(e.index,e.pos)(r))});ee(mg,{displayName:"Command<selectRowCommand>",group:"Table"});var Ag=ie("SelectCol",()=>(e={index:0})=>(t,n)=>{const{tr:r}=t;return!!n?.(VI(e.index,e.pos)(r))});ee(Ag,{displayName:"Command<selectColCommand>",group:"Table"});var gg=ie("SelectTable",()=>()=>(e,t)=>{const{tr:n}=e;return!!t?.(jI(n))});ee(gg,{displayName:"Command<selectTableCommand>",group:"Table"});var bg=ie("DeleteSelectedCells",()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof Se))return!1;const r=n.isRowSelection(),i=n.isColSelection();return r&&i?F6(e,t):i?R6(e,t):B6(e,t)});ee(bg,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});var Eg=ie("AddColBefore",()=>()=>D6);ee(Eg,{displayName:"Command<addColBeforeCommand>",group:"Table"});var yg=ie("AddColAfter",()=>()=>_6);ee(yg,{displayName:"Command<addColAfterCommand>",group:"Table"});var Tg=ie("AddRowBefore",e=>()=>(t,n)=>{if(!Ut(t))return!1;if(n){const r=ar(t);n(dg(e,t.tr,r,r.top))}return!0});ee(Tg,{displayName:"Command<addRowBeforeCommand>",group:"Table"});var Cg=ie("AddRowAfter",e=>()=>(t,n)=>{if(!Ut(t))return!1;if(n){const r=ar(t);n(dg(e,t.tr,r,r.bottom))}return!0});ee(Cg,{displayName:"Command<addRowAfterCommand>",group:"Table"});var xg=ie("SetAlign",()=>(e="left")=>L6("alignment",e));ee(xg,{displayName:"Command<setAlignCommand>",group:"Table"});var kg=bt(e=>new It(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(t,n,r,i)=>{const u=t.doc.resolve(r);if(!u.node(-1).canReplaceWith(u.index(-1),u.indexAfter(-1),Nn.type(e)))return null;const s=lg(e,Math.max(Number(n.groups?.row??0),2),Number(n.groups?.col)),a=t.tr.replaceRangeWith(r,i,s);return a.setSelection(ae.create(a.doc,r+3)).scrollIntoView()}));ee(kg,{displayName:"InputRule<insertTableInputRule>",group:"Table"});var wg=Ik(e=>({run:(t,n,r)=>{if(r)return t;function i(l){const c=l.childCount,d=l.lastChild?.childCount??0;if(c===0||d===0)return rn.type(e).create();const f=l.firstChild;if(!(d>0&&f&&f.childCount===0))return l;if(c>=3){const E=l.child(1),g=[];for(let _=0;_<E.childCount;_++){const S=E.child(_);g.push(fi.type(e).create(S.attrs,S.content,S.marks))}const N=f.type.create(f.attrs,g),w=[];for(let _=2;_<c;_++)w.push(l.child(_));return l.type.create(l.attrs,[N,...w])}const p=Array(d).fill(0).map(()=>fi.type(e).createAndFill()),m=new Y(H.from(p),0,0),A=f.replace(0,0,m);return l.replace(0,f.nodeSize,new Y(H.from(A),0,0))}function u(l){const c=Ti.type(e),d=[];let f=[],p=!1;function m(){if(f.length===0)return;const A=ju.type(e).createAndFill(),E=Nn.type(e).create(null,[A,...f]);d.push(i(E)),f=[]}return l.forEach(A=>{A.type===c?(p=!0,f.push(A)):(m(),d.push(A))}),m(),p?H.from(d):l}function s(l){let c=u(l),d=c!==l;const f=[];return c.forEach(p=>{if(p.type===Nn.type(e)){const m=i(p);m!==p&&(d=!0),f.push(m)}else if(p.childCount>0){const m=s(p.content);m!==p.content?(d=!0,f.push(p.copy(m))):f.push(p)}else f.push(p)}),d?H.from(f):l}function a(l){const c=[],d=[];l.forEach(f=>d.push(f));for(let f=0;f<d.length;f++){const p=d[f],m=d[f+1];p.type===rn.type(e)&&p.content.size===0&&m&&m.type===Nn.type(e)||c.push(p)}return c.length<d.length?H.from(c):l}let o=s(t.content);return o=a(o),new Y(H.from(o),t.openStart,t.openEnd)}}));ee(wg,{displayName:"PasteRule<table>",group:"Table"});var sf=St("tableKeymap",{NextCell:{priority:100,shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(Ce);return()=>t.call(rf.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(Ce);return()=>t.call(nf.key)}},ExitTable:{shortcuts:["Mod-Enter","Enter"],command:e=>{const t=e.get(Ce);return()=>t.call(uf.key)}}});ee(sf.ctx,{displayName:"KeymapCtx<table>",group:"Table"});ee(sf.shortcuts,{displayName:"Keymap<table>",group:"Table"});var Yo="footnote_definition",_0="footnoteDefinition",af=Be("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`dl[data-type="${Yo}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw un(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":Yo},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===_0,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===Yo,runner:(e,t)=>{e.openNode(_0,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}}));ee(af.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});ee(af.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});var Go="footnote_reference",of=Be("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`sup[data-type="${Go}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw un(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":Go},t]},parseMarkdown:{match:({type:e})=>e==="footnoteReference",runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===Go,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}}));ee(of.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});ee(of.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});var lf=Bn.extendSchema(e=>t=>{const n=e(t);return{...n,attrs:{...n.attrs,checked:{default:null,validate:"boolean|null"}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:r=>{if(!(r instanceof HTMLElement))throw un(r);return{label:r.dataset.label,listType:r.dataset.listType,spread:r.dataset.spread,checked:r.dataset.checked?r.dataset.checked==="true":null}}},...n?.parseDOM||[]],toDOM:r=>n.toDOM&&r.attrs.checked==null?n.toDOM(r):["li",{"data-item-type":"task","data-label":r.attrs.label,"data-list-type":r.attrs.listType,"data-spread":r.attrs.spread,"data-checked":r.attrs.checked},0],parseMarkdown:{match:({type:r})=>r==="listItem",runner:(r,i,u)=>{if(i.checked==null){n.parseMarkdown.runner(r,i,u);return}const s=i.label!=null?`${i.label}.`:"•",a=i.checked!=null?!!i.checked:null,o=i.label!=null?"ordered":"bullet",l=i.spread!=null?`${i.spread}`:"true";r.openNode(u,{label:s,listType:o,spread:l,checked:a}),r.next(i.children),r.closeNode()}},toMarkdown:{match:r=>r.type.name==="list_item",runner:(r,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(r,i);return}const u=i.attrs.label,s=i.attrs.listType,a=i.attrs.spread==="true",o=i.attrs.checked;r.openNode("listItem",void 0,{label:u,listType:s,spread:a,checked:o}),r.next(i.content),r.closeNode()}}}});ee(lf.node,{displayName:"NodeSchema<taskListItem>",group:"ListItem"});ee(lf.ctx,{displayName:"NodeSchemaCtx<taskListItem>",group:"ListItem"});var Ig=bt(()=>new It(/^\[(?<checked>\s|x)\]\s$/,(e,t,n,r)=>{const i=e.doc.resolve(n);let u=0,s=i.node(u);for(;s&&s.type.name!=="list_item";)u--,s=i.node(u);if(!s||s.attrs.checked!=null)return null;const a=t.groups?.checked==="x",o=i.before(u),l=e.tr;return l.deleteRange(n,r).setNodeMarkup(o,void 0,{...s.attrs,checked:a}),l}));ee(Ig,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});var ZI=[tf,sf].flat(),XI=[kg,Ig],$I=[og],eS=[wg],Sg=Rn(()=>mw);ee(Sg,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});var tS=Rn(()=>j6({}));ee(tS,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});var Ng=Rn(()=>sw({allowTableNodeSelection:!0}));ee(Ng,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});var cf=Ht("remarkGFM",()=>GI);ee(cf.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});ee(cf.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});var nS=new wt("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function rS(e,t){let n=0;return t.forEach((r,i,u)=>{r===e&&(n=u)}),n}var Dg=Rn(()=>new kt({key:nS,appendTransaction:(e,t,n)=>{let r;const i=(u,s)=>{if(r||(r=n.tr),u.type.name!=="table_cell")return;const a=n.doc.resolve(s),o=a.node(a.depth),l=a.node(a.depth-1).firstChild;if(!l)return;const c=rS(u,o),d=l.maybeChild(c);if(!d)return;const f=d.attrs.alignment;f!==u.attrs.alignment&&r.setNodeMarkup(s,void 0,{...u.attrs,alignment:f})};return t.doc!==n.doc&&n.doc.descendants(i),r}}));ee(Dg,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});var iS=[Dg,Sg,cf,Ng].flat(),uS=[lf,Nn,ju,Ti,fi,Zu,af,of,$d,Vu].flat(),sS=[rf,nf,uf,fg,hg,pg,mg,Ag,gg,bg,Tg,Cg,Eg,yg,xg,ef],AR=[uS,XI,eS,$I,ZI,sS,iS].flat();const gR=`/*
51
- * @zzclub/milkdown-article-style — article typography
50
+ `))}function o(p,m,A,E){const g=A.enter("tableCell"),N=A.enter("phrasing"),w=A.containerPhrasing(p,{...E,before:u,after:u});return N(),g(),w}function l(p,m){return YI(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(p,m,A){const E=p.children;let g=-1;const N=[],w=m.enter("table");for(;++g<E.length;)N[g]=d(E[g],m,A);return w(),N}function d(p,m,A){const E=p.children;let g=-1;const N=[],w=m.enter("tableRow");for(;++g<E.length;)N[g]=o(E[g],p,m,A);return w(),N}function f(p,m,A){let E=Lc.inlineCode(p,m,A);return A.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function eS(){return{exit:{taskListCheckValueChecked:v0,taskListCheckValueUnchecked:v0,paragraph:nS}}}function tS(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rS}}}function v0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function nS(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let u=-1,s;for(;++u<i.length;){const a=i[u];if(a.type==="paragraph"){s=a;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function rS(e,t,n,r){const i=e.children[0],u=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);u&&a.move(s);let o=Lc.listItem(e,t,n,{...r,...a.current()});return u&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),o;function l(c){return c+s}}function iS(){return[pI(),vI(),HI(),GI(),eS()]}function uS(e){return{extensions:[mI(),LI(e),UI(),$I(e),tS()]}}const sS={tokenize:fS,partial:!0},Cg={tokenize:hS,partial:!0},kg={tokenize:pS,partial:!0},xg={tokenize:mS,partial:!0},aS={tokenize:AS,partial:!0},wg={name:"wwwAutolink",tokenize:cS,previous:Sg},Ig={name:"protocolAutolink",tokenize:dS,previous:Ng},Ln={name:"emailAutolink",tokenize:lS,previous:Dg},cn={};function oS(){return{text:cn}}let Ar=48;for(;Ar<123;)cn[Ar]=Ln,Ar++,Ar===58?Ar=65:Ar===91&&(Ar=97);cn[43]=Ln;cn[45]=Ln;cn[46]=Ln;cn[95]=Ln;cn[72]=[Ln,Ig];cn[104]=[Ln,Ig];cn[87]=[Ln,wg];cn[119]=[Ln,wg];function lS(e,t,n){const r=this;let i,u;return s;function s(d){return!dc(d)||!Dg.call(r,r.previous)||ef(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return dc(d)?(e.consume(d),a):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(aS,c,l)(d):d===45||d===95||Tt(d)?(u=!0,e.consume(d),o):c(d)}function l(d){return e.consume(d),i=!0,o}function c(d){return u&&i&&ot(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function cS(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Sg.call(r,r.previous)||ef(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sS,e.attempt(Cg,e.attempt(kg,u),n),n)(s))}function u(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function dS(e,t,n){const r=this;let i="",u=!1;return s;function s(d){return(d===72||d===104)&&Ng.call(r,r.previous)&&!ef(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(ot(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),u?l:(u=!0,o)):n(d)}function l(d){return d===null||Zs(d)||xe(d)||Mr(d)||Da(d)?n(d):e.attempt(Cg,e.attempt(kg,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function fS(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),u):n(s)}function u(s){return s===null?n(s):t(s)}}function hS(e,t,n){let r,i,u;return s;function s(l){return l===46||l===95?e.check(xg,o,a)(l):l===null||xe(l)||Mr(l)||l!==45&&Da(l)?o(l):(u=!0,e.consume(l),s)}function a(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function o(l){return i||r||!u?n(l):t(l)}}function pS(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?u(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(xg,t,u)(s):s===null||xe(s)||Mr(s)?t(s):(e.consume(s),i)}function u(s){return s===41&&r++,e.consume(s),i}}function mS(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),u):a===93?(e.consume(a),i):a===60||a===null||xe(a)||Mr(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||xe(a)||Mr(a)?t(a):r(a)}function u(a){return ot(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):ot(a)?(e.consume(a),s):n(a)}}function AS(e,t,n){return r;function r(u){return e.consume(u),i}function i(u){return Tt(u)?n(u):t(u)}}function Sg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xe(e)}function Ng(e){return!ot(e)}function Dg(e){return!(e===47||dc(e))}function dc(e){return e===43||e===45||e===46||e===95||Tt(e)}function ef(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const gS={tokenize:wS,partial:!0};function bS(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:CS,continuation:{tokenize:kS},exit:xS}},text:{91:{name:"gfmFootnoteCall",tokenize:TS},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ES,resolveTo:yS}}}}function ES(e,t,n){const r=this;let i=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return a;function a(o){if(!s||!s._balanced)return n(o);const l=Yt(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!u.includes(l.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function yS(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",u,t],["enter",s,t],["exit",s,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function TS(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,s;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(u>999||d===93&&!s||d===null||d===91||xe(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Yt(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return xe(d)||(s=!0),u++,e.consume(d),d===92?c:l}function c(d){return d===91||d===92||d===93?(e.consume(d),u++,l):l(d)}}function CS(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,s=0,a;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||xe(m))return n(m);if(m===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return u=Yt(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return xe(m)||(a=!0),s++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),s++,c):c(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(u)||i.push(u),pe(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function kS(e,t,n){return e.check(Vu,t,e.attempt(gS,t,n))}function xS(e){e.exit("gfmFootnoteDefinition")}function wS(e,t,n){const r=this;return pe(e,i,"gfmFootnoteDefinitionIndent",5);function i(u){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(u):n(u)}}function IS(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let l=o;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[o][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[o][1].start)},f=[["enter",c,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",d,a]],p=a.parser.constructs.insideSpan.null;p&&et(f,f.length,0,Gu(p,s.slice(l+1,o),a)),et(f,f.length,0,[["exit",d,a],["enter",s[o][1],a],["exit",s[o][1],a],["exit",c,a]]),et(s,l-1,o-l+3,f),o=l+f.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function u(s,a,o){const l=this.previous,c=this.events;let d=0;return f;function f(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?o(m):(s.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const A=tr(l);if(m===126)return d>1?o(m):(s.consume(m),d++,p);if(d<2&&!n)return o(m);const E=s.exit("strikethroughSequenceTemporary"),g=tr(m);return E._open=!g||g===2&&!!A,E._close=!A||A===2&&!!g,a(m)}}}class SS{constructor(){this.map=[]}add(t,n,r){NS(this,t,n,r)}consume(t){if(this.map.sort(function(u,s){return u[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const u of i)t.push(u);i=r.pop()}this.map.length=0}}function NS(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function DS(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function _S(){return{flow:{null:{name:"table",tokenize:OS,resolveAll:RS}}}}function OS(e,t,n){const r=this;let i=0,u=0,s;return a;function a(k){let B=r.events.length-1;for(;B>-1;){const J=r.events[B][1].type;if(J==="lineEnding"||J==="linePrefix")B--;else break}const P=B>-1?r.events[B][1].type:null,q=P==="tableHead"||P==="tableRow"?x:o;return q===x&&r.parser.lazy[r.now().line]?n(k):q(k)}function o(k){return e.enter("tableHead"),e.enter("tableRow"),l(k)}function l(k){return k===124||(s=!0,u+=1),c(k)}function c(k){return k===null?n(k):X(k)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):de(k)?pe(e,c,"whitespace")(k):(u+=1,s&&(s=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(k)))}function d(k){return k===null||k===124||xe(k)?(e.exit("data"),c(k)):(e.consume(k),k===92?f:d)}function f(k){return k===92||k===124?(e.consume(k),d):d(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),s=!1,de(k)?pe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):m(k))}function m(k){return k===45||k===58?E(k):k===124?(s=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),A):S(k)}function A(k){return de(k)?pe(e,E,"whitespace")(k):E(k)}function E(k){return k===58?(u+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),g):k===45?(u+=1,g(k)):k===null||X(k)?_(k):S(k)}function g(k){return k===45?(e.enter("tableDelimiterFiller"),N(k)):S(k)}function N(k){return k===45?(e.consume(k),N):k===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(k))}function w(k){return de(k)?pe(e,_,"whitespace")(k):_(k)}function _(k){return k===124?m(k):k===null||X(k)?!s||i!==u?S(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):S(k)}function S(k){return n(k)}function x(k){return e.enter("tableRow"),O(k)}function O(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),O):k===null||X(k)?(e.exit("tableRow"),t(k)):de(k)?pe(e,O,"whitespace")(k):(e.enter("data"),z(k))}function z(k){return k===null||k===124||xe(k)?(e.exit("data"),O(k)):(e.consume(k),k===92?R:z)}function R(k){return k===92||k===124?(e.consume(k),z):z(k)}}function RS(e,t){let n=-1,r=!0,i=0,u=[0,0,0,0],s=[0,0,0,0],a=!1,o=0,l,c,d;const f=new SS;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,o!==0&&(L0(f,t,o,l,c),c=void 0,o=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,u=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(u[1]!==0&&(s[0]=s[1],d=Ss(f,t,u,i,void 0,d),u=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(s[0]=s[1],d=Ss(f,t,u,i,void 0,d)),u=s,s=[u[1],n,0,0])):m.type==="tableHead"?(a=!0,o=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=n,u[1]!==0?(s[0]=s[1],d=Ss(f,t,u,i,n,d)):s[1]!==0&&(d=Ss(f,t,s,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&L0(f,t,o,l,c),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=DS(t.events,n))}return e}function Ss(e,t,n,r,i,u){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(u.end=Object.assign({},$r(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const o=$r(t.events,n[1]);if(u={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const l=$r(t.events,n[2]),c=$r(t.events,n[3]),d={type:a,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,A=n[3]-n[2]-1;e.add(m,A,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(u.end=Object.assign({},$r(t.events,i)),e.add(i,0,[["exit",u,t]]),u=void 0),u}function L0(e,t,n,r,i){const u=[],s=$r(t.events,n);i&&(i.end=Object.assign({},s),u.push(["exit",i,t])),r.end=Object.assign({},s),u.push(["exit",r,t]),e.add(n+1,0,u)}function $r(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const MS={name:"tasklistCheck",tokenize:vS};function BS(){return{text:{91:MS}}}function vS(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),u)}function u(o){return xe(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(o)}function a(o){return X(o)?t(o):de(o)?e.check({tokenize:LS},t,n)(o):n(o)}}function LS(e,t,n){return pe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function PS(e){return dm([oS(),bS(),IS(e),_S(),BS()])}const FS={};function HS(e){const t=this,n=e||FS,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(PS(n)),u.push(iS()),s.push(uS(n))}function ee(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e}var tf=es("strike_through");ee(tf,{displayName:"Attr<strikethrough>",group:"Strikethrough"});var ss=Bn("strike_through",e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:t=>t==="line-through"}],toDOM:t=>["del",e.get(tf.key)(t)],parseMarkdown:{match:t=>t.type==="delete",runner:(t,n,r)=>{t.openMark(r),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strike_through",runner:(t,n)=>{t.withMark(n,"delete")}}}));ee(ss.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});ee(ss.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});var nf=ue("ToggleStrikeThrough",e=>()=>Pa(ss.type(e)));ee(nf,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});var _g=xt(e=>ju(new RegExp("(?<![\\w:/])(~{1,2})(.+?)\\1(?!\\w|\\/)$"),ss.type(e)));ee(_g,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});var rf=Ot("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(Ce);return()=>t.call(nf.key)}}});ee(rf.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});ee(rf.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});function Og(e,t){const n=t.content.firstChild;if(t.childCount!==1||n?.type.name!=="paragraph"){e.next(t.content);return}const r=n.lastChild,i=r?.type.name==="hardbreak"?n.content.cut(0,n.content.size-r.nodeSize):n.content;e.next(i)}var as=i6({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Dn=ve("table",()=>({...as.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="table",runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r,isHeader:s===0}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table",runner:(e,t)=>{const n=t.content.firstChild?.content;if(!n)return;const r=[];n.forEach(i=>{r.push(i.attrs.alignment)}),e.openNode("table",void 0,{align:r}),e.next(t.content),e.closeNode()}}}));ee(Dn.node,{displayName:"NodeSchema<table>",group:"Table"});ee(Dn.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});var ls=ve("table_header_row",()=>({...as.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"},{tag:"tr",getAttrs:e=>e instanceof HTMLElement&&e.querySelector("th")?{}:!1}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:e=>!!(e.type==="tableRow"&&e.isHeader),runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r[s],isHeader:t.isHeader}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header_row",runner:(e,t)=>{t.content.size!==0&&(e.openNode("tableRow",void 0,{isHeader:!0}),e.next(t.content),e.closeNode())}}}));ee(ls.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});ee(ls.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});var Si=ve("table_row",()=>({...as.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:e=>e.type==="tableRow",runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r[s]}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_row",runner:(e,t)=>{t.content.size!==0&&(e.openNode("tableRow"),e.next(t.content),e.closeNode())}}}));ee(Si.node,{displayName:"NodeSchema<tableRow>",group:"Table"});ee(Si.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});var cs=ve("table_cell",()=>({...as.table_cell,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>e.type.name==="table_cell",runner:(e,t)=>{e.openNode("tableCell"),Og(e,t),e.closeNode()}}}));ee(cs.node,{displayName:"NodeSchema<tableCell>",group:"Table"});ee(cs.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});var bi=ve("table_header",()=>({...as.table_header,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header",runner:(e,t)=>{e.openNode("tableCell"),Og(e,t),e.closeNode()}}}));ee(bi.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});ee(bi.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function Rg(e,t=3,n=3){const r=Array(n).fill(0).map(()=>cs.type(e).createAndFill()),i=Array(n).fill(0).map(()=>bi.type(e).createAndFill()),u=Array(t).fill(0).map((s,a)=>a===0?ls.type(e).create(null,i):Si.type(e).create(null,r));return Dn.type(e).create(null,u)}function Mg(e){return(t,n)=>r=>{n=n??r.selection.from;const i=r.doc.resolve(n),u=v1(o=>o.type.name==="table")(i),s=u?{node:u.node,from:u.start}:void 0,a=e==="row";if(s){const o=Te.get(s.node);if(t>=0&&t<(a?o.height:o.width)){const l=o.positionAt(a?t:o.height-1,a?o.width-1:t,s.node),c=r.doc.resolve(s.from+l),d=a?Ne.rowSelection:Ne.colSelection,f=o.positionAt(a?t:0,a?0:t,s.node),p=r.doc.resolve(s.from+f);return B1(r.setSelection(d(c,p)))}}return r}}var US=Mg("row"),WS=Mg("col");function Bg(e,t,{map:n,tableStart:r,table:i},u){const s=Array(u).fill(0).reduce((o,l,c)=>o+i.child(c).nodeSize,r),a=Array(n.width).fill(0).map((o,l)=>{const c=i.nodeAt(n.map[l]);return cs.type(e).createAndFill({alignment:c?.attrs.alignment})});return t.insert(s,Si.type(e).create(null,a)),t}function KS(e){const t=us(e.$from);if(!t)return;const n=Te.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(r=>{const i=t.node.nodeAt(r),u=r+t.start;return{pos:u,start:u+1,node:i}})}function zS(e){const t=KS(e.selection);if(t&&t[0]){const n=e.doc.resolve(t[0].pos),r=t[t.length-1];if(r){const i=e.doc.resolve(r.pos);return B1(e.setSelection(new Ne(i,n)))}}return e}var uf=ue("GoToPrevTableCell",()=>()=>pg(-1));ee(uf,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});var sf=ue("GoToNextTableCell",()=>()=>pg(1));ee(sf,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});var af=ue("ExitTable",e=>()=>(t,n)=>{if(!Wt(t))return!1;const{$head:r}=t.selection,i=ek(r,Dn.type(e));if(!i)return!1;const{to:u}=i,s=t.tr.replaceWith(u,u,an.type(e).createAndFill());return s.setSelection(se.near(s.doc.resolve(u),1)).scrollIntoView(),n?.(s),!0});ee(af,{displayName:"Command<breakTableCommand>",group:"Table"});var vg=ue("InsertTable",e=>({row:t,col:n}={})=>(r,i)=>{const{selection:u,tr:s}=r,{from:a}=u,o=Rg(e,t,n),l=s.replaceSelectionWith(o),c=se.findFrom(l.doc.resolve(a),1,!0);return c&&l.setSelection(c),i?.(l),!0});ee(vg,{displayName:"Command<insertTableCommand>",group:"Table"});var Lg=ue("MoveRow",()=>({from:e,to:t,pos:n}={})=>R6({from:e??0,to:t??0,pos:n}));ee(Lg,{displayName:"Command<moveRowCommand>",group:"Table"});var Pg=ue("MoveCol",()=>({from:e,to:t,pos:n}={})=>M6({from:e??0,to:t??0,pos:n}));ee(Pg,{displayName:"Command<moveColCommand>",group:"Table"});var Fg=ue("SelectRow",()=>(e={index:0})=>(t,n)=>{const{tr:r}=t;return!!n?.(US(e.index,e.pos)(r))});ee(Fg,{displayName:"Command<selectRowCommand>",group:"Table"});var Hg=ue("SelectCol",()=>(e={index:0})=>(t,n)=>{const{tr:r}=t;return!!n?.(WS(e.index,e.pos)(r))});ee(Hg,{displayName:"Command<selectColCommand>",group:"Table"});var Ug=ue("SelectTable",()=>()=>(e,t)=>{const{tr:n}=e;return!!t?.(zS(n))});ee(Ug,{displayName:"Command<selectTableCommand>",group:"Table"});var Wg=ue("DeleteSelectedCells",()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof Ne))return!1;const r=n.isRowSelection(),i=n.isColSelection();return r&&i?O6(e,t):i?w6(e,t):S6(e,t)});ee(Wg,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});var Kg=ue("AddColBefore",()=>()=>C6);ee(Kg,{displayName:"Command<addColBeforeCommand>",group:"Table"});var zg=ue("AddColAfter",()=>()=>k6);ee(zg,{displayName:"Command<addColAfterCommand>",group:"Table"});var Qg=ue("AddRowBefore",e=>()=>(t,n)=>{if(!Wt(t))return!1;if(n){const r=cr(t);n(Bg(e,t.tr,r,r.top))}return!0});ee(Qg,{displayName:"Command<addRowBeforeCommand>",group:"Table"});var Yg=ue("AddRowAfter",e=>()=>(t,n)=>{if(!Wt(t))return!1;if(n){const r=cr(t);n(Bg(e,t.tr,r,r.bottom))}return!0});ee(Yg,{displayName:"Command<addRowAfterCommand>",group:"Table"});var qg=ue("SetAlign",()=>(e="left")=>N6("alignment",e));ee(qg,{displayName:"Command<setAlignCommand>",group:"Table"});var Gg=xt(e=>new mt(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(t,n,r,i)=>{const u=t.doc.resolve(r);if(!u.node(-1).canReplaceWith(u.index(-1),u.indexAfter(-1),Dn.type(e)))return null;const s=Rg(e,Math.max(Number(n.groups?.row??0),2),Number(n.groups?.col)),a=t.tr.replaceRangeWith(r,i,s);return a.setSelection(ae.create(a.doc,r+3)).scrollIntoView()}));ee(Gg,{displayName:"InputRule<insertTableInputRule>",group:"Table"});var Vg=cw(e=>({run:(t,n,r)=>{if(r)return t;function i(l){const c=l.childCount,d=l.lastChild?.childCount??0;if(c===0||d===0)return an.type(e).create();const f=l.firstChild;if(!(d>0&&f&&f.childCount===0))return l;if(c>=3){const E=l.child(1),g=[];for(let _=0;_<E.childCount;_++){const S=E.child(_);g.push(bi.type(e).create(S.attrs,S.content,S.marks))}const N=f.type.create(f.attrs,g),w=[];for(let _=2;_<c;_++)w.push(l.child(_));return l.type.create(l.attrs,[N,...w])}const p=Array(d).fill(0).map(()=>bi.type(e).createAndFill()),m=new Y(H.from(p),0,0),A=f.replace(0,0,m);return l.replace(0,f.nodeSize,new Y(H.from(A),0,0))}function u(l){const c=Si.type(e),d=[];let f=[],p=!1;function m(){if(f.length===0)return;const A=ls.type(e).createAndFill(),E=Dn.type(e).create(null,[A,...f]);d.push(i(E)),f=[]}return l.forEach(A=>{A.type===c?(p=!0,f.push(A)):(m(),d.push(A))}),m(),p?H.from(d):l}function s(l){let c=u(l),d=c!==l;const f=[];return c.forEach(p=>{if(p.type===Dn.type(e)){const m=i(p);m!==p&&(d=!0),f.push(m)}else if(p.childCount>0){const m=s(p.content);m!==p.content?(d=!0,f.push(p.copy(m))):f.push(p)}else f.push(p)}),d?H.from(f):l}function a(l){const c=[],d=[];l.forEach(f=>d.push(f));for(let f=0;f<d.length;f++){const p=d[f],m=d[f+1];p.type===an.type(e)&&p.content.size===0&&m&&m.type===Dn.type(e)||c.push(p)}return c.length<d.length?H.from(c):l}let o=s(t.content);return o=a(o),new Y(H.from(o),t.openStart,t.openEnd)}}));ee(Vg,{displayName:"PasteRule<table>",group:"Table"});var of=Ot("tableKeymap",{NextCell:{priority:100,shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(Ce);return()=>t.call(sf.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(Ce);return()=>t.call(uf.key)}},ExitTable:{shortcuts:["Mod-Enter","Enter"],command:e=>{const t=e.get(Ce);return()=>t.call(af.key)}}});ee(of.ctx,{displayName:"KeymapCtx<table>",group:"Table"});ee(of.shortcuts,{displayName:"Keymap<table>",group:"Table"});var Zo="footnote_definition",P0="footnoteDefinition",lf=ve("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`dl[data-type="${Zo}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw on(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":Zo},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===P0,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===Zo,runner:(e,t)=>{e.openNode(P0,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}}));ee(lf.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});ee(lf.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});var Xo="footnote_reference",cf=ve("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`sup[data-type="${Xo}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw on(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":Xo},t]},parseMarkdown:{match:({type:e})=>e==="footnoteReference",runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===Xo,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}}));ee(cf.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});ee(cf.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});var df=vn.extendSchema(e=>t=>{const n=e(t);return{...n,attrs:{...n.attrs,checked:{default:null,validate:"boolean|null"}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:r=>{if(!(r instanceof HTMLElement))throw on(r);return{label:r.dataset.label,listType:r.dataset.listType,spread:r.dataset.spread==="true",checked:r.dataset.checked?r.dataset.checked==="true":null}}},...n?.parseDOM||[]],toDOM:r=>n.toDOM&&r.attrs.checked==null?n.toDOM(r):["li",{"data-item-type":"task","data-label":r.attrs.label,"data-list-type":r.attrs.listType,"data-spread":r.attrs.spread,"data-checked":r.attrs.checked},0],parseMarkdown:{match:({type:r})=>r==="listItem",runner:(r,i,u)=>{if(i.checked==null){n.parseMarkdown.runner(r,i,u);return}const s=i.label!=null?`${i.label}.`:"•",a=i.checked!=null?!!i.checked:null,o=i.label!=null?"ordered":"bullet",l=i.spread??!0;r.openNode(u,{label:s,listType:o,spread:l,checked:a}),r.next(i.children),r.closeNode()}},toMarkdown:{match:r=>r.type.name==="list_item",runner:(r,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(r,i);return}const u=i.attrs.label,s=i.attrs.listType,a=i.attrs.spread,o=i.attrs.checked;r.openNode("listItem",void 0,{label:u,listType:s,spread:a,checked:o}),r.next(i.content),r.closeNode()}}}});ee(df.node,{displayName:"NodeSchema<taskListItem>",group:"ListItem"});ee(df.ctx,{displayName:"NodeSchemaCtx<taskListItem>",group:"ListItem"});var Jg=xt(()=>new mt(/^\[(?<checked>\s|x)\]\s$/,(e,t,n,r)=>{const i=e.doc.resolve(n);let u=0,s=i.node(u);for(;s&&s.type.name!=="list_item";)u--,s=i.node(u);if(!s||s.attrs.checked!=null)return null;const a=t.groups?.checked==="x",o=i.before(u),l=e.tr;return l.deleteRange(n,r).setNodeMarkup(o,void 0,{...s.attrs,checked:a}),l}));ee(Jg,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});var QS=[rf,of].flat(),YS=[Gg,Jg],qS=[_g],GS=[Vg],jg=Gt(()=>oI);ee(jg,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});var VS=Gt(()=>z6({}));ee(VS,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});var Zg=Gt(()=>$6({allowTableNodeSelection:!0}));ee(Zg,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});var ff=Rt("remarkGFM",()=>HS);ee(ff.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});ee(ff.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});var JS=new _t("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function jS(e,t){let n=0;return t.forEach((r,i,u)=>{r===e&&(n=u)}),n}function ZS(e,t){const n=e.content.findDiffStart(t.content);if(n==null)return null;const r=e.content.findDiffEnd(t.content);return r?{from:n,to:Math.max(r.b,n)}:null}var Xg=Gt(()=>new pt({key:JS,appendTransaction:(e,t,n)=>{if(t.doc===n.doc)return;const r=ZS(t.doc,n.doc);if(!r)return;let i;const u=(s,a)=>{if(s.type.name!=="table_cell")return;const o=n.doc.resolve(a),l=o.node(o.depth),c=o.node(o.depth-1).firstChild;if(!c)return;const d=jS(s,l),f=c.maybeChild(d);if(!f)return;const p=f.attrs.alignment;p!==s.attrs.alignment&&(i||(i=n.tr),i.setNodeMarkup(a,void 0,{...s.attrs,alignment:p}))};return n.doc.nodesBetween(r.from,r.to,(s,a)=>s.type.name!=="table"?!0:(n.doc.nodesBetween(a,a+s.nodeSize,u),!1)),i}}));ee(Xg,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});var XS=[Xg,jg,ff,Zg].flat(),$S=[df,Dn,ls,Si,bi,cs,lf,cf,tf,ss].flat(),e4=[sf,uf,af,vg,Lg,Pg,Fg,Hg,Ug,Wg,Qg,Yg,Kg,zg,qg,nf],SM=[$S,YS,GS,qS,QS,e4,XS].flat();const NM=`/*
51
+ * @akairos/milkdown-article-style — article typography
52
52
  *
53
53
  * Consumers:
54
54
  * - zzhub-pipeline wechat-export (Juice inlines these rules)
@@ -317,7 +317,7 @@ var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=
317
317
  .milkdown .editor blockquote {
318
318
  margin: 1.48em 0;
319
319
  padding: 0.82em 1em 0.82em 1.08em;
320
- border-left: 3px solid #c9c3c5;
320
+ border-left: 3px solid var(--wx-blockquote-border, var(--wx-brand-accent));
321
321
  border-radius: 0 5px 5px 0;
322
322
  background-color: #fbfafb;
323
323
  color: var(--wx-muted-color);
@@ -684,16 +684,16 @@ var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=
684
684
  color: var(--wx-brand-accent, #ca6093) !important;
685
685
  line-height: 1.6 !important;
686
686
  }
687
- `;var O0=Object.prototype.hasOwnProperty;function R0(e,t,n){for(n of e.keys())if(iu(n,t))return n}function iu(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&iu(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=R0(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=R0(t,i),!i)||!iu(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(O0.call(e,n)&&++r&&!O0.call(t,n)||!(n in t)||!iu(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var aS={};let lc,_g,Og,Rg,Mg=!0;typeof process<"u"&&({FORCE_COLOR:lc,NODE_DISABLE_COLORS:_g,NO_COLOR:Og,TERM:Rg}=aS||{},Mg=process.stdout&&process.stdout.isTTY);const fe={enabled:!_g&&Og==null&&Rg!=="dumb"&&(lc!=null&&lc!=="0"||Mg),reset:Ie(0,0),bold:Ie(1,22),dim:Ie(2,22),italic:Ie(3,23),underline:Ie(4,24),inverse:Ie(7,27),hidden:Ie(8,28),strikethrough:Ie(9,29),black:Ie(30,39),red:Ie(31,39),green:Ie(32,39),yellow:Ie(33,39),blue:Ie(34,39),magenta:Ie(35,39),cyan:Ie(36,39),white:Ie(37,39),gray:Ie(90,39),grey:Ie(90,39),bgBlack:Ie(40,49),bgRed:Ie(41,49),bgGreen:Ie(42,49),bgYellow:Ie(43,49),bgBlue:Ie(44,49),bgMagenta:Ie(45,49),bgCyan:Ie(46,49),bgWhite:Ie(47,49)};function M0(e,t){let n=0,r,i="",u="";for(;n<e.length;n++)r=e[n],i+=r.open,u+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return i+t+u}function oS(e,t){let n={has:e,keys:t};return n.reset=fe.reset.bind(n),n.bold=fe.bold.bind(n),n.dim=fe.dim.bind(n),n.italic=fe.italic.bind(n),n.underline=fe.underline.bind(n),n.inverse=fe.inverse.bind(n),n.hidden=fe.hidden.bind(n),n.strikethrough=fe.strikethrough.bind(n),n.black=fe.black.bind(n),n.red=fe.red.bind(n),n.green=fe.green.bind(n),n.yellow=fe.yellow.bind(n),n.blue=fe.blue.bind(n),n.magenta=fe.magenta.bind(n),n.cyan=fe.cyan.bind(n),n.white=fe.white.bind(n),n.gray=fe.gray.bind(n),n.grey=fe.grey.bind(n),n.bgBlack=fe.bgBlack.bind(n),n.bgRed=fe.bgRed.bind(n),n.bgGreen=fe.bgGreen.bind(n),n.bgYellow=fe.bgYellow.bind(n),n.bgBlue=fe.bgBlue.bind(n),n.bgMagenta=fe.bgMagenta.bind(n),n.bgCyan=fe.bgCyan.bind(n),n.bgWhite=fe.bgWhite.bind(n),n}function Ie(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:fe.enabled?M0(this.keys,r+""):r+""):r===void 0?oS([e],[n]):fe.enabled?M0([n],r+""):r+""}}function or(){}or.prototype={diff:function(t,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=i.callback;typeof i=="function"&&(u=i,i={}),this.options=i;var s=this;function a(_){return u?(setTimeout(function(){u(void 0,_)},0),!0):_}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var o=n.length,l=t.length,c=1,d=o+l;i.maxEditLength&&(d=Math.min(d,i.maxEditLength));var f=(r=i.timeout)!==null&&r!==void 0?r:1/0,p=Date.now()+f,m=[{oldPos:-1,lastComponent:void 0}],A=this.extractCommon(m[0],n,t,0);if(m[0].oldPos+1>=l&&A+1>=o)return a([{value:this.join(n),count:n.length}]);var E=-1/0,g=1/0;function N(){for(var _=Math.max(E,-c);_<=Math.min(g,c);_+=2){var S=void 0,k=m[_-1],R=m[_+1];k&&(m[_-1]=void 0);var Q=!1;if(R){var O=R.oldPos-_;Q=R&&0<=O&&O<o}var x=k&&k.oldPos+1<l;if(!Q&&!x){m[_]=void 0;continue}if(!x||Q&&k.oldPos+1<R.oldPos?S=s.addToPath(R,!0,void 0,0):S=s.addToPath(k,void 0,!0,1),A=s.extractCommon(S,n,t,_),S.oldPos+1>=l&&A+1>=o)return a(lS(s,S.lastComponent,n,t,s.useLongestToken));m[_]=S,S.oldPos+1>=l&&(g=Math.min(g,_-1)),A+1>=o&&(E=Math.max(E,_+1))}c++}if(u)(function _(){setTimeout(function(){if(c>d||Date.now()>p)return u();N()||_()},0)})();else for(;c<=d&&Date.now()<=p;){var w=N();if(w)return w}},addToPath:function(t,n,r,i){var u=t.lastComponent;return u&&u.added===n&&u.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:u.count+1,added:n,removed:r,previousComponent:u.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:u}}},extractCommon:function(t,n,r,i){for(var u=n.length,s=r.length,a=t.oldPos,o=a-i,l=0;o+1<u&&a+1<s&&this.equals(n[o+1],r[a+1]);)o++,a++,l++;return l&&(t.lastComponent={count:l,previousComponent:t.lastComponent}),t.oldPos=a,o},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function lS(e,t,n,r,i){for(var u=[],s;t;)u.push(t),s=t.previousComponent,delete t.previousComponent,t=s;u.reverse();for(var a=0,o=u.length,l=0,c=0;a<o;a++){var d=u[a];if(d.removed){if(d.value=e.join(r.slice(c,c+d.count)),c+=d.count,a&&u[a-1].added){var p=u[a-1];u[a-1]=u[a],u[a]=p}}else{if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(A,E){var g=r[c+E];return g.length>A.length?g:A}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(c+=d.count)}}var m=u[o-1];return o>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(u[o-2].value+=m.value,u.pop()),u}var B0=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,L0=/\S/,Bg=new or;Bg.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!L0.test(e)&&!L0.test(t)};Bg.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&B0.test(t[n])&&B0.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Lg=new or;Lg.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
688
- `));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var cS=new or;cS.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var dS=new or;dS.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Ls(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ls=function(t){return typeof t}:Ls=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ls(e)}var fS=Object.prototype.toString,Tu=new or;Tu.useLongestToken=!0;Tu.tokenize=Lg.tokenize;Tu.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(u,s){return typeof s>"u"?n:s}:r;return typeof e=="string"?e:JSON.stringify(cc(e,null,null,i),i," ")};Tu.equals=function(e,t){return or.prototype.equals.call(Tu,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function cc(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var u;for(u=0;u<t.length;u+=1)if(t[u]===e)return n[u];var s;if(fS.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),u=0;u<e.length;u+=1)s[u]=cc(e[u],t,n,r,i);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Ls(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var a=[],o;for(o in e)e.hasOwnProperty(o)&&a.push(o);for(a.sort(),u=0;u<a.length;u+=1)o=a[u],s[o]=cc(e[o],t,n,r,o);t.pop(),n.pop()}else s=e;return s}var dc=new or;dc.tokenize=function(e){return e.slice()};dc.join=dc.removeEmpty=function(e){return e};fe.red,fe.grey,fe.green;fe.dim().italic;fe.dim("→");fe.dim("·");fe.dim("↵");function ea(e){e=e.replace(/\r?\n/g,`
689
- `);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,i=(t||[]).length;for(;n<i;n++)r=Math.min(r,t[n].length);return i&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}class hS extends Error{constructor(t={}){super(t.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=t.details||!1,this.generated=!!t.generated,this.operator=t.operator,this.expects=t.expects,this.actual=t.actual}}function Lt(e,t,n,r,i,u,s){if(e)return;let a=s||u;if(s instanceof Error)throw s;let o=i;throw new hS({actual:t,expects:n,operator:r,message:a,details:o,generated:!s})}function pS(e,t){Lt(!!e,!1,!0,"ok",!1,"Expected value to be truthy",t)}function _n(e,t){Lt(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}_n.ok=_n;_n.equal=function(e,t,n){Lt(!iu(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};_n.type=function(e,t,n){let r=typeof e;Lt(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};_n.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";Lt(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};_n.snapshot=function(e,t,n){e=ea(e),t=ea(t),Lt(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};_n.fixture=function(e,t,n){e=ea(e),t=ea(t),Lt(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};_n.match=function(e,t,n){typeof t=="string"?Lt(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Lt(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};_n.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?Lt(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Lt(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Lt(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};const Oi={equalsTo:61},v0={attentionSideAfter:2},P0={data:"data",characterEscape:"characterEscape"};var Ri="highlightSequenceTemporary",F0="highlightSequence",mS="highlight",AS="highlightText";function gS(){const e={name:"highlight",tokenize:n,resolveAll:t};return{text:{[Oi.equalsTo]:e},insideSpan:{null:[e]},attentionMarkers:{null:[Oi.equalsTo]}};function t(r,i){let u=-1;for(;++u<r.length;)if(r[u][0]==="enter"&&r[u][1].type===Ri&&r[u][1]._close){let s=u;for(;s--;)if(r[s][0]==="exit"&&r[s][1].type===Ri&&r[s][1]._open&&r[u][1].end.offset-r[u][1].start.offset===r[s][1].end.offset-r[s][1].start.offset){r[u][1].type=F0,r[s][1].type=F0;const a={type:mS,start:Object.assign({},r[s][1].start),end:Object.assign({},r[u][1].end)},o={type:AS,start:Object.assign({},r[s][1].end),end:Object.assign({},r[u][1].start)},l=[["enter",a,i],["enter",r[s][1],i],["exit",r[s][1],i],["enter",o,i]],c=i.parser.constructs.insideSpan.null;c&&$e(l,l.length,0,Lu(c,r.slice(s+1,u),i)),$e(l,l.length,0,[["exit",o,i],["enter",r[u][1],i],["exit",r[u][1],i],["exit",a,i]]),$e(r,s-1,u-s+3,l),u=s+l.length-2;break}}for(u=-1;++u<r.length;)r[u][1].type===Ri&&(r[u][1].type=P0.data);return r}function n(r,i,u){const s=this.previous,a=this.events;let o=0;return l;function l(d){return pS(d===Oi.equalsTo,"expected `=`"),s===Oi.equalsTo&&a[a.length-1][1].type!==P0.characterEscape?u(d):(r.enter(Ri),c(d))}function c(d){const f=$n(s);if(d===Oi.equalsTo)return o>1?u(d):(r.consume(d),o++,c);if(o<2)return u(d);const p=r.exit(Ri),m=$n(d);return p._open=!m||m===v0.attentionSideAfter&&!!f,p._close=!f||f===v0.attentionSideAfter&&!!m,i(d)}}}vg.peek=xS;var bS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],ES={canContainEols:["highlight"],enter:{highlight:yS},exit:{highlight:TS}};function yS(e){this.enter({type:"highlight",children:[]},e)}function TS(e){this.exit(e)}var CS={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:bS}],handlers:{highlight:vg}};function vg(e,t,n,r){const u=n.createTracker(r),s=n.enter("highlight");let a=u.move("==");return a+=u.move(n.containerPhrasing(e,{before:a,after:"=",...u.current()})),a+=u.move("=="),s(),a}function xS(){return"="}function qo(e,t,n){var r;if(Array.isArray(n)){(r=e.fromMarkdownExtensions)!=null||(e.fromMarkdownExtensions=[]),e.fromMarkdownExtensions.push(n);return}e[t]?e[t].push(n):e[t]=[n]}const kS=function(){const t=this.data();qo(t,"micromarkExtensions",gS()),qo(t,"fromMarkdownExtensions",ES),qo(t,"toMarkdownExtensions",CS)},wS=[Ht("remarkHighlightMark",()=>kS),Mn("highlight",()=>({parseDOM:[{tag:"mark"}],toDOM:()=>["mark",0],parseMarkdown:{match:e=>e.type==="highlight",runner:(e,t,n)=>{e.openMark(n,{}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>e.type.name==="highlight",runner:(e,t)=>{e.withMark(t,"highlight")}}}))].flat(),IS={doc:{id:"highlight",name:"高亮标记 (Highlight)",category:"inline",description:"使用 ==文本== 添加荧光笔黄色高亮背景",sampleMarkdown:"这里支持 ==重要结论== 与 ==关键观点== 的高亮展示。",syntaxGuide:"==高亮文本==",cssSelectors:["mark",".milkdown .editor mark"]},milkdownPlugins:wS,defaultCss:`
687
+ `;var F0=Object.prototype.hasOwnProperty;function H0(e,t,n){for(n of e.keys())if(cu(n,t))return n}function cu(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&cu(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=H0(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=H0(t,i),!i)||!cu(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(F0.call(e,n)&&++r&&!F0.call(t,n)||!(n in t)||!cu(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var t4={};let fc,$g,eb,tb,nb=!0;typeof process<"u"&&({FORCE_COLOR:fc,NODE_DISABLE_COLORS:$g,NO_COLOR:eb,TERM:tb}=t4||{},nb=process.stdout&&process.stdout.isTTY);const fe={enabled:!$g&&eb==null&&tb!=="dumb"&&(fc!=null&&fc!=="0"||nb),reset:Se(0,0),bold:Se(1,22),dim:Se(2,22),italic:Se(3,23),underline:Se(4,24),inverse:Se(7,27),hidden:Se(8,28),strikethrough:Se(9,29),black:Se(30,39),red:Se(31,39),green:Se(32,39),yellow:Se(33,39),blue:Se(34,39),magenta:Se(35,39),cyan:Se(36,39),white:Se(37,39),gray:Se(90,39),grey:Se(90,39),bgBlack:Se(40,49),bgRed:Se(41,49),bgGreen:Se(42,49),bgYellow:Se(43,49),bgBlue:Se(44,49),bgMagenta:Se(45,49),bgCyan:Se(46,49),bgWhite:Se(47,49)};function U0(e,t){let n=0,r,i="",u="";for(;n<e.length;n++)r=e[n],i+=r.open,u+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return i+t+u}function n4(e,t){let n={has:e,keys:t};return n.reset=fe.reset.bind(n),n.bold=fe.bold.bind(n),n.dim=fe.dim.bind(n),n.italic=fe.italic.bind(n),n.underline=fe.underline.bind(n),n.inverse=fe.inverse.bind(n),n.hidden=fe.hidden.bind(n),n.strikethrough=fe.strikethrough.bind(n),n.black=fe.black.bind(n),n.red=fe.red.bind(n),n.green=fe.green.bind(n),n.yellow=fe.yellow.bind(n),n.blue=fe.blue.bind(n),n.magenta=fe.magenta.bind(n),n.cyan=fe.cyan.bind(n),n.white=fe.white.bind(n),n.gray=fe.gray.bind(n),n.grey=fe.grey.bind(n),n.bgBlack=fe.bgBlack.bind(n),n.bgRed=fe.bgRed.bind(n),n.bgGreen=fe.bgGreen.bind(n),n.bgYellow=fe.bgYellow.bind(n),n.bgBlue=fe.bgBlue.bind(n),n.bgMagenta=fe.bgMagenta.bind(n),n.bgCyan=fe.bgCyan.bind(n),n.bgWhite=fe.bgWhite.bind(n),n}function Se(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:fe.enabled?U0(this.keys,r+""):r+""):r===void 0?n4([e],[n]):fe.enabled?U0([n],r+""):r+""}}function dr(){}dr.prototype={diff:function(t,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=i.callback;typeof i=="function"&&(u=i,i={}),this.options=i;var s=this;function a(_){return u?(setTimeout(function(){u(void 0,_)},0),!0):_}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var o=n.length,l=t.length,c=1,d=o+l;i.maxEditLength&&(d=Math.min(d,i.maxEditLength));var f=(r=i.timeout)!==null&&r!==void 0?r:1/0,p=Date.now()+f,m=[{oldPos:-1,lastComponent:void 0}],A=this.extractCommon(m[0],n,t,0);if(m[0].oldPos+1>=l&&A+1>=o)return a([{value:this.join(n),count:n.length}]);var E=-1/0,g=1/0;function N(){for(var _=Math.max(E,-c);_<=Math.min(g,c);_+=2){var S=void 0,x=m[_-1],O=m[_+1];x&&(m[_-1]=void 0);var z=!1;if(O){var R=O.oldPos-_;z=O&&0<=R&&R<o}var k=x&&x.oldPos+1<l;if(!z&&!k){m[_]=void 0;continue}if(!k||z&&x.oldPos+1<O.oldPos?S=s.addToPath(O,!0,void 0,0):S=s.addToPath(x,void 0,!0,1),A=s.extractCommon(S,n,t,_),S.oldPos+1>=l&&A+1>=o)return a(r4(s,S.lastComponent,n,t,s.useLongestToken));m[_]=S,S.oldPos+1>=l&&(g=Math.min(g,_-1)),A+1>=o&&(E=Math.max(E,_+1))}c++}if(u)(function _(){setTimeout(function(){if(c>d||Date.now()>p)return u();N()||_()},0)})();else for(;c<=d&&Date.now()<=p;){var w=N();if(w)return w}},addToPath:function(t,n,r,i){var u=t.lastComponent;return u&&u.added===n&&u.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:u.count+1,added:n,removed:r,previousComponent:u.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:u}}},extractCommon:function(t,n,r,i){for(var u=n.length,s=r.length,a=t.oldPos,o=a-i,l=0;o+1<u&&a+1<s&&this.equals(n[o+1],r[a+1]);)o++,a++,l++;return l&&(t.lastComponent={count:l,previousComponent:t.lastComponent}),t.oldPos=a,o},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function r4(e,t,n,r,i){for(var u=[],s;t;)u.push(t),s=t.previousComponent,delete t.previousComponent,t=s;u.reverse();for(var a=0,o=u.length,l=0,c=0;a<o;a++){var d=u[a];if(d.removed){if(d.value=e.join(r.slice(c,c+d.count)),c+=d.count,a&&u[a-1].added){var p=u[a-1];u[a-1]=u[a],u[a]=p}}else{if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(A,E){var g=r[c+E];return g.length>A.length?g:A}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(c+=d.count)}}var m=u[o-1];return o>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(u[o-2].value+=m.value,u.pop()),u}var W0=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,K0=/\S/,rb=new dr;rb.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!K0.test(e)&&!K0.test(t)};rb.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&W0.test(t[n])&&W0.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var ib=new dr;ib.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
688
+ `));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var i4=new dr;i4.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var u4=new dr;u4.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Vs(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(t){return typeof t}:Vs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}var s4=Object.prototype.toString,Du=new dr;Du.useLongestToken=!0;Du.tokenize=ib.tokenize;Du.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(u,s){return typeof s>"u"?n:s}:r;return typeof e=="string"?e:JSON.stringify(hc(e,null,null,i),i," ")};Du.equals=function(e,t){return dr.prototype.equals.call(Du,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function hc(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var u;for(u=0;u<t.length;u+=1)if(t[u]===e)return n[u];var s;if(s4.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),u=0;u<e.length;u+=1)s[u]=hc(e[u],t,n,r,i);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Vs(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var a=[],o;for(o in e)e.hasOwnProperty(o)&&a.push(o);for(a.sort(),u=0;u<a.length;u+=1)o=a[u],s[o]=hc(e[o],t,n,r,o);t.pop(),n.pop()}else s=e;return s}var pc=new dr;pc.tokenize=function(e){return e.slice()};pc.join=pc.removeEmpty=function(e){return e};fe.red,fe.grey,fe.green;fe.dim().italic;fe.dim("→");fe.dim("·");fe.dim("↵");function Aa(e){e=e.replace(/\r?\n/g,`
689
+ `);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,i=(t||[]).length;for(;n<i;n++)r=Math.min(r,t[n].length);return i&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}class a4 extends Error{constructor(t={}){super(t.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=t.details||!1,this.generated=!!t.generated,this.operator=t.operator,this.expects=t.expects,this.actual=t.actual}}function Ht(e,t,n,r,i,u,s){if(e)return;let a=s||u;if(s instanceof Error)throw s;let o=i;throw new a4({actual:t,expects:n,operator:r,message:a,details:o,generated:!s})}function o4(e,t){Ht(!!e,!1,!0,"ok",!1,"Expected value to be truthy",t)}function On(e,t){Ht(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}On.ok=On;On.equal=function(e,t,n){Ht(!cu(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};On.type=function(e,t,n){let r=typeof e;Ht(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};On.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";Ht(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};On.snapshot=function(e,t,n){e=Aa(e),t=Aa(t),Ht(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};On.fixture=function(e,t,n){e=Aa(e),t=Aa(t),Ht(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};On.match=function(e,t,n){typeof t=="string"?Ht(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Ht(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};On.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?Ht(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Ht(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Ht(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};const Pi={equalsTo:61},z0={attentionSideAfter:2},Q0={data:"data",characterEscape:"characterEscape"};var Fi="highlightSequenceTemporary",Y0="highlightSequence",l4="highlight",c4="highlightText";function d4(){const e={name:"highlight",tokenize:n,resolveAll:t};return{text:{[Pi.equalsTo]:e},insideSpan:{null:[e]},attentionMarkers:{null:[Pi.equalsTo]}};function t(r,i){let u=-1;for(;++u<r.length;)if(r[u][0]==="enter"&&r[u][1].type===Fi&&r[u][1]._close){let s=u;for(;s--;)if(r[s][0]==="exit"&&r[s][1].type===Fi&&r[s][1]._open&&r[u][1].end.offset-r[u][1].start.offset===r[s][1].end.offset-r[s][1].start.offset){r[u][1].type=Y0,r[s][1].type=Y0;const a={type:l4,start:Object.assign({},r[s][1].start),end:Object.assign({},r[u][1].end)},o={type:c4,start:Object.assign({},r[s][1].end),end:Object.assign({},r[u][1].start)},l=[["enter",a,i],["enter",r[s][1],i],["exit",r[s][1],i],["enter",o,i]],c=i.parser.constructs.insideSpan.null;c&&et(l,l.length,0,Gu(c,r.slice(s+1,u),i)),et(l,l.length,0,[["exit",o,i],["enter",r[u][1],i],["exit",r[u][1],i],["exit",a,i]]),et(r,s-1,u-s+3,l),u=s+l.length-2;break}}for(u=-1;++u<r.length;)r[u][1].type===Fi&&(r[u][1].type=Q0.data);return r}function n(r,i,u){const s=this.previous,a=this.events;let o=0;return l;function l(d){return o4(d===Pi.equalsTo,"expected `=`"),s===Pi.equalsTo&&a[a.length-1][1].type!==Q0.characterEscape?u(d):(r.enter(Fi),c(d))}function c(d){const f=tr(s);if(d===Pi.equalsTo)return o>1?u(d):(r.consume(d),o++,c);if(o<2)return u(d);const p=r.exit(Fi),m=tr(d);return p._open=!m||m===z0.attentionSideAfter&&!!f,p._close=!f||f===z0.attentionSideAfter&&!!m,i(d)}}}ub.peek=g4;var f4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],h4={canContainEols:["highlight"],enter:{highlight:p4},exit:{highlight:m4}};function p4(e){this.enter({type:"highlight",children:[]},e)}function m4(e){this.exit(e)}var A4={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:f4}],handlers:{highlight:ub}};function ub(e,t,n,r){const u=n.createTracker(r),s=n.enter("highlight");let a=u.move("==");return a+=u.move(n.containerPhrasing(e,{before:a,after:"=",...u.current()})),a+=u.move("=="),s(),a}function g4(){return"="}function $o(e,t,n){var r;if(Array.isArray(n)){(r=e.fromMarkdownExtensions)!=null||(e.fromMarkdownExtensions=[]),e.fromMarkdownExtensions.push(n);return}e[t]?e[t].push(n):e[t]=[n]}const b4=function(){const t=this.data();$o(t,"micromarkExtensions",d4()),$o(t,"fromMarkdownExtensions",h4),$o(t,"toMarkdownExtensions",A4)},E4=[Rt("remarkHighlightMark",()=>b4),Bn("highlight",()=>({parseDOM:[{tag:"mark"}],toDOM:()=>["mark",0],parseMarkdown:{match:e=>e.type==="highlight",runner:(e,t,n)=>{e.openMark(n,{}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>e.type.name==="highlight",runner:(e,t)=>{e.withMark(t,"highlight")}}}))].flat(),y4={doc:{id:"highlight",name:"高亮标记 (Highlight)",category:"inline",description:"使用 ==文本== 添加荧光笔黄色高亮背景",sampleMarkdown:"这里支持 ==重要结论== 与 ==关键观点== 的高亮展示。",syntaxGuide:"==高亮文本==",cssSelectors:["mark",".milkdown .editor mark"]},milkdownPlugins:E4,defaultCss:`
690
690
  .milkdown .editor mark {
691
691
  background-color: #fff0a8;
692
692
  color: inherit;
693
693
  padding: 1px 3px;
694
694
  border-radius: 2px;
695
695
  }
696
- `.trim()},As={note:{title:"提示",icon:"💡",borderColor:"#3b82f6",bgColor:"rgba(59, 130, 246, 0.08)",textColor:"#1d4ed8"},tip:{title:"建议",icon:"✨",borderColor:"#10b981",bgColor:"rgba(16, 185, 129, 0.08)",textColor:"#047857"},important:{title:"重点",icon:"📌",borderColor:"#8b5cf6",bgColor:"rgba(139, 92, 246, 0.08)",textColor:"#6d28d9"},warning:{title:"警告",icon:"⚠️",borderColor:"#f59e0b",bgColor:"rgba(245, 158, 11, 0.08)",textColor:"#b45309"},caution:{title:"注意",icon:"🛑",borderColor:"#ef4444",bgColor:"rgba(239, 68, 68, 0.08)",textColor:"#b91c1c"}};function SS(){return e=>{function t(n){if(!(!n||typeof n!="object")){if(n.type==="blockquote"&&Array.isArray(n.children)&&n.children.length>0){const r=n.children[0];if(r&&r.type==="paragraph"&&Array.isArray(r.children)&&r.children.length>0){const i=r.children[0];if(i&&i.type==="text"&&typeof i.value=="string"){const u=i.value.match(/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\](?:[ \t]+([^\r\n]+))?(?:\r?\n|$)/i);if(u){const s=u[1].toLowerCase(),a=u[2]?u[2].trim():"";i.value=i.value.slice(u[0].length),!i.value.trim()&&r.children.length>1?r.children.shift():!i.value.trim()&&r.children.length===1&&n.children.shift(),n.type="callout",n.calloutType=s,n.customTitle=a}}}}if(Array.isArray(n.children))for(const r of n.children)t(r)}}t(e)}}const NS=[Ht("remarkCallout",()=>SS),Be("callout",()=>({content:"block+",group:"block",defining:!0,attrs:{type:{default:"note"},title:{default:""}},parseDOM:[{tag:"section[data-wechat-node='callout']",getAttrs:e=>({type:e.getAttribute("data-callout-type")||"note",title:e.getAttribute("data-callout-title")||""})}],toDOM:e=>["section",{class:`wechat-callout wechat-callout-${e.attrs.type}`,"data-wechat-node":"callout","data-callout-type":e.attrs.type,...e.attrs.title?{"data-callout-title":e.attrs.title}:{}},0],parseMarkdown:{match:e=>e.type==="callout",runner:(e,t,n)=>{e.openNode(n,{type:t.calloutType||"note",title:t.customTitle||""}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="callout",runner:(e,t)=>{e.openNode("blockquote"),e.next(t.content),e.closeNode()}}}))].flat(),DS={kind:"callout",selector:'section[data-wechat-node="callout"]',prepare(e,t){const n=e.getAttribute("data-callout-type")||"note",r=e.getAttribute("data-callout-title"),i=t.structure?.calloutPresets?.[n],s={...As[n]||As.note,...i};let a=s.icon,o=s.title;if(r&&r.trim()){const f=r.trim(),p=f.match(new RegExp("^((?:(?:\\p{Extended_Pictographic}|\\p{Emoji_Presentation})\\uFE0F?)+)\\s*(.*)$","u"));p?(a=p[1],o=p[2].trim()||s.title):o=f}const l=t.document.createElement("section");l.className="wechat-callout-header",l.setAttribute("data-wechat-node","callout-header"),l.style&&(l.style.color=s.textColor,l.style.fontSize="14px",l.style.fontWeight="bold",l.style.marginBottom="6px",l.style.lineHeight="1.4");const c=t.document.createElement("span");c.className="wechat-callout-icon",c.textContent=a,l.appendChild(c);const d=t.document.createElement("strong");d.className="wechat-callout-title",d.style&&(d.style.color=s.textColor,d.style.fontSize="14px",d.style.fontWeight="bold",d.style.display="inline-block",d.style.verticalAlign="middle"),d.textContent=o,l.appendChild(d),e.prepend(l)},finalize(e){const t=e.getAttribute("data-callout-type")||"note",n=As[t]||As.note;e.style&&(e.style.borderLeftColor=n.borderColor,e.style.backgroundColor=n.bgColor)}},_S={doc:{id:"callout",name:"提示卡片 (Callout)",category:"block",description:"使用 GFM 规范语法 (> [!NOTE]) 生成带左侧边框与图标的微信高亮卡片",sampleMarkdown:`> [!NOTE]
696
+ `.trim()};function sb(e){return t=>{const n=t.type.spec.toDOM(t),{dom:r,contentDOM:i}=ar.renderSpec(document,[n[0],n[1],["section",{"data-article-content":""},0]]),u=r;return e.prepare?.(u,{document}),u.firstElementChild?.setAttribute("contenteditable","false"),{dom:u,contentDOM:i,update:s=>s.type===t.type&&s.attrs.type===t.attrs.type&&s.attrs.title===t.attrs.title,ignoreMutation:s=>s.type!=="selection"&&!i.contains(s.target)}}}const Ns={note:{title:"提示",icon:"💡",borderColor:"#3b82f6",bgColor:"rgba(59, 130, 246, 0.08)",textColor:"#1d4ed8"},tip:{title:"建议",icon:"✨",borderColor:"#10b981",bgColor:"rgba(16, 185, 129, 0.08)",textColor:"#047857"},important:{title:"重点",icon:"📌",borderColor:"#8b5cf6",bgColor:"rgba(139, 92, 246, 0.08)",textColor:"#6d28d9"},warning:{title:"警告",icon:"⚠️",borderColor:"#f59e0b",bgColor:"rgba(245, 158, 11, 0.08)",textColor:"#b45309"},caution:{title:"注意",icon:"🛑",borderColor:"#ef4444",bgColor:"rgba(239, 68, 68, 0.08)",textColor:"#b91c1c"}};function T4(){return e=>{function t(n){if(!(!n||typeof n!="object")){if(n.type==="blockquote"&&Array.isArray(n.children)&&n.children.length>0){const r=n.children[0];if(r&&r.type==="paragraph"&&Array.isArray(r.children)&&r.children.length>0){const i=r.children[0];if(i&&i.type==="text"&&typeof i.value=="string"){const u=i.value.match(/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\](?:[ \t]+([^\r\n]+))?(?:\r?\n|$)/i);if(u){const s=u[1].toLowerCase(),a=u[2]?u[2].trim():"";i.value=i.value.slice(u[0].length),!i.value.trim()&&r.children.length>1?r.children.shift():!i.value.trim()&&r.children.length===1&&n.children.shift(),n.type="callout",n.calloutType=s,n.customTitle=a}}}}if(Array.isArray(n.children))for(const r of n.children)t(r)}}t(e)}}const q0=ve("callout",()=>({content:"block+",group:"block",defining:!0,attrs:{type:{default:"note"},title:{default:""}},parseDOM:[{tag:"section[data-wechat-node='callout']",contentElement:e=>e.querySelector("[data-article-content]")||e,getAttrs:e=>({type:e.getAttribute("data-callout-type")||"note",title:e.getAttribute("data-callout-title")||""})}],toDOM:e=>["section",{class:`wechat-callout wechat-callout-${e.attrs.type}`,"data-wechat-node":"callout","data-callout-type":e.attrs.type,...e.attrs.title?{"data-callout-title":e.attrs.title}:{}},0],parseMarkdown:{match:e=>e.type==="callout",runner:(e,t,n)=>{e.openNode(n,{type:t.calloutType||"note",title:t.customTitle||""}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="callout",runner:(e,t)=>{e.openNode("callout",void 0,{calloutType:t.attrs.type,customTitle:t.attrs.title}),e.next(t.content),e.closeNode()}}})),C4=[Rt("remarkCallout",()=>T4),q0,vA(q0.node,()=>sb(ab))].flat(),ab={kind:"callout",selector:'section[data-wechat-node="callout"]',prepare(e,t){const n=e.getAttribute("data-callout-type")||"note",r=e.getAttribute("data-callout-title"),i=t.structure?.calloutPresets?.[n],s={...Ns[n]||Ns.note,...i};let a=s.icon,o=s.title;if(r&&r.trim()){const f=r.trim(),p=f.match(new RegExp("^((?:(?:\\p{Extended_Pictographic}|\\p{Emoji_Presentation})\\uFE0F?)+)\\s*(.*)$","u"));p?(a=p[1],o=p[2].trim()||s.title):o=f}const l=t.document.createElement("section");l.className="wechat-callout-header",l.setAttribute("data-wechat-node","callout-header"),l.style&&(l.style.color=s.textColor,l.style.fontSize="14px",l.style.fontWeight="bold",l.style.marginBottom="6px",l.style.lineHeight="1.4");const c=t.document.createElement("span");c.className="wechat-callout-icon",c.textContent=a,l.appendChild(c);const d=t.document.createElement("strong");d.className="wechat-callout-title",d.style&&(d.style.color=s.textColor,d.style.fontSize="14px",d.style.fontWeight="bold",d.style.display="inline-block",d.style.verticalAlign="middle"),d.textContent=o,l.appendChild(d),e.prepend(l)},finalize(e){const t=e.getAttribute("data-callout-type")||"note",n=Ns[t]||Ns.note;e.style&&(e.style.borderLeftColor=n.borderColor,e.style.backgroundColor=n.bgColor)}},k4={doc:{id:"callout",name:"提示卡片 (Callout)",category:"block",description:"使用 GFM 规范语法 (> [!NOTE]) 生成带左侧边框与图标的微信高亮卡片",sampleMarkdown:`> [!NOTE]
697
697
  > 这里是一条标准提示,适用于操作备忘。
698
698
 
699
699
  > [!TIP] 实用技巧
@@ -701,7 +701,7 @@ var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=
701
701
 
702
702
  > [!WARNING] ⚠️ 重点防护
703
703
  > 这是带自定义 Emoji 与标题的警告卡片。`,syntaxGuide:`> [!NOTE] 自定义标题 (可选,可包含 Emoji)
704
- > 提示内容...`,cssSelectors:['section[data-wechat-node="callout"]',".wechat-callout",".wechat-callout-note",".wechat-callout-tip",".wechat-callout-warning"]},milkdownPlugins:NS,wechatRenderer:DS,defaultCss:`
704
+ > 提示内容...`,cssSelectors:['section[data-wechat-node="callout"]',".wechat-callout",".wechat-callout-note",".wechat-callout-tip",".wechat-callout-warning"]},milkdownPlugins:C4,wechatRenderer:ab,defaultCss:`
705
705
  .milkdown .editor section[data-wechat-node="callout"],
706
706
  .milkdown .editor .wechat-callout {
707
707
  margin: 1.2em 0;
@@ -750,7 +750,7 @@ var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=
750
750
  font-size: 15px;
751
751
  line-height: 1.7;
752
752
  }
753
- `.trim()};function OS(){return e=>{function t(n){if(!(!n||typeof n!="object")){if((n.type==="paragraph"||n.type==="listItem"||n.type==="heading")&&Array.isArray(n.children)){const r=[];for(const i of n.children){if(i.type==="text"&&typeof i.value=="string"){const u=/\[\[kbd:([^\]]+)\]\]/g;let s=0,a,o=!1;for(;(a=u.exec(i.value))!==null;)o=!0,a.index>s&&r.push({type:"text",value:i.value.slice(s,a.index)}),r.push({type:"kbd",children:[{type:"text",value:a[1]}]}),s=u.lastIndex;if(o){s<i.value.length&&r.push({type:"text",value:i.value.slice(s)});continue}}r.push(i)}n.children=r}if(Array.isArray(n.children))for(const r of n.children)t(r)}}t(e)}}const RS=[Ht("remarkKbd",()=>OS),Mn("kbd",()=>({parseDOM:[{tag:"kbd"},{tag:"span[data-wechat-node='kbd']"}],toDOM:()=>["span",{class:"wechat-kbd","data-wechat-node":"kbd"},0],parseMarkdown:{match:e=>e.type==="kbd",runner:(e,t,n)=>{e.openMark(n,{}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>e.type.name==="kbd",runner:(e,t)=>{e.withMark(t,"kbd")}}}))].flat(),MS={kind:"kbd",selector:'span[data-wechat-node="kbd"], kbd',finalize(e){if(e.tagName.toLowerCase()==="kbd"){const t=e.ownerDocument.createElement("span");for(const n of Array.from(e.attributes))t.setAttribute(n.name,n.value);for(;e.firstChild;)t.appendChild(e.firstChild);e.replaceWith(t)}}},BS={doc:{id:"kbd",name:"按键标记 (Keyboard Key)",category:"inline",description:"使用 [[kbd:按键]] 输出带轻拟物阴影的键盘按键胶囊",sampleMarkdown:"按下快捷键 [[kbd:Cmd]] + [[kbd:K]] 快速唤起全局指令台。",syntaxGuide:"[[kbd:按键名称]]",cssSelectors:['span[data-wechat-node="kbd"]',".wechat-kbd"]},milkdownPlugins:RS,wechatRenderer:MS,defaultCss:`
753
+ `.trim()};function x4(){return e=>{function t(n){if(!(!n||typeof n!="object")){if((n.type==="paragraph"||n.type==="listItem"||n.type==="heading")&&Array.isArray(n.children)){const r=[];for(const i of n.children){if(i.type==="text"&&typeof i.value=="string"){const u=/\[\[kbd:([^\]]+)\]\]/g;let s=0,a,o=!1;for(;(a=u.exec(i.value))!==null;)o=!0,a.index>s&&r.push({type:"text",value:i.value.slice(s,a.index)}),r.push({type:"kbd",children:[{type:"text",value:a[1]}]}),s=u.lastIndex;if(o){s<i.value.length&&r.push({type:"text",value:i.value.slice(s)});continue}}r.push(i)}n.children=r}if(Array.isArray(n.children))for(const r of n.children)t(r)}}t(e)}}const w4=[Rt("remarkKbd",()=>x4),Bn("kbd",()=>({inclusive:!1,parseDOM:[{tag:"kbd"},{tag:"span[data-wechat-node='kbd']"}],toDOM:()=>["span",{class:"wechat-kbd","data-wechat-node":"kbd"},0],parseMarkdown:{match:e=>e.type==="kbd",runner:(e,t,n)=>{e.openMark(n,{}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>e.type.name==="kbd",runner:(e,t)=>{e.withMark(t,"kbd")}}}))].flat(),I4={kind:"kbd",selector:'span[data-wechat-node="kbd"], kbd',finalize(e){if(e.tagName.toLowerCase()==="kbd"){const t=e.ownerDocument.createElement("span");for(const n of Array.from(e.attributes))t.setAttribute(n.name,n.value);for(;e.firstChild;)t.appendChild(e.firstChild);e.replaceWith(t)}}},S4={doc:{id:"kbd",name:"按键标记 (Keyboard Key)",category:"inline",description:"使用 [[kbd:按键]] 输出带轻拟物阴影的键盘按键胶囊",sampleMarkdown:"按下快捷键 [[kbd:Cmd]] + [[kbd:K]] 快速唤起全局指令台。",syntaxGuide:"[[kbd:按键名称]]",cssSelectors:['span[data-wechat-node="kbd"]',".wechat-kbd"]},milkdownPlugins:w4,wechatRenderer:I4,defaultCss:`
754
754
  .milkdown .editor .wechat-kbd,
755
755
  .milkdown .editor span[data-wechat-node="kbd"] {
756
756
  display: inline-block;
@@ -766,7 +766,7 @@ var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=
766
766
  margin: 0 2px;
767
767
  box-sizing: border-box;
768
768
  }
769
- `.trim()};function LS(){return e=>{function t(n){if(!(!n||typeof n!="object")){if((n.type==="paragraph"||n.type==="listItem"||n.type==="heading")&&Array.isArray(n.children)){const r=[];for(const i of n.children){if(i.type==="text"&&typeof i.value=="string"){const u=/\[badge:(brand|success|warning|danger|info)\|([^\]]+)\]/gi;let s=0,a,o=!1;for(;(a=u.exec(i.value))!==null;){o=!0,a.index>s&&r.push({type:"text",value:i.value.slice(s,a.index)});const l=a[1].toLowerCase(),c=a[2];r.push({type:"badge",badgeType:l,children:[{type:"text",value:c}]}),s=u.lastIndex}if(o){s<i.value.length&&r.push({type:"text",value:i.value.slice(s)});continue}}r.push(i)}n.children=r}if(Array.isArray(n.children))for(const r of n.children)t(r)}}t(e)}}const vS=[Ht("remarkBadge",()=>LS),Mn("badge",()=>({attrs:{type:{default:"brand"}},parseDOM:[{tag:"span[data-wechat-node='badge']",getAttrs:e=>({type:e.getAttribute("data-badge-type")||"brand"})}],toDOM:e=>["span",{class:`wechat-badge wechat-badge-${e.attrs.type}`,"data-wechat-node":"badge","data-badge-type":e.attrs.type},0],parseMarkdown:{match:e=>e.type==="badge",runner:(e,t,n)=>{e.openMark(n,{type:t.badgeType||"brand"}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>e.type.name==="badge",runner:(e,t)=>{e.withMark(t,"badge")}}}))].flat(),PS={kind:"badge",selector:'span[data-wechat-node="badge"]'},FS={doc:{id:"badge",name:"状态徽章 (Badge)",category:"inline",description:"使用 [badge:类型|文字] 插入圆角状态胶囊标签(支持 brand/success/warning/danger/info)",sampleMarkdown:"当前服务状态:[badge:success|运行正常],新版特性:[badge:brand|重点推荐]!",syntaxGuide:"[badge:类型|标签文字]",cssSelectors:['span[data-wechat-node="badge"]',".wechat-badge"]},milkdownPlugins:vS,wechatRenderer:PS,defaultCss:`
769
+ `.trim()};function N4(){return e=>{function t(n){if(!(!n||typeof n!="object")){if((n.type==="paragraph"||n.type==="listItem"||n.type==="heading")&&Array.isArray(n.children)){const r=[];for(const i of n.children){if(i.type==="text"&&typeof i.value=="string"){const u=/\[badge:(brand|success|warning|danger|info)\|([^\]]+)\]/gi;let s=0,a,o=!1;for(;(a=u.exec(i.value))!==null;){o=!0,a.index>s&&r.push({type:"text",value:i.value.slice(s,a.index)});const l=a[1].toLowerCase(),c=a[2];r.push({type:"badge",badgeType:l,children:[{type:"text",value:c}]}),s=u.lastIndex}if(o){s<i.value.length&&r.push({type:"text",value:i.value.slice(s)});continue}}r.push(i)}n.children=r}if(Array.isArray(n.children))for(const r of n.children)t(r)}}t(e)}}const D4=[Rt("remarkBadge",()=>N4),Bn("badge",()=>({inclusive:!1,attrs:{type:{default:"brand"}},parseDOM:[{tag:"span[data-wechat-node='badge']",getAttrs:e=>({type:e.getAttribute("data-badge-type")||"brand"})}],toDOM:e=>["span",{class:`wechat-badge wechat-badge-${e.attrs.type}`,"data-wechat-node":"badge","data-badge-type":e.attrs.type},0],parseMarkdown:{match:e=>e.type==="badge",runner:(e,t,n)=>{e.openMark(n,{type:t.badgeType||"brand"}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>e.type.name==="badge",runner:(e,t)=>{e.withMark(t,"badge",void 0,{badgeType:t.attrs.type})}}}))].flat(),_4={kind:"badge",selector:'span[data-wechat-node="badge"]'},O4={doc:{id:"badge",name:"状态徽章 (Badge)",category:"inline",description:"使用 [badge:类型|文字] 插入圆角状态胶囊标签(支持 brand/success/warning/danger/info)",sampleMarkdown:"当前服务状态:[badge:success|运行正常],新版特性:[badge:brand|重点推荐]!",syntaxGuide:"[badge:类型|标签文字]",cssSelectors:['span[data-wechat-node="badge"]',".wechat-badge"]},milkdownPlugins:D4,wechatRenderer:_4,defaultCss:`
770
770
  .milkdown .editor .wechat-badge,
771
771
  .milkdown .editor span[data-wechat-node="badge"] {
772
772
  display: inline-block;
@@ -799,7 +799,7 @@ var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=
799
799
  background-color: #eff6ff;
800
800
  color: #1d4ed8;
801
801
  }
802
- `.trim()};function HS(e){const t=e.trim();return/^(?:\*{0,2}(?:文\s*[/::]|作者[::]|By\s+|执笔[::]|策划[::]|编辑[::])|预计阅读|阅读需|字数[::]|共\s*\d+\s*字)/i.test(t)}function US(e){const t=e.trim();return/(?:欢迎关注|关注公众号|星标|不错过|点击右下角|扫码关注|关注我们|回复「)/i.test(t)}function WS(){return e=>{function t(n){if(!(!n||typeof n!="object")){if(n.type==="blockquote"&&Array.isArray(n.children)&&n.children.length>0){const r=n.children[0];if(r&&r.type==="paragraph"&&Array.isArray(r.children)&&r.children.length>0){const i=r.children[0];if(i&&i.type==="text"&&typeof i.value=="string"){const u=i.value.match(/^\[!(INTRO|PREFACE|CTA|OUTRO)\](?:[ \t]+([^\r\n]+))?(?:\r?\n|$)/i);if(u){const s=u[1].toUpperCase();let a="intro";(s==="CTA"||s==="OUTRO")&&(a="cta");const o=u[2]?u[2].trim():"";i.value=i.value.slice(u[0].length),!i.value.trim()&&r.children.length>1?r.children.shift():!i.value.trim()&&r.children.length===1&&n.children.shift(),n.type="articleCard",n.cardType=a,n.customTitle=o}}}}if(Array.isArray(n.children))for(const r of n.children)t(r)}}t(e)}}const KS=[Ht("remarkArticleCards",()=>WS),Be("articleCard",()=>({content:"block+",group:"block",defining:!0,attrs:{type:{default:"intro"},title:{default:""}},parseDOM:[{tag:"section[data-wechat-node='article-card']",getAttrs:e=>({type:e.getAttribute("data-card-type")||"intro",title:e.getAttribute("data-card-title")||""})}],toDOM:e=>["section",{class:`wechat-article-card wechat-article-card-${e.attrs.type}`,"data-wechat-node":"article-card","data-card-type":e.attrs.type,...e.attrs.title?{"data-card-title":e.attrs.title}:{}},0],parseMarkdown:{match:e=>e.type==="articleCard",runner:(e,t,n)=>{e.openNode(n,{type:t.cardType||"intro",title:t.customTitle||""}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="articleCard",runner:(e,t)=>{e.openNode("blockquote"),e.next(t.content),e.closeNode()}}}))].flat(),QS={kind:"article-card",selector:'section[data-wechat-node="article-card"]',prepare(e,t){const n=e.getAttribute("data-card-type")||"intro",r=e.getAttribute("data-card-title")||"";if(n==="intro"){const i=t.document.createElement("section");i.className="wechat-card-eyebrow",i.setAttribute("data-wechat-node","card-eyebrow");const u=t.document.createElement("span");u.className="wechat-card-eyebrow-badge",u.setAttribute("data-wechat-node","card-eyebrow-badge");const s=t.document.createElement("span");s.className="wechat-card-eyebrow-icon",s.textContent="📖",u.appendChild(s);const a=t.document.createElement("span");a.className="wechat-card-eyebrow-label",a.textContent=r.trim()||"导读 · READING GUIDE",u.appendChild(a),i.appendChild(u),e.prepend(i);const o=Array.from(e.querySelectorAll("p"));for(const l of o){const c=l.textContent?.trim()||"";HS(c)?(l.className=(l.className?l.className+" ":"")+"wechat-intro-meta",l.setAttribute("data-wechat-node","intro-meta")):US(c)&&(l.className=(l.className?l.className+" ":"")+"wechat-intro-guide",l.setAttribute("data-wechat-node","intro-guide"))}return}if(n==="cta"){const i=t.document.createElement("section");i.className="wechat-card-eyebrow",i.setAttribute("data-wechat-node","card-eyebrow");const u=t.document.createElement("span");u.className="wechat-card-eyebrow-badge",u.setAttribute("data-wechat-node","card-eyebrow-badge");const s=t.document.createElement("span");s.className="wechat-card-eyebrow-icon",s.textContent="✨",u.appendChild(s);const a=t.document.createElement("span");a.className="wechat-card-eyebrow-label",a.textContent=r.trim()||"互动交流 · CONNECT",u.appendChild(a),i.appendChild(u),e.prepend(i)}}},zS={doc:{id:"article-card",name:"篇章结构卡片 (Article Card)",category:"block",description:"专为文章开头的精修导读卡 (> [!INTRO]) 和结尾互动号召 (> [!CTA]) 设计的高级结构化卡片,去引用化设计,支持悬挂作者与元信息条、引导关注及精致小字排版",sampleMarkdown:`> [!INTRO] 导读
802
+ `.trim()};function R4(e){const t=e.trim();return/^(?:\*{0,2}(?:文\s*[/::]|作者[::]|By\s+|执笔[::]|策划[::]|编辑[::])|预计阅读|阅读需|字数[::]|共\s*\d+\s*字)/i.test(t)}function M4(e){const t=e.trim();return/(?:欢迎关注|关注公众号|星标|不错过|点击右下角|扫码关注|关注我们|回复「)/i.test(t)}function B4(){return e=>{function t(n){if(!(!n||typeof n!="object")){if(n.type==="blockquote"&&Array.isArray(n.children)&&n.children.length>0){const r=n.children[0];if(r&&r.type==="paragraph"&&Array.isArray(r.children)&&r.children.length>0){const i=r.children[0];if(i&&i.type==="text"&&typeof i.value=="string"){const u=i.value.match(/^\[!(INTRO|PREFACE|CTA|OUTRO)\](?:[ \t]+([^\r\n]+))?(?:\r?\n|$)/i);if(u){const s=u[1].toUpperCase();let a="intro";(s==="CTA"||s==="OUTRO")&&(a="cta");const o=u[2]?u[2].trim():"";i.value=i.value.slice(u[0].length),!i.value.trim()&&r.children.length>1?r.children.shift():!i.value.trim()&&r.children.length===1&&n.children.shift(),n.type="articleCard",n.cardType=a,n.customTitle=o}}}}if(Array.isArray(n.children))for(const r of n.children)t(r)}}t(e)}}const G0=ve("articleCard",()=>({content:"block+",group:"block",defining:!0,attrs:{type:{default:"intro"},title:{default:""}},parseDOM:[{tag:"section[data-wechat-node='article-card']",contentElement:e=>e.querySelector("[data-article-content]")||e,getAttrs:e=>({type:e.getAttribute("data-card-type")||"intro",title:e.getAttribute("data-card-title")||""})}],toDOM:e=>["section",{class:`wechat-article-card wechat-article-card-${e.attrs.type}`,"data-wechat-node":"article-card","data-card-type":e.attrs.type,...e.attrs.title?{"data-card-title":e.attrs.title}:{}},0],parseMarkdown:{match:e=>e.type==="articleCard",runner:(e,t,n)=>{e.openNode(n,{type:t.cardType||"intro",title:t.customTitle||""}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="articleCard",runner:(e,t)=>{e.openNode("articleCard",void 0,{cardType:t.attrs.type,customTitle:t.attrs.title}),e.next(t.content),e.closeNode()}}})),v4=[Rt("remarkArticleCards",()=>B4),G0,vA(G0.node,()=>sb(ob))].flat(),ob={kind:"article-card",selector:'section[data-wechat-node="article-card"]',prepare(e,t){const n=e.getAttribute("data-card-type")||"intro",r=e.getAttribute("data-card-title")||"";if(n==="intro"){const i=t.document.createElement("section");i.className="wechat-card-eyebrow",i.setAttribute("data-wechat-node","card-eyebrow");const u=t.document.createElement("span");u.className="wechat-card-eyebrow-badge",u.setAttribute("data-wechat-node","card-eyebrow-badge");const s=t.document.createElement("span");s.className="wechat-card-eyebrow-icon",s.textContent="📖",u.appendChild(s);const a=t.document.createElement("span");a.className="wechat-card-eyebrow-label",a.textContent=r.trim()||"导读 · READING GUIDE",u.appendChild(a),i.appendChild(u),e.prepend(i);const o=Array.from(e.querySelectorAll("p"));for(const l of o){const c=l.textContent?.trim()||"";R4(c)?(l.className=(l.className?l.className+" ":"")+"wechat-intro-meta",l.setAttribute("data-wechat-node","intro-meta")):M4(c)&&(l.className=(l.className?l.className+" ":"")+"wechat-intro-guide",l.setAttribute("data-wechat-node","intro-guide"))}return}if(n==="cta"){const i=t.document.createElement("section");i.className="wechat-card-eyebrow",i.setAttribute("data-wechat-node","card-eyebrow");const u=t.document.createElement("span");u.className="wechat-card-eyebrow-badge",u.setAttribute("data-wechat-node","card-eyebrow-badge");const s=t.document.createElement("span");s.className="wechat-card-eyebrow-icon",s.textContent="✨",u.appendChild(s);const a=t.document.createElement("span");a.className="wechat-card-eyebrow-label",a.textContent=r.trim()||"互动交流 · CONNECT",u.appendChild(a),i.appendChild(u),e.prepend(i)}}},L4={doc:{id:"article-card",name:"篇章结构卡片 (Article Card)",category:"block",description:"专为文章开头的精修导读卡 (> [!INTRO]) 和结尾互动号召 (> [!CTA]) 设计的高级结构化卡片,去引用化设计,支持悬挂作者与元信息条、引导关注及精致小字排版",sampleMarkdown:`> [!INTRO] 导读
803
803
  > **文 / Aatrox** · 预计阅读 5 分钟
804
804
  >
805
805
  > 本文系统解析工作流核心状态机与排版架构。从 AST 转换到微信安全内联,带你掌握定制化排版全流程。
@@ -813,7 +813,7 @@ var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=
813
813
  > 💡 欢迎关注... (可选引导关注)
814
814
 
815
815
  > [!CTA] 互动标题 (可选)
816
- > 互动号召正文...`,cssSelectors:['section[data-wechat-node="article-card"]',".wechat-article-card",".wechat-article-card-intro",".wechat-article-card-cta",'section[data-wechat-node="card-eyebrow"]','span[data-wechat-node="card-eyebrow-badge"]','p[data-wechat-node="intro-meta"]','p[data-wechat-node="intro-guide"]']},milkdownPlugins:KS,wechatRenderer:QS,defaultCss:`
816
+ > 互动号召正文...`,cssSelectors:['section[data-wechat-node="article-card"]',".wechat-article-card",".wechat-article-card-intro",".wechat-article-card-cta",'section[data-wechat-node="card-eyebrow"]','span[data-wechat-node="card-eyebrow-badge"]','p[data-wechat-node="intro-meta"]','p[data-wechat-node="intro-guide"]']},milkdownPlugins:v4,wechatRenderer:ob,defaultCss:`
817
817
  .milkdown .editor section[data-wechat-node="article-card"],
818
818
  .milkdown .editor .wechat-article-card {
819
819
  margin: 1.8em 0;
@@ -891,37 +891,41 @@ var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=
891
891
  color: var(--wx-brand-accent, #ca6093) !important;
892
892
  line-height: 1.6 !important;
893
893
  }
894
- `.trim()},YS=[IS,_S,BS,FS,zS],GS=[];function df(){return[...YS,...GS]}function bR(){const e=[];for(const t of df())e.push(...t.milkdownPlugins);return e}function qS(){const e=[];for(const t of df())t.wechatRenderer&&e.push(t.wechatRenderer);return e}function VS(){const e=[];for(const t of df())t.defaultCss&&e.push(t.defaultCss);return e.join(`
894
+ `.trim()};function P4(){const e=this.data(),t=(r,i,u)=>i.containerPhrasing(r,{...u,before:"",after:""}),n=(r,i,u,s)=>{const a=r.customTitle?` ${r.customTitle}`:"",o=i.containerFlow(r,u);return`> [!${s}]${a}
895
+ >
896
+ ${o.split(`
897
+ `).map(l=>l?`> ${l}`:">").join(`
898
+ `)}`};(e.toMarkdownExtensions??=[]).push({handlers:{callout:(r,i,u,s)=>n(r,u,s,r.calloutType.toUpperCase()),articleCard:(r,i,u,s)=>n(r,u,s,r.cardType==="cta"?"CTA":"INTRO"),kbd:(r,i,u,s)=>`[[kbd:${t(r,u,s)}]]`,badge:(r,i,u,s)=>`[badge:${r.badgeType}|${t(r,u,s)}]`}})}const F4=Rt("remarkArticleSerialization",()=>P4);function H4(e){return[{pattern:/==([^=\n]+)==$/,name:"highlight",text:1},{pattern:/\[\[kbd:([^\]\n]+)\]\]$/,name:"kbd",text:1},{pattern:/\[badge:(brand|success|warning|danger|info)\|([^\]\n]+)\]$/i,name:"badge",text:2}].map(({pattern:t,name:n,text:r})=>new mt(t,(i,u,s,a)=>{const o=i.doc.resolve(s);if((o.parent.textBetween(0,o.parentOffset).match(/\\+$/)?.[0].length??0)%2)return null;const c=u[r],d=e.marks[n].create(n==="badge"?{type:u[1].toLowerCase()}:{});return i.tr.insertText(c,s,a).addMark(s,s+c.length,d).removeStoredMark(d.type)},{inCodeMark:!1}))}function U4(){return new pt({props:{handleKeyDown(e,t){if(t.key!=="Enter"||t.shiftKey||t.ctrlKey||t.metaKey||t.altKey||t.isComposing)return!1;const{state:n}=e,{$from:r,empty:i}=n.selection;if(!i||r.parent.type.name!=="paragraph"||r.parentOffset!==r.parent.content.size)return!1;const u=r.parent.textContent.match(/^\[!(INTRO|PREFACE|CTA|OUTRO|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\](?:[ \t]+(.*))?$/i);if(!u)return!1;const s=u[1].toUpperCase(),a=["INTRO","PREFACE","CTA","OUTRO"].includes(s),o=n.schema.nodes[a?"articleCard":"callout"],l={type:a?["CTA","OUTRO"].includes(s)?"cta":"intro":s.toLowerCase(),title:u[2]?.trim()||""};let c=r.depth;c>1&&r.node(c-1).type.name==="blockquote"&&r.node(c-1).childCount===1&&c--;const d=r.before(c),f=n.tr.replaceWith(d,r.after(c),o.create(l,n.schema.nodes.paragraph.create()));return f.setSelection(ae.near(f.doc.resolve(d+2))),e.dispatch(f.scrollIntoView()),!0}}})}const W4=[Gt(e=>vC({rules:H4(e.get(qt))})),Gt(()=>U4())],K4=[y4,k4,S4,O4,L4],z4=[];function hf(){return[...K4,...z4]}function DM(){const e=[...F4,...W4];for(const t of hf())e.push(...t.milkdownPlugins);return e}function Q4(){const e=[];for(const t of hf())t.wechatRenderer&&e.push(t.wechatRenderer);return e}function Y4(){const e=[];for(const t of hf())t.defaultCss&&e.push(t.defaultCss);return e.join(`
895
899
 
896
- `)}var Vo={exports:{}},ye;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(ye||(ye={}));function JS(e){return e.type===ye.Tag||e.type===ye.Script||e.type===ye.Style}const jS=ye.Root,ZS=ye.Text,XS=ye.Directive,$S=ye.Comment,e4=ye.Script,t4=ye.Style,n4=ye.Tag,r4=ye.CDATA,i4=ye.Doctype;class Pg{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return xu(this,t)}}class ff extends Pg{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class Cu extends ff{constructor(){super(...arguments),this.type=ye.Text}get nodeType(){return 3}}class hf extends ff{constructor(){super(...arguments),this.type=ye.Comment}get nodeType(){return 8}}class pf extends ff{constructor(t,n){super(n),this.name=t,this.type=ye.Directive}get nodeType(){return 1}}class mf extends Pg{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class Fg extends mf{constructor(){super(...arguments),this.type=ye.CDATA}get nodeType(){return 4}}class Pr extends mf{constructor(){super(...arguments),this.type=ye.Root}get nodeType(){return 9}}class Af extends mf{constructor(t,n,r=[],i=t==="script"?ye.Script:t==="style"?ye.Style:ye.Tag){super(r),this.name=t,this.attribs=n,this.type=i}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var n,r;return{name:t,value:this.attribs[t],namespace:(n=this["x-attribsNamespace"])===null||n===void 0?void 0:n[t],prefix:(r=this["x-attribsPrefix"])===null||r===void 0?void 0:r[t]}})}}function ne(e){return JS(e)}function Fa(e){return e.type===ye.CDATA}function en(e){return e.type===ye.Text}function Ha(e){return e.type===ye.Comment}function fc(e){return e.type===ye.Directive}function lr(e){return e.type===ye.Root}function Me(e){return Object.prototype.hasOwnProperty.call(e,"children")}function xu(e,t=!1){let n;if(en(e))n=new Cu(e.data);else if(Ha(e))n=new hf(e.data);else if(ne(e)){const r=t?Jo(e.children):[],i=new Af(e.name,{...e.attribs},r);r.forEach(u=>u.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),n=i}else if(Fa(e)){const r=t?Jo(e.children):[],i=new Fg(r);r.forEach(u=>u.parent=i),n=i}else if(lr(e)){const r=t?Jo(e.children):[],i=new Pr(r);r.forEach(u=>u.parent=i),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),n=i}else if(fc(e)){const r=new pf(e.name,e.data);e["x-name"]!=null&&(r["x-name"]=e["x-name"],r["x-publicId"]=e["x-publicId"],r["x-systemId"]=e["x-systemId"]),n=r}else throw new Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function Jo(e){const t=e.map(n=>xu(n,!0));for(let n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}const H0={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class u4{constructor(t,n,r){this.dom=[],this.root=new Pr(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof n=="function"&&(r=n,n=H0),typeof t=="object"&&(n=t,t=void 0),this.callback=t??null,this.options=n??H0,this.elementCB=r??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new Pr(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,n){const r=this.options.xmlMode?ye.Tag:void 0,i=new Af(t,n,void 0,r);this.addNode(i),this.tagStack.push(i)}ontext(t){const{lastNode:n}=this;if(n&&n.type===ye.Text)n.data+=t,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{const r=new Cu(t);this.addNode(r),this.lastNode=r}}oncomment(t){if(this.lastNode&&this.lastNode.type===ye.Comment){this.lastNode.data+=t;return}const n=new hf(t);this.addNode(n),this.lastNode=n}oncommentend(){this.lastNode=null}oncdatastart(){const t=new Cu(""),n=new Fg([t]);this.addNode(n),t.parent=n,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,n){const r=new pf(t,n);this.addNode(r)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const n=this.tagStack[this.tagStack.length-1],r=n.children[n.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),n.children.push(t),r&&(t.prev=r,r.next=t),t.parent=n,this.lastNode=null}}const U0=/["&'<>$\x80-\uFFFF]/g,s4=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),a4=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function Hg(e){let t="",n=0,r;for(;(r=U0.exec(e))!==null;){const i=r.index,u=e.charCodeAt(i),s=s4.get(u);s!==void 0?(t+=e.substring(n,i)+s,n=i+1):(t+=`${e.substring(n,i)}&#x${a4(e,i).toString(16)};`,n=U0.lastIndex+=+((u&64512)===55296))}return t+e.substr(n)}function Ug(e,t){return function(r){let i,u=0,s="";for(;i=e.exec(r);)u!==i.index&&(s+=r.substring(u,i.index)),s+=t.get(i[0].charCodeAt(0)),u=i.index+1;return s+r.substring(u)}}const o4=Ug(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),l4=Ug(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),c4=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),d4=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),f4=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function h4(e){return e.replace(/"/g,"&quot;")}function p4(e,t){var n;if(!e)return;const r=((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)===!1?h4:t.xmlMode||t.encodeEntities!=="utf8"?Hg:o4;return Object.keys(e).map(i=>{var u,s;const a=(u=e[i])!==null&&u!==void 0?u:"";return t.xmlMode==="foreign"&&(i=(s=d4.get(i))!==null&&s!==void 0?s:i),!t.emptyAttrs&&!t.xmlMode&&a===""?i:`${i}="${r(a)}"`}).join(" ")}const W0=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Ua(e,t={}){const n="length"in e?e:[e];let r="";for(let i=0;i<n.length;i++)r+=m4(n[i],t);return r}function m4(e,t){switch(e.type){case jS:return Ua(e.children,t);case i4:case XS:return E4(e);case $S:return C4(e);case r4:return T4(e);case e4:case t4:case n4:return b4(e,t);case ZS:return y4(e,t)}}const A4=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g4=new Set(["svg","math"]);function b4(e,t){var n;t.xmlMode==="foreign"&&(e.name=(n=c4.get(e.name))!==null&&n!==void 0?n:e.name,e.parent&&A4.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&g4.has(e.name)&&(t={...t,xmlMode:"foreign"});let r=`<${e.name}`;const i=p4(e.attribs,t);return i&&(r+=` ${i}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&W0.has(e.name))?(t.xmlMode||(r+=" "),r+="/>"):(r+=">",e.children.length>0&&(r+=Ua(e.children,t)),(t.xmlMode||!W0.has(e.name))&&(r+=`</${e.name}>`)),r}function E4(e){return`<${e.data}>`}function y4(e,t){var n;let r=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&f4.has(e.parent.name))&&(r=t.xmlMode||t.encodeEntities!=="utf8"?Hg(r):l4(r)),r}function T4(e){return`<![CDATA[${e.children[0].data}]]>`}function C4(e){return`<!--${e.data}-->`}function Wg(e,t){return Ua(e,t)}function x4(e,t){return Me(e)?e.children.map(n=>Wg(n,t)).join(""):""}function vs(e){return Array.isArray(e)?e.map(vs).join(""):ne(e)?e.name==="br"?`
897
- `:vs(e.children):Fa(e)?vs(e.children):en(e)?e.data:""}function hi(e){return Array.isArray(e)?e.map(hi).join(""):Me(e)&&!Ha(e)?hi(e.children):en(e)?e.data:""}function ta(e){return Array.isArray(e)?e.map(ta).join(""):Me(e)&&(e.type===ye.Tag||Fa(e))?ta(e.children):en(e)?e.data:""}function Wa(e){return Me(e)?e.children:[]}function Kg(e){return e.parent||null}function Qg(e){const t=Kg(e);if(t!=null)return Wa(t);const n=[e];let{prev:r,next:i}=e;for(;r!=null;)n.unshift(r),{prev:r}=r;for(;i!=null;)n.push(i),{next:i}=i;return n}function k4(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}function w4(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function I4(e){return e.name}function gf(e){let{next:t}=e;for(;t!==null&&!ne(t);)({next:t}=t);return t}function bf(e){let{prev:t}=e;for(;t!==null&&!ne(t);)({prev:t}=t);return t}function Kr(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}function S4(e,t){const n=t.prev=e.prev;n&&(n.next=t);const r=t.next=e.next;r&&(r.prev=t);const i=t.parent=e.parent;if(i){const u=i.children;u[u.lastIndexOf(e)]=t,e.parent=null}}function N4(e,t){if(Kr(t),t.next=null,t.parent=e,e.children.push(t)>1){const n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function D4(e,t){Kr(t);const{parent:n}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){const i=n.children;i.splice(i.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}function _4(e,t){if(Kr(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const n=e.children[1];n.prev=t,t.next=n}else t.next=null}function O4(e,t){Kr(t);const{parent:n}=e;if(n){const r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function Xu(e,t,n=!0,r=1/0){return Ef(e,Array.isArray(t)?t:[t],n,r)}function Ef(e,t,n,r){const i=[],u=[Array.isArray(t)?t:[t]],s=[0];for(;;){if(s[0]>=u[0].length){if(s.length===1)return i;u.shift(),s.shift();continue}const a=u[0][s[0]++];if(e(a)&&(i.push(a),--r<=0))return i;n&&Me(a)&&a.children.length>0&&(s.unshift(0),u.unshift(a.children))}}function R4(e,t){return t.find(e)}function yf(e,t,n=!0){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const u=r[i];if(ne(u)&&e(u))return u;if(n&&Me(u)&&u.children.length>0){const s=yf(e,u.children,!0);if(s)return s}}return null}function zg(e,t){return(Array.isArray(t)?t:[t]).some(n=>ne(n)&&e(n)||Me(n)&&zg(e,n.children))}function M4(e,t){const n=[],r=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift();continue}const u=r[0][i[0]++];ne(u)&&e(u)&&n.push(u),Me(u)&&u.children.length>0&&(i.unshift(0),r.unshift(u.children))}}const na={tag_name(e){return typeof e=="function"?t=>ne(t)&&e(t.name):e==="*"?ne:t=>ne(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>en(t)&&e(t.data):t=>en(t)&&t.data===e}};function Tf(e,t){return typeof t=="function"?n=>ne(n)&&t(n.attribs[e]):n=>ne(n)&&n.attribs[e]===t}function B4(e,t){return n=>e(n)||t(n)}function Yg(e){const t=Object.keys(e).map(n=>{const r=e[n];return Object.prototype.hasOwnProperty.call(na,n)?na[n](r):Tf(n,r)});return t.length===0?null:t.reduce(B4)}function L4(e,t){const n=Yg(e);return n?n(t):!0}function v4(e,t,n,r=1/0){const i=Yg(e);return i?Xu(i,t,n,r):[]}function P4(e,t,n=!0){return Array.isArray(t)||(t=[t]),yf(Tf("id",e),t,n)}function Ci(e,t,n=!0,r=1/0){return Xu(na.tag_name(e),t,n,r)}function F4(e,t,n=!0,r=1/0){return Xu(Tf("class",e),t,n,r)}function H4(e,t,n=!0,r=1/0){return Xu(na.tag_type(e),t,n,r)}function U4(e){let t=e.length;for(;--t>=0;){const n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0){e.splice(t,1);continue}for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}var _t;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(_t||(_t={}));function Gg(e,t){const n=[],r=[];if(e===t)return 0;let i=Me(e)?e:e.parent;for(;i;)n.unshift(i),i=i.parent;for(i=Me(t)?t:t.parent;i;)r.unshift(i),i=i.parent;const u=Math.min(n.length,r.length);let s=0;for(;s<u&&n[s]===r[s];)s++;if(s===0)return _t.DISCONNECTED;const a=n[s-1],o=a.children,l=n[s],c=r[s];return o.indexOf(l)>o.indexOf(c)?a===t?_t.FOLLOWING|_t.CONTAINED_BY:_t.FOLLOWING:a===e?_t.PRECEDING|_t.CONTAINS:_t.PRECEDING}function xi(e){return e=e.filter((t,n,r)=>!r.includes(t,n+1)),e.sort((t,n)=>{const r=Gg(t,n);return r&_t.PRECEDING?-1:r&_t.FOLLOWING?1:0}),e}function W4(e){const t=ra(G4,e);return t?t.name==="feed"?K4(t):Q4(t):null}function K4(e){var t;const n=e.children,r={type:"atom",items:Ci("entry",n).map(s=>{var a;const{children:o}=s,l={media:qg(o)};ft(l,"id","id",o),ft(l,"title","title",o);const c=(a=ra("link",o))===null||a===void 0?void 0:a.attribs.href;c&&(l.link=c);const d=qn("summary",o)||qn("content",o);d&&(l.description=d);const f=qn("updated",o);return f&&(l.pubDate=new Date(f)),l})};ft(r,"id","id",n),ft(r,"title","title",n);const i=(t=ra("link",n))===null||t===void 0?void 0:t.attribs.href;i&&(r.link=i),ft(r,"description","subtitle",n);const u=qn("updated",n);return u&&(r.updated=new Date(u)),ft(r,"author","email",n,!0),r}function Q4(e){var t,n;const r=(n=(t=ra("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],i={type:e.name.substr(0,3),id:"",items:Ci("item",e.children).map(s=>{const{children:a}=s,o={media:qg(a)};ft(o,"id","guid",a),ft(o,"title","title",a),ft(o,"link","link",a),ft(o,"description","description",a);const l=qn("pubDate",a)||qn("dc:date",a);return l&&(o.pubDate=new Date(l)),o})};ft(i,"title","title",r),ft(i,"link","link",r),ft(i,"description","description",r);const u=qn("lastBuildDate",r);return u&&(i.updated=new Date(u)),ft(i,"author","managingEditor",r,!0),i}const z4=["url","type","lang"],Y4=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function qg(e){return Ci("media:content",e).map(t=>{const{attribs:n}=t,r={medium:n.medium,isDefault:!!n.isDefault};for(const i of z4)n[i]&&(r[i]=n[i]);for(const i of Y4)n[i]&&(r[i]=parseInt(n[i],10));return n.expression&&(r.expression=n.expression),r})}function ra(e,t){return Ci(e,t,!0,1)[0]}function qn(e,t,n=!1){return hi(Ci(e,t,n,1)).trim()}function ft(e,t,n,r,i=!1){const u=qn(n,r,i);u&&(e[t]=u)}function G4(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const Ka=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return _t},append:D4,appendChild:N4,compareDocumentPosition:Gg,existsOne:zg,filter:Xu,find:Ef,findAll:M4,findOne:yf,findOneChild:R4,getAttributeValue:k4,getChildren:Wa,getElementById:P4,getElements:v4,getElementsByClassName:F4,getElementsByTagName:Ci,getElementsByTagType:H4,getFeed:W4,getInnerHTML:x4,getName:I4,getOuterHTML:Wg,getParent:Kg,getSiblings:Qg,getText:vs,hasAttrib:w4,hasChildren:Me,innerText:ta,isCDATA:Fa,isComment:Ha,isDocument:lr,isTag:ne,isText:en,nextElementSibling:gf,prepend:O4,prependChild:_4,prevElementSibling:bf,removeElement:Kr,removeSubsets:U4,replaceElement:S4,testElement:L4,textContent:hi,uniqueSort:xi},Symbol.toStringTag,{value:"Module"})),q4={_useHtmlParser2:!1};function hc(e,t){if(!e)return t??q4;const n={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(n._useHtmlParser2=!0,n.xmlMode=!0,e.xml!==!0&&Object.assign(n,e.xml)):e.xmlMode&&(n._useHtmlParser2=!0),n}function Vg(e,t,n){return e?e(t??e._root.children,null,void 0,n).toString():""}function V4(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function J4(e,t){const n=V4(e)?(t=e,void 0):e,r={...this===null||this===void 0?void 0:this._options,...hc(t)};return Vg(this,n,r)}function j4(e){const t={...this._options,xmlMode:!0};return Vg(this,e,t)}function ku(e){const t=e??(this?this.root():[]);let n="";for(let r=0;r<t.length;r++)n+=hi(t[r]);return n}function Z4(e,t,n=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t);const r=this.load(e,this._options,!1);return n||r("script").remove(),[...r.root()[0].children]}function X4(){return this(this._root)}function Cf(e,t){if(t===e)return!1;let n=t;for(;n&&n!==n.parent;)if(n=n.parent,n===e)return!0;return!1}function $4(e){return this.root().extract(e)}function Jg(e,t){if(!K0(e)||!K0(t))return;let n=e.length;const r=+t.length;for(let i=0;i<r;i++)e[n++]=t[i];return e.length=n,e}function K0(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const eN=Object.freeze(Object.defineProperty({__proto__:null,contains:Cf,extract:$4,html:J4,merge:Jg,parseHTML:Z4,root:X4,text:ku,xml:j4},Symbol.toStringTag,{value:"Module"}));function Dn(e){return e.cheerio!=null}function tN(e){return e.replace(/[._-](\w|$)/g,(t,n)=>n.toUpperCase())}function nN(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function Oe(e,t){const n=e.length;for(let r=0;r<n;r++)t(e[r],r);return e}var Ar;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(Ar||(Ar={}));function pc(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const n=e.charCodeAt(t+1);return(n>=Ar.LowerA&&n<=Ar.LowerZ||n>=Ar.UpperA&&n<=Ar.UpperZ||n===Ar.Exclamation)&&e.includes(">",t+2)}const wu=Object.prototype.hasOwnProperty,Iu=/\s+/,mc="data-",xf=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,rN=/^{[^]*}$|^\[[^]*]$/;function ia(e,t,n){var r;if(!(!e||!ne(e))){if((r=e.attribs)!==null&&r!==void 0||(e.attribs={}),!t)return e.attribs;if(wu.call(e.attribs,t))return!n&&xf.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return ku(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function ui(e,t,n){n===null?Zg(e,t):e.attribs[t]=`${n}`}function iN(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return Oe(this,(n,r)=>{ne(n)&&ui(n,e,t.call(n,r,n.attribs[e]))})}return Oe(this,n=>{if(ne(n))if(typeof e=="object")for(const r of Object.keys(e)){const i=e[r];ui(n,r,i)}else ui(n,e,t)})}return arguments.length>1?this:ia(this[0],e,this.options.xmlMode)}function Q0(e,t,n){return t in e?e[t]:!n&&xf.test(t)?ia(e,t,!1)!==void 0:ia(e,t,n)}function jo(e,t,n,r){t in e?e[t]=n:ui(e,t,!r&&xf.test(t)?n?"":null:`${n}`)}function uN(e,t){var n;if(typeof e=="string"&&t===void 0){const r=this[0];if(!r||!ne(r))return;switch(e){case"style":{const i=this.css(),u=Object.keys(i);for(let s=0;s<u.length;s++)i[s]=u[s];return i.length=u.length,i}case"tagName":case"nodeName":return r.name.toUpperCase();case"href":case"src":{const i=(n=r.attribs)===null||n===void 0?void 0:n[e];return typeof URL<"u"&&(e==="href"&&(r.tagName==="a"||r.tagName==="link")||e==="src"&&(r.tagName==="img"||r.tagName==="iframe"||r.tagName==="audio"||r.tagName==="video"||r.tagName==="source"))&&i!==void 0&&this.options.baseURI?new URL(i,this.options.baseURI).href:i}case"innerText":return ta(r);case"textContent":return hi(r);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return Q0(r,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return Oe(this,(r,i)=>{ne(r)&&jo(r,e,t.call(r,i,Q0(r,e,this.options.xmlMode)),this.options.xmlMode)})}return Oe(this,r=>{if(ne(r))if(typeof e=="object")for(const i of Object.keys(e)){const u=e[i];jo(r,i,u,this.options.xmlMode)}else jo(r,e,t,this.options.xmlMode)})}}function z0(e,t,n){var r;(r=e.data)!==null&&r!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&n!==void 0&&(e.data[t]=n)}function sN(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(mc))continue;const n=tN(t.slice(mc.length));wu.call(e.data,n)||(e.data[n]=jg(e.attribs[t]))}return e.data}function aN(e,t){const n=mc+nN(t),r=e.data;if(wu.call(r,t))return r[t];if(wu.call(e.attribs,n))return r[t]=jg(e.attribs[n])}function jg(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(rN.test(e))try{return JSON.parse(e)}catch{}return e}function oN(e,t){var n;const r=this[0];if(!r||!ne(r))return;const i=r;return(n=i.data)!==null&&n!==void 0||(i.data={}),e==null?sN(i):typeof e=="object"||t!==void 0?(Oe(this,u=>{ne(u)&&(typeof e=="object"?z0(u,e):z0(u,e,t))}),this):aN(i,e)}function lN(e){const t=arguments.length===0,n=this[0];if(!n||!ne(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":{const r=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const i=typeof e=="object"?e:[e];for(const u of i)this.find(`option[value="${u}"]`).attr("selected","");return this}return this.attr("multiple")?r.toArray().map(i=>ku(i.children)):r.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Zg(e,t){!e.attribs||!wu.call(e.attribs,t)||delete e.attribs[t]}function ua(e){return e?e.trim().split(Iu):[]}function cN(e){const t=ua(e);for(const n of t)Oe(this,r=>{ne(r)&&Zg(r,n)});return this}function dN(e){return this.toArray().some(t=>{const n=ne(t)&&t.attribs.class;let r=-1;if(n&&e.length>0)for(;(r=n.indexOf(e,r+1))>-1;){const i=r+e.length;if((r===0||Iu.test(n[r-1]))&&(i===n.length||Iu.test(n[i])))return!0}return!1})}function Xg(e){if(typeof e=="function")return Oe(this,(r,i)=>{if(ne(r)){const u=r.attribs.class||"";Xg.call([r],e.call(r,i,u))}});if(!e||typeof e!="string")return this;const t=e.split(Iu),n=this.length;for(let r=0;r<n;r++){const i=this[r];if(!ne(i))continue;const u=ia(i,"class",!1);if(u){let s=` ${u} `;for(const a of t){const o=`${a} `;s.includes(` ${o}`)||(s+=o)}ui(i,"class",s.trim())}else ui(i,"class",t.join(" ").trim())}return this}function $g(e){if(typeof e=="function")return Oe(this,(i,u)=>{ne(i)&&$g.call([i],e.call(i,u,i.attribs.class||""))});const t=ua(e),n=t.length,r=arguments.length===0;return Oe(this,i=>{if(ne(i))if(r)i.attribs.class="";else{const u=ua(i.attribs.class);let s=!1;for(let a=0;a<n;a++){const o=u.indexOf(t[a]);o>=0&&(u.splice(o,1),s=!0,a--)}s&&(i.attribs.class=u.join(" "))}})}function eb(e,t){if(typeof e=="function")return Oe(this,(s,a)=>{ne(s)&&eb.call([s],e.call(s,a,s.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const n=e.split(Iu),r=n.length,i=typeof t=="boolean"?t?1:-1:0,u=this.length;for(let s=0;s<u;s++){const a=this[s];if(!ne(a))continue;const o=ua(a.attribs.class);for(let l=0;l<r;l++){const c=o.indexOf(n[l]);i>=0&&c<0?o.push(n[l]):i<=0&&c>=0&&o.splice(c,1)}a.attribs.class=o.join(" ")}return this}const fN=Object.freeze(Object.defineProperty({__proto__:null,addClass:Xg,attr:iN,data:oN,hasClass:dN,prop:uN,removeAttr:cN,removeClass:$g,toggleClass:eb,val:lN},Symbol.toStringTag,{value:"Module"}));var Z;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(Z||(Z={}));var Ue;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(Ue||(Ue={}));const Y0=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,hN=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,pN=new Map([[126,Ue.Element],[94,Ue.Start],[36,Ue.End],[42,Ue.Any],[33,Ue.Not],[124,Ue.Hyphen]]),mN=new Set(["has","not","matches","is","where","host","host-context"]);function uu(e){switch(e.type){case Z.Adjacent:case Z.Child:case Z.Descendant:case Z.Parent:case Z.Sibling:case Z.ColumnCombinator:return!0;default:return!1}}const AN=new Set(["contains","icontains"]);function gN(e,t,n){const r=parseInt(t,16)-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function Mi(e){return e.replace(hN,gN)}function Zo(e){return e===39||e===34}function G0(e){return e===32||e===9||e===10||e===12||e===13}function Qa(e){const t=[],n=tb(t,`${e}`,0);if(n<e.length)throw new Error(`Unmatched selector: ${e.slice(n)}`);return t}function tb(e,t,n){let r=[];function i(f){const p=t.slice(n+f).match(Y0);if(!p)throw new Error(`Expected name, found ${t.slice(n)}`);const[m]=p;return n+=f+m.length,Mi(m)}function u(f){for(n+=f;n<t.length&&G0(t.charCodeAt(n));)n++}function s(){n+=1;const f=n;let p=1;for(;p>0&&n<t.length;n++)t.charCodeAt(n)===40&&!a(n)?p++:t.charCodeAt(n)===41&&!a(n)&&p--;if(p)throw new Error("Parenthesis not matched");return Mi(t.slice(f,n-1))}function a(f){let p=0;for(;t.charCodeAt(--f)===92;)p++;return(p&1)===1}function o(){if(r.length>0&&uu(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function l(f){if(r.length>0&&r[r.length-1].type===Z.Descendant){r[r.length-1].type=f;return}o(),r.push({type:f})}function c(f,p){r.push({type:Z.Attribute,name:f,action:p,value:i(1),namespace:null,ignoreCase:"quirks"})}function d(){if(r.length&&r[r.length-1].type===Z.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");e.push(r)}if(u(0),t.length===n)return n;e:for(;n<t.length;){const f=t.charCodeAt(n);switch(f){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==Z.Descendant)&&(o(),r.push({type:Z.Descendant})),u(1);break}case 62:{l(Z.Child),u(1);break}case 60:{l(Z.Parent),u(1);break}case 126:{l(Z.Sibling),u(1);break}case 43:{l(Z.Adjacent),u(1);break}case 46:{c("class",Ue.Element);break}case 35:{c("id",Ue.Equals);break}case 91:{u(1);let p,m=null;t.charCodeAt(n)===124?p=i(1):t.startsWith("*|",n)?(m="*",p=i(2)):(p=i(0),t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==61&&(m=p,p=i(1))),u(0);let A=Ue.Exists;const E=pN.get(t.charCodeAt(n));if(E){if(A=E,t.charCodeAt(n+1)!==61)throw new Error("Expected `=`");u(2)}else t.charCodeAt(n)===61&&(A=Ue.Equals,u(1));let g="",N=null;if(A!=="exists"){if(Zo(t.charCodeAt(n))){const S=t.charCodeAt(n);let k=n+1;for(;k<t.length&&(t.charCodeAt(k)!==S||a(k));)k+=1;if(t.charCodeAt(k)!==S)throw new Error("Attribute value didn't end");g=Mi(t.slice(n+1,k)),n=k+1}else{const S=n;for(;n<t.length&&(!G0(t.charCodeAt(n))&&t.charCodeAt(n)!==93||a(n));)n+=1;g=Mi(t.slice(S,n))}u(0);const _=t.charCodeAt(n)|32;_===115?(N=!1,u(1)):_===105&&(N=!0,u(1))}if(t.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const w={type:Z.Attribute,name:p,action:A,value:g,namespace:m,ignoreCase:N};r.push(w);break}case 58:{if(t.charCodeAt(n+1)===58){r.push({type:Z.PseudoElement,name:i(2).toLowerCase(),data:t.charCodeAt(n)===40?s():null});continue}const p=i(1).toLowerCase();let m=null;if(t.charCodeAt(n)===40)if(mN.has(p)){if(Zo(t.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${p} cannot be quoted`);if(m=[],n=tb(m,t,n+1),t.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${p} (${t})`);n+=1}else{if(m=s(),AN.has(p)){const A=m.charCodeAt(0);A===m.charCodeAt(m.length-1)&&Zo(A)&&(m=m.slice(1,-1))}m=Mi(m)}r.push({type:Z.Pseudo,name:p,data:m});break}case 44:{d(),r=[],u(1);break}default:{if(t.startsWith("/*",n)){const A=t.indexOf("*/",n+2);if(A<0)throw new Error("Comment was not terminated");n=A+2,r.length===0&&u(0);break}let p=null,m;if(f===42)n+=1,m="*";else if(f===124){if(m="",t.charCodeAt(n+1)===124){l(Z.ColumnCombinator),u(2);break}}else if(Y0.test(t.slice(n)))m=i(0);else break e;t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==124&&(p=m,t.charCodeAt(n+1)===42?(m="*",n+=2):m=i(1)),r.push(m==="*"?{type:Z.Universal,namespace:p}:{type:Z.Tag,name:m,namespace:p})}}}return d(),n}var Xo,q0;function bN(){return q0||(q0=1,Xo={trueFunc:function(){return!0},falseFunc:function(){return!1}}),Xo}var sa=bN();const ce=Bc(sa),nb=new Map([[Z.Universal,50],[Z.Tag,30],[Z.Attribute,1],[Z.Pseudo,0]]);function kf(e){return!nb.has(e.type)}const EN=new Map([[Ue.Exists,10],[Ue.Equals,8],[Ue.Not,7],[Ue.Start,6],[Ue.End,6],[Ue.Any,5]]);function yN(e){const t=e.map(rb);for(let n=1;n<e.length;n++){const r=t[n];if(!(r<0))for(let i=n-1;i>=0&&r<t[i];i--){const u=e[i+1];e[i+1]=e[i],e[i]=u,t[i+1]=t[i],t[i]=r}}}function rb(e){var t,n;let r=(t=nb.get(e.type))!==null&&t!==void 0?t:-1;return e.type===Z.Attribute?(r=(n=EN.get(e.action))!==null&&n!==void 0?n:4,e.action===Ue.Equals&&e.name==="id"&&(r=9),e.ignoreCase&&(r>>=1)):e.type===Z.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?r=0:Array.isArray(e.data)?(r=Math.min(...e.data.map(i=>Math.min(...i.map(rb)))),r<0&&(r=0)):r=2:r=3),r}const TN=/[-[\]{}()*+?.,\\^$|#\s]/g;function V0(e){return e.replace(TN,"\\$&")}const CN=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function pr(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&CN.has(e.name)}const xN={equals(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;return pr(t,n)?(u=u.toLowerCase(),s=>{const a=r.getAttributeValue(s,i);return a!=null&&a.length===u.length&&a.toLowerCase()===u&&e(s)}):s=>r.getAttributeValue(s,i)===u&&e(s)},hyphen(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=u.length;return pr(t,n)?(u=u.toLowerCase(),function(o){const l=r.getAttributeValue(o,i);return l!=null&&(l.length===s||l.charAt(s)==="-")&&l.substr(0,s).toLowerCase()===u&&e(o)}):function(o){const l=r.getAttributeValue(o,i);return l!=null&&(l.length===s||l.charAt(s)==="-")&&l.substr(0,s)===u&&e(o)}},element(e,t,n){const{adapter:r}=n,{name:i,value:u}=t;if(/\s/.test(u))return ce.falseFunc;const s=new RegExp(`(?:^|\\s)${V0(u)}(?:$|\\s)`,pr(t,n)?"i":"");return function(o){const l=r.getAttributeValue(o,i);return l!=null&&l.length>=u.length&&s.test(l)&&e(o)}},exists(e,{name:t},{adapter:n}){return r=>n.hasAttrib(r,t)&&e(r)},start(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=u.length;return s===0?ce.falseFunc:pr(t,n)?(u=u.toLowerCase(),a=>{const o=r.getAttributeValue(a,i);return o!=null&&o.length>=s&&o.substr(0,s).toLowerCase()===u&&e(a)}):a=>{var o;return!!(!((o=r.getAttributeValue(a,i))===null||o===void 0)&&o.startsWith(u))&&e(a)}},end(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=-u.length;return s===0?ce.falseFunc:pr(t,n)?(u=u.toLowerCase(),a=>{var o;return((o=r.getAttributeValue(a,i))===null||o===void 0?void 0:o.substr(s).toLowerCase())===u&&e(a)}):a=>{var o;return!!(!((o=r.getAttributeValue(a,i))===null||o===void 0)&&o.endsWith(u))&&e(a)}},any(e,t,n){const{adapter:r}=n,{name:i,value:u}=t;if(u==="")return ce.falseFunc;if(pr(t,n)){const s=new RegExp(V0(u),"i");return function(o){const l=r.getAttributeValue(o,i);return l!=null&&l.length>=u.length&&s.test(l)&&e(o)}}return s=>{var a;return!!(!((a=r.getAttributeValue(s,i))===null||a===void 0)&&a.includes(u))&&e(s)}},not(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;return u===""?s=>!!r.getAttributeValue(s,i)&&e(s):pr(t,n)?(u=u.toLowerCase(),s=>{const a=r.getAttributeValue(s,i);return(a==null||a.length!==u.length||a.toLowerCase()!==u)&&e(s)}):s=>r.getAttributeValue(s,i)!==u&&e(s)}},kN=new Set([9,10,12,13,32]),J0=48,wN=57;function IN(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=u(),i=s();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(i??1),a(),t<e.length?(r=u(),a(),i=s()):r=i=0),i===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function u(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function s(){const o=t;let l=0;for(;t<e.length&&e.charCodeAt(t)>=J0&&e.charCodeAt(t)<=wN;)l=l*10+(e.charCodeAt(t)-J0),t++;return t===o?null:l}function a(){for(;t<e.length&&kN.has(e.charCodeAt(t));)t++}}function SN(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return ce.falseFunc;if(t===-1)return u=>u<=n;if(t===0)return u=>u===n;if(t===1)return n<0?ce.trueFunc:u=>u>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?u=>u>=n&&u%r===i:u=>u<=n&&u%r===i}function gs(e){return SN(IN(e))}function bs(e,t){return n=>{const r=t.getParent(n);return r!=null&&t.isTag(r)&&e(n)}}const Ac={contains(e,t,{adapter:n}){return function(i){return e(i)&&n.getText(i).includes(t)}},icontains(e,t,{adapter:n}){const r=t.toLowerCase();return function(u){return e(u)&&n.getText(u).toLowerCase().includes(r)}},"nth-child"(e,t,{adapter:n,equals:r}){const i=gs(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?bs(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=0;l<a.length&&!r(s,a[l]);l++)n.isTag(a[l])&&o++;return i(o)&&e(s)}},"nth-last-child"(e,t,{adapter:n,equals:r}){const i=gs(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?bs(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=a.length-1;l>=0&&!r(s,a[l]);l--)n.isTag(a[l])&&o++;return i(o)&&e(s)}},"nth-of-type"(e,t,{adapter:n,equals:r}){const i=gs(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?bs(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=0;l<a.length;l++){const c=a[l];if(r(s,c))break;n.isTag(c)&&n.getName(c)===n.getName(s)&&o++}return i(o)&&e(s)}},"nth-last-of-type"(e,t,{adapter:n,equals:r}){const i=gs(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?bs(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=a.length-1;l>=0;l--){const c=a[l];if(r(s,c))break;n.isTag(c)&&n.getName(c)===n.getName(s)&&o++}return i(o)&&e(s)}},root(e,t,{adapter:n}){return r=>{const i=n.getParent(r);return(i==null||!n.isTag(i))&&e(r)}},scope(e,t,n,r){const{equals:i}=n;return!r||r.length===0?Ac.root(e,t,n):r.length===1?u=>i(r[0],u)&&e(u):u=>r.includes(u)&&e(u)},hover:$o("isHovered"),visited:$o("isVisited"),active:$o("isActive")};function $o(e){return function(n,r,{adapter:i}){const u=i[e];return typeof u!="function"?ce.falseFunc:function(a){return u(a)&&n(a)}}}const j0={empty(e,{adapter:t}){return!t.getChildren(e).some(n=>t.isTag(n)||t.getText(n)!=="")},"first-child"(e,{adapter:t,equals:n}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const r=t.getSiblings(e).find(i=>t.isTag(i));return r!=null&&n(e,r)},"last-child"(e,{adapter:t,equals:n}){const r=t.getSiblings(e);for(let i=r.length-1;i>=0;i--){if(n(e,r[i]))return!0;if(t.isTag(r[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let u=0;u<r.length;u++){const s=r[u];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"last-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let u=r.length-1;u>=0;u--){const s=r[u];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){const r=t.getName(e);return t.getSiblings(e).every(i=>n(e,i)||!t.isTag(i)||t.getName(i)!==r)},"only-child"(e,{adapter:t,equals:n}){return t.getSiblings(e).every(r=>n(e,r)||!t.isTag(r))}};function Z0(e,t,n,r){if(n===null){if(e.length>r)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===r)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const NN={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
900
+ `)}var el={exports:{}},ye;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(ye||(ye={}));function q4(e){return e.type===ye.Tag||e.type===ye.Script||e.type===ye.Style}const G4=ye.Root,V4=ye.Text,J4=ye.Directive,j4=ye.Comment,Z4=ye.Script,X4=ye.Style,$4=ye.Tag,eN=ye.CDATA,tN=ye.Doctype;class lb{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Ou(this,t)}}class pf extends lb{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class _u extends pf{constructor(){super(...arguments),this.type=ye.Text}get nodeType(){return 3}}class mf extends pf{constructor(){super(...arguments),this.type=ye.Comment}get nodeType(){return 8}}class Af extends pf{constructor(t,n){super(n),this.name=t,this.type=ye.Directive}get nodeType(){return 1}}class gf extends lb{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class cb extends gf{constructor(){super(...arguments),this.type=ye.CDATA}get nodeType(){return 4}}class Ur extends gf{constructor(){super(...arguments),this.type=ye.Root}get nodeType(){return 9}}class bf extends gf{constructor(t,n,r=[],i=t==="script"?ye.Script:t==="style"?ye.Style:ye.Tag){super(r),this.name=t,this.attribs=n,this.type=i}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var n,r;return{name:t,value:this.attribs[t],namespace:(n=this["x-attribsNamespace"])===null||n===void 0?void 0:n[t],prefix:(r=this["x-attribsPrefix"])===null||r===void 0?void 0:r[t]}})}}function ne(e){return q4(e)}function Ya(e){return e.type===ye.CDATA}function rn(e){return e.type===ye.Text}function qa(e){return e.type===ye.Comment}function mc(e){return e.type===ye.Directive}function fr(e){return e.type===ye.Root}function Be(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Ou(e,t=!1){let n;if(rn(e))n=new _u(e.data);else if(qa(e))n=new mf(e.data);else if(ne(e)){const r=t?tl(e.children):[],i=new bf(e.name,{...e.attribs},r);r.forEach(u=>u.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),n=i}else if(Ya(e)){const r=t?tl(e.children):[],i=new cb(r);r.forEach(u=>u.parent=i),n=i}else if(fr(e)){const r=t?tl(e.children):[],i=new Ur(r);r.forEach(u=>u.parent=i),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),n=i}else if(mc(e)){const r=new Af(e.name,e.data);e["x-name"]!=null&&(r["x-name"]=e["x-name"],r["x-publicId"]=e["x-publicId"],r["x-systemId"]=e["x-systemId"]),n=r}else throw new Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function tl(e){const t=e.map(n=>Ou(n,!0));for(let n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}const V0={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class nN{constructor(t,n,r){this.dom=[],this.root=new Ur(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof n=="function"&&(r=n,n=V0),typeof t=="object"&&(n=t,t=void 0),this.callback=t??null,this.options=n??V0,this.elementCB=r??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new Ur(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,n){const r=this.options.xmlMode?ye.Tag:void 0,i=new bf(t,n,void 0,r);this.addNode(i),this.tagStack.push(i)}ontext(t){const{lastNode:n}=this;if(n&&n.type===ye.Text)n.data+=t,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{const r=new _u(t);this.addNode(r),this.lastNode=r}}oncomment(t){if(this.lastNode&&this.lastNode.type===ye.Comment){this.lastNode.data+=t;return}const n=new mf(t);this.addNode(n),this.lastNode=n}oncommentend(){this.lastNode=null}oncdatastart(){const t=new _u(""),n=new cb([t]);this.addNode(n),t.parent=n,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,n){const r=new Af(t,n);this.addNode(r)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const n=this.tagStack[this.tagStack.length-1],r=n.children[n.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),n.children.push(t),r&&(t.prev=r,r.next=t),t.parent=n,this.lastNode=null}}const J0=/["&'<>$\x80-\uFFFF]/g,rN=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),iN=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function db(e){let t="",n=0,r;for(;(r=J0.exec(e))!==null;){const i=r.index,u=e.charCodeAt(i),s=rN.get(u);s!==void 0?(t+=e.substring(n,i)+s,n=i+1):(t+=`${e.substring(n,i)}&#x${iN(e,i).toString(16)};`,n=J0.lastIndex+=+((u&64512)===55296))}return t+e.substr(n)}function fb(e,t){return function(r){let i,u=0,s="";for(;i=e.exec(r);)u!==i.index&&(s+=r.substring(u,i.index)),s+=t.get(i[0].charCodeAt(0)),u=i.index+1;return s+r.substring(u)}}const uN=fb(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),sN=fb(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),aN=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),oN=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),lN=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function cN(e){return e.replace(/"/g,"&quot;")}function dN(e,t){var n;if(!e)return;const r=((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)===!1?cN:t.xmlMode||t.encodeEntities!=="utf8"?db:uN;return Object.keys(e).map(i=>{var u,s;const a=(u=e[i])!==null&&u!==void 0?u:"";return t.xmlMode==="foreign"&&(i=(s=oN.get(i))!==null&&s!==void 0?s:i),!t.emptyAttrs&&!t.xmlMode&&a===""?i:`${i}="${r(a)}"`}).join(" ")}const j0=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Ga(e,t={}){const n="length"in e?e:[e];let r="";for(let i=0;i<n.length;i++)r+=fN(n[i],t);return r}function fN(e,t){switch(e.type){case G4:return Ga(e.children,t);case tN:case J4:return AN(e);case j4:return EN(e);case eN:return bN(e);case Z4:case X4:case $4:return mN(e,t);case V4:return gN(e,t)}}const hN=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),pN=new Set(["svg","math"]);function mN(e,t){var n;t.xmlMode==="foreign"&&(e.name=(n=aN.get(e.name))!==null&&n!==void 0?n:e.name,e.parent&&hN.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&pN.has(e.name)&&(t={...t,xmlMode:"foreign"});let r=`<${e.name}`;const i=dN(e.attribs,t);return i&&(r+=` ${i}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&j0.has(e.name))?(t.xmlMode||(r+=" "),r+="/>"):(r+=">",e.children.length>0&&(r+=Ga(e.children,t)),(t.xmlMode||!j0.has(e.name))&&(r+=`</${e.name}>`)),r}function AN(e){return`<${e.data}>`}function gN(e,t){var n;let r=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&lN.has(e.parent.name))&&(r=t.xmlMode||t.encodeEntities!=="utf8"?db(r):sN(r)),r}function bN(e){return`<![CDATA[${e.children[0].data}]]>`}function EN(e){return`<!--${e.data}-->`}function hb(e,t){return Ga(e,t)}function yN(e,t){return Be(e)?e.children.map(n=>hb(n,t)).join(""):""}function Js(e){return Array.isArray(e)?e.map(Js).join(""):ne(e)?e.name==="br"?`
901
+ `:Js(e.children):Ya(e)?Js(e.children):rn(e)?e.data:""}function Ei(e){return Array.isArray(e)?e.map(Ei).join(""):Be(e)&&!qa(e)?Ei(e.children):rn(e)?e.data:""}function ga(e){return Array.isArray(e)?e.map(ga).join(""):Be(e)&&(e.type===ye.Tag||Ya(e))?ga(e.children):rn(e)?e.data:""}function Va(e){return Be(e)?e.children:[]}function pb(e){return e.parent||null}function mb(e){const t=pb(e);if(t!=null)return Va(t);const n=[e];let{prev:r,next:i}=e;for(;r!=null;)n.unshift(r),{prev:r}=r;for(;i!=null;)n.push(i),{next:i}=i;return n}function TN(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}function CN(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function kN(e){return e.name}function Ef(e){let{next:t}=e;for(;t!==null&&!ne(t);)({next:t}=t);return t}function yf(e){let{prev:t}=e;for(;t!==null&&!ne(t);)({prev:t}=t);return t}function zr(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}function xN(e,t){const n=t.prev=e.prev;n&&(n.next=t);const r=t.next=e.next;r&&(r.prev=t);const i=t.parent=e.parent;if(i){const u=i.children;u[u.lastIndexOf(e)]=t,e.parent=null}}function wN(e,t){if(zr(t),t.next=null,t.parent=e,e.children.push(t)>1){const n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function IN(e,t){zr(t);const{parent:n}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){const i=n.children;i.splice(i.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}function SN(e,t){if(zr(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const n=e.children[1];n.prev=t,t.next=n}else t.next=null}function NN(e,t){zr(t);const{parent:n}=e;if(n){const r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function ds(e,t,n=!0,r=1/0){return Tf(e,Array.isArray(t)?t:[t],n,r)}function Tf(e,t,n,r){const i=[],u=[Array.isArray(t)?t:[t]],s=[0];for(;;){if(s[0]>=u[0].length){if(s.length===1)return i;u.shift(),s.shift();continue}const a=u[0][s[0]++];if(e(a)&&(i.push(a),--r<=0))return i;n&&Be(a)&&a.children.length>0&&(s.unshift(0),u.unshift(a.children))}}function DN(e,t){return t.find(e)}function Cf(e,t,n=!0){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const u=r[i];if(ne(u)&&e(u))return u;if(n&&Be(u)&&u.children.length>0){const s=Cf(e,u.children,!0);if(s)return s}}return null}function Ab(e,t){return(Array.isArray(t)?t:[t]).some(n=>ne(n)&&e(n)||Be(n)&&Ab(e,n.children))}function _N(e,t){const n=[],r=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift();continue}const u=r[0][i[0]++];ne(u)&&e(u)&&n.push(u),Be(u)&&u.children.length>0&&(i.unshift(0),r.unshift(u.children))}}const ba={tag_name(e){return typeof e=="function"?t=>ne(t)&&e(t.name):e==="*"?ne:t=>ne(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>rn(t)&&e(t.data):t=>rn(t)&&t.data===e}};function kf(e,t){return typeof t=="function"?n=>ne(n)&&t(n.attribs[e]):n=>ne(n)&&n.attribs[e]===t}function ON(e,t){return n=>e(n)||t(n)}function gb(e){const t=Object.keys(e).map(n=>{const r=e[n];return Object.prototype.hasOwnProperty.call(ba,n)?ba[n](r):kf(n,r)});return t.length===0?null:t.reduce(ON)}function RN(e,t){const n=gb(e);return n?n(t):!0}function MN(e,t,n,r=1/0){const i=gb(e);return i?ds(i,t,n,r):[]}function BN(e,t,n=!0){return Array.isArray(t)||(t=[t]),Cf(kf("id",e),t,n)}function Ni(e,t,n=!0,r=1/0){return ds(ba.tag_name(e),t,n,r)}function vN(e,t,n=!0,r=1/0){return ds(kf("class",e),t,n,r)}function LN(e,t,n=!0,r=1/0){return ds(ba.tag_type(e),t,n,r)}function PN(e){let t=e.length;for(;--t>=0;){const n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0){e.splice(t,1);continue}for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}var Bt;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(Bt||(Bt={}));function bb(e,t){const n=[],r=[];if(e===t)return 0;let i=Be(e)?e:e.parent;for(;i;)n.unshift(i),i=i.parent;for(i=Be(t)?t:t.parent;i;)r.unshift(i),i=i.parent;const u=Math.min(n.length,r.length);let s=0;for(;s<u&&n[s]===r[s];)s++;if(s===0)return Bt.DISCONNECTED;const a=n[s-1],o=a.children,l=n[s],c=r[s];return o.indexOf(l)>o.indexOf(c)?a===t?Bt.FOLLOWING|Bt.CONTAINED_BY:Bt.FOLLOWING:a===e?Bt.PRECEDING|Bt.CONTAINS:Bt.PRECEDING}function Di(e){return e=e.filter((t,n,r)=>!r.includes(t,n+1)),e.sort((t,n)=>{const r=bb(t,n);return r&Bt.PRECEDING?-1:r&Bt.FOLLOWING?1:0}),e}function FN(e){const t=Ea(zN,e);return t?t.name==="feed"?HN(t):UN(t):null}function HN(e){var t;const n=e.children,r={type:"atom",items:Ni("entry",n).map(s=>{var a;const{children:o}=s,l={media:Eb(o)};Et(l,"id","id",o),Et(l,"title","title",o);const c=(a=Ea("link",o))===null||a===void 0?void 0:a.attribs.href;c&&(l.link=c);const d=Jn("summary",o)||Jn("content",o);d&&(l.description=d);const f=Jn("updated",o);return f&&(l.pubDate=new Date(f)),l})};Et(r,"id","id",n),Et(r,"title","title",n);const i=(t=Ea("link",n))===null||t===void 0?void 0:t.attribs.href;i&&(r.link=i),Et(r,"description","subtitle",n);const u=Jn("updated",n);return u&&(r.updated=new Date(u)),Et(r,"author","email",n,!0),r}function UN(e){var t,n;const r=(n=(t=Ea("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],i={type:e.name.substr(0,3),id:"",items:Ni("item",e.children).map(s=>{const{children:a}=s,o={media:Eb(a)};Et(o,"id","guid",a),Et(o,"title","title",a),Et(o,"link","link",a),Et(o,"description","description",a);const l=Jn("pubDate",a)||Jn("dc:date",a);return l&&(o.pubDate=new Date(l)),o})};Et(i,"title","title",r),Et(i,"link","link",r),Et(i,"description","description",r);const u=Jn("lastBuildDate",r);return u&&(i.updated=new Date(u)),Et(i,"author","managingEditor",r,!0),i}const WN=["url","type","lang"],KN=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Eb(e){return Ni("media:content",e).map(t=>{const{attribs:n}=t,r={medium:n.medium,isDefault:!!n.isDefault};for(const i of WN)n[i]&&(r[i]=n[i]);for(const i of KN)n[i]&&(r[i]=parseInt(n[i],10));return n.expression&&(r.expression=n.expression),r})}function Ea(e,t){return Ni(e,t,!0,1)[0]}function Jn(e,t,n=!1){return Ei(Ni(e,t,n,1)).trim()}function Et(e,t,n,r,i=!1){const u=Jn(n,r,i);u&&(e[t]=u)}function zN(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const Ja=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Bt},append:IN,appendChild:wN,compareDocumentPosition:bb,existsOne:Ab,filter:ds,find:Tf,findAll:_N,findOne:Cf,findOneChild:DN,getAttributeValue:TN,getChildren:Va,getElementById:BN,getElements:MN,getElementsByClassName:vN,getElementsByTagName:Ni,getElementsByTagType:LN,getFeed:FN,getInnerHTML:yN,getName:kN,getOuterHTML:hb,getParent:pb,getSiblings:mb,getText:Js,hasAttrib:CN,hasChildren:Be,innerText:ga,isCDATA:Ya,isComment:qa,isDocument:fr,isTag:ne,isText:rn,nextElementSibling:Ef,prepend:NN,prependChild:SN,prevElementSibling:yf,removeElement:zr,removeSubsets:PN,replaceElement:xN,testElement:RN,textContent:Ei,uniqueSort:Di},Symbol.toStringTag,{value:"Module"})),QN={_useHtmlParser2:!1};function Ac(e,t){if(!e)return t??QN;const n={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(n._useHtmlParser2=!0,n.xmlMode=!0,e.xml!==!0&&Object.assign(n,e.xml)):e.xmlMode&&(n._useHtmlParser2=!0),n}function yb(e,t,n){return e?e(t??e._root.children,null,void 0,n).toString():""}function YN(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function qN(e,t){const n=YN(e)?(t=e,void 0):e,r={...this===null||this===void 0?void 0:this._options,...Ac(t)};return yb(this,n,r)}function GN(e){const t={...this._options,xmlMode:!0};return yb(this,e,t)}function Ru(e){const t=e??(this?this.root():[]);let n="";for(let r=0;r<t.length;r++)n+=Ei(t[r]);return n}function VN(e,t,n=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t);const r=this.load(e,this._options,!1);return n||r("script").remove(),[...r.root()[0].children]}function JN(){return this(this._root)}function xf(e,t){if(t===e)return!1;let n=t;for(;n&&n!==n.parent;)if(n=n.parent,n===e)return!0;return!1}function jN(e){return this.root().extract(e)}function Tb(e,t){if(!Z0(e)||!Z0(t))return;let n=e.length;const r=+t.length;for(let i=0;i<r;i++)e[n++]=t[i];return e.length=n,e}function Z0(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const ZN=Object.freeze(Object.defineProperty({__proto__:null,contains:xf,extract:jN,html:qN,merge:Tb,parseHTML:VN,root:JN,text:Ru,xml:GN},Symbol.toStringTag,{value:"Module"}));function _n(e){return e.cheerio!=null}function XN(e){return e.replace(/[._-](\w|$)/g,(t,n)=>n.toUpperCase())}function $N(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function Re(e,t){const n=e.length;for(let r=0;r<n;r++)t(e[r],r);return e}var Er;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(Er||(Er={}));function gc(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const n=e.charCodeAt(t+1);return(n>=Er.LowerA&&n<=Er.LowerZ||n>=Er.UpperA&&n<=Er.UpperZ||n===Er.Exclamation)&&e.includes(">",t+2)}const Mu=Object.prototype.hasOwnProperty,Bu=/\s+/,bc="data-",wf=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,e8=/^{[^]*}$|^\[[^]*]$/;function ya(e,t,n){var r;if(!(!e||!ne(e))){if((r=e.attribs)!==null&&r!==void 0||(e.attribs={}),!t)return e.attribs;if(Mu.call(e.attribs,t))return!n&&wf.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Ru(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function ui(e,t,n){n===null?kb(e,t):e.attribs[t]=`${n}`}function t8(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return Re(this,(n,r)=>{ne(n)&&ui(n,e,t.call(n,r,n.attribs[e]))})}return Re(this,n=>{if(ne(n))if(typeof e=="object")for(const r of Object.keys(e)){const i=e[r];ui(n,r,i)}else ui(n,e,t)})}return arguments.length>1?this:ya(this[0],e,this.options.xmlMode)}function X0(e,t,n){return t in e?e[t]:!n&&wf.test(t)?ya(e,t,!1)!==void 0:ya(e,t,n)}function nl(e,t,n,r){t in e?e[t]=n:ui(e,t,!r&&wf.test(t)?n?"":null:`${n}`)}function n8(e,t){var n;if(typeof e=="string"&&t===void 0){const r=this[0];if(!r||!ne(r))return;switch(e){case"style":{const i=this.css(),u=Object.keys(i);for(let s=0;s<u.length;s++)i[s]=u[s];return i.length=u.length,i}case"tagName":case"nodeName":return r.name.toUpperCase();case"href":case"src":{const i=(n=r.attribs)===null||n===void 0?void 0:n[e];return typeof URL<"u"&&(e==="href"&&(r.tagName==="a"||r.tagName==="link")||e==="src"&&(r.tagName==="img"||r.tagName==="iframe"||r.tagName==="audio"||r.tagName==="video"||r.tagName==="source"))&&i!==void 0&&this.options.baseURI?new URL(i,this.options.baseURI).href:i}case"innerText":return ga(r);case"textContent":return Ei(r);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return X0(r,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return Re(this,(r,i)=>{ne(r)&&nl(r,e,t.call(r,i,X0(r,e,this.options.xmlMode)),this.options.xmlMode)})}return Re(this,r=>{if(ne(r))if(typeof e=="object")for(const i of Object.keys(e)){const u=e[i];nl(r,i,u,this.options.xmlMode)}else nl(r,e,t,this.options.xmlMode)})}}function $0(e,t,n){var r;(r=e.data)!==null&&r!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&n!==void 0&&(e.data[t]=n)}function r8(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(bc))continue;const n=XN(t.slice(bc.length));Mu.call(e.data,n)||(e.data[n]=Cb(e.attribs[t]))}return e.data}function i8(e,t){const n=bc+$N(t),r=e.data;if(Mu.call(r,t))return r[t];if(Mu.call(e.attribs,n))return r[t]=Cb(e.attribs[n])}function Cb(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(e8.test(e))try{return JSON.parse(e)}catch{}return e}function u8(e,t){var n;const r=this[0];if(!r||!ne(r))return;const i=r;return(n=i.data)!==null&&n!==void 0||(i.data={}),e==null?r8(i):typeof e=="object"||t!==void 0?(Re(this,u=>{ne(u)&&(typeof e=="object"?$0(u,e):$0(u,e,t))}),this):i8(i,e)}function s8(e){const t=arguments.length===0,n=this[0];if(!n||!ne(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":{const r=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const i=typeof e=="object"?e:[e];for(const u of i)this.find(`option[value="${u}"]`).attr("selected","");return this}return this.attr("multiple")?r.toArray().map(i=>Ru(i.children)):r.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function kb(e,t){!e.attribs||!Mu.call(e.attribs,t)||delete e.attribs[t]}function Ta(e){return e?e.trim().split(Bu):[]}function a8(e){const t=Ta(e);for(const n of t)Re(this,r=>{ne(r)&&kb(r,n)});return this}function o8(e){return this.toArray().some(t=>{const n=ne(t)&&t.attribs.class;let r=-1;if(n&&e.length>0)for(;(r=n.indexOf(e,r+1))>-1;){const i=r+e.length;if((r===0||Bu.test(n[r-1]))&&(i===n.length||Bu.test(n[i])))return!0}return!1})}function xb(e){if(typeof e=="function")return Re(this,(r,i)=>{if(ne(r)){const u=r.attribs.class||"";xb.call([r],e.call(r,i,u))}});if(!e||typeof e!="string")return this;const t=e.split(Bu),n=this.length;for(let r=0;r<n;r++){const i=this[r];if(!ne(i))continue;const u=ya(i,"class",!1);if(u){let s=` ${u} `;for(const a of t){const o=`${a} `;s.includes(` ${o}`)||(s+=o)}ui(i,"class",s.trim())}else ui(i,"class",t.join(" ").trim())}return this}function wb(e){if(typeof e=="function")return Re(this,(i,u)=>{ne(i)&&wb.call([i],e.call(i,u,i.attribs.class||""))});const t=Ta(e),n=t.length,r=arguments.length===0;return Re(this,i=>{if(ne(i))if(r)i.attribs.class="";else{const u=Ta(i.attribs.class);let s=!1;for(let a=0;a<n;a++){const o=u.indexOf(t[a]);o>=0&&(u.splice(o,1),s=!0,a--)}s&&(i.attribs.class=u.join(" "))}})}function Ib(e,t){if(typeof e=="function")return Re(this,(s,a)=>{ne(s)&&Ib.call([s],e.call(s,a,s.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const n=e.split(Bu),r=n.length,i=typeof t=="boolean"?t?1:-1:0,u=this.length;for(let s=0;s<u;s++){const a=this[s];if(!ne(a))continue;const o=Ta(a.attribs.class);for(let l=0;l<r;l++){const c=o.indexOf(n[l]);i>=0&&c<0?o.push(n[l]):i<=0&&c>=0&&o.splice(c,1)}a.attribs.class=o.join(" ")}return this}const l8=Object.freeze(Object.defineProperty({__proto__:null,addClass:xb,attr:t8,data:u8,hasClass:o8,prop:n8,removeAttr:a8,removeClass:wb,toggleClass:Ib,val:s8},Symbol.toStringTag,{value:"Module"}));var Z;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(Z||(Z={}));var We;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(We||(We={}));const ep=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,c8=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,d8=new Map([[126,We.Element],[94,We.Start],[36,We.End],[42,We.Any],[33,We.Not],[124,We.Hyphen]]),f8=new Set(["has","not","matches","is","where","host","host-context"]);function du(e){switch(e.type){case Z.Adjacent:case Z.Child:case Z.Descendant:case Z.Parent:case Z.Sibling:case Z.ColumnCombinator:return!0;default:return!1}}const h8=new Set(["contains","icontains"]);function p8(e,t,n){const r=parseInt(t,16)-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function Hi(e){return e.replace(c8,p8)}function rl(e){return e===39||e===34}function tp(e){return e===32||e===9||e===10||e===12||e===13}function ja(e){const t=[],n=Sb(t,`${e}`,0);if(n<e.length)throw new Error(`Unmatched selector: ${e.slice(n)}`);return t}function Sb(e,t,n){let r=[];function i(f){const p=t.slice(n+f).match(ep);if(!p)throw new Error(`Expected name, found ${t.slice(n)}`);const[m]=p;return n+=f+m.length,Hi(m)}function u(f){for(n+=f;n<t.length&&tp(t.charCodeAt(n));)n++}function s(){n+=1;const f=n;let p=1;for(;p>0&&n<t.length;n++)t.charCodeAt(n)===40&&!a(n)?p++:t.charCodeAt(n)===41&&!a(n)&&p--;if(p)throw new Error("Parenthesis not matched");return Hi(t.slice(f,n-1))}function a(f){let p=0;for(;t.charCodeAt(--f)===92;)p++;return(p&1)===1}function o(){if(r.length>0&&du(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function l(f){if(r.length>0&&r[r.length-1].type===Z.Descendant){r[r.length-1].type=f;return}o(),r.push({type:f})}function c(f,p){r.push({type:Z.Attribute,name:f,action:p,value:i(1),namespace:null,ignoreCase:"quirks"})}function d(){if(r.length&&r[r.length-1].type===Z.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");e.push(r)}if(u(0),t.length===n)return n;e:for(;n<t.length;){const f=t.charCodeAt(n);switch(f){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==Z.Descendant)&&(o(),r.push({type:Z.Descendant})),u(1);break}case 62:{l(Z.Child),u(1);break}case 60:{l(Z.Parent),u(1);break}case 126:{l(Z.Sibling),u(1);break}case 43:{l(Z.Adjacent),u(1);break}case 46:{c("class",We.Element);break}case 35:{c("id",We.Equals);break}case 91:{u(1);let p,m=null;t.charCodeAt(n)===124?p=i(1):t.startsWith("*|",n)?(m="*",p=i(2)):(p=i(0),t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==61&&(m=p,p=i(1))),u(0);let A=We.Exists;const E=d8.get(t.charCodeAt(n));if(E){if(A=E,t.charCodeAt(n+1)!==61)throw new Error("Expected `=`");u(2)}else t.charCodeAt(n)===61&&(A=We.Equals,u(1));let g="",N=null;if(A!=="exists"){if(rl(t.charCodeAt(n))){const S=t.charCodeAt(n);let x=n+1;for(;x<t.length&&(t.charCodeAt(x)!==S||a(x));)x+=1;if(t.charCodeAt(x)!==S)throw new Error("Attribute value didn't end");g=Hi(t.slice(n+1,x)),n=x+1}else{const S=n;for(;n<t.length&&(!tp(t.charCodeAt(n))&&t.charCodeAt(n)!==93||a(n));)n+=1;g=Hi(t.slice(S,n))}u(0);const _=t.charCodeAt(n)|32;_===115?(N=!1,u(1)):_===105&&(N=!0,u(1))}if(t.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const w={type:Z.Attribute,name:p,action:A,value:g,namespace:m,ignoreCase:N};r.push(w);break}case 58:{if(t.charCodeAt(n+1)===58){r.push({type:Z.PseudoElement,name:i(2).toLowerCase(),data:t.charCodeAt(n)===40?s():null});continue}const p=i(1).toLowerCase();let m=null;if(t.charCodeAt(n)===40)if(f8.has(p)){if(rl(t.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${p} cannot be quoted`);if(m=[],n=Sb(m,t,n+1),t.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${p} (${t})`);n+=1}else{if(m=s(),h8.has(p)){const A=m.charCodeAt(0);A===m.charCodeAt(m.length-1)&&rl(A)&&(m=m.slice(1,-1))}m=Hi(m)}r.push({type:Z.Pseudo,name:p,data:m});break}case 44:{d(),r=[],u(1);break}default:{if(t.startsWith("/*",n)){const A=t.indexOf("*/",n+2);if(A<0)throw new Error("Comment was not terminated");n=A+2,r.length===0&&u(0);break}let p=null,m;if(f===42)n+=1,m="*";else if(f===124){if(m="",t.charCodeAt(n+1)===124){l(Z.ColumnCombinator),u(2);break}}else if(ep.test(t.slice(n)))m=i(0);else break e;t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==124&&(p=m,t.charCodeAt(n+1)===42?(m="*",n+=2):m=i(1)),r.push(m==="*"?{type:Z.Universal,namespace:p}:{type:Z.Tag,name:m,namespace:p})}}}return d(),n}var il,np;function m8(){return np||(np=1,il={trueFunc:function(){return!0},falseFunc:function(){return!1}}),il}var Ca=m8();const ce=Pc(Ca),Nb=new Map([[Z.Universal,50],[Z.Tag,30],[Z.Attribute,1],[Z.Pseudo,0]]);function If(e){return!Nb.has(e.type)}const A8=new Map([[We.Exists,10],[We.Equals,8],[We.Not,7],[We.Start,6],[We.End,6],[We.Any,5]]);function g8(e){const t=e.map(Db);for(let n=1;n<e.length;n++){const r=t[n];if(!(r<0))for(let i=n-1;i>=0&&r<t[i];i--){const u=e[i+1];e[i+1]=e[i],e[i]=u,t[i+1]=t[i],t[i]=r}}}function Db(e){var t,n;let r=(t=Nb.get(e.type))!==null&&t!==void 0?t:-1;return e.type===Z.Attribute?(r=(n=A8.get(e.action))!==null&&n!==void 0?n:4,e.action===We.Equals&&e.name==="id"&&(r=9),e.ignoreCase&&(r>>=1)):e.type===Z.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?r=0:Array.isArray(e.data)?(r=Math.min(...e.data.map(i=>Math.min(...i.map(Db)))),r<0&&(r=0)):r=2:r=3),r}const b8=/[-[\]{}()*+?.,\\^$|#\s]/g;function rp(e){return e.replace(b8,"\\$&")}const E8=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function gr(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&E8.has(e.name)}const y8={equals(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;return gr(t,n)?(u=u.toLowerCase(),s=>{const a=r.getAttributeValue(s,i);return a!=null&&a.length===u.length&&a.toLowerCase()===u&&e(s)}):s=>r.getAttributeValue(s,i)===u&&e(s)},hyphen(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=u.length;return gr(t,n)?(u=u.toLowerCase(),function(o){const l=r.getAttributeValue(o,i);return l!=null&&(l.length===s||l.charAt(s)==="-")&&l.substr(0,s).toLowerCase()===u&&e(o)}):function(o){const l=r.getAttributeValue(o,i);return l!=null&&(l.length===s||l.charAt(s)==="-")&&l.substr(0,s)===u&&e(o)}},element(e,t,n){const{adapter:r}=n,{name:i,value:u}=t;if(/\s/.test(u))return ce.falseFunc;const s=new RegExp(`(?:^|\\s)${rp(u)}(?:$|\\s)`,gr(t,n)?"i":"");return function(o){const l=r.getAttributeValue(o,i);return l!=null&&l.length>=u.length&&s.test(l)&&e(o)}},exists(e,{name:t},{adapter:n}){return r=>n.hasAttrib(r,t)&&e(r)},start(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=u.length;return s===0?ce.falseFunc:gr(t,n)?(u=u.toLowerCase(),a=>{const o=r.getAttributeValue(a,i);return o!=null&&o.length>=s&&o.substr(0,s).toLowerCase()===u&&e(a)}):a=>{var o;return!!(!((o=r.getAttributeValue(a,i))===null||o===void 0)&&o.startsWith(u))&&e(a)}},end(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=-u.length;return s===0?ce.falseFunc:gr(t,n)?(u=u.toLowerCase(),a=>{var o;return((o=r.getAttributeValue(a,i))===null||o===void 0?void 0:o.substr(s).toLowerCase())===u&&e(a)}):a=>{var o;return!!(!((o=r.getAttributeValue(a,i))===null||o===void 0)&&o.endsWith(u))&&e(a)}},any(e,t,n){const{adapter:r}=n,{name:i,value:u}=t;if(u==="")return ce.falseFunc;if(gr(t,n)){const s=new RegExp(rp(u),"i");return function(o){const l=r.getAttributeValue(o,i);return l!=null&&l.length>=u.length&&s.test(l)&&e(o)}}return s=>{var a;return!!(!((a=r.getAttributeValue(s,i))===null||a===void 0)&&a.includes(u))&&e(s)}},not(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;return u===""?s=>!!r.getAttributeValue(s,i)&&e(s):gr(t,n)?(u=u.toLowerCase(),s=>{const a=r.getAttributeValue(s,i);return(a==null||a.length!==u.length||a.toLowerCase()!==u)&&e(s)}):s=>r.getAttributeValue(s,i)!==u&&e(s)}},T8=new Set([9,10,12,13,32]),ip=48,C8=57;function k8(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=u(),i=s();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(i??1),a(),t<e.length?(r=u(),a(),i=s()):r=i=0),i===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function u(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function s(){const o=t;let l=0;for(;t<e.length&&e.charCodeAt(t)>=ip&&e.charCodeAt(t)<=C8;)l=l*10+(e.charCodeAt(t)-ip),t++;return t===o?null:l}function a(){for(;t<e.length&&T8.has(e.charCodeAt(t));)t++}}function x8(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return ce.falseFunc;if(t===-1)return u=>u<=n;if(t===0)return u=>u===n;if(t===1)return n<0?ce.trueFunc:u=>u>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?u=>u>=n&&u%r===i:u=>u<=n&&u%r===i}function Ds(e){return x8(k8(e))}function _s(e,t){return n=>{const r=t.getParent(n);return r!=null&&t.isTag(r)&&e(n)}}const Ec={contains(e,t,{adapter:n}){return function(i){return e(i)&&n.getText(i).includes(t)}},icontains(e,t,{adapter:n}){const r=t.toLowerCase();return function(u){return e(u)&&n.getText(u).toLowerCase().includes(r)}},"nth-child"(e,t,{adapter:n,equals:r}){const i=Ds(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?_s(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=0;l<a.length&&!r(s,a[l]);l++)n.isTag(a[l])&&o++;return i(o)&&e(s)}},"nth-last-child"(e,t,{adapter:n,equals:r}){const i=Ds(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?_s(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=a.length-1;l>=0&&!r(s,a[l]);l--)n.isTag(a[l])&&o++;return i(o)&&e(s)}},"nth-of-type"(e,t,{adapter:n,equals:r}){const i=Ds(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?_s(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=0;l<a.length;l++){const c=a[l];if(r(s,c))break;n.isTag(c)&&n.getName(c)===n.getName(s)&&o++}return i(o)&&e(s)}},"nth-last-of-type"(e,t,{adapter:n,equals:r}){const i=Ds(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?_s(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=a.length-1;l>=0;l--){const c=a[l];if(r(s,c))break;n.isTag(c)&&n.getName(c)===n.getName(s)&&o++}return i(o)&&e(s)}},root(e,t,{adapter:n}){return r=>{const i=n.getParent(r);return(i==null||!n.isTag(i))&&e(r)}},scope(e,t,n,r){const{equals:i}=n;return!r||r.length===0?Ec.root(e,t,n):r.length===1?u=>i(r[0],u)&&e(u):u=>r.includes(u)&&e(u)},hover:ul("isHovered"),visited:ul("isVisited"),active:ul("isActive")};function ul(e){return function(n,r,{adapter:i}){const u=i[e];return typeof u!="function"?ce.falseFunc:function(a){return u(a)&&n(a)}}}const up={empty(e,{adapter:t}){return!t.getChildren(e).some(n=>t.isTag(n)||t.getText(n)!=="")},"first-child"(e,{adapter:t,equals:n}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const r=t.getSiblings(e).find(i=>t.isTag(i));return r!=null&&n(e,r)},"last-child"(e,{adapter:t,equals:n}){const r=t.getSiblings(e);for(let i=r.length-1;i>=0;i--){if(n(e,r[i]))return!0;if(t.isTag(r[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let u=0;u<r.length;u++){const s=r[u];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"last-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let u=r.length-1;u>=0;u--){const s=r[u];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){const r=t.getName(e);return t.getSiblings(e).every(i=>n(e,i)||!t.isTag(i)||t.getName(i)!==r)},"only-child"(e,{adapter:t,equals:n}){return t.getSiblings(e).every(r=>n(e,r)||!t.isTag(r))}};function sp(e,t,n,r){if(n===null){if(e.length>r)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===r)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const w8={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
898
902
  :is(button, input, select, textarea, optgroup, option)[disabled],
899
903
  optgroup[disabled] > option,
900
904
  fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
901
- )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},ib={};function DN(e,t){return e===ce.falseFunc?ce.falseFunc:n=>t.isTag(n)&&e(n)}function ub(e,t){const n=t.getSiblings(e);if(n.length<=1)return[];const r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}function gc(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const el=(e,t,n,r,i)=>{const u=i(t,gc(n),r);return u===ce.trueFunc?e:u===ce.falseFunc?ce.falseFunc:s=>u(s)&&e(s)},tl={is:el,matches:el,where:el,not(e,t,n,r,i){const u=i(t,gc(n),r);return u===ce.falseFunc?e:u===ce.trueFunc?ce.falseFunc:s=>!u(s)&&e(s)},has(e,t,n,r,i){const{adapter:u}=n,s=gc(n);s.relativeSelector=!0;const a=t.some(c=>c.some(kf))?[ib]:void 0,o=i(t,s,a);if(o===ce.falseFunc)return ce.falseFunc;const l=DN(o,u);if(a&&o!==ce.trueFunc){const{shouldTestNextSiblings:c=!1}=o;return d=>{if(!e(d))return!1;a[0]=d;const f=u.getChildren(d),p=c?[...f,...ub(d,u)]:f;return u.existsOne(l,p)}}return c=>e(c)&&u.existsOne(l,u.getChildren(c))}};function _N(e,t,n,r,i){var u;const{name:s,data:a}=t;if(Array.isArray(a)){if(!(s in tl))throw new Error(`Unknown pseudo-class :${s}(${a})`);return tl[s](e,a,n,r,i)}const o=(u=n.pseudos)===null||u===void 0?void 0:u[s],l=typeof o=="string"?o:NN[s];if(typeof l=="string"){if(a!=null)throw new Error(`Pseudo ${s} doesn't have any arguments`);const c=Qa(l);return tl.is(e,c,n,r,i)}if(typeof o=="function")return Z0(o,s,a,1),c=>o(c,a)&&e(c);if(s in Ac)return Ac[s](e,a,n,r);if(s in j0){const c=j0[s];return Z0(c,s,a,2),d=>c(d,n,a)&&e(d)}throw new Error(`Unknown pseudo-class :${s}`)}function nl(e,t){const n=t.getParent(e);return n&&t.isTag(n)?n:null}function ON(e,t,n,r,i){const{adapter:u,equals:s}=n;switch(t.type){case Z.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Z.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Z.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!n.xmlMode||n.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),xN[t.action](e,t,n)}case Z.Pseudo:return _N(e,t,n,r,i);case Z.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:a}=t;return(!n.xmlMode||n.lowerCaseTags)&&(a=a.toLowerCase()),function(l){return u.getName(l)===a&&e(l)}}case Z.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(l){let c=l;for(;c=nl(c,u);)if(e(c))return!0;return!1};const a=new WeakSet;return function(l){let c=l;for(;c=nl(c,u);)if(!a.has(c)){if(u.isTag(c)&&e(c))return!0;a.add(c)}return!1}}case"_flexibleDescendant":return function(o){let l=o;do if(e(l))return!0;while(l=nl(l,u));return!1};case Z.Parent:return function(o){return u.getChildren(o).some(l=>u.isTag(l)&&e(l))};case Z.Child:return function(o){const l=u.getParent(o);return l!=null&&u.isTag(l)&&e(l)};case Z.Sibling:return function(o){const l=u.getSiblings(o);for(let c=0;c<l.length;c++){const d=l[c];if(s(o,d))break;if(u.isTag(d)&&e(d))return!0}return!1};case Z.Adjacent:return u.prevElementSibling?function(o){const l=u.prevElementSibling(o);return l!=null&&e(l)}:function(o){const l=u.getSiblings(o);let c;for(let d=0;d<l.length;d++){const f=l[d];if(s(o,f))break;u.isTag(f)&&(c=f)}return!!c&&e(c)};case Z.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function sb(e){return e.type===Z.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(sb)))}const RN={type:Z.Descendant},MN={type:"_flexibleDescendant"},BN={type:Z.Pseudo,name:"scope",data:null};function LN(e,{adapter:t},n){const r=!!n?.every(i=>{const u=t.isTag(i)&&t.getParent(i);return i===ib||u&&t.isTag(u)});for(const i of e){if(!(i.length>0&&kf(i[0])&&i[0].type!==Z.Descendant))if(r&&!i.some(sb))i.unshift(RN);else continue;i.unshift(BN)}}function ab(e,t,n){var r;e.forEach(yN),n=(r=t.context)!==null&&r!==void 0?r:n;const i=Array.isArray(n),u=n&&(Array.isArray(n)?n:[n]);if(t.relativeSelector!==!1)LN(e,t,u);else if(e.some(o=>o.length>0&&kf(o[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let s=!1;const a=e.map(o=>{if(o.length>=2){const[l,c]=o;l.type!==Z.Pseudo||l.name!=="scope"||(i&&c.type===Z.Descendant?o[1]=MN:(c.type===Z.Adjacent||c.type===Z.Sibling)&&(s=!0))}return vN(o,t,u)}).reduce(PN,ce.falseFunc);return a.shouldTestNextSiblings=s,a}function vN(e,t,n){var r;return e.reduce((i,u)=>i===ce.falseFunc?ce.falseFunc:ON(i,u,t,n,ab),(r=t.rootFunc)!==null&&r!==void 0?r:ce.trueFunc)}function PN(e,t){return t===ce.falseFunc||e===ce.trueFunc?e:e===ce.falseFunc||t===ce.trueFunc?t:function(r){return e(r)||t(r)}}const ob=(e,t)=>e===t,FN={adapter:Ka,equals:ob};function HN(e){var t,n,r,i;const u=e??FN;return(t=u.adapter)!==null&&t!==void 0||(u.adapter=Ka),(n=u.equals)!==null&&n!==void 0||(u.equals=(i=(r=u.adapter)===null||r===void 0?void 0:r.equals)!==null&&i!==void 0?i:ob),u}function UN(e){return function(n,r,i){const u=HN(r);return e(n,u,i)}}const wf=UN(ab);function lb(e,t,n=!1){return n&&(e=WN(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function WN(e,t){const n=Array.isArray(e)?e.slice(0):[e],r=n.length;for(let i=0;i<r;i++){const u=ub(n[i],t);n.push(...u)}return n}const KN=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function aa(e){return e.type!=="pseudo"?!1:KN.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(aa)):!1}function QN(e,t,n){const r=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(r)?r>=0?r+1:1/0:0;case"lt":return isFinite(r)?r>=0?Math.min(r,n):1/0:0;case"gt":return isFinite(r)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}function zN(e){for(;e.parent;)e=e.parent;return e}function If(e){const t=[],n=[];for(const r of e)r.some(aa)?t.push(r):n.push(r);return[n,t]}const YN={type:Z.Universal,namespace:null},GN={type:Z.Pseudo,name:"scope",data:null};function cb(e,t,n={}){return db([e],t,n)}function db(e,t,n={}){if(typeof t=="function")return e.some(t);const[r,i]=If(Qa(t));return r.length>0&&e.some(wf(r,n))||i.some(u=>pb(u,e,n).length>0)}function qN(e,t,n,r){const i=typeof n=="string"?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i)<t.length?[i<0?t[t.length+i]:t[i]]:[];case"gt":return isFinite(i)?t.slice(i+1):[];case"even":return t.filter((u,s)=>s%2===0);case"odd":return t.filter((u,s)=>s%2===1);case"not":{const u=new Set(hb(n,t,r));return t.filter(s=>!u.has(s))}}}function fb(e,t,n={}){return hb(Qa(e),t,n)}function hb(e,t,n){if(t.length===0)return[];const[r,i]=If(e);let u;if(r.length){const s=Ec(t,r,n);if(i.length===0)return s;s.length&&(u=new Set(s))}for(let s=0;s<i.length&&u?.size!==t.length;s++){const a=i[s];if((u?t.filter(c=>ne(c)&&!u.has(c)):t).length===0)break;const l=pb(a,t,n);if(l.length)if(u)l.forEach(c=>u.add(c));else{if(s===i.length-1)return l;u=new Set(l)}}return typeof u<"u"?u.size===t.length?t:t.filter(s=>u.has(s)):[]}function pb(e,t,n){var r;if(e.some(uu)){const i=(r=n.root)!==null&&r!==void 0?r:zN(t[0]),u={...n,context:t,relativeSelector:!1};return e.push(GN),oa(i,e,u,!0,t.length)}return oa(t,e,n,!1,t.length)}function VN(e,t,n={},r=1/0){if(typeof e=="function")return mb(t,e);const[i,u]=If(Qa(e)),s=u.map(a=>oa(t,a,n,!0,r));return i.length&&s.push(bc(t,i,n,r)),s.length===0?[]:s.length===1?s[0]:xi(s.reduce((a,o)=>[...a,...o]))}function oa(e,t,n,r,i){const u=t.findIndex(aa),s=t.slice(0,u),a=t[u],o=t.length-1===u?i:1/0,l=QN(a.name,a.data,o);if(l===0)return[];const d=(s.length===0&&!Array.isArray(e)?Wa(e).filter(ne):s.length===0?(Array.isArray(e)?e:[e]).filter(ne):r||s.some(uu)?bc(e,[s],n,l):Ec(e,[s],n)).slice(0,l);let f=qN(a.name,d,a.data,n);if(f.length===0||t.length===u+1)return f;const p=t.slice(u+1),m=p.some(uu);if(m){if(uu(p[0])){const{type:A}=p[0];(A===Z.Sibling||A===Z.Adjacent)&&(f=lb(f,Ka,!0)),p.unshift(YN)}n={...n,relativeSelector:!1,rootFunc:A=>f.includes(A)}}else n.rootFunc&&n.rootFunc!==sa.trueFunc&&(n={...n,rootFunc:sa.trueFunc});return p.some(aa)?oa(f,p,n,!1,i):m?bc(f,[p],n,i):Ec(f,[p],n)}function bc(e,t,n,r){const i=wf(t,n,e);return mb(e,i,r)}function mb(e,t,n=1/0){const r=lb(e,Ka,t.shouldTestNextSiblings);return Ef(i=>ne(i)&&t(i),r,!0,n)}function Ec(e,t,n){const r=(Array.isArray(e)?e:[e]).filter(ne);if(r.length===0)return r;const i=wf(t,n);return i===sa.trueFunc?r:r.filter(i)}const JN=/^\s*[+~]/;function jN(e){if(!e)return this._make([]);if(typeof e!="string"){const t=Dn(e)?e.toArray():[e],n=this.toArray();return this._make(t.filter(r=>n.some(i=>Cf(i,r))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function ZN(e,t){var n;const r=this.toArray(),i=JN.test(e)?r:this.children().toArray(),u={context:r,root:(n=this._root)===null||n===void 0?void 0:n[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(VN(e,i,u,t))}function Sf(e){return function(t,...n){return function(r){var i;let u=e(t,this);return r&&(u=_f(u,r,this.options.xmlMode,(i=this._root)===null||i===void 0?void 0:i[0])),this._make(this.length>1&&u.length>1?n.reduce((s,a)=>a(s),u):u)}}}const $u=Sf((e,t)=>{let n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i.length>0&&(n=n.concat(i))}return n}),Nf=Sf((e,t)=>{const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i!==null&&n.push(i)}return n});function Df(e,...t){let n=null;const r=Sf((i,u)=>{const s=[];return Oe(u,a=>{for(let o;(o=i(a))&&!n?.(o,s.length);a=o)s.push(o)}),s})(e,...t);return function(i,u){n=typeof i=="string"?a=>cb(a,i,this.options):i?es(i):null;const s=r.call(this,u);return n=null,s}}function ki(e){return e.length>1?Array.from(new Set(e)):e}const XN=Nf(({parent:e})=>e&&!lr(e)?e:null,ki),$N=$u(e=>{const t=[];for(;e.parent&&!lr(e.parent);)t.push(e.parent),e=e.parent;return t},xi,e=>e.reverse()),e8=Df(({parent:e})=>e&&!lr(e)?e:null,xi,e=>e.reverse());function t8(e){var t;const n=[];if(!e)return this._make(n);const r={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},i=typeof e=="string"?u=>cb(u,e,r):es(e);return Oe(this,u=>{for(u&&!lr(u)&&!ne(u)&&(u=u.parent);u&&ne(u);){if(i(u,0)){n.includes(u)||n.push(u);break}u=u.parent}}),this._make(n)}const n8=Nf(e=>gf(e)),r8=$u(e=>{const t=[];for(;e.next;)e=e.next,ne(e)&&t.push(e);return t},ki),i8=Df(e=>gf(e),ki),u8=Nf(e=>bf(e)),s8=$u(e=>{const t=[];for(;e.prev;)e=e.prev,ne(e)&&t.push(e);return t},ki),a8=Df(e=>bf(e),ki),o8=$u(e=>Qg(e).filter(t=>ne(t)&&t!==e),xi),l8=$u(e=>Wa(e).filter(ne),ki);function c8(){const e=this.toArray().reduce((t,n)=>Me(n)?t.concat(n.children):t,[]);return this._make(e)}function d8(e){let t=0;const n=this.length;for(;t<n&&e.call(this[t],t,this[t])!==!1;)++t;return this}function f8(e){let t=[];for(let n=0;n<this.length;n++){const r=this[n],i=e.call(r,n,r);i!=null&&(t=t.concat(i))}return this._make(t)}function es(e){return typeof e=="function"?(t,n)=>e.call(t,n,t):Dn(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function h8(e){var t;return this._make(_f(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function _f(e,t,n,r){return typeof t=="string"?fb(t,e,{xmlMode:n,root:r}):e.filter(es(t))}function p8(e){const t=this.toArray();return typeof e=="string"?db(t.filter(ne),e,this.options):e?t.some(es(e)):!1}function m8(e){let t=this.toArray();if(typeof e=="string"){const n=new Set(fb(e,t,this.options));t=t.filter(r=>!n.has(r))}else{const n=es(e);t=t.filter((r,i)=>!n(r,i))}return this._make(t)}function A8(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,n)=>this._make(n).find(e).length>0)}function g8(){return this.length>1?this._make(this[0]):this}function b8(){return this.length>0?this._make(this[this.length-1]):this}function E8(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function y8(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function T8(){return Array.prototype.slice.call(this)}function C8(e){let t,n;return e==null?(t=this.parent().children(),n=this[0]):typeof e=="string"?(t=this._make(e),n=this[0]):(t=this,n=Dn(e)?e[0]:e),Array.prototype.indexOf.call(t,n)}function x8(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function k8(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function w8(e,t){const n=this._make(e,t),r=xi([...this.get(),...n.get()]);return this._make(r)}function I8(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const S8=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:ZN,add:w8,addBack:I8,children:l8,closest:t8,contents:c8,each:d8,end:k8,eq:E8,filter:h8,filterArray:_f,find:jN,first:g8,get:y8,has:A8,index:C8,is:p8,last:b8,map:f8,next:n8,nextAll:r8,nextUntil:i8,not:m8,parent:XN,parents:$N,parentsUntil:e8,prev:u8,prevAll:s8,prevUntil:a8,siblings:o8,slice:x8,toArray:T8},Symbol.toStringTag,{value:"Module"}));function N8(e){return function(n,r,i,u){if(typeof Buffer<"u"&&Buffer.isBuffer(n)&&(n=n.toString()),typeof n=="string")return e(n,r,i,u);const s=n;if(!Array.isArray(s)&&lr(s))return s;const a=new Pr([]);return Fr(s,a),a}}function Fr(e,t){const n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(let r=0;r<n.length;r++){const i=n[r];i.parent&&i.parent.children!==n&&Kr(i),t?(i.prev=n[r-1]||null,i.next=n[r+1]||null):i.prev=i.next=null,i.parent=t}return t}function D8(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(typeof i=="object"){if(i==null)continue;if(!("length"in i)){n.push(t?xu(i,!0):i);continue}}n.push(...this._makeDomArray(i,t))}return n}return[t?xu(e,!0):e]}function Ab(e){return function(...t){const n=this.length-1;return Oe(this,(r,i)=>{if(!Me(r))return;const u=typeof t[0]=="function"?t[0].call(r,i,this._render(r.children)):t,s=this._makeDomArray(u,i<n);e(s,r.children,r)})}}function cr(e,t,n,r,i){var u,s;const a=[t,n,...r],o=t===0?null:e[t-1],l=t+n>=e.length?null:e[t+n];for(let c=0;c<r.length;++c){const d=r[c],f=d.parent;if(f){const m=f.children.indexOf(d);m>-1&&(f.children.splice(m,1),i===f&&t>m&&a[0]--)}d.parent=i,d.prev&&(d.prev.next=(u=d.next)!==null&&u!==void 0?u:null),d.next&&(d.next.prev=(s=d.prev)!==null&&s!==void 0?s:null),d.prev=c===0?o:r[c-1],d.next=c===r.length-1?l:r[c+1]}return o&&(o.next=r[0]),l&&(l.prev=r[r.length-1]),e.splice(...a)}function _8(e){return(Dn(e)?e:this._make(e)).append(this),this}function O8(e){return(Dn(e)?e:this._make(e)).prepend(this),this}const R8=Ab((e,t,n)=>{cr(t,t.length,0,e,n)}),M8=Ab((e,t,n)=>{cr(t,0,0,e,n)});function gb(e){return function(t){const n=this.length-1,r=this.parents().last();for(let i=0;i<this.length;i++){const u=this[i],s=typeof t=="function"?t.call(u,i,u):typeof t=="string"&&!pc(t)?r.find(t).clone():t,[a]=this._makeDomArray(s,i<n);if(!a||!Me(a))continue;let o=a,l=0;for(;l<o.children.length;){const c=o.children[l];ne(c)?(o=c,l=0):l++}e(u,o,[a])}return this}}const B8=gb((e,t,n)=>{const{parent:r}=e;if(!r)return;const i=r.children,u=i.indexOf(e);Fr([e],t),cr(i,u,0,n,r)}),L8=gb((e,t,n)=>{Me(e)&&(Fr(e.children,t),Fr(n,e))});function v8(e){return this.parent(e).not("body").each((t,n)=>{this._make(n).replaceWith(n.children)}),this}function P8(e){const t=this[0];if(t){const n=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let r;for(let u=0;u<n.length;u++)n[u].type==="tag"&&(r=n[u]);let i=0;for(;r&&i<r.children.length;){const u=r.children[i];u.type==="tag"?(r=u,i=0):i++}r&&this._make(r).append(this)}return this}function F8(...e){const t=this.length-1;return Oe(this,(n,r)=>{if(!Me(n)||!n.parent)return;const i=n.parent.children,u=i.indexOf(n);if(u<0)return;const s=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,a=this._makeDomArray(s,r<t);cr(i,u+1,0,a,n.parent)})}function H8(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const n of this._makeDomArray(e)){const r=this.clone().toArray(),{parent:i}=n;if(!i)continue;const u=i.children,s=u.indexOf(n);s<0||(cr(u,s+1,0,r,i),t.push(...r))}return this._make(t)}function U8(...e){const t=this.length-1;return Oe(this,(n,r)=>{if(!Me(n)||!n.parent)return;const i=n.parent.children,u=i.indexOf(n);if(u<0)return;const s=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,a=this._makeDomArray(s,r<t);cr(i,u,0,a,n.parent)})}function W8(e){const t=this._make(e);this.remove();const n=[];return Oe(t,r=>{const i=this.clone().toArray(),{parent:u}=r;if(!u)return;const s=u.children,a=s.indexOf(r);a<0||(cr(s,a,0,i,u),n.push(...i))}),this._make(n)}function K8(e){const t=e?this.filter(e):this;return Oe(t,n=>{Kr(n),n.prev=n.next=n.parent=null}),this}function Q8(e){return Oe(this,(t,n)=>{const{parent:r}=t;if(!r)return;const i=r.children,u=typeof e=="function"?e.call(t,n,t):e,s=this._makeDomArray(u);Fr(s,null);const a=i.indexOf(t);cr(i,a,1,s,r),s.includes(t)||(t.parent=t.prev=t.next=null)})}function z8(){return Oe(this,e=>{if(Me(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function Y8(e){if(e===void 0){const t=this[0];return!t||!Me(t)?null:this._render(t.children)}return Oe(this,t=>{if(!Me(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=Dn(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;Fr(n,t)})}function G8(){return this._render(this)}function q8(e){return e===void 0?ku(this):typeof e=="function"?Oe(this,(t,n)=>this._make(t).text(e.call(t,n,ku([t])))):Oe(this,t=>{if(!Me(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=new Cu(`${e}`);Fr(n,t)})}function V8(){const e=Array.prototype.map.call(this.get(),n=>xu(n,!0)),t=new Pr(e);for(const n of e)n.parent=t;return this._make(e)}const J8=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:D8,after:F8,append:R8,appendTo:_8,before:U8,clone:V8,empty:z8,html:Y8,insertAfter:H8,insertBefore:W8,prepend:M8,prependTo:O8,remove:K8,replaceWith:Q8,text:q8,toString:G8,unwrap:v8,wrap:B8,wrapAll:P8,wrapInner:L8},Symbol.toStringTag,{value:"Module"}));function j8(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return Oe(this,(n,r)=>{ne(n)&&bb(n,e,t,r)});if(this.length!==0)return Eb(this[0],e)}function bb(e,t,n,r){if(typeof t=="string"){const i=Eb(e),u=typeof n=="function"?n.call(e,r,i[t]):n;u===""?delete i[t]:u!=null&&(i[t]=u),e.attribs.style=Z8(i)}else if(typeof t=="object"){const i=Object.keys(t);for(let u=0;u<i.length;u++){const s=i[u];bb(e,s,t[s],u)}}}function Eb(e,t){if(!e||!ne(e))return;const n=X8(e.attribs.style);if(typeof t=="string")return n[t];if(Array.isArray(t)){const r={};for(const i of t)n[i]!=null&&(r[i]=n[i]);return r}return n}function Z8(e){return Object.keys(e).reduce((t,n)=>`${t}${t?" ":""}${n}: ${e[n]};`,"")}function X8(e){if(e=(e||"").trim(),!e)return{};const t={};let n;for(const r of e.split(";")){const i=r.indexOf(":");if(i<1||i===r.length-1){const u=r.trimEnd();u.length>0&&n!==void 0&&(t[n]+=`;${u}`)}else n=r.slice(0,i).trim(),t[n]=r.slice(i+1).trim()}return t}const $8=Object.freeze(Object.defineProperty({__proto__:null,css:j8},Symbol.toStringTag,{value:"Module"})),X0="input,select,textarea,keygen",eD=/%20/g,$0=/\r?\n/g;function tD(){return this.serializeArray().map(n=>`${encodeURIComponent(n.name)}=${encodeURIComponent(n.value)}`).join("&").replace(eD,"+")}function nD(){return this.map((e,t)=>{const n=this._make(t);return ne(t)&&t.name==="form"?n.find(X0).toArray():n.filter(X0).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var n;const r=this._make(t),i=r.attr("name"),u=(n=r.val())!==null&&n!==void 0?n:"";return Array.isArray(u)?u.map(s=>({name:i,value:s.replace($0,`\r
902
- `)})):{name:i,value:u.replace($0,`\r
903
- `)}}).toArray()}const rD=Object.freeze(Object.defineProperty({__proto__:null,serialize:tD,serializeArray:nD},Symbol.toStringTag,{value:"Module"}));function iD(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function uD(e){const t={};for(const n in e){const r=e[n],i=Array.isArray(r),{selector:u,value:s}=iD(i?r[0]:r),a=typeof s=="function"?s:typeof s=="string"?o=>this._make(o).prop(s):o=>this._make(o).extract(s);if(i)t[n]=this._findBySelector(u,Number.POSITIVE_INFINITY).map((o,l)=>a(l,n,t)).get();else{const o=this._findBySelector(u,1);t[n]=o.length>0?a(o[0],n,t):void 0}}return t}const sD=Object.freeze(Object.defineProperty({__proto__:null,extract:uD},Symbol.toStringTag,{value:"Module"}));class ts{constructor(t,n,r){if(this.length=0,this.options=r,this._root=n,t){for(let i=0;i<t.length;i++)this[i]=t[i];this.length=t.length}}}ts.prototype.cheerio="[cheerio object]";ts.prototype.splice=Array.prototype.splice;ts.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(ts.prototype,fN,S8,J8,$8,rD,sD);function aD(e,t){return function n(r,i,u=!0){if(r==null)throw new Error("cheerio.load() expects a string");const s=hc(i),a=e(r,s,u,null);class o extends ts{_make(d,f){const p=l(d,f);return p.prevObject=this,p}_parse(d,f,p,m){return e(d,f,p,m)}_render(d){return t(d,this.options)}}function l(c,d,f=a,p){if(c&&Dn(c))return c;const m=hc(p,s),A=typeof f=="string"?[e(f,m,!1,null)]:"length"in f?f:[f],E=Dn(A)?A:new o(A,null,m);if(E._root=E,!c)return new o(void 0,E,m);const g=typeof c=="string"&&pc(c)?e(c,m,!1,null).children:oD(c)?[c]:Array.isArray(c)?c:void 0,N=new o(g,E,m);if(g)return N;if(typeof c!="string")throw new TypeError("Unexpected type of selector");let w=c;const _=d?typeof d=="string"?pc(d)?new o([e(d,m,!1,null)],E,m):(w=`${d} ${w}`,E):Dn(d)?d:new o(Array.isArray(d)?d:[d],E,m):E;return _?_.find(w):N}return Object.assign(l,eN,{load:n,_root:a,_options:s,fn:o.prototype,prototype:o.prototype}),l}}function oD(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const lD=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ne="�";var b;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(b||(b={}));const ct={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function yb(e){return e>=55296&&e<=57343}function cD(e){return e>=56320&&e<=57343}function dD(e,t){return(e-55296)*1024+9216+t}function Tb(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Cb(e){return e>=64976&&e<=65007||lD.has(e)}var M;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(M||(M={}));const fD=65536;class hD{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=fD,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:u}=this,s=i+n,a=u+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:a,endOffset:a}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(cD(n))return this.pos++,this._addGap(),dD(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,b.EOF;return this._err(M.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;const r=this.html.charCodeAt(n);return r===b.CARRIAGE_RETURN?b.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;let t=this.html.charCodeAt(this.pos);return t===b.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,b.LINE_FEED):t===b.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,yb(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===b.LINE_FEED||t===b.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Tb(t)?this._err(M.controlCharacterInInputStream):Cb(t)&&this._err(M.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ae;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ae||(Ae={}));function xb(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const pD=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),mD=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function AD(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=mD.get(e))!==null&&t!==void 0?t:e}var Qe;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Qe||(Qe={}));const gD=32;var Vn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Vn||(Vn={}));function yc(e){return e>=Qe.ZERO&&e<=Qe.NINE}function bD(e){return e>=Qe.UPPER_A&&e<=Qe.UPPER_F||e>=Qe.LOWER_A&&e<=Qe.LOWER_F}function ED(e){return e>=Qe.UPPER_A&&e<=Qe.UPPER_Z||e>=Qe.LOWER_A&&e<=Qe.LOWER_Z||yc(e)}function yD(e){return e===Qe.EQUALS||ED(e)}var We;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(We||(We={}));var Tn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Tn||(Tn={}));let TD=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=We.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Tn.Strict}startEntity(t){this.decodeMode=t,this.state=We.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case We.EntityStart:return t.charCodeAt(n)===Qe.NUM?(this.state=We.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=We.NamedEntity,this.stateNamedEntity(t,n));case We.NumericStart:return this.stateNumericStart(t,n);case We.NumericDecimal:return this.stateNumericDecimal(t,n);case We.NumericHex:return this.stateNumericHex(t,n);case We.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|gD)===Qe.LOWER_X?(this.state=We.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=We.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const u=r-n;this.result=this.result*Math.pow(i,u)+Number.parseInt(t.substr(n,u),i),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(yc(i)||bD(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(yc(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Qe.SEMI)this.consumed+=1;else if(this.decodeMode===Tn.Strict)return 0;return this.emitCodePoint(AD(this.result),this.consumed),this.errors&&(t!==Qe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],u=(i&Vn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=CD(r,i,this.treeIndex+Math.max(1,u),s),this.treeIndex<0)return this.result===0||this.decodeMode===Tn.Attribute&&(u===0||yD(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],u=(i&Vn.VALUE_LENGTH)>>14,u!==0){if(s===Qe.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Tn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Vn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Vn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case We.NamedEntity:return this.result!==0&&(this.decodeMode!==Tn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case We.NumericDecimal:return this.emitNumericEntity(0,2);case We.NumericHex:return this.emitNumericEntity(0,3);case We.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case We.EntityStart:return 0}}};function CD(e,t,n,r){const i=(t&Vn.BRANCH_LENGTH)>>7,u=t&Vn.JUMP_TABLE;if(i===0)return u!==0&&r===u?n:-1;if(u){const o=r-u;return o<0||o>=i?-1:e[n+o]-1}let s=n,a=s+i-1;for(;s<=a;){const o=s+a>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)a=o-1;else return e[o+i]}return-1}var F;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(F||(F={}));var Ir;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ir||(Ir={}));var yt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(yt||(yt={}));var D;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(D||(D={}));var h;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(h||(h={}));const xD=new Map([[D.A,h.A],[D.ADDRESS,h.ADDRESS],[D.ANNOTATION_XML,h.ANNOTATION_XML],[D.APPLET,h.APPLET],[D.AREA,h.AREA],[D.ARTICLE,h.ARTICLE],[D.ASIDE,h.ASIDE],[D.B,h.B],[D.BASE,h.BASE],[D.BASEFONT,h.BASEFONT],[D.BGSOUND,h.BGSOUND],[D.BIG,h.BIG],[D.BLOCKQUOTE,h.BLOCKQUOTE],[D.BODY,h.BODY],[D.BR,h.BR],[D.BUTTON,h.BUTTON],[D.CAPTION,h.CAPTION],[D.CENTER,h.CENTER],[D.CODE,h.CODE],[D.COL,h.COL],[D.COLGROUP,h.COLGROUP],[D.DD,h.DD],[D.DESC,h.DESC],[D.DETAILS,h.DETAILS],[D.DIALOG,h.DIALOG],[D.DIR,h.DIR],[D.DIV,h.DIV],[D.DL,h.DL],[D.DT,h.DT],[D.EM,h.EM],[D.EMBED,h.EMBED],[D.FIELDSET,h.FIELDSET],[D.FIGCAPTION,h.FIGCAPTION],[D.FIGURE,h.FIGURE],[D.FONT,h.FONT],[D.FOOTER,h.FOOTER],[D.FOREIGN_OBJECT,h.FOREIGN_OBJECT],[D.FORM,h.FORM],[D.FRAME,h.FRAME],[D.FRAMESET,h.FRAMESET],[D.H1,h.H1],[D.H2,h.H2],[D.H3,h.H3],[D.H4,h.H4],[D.H5,h.H5],[D.H6,h.H6],[D.HEAD,h.HEAD],[D.HEADER,h.HEADER],[D.HGROUP,h.HGROUP],[D.HR,h.HR],[D.HTML,h.HTML],[D.I,h.I],[D.IMG,h.IMG],[D.IMAGE,h.IMAGE],[D.INPUT,h.INPUT],[D.IFRAME,h.IFRAME],[D.KEYGEN,h.KEYGEN],[D.LABEL,h.LABEL],[D.LI,h.LI],[D.LINK,h.LINK],[D.LISTING,h.LISTING],[D.MAIN,h.MAIN],[D.MALIGNMARK,h.MALIGNMARK],[D.MARQUEE,h.MARQUEE],[D.MATH,h.MATH],[D.MENU,h.MENU],[D.META,h.META],[D.MGLYPH,h.MGLYPH],[D.MI,h.MI],[D.MO,h.MO],[D.MN,h.MN],[D.MS,h.MS],[D.MTEXT,h.MTEXT],[D.NAV,h.NAV],[D.NOBR,h.NOBR],[D.NOFRAMES,h.NOFRAMES],[D.NOEMBED,h.NOEMBED],[D.NOSCRIPT,h.NOSCRIPT],[D.OBJECT,h.OBJECT],[D.OL,h.OL],[D.OPTGROUP,h.OPTGROUP],[D.OPTION,h.OPTION],[D.P,h.P],[D.PARAM,h.PARAM],[D.PLAINTEXT,h.PLAINTEXT],[D.PRE,h.PRE],[D.RB,h.RB],[D.RP,h.RP],[D.RT,h.RT],[D.RTC,h.RTC],[D.RUBY,h.RUBY],[D.S,h.S],[D.SCRIPT,h.SCRIPT],[D.SEARCH,h.SEARCH],[D.SECTION,h.SECTION],[D.SELECT,h.SELECT],[D.SOURCE,h.SOURCE],[D.SMALL,h.SMALL],[D.SPAN,h.SPAN],[D.STRIKE,h.STRIKE],[D.STRONG,h.STRONG],[D.STYLE,h.STYLE],[D.SUB,h.SUB],[D.SUMMARY,h.SUMMARY],[D.SUP,h.SUP],[D.TABLE,h.TABLE],[D.TBODY,h.TBODY],[D.TEMPLATE,h.TEMPLATE],[D.TEXTAREA,h.TEXTAREA],[D.TFOOT,h.TFOOT],[D.TD,h.TD],[D.TH,h.TH],[D.THEAD,h.THEAD],[D.TITLE,h.TITLE],[D.TR,h.TR],[D.TRACK,h.TRACK],[D.TT,h.TT],[D.U,h.U],[D.UL,h.UL],[D.SVG,h.SVG],[D.VAR,h.VAR],[D.WBR,h.WBR],[D.XMP,h.XMP]]);function za(e){var t;return(t=xD.get(e))!==null&&t!==void 0?t:h.UNKNOWN}const K=h,kD={[F.HTML]:new Set([K.ADDRESS,K.APPLET,K.AREA,K.ARTICLE,K.ASIDE,K.BASE,K.BASEFONT,K.BGSOUND,K.BLOCKQUOTE,K.BODY,K.BR,K.BUTTON,K.CAPTION,K.CENTER,K.COL,K.COLGROUP,K.DD,K.DETAILS,K.DIR,K.DIV,K.DL,K.DT,K.EMBED,K.FIELDSET,K.FIGCAPTION,K.FIGURE,K.FOOTER,K.FORM,K.FRAME,K.FRAMESET,K.H1,K.H2,K.H3,K.H4,K.H5,K.H6,K.HEAD,K.HEADER,K.HGROUP,K.HR,K.HTML,K.IFRAME,K.IMG,K.INPUT,K.LI,K.LINK,K.LISTING,K.MAIN,K.MARQUEE,K.MENU,K.META,K.NAV,K.NOEMBED,K.NOFRAMES,K.NOSCRIPT,K.OBJECT,K.OL,K.P,K.PARAM,K.PLAINTEXT,K.PRE,K.SCRIPT,K.SECTION,K.SELECT,K.SOURCE,K.STYLE,K.SUMMARY,K.TABLE,K.TBODY,K.TD,K.TEMPLATE,K.TEXTAREA,K.TFOOT,K.TH,K.THEAD,K.TITLE,K.TR,K.TRACK,K.UL,K.WBR,K.XMP]),[F.MATHML]:new Set([K.MI,K.MO,K.MN,K.MS,K.MTEXT,K.ANNOTATION_XML]),[F.SVG]:new Set([K.TITLE,K.FOREIGN_OBJECT,K.DESC]),[F.XLINK]:new Set,[F.XML]:new Set,[F.XMLNS]:new Set},Tc=new Set([K.H1,K.H2,K.H3,K.H4,K.H5,K.H6]),wD=new Set([D.STYLE,D.SCRIPT,D.XMP,D.IFRAME,D.NOEMBED,D.NOFRAMES,D.PLAINTEXT]);function ID(e,t){return wD.has(e)||t&&e===D.NOSCRIPT}var y;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(y||(y={}));const ht={DATA:y.DATA,RCDATA:y.RCDATA,RAWTEXT:y.RAWTEXT,SCRIPT_DATA:y.SCRIPT_DATA,PLAINTEXT:y.PLAINTEXT,CDATA_SECTION:y.CDATA_SECTION};function SD(e){return e>=b.DIGIT_0&&e<=b.DIGIT_9}function Yi(e){return e>=b.LATIN_CAPITAL_A&&e<=b.LATIN_CAPITAL_Z}function ND(e){return e>=b.LATIN_SMALL_A&&e<=b.LATIN_SMALL_Z}function Fn(e){return ND(e)||Yi(e)}function ep(e){return Fn(e)||SD(e)}function Es(e){return e+32}function kb(e){return e===b.SPACE||e===b.LINE_FEED||e===b.TABULATION||e===b.FORM_FEED}function tp(e){return kb(e)||e===b.SOLIDUS||e===b.GREATER_THAN_SIGN}function DD(e){return e===b.NULL?M.nullCharacterReference:e>1114111?M.characterReferenceOutsideUnicodeRange:yb(e)?M.surrogateCharacterReference:Cb(e)?M.noncharacterCharacterReference:Tb(e)||e===b.CARRIAGE_RETURN?M.controlCharacterReference:null}let _D=class{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=y.DATA,this.returnState=y.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new hD(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new TD(pD,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(M.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(M.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=DD(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ae.START_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ae.END_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ae.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ae.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(xb(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(M.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=za(t.tagName),t.type===Ae.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(M.endTagWithAttributes),t.selfClosing&&this._err(M.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ae.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ae.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ae.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ae.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=kb(t)?Ae.WHITESPACE_CHARACTER:t===b.NULL?Ae.NULL_CHARACTER:Ae.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ae.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=y.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Tn.Attribute:Tn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===y.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===y.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===y.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case y.DATA:{this._stateData(t);break}case y.RCDATA:{this._stateRcdata(t);break}case y.RAWTEXT:{this._stateRawtext(t);break}case y.SCRIPT_DATA:{this._stateScriptData(t);break}case y.PLAINTEXT:{this._statePlaintext(t);break}case y.TAG_OPEN:{this._stateTagOpen(t);break}case y.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case y.TAG_NAME:{this._stateTagName(t);break}case y.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case y.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case y.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case y.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case y.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case y.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case y.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case y.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case y.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case y.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case y.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case y.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case y.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case y.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case y.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case y.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case y.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case y.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case y.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case y.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case y.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case y.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case y.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case y.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case y.BOGUS_COMMENT:{this._stateBogusComment(t);break}case y.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case y.COMMENT_START:{this._stateCommentStart(t);break}case y.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case y.COMMENT:{this._stateComment(t);break}case y.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case y.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case y.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case y.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case y.COMMENT_END:{this._stateCommentEnd(t);break}case y.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case y.DOCTYPE:{this._stateDoctype(t);break}case y.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case y.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case y.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case y.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case y.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case y.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case y.CDATA_SECTION:{this._stateCdataSection(t);break}case y.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case y.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case y.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case y.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=y.TAG_OPEN;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitCodePoint(t);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case b.AMPERSAND:{this._startCharacterReference();break}case b.LESS_THAN_SIGN:{this.state=y.RCDATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Ne);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case b.LESS_THAN_SIGN:{this.state=y.RAWTEXT_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Ne);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Ne);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Ne);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Fn(t))this._createStartTagToken(),this.state=y.TAG_NAME,this._stateTagName(t);else switch(t){case b.EXCLAMATION_MARK:{this.state=y.MARKUP_DECLARATION_OPEN;break}case b.SOLIDUS:{this.state=y.END_TAG_OPEN;break}case b.QUESTION_MARK:{this._err(M.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=y.BOGUS_COMMENT,this._stateBogusComment(t);break}case b.EOF:{this._err(M.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(M.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=y.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Fn(t))this._createEndTagToken(),this.state=y.TAG_NAME,this._stateTagName(t);else switch(t){case b.GREATER_THAN_SIGN:{this._err(M.missingEndTagName),this.state=y.DATA;break}case b.EOF:{this._err(M.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(M.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=y.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this.state=y.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.tagName+=Ne;break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Yi(t)?Es(t):t)}}_stateRcdataLessThanSign(t){t===b.SOLIDUS?this.state=y.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=y.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Fn(t)?(this.state=y.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=y.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=y.BEFORE_ATTRIBUTE_NAME,!1;case b.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=y.SELF_CLOSING_START_TAG,!1;case b.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=y.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===b.SOLIDUS?this.state=y.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=y.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Fn(t)?(this.state=y.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=y.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case b.SOLIDUS:{this.state=y.SCRIPT_DATA_END_TAG_OPEN;break}case b.EXCLAMATION_MARK:{this.state=y.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=y.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Fn(t)?(this.state=y.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===b.HYPHEN_MINUS?(this.state=y.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===b.HYPHEN_MINUS?(this.state=y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Ne);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_ESCAPED,this._emitChars(Ne);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.GREATER_THAN_SIGN:{this.state=y.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_ESCAPED,this._emitChars(Ne);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===b.SOLIDUS?this.state=y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Fn(t)?(this._emitChars("<"),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Fn(t)?(this.state=y.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ct.SCRIPT,!1)&&tp(this.preprocessor.peek(ct.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ct.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Ne);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ne);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.GREATER_THAN_SIGN:{this.state=y.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ne);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===b.SOLIDUS?(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ct.SCRIPT,!1)&&tp(this.preprocessor.peek(ct.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ct.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=y.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this.state=y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._err(M.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=y.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=y.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this._leaveAttrName(),this.state=y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._leaveAttrName(),this.state=y.BEFORE_ATTRIBUTE_VALUE;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:{this._err(M.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.name+=Ne;break}default:this.currentAttr.name+=String.fromCodePoint(Yi(t)?Es(t):t)}}_stateAfterAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:{this.state=y.SELF_CLOSING_START_TAG;break}case b.EQUALS_SIGN:{this.state=y.BEFORE_ATTRIBUTE_VALUE;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=y.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{this.state=y.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this.state=y.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingAttributeValue),this.state=y.DATA,this.emitCurrentTagToken();break}default:this.state=y.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case b.QUOTATION_MARK:{this.state=y.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.value+=Ne;break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case b.APOSTROPHE:{this.state=y.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.value+=Ne;break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=y.BEFORE_ATTRIBUTE_NAME;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=y.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.value+=Ne;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:case b.EQUALS_SIGN:case b.GRAVE_ACCENT:{this._err(M.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=y.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this._leaveAttrValue(),this.state=y.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=y.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this._err(M.missingWhitespaceBetweenAttributes),this.state=y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case b.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=y.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this._err(M.unexpectedSolidusInTag),this.state=y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentComment(n);break}case b.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.data+=Ne;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ct.DASH_DASH,!0)?(this._createCommentToken(ct.DASH_DASH.length+1),this.state=y.COMMENT_START):this._consumeSequenceIfMatch(ct.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ct.DOCTYPE.length+1),this.state=y.DOCTYPE):this._consumeSequenceIfMatch(ct.CDATA_START,!0)?this.inForeignNode?this.state=y.CDATA_SECTION:(this._err(M.cdataInHtmlContent),this._createCommentToken(ct.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=y.BOGUS_COMMENT):this._ensureHibernation()||(this._err(M.incorrectlyOpenedComment),this._createCommentToken(2),this.state=y.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_START_DASH;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptClosingOfEmptyComment),this.state=y.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=y.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_END;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptClosingOfEmptyComment),this.state=y.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=y.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_END_DASH;break}case b.LESS_THAN_SIGN:{n.data+="<",this.state=y.COMMENT_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.data+=Ne;break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case b.EXCLAMATION_MARK:{n.data+="!",this.state=y.COMMENT_LESS_THAN_SIGN_BANG;break}case b.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=y.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===b.HYPHEN_MINUS?this.state=y.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=y.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===b.HYPHEN_MINUS?this.state=y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=y.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==b.GREATER_THAN_SIGN&&t!==b.EOF&&this._err(M.nestedComment),this.state=y.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_END;break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=y.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentComment(n);break}case b.EXCLAMATION_MARK:{this.state=y.COMMENT_END_BANG;break}case b.HYPHEN_MINUS:{n.data+="-";break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=y.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{n.data+="--!",this.state=y.COMMENT_END_DASH;break}case b.GREATER_THAN_SIGN:{this._err(M.incorrectlyClosedComment),this.state=y.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=y.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case b.EOF:{this._err(M.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingWhitespaceBeforeDoctypeName),this.state=y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Yi(t))this._createDoctypeToken(String.fromCharCode(Es(t))),this.state=y.DOCTYPE_NAME;else switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.NULL:{this._err(M.unexpectedNullCharacter),this._createDoctypeToken(Ne),this.state=y.DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=y.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.AFTER_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.name+=Ne;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Yi(t)?Es(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ct.PUBLIC,!1)?this.state=y.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ct.SYSTEM,!1)?this.state=y.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(M.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(M.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(M.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.publicId+=Ne;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.publicId+=Ne;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.QUOTATION_MARK:{this._err(M.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(M.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.QUOTATION_MARK:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(M.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(M.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.systemId+=Ne;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.systemId+=Ne;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.NULL:{this._err(M.unexpectedNullCharacter);break}case b.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case b.RIGHT_SQUARE_BRACKET:{this.state=y.CDATA_SECTION_BRACKET;break}case b.EOF:{this._err(M.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===b.RIGHT_SQUARE_BRACKET?this.state=y.CDATA_SECTION_END:(this._emitChars("]"),this.state=y.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case b.GREATER_THAN_SIGN:{this.state=y.DATA;break}case b.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=y.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(b.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ep(this.preprocessor.peek(1))?y.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ep(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===b.SEMICOLON&&this._err(M.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const wb=new Set([h.DD,h.DT,h.LI,h.OPTGROUP,h.OPTION,h.P,h.RB,h.RP,h.RT,h.RTC]),np=new Set([...wb,h.CAPTION,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]),la=new Set([h.APPLET,h.CAPTION,h.HTML,h.MARQUEE,h.OBJECT,h.TABLE,h.TD,h.TEMPLATE,h.TH]),OD=new Set([...la,h.OL,h.UL]),RD=new Set([...la,h.BUTTON]),rp=new Set([h.ANNOTATION_XML,h.MI,h.MN,h.MO,h.MS,h.MTEXT]),ip=new Set([h.DESC,h.FOREIGN_OBJECT,h.TITLE]),MD=new Set([h.TR,h.TEMPLATE,h.HTML]),BD=new Set([h.TBODY,h.TFOOT,h.THEAD,h.TEMPLATE,h.HTML]),LD=new Set([h.TABLE,h.TEMPLATE,h.HTML]),vD=new Set([h.TD,h.TH]);class PD{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=h.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===h.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===F.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==F.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Tc,F.HTML)}popUntilTableCellPopped(){this.popUntilPopped(vD,F.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(LD,F.HTML)}clearBackToTableBodyContext(){this.clearBackTo(BD,F.HTML)}clearBackToTableRowContext(){this.clearBackTo(MD,F.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===h.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===h.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case F.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case F.SVG:{if(ip.has(i))return!1;break}case F.MATHML:{if(rp.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,la)}hasInListItemScope(t){return this.hasInDynamicScope(t,OD)}hasInButtonScope(t){return this.hasInDynamicScope(t,RD)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case F.HTML:{if(Tc.has(n))return!0;if(la.has(n))return!1;break}case F.SVG:{if(ip.has(n))return!1;break}case F.MATHML:{if(rp.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===F.HTML)switch(this.tagIDs[n]){case t:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===F.HTML)switch(this.tagIDs[t]){case h.TBODY:case h.THEAD:case h.TFOOT:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===F.HTML)switch(this.tagIDs[n]){case t:return!0;case h.OPTION:case h.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&wb.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&np.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&np.has(this.currentTagId);)this.pop()}}const rl=3;var jt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(jt||(jt={}));const up={type:jt.Marker};class FD{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,u=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let a=0;a<this.entries.length;a++){const o=this.entries[a];if(o.type===jt.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===u&&this.treeAdapter.getNamespaceURI(l)===s){const c=this.treeAdapter.getAttrList(l);c.length===i&&r.push({idx:a,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<rl)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<rl)return;const i=new Map(n.map(s=>[s.name,s.value]));let u=0;for(let s=0;s<r.length;s++){const a=r[s];a.attrs.every(o=>i.get(o.name)===o.value)&&(u+=1,u>=rl&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(up)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:jt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:jt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(up);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===jt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===jt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===jt.Element&&n.element===t)}}const bn={createDocument(){return{nodeName:"#document",mode:yt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(u=>u.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};bn.appendChild(e,u)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(bn.isTextNode(n)){n.value+=t;return}}bn.appendChild(e,bn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&bn.isTextNode(r)?r.value+=t:bn.insertBefore(e,bn.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Ib="html",HD="about:legacy-compat",UD="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Sb=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],WD=[...Sb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],KD=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Nb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],QD=[...Nb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function sp(e,t){return t.some(n=>e.startsWith(n))}function zD(e){return e.name===Ib&&e.publicId===null&&(e.systemId===null||e.systemId===HD)}function YD(e){if(e.name!==Ib)return yt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===UD)return yt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),KD.has(n))return yt.QUIRKS;let r=t===null?WD:Sb;if(sp(n,r))return yt.QUIRKS;if(r=t===null?Nb:QD,sp(n,r))return yt.LIMITED_QUIRKS}return yt.NO_QUIRKS}const ap={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},GD="definitionurl",qD="definitionURL",VD=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),JD=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:F.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:F.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:F.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:F.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:F.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:F.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:F.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:F.XML}],["xml:space",{prefix:"xml",name:"space",namespace:F.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:F.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:F.XMLNS}]]),jD=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),ZD=new Set([h.B,h.BIG,h.BLOCKQUOTE,h.BODY,h.BR,h.CENTER,h.CODE,h.DD,h.DIV,h.DL,h.DT,h.EM,h.EMBED,h.H1,h.H2,h.H3,h.H4,h.H5,h.H6,h.HEAD,h.HR,h.I,h.IMG,h.LI,h.LISTING,h.MENU,h.META,h.NOBR,h.OL,h.P,h.PRE,h.RUBY,h.S,h.SMALL,h.SPAN,h.STRONG,h.STRIKE,h.SUB,h.SUP,h.TABLE,h.TT,h.U,h.UL,h.VAR]);function XD(e){const t=e.tagID;return t===h.FONT&&e.attrs.some(({name:r})=>r===Ir.COLOR||r===Ir.SIZE||r===Ir.FACE)||ZD.has(t)}function Db(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===GD){e.attrs[t].name=qD;break}}function _b(e){for(let t=0;t<e.attrs.length;t++){const n=VD.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Of(e){for(let t=0;t<e.attrs.length;t++){const n=JD.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function $D(e){const t=jD.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=za(e.tagName))}function e5(e,t){return t===F.MATHML&&(e===h.MI||e===h.MO||e===h.MN||e===h.MS||e===h.MTEXT)}function t5(e,t,n){if(t===F.MATHML&&e===h.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ir.ENCODING){const i=n[r].value.toLowerCase();return i===ap.TEXT_HTML||i===ap.APPLICATION_XML}}return t===F.SVG&&(e===h.FOREIGN_OBJECT||e===h.DESC||e===h.TITLE)}function n5(e,t,n,r){return(!r||r===F.HTML)&&t5(e,t,n)||(!r||r===F.MATHML)&&e5(e,t)}const r5="hidden",i5=8,u5=3;var T;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(T||(T={}));const s5={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ob=new Set([h.TABLE,h.TBODY,h.TFOOT,h.THEAD,h.TR]),op={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:bn,onParseError:null};let Rb=class{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...op,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new _D(this.options,this),this.activeFormattingElements=new FD(this.treeAdapter),this.fragmentContextID=r?za(this.treeAdapter.getTagName(r)):h.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new PD(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...op,...n};t??(t=r.treeAdapter.createElement(D.TEMPLATE,F.HTML,[]));const i=r.treeAdapter.createElement("documentmock",F.HTML,[]),u=new this(r,i,t);return u.fragmentContextID===h.TEMPLATE&&u.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const u=(i=t.location)!==null&&i!==void 0?i:s5,s={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:r?u.startLine:u.endLine,endCol:r?u.startCol:u.endCol,endOffset:r?u.startOffset:u.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,u;(u=(i=this.treeAdapter).onItemPush)===null||u===void 0||u.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let u,s;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,s=this.fragmentContextID):{current:u,currentTagId:s}=this.openElements,this._setContextModes(u,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===F.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,F.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=ht.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===D.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==F.HTML))switch(this.fragmentContextID){case h.TITLE:case h.TEXTAREA:{this.tokenizer.state=ht.RCDATA;break}case h.STYLE:case h.XMP:case h.IFRAME:case h.NOEMBED:case h.NOFRAMES:case h.NOSCRIPT:{this.tokenizer.state=ht.RAWTEXT;break}case h.SCRIPT:{this.tokenizer.state=ht.SCRIPT_DATA;break}case h.PLAINTEXT:{this.tokenizer.state=ht.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,F.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,F.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(D.HTML,F.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,h.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),u=r?i.lastIndexOf(r):i.length,s=i[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),u=n.type===Ae.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===h.SVG&&this.treeAdapter.getTagName(n)===D.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===F.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===h.MGLYPH||t.tagID===h.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,F.HTML)}_processToken(t){switch(t.type){case Ae.CHARACTER:{this.onCharacter(t);break}case Ae.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ae.COMMENT:{this.onComment(t);break}case Ae.DOCTYPE:{this.onDoctype(t);break}case Ae.START_TAG:{this._processStartTag(t);break}case Ae.END_TAG:{this.onEndTag(t);break}case Ae.EOF:{this.onEof(t);break}case Ae.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return n5(t,i,u,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===jt.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const u=this.activeFormattingElements.entries[i];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(h.P),this.openElements.popUntilTagNamePopped(h.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case h.TR:{this.insertionMode=T.IN_ROW;return}case h.TBODY:case h.THEAD:case h.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case h.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case h.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case h.TABLE:{this.insertionMode=T.IN_TABLE;return}case h.BODY:{this.insertionMode=T.IN_BODY;return}case h.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case h.SELECT:{this._resetInsertionModeForSelect(t);return}case h.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case h.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case h.TD:case h.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case h.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===h.TEMPLATE)break;if(r===h.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return Ob.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case h.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===F.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case h.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return kD[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){v_(this,t);return}switch(this.insertionMode){case T.INITIAL:{Bi(this,t);break}case T.BEFORE_HTML:{su(this,t);break}case T.BEFORE_HEAD:{au(this,t);break}case T.IN_HEAD:{ou(this,t);break}case T.IN_HEAD_NO_SCRIPT:{lu(this,t);break}case T.AFTER_HEAD:{cu(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{Bb(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{il(this,t);break}case T.IN_TABLE_TEXT:{Ub(this,t);break}case T.IN_COLUMN_GROUP:{ca(this,t);break}case T.AFTER_BODY:{da(this,t);break}case T.AFTER_AFTER_BODY:{Ps(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){L_(this,t);return}switch(this.insertionMode){case T.INITIAL:{Bi(this,t);break}case T.BEFORE_HTML:{su(this,t);break}case T.BEFORE_HEAD:{au(this,t);break}case T.IN_HEAD:{ou(this,t);break}case T.IN_HEAD_NO_SCRIPT:{lu(this,t);break}case T.AFTER_HEAD:{cu(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{il(this,t);break}case T.IN_COLUMN_GROUP:{ca(this,t);break}case T.AFTER_BODY:{da(this,t);break}case T.AFTER_AFTER_BODY:{Ps(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Cc(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Cc(this,t);break}case T.IN_TABLE_TEXT:{Li(this,t);break}case T.AFTER_BODY:{h5(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{p5(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{m5(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,M.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Li(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,M.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?P_(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Bi(this,t);break}case T.BEFORE_HTML:{A5(this,t);break}case T.BEFORE_HEAD:{b5(this,t);break}case T.IN_HEAD:{Yt(this,t);break}case T.IN_HEAD_NO_SCRIPT:{T5(this,t);break}case T.AFTER_HEAD:{x5(this,t);break}case T.IN_BODY:{rt(this,t);break}case T.IN_TABLE:{pi(this,t);break}case T.IN_TABLE_TEXT:{Li(this,t);break}case T.IN_CAPTION:{E_(this,t);break}case T.IN_COLUMN_GROUP:{Bf(this,t);break}case T.IN_TABLE_BODY:{qa(this,t);break}case T.IN_ROW:{Va(this,t);break}case T.IN_CELL:{C_(this,t);break}case T.IN_SELECT:{Qb(this,t);break}case T.IN_SELECT_IN_TABLE:{k_(this,t);break}case T.IN_TEMPLATE:{I_(this,t);break}case T.AFTER_BODY:{N_(this,t);break}case T.IN_FRAMESET:{D_(this,t);break}case T.AFTER_FRAMESET:{O_(this,t);break}case T.AFTER_AFTER_BODY:{M_(this,t);break}case T.AFTER_AFTER_FRAMESET:{B_(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?F_(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Bi(this,t);break}case T.BEFORE_HTML:{g5(this,t);break}case T.BEFORE_HEAD:{E5(this,t);break}case T.IN_HEAD:{y5(this,t);break}case T.IN_HEAD_NO_SCRIPT:{C5(this,t);break}case T.AFTER_HEAD:{k5(this,t);break}case T.IN_BODY:{Ga(this,t);break}case T.TEXT:{l_(this,t);break}case T.IN_TABLE:{Su(this,t);break}case T.IN_TABLE_TEXT:{Li(this,t);break}case T.IN_CAPTION:{y_(this,t);break}case T.IN_COLUMN_GROUP:{T_(this,t);break}case T.IN_TABLE_BODY:{xc(this,t);break}case T.IN_ROW:{Kb(this,t);break}case T.IN_CELL:{x_(this,t);break}case T.IN_SELECT:{zb(this,t);break}case T.IN_SELECT_IN_TABLE:{w_(this,t);break}case T.IN_TEMPLATE:{S_(this,t);break}case T.AFTER_BODY:{Gb(this,t);break}case T.IN_FRAMESET:{__(this,t);break}case T.AFTER_FRAMESET:{R_(this,t);break}case T.AFTER_AFTER_BODY:{Ps(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Bi(this,t);break}case T.BEFORE_HTML:{su(this,t);break}case T.BEFORE_HEAD:{au(this,t);break}case T.IN_HEAD:{ou(this,t);break}case T.IN_HEAD_NO_SCRIPT:{lu(this,t);break}case T.AFTER_HEAD:{cu(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{Fb(this,t);break}case T.TEXT:{c_(this,t);break}case T.IN_TABLE_TEXT:{Li(this,t);break}case T.IN_TEMPLATE:{Yb(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Mf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===b.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Mb(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{il(this,t);break}case T.IN_TABLE_TEXT:{Hb(this,t);break}}}};function a5(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Pb(e,t),n}function o5(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function l5(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let u=0,s=i;s!==n;u++,s=i){i=e.openElements.getCommonAncestor(s);const a=e.activeFormattingElements.getElementEntry(s),o=a&&u>=u5;!a||o?(o&&e.activeFormattingElements.removeEntry(a),e.openElements.remove(s)):(s=c5(e,a),r===t&&(e.activeFormattingElements.bookmark=a),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function c5(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function d5(e,t,n){const r=e.treeAdapter.getTagName(t),i=za(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);i===h.TEMPLATE&&u===F.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function f5(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,u=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,i.tagID)}function Rf(e,t){for(let n=0;n<i5;n++){const r=a5(e,t);if(!r)break;const i=o5(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const u=l5(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(u),s&&d5(e,s,u),f5(e,i,r)}}function Cc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function h5(e,t){e._appendCommentNode(t,e.openElements.items[0])}function p5(e,t){e._appendCommentNode(t,e.document)}function Mf(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(u);s&&!s.endTag&&e._setEndLocation(u,t)}}}}function m5(e,t){e._setDocumentType(t);const n=t.forceQuirks?yt.QUIRKS:YD(t);zD(t)||e._err(t,M.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Bi(e,t){e._err(t,M.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,yt.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function A5(e,t){t.tagID===h.HTML?(e._insertElement(t,F.HTML),e.insertionMode=T.BEFORE_HEAD):su(e,t)}function g5(e,t){const n=t.tagID;(n===h.HTML||n===h.HEAD||n===h.BODY||n===h.BR)&&su(e,t)}function su(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function b5(e,t){switch(t.tagID){case h.HTML:{rt(e,t);break}case h.HEAD:{e._insertElement(t,F.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:au(e,t)}}function E5(e,t){const n=t.tagID;n===h.HEAD||n===h.BODY||n===h.HTML||n===h.BR?au(e,t):e._err(t,M.endTagWithoutMatchingOpenElement)}function au(e,t){e._insertFakeElement(D.HEAD,h.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function Yt(e,t){switch(t.tagID){case h.HTML:{rt(e,t);break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:{e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.TITLE:{e._switchToTextParsing(t,ht.RCDATA);break}case h.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ht.RAWTEXT):(e._insertElement(t,F.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case h.NOFRAMES:case h.STYLE:{e._switchToTextParsing(t,ht.RAWTEXT);break}case h.SCRIPT:{e._switchToTextParsing(t,ht.SCRIPT_DATA);break}case h.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case h.HEAD:{e._err(t,M.misplacedStartTagForHeadElement);break}default:ou(e,t)}}function y5(e,t){switch(t.tagID){case h.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case h.BODY:case h.BR:case h.HTML:{ou(e,t);break}case h.TEMPLATE:{Qr(e,t);break}default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function Qr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==h.TEMPLATE&&e._err(t,M.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,M.endTagWithoutMatchingOpenElement)}function ou(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function T5(e,t){switch(t.tagID){case h.HTML:{rt(e,t);break}case h.BASEFONT:case h.BGSOUND:case h.HEAD:case h.LINK:case h.META:case h.NOFRAMES:case h.STYLE:{Yt(e,t);break}case h.NOSCRIPT:{e._err(t,M.nestedNoscriptInHead);break}default:lu(e,t)}}function C5(e,t){switch(t.tagID){case h.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case h.BR:{lu(e,t);break}default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function lu(e,t){const n=t.type===Ae.EOF?M.openElementsLeftAfterEof:M.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function x5(e,t){switch(t.tagID){case h.HTML:{rt(e,t);break}case h.BODY:{e._insertElement(t,F.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case h.FRAMESET:{e._insertElement(t,F.HTML),e.insertionMode=T.IN_FRAMESET;break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{e._err(t,M.abandonedHeadElementChild),e.openElements.push(e.headElement,h.HEAD),Yt(e,t),e.openElements.remove(e.headElement);break}case h.HEAD:{e._err(t,M.misplacedStartTagForHeadElement);break}default:cu(e,t)}}function k5(e,t){switch(t.tagID){case h.BODY:case h.HTML:case h.BR:{cu(e,t);break}case h.TEMPLATE:{Qr(e,t);break}default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function cu(e,t){e._insertFakeElement(D.BODY,h.BODY),e.insertionMode=T.IN_BODY,Ya(e,t)}function Ya(e,t){switch(t.type){case Ae.CHARACTER:{Bb(e,t);break}case Ae.WHITESPACE_CHARACTER:{Mb(e,t);break}case Ae.COMMENT:{Cc(e,t);break}case Ae.START_TAG:{rt(e,t);break}case Ae.END_TAG:{Ga(e,t);break}case Ae.EOF:{Fb(e,t);break}}}function Mb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Bb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function w5(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function I5(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function S5(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_FRAMESET)}function N5(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML)}function D5(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Tc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,F.HTML)}function _5(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function O5(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),n||(e.formElement=e.openElements.current))}function R5(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===h.LI&&i===h.LI||(n===h.DD||n===h.DT)&&(i===h.DD||i===h.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==h.ADDRESS&&i!==h.DIV&&i!==h.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML)}function M5(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),e.tokenizer.state=ht.PLAINTEXT}function B5(e,t){e.openElements.hasInScope(h.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.framesetOk=!1}function L5(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(D.A);n&&(Rf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function v5(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function P5(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(h.NOBR)&&(Rf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,F.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function F5(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function H5(e,t){e.treeAdapter.getDocumentMode(e.document)!==yt.QUIRKS&&e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Lb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,F.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vb(e){const t=xb(e,Ir.TYPE);return t!=null&&t.toLowerCase()===r5}function U5(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,F.HTML),vb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function W5(e,t){e._appendElement(t,F.HTML),t.ackSelfClosing=!0}function K5(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._appendElement(t,F.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Q5(e,t){t.tagName=D.IMG,t.tagID=h.IMG,Lb(e,t)}function z5(e,t){e._insertElement(t,F.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ht.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function Y5(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ht.RAWTEXT)}function G5(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ht.RAWTEXT)}function lp(e,t){e._switchToTextParsing(t,ht.RAWTEXT)}function q5(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function V5(e,t){e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML)}function J5(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,F.HTML)}function j5(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(h.RTC),e._insertElement(t,F.HTML)}function Z5(e,t){e._reconstructActiveFormattingElements(),Db(t),Of(t),t.selfClosing?e._appendElement(t,F.MATHML):e._insertElement(t,F.MATHML),t.ackSelfClosing=!0}function X5(e,t){e._reconstructActiveFormattingElements(),_b(t),Of(t),t.selfClosing?e._appendElement(t,F.SVG):e._insertElement(t,F.SVG),t.ackSelfClosing=!0}function cp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML)}function rt(e,t){switch(t.tagID){case h.I:case h.S:case h.B:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.SMALL:case h.STRIKE:case h.STRONG:{v5(e,t);break}case h.A:{L5(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{D5(e,t);break}case h.P:case h.DL:case h.OL:case h.UL:case h.DIV:case h.DIR:case h.NAV:case h.MAIN:case h.MENU:case h.ASIDE:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.DETAILS:case h.ADDRESS:case h.ARTICLE:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{N5(e,t);break}case h.LI:case h.DD:case h.DT:{R5(e,t);break}case h.BR:case h.IMG:case h.WBR:case h.AREA:case h.EMBED:case h.KEYGEN:{Lb(e,t);break}case h.HR:{K5(e,t);break}case h.RB:case h.RTC:{J5(e,t);break}case h.RT:case h.RP:{j5(e,t);break}case h.PRE:case h.LISTING:{_5(e,t);break}case h.XMP:{Y5(e,t);break}case h.SVG:{X5(e,t);break}case h.HTML:{w5(e,t);break}case h.BASE:case h.LINK:case h.META:case h.STYLE:case h.TITLE:case h.SCRIPT:case h.BGSOUND:case h.BASEFONT:case h.TEMPLATE:{Yt(e,t);break}case h.BODY:{I5(e,t);break}case h.FORM:{O5(e,t);break}case h.NOBR:{P5(e,t);break}case h.MATH:{Z5(e,t);break}case h.TABLE:{H5(e,t);break}case h.INPUT:{U5(e,t);break}case h.PARAM:case h.TRACK:case h.SOURCE:{W5(e,t);break}case h.IMAGE:{Q5(e,t);break}case h.BUTTON:{B5(e,t);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{F5(e,t);break}case h.IFRAME:{G5(e,t);break}case h.SELECT:{q5(e,t);break}case h.OPTION:case h.OPTGROUP:{V5(e,t);break}case h.NOEMBED:case h.NOFRAMES:{lp(e,t);break}case h.FRAMESET:{S5(e,t);break}case h.TEXTAREA:{z5(e,t);break}case h.NOSCRIPT:{e.options.scriptingEnabled?lp(e,t):cp(e,t);break}case h.PLAINTEXT:{M5(e,t);break}case h.COL:case h.TH:case h.TD:case h.TR:case h.HEAD:case h.FRAME:case h.TBODY:case h.TFOOT:case h.THEAD:case h.CAPTION:case h.COLGROUP:break;default:cp(e,t)}}function $5(e,t){if(e.openElements.hasInScope(h.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function e_(e,t){e.openElements.hasInScope(h.BODY)&&(e.insertionMode=T.AFTER_BODY,Gb(e,t))}function t_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function n_(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(h.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(h.FORM):n&&e.openElements.remove(n))}function r_(e){e.openElements.hasInButtonScope(h.P)||e._insertFakeElement(D.P,h.P),e._closePElement()}function i_(e){e.openElements.hasInListItemScope(h.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(h.LI),e.openElements.popUntilTagNamePopped(h.LI))}function u_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function s_(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function a_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function o_(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(D.BR,h.BR),e.openElements.pop(),e.framesetOk=!1}function Pb(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const u=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==h.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(u,s))break}}function Ga(e,t){switch(t.tagID){case h.A:case h.B:case h.I:case h.S:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.NOBR:case h.SMALL:case h.STRIKE:case h.STRONG:{Rf(e,t);break}case h.P:{r_(e);break}case h.DL:case h.UL:case h.OL:case h.DIR:case h.DIV:case h.NAV:case h.PRE:case h.MAIN:case h.MENU:case h.ASIDE:case h.BUTTON:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.ADDRESS:case h.ARTICLE:case h.DETAILS:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.LISTING:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{t_(e,t);break}case h.LI:{i_(e);break}case h.DD:case h.DT:{u_(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{s_(e);break}case h.BR:{o_(e);break}case h.BODY:{$5(e,t);break}case h.HTML:{e_(e,t);break}case h.FORM:{n_(e);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{a_(e,t);break}case h.TEMPLATE:{Qr(e,t);break}default:Pb(e,t)}}function Fb(e,t){e.tmplInsertionModeStack.length>0?Yb(e,t):Mf(e,t)}function l_(e,t){var n;t.tagID===h.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function c_(e,t){e._err(t,M.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function il(e,t){if(e.openElements.currentTagId!==void 0&&Ob.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case Ae.CHARACTER:{Ub(e,t);break}case Ae.WHITESPACE_CHARACTER:{Hb(e,t);break}}else ns(e,t)}function d_(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_CAPTION}function f_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function h_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(D.COLGROUP,h.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Bf(e,t)}function p_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_TABLE_BODY}function m_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(D.TBODY,h.TBODY),e.insertionMode=T.IN_TABLE_BODY,qa(e,t)}function A_(e,t){e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function g_(e,t){vb(t)?e._appendElement(t,F.HTML):ns(e,t),t.ackSelfClosing=!0}function b_(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,F.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function pi(e,t){switch(t.tagID){case h.TD:case h.TH:case h.TR:{m_(e,t);break}case h.STYLE:case h.SCRIPT:case h.TEMPLATE:{Yt(e,t);break}case h.COL:{h_(e,t);break}case h.FORM:{b_(e,t);break}case h.TABLE:{A_(e,t);break}case h.TBODY:case h.TFOOT:case h.THEAD:{p_(e,t);break}case h.INPUT:{g_(e,t);break}case h.CAPTION:{d_(e,t);break}case h.COLGROUP:{f_(e,t);break}default:ns(e,t)}}function Su(e,t){switch(t.tagID){case h.TABLE:{e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode());break}case h.TEMPLATE:{Qr(e,t);break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:ns(e,t)}}function ns(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ya(e,t),e.fosterParentingEnabled=n}function Hb(e,t){e.pendingCharacterTokens.push(t)}function Ub(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Li(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ns(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Wb=new Set([h.CAPTION,h.COL,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]);function E_(e,t){const n=t.tagID;Wb.has(n)?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,pi(e,t)):rt(e,t)}function y_(e,t){const n=t.tagID;switch(n){case h.CAPTION:case h.TABLE:{e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===h.TABLE&&Su(e,t));break}case h.BODY:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:Ga(e,t)}}function Bf(e,t){switch(t.tagID){case h.HTML:{rt(e,t);break}case h.COL:{e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.TEMPLATE:{Yt(e,t);break}default:ca(e,t)}}function T_(e,t){switch(t.tagID){case h.COLGROUP:{e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case h.TEMPLATE:{Qr(e,t);break}case h.COL:break;default:ca(e,t)}}function ca(e,t){e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function qa(e,t){switch(t.tagID){case h.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_ROW;break}case h.TH:case h.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(D.TR,h.TR),e.insertionMode=T.IN_ROW,Va(e,t);break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,pi(e,t));break}default:pi(e,t)}}function xc(e,t){const n=t.tagID;switch(t.tagID){case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case h.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,Su(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:case h.TR:break;default:Su(e,t)}}function Va(e,t){switch(t.tagID){case h.TH:case h.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,qa(e,t));break}default:pi(e,t)}}function Kb(e,t){switch(t.tagID){case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case h.TABLE:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,xc(e,t));break}case h.TBODY:case h.TFOOT:case h.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(h.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,xc(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:break;default:Su(e,t)}}function C_(e,t){const n=t.tagID;Wb.has(n)?(e.openElements.hasInTableScope(h.TD)||e.openElements.hasInTableScope(h.TH))&&(e._closeTableCell(),Va(e,t)):rt(e,t)}function x_(e,t){const n=t.tagID;switch(n){case h.TD:case h.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case h.TABLE:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Kb(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:break;default:Ga(e,t)}}function Qb(e,t){switch(t.tagID){case h.HTML:{rt(e,t);break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._insertElement(t,F.HTML);break}case h.OPTGROUP:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._insertElement(t,F.HTML);break}case h.HR:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.INPUT:case h.KEYGEN:case h.TEXTAREA:case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),t.tagID!==h.SELECT&&e._processStartTag(t));break}case h.SCRIPT:case h.TEMPLATE:{Yt(e,t);break}}}function zb(e,t){switch(t.tagID){case h.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===h.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===h.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop();break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop();break}case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode());break}case h.TEMPLATE:{Qr(e,t);break}}}function k_(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Qb(e,t)}function w_(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e.onEndTag(t)):zb(e,t)}function I_(e,t){switch(t.tagID){case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{Yt(e,t);break}case h.CAPTION:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,pi(e,t);break}case h.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Bf(e,t);break}case h.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,qa(e,t);break}case h.TD:case h.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,Va(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,rt(e,t)}}function S_(e,t){t.tagID===h.TEMPLATE&&Qr(e,t)}function Yb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Mf(e,t)}function N_(e,t){t.tagID===h.HTML?rt(e,t):da(e,t)}function Gb(e,t){var n;if(t.tagID===h.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===h.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else da(e,t)}function da(e,t){e.insertionMode=T.IN_BODY,Ya(e,t)}function D_(e,t){switch(t.tagID){case h.HTML:{rt(e,t);break}case h.FRAMESET:{e._insertElement(t,F.HTML);break}case h.FRAME:{e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.NOFRAMES:{Yt(e,t);break}}}function __(e,t){t.tagID===h.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==h.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function O_(e,t){switch(t.tagID){case h.HTML:{rt(e,t);break}case h.NOFRAMES:{Yt(e,t);break}}}function R_(e,t){t.tagID===h.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function M_(e,t){t.tagID===h.HTML?rt(e,t):Ps(e,t)}function Ps(e,t){e.insertionMode=T.IN_BODY,Ya(e,t)}function B_(e,t){switch(t.tagID){case h.HTML:{rt(e,t);break}case h.NOFRAMES:{Yt(e,t);break}}}function L_(e,t){t.chars=Ne,e._insertCharacters(t)}function v_(e,t){e._insertCharacters(t),e.framesetOk=!1}function qb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==F.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function P_(e,t){if(XD(t))qb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===F.MATHML?Db(t):r===F.SVG&&($D(t),_b(t)),Of(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function F_(e,t){if(t.tagID===h.P||t.tagID===h.BR){qb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===F.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}function Vb(e,t){return function(r){let i,u=0,s="";for(;i=e.exec(r);)u!==i.index&&(s+=r.substring(u,i.index)),s+=t.get(i[0].charCodeAt(0)),u=i.index+1;return s+r.substring(u)}}const H_=Vb(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),U_=Vb(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),W_=new Set([D.AREA,D.BASE,D.BASEFONT,D.BGSOUND,D.BR,D.COL,D.EMBED,D.FRAME,D.HR,D.IMG,D.INPUT,D.KEYGEN,D.LINK,D.META,D.PARAM,D.SOURCE,D.TRACK,D.WBR]);function K_(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===F.HTML&&W_.has(t.treeAdapter.getTagName(e))}const Q_={treeAdapter:bn,scriptingEnabled:!0};function z_(e,t){const n={...Q_,...t};return Jb(e,n)}function Y_(e,t){let n="";const r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===D.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===F.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(r);if(i)for(const u of i)n+=Jb(u,t);return n}function Jb(e,t){return t.treeAdapter.isElementNode(e)?G_(e,t):t.treeAdapter.isTextNode(e)?V_(e,t):t.treeAdapter.isCommentNode(e)?J_(e,t):t.treeAdapter.isDocumentTypeNode(e)?j_(e,t):""}function G_(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${q_(e,t)}>${K_(e,t)?"":`${Y_(e,t)}</${n}>`}`}function q_(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case F.XML:{n+=`xml:${r.name}`;break}case F.XMLNS:{r.name!=="xmlns"&&(n+="xmlns:"),n+=r.name;break}case F.XLINK:{n+=`xlink:${r.name}`;break}default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${H_(r.value)}"`}return n}function V_(e,t){const{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),u=i&&n.isElementNode(i)&&n.getTagName(i);return u&&n.getNamespaceURI(i)===F.HTML&&ID(u,t.scriptingEnabled)?r:U_(r)}function J_(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function j_(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function Z_(e,t){return Rb.parse(e,t)}function X_(e,t,n){typeof e=="string"&&(n=t,t=e,e=null);const r=Rb.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}function dp(e){const t=e.includes('"')?"'":'"';return t+e+t}function $_(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${dp(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${dp(n)}`),r}const Wn={isCommentNode:Ha,isElementNode:ne,isTextNode:en,createDocument(){const e=new Pr([]);return e["x-mode"]=yt.NO_QUIRKS,e},createDocumentFragment(){return new Pr([])},createElement(e,t,n){const r=Object.create(null),i=Object.create(null),u=Object.create(null);for(let a=0;a<n.length;a++){const o=n[a].name;r[o]=n[a].value,i[o]=n[a].namespace,u[o]=n[a].prefix}const s=new Af(e,r,[]);return s.namespace=t,s["x-attribsNamespace"]=i,s["x-attribsPrefix"]=u,s},createCommentNode(e){return new hf(e)},createTextNode(e){return new Cu(e)},appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const r=e.children.indexOf(n),{prev:i}=n;i&&(i.next=t,t.prev=i),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(e,t){Wn.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,n,r){const i=$_(t,n,r);let u=e.children.find(s=>fc(s)&&s.name==="!doctype");u?u.data=i??null:(u=new pf("!doctype",i),Wn.appendChild(e,u)),u["x-name"]=t,u["x-publicId"]=n,u["x-systemId"]=r},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:r}=e;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const n=e.children[e.children.length-1];n&&en(n)?n.data+=t:Wn.appendChild(e,Wn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&en(r)?r.data+=t:Wn.insertBefore(e,Wn.createTextNode(t),n)},adoptAttributes(e,t){for(let n=0;n<t.length;n++){const r=t[n].name;e.attribs[r]===void 0&&(e.attribs[r]=t[n].value,e["x-attribsNamespace"][r]=t[n].namespace,e["x-attribsPrefix"][r]=t[n].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return fc(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function eO(e,t,n,r){var i;return(i=t.treeAdapter)!==null&&i!==void 0||(t.treeAdapter=Wn),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),n?Z_(e,t):X_(r,e,t)}const tO={treeAdapter:Wn};function nO(e){const t="length"in e?e:[e];for(let r=0;r<t.length;r+=1){const i=t[r];lr(i)&&Array.prototype.splice.call(t,r,1,...i.children)}let n="";for(let r=0;r<t.length;r+=1){const i=t[r];n+=z_(i,tO)}return n}const jb=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Zb=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var ul;const rO=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),kc=(ul=String.fromCodePoint)!==null&&ul!==void 0?ul:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function iO(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=rO.get(e))!==null&&t!==void 0?t:e}var ze;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ze||(ze={}));const uO=32;var Jn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Jn||(Jn={}));function wc(e){return e>=ze.ZERO&&e<=ze.NINE}function sO(e){return e>=ze.UPPER_A&&e<=ze.UPPER_F||e>=ze.LOWER_A&&e<=ze.LOWER_F}function aO(e){return e>=ze.UPPER_A&&e<=ze.UPPER_Z||e>=ze.LOWER_A&&e<=ze.LOWER_Z||wc(e)}function oO(e){return e===ze.EQUALS||aO(e)}var Ke;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ke||(Ke={}));var Zt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Zt||(Zt={}));class Xb{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Zt.Strict}startEntity(t){this.decodeMode=t,this.state=Ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ke.EntityStart:return t.charCodeAt(n)===ze.NUM?(this.state=Ke.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ke.NamedEntity,this.stateNamedEntity(t,n));case Ke.NumericStart:return this.stateNumericStart(t,n);case Ke.NumericDecimal:return this.stateNumericDecimal(t,n);case Ke.NumericHex:return this.stateNumericHex(t,n);case Ke.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|uO)===ze.LOWER_X?(this.state=Ke.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ke.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const u=r-n;this.result=this.result*Math.pow(i,u)+parseInt(t.substr(n,u),i),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(wc(i)||sO(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(wc(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ze.SEMI)this.consumed+=1;else if(this.decodeMode===Zt.Strict)return 0;return this.emitCodePoint(iO(this.result),this.consumed),this.errors&&(t!==ze.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],u=(i&Jn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=lO(r,i,this.treeIndex+Math.max(1,u),s),this.treeIndex<0)return this.result===0||this.decodeMode===Zt.Attribute&&(u===0||oO(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],u=(i&Jn.VALUE_LENGTH)>>14,u!==0){if(s===ze.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Zt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Jn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Jn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ke.NamedEntity:return this.result!==0&&(this.decodeMode!==Zt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ke.NumericDecimal:return this.emitNumericEntity(0,2);case Ke.NumericHex:return this.emitNumericEntity(0,3);case Ke.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ke.EntityStart:return 0}}}function $b(e){let t="";const n=new Xb(e,r=>t+=kc(r));return function(i,u){let s=0,a=0;for(;(a=i.indexOf("&",a))>=0;){t+=i.slice(s,a),n.startEntity(u);const l=n.write(i,a+1);if(l<0){s=a+n.end();break}s=a+l,a=l===0?s+1:s}const o=t+i.slice(s);return t="",o}}function lO(e,t,n,r){const i=(t&Jn.BRANCH_LENGTH)>>7,u=t&Jn.JUMP_TABLE;if(i===0)return u!==0&&r===u?n:-1;if(u){const o=r-u;return o<0||o>=i?-1:e[n+o]-1}let s=n,a=s+i-1;for(;s<=a;){const o=s+a>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)a=o-1;else return e[o+i]}return-1}$b(jb);$b(Zb);var $;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})($||($={}));var U;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(U||(U={}));function An(e){return e===$.Space||e===$.NewLine||e===$.Tab||e===$.FormFeed||e===$.CarriageReturn}function ys(e){return e===$.Slash||e===$.Gt||An(e)}function cO(e){return e>=$.LowerA&&e<=$.LowerZ||e>=$.UpperA&&e<=$.UpperZ}var Xt;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Xt||(Xt={}));const Ye={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class dO{constructor({xmlMode:t=!1,decodeEntities:n=!0},r){this.cbs=r,this.state=U.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=U.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=n,this.entityDecoder=new Xb(t?Zb:jb,(i,u)=>this.emitCodePoint(i,u))}reset(){this.state=U.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=U.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===$.Lt||!this.decodeEntities&&this.fastForwardTo($.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=U.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===$.Amp&&this.startEntity()}stateSpecialStartSequence(t){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?ys(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=U.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===$.Gt||An(t)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const r=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=r}this.isSpecial=!1,this.sectionStart=n+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Ye.TitleEnd?this.decodeEntities&&t===$.Amp&&this.startEntity():this.fastForwardTo($.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===$.Lt)}stateCDATASequence(t){t===Ye.Cdata[this.sequenceIndex]?++this.sequenceIndex===Ye.Cdata.length&&(this.state=U.InCommentLike,this.currentSequence=Ye.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=U.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Ye.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=U.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!ys(t):cO(t)}startSpecial(t,n){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=n,this.state=U.SpecialStartSequence}stateBeforeTagName(t){if(t===$.ExclamationMark)this.state=U.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===$.Questionmark)this.state=U.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const n=t|32;this.sectionStart=this.index,this.xmlMode?this.state=U.InTagName:n===Ye.ScriptEnd[2]?this.state=U.BeforeSpecialS:n===Ye.TitleEnd[2]?this.state=U.BeforeSpecialT:this.state=U.InTagName}else t===$.Slash?this.state=U.BeforeClosingTagName:(this.state=U.Text,this.stateText(t))}stateInTagName(t){ys(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){An(t)||(t===$.Gt?this.state=U.Text:(this.state=this.isTagStartChar(t)?U.InClosingTagName:U.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===$.Gt||An(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=U.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.state=U.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===$.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=U.InSpecialTag,this.sequenceIndex=0):this.state=U.Text,this.sectionStart=this.index+1):t===$.Slash?this.state=U.InSelfClosingTag:An(t)||(this.state=U.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===$.Gt?(this.cbs.onselfclosingtag(this.index),this.state=U.Text,this.sectionStart=this.index+1,this.isSpecial=!1):An(t)||(this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===$.Eq||ys(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=U.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===$.Eq?this.state=U.BeforeAttributeValue:t===$.Slash||t===$.Gt?(this.cbs.onattribend(Xt.NoValue,this.sectionStart),this.sectionStart=-1,this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t)):An(t)||(this.cbs.onattribend(Xt.NoValue,this.sectionStart),this.state=U.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===$.DoubleQuote?(this.state=U.InAttributeValueDq,this.sectionStart=this.index+1):t===$.SingleQuote?(this.state=U.InAttributeValueSq,this.sectionStart=this.index+1):An(t)||(this.sectionStart=this.index,this.state=U.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,n){t===n||!this.decodeEntities&&this.fastForwardTo(n)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===$.DoubleQuote?Xt.Double:Xt.Single,this.index+1),this.state=U.BeforeAttributeName):this.decodeEntities&&t===$.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,$.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,$.SingleQuote)}stateInAttributeValueNoQuotes(t){An(t)||t===$.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Xt.Unquoted,this.index),this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===$.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===$.OpeningSquareBracket?(this.state=U.CDATASequence,this.sequenceIndex=0):this.state=t===$.Dash?U.BeforeComment:U.InDeclaration}stateInDeclaration(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=U.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=U.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===$.Dash?(this.state=U.InCommentLike,this.currentSequence=Ye.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=U.InDeclaration}stateInSpecialComment(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=U.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const n=t|32;n===Ye.ScriptEnd[3]?this.startSpecial(Ye.ScriptEnd,4):n===Ye.StyleEnd[3]?this.startSpecial(Ye.StyleEnd,4):(this.state=U.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const n=t|32;n===Ye.TitleEnd[3]?this.startSpecial(Ye.TitleEnd,4):n===Ye.TextareaEnd[3]?this.startSpecial(Ye.TextareaEnd,4):(this.state=U.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=U.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Zt.Strict:this.baseState===U.Text||this.baseState===U.InSpecialTag?Zt.Legacy:Zt.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===U.Text||this.state===U.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===U.InAttributeValueDq||this.state===U.InAttributeValueSq||this.state===U.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case U.Text:{this.stateText(t);break}case U.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case U.InSpecialTag:{this.stateInSpecialTag(t);break}case U.CDATASequence:{this.stateCDATASequence(t);break}case U.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case U.InAttributeName:{this.stateInAttributeName(t);break}case U.InCommentLike:{this.stateInCommentLike(t);break}case U.InSpecialComment:{this.stateInSpecialComment(t);break}case U.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case U.InTagName:{this.stateInTagName(t);break}case U.InClosingTagName:{this.stateInClosingTagName(t);break}case U.BeforeTagName:{this.stateBeforeTagName(t);break}case U.AfterAttributeName:{this.stateAfterAttributeName(t);break}case U.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case U.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case U.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case U.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case U.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case U.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case U.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case U.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case U.InDeclaration:{this.stateInDeclaration(t);break}case U.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case U.BeforeComment:{this.stateBeforeComment(t);break}case U.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case U.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===U.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===U.InCommentLike?this.currentSequence===Ye.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===U.InTagName||this.state===U.BeforeAttributeName||this.state===U.BeforeAttributeValue||this.state===U.AfterAttributeName||this.state===U.InAttributeName||this.state===U.InAttributeValueSq||this.state===U.InAttributeValueDq||this.state===U.InAttributeValueNq||this.state===U.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){this.baseState!==U.Text&&this.baseState!==U.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const Vr=new Set(["input","option","optgroup","select","button","datalist","textarea"]),xe=new Set(["p"]),fp=new Set(["thead","tbody"]),hp=new Set(["dd","dt"]),pp=new Set(["rt","rp"]),fO=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",xe],["h1",xe],["h2",xe],["h3",xe],["h4",xe],["h5",xe],["h6",xe],["select",Vr],["input",Vr],["output",Vr],["button",Vr],["datalist",Vr],["textarea",Vr],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",hp],["dt",hp],["address",xe],["article",xe],["aside",xe],["blockquote",xe],["details",xe],["div",xe],["dl",xe],["fieldset",xe],["figcaption",xe],["figure",xe],["footer",xe],["form",xe],["header",xe],["hr",xe],["main",xe],["nav",xe],["ol",xe],["pre",xe],["section",xe],["table",xe],["ul",xe],["rt",pp],["rp",pp],["tbody",fp],["tfoot",fp]]),hO=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),mp=new Set(["math","svg"]),Ap=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),pO=/\s|\//;class mO{constructor(t,n={}){var r,i,u,s,a,o;this.options=n,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(r=n.lowerCaseTags)!==null&&r!==void 0?r:this.htmlMode,this.lowerCaseAttributeNames=(i=n.lowerCaseAttributeNames)!==null&&i!==void 0?i:this.htmlMode,this.recognizeSelfClosing=(u=n.recognizeSelfClosing)!==null&&u!==void 0?u:!this.htmlMode,this.tokenizer=new((s=n.Tokenizer)!==null&&s!==void 0?s:dO)(this.options,this),this.foreignContext=[!this.htmlMode],(o=(a=this.cbs).onparserinit)===null||o===void 0||o.call(a,this)}ontext(t,n){var r,i;const u=this.getSlice(t,n);this.endIndex=n-1,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,u),this.startIndex=n}ontextentity(t,n){var r,i;this.endIndex=n-1,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,kc(t)),this.startIndex=n}isVoidElement(t){return this.htmlMode&&hO.has(t)}onopentagname(t,n){this.endIndex=n;let r=this.getSlice(t,n);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)}emitOpenTag(t){var n,r,i,u;this.openTagStart=this.startIndex,this.tagname=t;const s=this.htmlMode&&fO.get(t);if(s)for(;this.stack.length>0&&s.has(this.stack[0]);){const a=this.stack.shift();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,a,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(mp.has(t)?this.foreignContext.unshift(!0):Ap.has(t)&&this.foreignContext.unshift(!1))),(u=(i=this.cbs).onopentagname)===null||u===void 0||u.call(i,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,n){var r,i,u,s,a,o,l,c;this.endIndex=n;let d=this.getSlice(t,n);if(this.lowerCaseTagNames&&(d=d.toLowerCase()),this.htmlMode&&(mp.has(d)||Ap.has(d))&&this.foreignContext.shift(),this.isVoidElement(d))this.htmlMode&&d==="br"&&((s=(u=this.cbs).onopentagname)===null||s===void 0||s.call(u,"br"),(o=(a=this.cbs).onopentag)===null||o===void 0||o.call(a,"br",{},!0),(c=(l=this.cbs).onclosetag)===null||c===void 0||c.call(l,"br",!1));else{const f=this.stack.indexOf(d);if(f!==-1)for(let p=0;p<=f;p++){const m=this.stack.shift();(i=(r=this.cbs).onclosetag)===null||i===void 0||i.call(r,m,p!==f)}else this.htmlMode&&d==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var n,r;const i=this.tagname;this.endOpenTag(t),this.stack[0]===i&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,i,!t),this.stack.shift())}onattribname(t,n){this.startIndex=t;const r=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r}onattribdata(t,n){this.attribvalue+=this.getSlice(t,n)}onattribentity(t){this.attribvalue+=kc(t)}onattribend(t,n){var r,i;this.endIndex=n,(i=(r=this.cbs).onattribute)===null||i===void 0||i.call(r,this.attribname,this.attribvalue,t===Xt.Double?'"':t===Xt.Single?"'":t===Xt.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const n=t.search(pO);let r=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r}ondeclaration(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(r);this.cbs.onprocessinginstruction(`!${i}`,`!${r}`)}this.startIndex=n+1}onprocessinginstruction(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(r);this.cbs.onprocessinginstruction(`?${i}`,`?${r}`)}this.startIndex=n+1}oncomment(t,n,r){var i,u,s,a;this.endIndex=n,(u=(i=this.cbs).oncomment)===null||u===void 0||u.call(i,this.getSlice(t,n-r)),(a=(s=this.cbs).oncommentend)===null||a===void 0||a.call(s),this.startIndex=n+1}oncdata(t,n,r){var i,u,s,a,o,l,c,d,f,p;this.endIndex=n;const m=this.getSlice(t,n-r);!this.htmlMode||this.options.recognizeCDATA?((u=(i=this.cbs).oncdatastart)===null||u===void 0||u.call(i),(a=(s=this.cbs).ontext)===null||a===void 0||a.call(s,m),(l=(o=this.cbs).oncdataend)===null||l===void 0||l.call(o)):((d=(c=this.cbs).oncomment)===null||d===void 0||d.call(c,`[CDATA[${m}]]`),(p=(f=this.cbs).oncommentend)===null||p===void 0||p.call(f)),this.startIndex=n+1}onend(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let r=0;r<this.stack.length;r++)this.cbs.onclosetag(this.stack[r],!0)}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)}reset(){var t,n,r,i;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(i=(r=this.cbs).onparserinit)===null||i===void 0||i.call(r,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let r=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);for(;n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}function AO(e,t){const n=new u4(void 0,t);return new mO(n,t).end(e),n.root}const gO=N8((e,t,n,r)=>t._useHtmlParser2?AO(e,t):eO(e,t,n,r)),bO=aD(gO,(e,t)=>t._useHtmlParser2?Ua(e,t):nO(e)),EO=Object.freeze(Object.defineProperty({__proto__:null,contains:Cf,load:bO,merge:Jg},Symbol.toStringTag,{value:"Module"})),yO=x3(EO);var sl={},al={exports:{}},ol={exports:{}},gp;function Lf(){return gp||(gp=1,(function(e,t){e.exports=n;function n(i){return r.bind(null,i)}function r(i){var u=[].slice.call(arguments,1);u.unshift("["+i+"]"),process.stderr.write(u.join(" ")+`
904
- `)}})(ol)),ol.exports}var bp;function e2(){return bp||(bp=1,(function(e,t){Lf()("lex"),e.exports=n;function n(r){var i="",u,s=0,a=-1,o=0,l=1,c="before-selector",d=[c],f={},p=[],m=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function A(){return Q(),r[a]}function E(W){return W?d[d.length-1-W]:c}function g(W){var q=a+1;return W===r.slice(q,q+W.length)}function N(W){var q=r.slice(a).indexOf(W);return q>0?q:!1}function w(W){return W===_(1)}function _(W){return r[a+(W||1)]}function S(){var W=d.pop();return c=d[d.length-1],W}function k(W){return c=W,d.push(c),d.length}function R(W){var q=c;return d[d.length-1]=c=W,q}function Q(W){if((W||1)==1)r[a]==`
905
- `?(l++,s=1):s++,a++;else{var q=r.slice(a,a+W).split(`
906
- `);q.length>1&&(l+=q.length-1,s=1),s+=q[q.length-1].length,a=a+W}}function O(){f.end={line:l,col:s},p.push(f),i="",f={}}function x(W){f={type:W,start:{line:l,col:s}}}for(;u=A();)switch(u){case" ":switch(E()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":i+=u;break}break;case`
905
+ )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},_b={};function I8(e,t){return e===ce.falseFunc?ce.falseFunc:n=>t.isTag(n)&&e(n)}function Ob(e,t){const n=t.getSiblings(e);if(n.length<=1)return[];const r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}function yc(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const sl=(e,t,n,r,i)=>{const u=i(t,yc(n),r);return u===ce.trueFunc?e:u===ce.falseFunc?ce.falseFunc:s=>u(s)&&e(s)},al={is:sl,matches:sl,where:sl,not(e,t,n,r,i){const u=i(t,yc(n),r);return u===ce.falseFunc?e:u===ce.trueFunc?ce.falseFunc:s=>!u(s)&&e(s)},has(e,t,n,r,i){const{adapter:u}=n,s=yc(n);s.relativeSelector=!0;const a=t.some(c=>c.some(If))?[_b]:void 0,o=i(t,s,a);if(o===ce.falseFunc)return ce.falseFunc;const l=I8(o,u);if(a&&o!==ce.trueFunc){const{shouldTestNextSiblings:c=!1}=o;return d=>{if(!e(d))return!1;a[0]=d;const f=u.getChildren(d),p=c?[...f,...Ob(d,u)]:f;return u.existsOne(l,p)}}return c=>e(c)&&u.existsOne(l,u.getChildren(c))}};function S8(e,t,n,r,i){var u;const{name:s,data:a}=t;if(Array.isArray(a)){if(!(s in al))throw new Error(`Unknown pseudo-class :${s}(${a})`);return al[s](e,a,n,r,i)}const o=(u=n.pseudos)===null||u===void 0?void 0:u[s],l=typeof o=="string"?o:w8[s];if(typeof l=="string"){if(a!=null)throw new Error(`Pseudo ${s} doesn't have any arguments`);const c=ja(l);return al.is(e,c,n,r,i)}if(typeof o=="function")return sp(o,s,a,1),c=>o(c,a)&&e(c);if(s in Ec)return Ec[s](e,a,n,r);if(s in up){const c=up[s];return sp(c,s,a,2),d=>c(d,n,a)&&e(d)}throw new Error(`Unknown pseudo-class :${s}`)}function ol(e,t){const n=t.getParent(e);return n&&t.isTag(n)?n:null}function N8(e,t,n,r,i){const{adapter:u,equals:s}=n;switch(t.type){case Z.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Z.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Z.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!n.xmlMode||n.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),y8[t.action](e,t,n)}case Z.Pseudo:return S8(e,t,n,r,i);case Z.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:a}=t;return(!n.xmlMode||n.lowerCaseTags)&&(a=a.toLowerCase()),function(l){return u.getName(l)===a&&e(l)}}case Z.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(l){let c=l;for(;c=ol(c,u);)if(e(c))return!0;return!1};const a=new WeakSet;return function(l){let c=l;for(;c=ol(c,u);)if(!a.has(c)){if(u.isTag(c)&&e(c))return!0;a.add(c)}return!1}}case"_flexibleDescendant":return function(o){let l=o;do if(e(l))return!0;while(l=ol(l,u));return!1};case Z.Parent:return function(o){return u.getChildren(o).some(l=>u.isTag(l)&&e(l))};case Z.Child:return function(o){const l=u.getParent(o);return l!=null&&u.isTag(l)&&e(l)};case Z.Sibling:return function(o){const l=u.getSiblings(o);for(let c=0;c<l.length;c++){const d=l[c];if(s(o,d))break;if(u.isTag(d)&&e(d))return!0}return!1};case Z.Adjacent:return u.prevElementSibling?function(o){const l=u.prevElementSibling(o);return l!=null&&e(l)}:function(o){const l=u.getSiblings(o);let c;for(let d=0;d<l.length;d++){const f=l[d];if(s(o,f))break;u.isTag(f)&&(c=f)}return!!c&&e(c)};case Z.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function Rb(e){return e.type===Z.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(Rb)))}const D8={type:Z.Descendant},_8={type:"_flexibleDescendant"},O8={type:Z.Pseudo,name:"scope",data:null};function R8(e,{adapter:t},n){const r=!!n?.every(i=>{const u=t.isTag(i)&&t.getParent(i);return i===_b||u&&t.isTag(u)});for(const i of e){if(!(i.length>0&&If(i[0])&&i[0].type!==Z.Descendant))if(r&&!i.some(Rb))i.unshift(D8);else continue;i.unshift(O8)}}function Mb(e,t,n){var r;e.forEach(g8),n=(r=t.context)!==null&&r!==void 0?r:n;const i=Array.isArray(n),u=n&&(Array.isArray(n)?n:[n]);if(t.relativeSelector!==!1)R8(e,t,u);else if(e.some(o=>o.length>0&&If(o[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let s=!1;const a=e.map(o=>{if(o.length>=2){const[l,c]=o;l.type!==Z.Pseudo||l.name!=="scope"||(i&&c.type===Z.Descendant?o[1]=_8:(c.type===Z.Adjacent||c.type===Z.Sibling)&&(s=!0))}return M8(o,t,u)}).reduce(B8,ce.falseFunc);return a.shouldTestNextSiblings=s,a}function M8(e,t,n){var r;return e.reduce((i,u)=>i===ce.falseFunc?ce.falseFunc:N8(i,u,t,n,Mb),(r=t.rootFunc)!==null&&r!==void 0?r:ce.trueFunc)}function B8(e,t){return t===ce.falseFunc||e===ce.trueFunc?e:e===ce.falseFunc||t===ce.trueFunc?t:function(r){return e(r)||t(r)}}const Bb=(e,t)=>e===t,v8={adapter:Ja,equals:Bb};function L8(e){var t,n,r,i;const u=e??v8;return(t=u.adapter)!==null&&t!==void 0||(u.adapter=Ja),(n=u.equals)!==null&&n!==void 0||(u.equals=(i=(r=u.adapter)===null||r===void 0?void 0:r.equals)!==null&&i!==void 0?i:Bb),u}function P8(e){return function(n,r,i){const u=L8(r);return e(n,u,i)}}const Sf=P8(Mb);function vb(e,t,n=!1){return n&&(e=F8(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function F8(e,t){const n=Array.isArray(e)?e.slice(0):[e],r=n.length;for(let i=0;i<r;i++){const u=Ob(n[i],t);n.push(...u)}return n}const H8=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function ka(e){return e.type!=="pseudo"?!1:H8.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(ka)):!1}function U8(e,t,n){const r=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(r)?r>=0?r+1:1/0:0;case"lt":return isFinite(r)?r>=0?Math.min(r,n):1/0:0;case"gt":return isFinite(r)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}function W8(e){for(;e.parent;)e=e.parent;return e}function Nf(e){const t=[],n=[];for(const r of e)r.some(ka)?t.push(r):n.push(r);return[n,t]}const K8={type:Z.Universal,namespace:null},z8={type:Z.Pseudo,name:"scope",data:null};function Lb(e,t,n={}){return Pb([e],t,n)}function Pb(e,t,n={}){if(typeof t=="function")return e.some(t);const[r,i]=Nf(ja(t));return r.length>0&&e.some(Sf(r,n))||i.some(u=>Ub(u,e,n).length>0)}function Q8(e,t,n,r){const i=typeof n=="string"?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i)<t.length?[i<0?t[t.length+i]:t[i]]:[];case"gt":return isFinite(i)?t.slice(i+1):[];case"even":return t.filter((u,s)=>s%2===0);case"odd":return t.filter((u,s)=>s%2===1);case"not":{const u=new Set(Hb(n,t,r));return t.filter(s=>!u.has(s))}}}function Fb(e,t,n={}){return Hb(ja(e),t,n)}function Hb(e,t,n){if(t.length===0)return[];const[r,i]=Nf(e);let u;if(r.length){const s=Cc(t,r,n);if(i.length===0)return s;s.length&&(u=new Set(s))}for(let s=0;s<i.length&&u?.size!==t.length;s++){const a=i[s];if((u?t.filter(c=>ne(c)&&!u.has(c)):t).length===0)break;const l=Ub(a,t,n);if(l.length)if(u)l.forEach(c=>u.add(c));else{if(s===i.length-1)return l;u=new Set(l)}}return typeof u<"u"?u.size===t.length?t:t.filter(s=>u.has(s)):[]}function Ub(e,t,n){var r;if(e.some(du)){const i=(r=n.root)!==null&&r!==void 0?r:W8(t[0]),u={...n,context:t,relativeSelector:!1};return e.push(z8),xa(i,e,u,!0,t.length)}return xa(t,e,n,!1,t.length)}function Y8(e,t,n={},r=1/0){if(typeof e=="function")return Wb(t,e);const[i,u]=Nf(ja(e)),s=u.map(a=>xa(t,a,n,!0,r));return i.length&&s.push(Tc(t,i,n,r)),s.length===0?[]:s.length===1?s[0]:Di(s.reduce((a,o)=>[...a,...o]))}function xa(e,t,n,r,i){const u=t.findIndex(ka),s=t.slice(0,u),a=t[u],o=t.length-1===u?i:1/0,l=U8(a.name,a.data,o);if(l===0)return[];const d=(s.length===0&&!Array.isArray(e)?Va(e).filter(ne):s.length===0?(Array.isArray(e)?e:[e]).filter(ne):r||s.some(du)?Tc(e,[s],n,l):Cc(e,[s],n)).slice(0,l);let f=Q8(a.name,d,a.data,n);if(f.length===0||t.length===u+1)return f;const p=t.slice(u+1),m=p.some(du);if(m){if(du(p[0])){const{type:A}=p[0];(A===Z.Sibling||A===Z.Adjacent)&&(f=vb(f,Ja,!0)),p.unshift(K8)}n={...n,relativeSelector:!1,rootFunc:A=>f.includes(A)}}else n.rootFunc&&n.rootFunc!==Ca.trueFunc&&(n={...n,rootFunc:Ca.trueFunc});return p.some(ka)?xa(f,p,n,!1,i):m?Tc(f,[p],n,i):Cc(f,[p],n)}function Tc(e,t,n,r){const i=Sf(t,n,e);return Wb(e,i,r)}function Wb(e,t,n=1/0){const r=vb(e,Ja,t.shouldTestNextSiblings);return Tf(i=>ne(i)&&t(i),r,!0,n)}function Cc(e,t,n){const r=(Array.isArray(e)?e:[e]).filter(ne);if(r.length===0)return r;const i=Sf(t,n);return i===Ca.trueFunc?r:r.filter(i)}const q8=/^\s*[+~]/;function G8(e){if(!e)return this._make([]);if(typeof e!="string"){const t=_n(e)?e.toArray():[e],n=this.toArray();return this._make(t.filter(r=>n.some(i=>xf(i,r))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function V8(e,t){var n;const r=this.toArray(),i=q8.test(e)?r:this.children().toArray(),u={context:r,root:(n=this._root)===null||n===void 0?void 0:n[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(Y8(e,i,u,t))}function Df(e){return function(t,...n){return function(r){var i;let u=e(t,this);return r&&(u=Rf(u,r,this.options.xmlMode,(i=this._root)===null||i===void 0?void 0:i[0])),this._make(this.length>1&&u.length>1?n.reduce((s,a)=>a(s),u):u)}}}const fs=Df((e,t)=>{let n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i.length>0&&(n=n.concat(i))}return n}),_f=Df((e,t)=>{const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i!==null&&n.push(i)}return n});function Of(e,...t){let n=null;const r=Df((i,u)=>{const s=[];return Re(u,a=>{for(let o;(o=i(a))&&!n?.(o,s.length);a=o)s.push(o)}),s})(e,...t);return function(i,u){n=typeof i=="string"?a=>Lb(a,i,this.options):i?hs(i):null;const s=r.call(this,u);return n=null,s}}function _i(e){return e.length>1?Array.from(new Set(e)):e}const J8=_f(({parent:e})=>e&&!fr(e)?e:null,_i),j8=fs(e=>{const t=[];for(;e.parent&&!fr(e.parent);)t.push(e.parent),e=e.parent;return t},Di,e=>e.reverse()),Z8=Of(({parent:e})=>e&&!fr(e)?e:null,Di,e=>e.reverse());function X8(e){var t;const n=[];if(!e)return this._make(n);const r={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},i=typeof e=="string"?u=>Lb(u,e,r):hs(e);return Re(this,u=>{for(u&&!fr(u)&&!ne(u)&&(u=u.parent);u&&ne(u);){if(i(u,0)){n.includes(u)||n.push(u);break}u=u.parent}}),this._make(n)}const $8=_f(e=>Ef(e)),eD=fs(e=>{const t=[];for(;e.next;)e=e.next,ne(e)&&t.push(e);return t},_i),tD=Of(e=>Ef(e),_i),nD=_f(e=>yf(e)),rD=fs(e=>{const t=[];for(;e.prev;)e=e.prev,ne(e)&&t.push(e);return t},_i),iD=Of(e=>yf(e),_i),uD=fs(e=>mb(e).filter(t=>ne(t)&&t!==e),Di),sD=fs(e=>Va(e).filter(ne),_i);function aD(){const e=this.toArray().reduce((t,n)=>Be(n)?t.concat(n.children):t,[]);return this._make(e)}function oD(e){let t=0;const n=this.length;for(;t<n&&e.call(this[t],t,this[t])!==!1;)++t;return this}function lD(e){let t=[];for(let n=0;n<this.length;n++){const r=this[n],i=e.call(r,n,r);i!=null&&(t=t.concat(i))}return this._make(t)}function hs(e){return typeof e=="function"?(t,n)=>e.call(t,n,t):_n(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function cD(e){var t;return this._make(Rf(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function Rf(e,t,n,r){return typeof t=="string"?Fb(t,e,{xmlMode:n,root:r}):e.filter(hs(t))}function dD(e){const t=this.toArray();return typeof e=="string"?Pb(t.filter(ne),e,this.options):e?t.some(hs(e)):!1}function fD(e){let t=this.toArray();if(typeof e=="string"){const n=new Set(Fb(e,t,this.options));t=t.filter(r=>!n.has(r))}else{const n=hs(e);t=t.filter((r,i)=>!n(r,i))}return this._make(t)}function hD(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,n)=>this._make(n).find(e).length>0)}function pD(){return this.length>1?this._make(this[0]):this}function mD(){return this.length>0?this._make(this[this.length-1]):this}function AD(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function gD(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function bD(){return Array.prototype.slice.call(this)}function ED(e){let t,n;return e==null?(t=this.parent().children(),n=this[0]):typeof e=="string"?(t=this._make(e),n=this[0]):(t=this,n=_n(e)?e[0]:e),Array.prototype.indexOf.call(t,n)}function yD(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function TD(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function CD(e,t){const n=this._make(e,t),r=Di([...this.get(),...n.get()]);return this._make(r)}function kD(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const xD=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:V8,add:CD,addBack:kD,children:sD,closest:X8,contents:aD,each:oD,end:TD,eq:AD,filter:cD,filterArray:Rf,find:G8,first:pD,get:gD,has:hD,index:ED,is:dD,last:mD,map:lD,next:$8,nextAll:eD,nextUntil:tD,not:fD,parent:J8,parents:j8,parentsUntil:Z8,prev:nD,prevAll:rD,prevUntil:iD,siblings:uD,slice:yD,toArray:bD},Symbol.toStringTag,{value:"Module"}));function wD(e){return function(n,r,i,u){if(typeof Buffer<"u"&&Buffer.isBuffer(n)&&(n=n.toString()),typeof n=="string")return e(n,r,i,u);const s=n;if(!Array.isArray(s)&&fr(s))return s;const a=new Ur([]);return Wr(s,a),a}}function Wr(e,t){const n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(let r=0;r<n.length;r++){const i=n[r];i.parent&&i.parent.children!==n&&zr(i),t?(i.prev=n[r-1]||null,i.next=n[r+1]||null):i.prev=i.next=null,i.parent=t}return t}function ID(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(typeof i=="object"){if(i==null)continue;if(!("length"in i)){n.push(t?Ou(i,!0):i);continue}}n.push(...this._makeDomArray(i,t))}return n}return[t?Ou(e,!0):e]}function Kb(e){return function(...t){const n=this.length-1;return Re(this,(r,i)=>{if(!Be(r))return;const u=typeof t[0]=="function"?t[0].call(r,i,this._render(r.children)):t,s=this._makeDomArray(u,i<n);e(s,r.children,r)})}}function hr(e,t,n,r,i){var u,s;const a=[t,n,...r],o=t===0?null:e[t-1],l=t+n>=e.length?null:e[t+n];for(let c=0;c<r.length;++c){const d=r[c],f=d.parent;if(f){const m=f.children.indexOf(d);m>-1&&(f.children.splice(m,1),i===f&&t>m&&a[0]--)}d.parent=i,d.prev&&(d.prev.next=(u=d.next)!==null&&u!==void 0?u:null),d.next&&(d.next.prev=(s=d.prev)!==null&&s!==void 0?s:null),d.prev=c===0?o:r[c-1],d.next=c===r.length-1?l:r[c+1]}return o&&(o.next=r[0]),l&&(l.prev=r[r.length-1]),e.splice(...a)}function SD(e){return(_n(e)?e:this._make(e)).append(this),this}function ND(e){return(_n(e)?e:this._make(e)).prepend(this),this}const DD=Kb((e,t,n)=>{hr(t,t.length,0,e,n)}),_D=Kb((e,t,n)=>{hr(t,0,0,e,n)});function zb(e){return function(t){const n=this.length-1,r=this.parents().last();for(let i=0;i<this.length;i++){const u=this[i],s=typeof t=="function"?t.call(u,i,u):typeof t=="string"&&!gc(t)?r.find(t).clone():t,[a]=this._makeDomArray(s,i<n);if(!a||!Be(a))continue;let o=a,l=0;for(;l<o.children.length;){const c=o.children[l];ne(c)?(o=c,l=0):l++}e(u,o,[a])}return this}}const OD=zb((e,t,n)=>{const{parent:r}=e;if(!r)return;const i=r.children,u=i.indexOf(e);Wr([e],t),hr(i,u,0,n,r)}),RD=zb((e,t,n)=>{Be(e)&&(Wr(e.children,t),Wr(n,e))});function MD(e){return this.parent(e).not("body").each((t,n)=>{this._make(n).replaceWith(n.children)}),this}function BD(e){const t=this[0];if(t){const n=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let r;for(let u=0;u<n.length;u++)n[u].type==="tag"&&(r=n[u]);let i=0;for(;r&&i<r.children.length;){const u=r.children[i];u.type==="tag"?(r=u,i=0):i++}r&&this._make(r).append(this)}return this}function vD(...e){const t=this.length-1;return Re(this,(n,r)=>{if(!Be(n)||!n.parent)return;const i=n.parent.children,u=i.indexOf(n);if(u<0)return;const s=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,a=this._makeDomArray(s,r<t);hr(i,u+1,0,a,n.parent)})}function LD(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const n of this._makeDomArray(e)){const r=this.clone().toArray(),{parent:i}=n;if(!i)continue;const u=i.children,s=u.indexOf(n);s<0||(hr(u,s+1,0,r,i),t.push(...r))}return this._make(t)}function PD(...e){const t=this.length-1;return Re(this,(n,r)=>{if(!Be(n)||!n.parent)return;const i=n.parent.children,u=i.indexOf(n);if(u<0)return;const s=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,a=this._makeDomArray(s,r<t);hr(i,u,0,a,n.parent)})}function FD(e){const t=this._make(e);this.remove();const n=[];return Re(t,r=>{const i=this.clone().toArray(),{parent:u}=r;if(!u)return;const s=u.children,a=s.indexOf(r);a<0||(hr(s,a,0,i,u),n.push(...i))}),this._make(n)}function HD(e){const t=e?this.filter(e):this;return Re(t,n=>{zr(n),n.prev=n.next=n.parent=null}),this}function UD(e){return Re(this,(t,n)=>{const{parent:r}=t;if(!r)return;const i=r.children,u=typeof e=="function"?e.call(t,n,t):e,s=this._makeDomArray(u);Wr(s,null);const a=i.indexOf(t);hr(i,a,1,s,r),s.includes(t)||(t.parent=t.prev=t.next=null)})}function WD(){return Re(this,e=>{if(Be(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function KD(e){if(e===void 0){const t=this[0];return!t||!Be(t)?null:this._render(t.children)}return Re(this,t=>{if(!Be(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=_n(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;Wr(n,t)})}function zD(){return this._render(this)}function QD(e){return e===void 0?Ru(this):typeof e=="function"?Re(this,(t,n)=>this._make(t).text(e.call(t,n,Ru([t])))):Re(this,t=>{if(!Be(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=new _u(`${e}`);Wr(n,t)})}function YD(){const e=Array.prototype.map.call(this.get(),n=>Ou(n,!0)),t=new Ur(e);for(const n of e)n.parent=t;return this._make(e)}const qD=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:ID,after:vD,append:DD,appendTo:SD,before:PD,clone:YD,empty:WD,html:KD,insertAfter:LD,insertBefore:FD,prepend:_D,prependTo:ND,remove:HD,replaceWith:UD,text:QD,toString:zD,unwrap:MD,wrap:OD,wrapAll:BD,wrapInner:RD},Symbol.toStringTag,{value:"Module"}));function GD(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return Re(this,(n,r)=>{ne(n)&&Qb(n,e,t,r)});if(this.length!==0)return Yb(this[0],e)}function Qb(e,t,n,r){if(typeof t=="string"){const i=Yb(e),u=typeof n=="function"?n.call(e,r,i[t]):n;u===""?delete i[t]:u!=null&&(i[t]=u),e.attribs.style=VD(i)}else if(typeof t=="object"){const i=Object.keys(t);for(let u=0;u<i.length;u++){const s=i[u];Qb(e,s,t[s],u)}}}function Yb(e,t){if(!e||!ne(e))return;const n=JD(e.attribs.style);if(typeof t=="string")return n[t];if(Array.isArray(t)){const r={};for(const i of t)n[i]!=null&&(r[i]=n[i]);return r}return n}function VD(e){return Object.keys(e).reduce((t,n)=>`${t}${t?" ":""}${n}: ${e[n]};`,"")}function JD(e){if(e=(e||"").trim(),!e)return{};const t={};let n;for(const r of e.split(";")){const i=r.indexOf(":");if(i<1||i===r.length-1){const u=r.trimEnd();u.length>0&&n!==void 0&&(t[n]+=`;${u}`)}else n=r.slice(0,i).trim(),t[n]=r.slice(i+1).trim()}return t}const jD=Object.freeze(Object.defineProperty({__proto__:null,css:GD},Symbol.toStringTag,{value:"Module"})),ap="input,select,textarea,keygen",ZD=/%20/g,op=/\r?\n/g;function XD(){return this.serializeArray().map(n=>`${encodeURIComponent(n.name)}=${encodeURIComponent(n.value)}`).join("&").replace(ZD,"+")}function $D(){return this.map((e,t)=>{const n=this._make(t);return ne(t)&&t.name==="form"?n.find(ap).toArray():n.filter(ap).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var n;const r=this._make(t),i=r.attr("name"),u=(n=r.val())!==null&&n!==void 0?n:"";return Array.isArray(u)?u.map(s=>({name:i,value:s.replace(op,`\r
906
+ `)})):{name:i,value:u.replace(op,`\r
907
+ `)}}).toArray()}const e5=Object.freeze(Object.defineProperty({__proto__:null,serialize:XD,serializeArray:$D},Symbol.toStringTag,{value:"Module"}));function t5(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function n5(e){const t={};for(const n in e){const r=e[n],i=Array.isArray(r),{selector:u,value:s}=t5(i?r[0]:r),a=typeof s=="function"?s:typeof s=="string"?o=>this._make(o).prop(s):o=>this._make(o).extract(s);if(i)t[n]=this._findBySelector(u,Number.POSITIVE_INFINITY).map((o,l)=>a(l,n,t)).get();else{const o=this._findBySelector(u,1);t[n]=o.length>0?a(o[0],n,t):void 0}}return t}const r5=Object.freeze(Object.defineProperty({__proto__:null,extract:n5},Symbol.toStringTag,{value:"Module"}));class ps{constructor(t,n,r){if(this.length=0,this.options=r,this._root=n,t){for(let i=0;i<t.length;i++)this[i]=t[i];this.length=t.length}}}ps.prototype.cheerio="[cheerio object]";ps.prototype.splice=Array.prototype.splice;ps.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(ps.prototype,l8,xD,qD,jD,e5,r5);function i5(e,t){return function n(r,i,u=!0){if(r==null)throw new Error("cheerio.load() expects a string");const s=Ac(i),a=e(r,s,u,null);class o extends ps{_make(d,f){const p=l(d,f);return p.prevObject=this,p}_parse(d,f,p,m){return e(d,f,p,m)}_render(d){return t(d,this.options)}}function l(c,d,f=a,p){if(c&&_n(c))return c;const m=Ac(p,s),A=typeof f=="string"?[e(f,m,!1,null)]:"length"in f?f:[f],E=_n(A)?A:new o(A,null,m);if(E._root=E,!c)return new o(void 0,E,m);const g=typeof c=="string"&&gc(c)?e(c,m,!1,null).children:u5(c)?[c]:Array.isArray(c)?c:void 0,N=new o(g,E,m);if(g)return N;if(typeof c!="string")throw new TypeError("Unexpected type of selector");let w=c;const _=d?typeof d=="string"?gc(d)?new o([e(d,m,!1,null)],E,m):(w=`${d} ${w}`,E):_n(d)?d:new o(Array.isArray(d)?d:[d],E,m):E;return _?_.find(w):N}return Object.assign(l,ZN,{load:n,_root:a,_options:s,fn:o.prototype,prototype:o.prototype}),l}}function u5(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const s5=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),De="�";var b;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(b||(b={}));const gt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function qb(e){return e>=55296&&e<=57343}function a5(e){return e>=56320&&e<=57343}function o5(e,t){return(e-55296)*1024+9216+t}function Gb(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Vb(e){return e>=64976&&e<=65007||s5.has(e)}var M;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(M||(M={}));const l5=65536;class c5{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=l5,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:u}=this,s=i+n,a=u+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:a,endOffset:a}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(a5(n))return this.pos++,this._addGap(),o5(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,b.EOF;return this._err(M.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;const r=this.html.charCodeAt(n);return r===b.CARRIAGE_RETURN?b.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;let t=this.html.charCodeAt(this.pos);return t===b.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,b.LINE_FEED):t===b.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,qb(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===b.LINE_FEED||t===b.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Gb(t)?this._err(M.controlCharacterInInputStream):Vb(t)&&this._err(M.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var me;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(me||(me={}));function Jb(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const d5=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),f5=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function h5(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=f5.get(e))!==null&&t!==void 0?t:e}var Qe;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Qe||(Qe={}));const p5=32;var jn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(jn||(jn={}));function kc(e){return e>=Qe.ZERO&&e<=Qe.NINE}function m5(e){return e>=Qe.UPPER_A&&e<=Qe.UPPER_F||e>=Qe.LOWER_A&&e<=Qe.LOWER_F}function A5(e){return e>=Qe.UPPER_A&&e<=Qe.UPPER_Z||e>=Qe.LOWER_A&&e<=Qe.LOWER_Z||kc(e)}function g5(e){return e===Qe.EQUALS||A5(e)}var Ke;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ke||(Ke={}));var kn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(kn||(kn={}));let b5=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=kn.Strict}startEntity(t){this.decodeMode=t,this.state=Ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ke.EntityStart:return t.charCodeAt(n)===Qe.NUM?(this.state=Ke.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ke.NamedEntity,this.stateNamedEntity(t,n));case Ke.NumericStart:return this.stateNumericStart(t,n);case Ke.NumericDecimal:return this.stateNumericDecimal(t,n);case Ke.NumericHex:return this.stateNumericHex(t,n);case Ke.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|p5)===Qe.LOWER_X?(this.state=Ke.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ke.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const u=r-n;this.result=this.result*Math.pow(i,u)+Number.parseInt(t.substr(n,u),i),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(kc(i)||m5(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(kc(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Qe.SEMI)this.consumed+=1;else if(this.decodeMode===kn.Strict)return 0;return this.emitCodePoint(h5(this.result),this.consumed),this.errors&&(t!==Qe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],u=(i&jn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=E5(r,i,this.treeIndex+Math.max(1,u),s),this.treeIndex<0)return this.result===0||this.decodeMode===kn.Attribute&&(u===0||g5(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],u=(i&jn.VALUE_LENGTH)>>14,u!==0){if(s===Qe.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==kn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&jn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~jn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ke.NamedEntity:return this.result!==0&&(this.decodeMode!==kn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ke.NumericDecimal:return this.emitNumericEntity(0,2);case Ke.NumericHex:return this.emitNumericEntity(0,3);case Ke.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ke.EntityStart:return 0}}};function E5(e,t,n,r){const i=(t&jn.BRANCH_LENGTH)>>7,u=t&jn.JUMP_TABLE;if(i===0)return u!==0&&r===u?n:-1;if(u){const o=r-u;return o<0||o>=i?-1:e[n+o]-1}let s=n,a=s+i-1;for(;s<=a;){const o=s+a>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)a=o-1;else return e[o+i]}return-1}var F;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(F||(F={}));var Dr;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Dr||(Dr={}));var It;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(It||(It={}));var D;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(D||(D={}));var h;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(h||(h={}));const y5=new Map([[D.A,h.A],[D.ADDRESS,h.ADDRESS],[D.ANNOTATION_XML,h.ANNOTATION_XML],[D.APPLET,h.APPLET],[D.AREA,h.AREA],[D.ARTICLE,h.ARTICLE],[D.ASIDE,h.ASIDE],[D.B,h.B],[D.BASE,h.BASE],[D.BASEFONT,h.BASEFONT],[D.BGSOUND,h.BGSOUND],[D.BIG,h.BIG],[D.BLOCKQUOTE,h.BLOCKQUOTE],[D.BODY,h.BODY],[D.BR,h.BR],[D.BUTTON,h.BUTTON],[D.CAPTION,h.CAPTION],[D.CENTER,h.CENTER],[D.CODE,h.CODE],[D.COL,h.COL],[D.COLGROUP,h.COLGROUP],[D.DD,h.DD],[D.DESC,h.DESC],[D.DETAILS,h.DETAILS],[D.DIALOG,h.DIALOG],[D.DIR,h.DIR],[D.DIV,h.DIV],[D.DL,h.DL],[D.DT,h.DT],[D.EM,h.EM],[D.EMBED,h.EMBED],[D.FIELDSET,h.FIELDSET],[D.FIGCAPTION,h.FIGCAPTION],[D.FIGURE,h.FIGURE],[D.FONT,h.FONT],[D.FOOTER,h.FOOTER],[D.FOREIGN_OBJECT,h.FOREIGN_OBJECT],[D.FORM,h.FORM],[D.FRAME,h.FRAME],[D.FRAMESET,h.FRAMESET],[D.H1,h.H1],[D.H2,h.H2],[D.H3,h.H3],[D.H4,h.H4],[D.H5,h.H5],[D.H6,h.H6],[D.HEAD,h.HEAD],[D.HEADER,h.HEADER],[D.HGROUP,h.HGROUP],[D.HR,h.HR],[D.HTML,h.HTML],[D.I,h.I],[D.IMG,h.IMG],[D.IMAGE,h.IMAGE],[D.INPUT,h.INPUT],[D.IFRAME,h.IFRAME],[D.KEYGEN,h.KEYGEN],[D.LABEL,h.LABEL],[D.LI,h.LI],[D.LINK,h.LINK],[D.LISTING,h.LISTING],[D.MAIN,h.MAIN],[D.MALIGNMARK,h.MALIGNMARK],[D.MARQUEE,h.MARQUEE],[D.MATH,h.MATH],[D.MENU,h.MENU],[D.META,h.META],[D.MGLYPH,h.MGLYPH],[D.MI,h.MI],[D.MO,h.MO],[D.MN,h.MN],[D.MS,h.MS],[D.MTEXT,h.MTEXT],[D.NAV,h.NAV],[D.NOBR,h.NOBR],[D.NOFRAMES,h.NOFRAMES],[D.NOEMBED,h.NOEMBED],[D.NOSCRIPT,h.NOSCRIPT],[D.OBJECT,h.OBJECT],[D.OL,h.OL],[D.OPTGROUP,h.OPTGROUP],[D.OPTION,h.OPTION],[D.P,h.P],[D.PARAM,h.PARAM],[D.PLAINTEXT,h.PLAINTEXT],[D.PRE,h.PRE],[D.RB,h.RB],[D.RP,h.RP],[D.RT,h.RT],[D.RTC,h.RTC],[D.RUBY,h.RUBY],[D.S,h.S],[D.SCRIPT,h.SCRIPT],[D.SEARCH,h.SEARCH],[D.SECTION,h.SECTION],[D.SELECT,h.SELECT],[D.SOURCE,h.SOURCE],[D.SMALL,h.SMALL],[D.SPAN,h.SPAN],[D.STRIKE,h.STRIKE],[D.STRONG,h.STRONG],[D.STYLE,h.STYLE],[D.SUB,h.SUB],[D.SUMMARY,h.SUMMARY],[D.SUP,h.SUP],[D.TABLE,h.TABLE],[D.TBODY,h.TBODY],[D.TEMPLATE,h.TEMPLATE],[D.TEXTAREA,h.TEXTAREA],[D.TFOOT,h.TFOOT],[D.TD,h.TD],[D.TH,h.TH],[D.THEAD,h.THEAD],[D.TITLE,h.TITLE],[D.TR,h.TR],[D.TRACK,h.TRACK],[D.TT,h.TT],[D.U,h.U],[D.UL,h.UL],[D.SVG,h.SVG],[D.VAR,h.VAR],[D.WBR,h.WBR],[D.XMP,h.XMP]]);function Za(e){var t;return(t=y5.get(e))!==null&&t!==void 0?t:h.UNKNOWN}const K=h,T5={[F.HTML]:new Set([K.ADDRESS,K.APPLET,K.AREA,K.ARTICLE,K.ASIDE,K.BASE,K.BASEFONT,K.BGSOUND,K.BLOCKQUOTE,K.BODY,K.BR,K.BUTTON,K.CAPTION,K.CENTER,K.COL,K.COLGROUP,K.DD,K.DETAILS,K.DIR,K.DIV,K.DL,K.DT,K.EMBED,K.FIELDSET,K.FIGCAPTION,K.FIGURE,K.FOOTER,K.FORM,K.FRAME,K.FRAMESET,K.H1,K.H2,K.H3,K.H4,K.H5,K.H6,K.HEAD,K.HEADER,K.HGROUP,K.HR,K.HTML,K.IFRAME,K.IMG,K.INPUT,K.LI,K.LINK,K.LISTING,K.MAIN,K.MARQUEE,K.MENU,K.META,K.NAV,K.NOEMBED,K.NOFRAMES,K.NOSCRIPT,K.OBJECT,K.OL,K.P,K.PARAM,K.PLAINTEXT,K.PRE,K.SCRIPT,K.SECTION,K.SELECT,K.SOURCE,K.STYLE,K.SUMMARY,K.TABLE,K.TBODY,K.TD,K.TEMPLATE,K.TEXTAREA,K.TFOOT,K.TH,K.THEAD,K.TITLE,K.TR,K.TRACK,K.UL,K.WBR,K.XMP]),[F.MATHML]:new Set([K.MI,K.MO,K.MN,K.MS,K.MTEXT,K.ANNOTATION_XML]),[F.SVG]:new Set([K.TITLE,K.FOREIGN_OBJECT,K.DESC]),[F.XLINK]:new Set,[F.XML]:new Set,[F.XMLNS]:new Set},xc=new Set([K.H1,K.H2,K.H3,K.H4,K.H5,K.H6]),C5=new Set([D.STYLE,D.SCRIPT,D.XMP,D.IFRAME,D.NOEMBED,D.NOFRAMES,D.PLAINTEXT]);function k5(e,t){return C5.has(e)||t&&e===D.NOSCRIPT}var y;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(y||(y={}));const yt={DATA:y.DATA,RCDATA:y.RCDATA,RAWTEXT:y.RAWTEXT,SCRIPT_DATA:y.SCRIPT_DATA,PLAINTEXT:y.PLAINTEXT,CDATA_SECTION:y.CDATA_SECTION};function x5(e){return e>=b.DIGIT_0&&e<=b.DIGIT_9}function Zi(e){return e>=b.LATIN_CAPITAL_A&&e<=b.LATIN_CAPITAL_Z}function w5(e){return e>=b.LATIN_SMALL_A&&e<=b.LATIN_SMALL_Z}function Hn(e){return w5(e)||Zi(e)}function lp(e){return Hn(e)||x5(e)}function Os(e){return e+32}function jb(e){return e===b.SPACE||e===b.LINE_FEED||e===b.TABULATION||e===b.FORM_FEED}function cp(e){return jb(e)||e===b.SOLIDUS||e===b.GREATER_THAN_SIGN}function I5(e){return e===b.NULL?M.nullCharacterReference:e>1114111?M.characterReferenceOutsideUnicodeRange:qb(e)?M.surrogateCharacterReference:Vb(e)?M.noncharacterCharacterReference:Gb(e)||e===b.CARRIAGE_RETURN?M.controlCharacterReference:null}let S5=class{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=y.DATA,this.returnState=y.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new c5(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new b5(d5,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(M.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(M.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=I5(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:me.START_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:me.END_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:me.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:me.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Jb(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(M.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Za(t.tagName),t.type===me.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(M.endTagWithAttributes),t.selfClosing&&this._err(M.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case me.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case me.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case me.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:me.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=jb(t)?me.WHITESPACE_CHARACTER:t===b.NULL?me.NULL_CHARACTER:me.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(me.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=y.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?kn.Attribute:kn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===y.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===y.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===y.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case y.DATA:{this._stateData(t);break}case y.RCDATA:{this._stateRcdata(t);break}case y.RAWTEXT:{this._stateRawtext(t);break}case y.SCRIPT_DATA:{this._stateScriptData(t);break}case y.PLAINTEXT:{this._statePlaintext(t);break}case y.TAG_OPEN:{this._stateTagOpen(t);break}case y.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case y.TAG_NAME:{this._stateTagName(t);break}case y.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case y.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case y.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case y.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case y.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case y.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case y.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case y.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case y.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case y.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case y.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case y.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case y.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case y.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case y.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case y.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case y.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case y.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case y.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case y.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case y.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case y.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case y.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case y.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case y.BOGUS_COMMENT:{this._stateBogusComment(t);break}case y.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case y.COMMENT_START:{this._stateCommentStart(t);break}case y.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case y.COMMENT:{this._stateComment(t);break}case y.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case y.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case y.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case y.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case y.COMMENT_END:{this._stateCommentEnd(t);break}case y.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case y.DOCTYPE:{this._stateDoctype(t);break}case y.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case y.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case y.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case y.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case y.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case y.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case y.CDATA_SECTION:{this._stateCdataSection(t);break}case y.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case y.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case y.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case y.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=y.TAG_OPEN;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitCodePoint(t);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case b.AMPERSAND:{this._startCharacterReference();break}case b.LESS_THAN_SIGN:{this.state=y.RCDATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(De);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case b.LESS_THAN_SIGN:{this.state=y.RAWTEXT_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(De);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(De);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(De);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Hn(t))this._createStartTagToken(),this.state=y.TAG_NAME,this._stateTagName(t);else switch(t){case b.EXCLAMATION_MARK:{this.state=y.MARKUP_DECLARATION_OPEN;break}case b.SOLIDUS:{this.state=y.END_TAG_OPEN;break}case b.QUESTION_MARK:{this._err(M.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=y.BOGUS_COMMENT,this._stateBogusComment(t);break}case b.EOF:{this._err(M.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(M.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=y.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Hn(t))this._createEndTagToken(),this.state=y.TAG_NAME,this._stateTagName(t);else switch(t){case b.GREATER_THAN_SIGN:{this._err(M.missingEndTagName),this.state=y.DATA;break}case b.EOF:{this._err(M.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(M.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=y.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this.state=y.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.tagName+=De;break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Zi(t)?Os(t):t)}}_stateRcdataLessThanSign(t){t===b.SOLIDUS?this.state=y.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=y.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Hn(t)?(this.state=y.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=y.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=y.BEFORE_ATTRIBUTE_NAME,!1;case b.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=y.SELF_CLOSING_START_TAG,!1;case b.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=y.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===b.SOLIDUS?this.state=y.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=y.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Hn(t)?(this.state=y.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=y.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case b.SOLIDUS:{this.state=y.SCRIPT_DATA_END_TAG_OPEN;break}case b.EXCLAMATION_MARK:{this.state=y.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=y.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Hn(t)?(this.state=y.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===b.HYPHEN_MINUS?(this.state=y.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===b.HYPHEN_MINUS?(this.state=y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(De);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.GREATER_THAN_SIGN:{this.state=y.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===b.SOLIDUS?this.state=y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Hn(t)?(this._emitChars("<"),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Hn(t)?(this.state=y.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(gt.SCRIPT,!1)&&cp(this.preprocessor.peek(gt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<gt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(De);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.GREATER_THAN_SIGN:{this.state=y.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===b.SOLIDUS?(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(gt.SCRIPT,!1)&&cp(this.preprocessor.peek(gt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<gt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=y.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this.state=y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._err(M.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=y.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=y.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this._leaveAttrName(),this.state=y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._leaveAttrName(),this.state=y.BEFORE_ATTRIBUTE_VALUE;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:{this._err(M.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.name+=De;break}default:this.currentAttr.name+=String.fromCodePoint(Zi(t)?Os(t):t)}}_stateAfterAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:{this.state=y.SELF_CLOSING_START_TAG;break}case b.EQUALS_SIGN:{this.state=y.BEFORE_ATTRIBUTE_VALUE;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=y.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{this.state=y.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this.state=y.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingAttributeValue),this.state=y.DATA,this.emitCurrentTagToken();break}default:this.state=y.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case b.QUOTATION_MARK:{this.state=y.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.value+=De;break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case b.APOSTROPHE:{this.state=y.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.value+=De;break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=y.BEFORE_ATTRIBUTE_NAME;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=y.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.value+=De;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:case b.EQUALS_SIGN:case b.GRAVE_ACCENT:{this._err(M.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=y.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this._leaveAttrValue(),this.state=y.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=y.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this._err(M.missingWhitespaceBetweenAttributes),this.state=y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case b.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=y.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this._err(M.unexpectedSolidusInTag),this.state=y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentComment(n);break}case b.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.data+=De;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(gt.DASH_DASH,!0)?(this._createCommentToken(gt.DASH_DASH.length+1),this.state=y.COMMENT_START):this._consumeSequenceIfMatch(gt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(gt.DOCTYPE.length+1),this.state=y.DOCTYPE):this._consumeSequenceIfMatch(gt.CDATA_START,!0)?this.inForeignNode?this.state=y.CDATA_SECTION:(this._err(M.cdataInHtmlContent),this._createCommentToken(gt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=y.BOGUS_COMMENT):this._ensureHibernation()||(this._err(M.incorrectlyOpenedComment),this._createCommentToken(2),this.state=y.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_START_DASH;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptClosingOfEmptyComment),this.state=y.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=y.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_END;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptClosingOfEmptyComment),this.state=y.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=y.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_END_DASH;break}case b.LESS_THAN_SIGN:{n.data+="<",this.state=y.COMMENT_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.data+=De;break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case b.EXCLAMATION_MARK:{n.data+="!",this.state=y.COMMENT_LESS_THAN_SIGN_BANG;break}case b.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=y.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===b.HYPHEN_MINUS?this.state=y.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=y.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===b.HYPHEN_MINUS?this.state=y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=y.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==b.GREATER_THAN_SIGN&&t!==b.EOF&&this._err(M.nestedComment),this.state=y.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_END;break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=y.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentComment(n);break}case b.EXCLAMATION_MARK:{this.state=y.COMMENT_END_BANG;break}case b.HYPHEN_MINUS:{n.data+="-";break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=y.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{n.data+="--!",this.state=y.COMMENT_END_DASH;break}case b.GREATER_THAN_SIGN:{this._err(M.incorrectlyClosedComment),this.state=y.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=y.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case b.EOF:{this._err(M.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingWhitespaceBeforeDoctypeName),this.state=y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Zi(t))this._createDoctypeToken(String.fromCharCode(Os(t))),this.state=y.DOCTYPE_NAME;else switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.NULL:{this._err(M.unexpectedNullCharacter),this._createDoctypeToken(De),this.state=y.DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=y.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.AFTER_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.name+=De;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Zi(t)?Os(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(gt.PUBLIC,!1)?this.state=y.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(gt.SYSTEM,!1)?this.state=y.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(M.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(M.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(M.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.publicId+=De;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.publicId+=De;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.QUOTATION_MARK:{this._err(M.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(M.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.QUOTATION_MARK:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(M.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(M.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.systemId+=De;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.systemId+=De;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.NULL:{this._err(M.unexpectedNullCharacter);break}case b.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case b.RIGHT_SQUARE_BRACKET:{this.state=y.CDATA_SECTION_BRACKET;break}case b.EOF:{this._err(M.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===b.RIGHT_SQUARE_BRACKET?this.state=y.CDATA_SECTION_END:(this._emitChars("]"),this.state=y.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case b.GREATER_THAN_SIGN:{this.state=y.DATA;break}case b.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=y.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(b.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&lp(this.preprocessor.peek(1))?y.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){lp(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===b.SEMICOLON&&this._err(M.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const Zb=new Set([h.DD,h.DT,h.LI,h.OPTGROUP,h.OPTION,h.P,h.RB,h.RP,h.RT,h.RTC]),dp=new Set([...Zb,h.CAPTION,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]),wa=new Set([h.APPLET,h.CAPTION,h.HTML,h.MARQUEE,h.OBJECT,h.TABLE,h.TD,h.TEMPLATE,h.TH]),N5=new Set([...wa,h.OL,h.UL]),D5=new Set([...wa,h.BUTTON]),fp=new Set([h.ANNOTATION_XML,h.MI,h.MN,h.MO,h.MS,h.MTEXT]),hp=new Set([h.DESC,h.FOREIGN_OBJECT,h.TITLE]),_5=new Set([h.TR,h.TEMPLATE,h.HTML]),O5=new Set([h.TBODY,h.TFOOT,h.THEAD,h.TEMPLATE,h.HTML]),R5=new Set([h.TABLE,h.TEMPLATE,h.HTML]),M5=new Set([h.TD,h.TH]);class B5{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=h.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===h.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===F.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==F.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(xc,F.HTML)}popUntilTableCellPopped(){this.popUntilPopped(M5,F.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(R5,F.HTML)}clearBackToTableBodyContext(){this.clearBackTo(O5,F.HTML)}clearBackToTableRowContext(){this.clearBackTo(_5,F.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===h.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===h.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case F.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case F.SVG:{if(hp.has(i))return!1;break}case F.MATHML:{if(fp.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,wa)}hasInListItemScope(t){return this.hasInDynamicScope(t,N5)}hasInButtonScope(t){return this.hasInDynamicScope(t,D5)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case F.HTML:{if(xc.has(n))return!0;if(wa.has(n))return!1;break}case F.SVG:{if(hp.has(n))return!1;break}case F.MATHML:{if(fp.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===F.HTML)switch(this.tagIDs[n]){case t:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===F.HTML)switch(this.tagIDs[t]){case h.TBODY:case h.THEAD:case h.TFOOT:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===F.HTML)switch(this.tagIDs[n]){case t:return!0;case h.OPTION:case h.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Zb.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&dp.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&dp.has(this.currentTagId);)this.pop()}}const ll=3;var $t;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})($t||($t={}));const pp={type:$t.Marker};class v5{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,u=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let a=0;a<this.entries.length;a++){const o=this.entries[a];if(o.type===$t.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===u&&this.treeAdapter.getNamespaceURI(l)===s){const c=this.treeAdapter.getAttrList(l);c.length===i&&r.push({idx:a,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ll)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ll)return;const i=new Map(n.map(s=>[s.name,s.value]));let u=0;for(let s=0;s<r.length;s++){const a=r[s];a.attrs.every(o=>i.get(o.name)===o.value)&&(u+=1,u>=ll&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(pp)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:$t.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:$t.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(pp);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===$t.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===$t.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===$t.Element&&n.element===t)}}const Tn={createDocument(){return{nodeName:"#document",mode:It.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(u=>u.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Tn.appendChild(e,u)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Tn.isTextNode(n)){n.value+=t;return}}Tn.appendChild(e,Tn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Tn.isTextNode(r)?r.value+=t:Tn.insertBefore(e,Tn.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Xb="html",L5="about:legacy-compat",P5="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",$b=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],F5=[...$b,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],H5=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),e2=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],U5=[...e2,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function mp(e,t){return t.some(n=>e.startsWith(n))}function W5(e){return e.name===Xb&&e.publicId===null&&(e.systemId===null||e.systemId===L5)}function K5(e){if(e.name!==Xb)return It.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===P5)return It.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),H5.has(n))return It.QUIRKS;let r=t===null?F5:$b;if(mp(n,r))return It.QUIRKS;if(r=t===null?e2:U5,mp(n,r))return It.LIMITED_QUIRKS}return It.NO_QUIRKS}const Ap={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},z5="definitionurl",Q5="definitionURL",Y5=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),q5=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:F.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:F.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:F.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:F.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:F.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:F.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:F.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:F.XML}],["xml:space",{prefix:"xml",name:"space",namespace:F.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:F.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:F.XMLNS}]]),G5=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),V5=new Set([h.B,h.BIG,h.BLOCKQUOTE,h.BODY,h.BR,h.CENTER,h.CODE,h.DD,h.DIV,h.DL,h.DT,h.EM,h.EMBED,h.H1,h.H2,h.H3,h.H4,h.H5,h.H6,h.HEAD,h.HR,h.I,h.IMG,h.LI,h.LISTING,h.MENU,h.META,h.NOBR,h.OL,h.P,h.PRE,h.RUBY,h.S,h.SMALL,h.SPAN,h.STRONG,h.STRIKE,h.SUB,h.SUP,h.TABLE,h.TT,h.U,h.UL,h.VAR]);function J5(e){const t=e.tagID;return t===h.FONT&&e.attrs.some(({name:r})=>r===Dr.COLOR||r===Dr.SIZE||r===Dr.FACE)||V5.has(t)}function t2(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===z5){e.attrs[t].name=Q5;break}}function n2(e){for(let t=0;t<e.attrs.length;t++){const n=Y5.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Mf(e){for(let t=0;t<e.attrs.length;t++){const n=q5.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function j5(e){const t=G5.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Za(e.tagName))}function Z5(e,t){return t===F.MATHML&&(e===h.MI||e===h.MO||e===h.MN||e===h.MS||e===h.MTEXT)}function X5(e,t,n){if(t===F.MATHML&&e===h.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Dr.ENCODING){const i=n[r].value.toLowerCase();return i===Ap.TEXT_HTML||i===Ap.APPLICATION_XML}}return t===F.SVG&&(e===h.FOREIGN_OBJECT||e===h.DESC||e===h.TITLE)}function $5(e,t,n,r){return(!r||r===F.HTML)&&X5(e,t,n)||(!r||r===F.MATHML)&&Z5(e,t)}const e_="hidden",t_=8,n_=3;var T;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(T||(T={}));const r_={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},r2=new Set([h.TABLE,h.TBODY,h.TFOOT,h.THEAD,h.TR]),gp={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Tn,onParseError:null};let i2=class{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...gp,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new S5(this.options,this),this.activeFormattingElements=new v5(this.treeAdapter),this.fragmentContextID=r?Za(this.treeAdapter.getTagName(r)):h.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new B5(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...gp,...n};t??(t=r.treeAdapter.createElement(D.TEMPLATE,F.HTML,[]));const i=r.treeAdapter.createElement("documentmock",F.HTML,[]),u=new this(r,i,t);return u.fragmentContextID===h.TEMPLATE&&u.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const u=(i=t.location)!==null&&i!==void 0?i:r_,s={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:r?u.startLine:u.endLine,endCol:r?u.startCol:u.endCol,endOffset:r?u.startOffset:u.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,u;(u=(i=this.treeAdapter).onItemPush)===null||u===void 0||u.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let u,s;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,s=this.fragmentContextID):{current:u,currentTagId:s}=this.openElements,this._setContextModes(u,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===F.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,F.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=yt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===D.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==F.HTML))switch(this.fragmentContextID){case h.TITLE:case h.TEXTAREA:{this.tokenizer.state=yt.RCDATA;break}case h.STYLE:case h.XMP:case h.IFRAME:case h.NOEMBED:case h.NOFRAMES:case h.NOSCRIPT:{this.tokenizer.state=yt.RAWTEXT;break}case h.SCRIPT:{this.tokenizer.state=yt.SCRIPT_DATA;break}case h.PLAINTEXT:{this.tokenizer.state=yt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,F.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,F.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(D.HTML,F.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,h.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),u=r?i.lastIndexOf(r):i.length,s=i[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),u=n.type===me.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===h.SVG&&this.treeAdapter.getTagName(n)===D.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===F.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===h.MGLYPH||t.tagID===h.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,F.HTML)}_processToken(t){switch(t.type){case me.CHARACTER:{this.onCharacter(t);break}case me.NULL_CHARACTER:{this.onNullCharacter(t);break}case me.COMMENT:{this.onComment(t);break}case me.DOCTYPE:{this.onDoctype(t);break}case me.START_TAG:{this._processStartTag(t);break}case me.END_TAG:{this.onEndTag(t);break}case me.EOF:{this.onEof(t);break}case me.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return $5(t,i,u,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===$t.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const u=this.activeFormattingElements.entries[i];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(h.P),this.openElements.popUntilTagNamePopped(h.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case h.TR:{this.insertionMode=T.IN_ROW;return}case h.TBODY:case h.THEAD:case h.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case h.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case h.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case h.TABLE:{this.insertionMode=T.IN_TABLE;return}case h.BODY:{this.insertionMode=T.IN_BODY;return}case h.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case h.SELECT:{this._resetInsertionModeForSelect(t);return}case h.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case h.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case h.TD:case h.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case h.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===h.TEMPLATE)break;if(r===h.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return r2.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case h.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===F.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case h.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return T5[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){MO(this,t);return}switch(this.insertionMode){case T.INITIAL:{Ui(this,t);break}case T.BEFORE_HTML:{fu(this,t);break}case T.BEFORE_HEAD:{hu(this,t);break}case T.IN_HEAD:{pu(this,t);break}case T.IN_HEAD_NO_SCRIPT:{mu(this,t);break}case T.AFTER_HEAD:{Au(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{s2(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{cl(this,t);break}case T.IN_TABLE_TEXT:{f2(this,t);break}case T.IN_COLUMN_GROUP:{Ia(this,t);break}case T.AFTER_BODY:{Sa(this,t);break}case T.AFTER_AFTER_BODY:{js(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){RO(this,t);return}switch(this.insertionMode){case T.INITIAL:{Ui(this,t);break}case T.BEFORE_HTML:{fu(this,t);break}case T.BEFORE_HEAD:{hu(this,t);break}case T.IN_HEAD:{pu(this,t);break}case T.IN_HEAD_NO_SCRIPT:{mu(this,t);break}case T.AFTER_HEAD:{Au(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{cl(this,t);break}case T.IN_COLUMN_GROUP:{Ia(this,t);break}case T.AFTER_BODY:{Sa(this,t);break}case T.AFTER_AFTER_BODY:{js(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){wc(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{wc(this,t);break}case T.IN_TABLE_TEXT:{Wi(this,t);break}case T.AFTER_BODY:{c_(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{d_(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{f_(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,M.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Wi(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,M.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?BO(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Ui(this,t);break}case T.BEFORE_HTML:{h_(this,t);break}case T.BEFORE_HEAD:{m_(this,t);break}case T.IN_HEAD:{Jt(this,t);break}case T.IN_HEAD_NO_SCRIPT:{b_(this,t);break}case T.AFTER_HEAD:{y_(this,t);break}case T.IN_BODY:{it(this,t);break}case T.IN_TABLE:{yi(this,t);break}case T.IN_TABLE_TEXT:{Wi(this,t);break}case T.IN_CAPTION:{AO(this,t);break}case T.IN_COLUMN_GROUP:{Lf(this,t);break}case T.IN_TABLE_BODY:{eo(this,t);break}case T.IN_ROW:{to(this,t);break}case T.IN_CELL:{EO(this,t);break}case T.IN_SELECT:{m2(this,t);break}case T.IN_SELECT_IN_TABLE:{TO(this,t);break}case T.IN_TEMPLATE:{kO(this,t);break}case T.AFTER_BODY:{wO(this,t);break}case T.IN_FRAMESET:{IO(this,t);break}case T.AFTER_FRAMESET:{NO(this,t);break}case T.AFTER_AFTER_BODY:{_O(this,t);break}case T.AFTER_AFTER_FRAMESET:{OO(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?vO(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Ui(this,t);break}case T.BEFORE_HTML:{p_(this,t);break}case T.BEFORE_HEAD:{A_(this,t);break}case T.IN_HEAD:{g_(this,t);break}case T.IN_HEAD_NO_SCRIPT:{E_(this,t);break}case T.AFTER_HEAD:{T_(this,t);break}case T.IN_BODY:{$a(this,t);break}case T.TEXT:{sO(this,t);break}case T.IN_TABLE:{vu(this,t);break}case T.IN_TABLE_TEXT:{Wi(this,t);break}case T.IN_CAPTION:{gO(this,t);break}case T.IN_COLUMN_GROUP:{bO(this,t);break}case T.IN_TABLE_BODY:{Ic(this,t);break}case T.IN_ROW:{p2(this,t);break}case T.IN_CELL:{yO(this,t);break}case T.IN_SELECT:{A2(this,t);break}case T.IN_SELECT_IN_TABLE:{CO(this,t);break}case T.IN_TEMPLATE:{xO(this,t);break}case T.AFTER_BODY:{b2(this,t);break}case T.IN_FRAMESET:{SO(this,t);break}case T.AFTER_FRAMESET:{DO(this,t);break}case T.AFTER_AFTER_BODY:{js(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Ui(this,t);break}case T.BEFORE_HTML:{fu(this,t);break}case T.BEFORE_HEAD:{hu(this,t);break}case T.IN_HEAD:{pu(this,t);break}case T.IN_HEAD_NO_SCRIPT:{mu(this,t);break}case T.AFTER_HEAD:{Au(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{c2(this,t);break}case T.TEXT:{aO(this,t);break}case T.IN_TABLE_TEXT:{Wi(this,t);break}case T.IN_TEMPLATE:{g2(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{vf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===b.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{u2(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{cl(this,t);break}case T.IN_TABLE_TEXT:{d2(this,t);break}}}};function i_(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):l2(e,t),n}function u_(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function s_(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let u=0,s=i;s!==n;u++,s=i){i=e.openElements.getCommonAncestor(s);const a=e.activeFormattingElements.getElementEntry(s),o=a&&u>=n_;!a||o?(o&&e.activeFormattingElements.removeEntry(a),e.openElements.remove(s)):(s=a_(e,a),r===t&&(e.activeFormattingElements.bookmark=a),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function a_(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function o_(e,t,n){const r=e.treeAdapter.getTagName(t),i=Za(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);i===h.TEMPLATE&&u===F.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function l_(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,u=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,i.tagID)}function Bf(e,t){for(let n=0;n<t_;n++){const r=i_(e,t);if(!r)break;const i=u_(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const u=s_(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(u),s&&o_(e,s,u),l_(e,i,r)}}function wc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function c_(e,t){e._appendCommentNode(t,e.openElements.items[0])}function d_(e,t){e._appendCommentNode(t,e.document)}function vf(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(u);s&&!s.endTag&&e._setEndLocation(u,t)}}}}function f_(e,t){e._setDocumentType(t);const n=t.forceQuirks?It.QUIRKS:K5(t);W5(t)||e._err(t,M.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Ui(e,t){e._err(t,M.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,It.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function h_(e,t){t.tagID===h.HTML?(e._insertElement(t,F.HTML),e.insertionMode=T.BEFORE_HEAD):fu(e,t)}function p_(e,t){const n=t.tagID;(n===h.HTML||n===h.HEAD||n===h.BODY||n===h.BR)&&fu(e,t)}function fu(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function m_(e,t){switch(t.tagID){case h.HTML:{it(e,t);break}case h.HEAD:{e._insertElement(t,F.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:hu(e,t)}}function A_(e,t){const n=t.tagID;n===h.HEAD||n===h.BODY||n===h.HTML||n===h.BR?hu(e,t):e._err(t,M.endTagWithoutMatchingOpenElement)}function hu(e,t){e._insertFakeElement(D.HEAD,h.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function Jt(e,t){switch(t.tagID){case h.HTML:{it(e,t);break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:{e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.TITLE:{e._switchToTextParsing(t,yt.RCDATA);break}case h.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,yt.RAWTEXT):(e._insertElement(t,F.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case h.NOFRAMES:case h.STYLE:{e._switchToTextParsing(t,yt.RAWTEXT);break}case h.SCRIPT:{e._switchToTextParsing(t,yt.SCRIPT_DATA);break}case h.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case h.HEAD:{e._err(t,M.misplacedStartTagForHeadElement);break}default:pu(e,t)}}function g_(e,t){switch(t.tagID){case h.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case h.BODY:case h.BR:case h.HTML:{pu(e,t);break}case h.TEMPLATE:{Qr(e,t);break}default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function Qr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==h.TEMPLATE&&e._err(t,M.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,M.endTagWithoutMatchingOpenElement)}function pu(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function b_(e,t){switch(t.tagID){case h.HTML:{it(e,t);break}case h.BASEFONT:case h.BGSOUND:case h.HEAD:case h.LINK:case h.META:case h.NOFRAMES:case h.STYLE:{Jt(e,t);break}case h.NOSCRIPT:{e._err(t,M.nestedNoscriptInHead);break}default:mu(e,t)}}function E_(e,t){switch(t.tagID){case h.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case h.BR:{mu(e,t);break}default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function mu(e,t){const n=t.type===me.EOF?M.openElementsLeftAfterEof:M.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function y_(e,t){switch(t.tagID){case h.HTML:{it(e,t);break}case h.BODY:{e._insertElement(t,F.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case h.FRAMESET:{e._insertElement(t,F.HTML),e.insertionMode=T.IN_FRAMESET;break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{e._err(t,M.abandonedHeadElementChild),e.openElements.push(e.headElement,h.HEAD),Jt(e,t),e.openElements.remove(e.headElement);break}case h.HEAD:{e._err(t,M.misplacedStartTagForHeadElement);break}default:Au(e,t)}}function T_(e,t){switch(t.tagID){case h.BODY:case h.HTML:case h.BR:{Au(e,t);break}case h.TEMPLATE:{Qr(e,t);break}default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function Au(e,t){e._insertFakeElement(D.BODY,h.BODY),e.insertionMode=T.IN_BODY,Xa(e,t)}function Xa(e,t){switch(t.type){case me.CHARACTER:{s2(e,t);break}case me.WHITESPACE_CHARACTER:{u2(e,t);break}case me.COMMENT:{wc(e,t);break}case me.START_TAG:{it(e,t);break}case me.END_TAG:{$a(e,t);break}case me.EOF:{c2(e,t);break}}}function u2(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function s2(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function C_(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function k_(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function x_(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_FRAMESET)}function w_(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML)}function I_(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&xc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,F.HTML)}function S_(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function N_(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),n||(e.formElement=e.openElements.current))}function D_(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===h.LI&&i===h.LI||(n===h.DD||n===h.DT)&&(i===h.DD||i===h.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==h.ADDRESS&&i!==h.DIV&&i!==h.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML)}function __(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),e.tokenizer.state=yt.PLAINTEXT}function O_(e,t){e.openElements.hasInScope(h.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.framesetOk=!1}function R_(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(D.A);n&&(Bf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function M_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function B_(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(h.NOBR)&&(Bf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,F.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function v_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function L_(e,t){e.treeAdapter.getDocumentMode(e.document)!==It.QUIRKS&&e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function a2(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,F.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function o2(e){const t=Jb(e,Dr.TYPE);return t!=null&&t.toLowerCase()===e_}function P_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,F.HTML),o2(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function F_(e,t){e._appendElement(t,F.HTML),t.ackSelfClosing=!0}function H_(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._appendElement(t,F.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function U_(e,t){t.tagName=D.IMG,t.tagID=h.IMG,a2(e,t)}function W_(e,t){e._insertElement(t,F.HTML),e.skipNextNewLine=!0,e.tokenizer.state=yt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function K_(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,yt.RAWTEXT)}function z_(e,t){e.framesetOk=!1,e._switchToTextParsing(t,yt.RAWTEXT)}function bp(e,t){e._switchToTextParsing(t,yt.RAWTEXT)}function Q_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function Y_(e,t){e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML)}function q_(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,F.HTML)}function G_(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(h.RTC),e._insertElement(t,F.HTML)}function V_(e,t){e._reconstructActiveFormattingElements(),t2(t),Mf(t),t.selfClosing?e._appendElement(t,F.MATHML):e._insertElement(t,F.MATHML),t.ackSelfClosing=!0}function J_(e,t){e._reconstructActiveFormattingElements(),n2(t),Mf(t),t.selfClosing?e._appendElement(t,F.SVG):e._insertElement(t,F.SVG),t.ackSelfClosing=!0}function Ep(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML)}function it(e,t){switch(t.tagID){case h.I:case h.S:case h.B:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.SMALL:case h.STRIKE:case h.STRONG:{M_(e,t);break}case h.A:{R_(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{I_(e,t);break}case h.P:case h.DL:case h.OL:case h.UL:case h.DIV:case h.DIR:case h.NAV:case h.MAIN:case h.MENU:case h.ASIDE:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.DETAILS:case h.ADDRESS:case h.ARTICLE:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{w_(e,t);break}case h.LI:case h.DD:case h.DT:{D_(e,t);break}case h.BR:case h.IMG:case h.WBR:case h.AREA:case h.EMBED:case h.KEYGEN:{a2(e,t);break}case h.HR:{H_(e,t);break}case h.RB:case h.RTC:{q_(e,t);break}case h.RT:case h.RP:{G_(e,t);break}case h.PRE:case h.LISTING:{S_(e,t);break}case h.XMP:{K_(e,t);break}case h.SVG:{J_(e,t);break}case h.HTML:{C_(e,t);break}case h.BASE:case h.LINK:case h.META:case h.STYLE:case h.TITLE:case h.SCRIPT:case h.BGSOUND:case h.BASEFONT:case h.TEMPLATE:{Jt(e,t);break}case h.BODY:{k_(e,t);break}case h.FORM:{N_(e,t);break}case h.NOBR:{B_(e,t);break}case h.MATH:{V_(e,t);break}case h.TABLE:{L_(e,t);break}case h.INPUT:{P_(e,t);break}case h.PARAM:case h.TRACK:case h.SOURCE:{F_(e,t);break}case h.IMAGE:{U_(e,t);break}case h.BUTTON:{O_(e,t);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{v_(e,t);break}case h.IFRAME:{z_(e,t);break}case h.SELECT:{Q_(e,t);break}case h.OPTION:case h.OPTGROUP:{Y_(e,t);break}case h.NOEMBED:case h.NOFRAMES:{bp(e,t);break}case h.FRAMESET:{x_(e,t);break}case h.TEXTAREA:{W_(e,t);break}case h.NOSCRIPT:{e.options.scriptingEnabled?bp(e,t):Ep(e,t);break}case h.PLAINTEXT:{__(e,t);break}case h.COL:case h.TH:case h.TD:case h.TR:case h.HEAD:case h.FRAME:case h.TBODY:case h.TFOOT:case h.THEAD:case h.CAPTION:case h.COLGROUP:break;default:Ep(e,t)}}function j_(e,t){if(e.openElements.hasInScope(h.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Z_(e,t){e.openElements.hasInScope(h.BODY)&&(e.insertionMode=T.AFTER_BODY,b2(e,t))}function X_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function $_(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(h.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(h.FORM):n&&e.openElements.remove(n))}function eO(e){e.openElements.hasInButtonScope(h.P)||e._insertFakeElement(D.P,h.P),e._closePElement()}function tO(e){e.openElements.hasInListItemScope(h.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(h.LI),e.openElements.popUntilTagNamePopped(h.LI))}function nO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function rO(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function iO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function uO(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(D.BR,h.BR),e.openElements.pop(),e.framesetOk=!1}function l2(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const u=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==h.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(u,s))break}}function $a(e,t){switch(t.tagID){case h.A:case h.B:case h.I:case h.S:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.NOBR:case h.SMALL:case h.STRIKE:case h.STRONG:{Bf(e,t);break}case h.P:{eO(e);break}case h.DL:case h.UL:case h.OL:case h.DIR:case h.DIV:case h.NAV:case h.PRE:case h.MAIN:case h.MENU:case h.ASIDE:case h.BUTTON:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.ADDRESS:case h.ARTICLE:case h.DETAILS:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.LISTING:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{X_(e,t);break}case h.LI:{tO(e);break}case h.DD:case h.DT:{nO(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{rO(e);break}case h.BR:{uO(e);break}case h.BODY:{j_(e,t);break}case h.HTML:{Z_(e,t);break}case h.FORM:{$_(e);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{iO(e,t);break}case h.TEMPLATE:{Qr(e,t);break}default:l2(e,t)}}function c2(e,t){e.tmplInsertionModeStack.length>0?g2(e,t):vf(e,t)}function sO(e,t){var n;t.tagID===h.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function aO(e,t){e._err(t,M.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function cl(e,t){if(e.openElements.currentTagId!==void 0&&r2.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case me.CHARACTER:{f2(e,t);break}case me.WHITESPACE_CHARACTER:{d2(e,t);break}}else ms(e,t)}function oO(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_CAPTION}function lO(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function cO(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(D.COLGROUP,h.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Lf(e,t)}function dO(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_TABLE_BODY}function fO(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(D.TBODY,h.TBODY),e.insertionMode=T.IN_TABLE_BODY,eo(e,t)}function hO(e,t){e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function pO(e,t){o2(t)?e._appendElement(t,F.HTML):ms(e,t),t.ackSelfClosing=!0}function mO(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,F.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function yi(e,t){switch(t.tagID){case h.TD:case h.TH:case h.TR:{fO(e,t);break}case h.STYLE:case h.SCRIPT:case h.TEMPLATE:{Jt(e,t);break}case h.COL:{cO(e,t);break}case h.FORM:{mO(e,t);break}case h.TABLE:{hO(e,t);break}case h.TBODY:case h.TFOOT:case h.THEAD:{dO(e,t);break}case h.INPUT:{pO(e,t);break}case h.CAPTION:{oO(e,t);break}case h.COLGROUP:{lO(e,t);break}default:ms(e,t)}}function vu(e,t){switch(t.tagID){case h.TABLE:{e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode());break}case h.TEMPLATE:{Qr(e,t);break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:ms(e,t)}}function ms(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Xa(e,t),e.fosterParentingEnabled=n}function d2(e,t){e.pendingCharacterTokens.push(t)}function f2(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Wi(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ms(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const h2=new Set([h.CAPTION,h.COL,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]);function AO(e,t){const n=t.tagID;h2.has(n)?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,yi(e,t)):it(e,t)}function gO(e,t){const n=t.tagID;switch(n){case h.CAPTION:case h.TABLE:{e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===h.TABLE&&vu(e,t));break}case h.BODY:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:$a(e,t)}}function Lf(e,t){switch(t.tagID){case h.HTML:{it(e,t);break}case h.COL:{e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.TEMPLATE:{Jt(e,t);break}default:Ia(e,t)}}function bO(e,t){switch(t.tagID){case h.COLGROUP:{e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case h.TEMPLATE:{Qr(e,t);break}case h.COL:break;default:Ia(e,t)}}function Ia(e,t){e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function eo(e,t){switch(t.tagID){case h.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_ROW;break}case h.TH:case h.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(D.TR,h.TR),e.insertionMode=T.IN_ROW,to(e,t);break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,yi(e,t));break}default:yi(e,t)}}function Ic(e,t){const n=t.tagID;switch(t.tagID){case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case h.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,vu(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:case h.TR:break;default:vu(e,t)}}function to(e,t){switch(t.tagID){case h.TH:case h.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,eo(e,t));break}default:yi(e,t)}}function p2(e,t){switch(t.tagID){case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case h.TABLE:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Ic(e,t));break}case h.TBODY:case h.TFOOT:case h.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(h.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Ic(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:break;default:vu(e,t)}}function EO(e,t){const n=t.tagID;h2.has(n)?(e.openElements.hasInTableScope(h.TD)||e.openElements.hasInTableScope(h.TH))&&(e._closeTableCell(),to(e,t)):it(e,t)}function yO(e,t){const n=t.tagID;switch(n){case h.TD:case h.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case h.TABLE:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),p2(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:break;default:$a(e,t)}}function m2(e,t){switch(t.tagID){case h.HTML:{it(e,t);break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._insertElement(t,F.HTML);break}case h.OPTGROUP:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._insertElement(t,F.HTML);break}case h.HR:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.INPUT:case h.KEYGEN:case h.TEXTAREA:case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),t.tagID!==h.SELECT&&e._processStartTag(t));break}case h.SCRIPT:case h.TEMPLATE:{Jt(e,t);break}}}function A2(e,t){switch(t.tagID){case h.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===h.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===h.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop();break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop();break}case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode());break}case h.TEMPLATE:{Qr(e,t);break}}}function TO(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e._processStartTag(t)):m2(e,t)}function CO(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e.onEndTag(t)):A2(e,t)}function kO(e,t){switch(t.tagID){case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{Jt(e,t);break}case h.CAPTION:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,yi(e,t);break}case h.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Lf(e,t);break}case h.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,eo(e,t);break}case h.TD:case h.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,to(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,it(e,t)}}function xO(e,t){t.tagID===h.TEMPLATE&&Qr(e,t)}function g2(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):vf(e,t)}function wO(e,t){t.tagID===h.HTML?it(e,t):Sa(e,t)}function b2(e,t){var n;if(t.tagID===h.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===h.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Sa(e,t)}function Sa(e,t){e.insertionMode=T.IN_BODY,Xa(e,t)}function IO(e,t){switch(t.tagID){case h.HTML:{it(e,t);break}case h.FRAMESET:{e._insertElement(t,F.HTML);break}case h.FRAME:{e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.NOFRAMES:{Jt(e,t);break}}}function SO(e,t){t.tagID===h.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==h.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function NO(e,t){switch(t.tagID){case h.HTML:{it(e,t);break}case h.NOFRAMES:{Jt(e,t);break}}}function DO(e,t){t.tagID===h.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function _O(e,t){t.tagID===h.HTML?it(e,t):js(e,t)}function js(e,t){e.insertionMode=T.IN_BODY,Xa(e,t)}function OO(e,t){switch(t.tagID){case h.HTML:{it(e,t);break}case h.NOFRAMES:{Jt(e,t);break}}}function RO(e,t){t.chars=De,e._insertCharacters(t)}function MO(e,t){e._insertCharacters(t),e.framesetOk=!1}function E2(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==F.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function BO(e,t){if(J5(t))E2(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===F.MATHML?t2(t):r===F.SVG&&(j5(t),n2(t)),Mf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function vO(e,t){if(t.tagID===h.P||t.tagID===h.BR){E2(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===F.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}function y2(e,t){return function(r){let i,u=0,s="";for(;i=e.exec(r);)u!==i.index&&(s+=r.substring(u,i.index)),s+=t.get(i[0].charCodeAt(0)),u=i.index+1;return s+r.substring(u)}}const LO=y2(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),PO=y2(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),FO=new Set([D.AREA,D.BASE,D.BASEFONT,D.BGSOUND,D.BR,D.COL,D.EMBED,D.FRAME,D.HR,D.IMG,D.INPUT,D.KEYGEN,D.LINK,D.META,D.PARAM,D.SOURCE,D.TRACK,D.WBR]);function HO(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===F.HTML&&FO.has(t.treeAdapter.getTagName(e))}const UO={treeAdapter:Tn,scriptingEnabled:!0};function WO(e,t){const n={...UO,...t};return T2(e,n)}function KO(e,t){let n="";const r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===D.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===F.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(r);if(i)for(const u of i)n+=T2(u,t);return n}function T2(e,t){return t.treeAdapter.isElementNode(e)?zO(e,t):t.treeAdapter.isTextNode(e)?YO(e,t):t.treeAdapter.isCommentNode(e)?qO(e,t):t.treeAdapter.isDocumentTypeNode(e)?GO(e,t):""}function zO(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${QO(e,t)}>${HO(e,t)?"":`${KO(e,t)}</${n}>`}`}function QO(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case F.XML:{n+=`xml:${r.name}`;break}case F.XMLNS:{r.name!=="xmlns"&&(n+="xmlns:"),n+=r.name;break}case F.XLINK:{n+=`xlink:${r.name}`;break}default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${LO(r.value)}"`}return n}function YO(e,t){const{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),u=i&&n.isElementNode(i)&&n.getTagName(i);return u&&n.getNamespaceURI(i)===F.HTML&&k5(u,t.scriptingEnabled)?r:PO(r)}function qO(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function GO(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function VO(e,t){return i2.parse(e,t)}function JO(e,t,n){typeof e=="string"&&(n=t,t=e,e=null);const r=i2.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}function yp(e){const t=e.includes('"')?"'":'"';return t+e+t}function jO(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${yp(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${yp(n)}`),r}const Kn={isCommentNode:qa,isElementNode:ne,isTextNode:rn,createDocument(){const e=new Ur([]);return e["x-mode"]=It.NO_QUIRKS,e},createDocumentFragment(){return new Ur([])},createElement(e,t,n){const r=Object.create(null),i=Object.create(null),u=Object.create(null);for(let a=0;a<n.length;a++){const o=n[a].name;r[o]=n[a].value,i[o]=n[a].namespace,u[o]=n[a].prefix}const s=new bf(e,r,[]);return s.namespace=t,s["x-attribsNamespace"]=i,s["x-attribsPrefix"]=u,s},createCommentNode(e){return new mf(e)},createTextNode(e){return new _u(e)},appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const r=e.children.indexOf(n),{prev:i}=n;i&&(i.next=t,t.prev=i),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(e,t){Kn.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,n,r){const i=jO(t,n,r);let u=e.children.find(s=>mc(s)&&s.name==="!doctype");u?u.data=i??null:(u=new Af("!doctype",i),Kn.appendChild(e,u)),u["x-name"]=t,u["x-publicId"]=n,u["x-systemId"]=r},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:r}=e;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const n=e.children[e.children.length-1];n&&rn(n)?n.data+=t:Kn.appendChild(e,Kn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&rn(r)?r.data+=t:Kn.insertBefore(e,Kn.createTextNode(t),n)},adoptAttributes(e,t){for(let n=0;n<t.length;n++){const r=t[n].name;e.attribs[r]===void 0&&(e.attribs[r]=t[n].value,e["x-attribsNamespace"][r]=t[n].namespace,e["x-attribsPrefix"][r]=t[n].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return mc(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function ZO(e,t,n,r){var i;return(i=t.treeAdapter)!==null&&i!==void 0||(t.treeAdapter=Kn),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),n?VO(e,t):JO(r,e,t)}const XO={treeAdapter:Kn};function $O(e){const t="length"in e?e:[e];for(let r=0;r<t.length;r+=1){const i=t[r];fr(i)&&Array.prototype.splice.call(t,r,1,...i.children)}let n="";for(let r=0;r<t.length;r+=1){const i=t[r];n+=WO(i,XO)}return n}const C2=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),k2=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var dl;const eR=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Sc=(dl=String.fromCodePoint)!==null&&dl!==void 0?dl:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function tR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=eR.get(e))!==null&&t!==void 0?t:e}var Ye;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ye||(Ye={}));const nR=32;var Zn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Zn||(Zn={}));function Nc(e){return e>=Ye.ZERO&&e<=Ye.NINE}function rR(e){return e>=Ye.UPPER_A&&e<=Ye.UPPER_F||e>=Ye.LOWER_A&&e<=Ye.LOWER_F}function iR(e){return e>=Ye.UPPER_A&&e<=Ye.UPPER_Z||e>=Ye.LOWER_A&&e<=Ye.LOWER_Z||Nc(e)}function uR(e){return e===Ye.EQUALS||iR(e)}var ze;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ze||(ze={}));var en;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(en||(en={}));class x2{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ze.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=en.Strict}startEntity(t){this.decodeMode=t,this.state=ze.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ze.EntityStart:return t.charCodeAt(n)===Ye.NUM?(this.state=ze.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ze.NamedEntity,this.stateNamedEntity(t,n));case ze.NumericStart:return this.stateNumericStart(t,n);case ze.NumericDecimal:return this.stateNumericDecimal(t,n);case ze.NumericHex:return this.stateNumericHex(t,n);case ze.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|nR)===Ye.LOWER_X?(this.state=ze.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ze.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const u=r-n;this.result=this.result*Math.pow(i,u)+parseInt(t.substr(n,u),i),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Nc(i)||rR(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Nc(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ye.SEMI)this.consumed+=1;else if(this.decodeMode===en.Strict)return 0;return this.emitCodePoint(tR(this.result),this.consumed),this.errors&&(t!==Ye.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],u=(i&Zn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=sR(r,i,this.treeIndex+Math.max(1,u),s),this.treeIndex<0)return this.result===0||this.decodeMode===en.Attribute&&(u===0||uR(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],u=(i&Zn.VALUE_LENGTH)>>14,u!==0){if(s===Ye.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==en.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Zn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Zn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case ze.NamedEntity:return this.result!==0&&(this.decodeMode!==en.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ze.NumericDecimal:return this.emitNumericEntity(0,2);case ze.NumericHex:return this.emitNumericEntity(0,3);case ze.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ze.EntityStart:return 0}}}function w2(e){let t="";const n=new x2(e,r=>t+=Sc(r));return function(i,u){let s=0,a=0;for(;(a=i.indexOf("&",a))>=0;){t+=i.slice(s,a),n.startEntity(u);const l=n.write(i,a+1);if(l<0){s=a+n.end();break}s=a+l,a=l===0?s+1:s}const o=t+i.slice(s);return t="",o}}function sR(e,t,n,r){const i=(t&Zn.BRANCH_LENGTH)>>7,u=t&Zn.JUMP_TABLE;if(i===0)return u!==0&&r===u?n:-1;if(u){const o=r-u;return o<0||o>=i?-1:e[n+o]-1}let s=n,a=s+i-1;for(;s<=a;){const o=s+a>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)a=o-1;else return e[o+i]}return-1}w2(C2);w2(k2);var $;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})($||($={}));var U;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(U||(U={}));function En(e){return e===$.Space||e===$.NewLine||e===$.Tab||e===$.FormFeed||e===$.CarriageReturn}function Rs(e){return e===$.Slash||e===$.Gt||En(e)}function aR(e){return e>=$.LowerA&&e<=$.LowerZ||e>=$.UpperA&&e<=$.UpperZ}var tn;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(tn||(tn={}));const qe={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class oR{constructor({xmlMode:t=!1,decodeEntities:n=!0},r){this.cbs=r,this.state=U.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=U.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=n,this.entityDecoder=new x2(t?k2:C2,(i,u)=>this.emitCodePoint(i,u))}reset(){this.state=U.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=U.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===$.Lt||!this.decodeEntities&&this.fastForwardTo($.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=U.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===$.Amp&&this.startEntity()}stateSpecialStartSequence(t){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?Rs(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=U.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===$.Gt||En(t)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const r=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=r}this.isSpecial=!1,this.sectionStart=n+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===qe.TitleEnd?this.decodeEntities&&t===$.Amp&&this.startEntity():this.fastForwardTo($.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===$.Lt)}stateCDATASequence(t){t===qe.Cdata[this.sequenceIndex]?++this.sequenceIndex===qe.Cdata.length&&(this.state=U.InCommentLike,this.currentSequence=qe.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=U.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===qe.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=U.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!Rs(t):aR(t)}startSpecial(t,n){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=n,this.state=U.SpecialStartSequence}stateBeforeTagName(t){if(t===$.ExclamationMark)this.state=U.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===$.Questionmark)this.state=U.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const n=t|32;this.sectionStart=this.index,this.xmlMode?this.state=U.InTagName:n===qe.ScriptEnd[2]?this.state=U.BeforeSpecialS:n===qe.TitleEnd[2]?this.state=U.BeforeSpecialT:this.state=U.InTagName}else t===$.Slash?this.state=U.BeforeClosingTagName:(this.state=U.Text,this.stateText(t))}stateInTagName(t){Rs(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){En(t)||(t===$.Gt?this.state=U.Text:(this.state=this.isTagStartChar(t)?U.InClosingTagName:U.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===$.Gt||En(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=U.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.state=U.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===$.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=U.InSpecialTag,this.sequenceIndex=0):this.state=U.Text,this.sectionStart=this.index+1):t===$.Slash?this.state=U.InSelfClosingTag:En(t)||(this.state=U.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===$.Gt?(this.cbs.onselfclosingtag(this.index),this.state=U.Text,this.sectionStart=this.index+1,this.isSpecial=!1):En(t)||(this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===$.Eq||Rs(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=U.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===$.Eq?this.state=U.BeforeAttributeValue:t===$.Slash||t===$.Gt?(this.cbs.onattribend(tn.NoValue,this.sectionStart),this.sectionStart=-1,this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t)):En(t)||(this.cbs.onattribend(tn.NoValue,this.sectionStart),this.state=U.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===$.DoubleQuote?(this.state=U.InAttributeValueDq,this.sectionStart=this.index+1):t===$.SingleQuote?(this.state=U.InAttributeValueSq,this.sectionStart=this.index+1):En(t)||(this.sectionStart=this.index,this.state=U.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,n){t===n||!this.decodeEntities&&this.fastForwardTo(n)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===$.DoubleQuote?tn.Double:tn.Single,this.index+1),this.state=U.BeforeAttributeName):this.decodeEntities&&t===$.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,$.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,$.SingleQuote)}stateInAttributeValueNoQuotes(t){En(t)||t===$.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(tn.Unquoted,this.index),this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===$.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===$.OpeningSquareBracket?(this.state=U.CDATASequence,this.sequenceIndex=0):this.state=t===$.Dash?U.BeforeComment:U.InDeclaration}stateInDeclaration(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=U.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=U.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===$.Dash?(this.state=U.InCommentLike,this.currentSequence=qe.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=U.InDeclaration}stateInSpecialComment(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=U.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const n=t|32;n===qe.ScriptEnd[3]?this.startSpecial(qe.ScriptEnd,4):n===qe.StyleEnd[3]?this.startSpecial(qe.StyleEnd,4):(this.state=U.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const n=t|32;n===qe.TitleEnd[3]?this.startSpecial(qe.TitleEnd,4):n===qe.TextareaEnd[3]?this.startSpecial(qe.TextareaEnd,4):(this.state=U.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=U.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?en.Strict:this.baseState===U.Text||this.baseState===U.InSpecialTag?en.Legacy:en.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===U.Text||this.state===U.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===U.InAttributeValueDq||this.state===U.InAttributeValueSq||this.state===U.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case U.Text:{this.stateText(t);break}case U.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case U.InSpecialTag:{this.stateInSpecialTag(t);break}case U.CDATASequence:{this.stateCDATASequence(t);break}case U.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case U.InAttributeName:{this.stateInAttributeName(t);break}case U.InCommentLike:{this.stateInCommentLike(t);break}case U.InSpecialComment:{this.stateInSpecialComment(t);break}case U.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case U.InTagName:{this.stateInTagName(t);break}case U.InClosingTagName:{this.stateInClosingTagName(t);break}case U.BeforeTagName:{this.stateBeforeTagName(t);break}case U.AfterAttributeName:{this.stateAfterAttributeName(t);break}case U.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case U.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case U.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case U.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case U.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case U.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case U.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case U.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case U.InDeclaration:{this.stateInDeclaration(t);break}case U.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case U.BeforeComment:{this.stateBeforeComment(t);break}case U.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case U.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===U.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===U.InCommentLike?this.currentSequence===qe.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===U.InTagName||this.state===U.BeforeAttributeName||this.state===U.BeforeAttributeValue||this.state===U.AfterAttributeName||this.state===U.InAttributeName||this.state===U.InAttributeValueSq||this.state===U.InAttributeValueDq||this.state===U.InAttributeValueNq||this.state===U.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){this.baseState!==U.Text&&this.baseState!==U.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const Vr=new Set(["input","option","optgroup","select","button","datalist","textarea"]),ke=new Set(["p"]),Tp=new Set(["thead","tbody"]),Cp=new Set(["dd","dt"]),kp=new Set(["rt","rp"]),lR=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",ke],["h1",ke],["h2",ke],["h3",ke],["h4",ke],["h5",ke],["h6",ke],["select",Vr],["input",Vr],["output",Vr],["button",Vr],["datalist",Vr],["textarea",Vr],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Cp],["dt",Cp],["address",ke],["article",ke],["aside",ke],["blockquote",ke],["details",ke],["div",ke],["dl",ke],["fieldset",ke],["figcaption",ke],["figure",ke],["footer",ke],["form",ke],["header",ke],["hr",ke],["main",ke],["nav",ke],["ol",ke],["pre",ke],["section",ke],["table",ke],["ul",ke],["rt",kp],["rp",kp],["tbody",Tp],["tfoot",Tp]]),cR=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),xp=new Set(["math","svg"]),wp=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),dR=/\s|\//;class fR{constructor(t,n={}){var r,i,u,s,a,o;this.options=n,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(r=n.lowerCaseTags)!==null&&r!==void 0?r:this.htmlMode,this.lowerCaseAttributeNames=(i=n.lowerCaseAttributeNames)!==null&&i!==void 0?i:this.htmlMode,this.recognizeSelfClosing=(u=n.recognizeSelfClosing)!==null&&u!==void 0?u:!this.htmlMode,this.tokenizer=new((s=n.Tokenizer)!==null&&s!==void 0?s:oR)(this.options,this),this.foreignContext=[!this.htmlMode],(o=(a=this.cbs).onparserinit)===null||o===void 0||o.call(a,this)}ontext(t,n){var r,i;const u=this.getSlice(t,n);this.endIndex=n-1,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,u),this.startIndex=n}ontextentity(t,n){var r,i;this.endIndex=n-1,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,Sc(t)),this.startIndex=n}isVoidElement(t){return this.htmlMode&&cR.has(t)}onopentagname(t,n){this.endIndex=n;let r=this.getSlice(t,n);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)}emitOpenTag(t){var n,r,i,u;this.openTagStart=this.startIndex,this.tagname=t;const s=this.htmlMode&&lR.get(t);if(s)for(;this.stack.length>0&&s.has(this.stack[0]);){const a=this.stack.shift();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,a,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(xp.has(t)?this.foreignContext.unshift(!0):wp.has(t)&&this.foreignContext.unshift(!1))),(u=(i=this.cbs).onopentagname)===null||u===void 0||u.call(i,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,n){var r,i,u,s,a,o,l,c;this.endIndex=n;let d=this.getSlice(t,n);if(this.lowerCaseTagNames&&(d=d.toLowerCase()),this.htmlMode&&(xp.has(d)||wp.has(d))&&this.foreignContext.shift(),this.isVoidElement(d))this.htmlMode&&d==="br"&&((s=(u=this.cbs).onopentagname)===null||s===void 0||s.call(u,"br"),(o=(a=this.cbs).onopentag)===null||o===void 0||o.call(a,"br",{},!0),(c=(l=this.cbs).onclosetag)===null||c===void 0||c.call(l,"br",!1));else{const f=this.stack.indexOf(d);if(f!==-1)for(let p=0;p<=f;p++){const m=this.stack.shift();(i=(r=this.cbs).onclosetag)===null||i===void 0||i.call(r,m,p!==f)}else this.htmlMode&&d==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var n,r;const i=this.tagname;this.endOpenTag(t),this.stack[0]===i&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,i,!t),this.stack.shift())}onattribname(t,n){this.startIndex=t;const r=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r}onattribdata(t,n){this.attribvalue+=this.getSlice(t,n)}onattribentity(t){this.attribvalue+=Sc(t)}onattribend(t,n){var r,i;this.endIndex=n,(i=(r=this.cbs).onattribute)===null||i===void 0||i.call(r,this.attribname,this.attribvalue,t===tn.Double?'"':t===tn.Single?"'":t===tn.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const n=t.search(dR);let r=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r}ondeclaration(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(r);this.cbs.onprocessinginstruction(`!${i}`,`!${r}`)}this.startIndex=n+1}onprocessinginstruction(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(r);this.cbs.onprocessinginstruction(`?${i}`,`?${r}`)}this.startIndex=n+1}oncomment(t,n,r){var i,u,s,a;this.endIndex=n,(u=(i=this.cbs).oncomment)===null||u===void 0||u.call(i,this.getSlice(t,n-r)),(a=(s=this.cbs).oncommentend)===null||a===void 0||a.call(s),this.startIndex=n+1}oncdata(t,n,r){var i,u,s,a,o,l,c,d,f,p;this.endIndex=n;const m=this.getSlice(t,n-r);!this.htmlMode||this.options.recognizeCDATA?((u=(i=this.cbs).oncdatastart)===null||u===void 0||u.call(i),(a=(s=this.cbs).ontext)===null||a===void 0||a.call(s,m),(l=(o=this.cbs).oncdataend)===null||l===void 0||l.call(o)):((d=(c=this.cbs).oncomment)===null||d===void 0||d.call(c,`[CDATA[${m}]]`),(p=(f=this.cbs).oncommentend)===null||p===void 0||p.call(f)),this.startIndex=n+1}onend(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let r=0;r<this.stack.length;r++)this.cbs.onclosetag(this.stack[r],!0)}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)}reset(){var t,n,r,i;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(i=(r=this.cbs).onparserinit)===null||i===void 0||i.call(r,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let r=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);for(;n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}function hR(e,t){const n=new nN(void 0,t);return new fR(n,t).end(e),n.root}const pR=wD((e,t,n,r)=>t._useHtmlParser2?hR(e,t):ZO(e,t,n,r)),mR=i5(pR,(e,t)=>t._useHtmlParser2?Ga(e,t):$O(e)),AR=Object.freeze(Object.defineProperty({__proto__:null,contains:xf,load:mR,merge:Tb},Symbol.toStringTag,{value:"Module"})),gR=j3(AR);var fl={},hl={exports:{}},pl={exports:{}},Ip;function Pf(){return Ip||(Ip=1,(function(e,t){e.exports=n;function n(i){return r.bind(null,i)}function r(i){var u=[].slice.call(arguments,1);u.unshift("["+i+"]"),process.stderr.write(u.join(" ")+`
908
+ `)}})(pl)),pl.exports}var Sp;function I2(){return Sp||(Sp=1,(function(e,t){Pf()("lex"),e.exports=n;function n(r){var i="",u,s=0,a=-1,o=0,l=1,c="before-selector",d=[c],f={},p=[],m=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function A(){return z(),r[a]}function E(W){return W?d[d.length-1-W]:c}function g(W){var G=a+1;return W===r.slice(G,G+W.length)}function N(W){var G=r.slice(a).indexOf(W);return G>0?G:!1}function w(W){return W===_(1)}function _(W){return r[a+(W||1)]}function S(){var W=d.pop();return c=d[d.length-1],W}function x(W){return c=W,d.push(c),d.length}function O(W){var G=c;return d[d.length-1]=c=W,G}function z(W){if((W||1)==1)r[a]==`
909
+ `?(l++,s=1):s++,a++;else{var G=r.slice(a,a+W).split(`
910
+ `);G.length>1&&(l+=G.length-1,s=1),s+=G[G.length-1].length,a=a+W}}function R(){f.end={line:l,col:s},p.push(f),i="",f={}}function k(W){f={type:W,start:{line:l,col:s}}}for(;u=A();)switch(u){case" ":switch(E()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":i+=u;break}break;case`
907
911
  `:case" ":case"\r":case"\f":switch(E()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":i+=u;break;case"at-value":u===`
908
- `&&(f.value=i.trim(),O(),S());break}break;case":":switch(E()){case"name":f.name=i.trim(),i="",R("before-value");break;case"before-selector":i+=u,x("selector"),k("selector");break;case"before-value":R("value"),i+=u;break;default:i+=u;break}break;case";":switch(E()){case"name":case"before-value":case"value":i.trim().length>0&&(f.value=i.trim(),O()),R("before-name");break;case"value-paren":i+=u;break;case"at-value":f.value=i.trim(),O(),S();break;case"before-name":break;default:i+=u;break}break;case"{":switch(E()){case"selector":if(_(-1)==="\\"){i+=u;break}f.text=i.trim(),O(),R("before-name"),o=o+1;break;case"at-group":switch(f.name=i.trim(),f.type){case"font-face":case"viewport":case"page":k("before-name");break;default:k("before-selector")}O(),o=o+1;break;case"name":case"at-rule":f.name=i.trim(),O(),k("before-name"),o=o+1;break;case"comment":case"double-string":case"single-string":i+=u;break;case"before-value":R("value"),i+=u;break}break;case"}":switch(E()){case"before-name":case"name":case"before-value":case"value":i&&(f.value=i.trim()),f.name&&f.value&&O(),x("end"),O(),S(),E()==="at-group"&&(x("at-group-end"),O(),S()),o>0&&(o=o-1);break;case"at-group":case"before-selector":case"selector":if(_(-1)==="\\"){i+=u;break}o>0&&E(1)==="at-group"&&(x("at-group-end"),O()),o>1&&S(),o>0&&(o=o-1);break;case"double-string":case"single-string":case"comment":i+=u;break}break;case'"':case"'":switch(E()){case"double-string":u==='"'&&_(-1)!=="\\"&&S();break;case"single-string":u==="'"&&_(-1)!=="\\"&&S();break;case"before-at-value":R("at-value"),k(u==='"'?"double-string":"single-string");break;case"before-value":R("value"),k(u==='"'?"double-string":"single-string");break;case"comment":break;default:_(-1)!=="\\"&&k(u==='"'?"double-string":"single-string")}i+=u;break;case"/":switch(E()){case"comment":case"double-string":case"single-string":i+=u;break;case"before-value":case"selector":case"name":case"value":if(w("*")){var B=N("*/");B&&Q(B+1)}else E()=="before-value"&&R("value"),i+=u;break;default:w("*")?(x("comment"),k("comment"),Q()):i+=u;break}break;case"*":switch(E()){case"comment":w("/")?(f.text=i,Q(),O(),S()):i+=u;break;case"before-selector":i+=u,x("selector"),k("selector");break;case"before-value":R("value"),i+=u;break;default:i+=u}break;case"@":switch(E()){case"comment":case"double-string":case"single-string":i+=u;break;case"before-value":R("value"),i+=u;break;default:for(var P=!1,G,J,V=0,se=m.length;!P&&V<se;++V)J=m[V],G=J.name||J,g(G)&&(P=!0,x(G),k(J.state||"at-group"),Q(G.length),J.prefix&&(f.prefix=J.prefix),J.type&&(f.type=J.type));P||(i+=u);break}break;case"(":switch(E()){case"value":k("value-paren");break;case"before-value":R("value");break}i+=u;break;case")":switch(E()){case"value-paren":S();break;case"before-value":R("value");break}i+=u;break;default:switch(E()){case"before-selector":x("selector"),k("selector");break;case"before-name":x("property"),R("name");break;case"before-value":R("value");break;case"before-at-value":R("at-value");break}i+=u;break}return p}})(al)),al.exports}var ll={exports:{}},Ep;function TO(){return Ep||(Ep=1,(function(e,t){Lf()("parse");var n=e2();e.exports=a;var r,i,u,s;function a(S,k){k||(k={}),r=!!k.comments,u=!!k.position,i=0,s=Array.isArray(S)?S.slice():n(S);for(var R,Q=[],O;O=l();)R=g(O),R&&Q.push(R);return{type:"stylesheet",stylesheet:{rules:Q}}}function o(S,k){k||(k={});for(var R,Q=["type","name","value"],O={},x=0;x<Q.length;++x)R=Q[x],S[R]&&(O[R]=k[R]||S[R]);for(Q=Object.keys(k),x=0;x<Q.length;++x)R=Q[x],O[R]||(O[R]=k[R]);return u&&(O.position={start:S.start,end:S.end}),O}function l(){var S=s.shift();return S}function c(S){i=i+1;var k={};switch(S.type){case"font-face":case"viewport":k.declarations=w();break;case"page":k.prefix=S.prefix,k.declarations=w();break;default:k.prefix=S.prefix,k.rules=_()}return o(S,k)}function d(S){return o(S)}function f(S){return o(S)}function p(S){return o(S,{text:S.text})}function m(S){return o(S)}function A(S){return o(S)}function E(S){function k(R){return R.trim()}return o(S,{type:"rule",selectors:S.text.split(",").map(k),declarations:w()})}function g(S){switch(S.type){case"property":return A(S);case"selector":return E(S);case"at-group-end":i=i-1;return;case"media":case"keyframes":return c(S);case"comment":if(r)return p(S);break;case"charset":return f(S);case"import":return d(S);case"namespace":return m(S);case"font-face":case"supports":case"viewport":case"document":case"page":return c(S)}}function N(S){for(var k,R=[],Q;(Q=l())&&S&&S(Q);)k=g(Q),k&&R.push(k);return Q&&Q.type!=="end"&&s.unshift(Q),R}function w(){return N(function(S){return S.type==="property"||S.type==="comment"})}function _(){return N(function(){return i})}})(ll)),ll.exports}var cl={exports:{}},yp;function CO(){return yp||(yp=1,(function(e,t){Lf()("stringify");var n,r,i,u,s,a;e.exports=o;function o(_,S){S||(S={}),i=S.indentation||"",r=!!S.compress,n=!!S.comments,u=1,r?s=a="":(s=`
909
- `,a=" ");var k=m(_.stylesheet.rules,N).join(`
910
- `).trim();return k}function l(_){if(_){u+=_;return}return r?"":Array(u).join(i||"")}function c(_){return"@"+_.type+" "+_.value+";"+s}function d(_){var S="",k=_.prefix||"";_.name&&(S=" "+_.name);var R=_.type!=="page";return"@"+k+_.type+S+a+A(_,R)+s}function f(_){return n?"/*"+(_.text||"")+"*/"+s:""}function p(_){var S;return _.selectors?S=_.selectors.join(","+s):(S="@"+_.type,S+=_.name?" "+_.name:""),l()+S+a+A(_)+s}function m(_,S){return _.reduce(function(k,R){var Q=R.type==="comment"?f(R):S(R);return Q&&k.push(Q),k},[])}function A(_,S){var k=_.declarations,R=g;return _.rules&&(k=_.rules,R=p),k=E(k,R),k&&(k=s+k+(S?"":s)),"{"+k+l()+"}"}function E(_,S){if(!_)return"";l(1);var k=m(_,S);return l(-1),k.length?k.join(s):""}function g(_){if(_.type==="property")return w(_)}function N(_){switch(_.type){case"rule":return p(_);case"media":case"keyframes":return d(_);case"comment":return f(_);case"import":case"charset":case"namespace":return c(_);case"font-face":case"supports":case"viewport":case"document":case"page":return d(_)}}function w(_){var S=_.name?_.name+":"+a:"";return l()+S+_.value+";"}})(cl)),cl.exports}var dl,Tp;function xO(){return Tp||(Tp=1,dl={lex:e2(),parse:TO(),stringify:CO()}),dl}var fl={exports:{}},hl,Cp;function kO(){if(Cp)return hl;Cp=1;var e=/([-.*+?^${}()|[\]\/\\])/g,t=/\\/g,n=function(d){return(d+"").replace(e,"\\$1")},r=function(d){return(d+"").replace(t,"")},i=RegExp(`^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:(["']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:(["'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)`.replace(/<combinator>/,"["+n(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),u=function(f){this.combinator=f||" ",this.tag="*"};u.prototype.toString=function(){if(!this.raw){var d="",f,p;if(d+=this.tag||"*",this.id&&(d+="#"+this.id),this.classes&&(d+="."+this.classList.join(".")),this.attributes)for(f=0;p=this.attributes[f++];)d+="["+p.name+(p.operator?p.operator+'"'+p.value+'"':"")+"]";if(this.pseudos)for(f=0;p=this.pseudos[f++];)d+=":"+p.name,p.value&&(d+="("+p.value+")");this.raw=d}return this.raw};var s=function(){this.length=0};s.prototype.toString=function(){if(!this.raw){for(var d="",f=0,p;p=this[f++];)f!==1&&(d+=" "),p.combinator!==" "&&(d+=p.combinator+" "),d+=p;this.raw=d}return this.raw};var a=function(d,f,p,m,A,E,g,N,w,_,S,k,R,Q,O,x){var B,P;if((f||!this.length)&&(B=this[this.length++]=new s,f))return"";if(B||(B=this[this.length-1]),(p||m||!B.length)&&(P=B[B.length++]=new u(p)),P||(P=B[B.length-1]),A)P.tag=r(A);else if(E)P.id=r(E);else if(g){var G=r(g),J=P.classes||(P.classes={});if(!J[G]){J[G]=n(g);var V=P.classList||(P.classList=[]);V.push(G),V.sort()}}else R?(x=x||O,(P.pseudos||(P.pseudos=[])).push({type:k.length==1?"class":"element",name:r(R),escapedName:n(R),value:x?r(x):null,escapedValue:x?n(x):null})):N&&(S=S?n(S):null,(P.attributes||(P.attributes=[])).push({operator:w,name:r(N),escapedName:n(N),value:S?r(S):null,escapedValue:S?n(S):null}));return""},o=function(f){this.length=0;for(var p=this,m=f,A;f;){if(A=f.replace(i,function(){return a.apply(p,arguments)}),A===f)throw new Error(m+" is an invalid expression");f=A}};o.prototype.toString=function(){if(!this.raw){for(var d=[],f=0,p;p=this[f++];)d.push(p);this.raw=d.join(", ")}return this.raw};var l={},c=function(d){return d==null?null:(d=(""+d).replace(/^\s+|\s+$/g,""),l[d]||(l[d]=new o(d)))};return hl=c,hl}var xp;function wO(){return xp||(xp=1,(function(e,t){var n=kO();e.exports=r;function r(u,s){this.text=u,this.spec=void 0,this.styleAttribute=s||!1}r.prototype.parsed=function(){return this.tokens||(this.tokens=i(this.text)),this.tokens},r.prototype.specificity=function(){var u=this.styleAttribute;return this.spec||(this.spec=s(this.text,this.parsed())),this.spec;function s(a,o){for(var l=o||i(a),c=[u?1:0,0,0,0],d=[],f=0;f<l.length;f++){var p=l[f],m=p.pseudos;if(p.id&&c[1]++,p.attributes&&(c[2]+=p.attributes.length),p.classList&&(c[2]+=p.classList.length),p.tag&&p.tag!=="*"&&c[3]++,m){c[3]+=m.length;for(var A=0;A<m.length;A++)m[A].name==="not"&&(d.push(m[A].value),c[3]--)}}for(var E=d.length;E--;)for(var g=s(d[E]),N=4;N--;)c[N]+=g[N];return c}};function i(u){try{return n(u)[0]}catch{return[]}}})(fl)),fl.exports}var pl={exports:{}},kp;function IO(){return kp||(kp=1,(function(e,t){e.exports=r;var n=vf();function r(i,u,s,a,o){this.prop=i,this.value=u,this.selector=s,this.priority=a||0,this.additionalPriority=o||[]}r.prototype.compareFunc=function(i){var u=[];u.push.apply(u,this.selector.specificity()),u.push.apply(u,this.additionalPriority),u[0]+=this.priority;var s=[];return s.push.apply(s,i.selector.specificity()),s.push.apply(s,i.additionalPriority),s[0]+=i.priority,n.compareFunc(u,s)},r.prototype.compare=function(i){var u=this.compareFunc(i);return u===1?this:i},r.prototype.toString=function(){return this.prop+": "+this.value.replace(/['"]+/g,"")+";"}})(pl)),pl.exports}var wp;function vf(){return wp||(wp=1,(function(e){var t=xO(),n=wO(),r=IO();e.Selector=n,e.Property=r;e.extract=function(u){for(var s=0,a=[],o="",l=0,c=u.length;l<c;l++){var d=u.charAt(l);s?((d==="]"||d===")")&&s--,o+=d):d===","?(a.push(o),o=""):((d==="["||d==="(")&&s++,(o.length||d!==","&&d!==`
911
- `&&d!==" ")&&(o+=d))}return o.length&&a.push(o),a},e.parseCSS=function(i){var u=t.parse(i,{position:!0,comments:!0}),s=typeof u.stylesheet<"u"&&u.stylesheet.rules?u.stylesheet.rules:[],a=[],o=!1,l=!1;if(s.length>0&&s[0].type==="comment"&&s[0].text){var c=s[0].text.trim();c==="juice ignore"&&(l=!0)}if(l)return a;for(var d=0,f=s.length;d<f;d++){if(s[d].type==="comment"){if(!s[d].text)continue;var p=s[d].text.trim();p==="juice start ignore"?o=!0:p==="juice end ignore"?o=!1:p==="juice ignore next"&&d++;continue}if(!o&&s[d].type=="rule"){var m=s[d],A=m.selectors,E=[];if(m.declarations)for(var g=!1,N=0;N<m.declarations.length;N++){var w=m.declarations[N];if(w.type==="comment"&&w.text){var _=w.text.trim();if(_==="juice ignore next"){g=!0;continue}}if(g&&w.type==="property"){g=!1;continue}w.type==="property"&&E.push(w)}if(E.length>0)for(var S=0,k=A.length;S<k;S++)a.push([A[S],E])}}return a},e.getPreservedText=function(i,u,s){var a=t.parse(i,{position:!0,comments:!0}),o=typeof a.stylesheet<"u"&&a.stylesheet.rules?a.stylesheet.rules:[],l=[],c=!1,d=[],f=!1,p=new Set;if(o.length>0&&o[0].type==="comment"&&o[0].text){var m=o[0].text.trim();m==="juice ignore"&&(f=!0)}if(f)return`
912
+ `&&(f.value=i.trim(),R(),S());break}break;case":":switch(E()){case"name":f.name=i.trim(),i="",O("before-value");break;case"before-selector":i+=u,k("selector"),x("selector");break;case"before-value":O("value"),i+=u;break;default:i+=u;break}break;case";":switch(E()){case"name":case"before-value":case"value":i.trim().length>0&&(f.value=i.trim(),R()),O("before-name");break;case"value-paren":i+=u;break;case"at-value":f.value=i.trim(),R(),S();break;case"before-name":break;default:i+=u;break}break;case"{":switch(E()){case"selector":if(_(-1)==="\\"){i+=u;break}f.text=i.trim(),R(),O("before-name"),o=o+1;break;case"at-group":switch(f.name=i.trim(),f.type){case"font-face":case"viewport":case"page":x("before-name");break;default:x("before-selector")}R(),o=o+1;break;case"name":case"at-rule":f.name=i.trim(),R(),x("before-name"),o=o+1;break;case"comment":case"double-string":case"single-string":i+=u;break;case"before-value":O("value"),i+=u;break}break;case"}":switch(E()){case"before-name":case"name":case"before-value":case"value":i&&(f.value=i.trim()),f.name&&f.value&&R(),k("end"),R(),S(),E()==="at-group"&&(k("at-group-end"),R(),S()),o>0&&(o=o-1);break;case"at-group":case"before-selector":case"selector":if(_(-1)==="\\"){i+=u;break}o>0&&E(1)==="at-group"&&(k("at-group-end"),R()),o>1&&S(),o>0&&(o=o-1);break;case"double-string":case"single-string":case"comment":i+=u;break}break;case'"':case"'":switch(E()){case"double-string":u==='"'&&_(-1)!=="\\"&&S();break;case"single-string":u==="'"&&_(-1)!=="\\"&&S();break;case"before-at-value":O("at-value"),x(u==='"'?"double-string":"single-string");break;case"before-value":O("value"),x(u==='"'?"double-string":"single-string");break;case"comment":break;default:_(-1)!=="\\"&&x(u==='"'?"double-string":"single-string")}i+=u;break;case"/":switch(E()){case"comment":case"double-string":case"single-string":i+=u;break;case"before-value":case"selector":case"name":case"value":if(w("*")){var B=N("*/");B&&z(B+1)}else E()=="before-value"&&O("value"),i+=u;break;default:w("*")?(k("comment"),x("comment"),z()):i+=u;break}break;case"*":switch(E()){case"comment":w("/")?(f.text=i,z(),R(),S()):i+=u;break;case"before-selector":i+=u,k("selector"),x("selector");break;case"before-value":O("value"),i+=u;break;default:i+=u}break;case"@":switch(E()){case"comment":case"double-string":case"single-string":i+=u;break;case"before-value":O("value"),i+=u;break;default:for(var P=!1,q,J,V=0,oe=m.length;!P&&V<oe;++V)J=m[V],q=J.name||J,g(q)&&(P=!0,k(q),x(J.state||"at-group"),z(q.length),J.prefix&&(f.prefix=J.prefix),J.type&&(f.type=J.type));P||(i+=u);break}break;case"(":switch(E()){case"value":x("value-paren");break;case"before-value":O("value");break}i+=u;break;case")":switch(E()){case"value-paren":S();break;case"before-value":O("value");break}i+=u;break;default:switch(E()){case"before-selector":k("selector"),x("selector");break;case"before-name":k("property"),O("name");break;case"before-value":O("value");break;case"before-at-value":O("at-value");break}i+=u;break}return p}})(hl)),hl.exports}var ml={exports:{}},Np;function bR(){return Np||(Np=1,(function(e,t){Pf()("parse");var n=I2();e.exports=a;var r,i,u,s;function a(S,x){x||(x={}),r=!!x.comments,u=!!x.position,i=0,s=Array.isArray(S)?S.slice():n(S);for(var O,z=[],R;R=l();)O=g(R),O&&z.push(O);return{type:"stylesheet",stylesheet:{rules:z}}}function o(S,x){x||(x={});for(var O,z=["type","name","value"],R={},k=0;k<z.length;++k)O=z[k],S[O]&&(R[O]=x[O]||S[O]);for(z=Object.keys(x),k=0;k<z.length;++k)O=z[k],R[O]||(R[O]=x[O]);return u&&(R.position={start:S.start,end:S.end}),R}function l(){var S=s.shift();return S}function c(S){i=i+1;var x={};switch(S.type){case"font-face":case"viewport":x.declarations=w();break;case"page":x.prefix=S.prefix,x.declarations=w();break;default:x.prefix=S.prefix,x.rules=_()}return o(S,x)}function d(S){return o(S)}function f(S){return o(S)}function p(S){return o(S,{text:S.text})}function m(S){return o(S)}function A(S){return o(S)}function E(S){function x(O){return O.trim()}return o(S,{type:"rule",selectors:S.text.split(",").map(x),declarations:w()})}function g(S){switch(S.type){case"property":return A(S);case"selector":return E(S);case"at-group-end":i=i-1;return;case"media":case"keyframes":return c(S);case"comment":if(r)return p(S);break;case"charset":return f(S);case"import":return d(S);case"namespace":return m(S);case"font-face":case"supports":case"viewport":case"document":case"page":return c(S)}}function N(S){for(var x,O=[],z;(z=l())&&S&&S(z);)x=g(z),x&&O.push(x);return z&&z.type!=="end"&&s.unshift(z),O}function w(){return N(function(S){return S.type==="property"||S.type==="comment"})}function _(){return N(function(){return i})}})(ml)),ml.exports}var Al={exports:{}},Dp;function ER(){return Dp||(Dp=1,(function(e,t){Pf()("stringify");var n,r,i,u,s,a;e.exports=o;function o(_,S){S||(S={}),i=S.indentation||"",r=!!S.compress,n=!!S.comments,u=1,r?s=a="":(s=`
913
+ `,a=" ");var x=m(_.stylesheet.rules,N).join(`
914
+ `).trim();return x}function l(_){if(_){u+=_;return}return r?"":Array(u).join(i||"")}function c(_){return"@"+_.type+" "+_.value+";"+s}function d(_){var S="",x=_.prefix||"";_.name&&(S=" "+_.name);var O=_.type!=="page";return"@"+x+_.type+S+a+A(_,O)+s}function f(_){return n?"/*"+(_.text||"")+"*/"+s:""}function p(_){var S;return _.selectors?S=_.selectors.join(","+s):(S="@"+_.type,S+=_.name?" "+_.name:""),l()+S+a+A(_)+s}function m(_,S){return _.reduce(function(x,O){var z=O.type==="comment"?f(O):S(O);return z&&x.push(z),x},[])}function A(_,S){var x=_.declarations,O=g;return _.rules&&(x=_.rules,O=p),x=E(x,O),x&&(x=s+x+(S?"":s)),"{"+x+l()+"}"}function E(_,S){if(!_)return"";l(1);var x=m(_,S);return l(-1),x.length?x.join(s):""}function g(_){if(_.type==="property")return w(_)}function N(_){switch(_.type){case"rule":return p(_);case"media":case"keyframes":return d(_);case"comment":return f(_);case"import":case"charset":case"namespace":return c(_);case"font-face":case"supports":case"viewport":case"document":case"page":return d(_)}}function w(_){var S=_.name?_.name+":"+a:"";return l()+S+_.value+";"}})(Al)),Al.exports}var gl,_p;function yR(){return _p||(_p=1,gl={lex:I2(),parse:bR(),stringify:ER()}),gl}var bl={exports:{}},El,Op;function TR(){if(Op)return El;Op=1;var e=/([-.*+?^${}()|[\]\/\\])/g,t=/\\/g,n=function(d){return(d+"").replace(e,"\\$1")},r=function(d){return(d+"").replace(t,"")},i=RegExp(`^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:(["']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:(["'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)`.replace(/<combinator>/,"["+n(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),u=function(f){this.combinator=f||" ",this.tag="*"};u.prototype.toString=function(){if(!this.raw){var d="",f,p;if(d+=this.tag||"*",this.id&&(d+="#"+this.id),this.classes&&(d+="."+this.classList.join(".")),this.attributes)for(f=0;p=this.attributes[f++];)d+="["+p.name+(p.operator?p.operator+'"'+p.value+'"':"")+"]";if(this.pseudos)for(f=0;p=this.pseudos[f++];)d+=":"+p.name,p.value&&(d+="("+p.value+")");this.raw=d}return this.raw};var s=function(){this.length=0};s.prototype.toString=function(){if(!this.raw){for(var d="",f=0,p;p=this[f++];)f!==1&&(d+=" "),p.combinator!==" "&&(d+=p.combinator+" "),d+=p;this.raw=d}return this.raw};var a=function(d,f,p,m,A,E,g,N,w,_,S,x,O,z,R,k){var B,P;if((f||!this.length)&&(B=this[this.length++]=new s,f))return"";if(B||(B=this[this.length-1]),(p||m||!B.length)&&(P=B[B.length++]=new u(p)),P||(P=B[B.length-1]),A)P.tag=r(A);else if(E)P.id=r(E);else if(g){var q=r(g),J=P.classes||(P.classes={});if(!J[q]){J[q]=n(g);var V=P.classList||(P.classList=[]);V.push(q),V.sort()}}else O?(k=k||R,(P.pseudos||(P.pseudos=[])).push({type:x.length==1?"class":"element",name:r(O),escapedName:n(O),value:k?r(k):null,escapedValue:k?n(k):null})):N&&(S=S?n(S):null,(P.attributes||(P.attributes=[])).push({operator:w,name:r(N),escapedName:n(N),value:S?r(S):null,escapedValue:S?n(S):null}));return""},o=function(f){this.length=0;for(var p=this,m=f,A;f;){if(A=f.replace(i,function(){return a.apply(p,arguments)}),A===f)throw new Error(m+" is an invalid expression");f=A}};o.prototype.toString=function(){if(!this.raw){for(var d=[],f=0,p;p=this[f++];)d.push(p);this.raw=d.join(", ")}return this.raw};var l={},c=function(d){return d==null?null:(d=(""+d).replace(/^\s+|\s+$/g,""),l[d]||(l[d]=new o(d)))};return El=c,El}var Rp;function CR(){return Rp||(Rp=1,(function(e,t){var n=TR();e.exports=r;function r(u,s){this.text=u,this.spec=void 0,this.styleAttribute=s||!1}r.prototype.parsed=function(){return this.tokens||(this.tokens=i(this.text)),this.tokens},r.prototype.specificity=function(){var u=this.styleAttribute;return this.spec||(this.spec=s(this.text,this.parsed())),this.spec;function s(a,o){for(var l=o||i(a),c=[u?1:0,0,0,0],d=[],f=0;f<l.length;f++){var p=l[f],m=p.pseudos;if(p.id&&c[1]++,p.attributes&&(c[2]+=p.attributes.length),p.classList&&(c[2]+=p.classList.length),p.tag&&p.tag!=="*"&&c[3]++,m){c[3]+=m.length;for(var A=0;A<m.length;A++)m[A].name==="not"&&(d.push(m[A].value),c[3]--)}}for(var E=d.length;E--;)for(var g=s(d[E]),N=4;N--;)c[N]+=g[N];return c}};function i(u){try{return n(u)[0]}catch{return[]}}})(bl)),bl.exports}var yl={exports:{}},Mp;function kR(){return Mp||(Mp=1,(function(e,t){e.exports=r;var n=Ff();function r(i,u,s,a,o){this.prop=i,this.value=u,this.selector=s,this.priority=a||0,this.additionalPriority=o||[]}r.prototype.compareFunc=function(i){var u=[];u.push.apply(u,this.selector.specificity()),u.push.apply(u,this.additionalPriority),u[0]+=this.priority;var s=[];return s.push.apply(s,i.selector.specificity()),s.push.apply(s,i.additionalPriority),s[0]+=i.priority,n.compareFunc(u,s)},r.prototype.compare=function(i){var u=this.compareFunc(i);return u===1?this:i},r.prototype.toString=function(){return this.prop+": "+this.value.replace(/['"]+/g,"")+";"}})(yl)),yl.exports}var Bp;function Ff(){return Bp||(Bp=1,(function(e){var t=yR(),n=CR(),r=kR();e.Selector=n,e.Property=r;e.extract=function(u){for(var s=0,a=[],o="",l=0,c=u.length;l<c;l++){var d=u.charAt(l);s?((d==="]"||d===")")&&s--,o+=d):d===","?(a.push(o),o=""):((d==="["||d==="(")&&s++,(o.length||d!==","&&d!==`
915
+ `&&d!==" ")&&(o+=d))}return o.length&&a.push(o),a},e.parseCSS=function(i){var u=t.parse(i,{position:!0,comments:!0}),s=typeof u.stylesheet<"u"&&u.stylesheet.rules?u.stylesheet.rules:[],a=[],o=!1,l=!1;if(s.length>0&&s[0].type==="comment"&&s[0].text){var c=s[0].text.trim();c==="juice ignore"&&(l=!0)}if(l)return a;for(var d=0,f=s.length;d<f;d++){if(s[d].type==="comment"){if(!s[d].text)continue;var p=s[d].text.trim();p==="juice start ignore"?o=!0:p==="juice end ignore"?o=!1:p==="juice ignore next"&&d++;continue}if(!o&&s[d].type=="rule"){var m=s[d],A=m.selectors,E=[];if(m.declarations)for(var g=!1,N=0;N<m.declarations.length;N++){var w=m.declarations[N];if(w.type==="comment"&&w.text){var _=w.text.trim();if(_==="juice ignore next"){g=!0;continue}}if(g&&w.type==="property"){g=!1;continue}w.type==="property"&&E.push(w)}if(E.length>0)for(var S=0,x=A.length;S<x;S++)a.push([A[S],E])}}return a},e.getPreservedText=function(i,u,s){var a=t.parse(i,{position:!0,comments:!0}),o=typeof a.stylesheet<"u"&&a.stylesheet.rules?a.stylesheet.rules:[],l=[],c=!1,d=[],f=!1,p=new Set;if(o.length>0&&o[0].type==="comment"&&o[0].text){var m=o[0].text.trim();m==="juice ignore"&&(f=!0)}if(f)return`
912
916
  `+i+`
913
917
  `;for(var A=0;A<o.length;A++){if(o[A].type==="comment"&&o[A].text){var E=o[A].text.trim();E==="juice ignore next"&&A+1<o.length&&p.add(A+1)}if(o[A].type==="rule"&&o[A].declarations){for(var g=0;g<o[A].declarations.length;g++)if(o[A].declarations[g].type==="comment"&&o[A].declarations[g].text){var N=o[A].declarations[g].text.trim();if(N==="juice ignore next"){p.add(A);break}}}}for(var A=o.length-1;A>=0;A--){var w=o[A];if(w.type==="comment"){if(!w.text)continue;var E=w.text.trim();E==="juice end ignore"?(c=!0,d.push(w)):E==="juice start ignore"&&(c=!1,d.push(w),d.length>0&&(l.unshift(t.stringify({stylesheet:{rules:d.reverse()}},{comments:!0,indentation:" "})),d=[]));continue}if(c){d.push(w);continue}if(p.has(A)){l.unshift(t.stringify({stylesheet:{rules:[w]}},{comments:!0,indentation:" "}));continue}(u.fontFaces&&w.type==="font-face"||u.mediaQueries&&w.type==="media"||u.keyFrames&&w.type==="keyframes"||u.pseudos&&w.selectors&&this.matchesPseudo(w.selectors[0],s)||u.preservedSelectors&&w.selectors&&w.selectors.some(function(S){return e.matchesPreservedSelector(S,u.preservedSelectors)}))&&l.unshift(t.stringify({stylesheet:{rules:[w]}},{comments:!1,indentation:" "})),w.position.start}return l.length===0?!1:`
914
918
  `+l.join(`
915
919
  `)+`
916
920
  `},e.normalizeLineEndings=function(i){return i.replace(/\r\n/g,`
917
921
  `).replace(/\n/g,`\r
918
- `)},e.matchesPseudo=function(i,u){return u.find(function(s){return i.indexOf(":"+s)>-1})},e.matchesPreservedSelector=function(i,u){if(!u||u.length===0)return!1;for(var s=0;s<u.length;s++){var a=u[s];if(i===a||i.indexOf(a)!==-1)return!0}return!1},e.removeInlinedSelectorsFromCSS=function(i,u,s,a){for(var o=t.parse(i,{position:!0,comments:!0}),l=typeof o.stylesheet<"u"&&o.stylesheet.rules?o.stylesheet.rules:[],c=[],d=0;d<l.length;d++){var f=l[d];if(f.type!=="rule"){c.push(f);continue}if(f.selectors&&s.preservePseudos&&this.matchesPseudo(f.selectors[0],a)){c.push(f);continue}if(f.selectors&&s.preservedSelectors&&f.selectors.some(function(A){return e.matchesPreservedSelector(A,s.preservedSelectors)})){c.push(f);continue}var p=f.selectors.filter(function(A){return!u.has(A)});if(p.length>0){var m=Object.assign({},f,{selectors:p});c.push(m)}}return c.length===0?"":t.stringify({stylesheet:{rules:c}},{comments:!1,indentation:" "})},e.compareFunc=function(i,u){for(var s=Math.min(i.length,u.length),a=0;a<s;a++)if(i[a]!==u[a])return i[a]>u[a]?1:-1;return i.length-u.length},e.compare=function(i,u){return e.compareFunc(i,u)==1?i:u},e.getDefaultOptions=function(i){var u=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,removeInlinedSelectors:!1,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,preservedSelectors:[],applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,resolveCSSVariables:!0,inlineDuplicateProperties:!1,url:""},i);return u.webResources=u.webResources||{},u}})(sl)),sl}var Ip;function SO(){return Ip||(Ip=1,(function(e){var t=yO;vf();var n=function(i,u,s){const{xmlMode:a,...o}=u;return u=Object.assign({xml:{decodeEntities:!1,xmlMode:a}},o),i=s(i),t.load(i,u)},r=function(){var i=[],u=function(a){var o=e.exports.codeBlocks;return Object.keys(o).forEach(function(l){var c=new RegExp(o[l].start+"([\\S\\s]*?)"+o[l].end,"g");a=a.replace(c,function(d,f){return i.push(d),"JUICE_CODE_BLOCK_"+(i.length-1)+"_"})}),a},s=function(a){for(var o=0;o<i.length;o++){var l=new RegExp("JUICE_CODE_BLOCK_"+o+'_(="")?',"gi");a=a.replace(l,function(){return i[o]})}return a};return{encodeEntities:u,decodeEntities:s}};e.exports=function(i,u,s,a){var o=r(),l=n(i,u,o.encodeEntities),c=[l];c.push.apply(c,a);var d=s.apply(void 0,c)||l;return u&&u.xmlMode?o.decodeEntities(d.xml()):o.decodeEntities(d.html())},e.exports.codeBlocks={EJS:{start:"<%",end:"%>"},HBS:{start:"{{",end:"}}"}}})(Vo)),Vo.exports}var ml={},Al={},gl={},Sp;function Np(){return Sp||(Sp=1,(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.fromCodePoint=void 0,e.replaceCodePoint=r,e.decodeCodePoint=i;const n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(t=String.fromCodePoint)!==null&&t!==void 0?t:(u=>{let s="";return u>65535&&(u-=65536,s+=String.fromCharCode(u>>>10&1023|55296),u=56320|u&1023),s+=String.fromCharCode(u),s});function r(u){var s;return u>=55296&&u<=57343||u>1114111?65533:(s=n.get(u))!==null&&s!==void 0?s:u}function i(u){return(0,e.fromCodePoint)(r(u))}})(gl)),gl}var vi={},Ts={},Dp;function t2(){if(Dp)return Ts;Dp=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.decodeBase64=e;function e(t){const n=typeof atob=="function"?atob(t):typeof Buffer.from=="function"?Buffer.from(t,"base64").toString("binary"):new Buffer(t,"base64").toString("binary"),r=n.length&-2,i=new Uint16Array(r/2);for(let u=0,s=0;u<r;u+=2){const a=n.charCodeAt(u),o=n.charCodeAt(u+1);i[s++]=a|o<<8}return i}return Ts}var _p;function Op(){if(_p)return vi;_p=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.htmlDecodeTree=void 0;const e=t2();return vi.htmlDecodeTree=(0,e.decodeBase64)("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg"),vi}var Pi={},Rp;function Mp(){if(Rp)return Pi;Rp=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.xmlDecodeTree=void 0;const e=t2();return Pi.xmlDecodeTree=(0,e.decodeBase64)("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg"),Pi}var Fi={},Bp;function NO(){if(Bp)return Fi;Bp=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.BinTrieFlags=void 0;var e;return(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.FLAG13=8192]="FLAG13",t[t.BRANCH_LENGTH=8064]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(e||(Fi.BinTrieFlags=e={})),Fi}var Lp;function vp(){return Lp||(Lp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.xmlDecodeTree=e.htmlDecodeTree=e.replaceCodePoint=e.fromCodePoint=e.decodeCodePoint=e.EntityDecoder=e.DecodingMode=void 0,e.determineBranch=A,e.decodeHTML=N,e.decodeHTMLAttribute=w,e.decodeHTMLStrict=_,e.decodeXML=S;const t=Np(),n=Op(),r=Mp(),i=NO();var u;(function(O){O[O.NUM=35]="NUM",O[O.SEMI=59]="SEMI",O[O.EQUALS=61]="EQUALS",O[O.ZERO=48]="ZERO",O[O.NINE=57]="NINE",O[O.LOWER_A=97]="LOWER_A",O[O.LOWER_F=102]="LOWER_F",O[O.LOWER_X=120]="LOWER_X",O[O.LOWER_Z=122]="LOWER_Z",O[O.UPPER_A=65]="UPPER_A",O[O.UPPER_F=70]="UPPER_F",O[O.UPPER_Z=90]="UPPER_Z"})(u||(u={}));const s=32;function a(O){return O>=u.ZERO&&O<=u.NINE}function o(O){return O>=u.UPPER_A&&O<=u.UPPER_F||O>=u.LOWER_A&&O<=u.LOWER_F}function l(O){return O>=u.UPPER_A&&O<=u.UPPER_Z||O>=u.LOWER_A&&O<=u.LOWER_Z||a(O)}function c(O){return O===u.EQUALS||l(O)}var d;(function(O){O[O.EntityStart=0]="EntityStart",O[O.NumericStart=1]="NumericStart",O[O.NumericDecimal=2]="NumericDecimal",O[O.NumericHex=3]="NumericHex",O[O.NamedEntity=4]="NamedEntity"})(d||(d={}));var f;(function(O){O[O.Legacy=0]="Legacy",O[O.Strict=1]="Strict",O[O.Attribute=2]="Attribute"})(f||(e.DecodingMode=f={}));class p{constructor(x,B,P){this.decodeTree=x,this.emitCodePoint=B,this.errors=P,this.state=d.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=f.Strict,this.runConsumed=0}startEntity(x){this.decodeMode=x,this.state=d.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(x,B){switch(this.state){case d.EntityStart:return x.charCodeAt(B)===u.NUM?(this.state=d.NumericStart,this.consumed+=1,this.stateNumericStart(x,B+1)):(this.state=d.NamedEntity,this.stateNamedEntity(x,B));case d.NumericStart:return this.stateNumericStart(x,B);case d.NumericDecimal:return this.stateNumericDecimal(x,B);case d.NumericHex:return this.stateNumericHex(x,B);case d.NamedEntity:return this.stateNamedEntity(x,B)}}stateNumericStart(x,B){return B>=x.length?-1:(x.charCodeAt(B)|s)===u.LOWER_X?(this.state=d.NumericHex,this.consumed+=1,this.stateNumericHex(x,B+1)):(this.state=d.NumericDecimal,this.stateNumericDecimal(x,B))}stateNumericHex(x,B){for(;B<x.length;){const P=x.charCodeAt(B);if(a(P)||o(P)){const G=P<=u.NINE?P-u.ZERO:(P|s)-u.LOWER_A+10;this.result=this.result*16+G,this.consumed++,B++}else return this.emitNumericEntity(P,3)}return-1}stateNumericDecimal(x,B){for(;B<x.length;){const P=x.charCodeAt(B);if(a(P))this.result=this.result*10+(P-u.ZERO),this.consumed++,B++;else return this.emitNumericEntity(P,2)}return-1}emitNumericEntity(x,B){var P;if(this.consumed<=B)return(P=this.errors)===null||P===void 0||P.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(x===u.SEMI)this.consumed+=1;else if(this.decodeMode===f.Strict)return 0;return this.emitCodePoint((0,t.replaceCodePoint)(this.result),this.consumed),this.errors&&(x!==u.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(x,B){const{decodeTree:P}=this;let G=P[this.treeIndex],J=(G&i.BinTrieFlags.VALUE_LENGTH)>>14;for(;B<x.length;){if(J===0&&(G&i.BinTrieFlags.FLAG13)!==0){const se=(G&i.BinTrieFlags.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const W=G&i.BinTrieFlags.JUMP_TABLE;if(x.charCodeAt(B)!==W)return this.result===0?0:this.emitNotTerminatedNamedEntity();B++,this.excess++,this.runConsumed++}for(;this.runConsumed<se;){if(B>=x.length)return-1;const W=this.runConsumed-1,q=P[this.treeIndex+1+(W>>1)],we=W%2===0?q&255:q>>8&255;if(x.charCodeAt(B)!==we)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();B++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(se>>1),G=P[this.treeIndex],J=(G&i.BinTrieFlags.VALUE_LENGTH)>>14}if(B>=x.length)break;const V=x.charCodeAt(B);if(V===u.SEMI&&J!==0&&(G&i.BinTrieFlags.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,J,this.consumed+this.excess);if(this.treeIndex=A(P,G,this.treeIndex+Math.max(1,J),V),this.treeIndex<0)return this.result===0||this.decodeMode===f.Attribute&&(J===0||c(V))?0:this.emitNotTerminatedNamedEntity();if(G=P[this.treeIndex],J=(G&i.BinTrieFlags.VALUE_LENGTH)>>14,J!==0){if(V===u.SEMI)return this.emitNamedEntityData(this.treeIndex,J,this.consumed+this.excess);this.decodeMode!==f.Strict&&(G&i.BinTrieFlags.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}B++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var x;const{result:B,decodeTree:P}=this,G=(P[B]&i.BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(B,G,this.consumed),(x=this.errors)===null||x===void 0||x.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(x,B,P){const{decodeTree:G}=this;return this.emitCodePoint(B===1?G[x]&~(i.BinTrieFlags.VALUE_LENGTH|i.BinTrieFlags.FLAG13):G[x+1],P),B===3&&this.emitCodePoint(G[x+2],P),P}end(){var x;switch(this.state){case d.NamedEntity:return this.result!==0&&(this.decodeMode!==f.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case d.NumericDecimal:return this.emitNumericEntity(0,2);case d.NumericHex:return this.emitNumericEntity(0,3);case d.NumericStart:return(x=this.errors)===null||x===void 0||x.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case d.EntityStart:return 0}}}e.EntityDecoder=p;function m(O){let x="";const B=new p(O,P=>x+=(0,t.fromCodePoint)(P));return function(G,J){let V=0,se=0;for(;(se=G.indexOf("&",se))>=0;){x+=G.slice(V,se),B.startEntity(J);const q=B.write(G,se+1);if(q<0){V=se+B.end();break}V=se+q,se=q===0?V+1:V}const W=x+G.slice(V);return x="",W}}function A(O,x,B,P){const G=(x&i.BinTrieFlags.BRANCH_LENGTH)>>7,J=x&i.BinTrieFlags.JUMP_TABLE;if(G===0)return J!==0&&P===J?B:-1;if(J){const q=P-J;return q<0||q>=G?-1:O[B+q]-1}const V=G+1>>1;let se=0,W=G-1;for(;se<=W;){const q=se+W>>>1,we=q>>1,oe=O[B+we]>>(q&1)*8&255;if(oe<P)se=q+1;else if(oe>P)W=q-1;else return O[B+V+q]}return-1}const E=m(n.htmlDecodeTree),g=m(r.xmlDecodeTree);function N(O,x=f.Legacy){return E(O,x)}function w(O){return E(O,f.Attribute)}function _(O){return E(O,f.Strict)}function S(O){return g(O,f.Strict)}var k=Np();Object.defineProperty(e,"decodeCodePoint",{enumerable:!0,get:function(){return k.decodeCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return k.fromCodePoint}}),Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return k.replaceCodePoint}});var R=Op();Object.defineProperty(e,"htmlDecodeTree",{enumerable:!0,get:function(){return R.htmlDecodeTree}});var Q=Mp();Object.defineProperty(e,"xmlDecodeTree",{enumerable:!0,get:function(){return Q.xmlDecodeTree}})})(Al)),Al}var Hi={},bl={},Pp;function Ic(){return Pp||(Pp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.XML_BITSET_VALUE=e.getCodePoint=void 0,e.encodeXML=n;const t=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);e.getCodePoint=String.prototype.codePointAt==null?(i,u)=>(i.charCodeAt(u)&64512)===55296?(i.charCodeAt(u)-55296)*1024+i.charCodeAt(u+1)-56320+65536:i.charCodeAt(u):(i,u)=>i.codePointAt(u),e.XML_BITSET_VALUE=1342177476;function n(i){let u,s=0;const{length:a}=i;for(let o=0;o<a;o++){const l=i.charCodeAt(o);if(l<128&&((e.XML_BITSET_VALUE>>>l&1)===0||l>=64||l<32))continue;if(u===void 0?u=i.substring(0,o):s!==o&&(u+=i.substring(s,o)),l<64){u+=t.get(l),s=o+1;continue}const c=(0,e.getCodePoint)(i,o);u+=`&#x${c.toString(16)};`,c!==l&&o++,s=o+1}return u===void 0?i:(s<a&&(u+=i.substr(s)),u)}e.escape=n;function r(i,u){return function(a){let o,l=0,c="";for(;o=i.exec(a);)l!==o.index&&(c+=a.substring(l,o.index)),c+=u.get(o[0].charCodeAt(0)),l=o.index+1;return c+a.substring(l)}}e.escapeUTF8=r(/["&'<>]/g,t),e.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),e.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))})(bl)),bl}var Ui={},Cs={},Fp;function DO(){if(Fp)return Cs;Fp=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.parseEncodeTrie=e;function e(t){const n=new Map,r=t.length;let i=0,u=-1;function s(){const o=i;for(;i<r;){const l=t.charAt(i);if((l<"0"||l>"9")&&(l<"a"||l>"z"))break;i++}return i===o?0:Number.parseInt(t.slice(o,i),36)}function a(){if(t[i]!=="&")throw new Error(`Child entry missing value near index ${i}`);const o=i,l=t.indexOf(";",i+1);if(l===-1)throw new Error(`Unterminated entity starting at index ${o}`);return i=l+1,t.slice(o,i)}for(;i<r;){const o=s(),l=u===-1?o:u+o+1;let c;if(t[i]==="&"&&(c=a()),t[i]==="{"){i++;let d=s(),f=d;const p=a();if(t[i]==="{")throw new Error("Unexpected nested '{' beyond depth 2");if(t[i]==="}")n.set(l,{value:c,next:f,nextValue:p}),i++;else{const m=new Map;m.set(f,p);let A=f;for(;i<r&&t[i]!=="}";){d=s(),f=A+d+1;const E=a();if(t[i]==="{")throw new Error("Unexpected nested '{' beyond depth 2");m.set(f,E),A=f}if(t[i]!=="}")throw new Error("Unterminated child block");i++,n.set(l,{value:c,next:m})}}else{if(c===void 0)throw new Error(`Malformed encode trie: missing value at index ${i}`);n.set(l,c)}u=l}return n}return Cs}var Hp;function _O(){if(Hp)return Ui;Hp=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.htmlTrie=void 0;const e=DO();return Ui.htmlTrie=(0,e.parseEncodeTrie)("9&Tab;&NewLine;m&excl;&quot;&num;&dollar;&percnt;&amp;&apos;&lpar;&rpar;&ast;&plus;&comma;1&period;&sol;a&colon;&semi;&lt;{6he&nvlt;}&equals;{6hx&bne;}&gt;{6he&nvgt;}&quest;&commat;q&lbrack;&bsol;&rbrack;&Hat;&lowbar;&DiacriticalGrave;5{2y&fjlig;}k&lbrace;&verbar;&rbrace;y&nbsp;&iexcl;&cent;&pound;&curren;&yen;&brvbar;&sect;&die;&copy;&ordf;&laquo;&not;&shy;&circledR;&macr;&deg;&PlusMinus;&sup2;&sup3;&acute;&micro;&para;&centerdot;&cedil;&sup1;&ordm;&raquo;&frac14;&frac12;&frac34;&iquest;&Agrave;&Aacute;&Acirc;&Atilde;&Auml;&angst;&AElig;&Ccedil;&Egrave;&Eacute;&Ecirc;&Euml;&Igrave;&Iacute;&Icirc;&Iuml;&ETH;&Ntilde;&Ograve;&Oacute;&Ocirc;&Otilde;&Ouml;&times;&Oslash;&Ugrave;&Uacute;&Ucirc;&Uuml;&Yacute;&THORN;&szlig;&agrave;&aacute;&acirc;&atilde;&auml;&aring;&aelig;&ccedil;&egrave;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&eth;&ntilde;&ograve;&oacute;&ocirc;&otilde;&ouml;&div;&oslash;&ugrave;&uacute;&ucirc;&uuml;&yacute;&thorn;&yuml;&Amacr;&amacr;&Abreve;&abreve;&Aogon;&aogon;&Cacute;&cacute;&Ccirc;&ccirc;&Cdot;&cdot;&Ccaron;&ccaron;&Dcaron;&dcaron;&Dstrok;&dstrok;&Emacr;&emacr;2&Edot;&edot;&Eogon;&eogon;&Ecaron;&ecaron;&Gcirc;&gcirc;&Gbreve;&gbreve;&Gdot;&gdot;&Gcedil;1&Hcirc;&hcirc;&Hstrok;&hstrok;&Itilde;&itilde;&Imacr;&imacr;2&Iogon;&iogon;&Idot;&imath;&IJlig;&ijlig;&Jcirc;&jcirc;&Kcedil;&kcedil;&kgreen;&Lacute;&lacute;&Lcedil;&lcedil;&Lcaron;&lcaron;&Lmidot;&lmidot;&Lstrok;&lstrok;&Nacute;&nacute;&Ncedil;&ncedil;&Ncaron;&ncaron;&napos;&ENG;&eng;&Omacr;&omacr;2&Odblac;&odblac;&OElig;&oelig;&Racute;&racute;&Rcedil;&rcedil;&Rcaron;&rcaron;&Sacute;&sacute;&Scirc;&scirc;&Scedil;&scedil;&Scaron;&scaron;&Tcedil;&tcedil;&Tcaron;&tcaron;&Tstrok;&tstrok;&Utilde;&utilde;&Umacr;&umacr;&Ubreve;&ubreve;&Uring;&uring;&Udblac;&udblac;&Uogon;&uogon;&Wcirc;&wcirc;&Ycirc;&ycirc;&Yuml;&Zacute;&zacute;&Zdot;&zdot;&Zcaron;&zcaron;j&fnof;y&imped;1r&gacute;1t&jmath;3y&circ;&caron;g&breve;&DiacriticalDot;&ring;&ogon;&DiacriticalTilde;&dblac;1f&DownBreve;3j&Alpha;&Beta;&Gamma;&Delta;&Epsilon;&Zeta;&Eta;&Theta;&Iota;&Kappa;&Lambda;&Mu;&Nu;&Xi;&Omicron;&Pi;&Rho;1&Sigma;&Tau;&Upsilon;&Phi;&Chi;&Psi;&ohm;7&alpha;&beta;&gamma;&delta;&epsi;&zeta;&eta;&theta;&iota;&kappa;&lambda;&mu;&nu;&xi;&omicron;&pi;&rho;&sigmaf;&sigma;&tau;&upsi;&phi;&chi;&psi;&omega;7&thetasym;&Upsi;2&phiv;&piv;5&Gammad;&digamma;i&kappav;&rhov;3&epsiv;&backepsilon;a&IOcy;&DJcy;&GJcy;&Jukcy;&DScy;&Iukcy;&YIcy;&Jsercy;&LJcy;&NJcy;&TSHcy;&KJcy;1&Ubrcy;&DZcy;&Acy;&Bcy;&Vcy;&Gcy;&Dcy;&IEcy;&ZHcy;&Zcy;&Icy;&Jcy;&Kcy;&Lcy;&Mcy;&Ncy;&Ocy;&Pcy;&Rcy;&Scy;&Tcy;&Ucy;&Fcy;&KHcy;&TScy;&CHcy;&SHcy;&SHCHcy;&HARDcy;&Ycy;&SOFTcy;&Ecy;&YUcy;&YAcy;&acy;&bcy;&vcy;&gcy;&dcy;&iecy;&zhcy;&zcy;&icy;&jcy;&kcy;&lcy;&mcy;&ncy;&ocy;&pcy;&rcy;&scy;&tcy;&ucy;&fcy;&khcy;&tscy;&chcy;&shcy;&shchcy;&hardcy;&ycy;&softcy;&ecy;&yucy;&yacy;1&iocy;&djcy;&gjcy;&jukcy;&dscy;&iukcy;&yicy;&jsercy;&ljcy;&njcy;&tshcy;&kjcy;1&ubrcy;&dzcy;5gi&ensp;&emsp;&emsp13;&emsp14;1&numsp;&puncsp;&ThinSpace;&hairsp;&NegativeMediumSpace;&zwnj;&zwj;&lrm;&rlm;&dash;2&ndash;&mdash;&horbar;&Verbar;1&lsquo;&CloseCurlyQuote;&lsquor;1&ldquo;&CloseCurlyDoubleQuote;&bdquo;1&dagger;&Dagger;&bull;2&nldr;&hellip;9&permil;&pertenk;&prime;&Prime;&tprime;&backprime;3&lsaquo;&rsaquo;3&oline;2&caret;1&hybull;&frasl;a&bsemi;7&qprime;7&MediumSpace;{6bu&ThickSpace;}&NoBreak;&af;&InvisibleTimes;&ic;20&euro;1a&tdot;&DotDot;11&complexes;2&incare;4&gscr;&hamilt;&Hfr;&Hopf;&planckh;&hbar;&imagline;&Ifr;&lagran;&ell;1&naturals;&numero;&copysr;&weierp;&Popf;&Qopf;&realine;&real;&reals;&rx;3&trade;1&integers;2&mho;&zeetrf;&iiota;2&bernou;&Cayleys;1&escr;&Escr;&Fouriertrf;1&Mellintrf;&order;&alefsym;&beth;&gimel;&daleth;c&CapitalDifferentialD;&dd;&ee;&ii;a&frac13;&frac23;&frac15;&frac25;&frac35;&frac45;&frac16;&frac56;&frac18;&frac38;&frac58;&frac78;1d&larr;&ShortUpArrow;&rarr;&darr;&harr;&updownarrow;&nwarr;&nearr;&LowerRightArrow;&LowerLeftArrow;&nlarr;&nrarr;1&rarrw;{mw&nrarrw;}&Larr;&Uarr;&Rarr;&Darr;&larrtl;&rarrtl;&LeftTeeArrow;&mapstoup;&map;&DownTeeArrow;1&hookleftarrow;&hookrightarrow;&larrlp;&looparrowright;&harrw;&nharr;1&lsh;&rsh;&ldsh;&rdsh;1&crarr;&cularr;&curarr;2&circlearrowleft;&circlearrowright;&leftharpoonup;&DownLeftVector;&RightUpVector;&LeftUpVector;&rharu;&DownRightVector;&dharr;&dharl;&RightArrowLeftArrow;&udarr;&LeftArrowRightArrow;&leftleftarrows;&upuparrows;&rightrightarrows;&ddarr;&leftrightharpoons;&Equilibrium;&nlArr;&nhArr;&nrArr;&DoubleLeftArrow;&DoubleUpArrow;&DoubleRightArrow;&dArr;&DoubleLeftRightArrow;&DoubleUpDownArrow;&nwArr;&neArr;&seArr;&swArr;&lAarr;&rAarr;1&zigrarr;6&larrb;&rarrb;f&DownArrowUpArrow;7&loarr;&roarr;&hoarr;&forall;&comp;&part;{mw&npart;}&exist;&nexist;&empty;1&Del;&Element;&NotElement;1&ni;&notni;2&prod;&coprod;&sum;&minus;&MinusPlus;&dotplus;1&Backslash;&lowast;&compfn;1&radic;2&prop;&infin;&angrt;&ang;{6he&nang;}&angmsd;&angsph;&mid;&nmid;&DoubleVerticalBar;&NotDoubleVerticalBar;&and;&or;&cap;{1e68&caps;}&cup;{1e68&cups;}&int;&Int;&iiint;&conint;&Conint;&Cconint;&cwint;&ClockwiseContourIntegral;&awconint;&there4;&becaus;&ratio;&Colon;&dotminus;1&mDDot;&homtht;&sim;{6he&nvsim;}&backsim;{mp&race;}&ac;{mr&acE;}&acd;&VerticalTilde;&NotTilde;&eqsim;{mw&nesim;}&sime;&NotTildeEqual;&cong;&simne;&ncong;&ap;&nap;&ape;&apid;{mw&napid;}&backcong;&asympeq;{6he&nvap;}&bump;{mw&nbump;}&bumpe;{mw&nbumpe;}&doteq;{mw&nedot;}&doteqdot;&efDot;&erDot;&Assign;&ecolon;&ecir;&circeq;1&wedgeq;&veeeq;1&triangleq;2&equest;&ne;&Congruent;{6hx&bnequiv;}&nequiv;1&le;{6he&nvle;}&ge;{6he&nvge;}&lE;{mw&nlE;}&gE;{mw&ngE;}&lnE;{1e68&lvertneqq;}&gnE;{1e68&gvertneqq;}&ll;{mw&nLtv;5uh&nLt;}&gg;{mw&nGtv;5uh&nGt;}&between;&NotCupCap;&nless;&ngt;&nle;&nge;&lesssim;&GreaterTilde;&nlsim;&ngsim;&LessGreater;&gl;&NotLessGreater;&NotGreaterLess;&pr;&sc;&prcue;&sccue;&PrecedesTilde;&scsim;{mw&NotSucceedsTilde;}&NotPrecedes;&NotSucceeds;&sub;{6he&NotSubset;}&sup;{6he&NotSuperset;}&nsub;&nsup;&sube;&supe;&NotSubsetEqual;&NotSupersetEqual;&subne;{1e68&varsubsetneq;}&supne;{1e68&varsupsetneq;}1&cupdot;&UnionPlus;&sqsub;{mw&NotSquareSubset;}&sqsup;{mw&NotSquareSuperset;}&sqsube;&sqsupe;&sqcap;{1e68&sqcaps;}&sqcup;{1e68&sqcups;}&CirclePlus;&CircleMinus;&CircleTimes;&osol;&CircleDot;&circledcirc;&circledast;1&circleddash;&boxplus;&boxminus;&boxtimes;&dotsquare;&RightTee;&dashv;&DownTee;&bot;1&models;&DoubleRightTee;&Vdash;&Vvdash;&VDash;&nvdash;&nvDash;&nVdash;&nVDash;&prurel;1&LeftTriangle;&RightTriangle;&LeftTriangleEqual;{6he&nvltrie;}&RightTriangleEqual;{6he&nvrtrie;}&origof;&imof;&multimap;&hercon;&intcal;&veebar;1&barvee;&angrtvb;&lrtri;&bigwedge;&bigvee;&bigcap;&bigcup;&diam;&sdot;&sstarf;&divideontimes;&bowtie;&ltimes;&rtimes;&leftthreetimes;&rightthreetimes;&backsimeq;&curlyvee;&curlywedge;&Sub;&Sup;&Cap;&Cup;&fork;&epar;&lessdot;&gtdot;&Ll;{mw&nLl;}&Gg;{mw&nGg;}&leg;{1e68&lesg;}&gel;{1e68&gesl;}2&cuepr;&cuesc;&NotPrecedesSlantEqual;&NotSucceedsSlantEqual;&NotSquareSubsetEqual;&NotSquareSupersetEqual;2&lnsim;&gnsim;&precnsim;&scnsim;&nltri;&NotRightTriangle;&nltrie;&NotRightTriangleEqual;&vellip;&ctdot;&utdot;&dtdot;&disin;&isinsv;&isins;&isindot;{mw&notindot;}&notinvc;&notinvb;1&isinE;{mw&notinE;}&nisd;&xnis;&nis;&notnivc;&notnivb;6&barwed;&Barwed;1&lceil;&rceil;&LeftFloor;&rfloor;&drcrop;&dlcrop;&urcrop;&ulcrop;&bnot;1&profline;&profsurf;1&telrec;&target;5&ulcorn;&urcorn;&dlcorn;&drcorn;2&frown;&smile;9&cylcty;&profalar;7&topbot;6&ovbar;1&solbar;1o&angzarr;1f&lmoustache;&rmoustache;2&OverBracket;&bbrk;&bbrktbrk;11&OverParenthesis;&UnderParenthesis;&OverBrace;&UnderBrace;2&trpezium;4&elinters;1n&blank;4k&circledS;1j&boxh;1&boxv;9&boxdr;3&boxdl;3&boxur;3&boxul;3&boxvr;7&boxvl;7&boxhd;7&boxhu;7&boxvh;j&boxH;&boxV;&boxdR;&boxDr;&boxDR;&boxdL;&boxDl;&boxDL;&boxuR;&boxUr;&boxUR;&boxuL;&boxUl;&boxUL;&boxvR;&boxVr;&boxVR;&boxvL;&boxVl;&boxVL;&boxHd;&boxhD;&boxHD;&boxHu;&boxhU;&boxHU;&boxvH;&boxVh;&boxVH;j&uhblk;3&lhblk;3&block;8&blk14;&blk12;&blk34;d&square;8&blacksquare;&EmptyVerySmallSquare;1&rect;&marker;2&fltns;1&bigtriangleup;&blacktriangle;&triangle;2&blacktriangleright;&rtri;3&bigtriangledown;&blacktriangledown;&dtri;2&blacktriangleleft;&ltri;6&loz;&cir;w&tridot;2&bigcirc;8&ultri;&urtri;&lltri;&EmptySmallSquare;&FilledSmallSquare;8&bigstar;&star;7&phone;1d&female;1&male;t&spades;2&clubs;1&hearts;&diamondsuit;3&sung;2&flat;&natural;&sharp;4j&check;3&cross;8&malt;l&sext;x&VerticalSeparator;p&lbbrk;&rbbrk;2c&bsolhsub;&suphsol;s&LeftDoubleBracket;&RightDoubleBracket;&lang;&rang;&Lang;&Rang;&loang;&roang;7&longleftarrow;&longrightarrow;&longleftrightarrow;&DoubleLongLeftArrow;&DoubleLongRightArrow;&DoubleLongLeftRightArrow;1&longmapsto;2&dzigrarr;76&nvlArr;&nvrArr;&nvHarr;&Map;6&lbarr;&bkarow;&lBarr;&dbkarow;&drbkarow;&DDotrahd;&UpArrowBar;&DownArrowBar;2&Rarrtl;2&latail;&ratail;&lAtail;&rAtail;&larrfs;&rarrfs;&larrbfs;&rarrbfs;2&nwarhk;&nearhk;&hksearow;&hkswarow;&nwnear;&nesear;&seswar;&swnwar;8&rarrc;{mw&nrarrc;}1&cudarrr;&ldca;&rdca;&cudarrl;&larrpl;2&curarrm;&cularrp;7&rarrpl;2&harrcir;&Uarrocir;&lurdshar;&ldrushar;2&LeftRightVector;&RightUpDownVector;&DownLeftRightVector;&LeftUpDownVector;&LeftVectorBar;&RightVectorBar;&RightUpVectorBar;&RightDownVectorBar;&DownLeftVectorBar;&DownRightVectorBar;&LeftUpVectorBar;&LeftDownVectorBar;&LeftTeeVector;&RightTeeVector;&RightUpTeeVector;&RightDownTeeVector;&DownLeftTeeVector;&DownRightTeeVector;&LeftUpTeeVector;&LeftDownTeeVector;&lHar;&uHar;&rHar;&dHar;&luruhar;&ldrdhar;&ruluhar;&rdldhar;&lharul;&llhard;&rharul;&lrhard;&udhar;&duhar;&RoundImplies;&erarr;&simrarr;&larrsim;&rarrsim;&rarrap;&ltlarr;1&gtrarr;&subrarr;1&suplarr;&lfisht;&rfisht;&ufisht;&dfisht;5&lopar;&ropar;4&lbrke;&rbrke;&lbrkslu;&rbrksld;&lbrksld;&rbrkslu;&langd;&rangd;&lparlt;&rpargt;&gtlPar;&ltrPar;3&vzigzag;1&vangrt;&angrtvbd;6&ange;&range;&dwangle;&uwangle;&angmsdaa;&angmsdab;&angmsdac;&angmsdad;&angmsdae;&angmsdaf;&angmsdag;&angmsdah;&bemptyv;&demptyv;&cemptyv;&raemptyv;&laemptyv;&ohbar;&omid;&opar;1&operp;1&olcross;&odsold;1&olcir;&ofcir;&olt;&ogt;&cirscir;&cirE;&solb;&bsolb;3&boxbox;3&trisb;&rtriltri;&LeftTriangleBar;{mw&NotLeftTriangleBar;}&RightTriangleBar;{mw&NotRightTriangleBar;}b&iinfin;&infintie;&nvinfin;4&eparsl;&smeparsl;&eqvparsl;5&blacklozenge;8&RuleDelayed;1&dsol;9&bigodot;&bigoplus;&bigotimes;1&biguplus;1&bigsqcup;5&iiiint;&fpartint;2&cirfnint;&awint;&rppolint;&scpolint;&npolint;&pointint;&quatint;&intlarhk;a&pluscir;&plusacir;&simplus;&plusdu;&plussim;&plustwo;1&mcomma;&minusdu;2&loplus;&roplus;&Cross;&timesd;&timesbar;1&smashp;&lotimes;&rotimes;&otimesas;&Otimes;&odiv;&triplus;&triminus;&tritime;&intprod;2&amalg;&capdot;1&ncup;&ncap;&capand;&cupor;&cupcap;&capcup;&cupbrcap;&capbrcup;&cupcup;&capcap;&ccups;&ccaps;2&ccupssm;2&And;&Or;&andand;&oror;&orslope;&andslope;1&andv;&orv;&andd;&ord;1&wedbar;6&sdote;3&simdot;2&congdot;{mw&ncongdot;}&easter;&apacir;&apE;{mw&napE;}&eplus;&pluse;&Esim;&Colone;&Equal;1&ddotseq;&equivDD;&ltcir;&gtcir;&ltquest;&gtquest;&leqslant;{mw&nleqslant;}&geqslant;{mw&ngeqslant;}&lesdot;&gesdot;&lesdoto;&gesdoto;&lesdotor;&gesdotol;&lap;&gap;&lne;&gne;&lnap;&gnap;&lEg;&gEl;&lsime;&gsime;&lsimg;&gsiml;&lgE;&glE;&lesges;&gesles;&els;&egs;&elsdot;&egsdot;&el;&eg;2&siml;&simg;&simlE;&simgE;&LessLess;{mw&NotNestedLessLess;}&GreaterGreater;{mw&NotNestedGreaterGreater;}1&glj;&gla;&ltcc;&gtcc;&lescc;&gescc;&smt;&lat;&smte;{1e68&smtes;}&late;{1e68&lates;}&bumpE;&PrecedesEqual;{mw&NotPrecedesEqual;}&sce;{mw&NotSucceedsEqual;}2&prE;&scE;&precneqq;&scnE;&prap;&scap;&precnapprox;&scnap;&Pr;&Sc;&subdot;&supdot;&subplus;&supplus;&submult;&supmult;&subedot;&supedot;&subE;{mw&nsubE;}&supE;{mw&nsupE;}&subsim;&supsim;2&subnE;{1e68&varsubsetneqq;}&supnE;{1e68&varsupsetneqq;}2&csub;&csup;&csube;&csupe;&subsup;&supsub;&subsub;&supsup;&suphsub;&supdsub;&forkv;&topfork;&mlcp;8&Dashv;1&Vdashl;&Barv;&vBar;&vBarv;1&Vbar;&Not;&bNot;&rnmid;&cirmid;&midcir;&topcir;&nhpar;&parsim;9&parsl;{6hx&nparsl;}y7r{17ks&Ascr;1&Cscr;&Dscr;2&Gscr;2&Jscr;&Kscr;2&Nscr;&Oscr;&Pscr;&Qscr;1&Sscr;&Tscr;&Uscr;&Vscr;&Wscr;&Xscr;&Yscr;&Zscr;&ascr;&bscr;&cscr;&dscr;1&fscr;1&hscr;&iscr;&jscr;&kscr;&lscr;&mscr;&nscr;1&pscr;&qscr;&rscr;&sscr;&tscr;&uscr;&vscr;&wscr;&xscr;&yscr;&zscr;1g&Afr;&Bfr;1&Dfr;&Efr;&Ffr;&Gfr;2&Jfr;&Kfr;&Lfr;&Mfr;&Nfr;&Ofr;&Pfr;&Qfr;1&Sfr;&Tfr;&Ufr;&Vfr;&Wfr;&Xfr;&Yfr;1&afr;&bfr;&cfr;&dfr;&efr;&ffr;&gfr;&hfr;&ifr;&jfr;&kfr;&lfr;&mfr;&nfr;&ofr;&pfr;&qfr;&rfr;&sfr;&tfr;&ufr;&vfr;&wfr;&xfr;&yfr;&zfr;&Aopf;&Bopf;1&Dopf;&Eopf;&Fopf;&Gopf;1&Iopf;&Jopf;&Kopf;&Lopf;&Mopf;1&Oopf;3&Sopf;&Topf;&Uopf;&Vopf;&Wopf;&Xopf;&Yopf;1&aopf;&bopf;&copf;&dopf;&eopf;&fopf;&gopf;&hopf;&iopf;&jopf;&kopf;&lopf;&mopf;&nopf;&oopf;&popf;&qopf;&ropf;&sopf;&topf;&uopf;&vopf;&wopf;&xopf;&yopf;&zopf;}6ve&fflig;&filig;&fllig;&ffilig;&ffllig;"),Ui}var Up;function Wp(){if(Up)return Hi;Up=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.encodeHTML=i,Hi.encodeNonAsciiHTML=u;const e=Ic(),t=_O(),n=new Uint32Array([5632,4227923966,4160749569,939524097]),r=new Uint32Array([0,e.XML_BITSET_VALUE,0,0]);function i(a){return s(n,a)}function u(a){return s(r,a)}function s(a,o){let l,c=0;const{length:d}=o;for(let f=0;f<d;f++){const p=o.charCodeAt(f);if(p<128&&!(a[p>>>5]>>>p&1))continue;l===void 0?l=o.substring(0,f):c!==f&&(l+=o.substring(c,f));let m=t.htmlTrie.get(p);if(typeof m=="object"){if(f+1<d){const A=o.charCodeAt(f+1),E=typeof m.next=="number"?m.next===A?m.nextValue:void 0:m.next.get(A);if(E!==void 0){l+=E,f++,c=f+1;continue}}m=m.value}if(m===void 0){const A=(0,e.getCodePoint)(o,f);l+=`&#x${A.toString(16)};`,A!==p&&f++,c=f+1}else l+=m,c=f+1}return l===void 0?o:(c<d&&(l+=o.substr(c)),l)}return Hi}var Kp;function OO(){return Kp||(Kp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeUTF8=e.escapeText=e.escapeAttribute=e.encodeXML=e.encodeNonAsciiHTML=e.encodeHTML5=e.encodeHTML4=e.encodeHTML=e.EntityDecoder=e.decodeXMLStrict=e.decodeXML=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML5=e.decodeHTML4=e.decodeHTML=e.DecodingMode=e.EncodingMode=e.EntityLevel=void 0,e.decode=s,e.decodeStrict=a,e.encode=o;const t=vp(),n=Wp(),r=Ic();var i;(function(f){f[f.XML=0]="XML",f[f.HTML=1]="HTML"})(i||(e.EntityLevel=i={}));var u;(function(f){f[f.UTF8=0]="UTF8",f[f.ASCII=1]="ASCII",f[f.Extensive=2]="Extensive",f[f.Attribute=3]="Attribute",f[f.Text=4]="Text"})(u||(e.EncodingMode=u={}));function s(f,p=i.XML){if((typeof p=="number"?p:p.level)===i.HTML){const A=typeof p=="object"?p.mode:void 0;return(0,t.decodeHTML)(f,A)}return(0,t.decodeXML)(f)}function a(f,p=i.XML){var m;const A=typeof p=="number"?{level:p}:p;return(m=A.mode)!==null&&m!==void 0||(A.mode=t.DecodingMode.Strict),s(f,A)}function o(f,p=i.XML){const{mode:m=u.Extensive,level:A=i.XML}=typeof p=="number"?{level:p}:p;switch(m){case u.UTF8:return(0,r.escapeUTF8)(f);case u.Attribute:return(0,r.escapeAttribute)(f);case u.Text:return(0,r.escapeText)(f);case u.ASCII:return A===i.HTML?(0,n.encodeNonAsciiHTML)(f):(0,r.encodeXML)(f);case u.Extensive:default:return A===i.HTML?(0,n.encodeHTML)(f):(0,r.encodeXML)(f)}}var l=vp();Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return l.DecodingMode}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return l.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return l.EntityDecoder}});var c=Wp();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return c.encodeNonAsciiHTML}});var d=Ic();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return d.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return d.escape}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return d.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return d.escapeText}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return d.escapeUTF8}})})(ml)),ml}var xs={},Qp;function RO(){return Qp||(Qp=1,xs.romanize=function(e){if(isNaN(e))return NaN;for(var t=String(+e).split(""),n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],r="",i=3;i--;)r=(n[+t.pop()+i*10]||"")+r;return Array(+t.join("")+1).join("M")+r},xs.alphanumeric=function(e){for(var t="",n;e>0;)n=(e-1)%26,t=String.fromCharCode(65+n)+t,e=(e-n)/26|0;return t||void 0}),xs}var El,zp;function MO(){if(zp)return El;zp=1;const e=r=>{let i="";do i=(Math.random()+1).toString(36).substring(2);while(r.indexOf(i)!==-1);return i},t=(r,i)=>{let u=/([a-z\-]+)\s*\(\s*([^\(\)]*?)\s*(?:,\s*([^\(\)]*?)\s*)?\s*\)/i,s=[],a,o=e(i);for(;(a=u.exec(i))!==null;){let c=`${s.length}`;if(a[1].toLowerCase()=="var"){const f=n(r,a[2]);if(f){i=i.replace(a[0],f);continue}if(a[3]){i=i.replace(a[0],a[3]);continue}}let d=`${o}${c.padStart(5,"-")}`;i=i.replace(a[0],d),s.push({placeholder:d,replace:a[0]})}for(var l=s.length-1;l>=0;l--){const c=s[l];i=i.replace(c.placeholder,c.replace)}return i},n=(r,i)=>{for(;r;){if(r.styleProps&&i in r.styleProps)return r.styleProps[i].value;var r=r.pseudoElementParent||r.parent}};return El={replaceVariables:t,findVariableValue:n},El}var yl,Yp;function BO(){if(Yp)return yl;Yp=1;var{decode:e}=OO(),t=vf(),n=RO(),r=MO();return yl=function(u){u.ignoredPseudos=["hover","active","focus","visited","link"],u.widthElements=["TABLE","TD","TH","IMG"],u.heightElements=["TABLE","TD","TH","IMG"],u.tableElements=["TABLE","TH","TR","TD","CAPTION","COLGROUP","COL","THEAD","TBODY","TFOOT"],u.nonVisualElements=["HEAD","TITLE","BASE","LINK","STYLE","META","SCRIPT","NOSCRIPT"],u.styleToAttribute={"background-color":"bgcolor","background-image":"background","text-align":"align","vertical-align":"valign"},u.excludedProperties=[],u.juiceDocument=p,u.inlineDocument=s;function s(g,N,w){w=w||{};var _=t.parseCSS(N),S=[],k="style",R={},Q=w.removeInlinedSelectors?new Set:null;w.styleAttributeName&&(k=w.styleAttributeName);function O(W){var q=W[0],we=W[1],C=new t.Selector(q),oe=C.parsed();if(oe){for(var _e=c(oe),I=0;I<oe.length;++I){var it=oe[I];if(it.pseudos)for(var Wt=0;Wt<it.pseudos.length;++Wt){var Fe=it.pseudos[Wt];if(u.ignoredPseudos.indexOf(Fe.name)>=0)return}}if(_e){var Gt=oe[oe.length-1],qt=Gt.pseudos;Gt.pseudos=f(Gt.pseudos),q=oe.toString(),Gt.pseudos=qt}var on;try{on=g(q)}catch{return}var ln=!1;on.each(function(){var Ee=this;if(Ee.name&&u.nonVisualElements.indexOf(Ee.name.toUpperCase())>=0)return;if(ln=!0,Ee.counterProps||(Ee.counterProps=Ee.parent&&Ee.parent.counterProps?Object.create(Ee.parent.counterProps):{}),_e){var wi="pseudo"+_e,cn=Ee[wi];cn||(cn=Ee[wi]=g("<span />").get(0),cn.pseudoElementType=_e,cn.pseudoElementParent=Ee,cn.counterProps=Ee.counterProps,Ee[wi]=cn),Ee=cn}if(!Ee.styleProps){if(Ee.styleProps={},g(Ee).attr(k)){var rs=g(Ee).attr(k),is=w.decodeStyleAttributes?e(rs):rs,us="* { "+is+" } ";Ii(t.parseCSS(us)[0][1],new t.Selector("<style>",!0))}S.push(Ee)}function ss(Ze,dn){for(var He=dn.split(/\s+/),ut=0;ut<He.length;ut++){var Le=He[ut],lt=parseInt(He[ut+1],10);isNaN(lt)?Ze.counterProps[Le]=R[Le]=0:Ze.counterProps[Le]=R[He[ut++]]=lt}}function Ja(Ze,dn){for(var He=dn.split(/\s+/),ut=0;ut<He.length;ut++){var Le=He[ut];if(Ze.counterProps[Le]!==void 0){var lt=parseInt(He[ut+1],10);isNaN(lt)?Ze.counterProps[Le]=R[Le]+=1:Ze.counterProps[Le]=R[He[ut++]]+=lt}}}function Ii(Ze,dn){for(var He=0,ut=Ze.length;He<ut;He++)if(Ze[He].type=="property"){var Le=Ze[He].name,lt=Ze[He].value;Le==="counter-reset"&&ss(Ee,lt),Le==="counter-increment"&&Ja(Ee,lt);var L=lt.match(/!important$/)!==null;L&&!w.preserveImportant&&(lt=a(lt));var z=[Ze[He].position.start.line,Ze[He].position.start.col],j=new t.Property(Le,lt,dn,L?2:0,z),te=Ee.styleProps[Le];if(u.excludedProperties.indexOf(Le)<0)if(w.inlineDuplicateProperties)if(te)if(te.selector===dn)j.nextProp=te,Ee.styleProps[Le]=j;else{for(var be=te;be.nextProp;)be=be.nextProp;be.nextProp=j}else Ee.styleProps[Le]=j;else(te&&te.compare(j)===j||!te)&&(te&&te.selector!==dn?delete Ee.styleProps[Le]:te&&(j.nextProp=te),Ee.styleProps[Le]=j)}}Ii(we,C)}),ln&&Q&&Q.add(W[0])}}function x(W){Object.keys(W.styleProps).length;var q=[];Object.keys(W.styleProps).forEach(function(C){for(var oe=W.styleProps[C];typeof oe<"u";)q.push(oe),oe=oe.nextProp}),q.sort(function(C,oe){return C.compareFunc(oe)});var we=q.filter(function(C){return w.resolveCSSVariables&&C.prop.indexOf("--")===0?!1:C.prop!=="content"}).map(function(C){return w.resolveCSSVariables&&(C.value=r.replaceVariables(W,C.value)),C.prop+": "+C.value.replace(/["]/g,"'")+";"}).join(" ");we&&g(W).attr(k,we)}function B(W){if(W.pseudoElementType&&W.styleProps.content){var q=l(W);q.img?(W.name="img",g(W).attr("src",q.img)):g(W).text(q);var we=W.pseudoElementParent;W.pseudoElementType==="before"?g(we).prepend(W):g(we).append(W)}}function P(W,q){if(W.name){var we=W.name.toUpperCase();if(u[q+"Elements"].indexOf(we)>-1){for(var C in W.styleProps)if(W.styleProps[C].prop===q){var oe=W.styleProps[C].value;if(w.preserveImportant&&(oe=a(oe)),oe.match(/(px|auto)/)){var _e=oe.replace("px","");g(W).attr(q,_e);return}if(u.tableElements.indexOf(we)>-1&&oe.match(/\%/)){g(W).attr(q,oe);return}}}}}function G(W){return W.indexOf("url(")!==0?W:W.replace(/^url\((["'])?([^"']+)\1\)$/,"$2")}function J(W){if(W.name){var q=W.name.toUpperCase(),we=Object.keys(u.styleToAttribute);if(u.tableElements.indexOf(q)>-1){for(var C in W.styleProps)if(we.indexOf(W.styleProps[C].prop)>-1){var oe=u.styleToAttribute[W.styleProps[C].prop],_e=W.styleProps[C].value;if(w.preserveImportant&&(_e=a(_e)),oe==="background"&&(_e=G(_e)),/(linear|radial)-gradient\(/i.test(_e))continue;g(W).attr(oe,_e)}}}}if(_.forEach(O),S.forEach(x),w.inlinePseudoElements&&S.forEach(B),w.applyWidthAttributes&&S.forEach(function(W){P(W,"width")}),w.applyHeightAttributes&&S.forEach(function(W){P(W,"height")}),w.applyAttributesTableElements&&S.forEach(J),w.insertPreservedExtraCss&&w.extraCss){var V=t.getPreservedText(w.extraCss,{mediaQueries:w.preserveMediaQueries,fontFaces:w.preserveFontFaces,keyFrames:w.preserveKeyFrames,preservedSelectors:w.preservedSelectors});if(V){var se=null;w.insertPreservedExtraCss!==!0?se=g(w.insertPreservedExtraCss):(se=g("head"),se.length||(se=g("body")),se.length||(se=g.root())),se.first().append("<style>"+V+"</style>")}}return Q}function a(g){return g.replace(/\s*!important$/,"")}function o(g,N){switch(N){case"lower-roman":return n.romanize(g).toLowerCase();case"upper-roman":return n.romanize(g);case"lower-latin":case"lower-alpha":return n.alphanumeric(g).toLowerCase();case"upper-latin":case"upper-alpha":return n.alphanumeric(g);default:return g.toString()}}function l(g){var N=g.styleProps.content.value;if(N==="none"||N==="normal")return"";var w=N.match(/^\s*url\s*\(\s*(.*?)\s*\)\s*$/i);if(w){var _=w[1].replace(/^['"]|['"]$/g,"");return{img:_}}for(var S=[],k=N.split(/['"]/),R=0;R<k.length;R++)if(k[R]!==""){var Q=k[R].match(/var\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(Q){var O=r.findVariableValue(g,Q[1])||Q[2];S.push(O.replace(/^['"]|['"]$/g,""));continue}var x=k[R].match(/counter\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(x&&x[1]in g.counterProps){var B=g.counterProps[x[1]];S.push(o(B,x[3]));continue}var P=k[R].match(/attr\s*\(\s*(.*?)\s*\)/i);if(P){var G=P[1];S.push(g.pseudoElementParent?g.pseudoElementParent.attribs[G]:g.attribs[G]);continue}S.push(k[R])}return N=S.join(""),N=N.replace(/\\/g,""),N}function c(g){if(g.length!==0){var N=g[g.length-1].pseudos;if(N){for(var w=0;w<N.length;w++)if(d(N[w]))return N[w].name}}}function d(g){return g.name==="before"||g.name==="after"}function f(g){return g.filter(function(N){return!d(N)})}function p(g,N){N=t.getDefaultOptions(N);var w=new Set;N.removeInlinedSelectors&&!N.removeStyleTags&&g("style[data-embed]").each(function(){w.add(this)});var _=E(g,N);_+=`
919
- `+N.extraCss;var S=s(g,_,N);return S&&!N.removeStyleTags&&m(g,S,N,w),g}function m(g,N,w,_){var S=g("style");S.each(function(){var k=this,R=k.childNodes;if(R.length===1&&!(_&&_.has(k))){var Q=R[0].nodeValue,O=t.removeInlinedSelectorsFromCSS(Q,N,w,u.ignoredPseudos);O&&O.trim()?k.childNodes[0].nodeValue=O:g(k).remove()}})}function A(g,N){var w=[],_=g("style"),S,k,R;return _.each(function(){if(R=this,S=R.childNodes,S.length!==1){N.removeStyleTags&&g(R).remove();return}if(k=S[0].data,N.applyStyleTags&&g(R).attr("data-embed")===void 0&&w.push(k),N.removeStyleTags&&g(R).attr("data-embed")===void 0){var Q=R.childNodes[0].nodeValue,O=t.getPreservedText(Q,{mediaQueries:N.preserveMediaQueries,fontFaces:N.preserveFontFaces,keyFrames:N.preserveKeyFrames,pseudos:N.preservePseudos,preservedSelectors:N.preservedSelectors},u.ignoredPseudos);O?R.childNodes[0].nodeValue=O:g(R).remove()}g(R).removeAttr("data-embed")}),w}function E(g,N){var w=A(g,N),_=w.join(`
920
- `);return _}return u},yl}var Tl,Gp;function LO(){if(Gp)return Tl;Gp=1;var e=SO(),t=BO(),n=t(function(i,u){return e(i,{xmlMode:u&&u.xmlMode},r,[u])}),r=function(i,u){return n.juiceDocument(i,u)};return n.inlineContent=function(i,u,s){return e(i,{xmlMode:s&&s.xmlMode},n.inlineDocument,[u,s])},n.codeBlocks=e.codeBlocks,Tl=n,Tl}var vO=LO();const PO=Bc(vO),FO=new Set(["section","p","blockquote","ul","ol","li","pre","code","span","strong","em","b","i","u","s","del","a","img","br","hr","table","thead","tbody","tr","th","td"]),HO=new Set(["script","style","iframe","object","embed","form","button","input","textarea","select","link","meta","svg","math","canvas","template","noscript","video","audio","source"]),UO=new Set(["font","font-family","font-size","font-weight","font-style","color","text-align","line-height","letter-spacing","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","background","background-color","border","border-top","border-right","border-bottom","border-left","border-top-color","border-top-style","border-top-width","border-right-color","border-right-style","border-right-width","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-color","border-width","border-style","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-collapse","padding","padding-top","padding-right","padding-bottom","padding-left","margin","margin-top","margin-right","margin-bottom","margin-left","width","min-width","max-width","height","max-height","display","vertical-align","list-style","list-style-type","list-style-position","white-space","white-space-collapse","text-wrap-mode","text-wrap-style","word-break","word-wrap","overflow-wrap","overflow","overflow-x","overflow-y","box-sizing","table-layout","text-size-adjust","-webkit-text-size-adjust"]),WO=new Set(["block","inline","inline-block","list-item","table","table-row","table-cell","table-row-group","table-header-group","none"]);function ge(e,t){e.dataset.wechatNode=t}function Hr(e,t){const n=e.ownerDocument.createElement(t);for(const r of Array.from(e.attributes))n.setAttribute(r.name,r.value);for(;e.firstChild;)n.appendChild(e.firstChild);return e.replaceWith(n),n}function KO(e){return/^(?:https?:)?\/\//i.test(e)}function QO(e,t){return Array.from(e.childNodes).every(n=>n===t?!0:n.nodeType===3&&!(n.nodeValue??"").trim())}const zO={kind:"image",selector:"img",finalizeSelector:"figure, figcaption",async prepare(e,t){ge(e,"image");const n=e.getAttribute("src");n&&e.setAttribute("data-src",n);const r=e.parentElement;if(!r||r.tagName.toLowerCase()!=="p"||!QO(r,e))return;const i=e.getAttribute("alt")??"",u=/^(?:0|[1-9]\d*)\.\d{2}$/.test(i)?Number(i):0;if(u>0&&Number.isFinite(u)){const o=new Image;o.src=n??"";try{if(await o.decode(),!o.naturalWidth)throw new Error("图片原始宽度为空")}catch(l){throw new Error(`无法读取缩放图片的原始尺寸:${e.getAttribute("title")||"无图注"}`,{cause:l})}e.style.width=`${Math.min(u,1)*100}%`,e.style.maxWidth=`${o.naturalWidth*u}px`,e.style.height="auto"}const s=t.document.createElement("figure");ge(s,"image-block"),r.replaceWith(s),s.appendChild(e);const a=e.getAttribute("title")?.trim();if(e.removeAttribute("title"),a){const o=t.document.createElement("figcaption");ge(o,"image-caption"),o.textContent=a,s.appendChild(o)}},finalize(e){const t=e.tagName.toLowerCase();t==="figure"&&Hr(e,"section"),t==="figcaption"&&Hr(e,"p")}},YO={kind:"code-block",selector:"pre",prepare(e,t){ge(e,"code-block-body");const n=e.querySelector("code");n&&ge(n,"code-block-code");const r=t.document.createElement("section");ge(r,"code-block"),e.replaceWith(r);const i=e.getAttribute("data-language")?.trim();if(i){const u=t.document.createElement("p");ge(u,"code-language"),u.textContent=i,r.appendChild(u)}r.appendChild(e)}},GO={kind:"inline-code",selector:"code:not(pre code)",prepare(e){ge(e,"inline-code")},finalize(e){Hr(e,"span")}},qO={kind:"heading",selector:"h1, h2, h3, h4, h5, h6",prepare(e,t){if(ge(e,`heading-${e.tagName.slice(1)}`),e.tagName.toLowerCase()==="h2"&&t.structure){const n=t.document.createElement("span");for(ge(n,"heading-text");e.firstChild;)n.appendChild(e.firstChild);if(e.appendChild(n),t.structure.numberedHeadings){const r=t.document.createElement("span");ge(r,"heading-number"),r.textContent=String(Array.from(t.root.querySelectorAll("h2")).indexOf(e)+1).padStart(2,"0"),e.prepend(r)}if(t.structure.headingLabel){const r=t.document.createElement("span");ge(r,"heading-label"),r.textContent=t.structure.headingLabel,e.prepend(r)}}},finalize(e){Hr(e,"section")}},VO={kind:"paragraph",selector:"p",prepare(e){e.dataset.wechatNode||ge(e,"paragraph")}},JO={kind:"emphasis",selector:"strong, b, em, i, s, del, u, mark",prepare(e){ge(e,e.tagName.toLowerCase())},finalize(e){e.tagName.toLowerCase()==="mark"&&Hr(e,"span")}},jO={kind:"blockquote",selector:"blockquote",prepare(e,t){if(ge(e,"blockquote"),t.structure?.quoteLabel){const n=t.document.createElement("p");ge(n,"quote-label"),n.textContent=t.structure.quoteLabel,e.prepend(n)}}};function qp(e){const t=e.trim();if(!t)return"";try{const n=new URL(t);n.hash="",n.hostname=n.hostname.toLowerCase();let r=n.pathname;return r.length>1&&r.endsWith("/")&&(r=r.slice(0,-1)),n.pathname=r,n.toString()}catch{return t.replace(/\/+$/,"")||t}}function ZO(e,t,n){const r=qp(e),i=n.find(s=>qp(s.url)===r);if(i)return i;const u={index:n.length+1,text:t.trim()||e,url:e};return n.push(u),u}const XO={kind:"link",selector:"a",prepare(e,t){const n=e.getAttribute("href")?.trim()??"";if(!KO(n)){ge(e,"internal-link");return}const r=ZO(n,e.textContent?.trim()||n,t.references);ge(e,"external-link");const i=t.document.createElement("span");ge(i,"link-marker"),i.textContent=`[${r.index}]`,e.after(i)},finalize(e){(e.dataset.wechatNode==="external-link"||e.getAttribute("href")?.startsWith("#"))&&Hr(e,"span")}},$O={kind:"list",selector:"ul, ol, li",prepare(e,t){const n=e.tagName.toLowerCase();if(n==="ul"&&ge(e,"bullet-list"),n==="ol"&&ge(e,"ordered-list"),n!=="li")return;const r=e.getAttribute("data-item-type")==="task";if(ge(e,r?"task-list-item":"list-item"),!r)return;const i=t.document.createElement("span");ge(i,"task-marker"),i.textContent=e.getAttribute("data-checked")==="true"?"☑":"☐",(e.querySelector(":scope > p")??e).prepend(i)}},eR={kind:"table",selector:"table, thead, tbody, tr, th, td",prepare(e){ge(e,e.tagName.toLowerCase())}},tR={kind:"divider",selector:"hr",prepare(e){ge(e,"divider")},finalize(e){Hr(e,"section")}},nR={kind:"hard-break",selector:"br",prepare(e){ge(e,"hard-break")}},rR={kind:"article",selector:".zzhub-wechat-article",prepare(e,t){if(t.references.length>0){const n=t.document.createElement("section");ge(n,"references");const r=t.document.createElement("p");ge(r,"references-title"),r.textContent="相关链接",n.appendChild(r);const i=t.document.createElement("ol");ge(i,"references-list");for(const u of t.references){const s=t.document.createElement("li");ge(s,"reference-item"),s.textContent=`[${u.index}] ${u.text}: ${u.url}`,i.appendChild(s)}n.appendChild(i),t.root.appendChild(n)}if(t.theme.footerText){const n=t.document.createElement("section");ge(n,"footer");const r=t.document.createElement("p");ge(r,"footer-text"),r.textContent=t.theme.footerText,n.appendChild(r),t.root.appendChild(n)}}},iR=[zO,YO,GO,qO,VO,JO,jO,XO,$O,eR,tR,nR,rR];function uR(e={}){const t=iR.map(r=>e[r.kind]??r),n=e.extraRenderers??[];return[...t,...n]}async function Vp(e,t,n){for(const r of t){const i=r[e];if(!i)continue;const u=e==="finalize"?r.finalizeSelector??r.selector:r.selector,s=[];n.root.matches(u)&&s.push(n.root),s.push(...Array.from(n.root.querySelectorAll(u)));for(const a of s)(a.isConnected||a===n.root)&&await i(a,n)}}function sR(e,t){return[Object.entries(e).filter(([r])=>/^--[a-z0-9-_]+$/i.test(r)).map(([r,i])=>`${r}: ${i};`).join(`
922
+ `)},e.matchesPseudo=function(i,u){return u.find(function(s){return i.indexOf(":"+s)>-1})},e.matchesPreservedSelector=function(i,u){if(!u||u.length===0)return!1;for(var s=0;s<u.length;s++){var a=u[s];if(i===a||i.indexOf(a)!==-1)return!0}return!1},e.removeInlinedSelectorsFromCSS=function(i,u,s,a){for(var o=t.parse(i,{position:!0,comments:!0}),l=typeof o.stylesheet<"u"&&o.stylesheet.rules?o.stylesheet.rules:[],c=[],d=0;d<l.length;d++){var f=l[d];if(f.type!=="rule"){c.push(f);continue}if(f.selectors&&s.preservePseudos&&this.matchesPseudo(f.selectors[0],a)){c.push(f);continue}if(f.selectors&&s.preservedSelectors&&f.selectors.some(function(A){return e.matchesPreservedSelector(A,s.preservedSelectors)})){c.push(f);continue}var p=f.selectors.filter(function(A){return!u.has(A)});if(p.length>0){var m=Object.assign({},f,{selectors:p});c.push(m)}}return c.length===0?"":t.stringify({stylesheet:{rules:c}},{comments:!1,indentation:" "})},e.compareFunc=function(i,u){for(var s=Math.min(i.length,u.length),a=0;a<s;a++)if(i[a]!==u[a])return i[a]>u[a]?1:-1;return i.length-u.length},e.compare=function(i,u){return e.compareFunc(i,u)==1?i:u},e.getDefaultOptions=function(i){var u=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,removeInlinedSelectors:!1,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,preservedSelectors:[],applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,resolveCSSVariables:!0,inlineDuplicateProperties:!1,url:""},i);return u.webResources=u.webResources||{},u}})(fl)),fl}var vp;function xR(){return vp||(vp=1,(function(e){var t=gR;Ff();var n=function(i,u,s){const{xmlMode:a,...o}=u;return u=Object.assign({xml:{decodeEntities:!1,xmlMode:a}},o),i=s(i),t.load(i,u)},r=function(){var i=[],u=function(a){var o=e.exports.codeBlocks;return Object.keys(o).forEach(function(l){var c=new RegExp(o[l].start+"([\\S\\s]*?)"+o[l].end,"g");a=a.replace(c,function(d,f){return i.push(d),"JUICE_CODE_BLOCK_"+(i.length-1)+"_"})}),a},s=function(a){for(var o=0;o<i.length;o++){var l=new RegExp("JUICE_CODE_BLOCK_"+o+'_(="")?',"gi");a=a.replace(l,function(){return i[o]})}return a};return{encodeEntities:u,decodeEntities:s}};e.exports=function(i,u,s,a){var o=r(),l=n(i,u,o.encodeEntities),c=[l];c.push.apply(c,a);var d=s.apply(void 0,c)||l;return u&&u.xmlMode?o.decodeEntities(d.xml()):o.decodeEntities(d.html())},e.exports.codeBlocks={EJS:{start:"<%",end:"%>"},HBS:{start:"{{",end:"}}"}}})(el)),el.exports}var Tl={},Cl={},kl={},Lp;function Pp(){return Lp||(Lp=1,(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.fromCodePoint=void 0,e.replaceCodePoint=r,e.decodeCodePoint=i;const n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(t=String.fromCodePoint)!==null&&t!==void 0?t:(u=>{let s="";return u>65535&&(u-=65536,s+=String.fromCharCode(u>>>10&1023|55296),u=56320|u&1023),s+=String.fromCharCode(u),s});function r(u){var s;return u>=55296&&u<=57343||u>1114111?65533:(s=n.get(u))!==null&&s!==void 0?s:u}function i(u){return(0,e.fromCodePoint)(r(u))}})(kl)),kl}var Ki={},Ms={},Fp;function S2(){if(Fp)return Ms;Fp=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.decodeBase64=e;function e(t){const n=typeof atob=="function"?atob(t):typeof Buffer.from=="function"?Buffer.from(t,"base64").toString("binary"):new Buffer(t,"base64").toString("binary"),r=n.length&-2,i=new Uint16Array(r/2);for(let u=0,s=0;u<r;u+=2){const a=n.charCodeAt(u),o=n.charCodeAt(u+1);i[s++]=a|o<<8}return i}return Ms}var Hp;function Up(){if(Hp)return Ki;Hp=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.htmlDecodeTree=void 0;const e=S2();return Ki.htmlDecodeTree=(0,e.decodeBase64)("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg"),Ki}var zi={},Wp;function Kp(){if(Wp)return zi;Wp=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.xmlDecodeTree=void 0;const e=S2();return zi.xmlDecodeTree=(0,e.decodeBase64)("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg"),zi}var Qi={},zp;function wR(){if(zp)return Qi;zp=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.BinTrieFlags=void 0;var e;return(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.FLAG13=8192]="FLAG13",t[t.BRANCH_LENGTH=8064]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(e||(Qi.BinTrieFlags=e={})),Qi}var Qp;function Yp(){return Qp||(Qp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.xmlDecodeTree=e.htmlDecodeTree=e.replaceCodePoint=e.fromCodePoint=e.decodeCodePoint=e.EntityDecoder=e.DecodingMode=void 0,e.determineBranch=A,e.decodeHTML=N,e.decodeHTMLAttribute=w,e.decodeHTMLStrict=_,e.decodeXML=S;const t=Pp(),n=Up(),r=Kp(),i=wR();var u;(function(R){R[R.NUM=35]="NUM",R[R.SEMI=59]="SEMI",R[R.EQUALS=61]="EQUALS",R[R.ZERO=48]="ZERO",R[R.NINE=57]="NINE",R[R.LOWER_A=97]="LOWER_A",R[R.LOWER_F=102]="LOWER_F",R[R.LOWER_X=120]="LOWER_X",R[R.LOWER_Z=122]="LOWER_Z",R[R.UPPER_A=65]="UPPER_A",R[R.UPPER_F=70]="UPPER_F",R[R.UPPER_Z=90]="UPPER_Z"})(u||(u={}));const s=32;function a(R){return R>=u.ZERO&&R<=u.NINE}function o(R){return R>=u.UPPER_A&&R<=u.UPPER_F||R>=u.LOWER_A&&R<=u.LOWER_F}function l(R){return R>=u.UPPER_A&&R<=u.UPPER_Z||R>=u.LOWER_A&&R<=u.LOWER_Z||a(R)}function c(R){return R===u.EQUALS||l(R)}var d;(function(R){R[R.EntityStart=0]="EntityStart",R[R.NumericStart=1]="NumericStart",R[R.NumericDecimal=2]="NumericDecimal",R[R.NumericHex=3]="NumericHex",R[R.NamedEntity=4]="NamedEntity"})(d||(d={}));var f;(function(R){R[R.Legacy=0]="Legacy",R[R.Strict=1]="Strict",R[R.Attribute=2]="Attribute"})(f||(e.DecodingMode=f={}));class p{constructor(k,B,P){this.decodeTree=k,this.emitCodePoint=B,this.errors=P,this.state=d.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=f.Strict,this.runConsumed=0}startEntity(k){this.decodeMode=k,this.state=d.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(k,B){switch(this.state){case d.EntityStart:return k.charCodeAt(B)===u.NUM?(this.state=d.NumericStart,this.consumed+=1,this.stateNumericStart(k,B+1)):(this.state=d.NamedEntity,this.stateNamedEntity(k,B));case d.NumericStart:return this.stateNumericStart(k,B);case d.NumericDecimal:return this.stateNumericDecimal(k,B);case d.NumericHex:return this.stateNumericHex(k,B);case d.NamedEntity:return this.stateNamedEntity(k,B)}}stateNumericStart(k,B){return B>=k.length?-1:(k.charCodeAt(B)|s)===u.LOWER_X?(this.state=d.NumericHex,this.consumed+=1,this.stateNumericHex(k,B+1)):(this.state=d.NumericDecimal,this.stateNumericDecimal(k,B))}stateNumericHex(k,B){for(;B<k.length;){const P=k.charCodeAt(B);if(a(P)||o(P)){const q=P<=u.NINE?P-u.ZERO:(P|s)-u.LOWER_A+10;this.result=this.result*16+q,this.consumed++,B++}else return this.emitNumericEntity(P,3)}return-1}stateNumericDecimal(k,B){for(;B<k.length;){const P=k.charCodeAt(B);if(a(P))this.result=this.result*10+(P-u.ZERO),this.consumed++,B++;else return this.emitNumericEntity(P,2)}return-1}emitNumericEntity(k,B){var P;if(this.consumed<=B)return(P=this.errors)===null||P===void 0||P.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(k===u.SEMI)this.consumed+=1;else if(this.decodeMode===f.Strict)return 0;return this.emitCodePoint((0,t.replaceCodePoint)(this.result),this.consumed),this.errors&&(k!==u.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(k,B){const{decodeTree:P}=this;let q=P[this.treeIndex],J=(q&i.BinTrieFlags.VALUE_LENGTH)>>14;for(;B<k.length;){if(J===0&&(q&i.BinTrieFlags.FLAG13)!==0){const oe=(q&i.BinTrieFlags.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const W=q&i.BinTrieFlags.JUMP_TABLE;if(k.charCodeAt(B)!==W)return this.result===0?0:this.emitNotTerminatedNamedEntity();B++,this.excess++,this.runConsumed++}for(;this.runConsumed<oe;){if(B>=k.length)return-1;const W=this.runConsumed-1,G=P[this.treeIndex+1+(W>>1)],we=W%2===0?G&255:G>>8&255;if(k.charCodeAt(B)!==we)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();B++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(oe>>1),q=P[this.treeIndex],J=(q&i.BinTrieFlags.VALUE_LENGTH)>>14}if(B>=k.length)break;const V=k.charCodeAt(B);if(V===u.SEMI&&J!==0&&(q&i.BinTrieFlags.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,J,this.consumed+this.excess);if(this.treeIndex=A(P,q,this.treeIndex+Math.max(1,J),V),this.treeIndex<0)return this.result===0||this.decodeMode===f.Attribute&&(J===0||c(V))?0:this.emitNotTerminatedNamedEntity();if(q=P[this.treeIndex],J=(q&i.BinTrieFlags.VALUE_LENGTH)>>14,J!==0){if(V===u.SEMI)return this.emitNamedEntityData(this.treeIndex,J,this.consumed+this.excess);this.decodeMode!==f.Strict&&(q&i.BinTrieFlags.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}B++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var k;const{result:B,decodeTree:P}=this,q=(P[B]&i.BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(B,q,this.consumed),(k=this.errors)===null||k===void 0||k.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(k,B,P){const{decodeTree:q}=this;return this.emitCodePoint(B===1?q[k]&~(i.BinTrieFlags.VALUE_LENGTH|i.BinTrieFlags.FLAG13):q[k+1],P),B===3&&this.emitCodePoint(q[k+2],P),P}end(){var k;switch(this.state){case d.NamedEntity:return this.result!==0&&(this.decodeMode!==f.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case d.NumericDecimal:return this.emitNumericEntity(0,2);case d.NumericHex:return this.emitNumericEntity(0,3);case d.NumericStart:return(k=this.errors)===null||k===void 0||k.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case d.EntityStart:return 0}}}e.EntityDecoder=p;function m(R){let k="";const B=new p(R,P=>k+=(0,t.fromCodePoint)(P));return function(q,J){let V=0,oe=0;for(;(oe=q.indexOf("&",oe))>=0;){k+=q.slice(V,oe),B.startEntity(J);const G=B.write(q,oe+1);if(G<0){V=oe+B.end();break}V=oe+G,oe=G===0?V+1:V}const W=k+q.slice(V);return k="",W}}function A(R,k,B,P){const q=(k&i.BinTrieFlags.BRANCH_LENGTH)>>7,J=k&i.BinTrieFlags.JUMP_TABLE;if(q===0)return J!==0&&P===J?B:-1;if(J){const G=P-J;return G<0||G>=q?-1:R[B+G]-1}const V=q+1>>1;let oe=0,W=q-1;for(;oe<=W;){const G=oe+W>>>1,we=G>>1,le=R[B+we]>>(G&1)*8&255;if(le<P)oe=G+1;else if(le>P)W=G-1;else return R[B+V+G]}return-1}const E=m(n.htmlDecodeTree),g=m(r.xmlDecodeTree);function N(R,k=f.Legacy){return E(R,k)}function w(R){return E(R,f.Attribute)}function _(R){return E(R,f.Strict)}function S(R){return g(R,f.Strict)}var x=Pp();Object.defineProperty(e,"decodeCodePoint",{enumerable:!0,get:function(){return x.decodeCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return x.fromCodePoint}}),Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return x.replaceCodePoint}});var O=Up();Object.defineProperty(e,"htmlDecodeTree",{enumerable:!0,get:function(){return O.htmlDecodeTree}});var z=Kp();Object.defineProperty(e,"xmlDecodeTree",{enumerable:!0,get:function(){return z.xmlDecodeTree}})})(Cl)),Cl}var Yi={},xl={},qp;function Dc(){return qp||(qp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.XML_BITSET_VALUE=e.getCodePoint=void 0,e.encodeXML=n;const t=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);e.getCodePoint=String.prototype.codePointAt==null?(i,u)=>(i.charCodeAt(u)&64512)===55296?(i.charCodeAt(u)-55296)*1024+i.charCodeAt(u+1)-56320+65536:i.charCodeAt(u):(i,u)=>i.codePointAt(u),e.XML_BITSET_VALUE=1342177476;function n(i){let u,s=0;const{length:a}=i;for(let o=0;o<a;o++){const l=i.charCodeAt(o);if(l<128&&((e.XML_BITSET_VALUE>>>l&1)===0||l>=64||l<32))continue;if(u===void 0?u=i.substring(0,o):s!==o&&(u+=i.substring(s,o)),l<64){u+=t.get(l),s=o+1;continue}const c=(0,e.getCodePoint)(i,o);u+=`&#x${c.toString(16)};`,c!==l&&o++,s=o+1}return u===void 0?i:(s<a&&(u+=i.substr(s)),u)}e.escape=n;function r(i,u){return function(a){let o,l=0,c="";for(;o=i.exec(a);)l!==o.index&&(c+=a.substring(l,o.index)),c+=u.get(o[0].charCodeAt(0)),l=o.index+1;return c+a.substring(l)}}e.escapeUTF8=r(/["&'<>]/g,t),e.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),e.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))})(xl)),xl}var qi={},Bs={},Gp;function IR(){if(Gp)return Bs;Gp=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.parseEncodeTrie=e;function e(t){const n=new Map,r=t.length;let i=0,u=-1;function s(){const o=i;for(;i<r;){const l=t.charAt(i);if((l<"0"||l>"9")&&(l<"a"||l>"z"))break;i++}return i===o?0:Number.parseInt(t.slice(o,i),36)}function a(){if(t[i]!=="&")throw new Error(`Child entry missing value near index ${i}`);const o=i,l=t.indexOf(";",i+1);if(l===-1)throw new Error(`Unterminated entity starting at index ${o}`);return i=l+1,t.slice(o,i)}for(;i<r;){const o=s(),l=u===-1?o:u+o+1;let c;if(t[i]==="&"&&(c=a()),t[i]==="{"){i++;let d=s(),f=d;const p=a();if(t[i]==="{")throw new Error("Unexpected nested '{' beyond depth 2");if(t[i]==="}")n.set(l,{value:c,next:f,nextValue:p}),i++;else{const m=new Map;m.set(f,p);let A=f;for(;i<r&&t[i]!=="}";){d=s(),f=A+d+1;const E=a();if(t[i]==="{")throw new Error("Unexpected nested '{' beyond depth 2");m.set(f,E),A=f}if(t[i]!=="}")throw new Error("Unterminated child block");i++,n.set(l,{value:c,next:m})}}else{if(c===void 0)throw new Error(`Malformed encode trie: missing value at index ${i}`);n.set(l,c)}u=l}return n}return Bs}var Vp;function SR(){if(Vp)return qi;Vp=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.htmlTrie=void 0;const e=IR();return qi.htmlTrie=(0,e.parseEncodeTrie)("9&Tab;&NewLine;m&excl;&quot;&num;&dollar;&percnt;&amp;&apos;&lpar;&rpar;&ast;&plus;&comma;1&period;&sol;a&colon;&semi;&lt;{6he&nvlt;}&equals;{6hx&bne;}&gt;{6he&nvgt;}&quest;&commat;q&lbrack;&bsol;&rbrack;&Hat;&lowbar;&DiacriticalGrave;5{2y&fjlig;}k&lbrace;&verbar;&rbrace;y&nbsp;&iexcl;&cent;&pound;&curren;&yen;&brvbar;&sect;&die;&copy;&ordf;&laquo;&not;&shy;&circledR;&macr;&deg;&PlusMinus;&sup2;&sup3;&acute;&micro;&para;&centerdot;&cedil;&sup1;&ordm;&raquo;&frac14;&frac12;&frac34;&iquest;&Agrave;&Aacute;&Acirc;&Atilde;&Auml;&angst;&AElig;&Ccedil;&Egrave;&Eacute;&Ecirc;&Euml;&Igrave;&Iacute;&Icirc;&Iuml;&ETH;&Ntilde;&Ograve;&Oacute;&Ocirc;&Otilde;&Ouml;&times;&Oslash;&Ugrave;&Uacute;&Ucirc;&Uuml;&Yacute;&THORN;&szlig;&agrave;&aacute;&acirc;&atilde;&auml;&aring;&aelig;&ccedil;&egrave;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&eth;&ntilde;&ograve;&oacute;&ocirc;&otilde;&ouml;&div;&oslash;&ugrave;&uacute;&ucirc;&uuml;&yacute;&thorn;&yuml;&Amacr;&amacr;&Abreve;&abreve;&Aogon;&aogon;&Cacute;&cacute;&Ccirc;&ccirc;&Cdot;&cdot;&Ccaron;&ccaron;&Dcaron;&dcaron;&Dstrok;&dstrok;&Emacr;&emacr;2&Edot;&edot;&Eogon;&eogon;&Ecaron;&ecaron;&Gcirc;&gcirc;&Gbreve;&gbreve;&Gdot;&gdot;&Gcedil;1&Hcirc;&hcirc;&Hstrok;&hstrok;&Itilde;&itilde;&Imacr;&imacr;2&Iogon;&iogon;&Idot;&imath;&IJlig;&ijlig;&Jcirc;&jcirc;&Kcedil;&kcedil;&kgreen;&Lacute;&lacute;&Lcedil;&lcedil;&Lcaron;&lcaron;&Lmidot;&lmidot;&Lstrok;&lstrok;&Nacute;&nacute;&Ncedil;&ncedil;&Ncaron;&ncaron;&napos;&ENG;&eng;&Omacr;&omacr;2&Odblac;&odblac;&OElig;&oelig;&Racute;&racute;&Rcedil;&rcedil;&Rcaron;&rcaron;&Sacute;&sacute;&Scirc;&scirc;&Scedil;&scedil;&Scaron;&scaron;&Tcedil;&tcedil;&Tcaron;&tcaron;&Tstrok;&tstrok;&Utilde;&utilde;&Umacr;&umacr;&Ubreve;&ubreve;&Uring;&uring;&Udblac;&udblac;&Uogon;&uogon;&Wcirc;&wcirc;&Ycirc;&ycirc;&Yuml;&Zacute;&zacute;&Zdot;&zdot;&Zcaron;&zcaron;j&fnof;y&imped;1r&gacute;1t&jmath;3y&circ;&caron;g&breve;&DiacriticalDot;&ring;&ogon;&DiacriticalTilde;&dblac;1f&DownBreve;3j&Alpha;&Beta;&Gamma;&Delta;&Epsilon;&Zeta;&Eta;&Theta;&Iota;&Kappa;&Lambda;&Mu;&Nu;&Xi;&Omicron;&Pi;&Rho;1&Sigma;&Tau;&Upsilon;&Phi;&Chi;&Psi;&ohm;7&alpha;&beta;&gamma;&delta;&epsi;&zeta;&eta;&theta;&iota;&kappa;&lambda;&mu;&nu;&xi;&omicron;&pi;&rho;&sigmaf;&sigma;&tau;&upsi;&phi;&chi;&psi;&omega;7&thetasym;&Upsi;2&phiv;&piv;5&Gammad;&digamma;i&kappav;&rhov;3&epsiv;&backepsilon;a&IOcy;&DJcy;&GJcy;&Jukcy;&DScy;&Iukcy;&YIcy;&Jsercy;&LJcy;&NJcy;&TSHcy;&KJcy;1&Ubrcy;&DZcy;&Acy;&Bcy;&Vcy;&Gcy;&Dcy;&IEcy;&ZHcy;&Zcy;&Icy;&Jcy;&Kcy;&Lcy;&Mcy;&Ncy;&Ocy;&Pcy;&Rcy;&Scy;&Tcy;&Ucy;&Fcy;&KHcy;&TScy;&CHcy;&SHcy;&SHCHcy;&HARDcy;&Ycy;&SOFTcy;&Ecy;&YUcy;&YAcy;&acy;&bcy;&vcy;&gcy;&dcy;&iecy;&zhcy;&zcy;&icy;&jcy;&kcy;&lcy;&mcy;&ncy;&ocy;&pcy;&rcy;&scy;&tcy;&ucy;&fcy;&khcy;&tscy;&chcy;&shcy;&shchcy;&hardcy;&ycy;&softcy;&ecy;&yucy;&yacy;1&iocy;&djcy;&gjcy;&jukcy;&dscy;&iukcy;&yicy;&jsercy;&ljcy;&njcy;&tshcy;&kjcy;1&ubrcy;&dzcy;5gi&ensp;&emsp;&emsp13;&emsp14;1&numsp;&puncsp;&ThinSpace;&hairsp;&NegativeMediumSpace;&zwnj;&zwj;&lrm;&rlm;&dash;2&ndash;&mdash;&horbar;&Verbar;1&lsquo;&CloseCurlyQuote;&lsquor;1&ldquo;&CloseCurlyDoubleQuote;&bdquo;1&dagger;&Dagger;&bull;2&nldr;&hellip;9&permil;&pertenk;&prime;&Prime;&tprime;&backprime;3&lsaquo;&rsaquo;3&oline;2&caret;1&hybull;&frasl;a&bsemi;7&qprime;7&MediumSpace;{6bu&ThickSpace;}&NoBreak;&af;&InvisibleTimes;&ic;20&euro;1a&tdot;&DotDot;11&complexes;2&incare;4&gscr;&hamilt;&Hfr;&Hopf;&planckh;&hbar;&imagline;&Ifr;&lagran;&ell;1&naturals;&numero;&copysr;&weierp;&Popf;&Qopf;&realine;&real;&reals;&rx;3&trade;1&integers;2&mho;&zeetrf;&iiota;2&bernou;&Cayleys;1&escr;&Escr;&Fouriertrf;1&Mellintrf;&order;&alefsym;&beth;&gimel;&daleth;c&CapitalDifferentialD;&dd;&ee;&ii;a&frac13;&frac23;&frac15;&frac25;&frac35;&frac45;&frac16;&frac56;&frac18;&frac38;&frac58;&frac78;1d&larr;&ShortUpArrow;&rarr;&darr;&harr;&updownarrow;&nwarr;&nearr;&LowerRightArrow;&LowerLeftArrow;&nlarr;&nrarr;1&rarrw;{mw&nrarrw;}&Larr;&Uarr;&Rarr;&Darr;&larrtl;&rarrtl;&LeftTeeArrow;&mapstoup;&map;&DownTeeArrow;1&hookleftarrow;&hookrightarrow;&larrlp;&looparrowright;&harrw;&nharr;1&lsh;&rsh;&ldsh;&rdsh;1&crarr;&cularr;&curarr;2&circlearrowleft;&circlearrowright;&leftharpoonup;&DownLeftVector;&RightUpVector;&LeftUpVector;&rharu;&DownRightVector;&dharr;&dharl;&RightArrowLeftArrow;&udarr;&LeftArrowRightArrow;&leftleftarrows;&upuparrows;&rightrightarrows;&ddarr;&leftrightharpoons;&Equilibrium;&nlArr;&nhArr;&nrArr;&DoubleLeftArrow;&DoubleUpArrow;&DoubleRightArrow;&dArr;&DoubleLeftRightArrow;&DoubleUpDownArrow;&nwArr;&neArr;&seArr;&swArr;&lAarr;&rAarr;1&zigrarr;6&larrb;&rarrb;f&DownArrowUpArrow;7&loarr;&roarr;&hoarr;&forall;&comp;&part;{mw&npart;}&exist;&nexist;&empty;1&Del;&Element;&NotElement;1&ni;&notni;2&prod;&coprod;&sum;&minus;&MinusPlus;&dotplus;1&Backslash;&lowast;&compfn;1&radic;2&prop;&infin;&angrt;&ang;{6he&nang;}&angmsd;&angsph;&mid;&nmid;&DoubleVerticalBar;&NotDoubleVerticalBar;&and;&or;&cap;{1e68&caps;}&cup;{1e68&cups;}&int;&Int;&iiint;&conint;&Conint;&Cconint;&cwint;&ClockwiseContourIntegral;&awconint;&there4;&becaus;&ratio;&Colon;&dotminus;1&mDDot;&homtht;&sim;{6he&nvsim;}&backsim;{mp&race;}&ac;{mr&acE;}&acd;&VerticalTilde;&NotTilde;&eqsim;{mw&nesim;}&sime;&NotTildeEqual;&cong;&simne;&ncong;&ap;&nap;&ape;&apid;{mw&napid;}&backcong;&asympeq;{6he&nvap;}&bump;{mw&nbump;}&bumpe;{mw&nbumpe;}&doteq;{mw&nedot;}&doteqdot;&efDot;&erDot;&Assign;&ecolon;&ecir;&circeq;1&wedgeq;&veeeq;1&triangleq;2&equest;&ne;&Congruent;{6hx&bnequiv;}&nequiv;1&le;{6he&nvle;}&ge;{6he&nvge;}&lE;{mw&nlE;}&gE;{mw&ngE;}&lnE;{1e68&lvertneqq;}&gnE;{1e68&gvertneqq;}&ll;{mw&nLtv;5uh&nLt;}&gg;{mw&nGtv;5uh&nGt;}&between;&NotCupCap;&nless;&ngt;&nle;&nge;&lesssim;&GreaterTilde;&nlsim;&ngsim;&LessGreater;&gl;&NotLessGreater;&NotGreaterLess;&pr;&sc;&prcue;&sccue;&PrecedesTilde;&scsim;{mw&NotSucceedsTilde;}&NotPrecedes;&NotSucceeds;&sub;{6he&NotSubset;}&sup;{6he&NotSuperset;}&nsub;&nsup;&sube;&supe;&NotSubsetEqual;&NotSupersetEqual;&subne;{1e68&varsubsetneq;}&supne;{1e68&varsupsetneq;}1&cupdot;&UnionPlus;&sqsub;{mw&NotSquareSubset;}&sqsup;{mw&NotSquareSuperset;}&sqsube;&sqsupe;&sqcap;{1e68&sqcaps;}&sqcup;{1e68&sqcups;}&CirclePlus;&CircleMinus;&CircleTimes;&osol;&CircleDot;&circledcirc;&circledast;1&circleddash;&boxplus;&boxminus;&boxtimes;&dotsquare;&RightTee;&dashv;&DownTee;&bot;1&models;&DoubleRightTee;&Vdash;&Vvdash;&VDash;&nvdash;&nvDash;&nVdash;&nVDash;&prurel;1&LeftTriangle;&RightTriangle;&LeftTriangleEqual;{6he&nvltrie;}&RightTriangleEqual;{6he&nvrtrie;}&origof;&imof;&multimap;&hercon;&intcal;&veebar;1&barvee;&angrtvb;&lrtri;&bigwedge;&bigvee;&bigcap;&bigcup;&diam;&sdot;&sstarf;&divideontimes;&bowtie;&ltimes;&rtimes;&leftthreetimes;&rightthreetimes;&backsimeq;&curlyvee;&curlywedge;&Sub;&Sup;&Cap;&Cup;&fork;&epar;&lessdot;&gtdot;&Ll;{mw&nLl;}&Gg;{mw&nGg;}&leg;{1e68&lesg;}&gel;{1e68&gesl;}2&cuepr;&cuesc;&NotPrecedesSlantEqual;&NotSucceedsSlantEqual;&NotSquareSubsetEqual;&NotSquareSupersetEqual;2&lnsim;&gnsim;&precnsim;&scnsim;&nltri;&NotRightTriangle;&nltrie;&NotRightTriangleEqual;&vellip;&ctdot;&utdot;&dtdot;&disin;&isinsv;&isins;&isindot;{mw&notindot;}&notinvc;&notinvb;1&isinE;{mw&notinE;}&nisd;&xnis;&nis;&notnivc;&notnivb;6&barwed;&Barwed;1&lceil;&rceil;&LeftFloor;&rfloor;&drcrop;&dlcrop;&urcrop;&ulcrop;&bnot;1&profline;&profsurf;1&telrec;&target;5&ulcorn;&urcorn;&dlcorn;&drcorn;2&frown;&smile;9&cylcty;&profalar;7&topbot;6&ovbar;1&solbar;1o&angzarr;1f&lmoustache;&rmoustache;2&OverBracket;&bbrk;&bbrktbrk;11&OverParenthesis;&UnderParenthesis;&OverBrace;&UnderBrace;2&trpezium;4&elinters;1n&blank;4k&circledS;1j&boxh;1&boxv;9&boxdr;3&boxdl;3&boxur;3&boxul;3&boxvr;7&boxvl;7&boxhd;7&boxhu;7&boxvh;j&boxH;&boxV;&boxdR;&boxDr;&boxDR;&boxdL;&boxDl;&boxDL;&boxuR;&boxUr;&boxUR;&boxuL;&boxUl;&boxUL;&boxvR;&boxVr;&boxVR;&boxvL;&boxVl;&boxVL;&boxHd;&boxhD;&boxHD;&boxHu;&boxhU;&boxHU;&boxvH;&boxVh;&boxVH;j&uhblk;3&lhblk;3&block;8&blk14;&blk12;&blk34;d&square;8&blacksquare;&EmptyVerySmallSquare;1&rect;&marker;2&fltns;1&bigtriangleup;&blacktriangle;&triangle;2&blacktriangleright;&rtri;3&bigtriangledown;&blacktriangledown;&dtri;2&blacktriangleleft;&ltri;6&loz;&cir;w&tridot;2&bigcirc;8&ultri;&urtri;&lltri;&EmptySmallSquare;&FilledSmallSquare;8&bigstar;&star;7&phone;1d&female;1&male;t&spades;2&clubs;1&hearts;&diamondsuit;3&sung;2&flat;&natural;&sharp;4j&check;3&cross;8&malt;l&sext;x&VerticalSeparator;p&lbbrk;&rbbrk;2c&bsolhsub;&suphsol;s&LeftDoubleBracket;&RightDoubleBracket;&lang;&rang;&Lang;&Rang;&loang;&roang;7&longleftarrow;&longrightarrow;&longleftrightarrow;&DoubleLongLeftArrow;&DoubleLongRightArrow;&DoubleLongLeftRightArrow;1&longmapsto;2&dzigrarr;76&nvlArr;&nvrArr;&nvHarr;&Map;6&lbarr;&bkarow;&lBarr;&dbkarow;&drbkarow;&DDotrahd;&UpArrowBar;&DownArrowBar;2&Rarrtl;2&latail;&ratail;&lAtail;&rAtail;&larrfs;&rarrfs;&larrbfs;&rarrbfs;2&nwarhk;&nearhk;&hksearow;&hkswarow;&nwnear;&nesear;&seswar;&swnwar;8&rarrc;{mw&nrarrc;}1&cudarrr;&ldca;&rdca;&cudarrl;&larrpl;2&curarrm;&cularrp;7&rarrpl;2&harrcir;&Uarrocir;&lurdshar;&ldrushar;2&LeftRightVector;&RightUpDownVector;&DownLeftRightVector;&LeftUpDownVector;&LeftVectorBar;&RightVectorBar;&RightUpVectorBar;&RightDownVectorBar;&DownLeftVectorBar;&DownRightVectorBar;&LeftUpVectorBar;&LeftDownVectorBar;&LeftTeeVector;&RightTeeVector;&RightUpTeeVector;&RightDownTeeVector;&DownLeftTeeVector;&DownRightTeeVector;&LeftUpTeeVector;&LeftDownTeeVector;&lHar;&uHar;&rHar;&dHar;&luruhar;&ldrdhar;&ruluhar;&rdldhar;&lharul;&llhard;&rharul;&lrhard;&udhar;&duhar;&RoundImplies;&erarr;&simrarr;&larrsim;&rarrsim;&rarrap;&ltlarr;1&gtrarr;&subrarr;1&suplarr;&lfisht;&rfisht;&ufisht;&dfisht;5&lopar;&ropar;4&lbrke;&rbrke;&lbrkslu;&rbrksld;&lbrksld;&rbrkslu;&langd;&rangd;&lparlt;&rpargt;&gtlPar;&ltrPar;3&vzigzag;1&vangrt;&angrtvbd;6&ange;&range;&dwangle;&uwangle;&angmsdaa;&angmsdab;&angmsdac;&angmsdad;&angmsdae;&angmsdaf;&angmsdag;&angmsdah;&bemptyv;&demptyv;&cemptyv;&raemptyv;&laemptyv;&ohbar;&omid;&opar;1&operp;1&olcross;&odsold;1&olcir;&ofcir;&olt;&ogt;&cirscir;&cirE;&solb;&bsolb;3&boxbox;3&trisb;&rtriltri;&LeftTriangleBar;{mw&NotLeftTriangleBar;}&RightTriangleBar;{mw&NotRightTriangleBar;}b&iinfin;&infintie;&nvinfin;4&eparsl;&smeparsl;&eqvparsl;5&blacklozenge;8&RuleDelayed;1&dsol;9&bigodot;&bigoplus;&bigotimes;1&biguplus;1&bigsqcup;5&iiiint;&fpartint;2&cirfnint;&awint;&rppolint;&scpolint;&npolint;&pointint;&quatint;&intlarhk;a&pluscir;&plusacir;&simplus;&plusdu;&plussim;&plustwo;1&mcomma;&minusdu;2&loplus;&roplus;&Cross;&timesd;&timesbar;1&smashp;&lotimes;&rotimes;&otimesas;&Otimes;&odiv;&triplus;&triminus;&tritime;&intprod;2&amalg;&capdot;1&ncup;&ncap;&capand;&cupor;&cupcap;&capcup;&cupbrcap;&capbrcup;&cupcup;&capcap;&ccups;&ccaps;2&ccupssm;2&And;&Or;&andand;&oror;&orslope;&andslope;1&andv;&orv;&andd;&ord;1&wedbar;6&sdote;3&simdot;2&congdot;{mw&ncongdot;}&easter;&apacir;&apE;{mw&napE;}&eplus;&pluse;&Esim;&Colone;&Equal;1&ddotseq;&equivDD;&ltcir;&gtcir;&ltquest;&gtquest;&leqslant;{mw&nleqslant;}&geqslant;{mw&ngeqslant;}&lesdot;&gesdot;&lesdoto;&gesdoto;&lesdotor;&gesdotol;&lap;&gap;&lne;&gne;&lnap;&gnap;&lEg;&gEl;&lsime;&gsime;&lsimg;&gsiml;&lgE;&glE;&lesges;&gesles;&els;&egs;&elsdot;&egsdot;&el;&eg;2&siml;&simg;&simlE;&simgE;&LessLess;{mw&NotNestedLessLess;}&GreaterGreater;{mw&NotNestedGreaterGreater;}1&glj;&gla;&ltcc;&gtcc;&lescc;&gescc;&smt;&lat;&smte;{1e68&smtes;}&late;{1e68&lates;}&bumpE;&PrecedesEqual;{mw&NotPrecedesEqual;}&sce;{mw&NotSucceedsEqual;}2&prE;&scE;&precneqq;&scnE;&prap;&scap;&precnapprox;&scnap;&Pr;&Sc;&subdot;&supdot;&subplus;&supplus;&submult;&supmult;&subedot;&supedot;&subE;{mw&nsubE;}&supE;{mw&nsupE;}&subsim;&supsim;2&subnE;{1e68&varsubsetneqq;}&supnE;{1e68&varsupsetneqq;}2&csub;&csup;&csube;&csupe;&subsup;&supsub;&subsub;&supsup;&suphsub;&supdsub;&forkv;&topfork;&mlcp;8&Dashv;1&Vdashl;&Barv;&vBar;&vBarv;1&Vbar;&Not;&bNot;&rnmid;&cirmid;&midcir;&topcir;&nhpar;&parsim;9&parsl;{6hx&nparsl;}y7r{17ks&Ascr;1&Cscr;&Dscr;2&Gscr;2&Jscr;&Kscr;2&Nscr;&Oscr;&Pscr;&Qscr;1&Sscr;&Tscr;&Uscr;&Vscr;&Wscr;&Xscr;&Yscr;&Zscr;&ascr;&bscr;&cscr;&dscr;1&fscr;1&hscr;&iscr;&jscr;&kscr;&lscr;&mscr;&nscr;1&pscr;&qscr;&rscr;&sscr;&tscr;&uscr;&vscr;&wscr;&xscr;&yscr;&zscr;1g&Afr;&Bfr;1&Dfr;&Efr;&Ffr;&Gfr;2&Jfr;&Kfr;&Lfr;&Mfr;&Nfr;&Ofr;&Pfr;&Qfr;1&Sfr;&Tfr;&Ufr;&Vfr;&Wfr;&Xfr;&Yfr;1&afr;&bfr;&cfr;&dfr;&efr;&ffr;&gfr;&hfr;&ifr;&jfr;&kfr;&lfr;&mfr;&nfr;&ofr;&pfr;&qfr;&rfr;&sfr;&tfr;&ufr;&vfr;&wfr;&xfr;&yfr;&zfr;&Aopf;&Bopf;1&Dopf;&Eopf;&Fopf;&Gopf;1&Iopf;&Jopf;&Kopf;&Lopf;&Mopf;1&Oopf;3&Sopf;&Topf;&Uopf;&Vopf;&Wopf;&Xopf;&Yopf;1&aopf;&bopf;&copf;&dopf;&eopf;&fopf;&gopf;&hopf;&iopf;&jopf;&kopf;&lopf;&mopf;&nopf;&oopf;&popf;&qopf;&ropf;&sopf;&topf;&uopf;&vopf;&wopf;&xopf;&yopf;&zopf;}6ve&fflig;&filig;&fllig;&ffilig;&ffllig;"),qi}var Jp;function jp(){if(Jp)return Yi;Jp=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.encodeHTML=i,Yi.encodeNonAsciiHTML=u;const e=Dc(),t=SR(),n=new Uint32Array([5632,4227923966,4160749569,939524097]),r=new Uint32Array([0,e.XML_BITSET_VALUE,0,0]);function i(a){return s(n,a)}function u(a){return s(r,a)}function s(a,o){let l,c=0;const{length:d}=o;for(let f=0;f<d;f++){const p=o.charCodeAt(f);if(p<128&&!(a[p>>>5]>>>p&1))continue;l===void 0?l=o.substring(0,f):c!==f&&(l+=o.substring(c,f));let m=t.htmlTrie.get(p);if(typeof m=="object"){if(f+1<d){const A=o.charCodeAt(f+1),E=typeof m.next=="number"?m.next===A?m.nextValue:void 0:m.next.get(A);if(E!==void 0){l+=E,f++,c=f+1;continue}}m=m.value}if(m===void 0){const A=(0,e.getCodePoint)(o,f);l+=`&#x${A.toString(16)};`,A!==p&&f++,c=f+1}else l+=m,c=f+1}return l===void 0?o:(c<d&&(l+=o.substr(c)),l)}return Yi}var Zp;function NR(){return Zp||(Zp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeUTF8=e.escapeText=e.escapeAttribute=e.encodeXML=e.encodeNonAsciiHTML=e.encodeHTML5=e.encodeHTML4=e.encodeHTML=e.EntityDecoder=e.decodeXMLStrict=e.decodeXML=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML5=e.decodeHTML4=e.decodeHTML=e.DecodingMode=e.EncodingMode=e.EntityLevel=void 0,e.decode=s,e.decodeStrict=a,e.encode=o;const t=Yp(),n=jp(),r=Dc();var i;(function(f){f[f.XML=0]="XML",f[f.HTML=1]="HTML"})(i||(e.EntityLevel=i={}));var u;(function(f){f[f.UTF8=0]="UTF8",f[f.ASCII=1]="ASCII",f[f.Extensive=2]="Extensive",f[f.Attribute=3]="Attribute",f[f.Text=4]="Text"})(u||(e.EncodingMode=u={}));function s(f,p=i.XML){if((typeof p=="number"?p:p.level)===i.HTML){const A=typeof p=="object"?p.mode:void 0;return(0,t.decodeHTML)(f,A)}return(0,t.decodeXML)(f)}function a(f,p=i.XML){var m;const A=typeof p=="number"?{level:p}:p;return(m=A.mode)!==null&&m!==void 0||(A.mode=t.DecodingMode.Strict),s(f,A)}function o(f,p=i.XML){const{mode:m=u.Extensive,level:A=i.XML}=typeof p=="number"?{level:p}:p;switch(m){case u.UTF8:return(0,r.escapeUTF8)(f);case u.Attribute:return(0,r.escapeAttribute)(f);case u.Text:return(0,r.escapeText)(f);case u.ASCII:return A===i.HTML?(0,n.encodeNonAsciiHTML)(f):(0,r.encodeXML)(f);case u.Extensive:default:return A===i.HTML?(0,n.encodeHTML)(f):(0,r.encodeXML)(f)}}var l=Yp();Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return l.DecodingMode}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return l.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return l.EntityDecoder}});var c=jp();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return c.encodeNonAsciiHTML}});var d=Dc();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return d.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return d.escape}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return d.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return d.escapeText}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return d.escapeUTF8}})})(Tl)),Tl}var vs={},Xp;function DR(){return Xp||(Xp=1,vs.romanize=function(e){if(isNaN(e))return NaN;for(var t=String(+e).split(""),n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],r="",i=3;i--;)r=(n[+t.pop()+i*10]||"")+r;return Array(+t.join("")+1).join("M")+r},vs.alphanumeric=function(e){for(var t="",n;e>0;)n=(e-1)%26,t=String.fromCharCode(65+n)+t,e=(e-n)/26|0;return t||void 0}),vs}var wl,$p;function _R(){if($p)return wl;$p=1;const e=r=>{let i="";do i=(Math.random()+1).toString(36).substring(2);while(r.indexOf(i)!==-1);return i},t=(r,i)=>{let u=/([a-z\-]+)\s*\(\s*([^\(\)]*?)\s*(?:,\s*([^\(\)]*?)\s*)?\s*\)/i,s=[],a,o=e(i);for(;(a=u.exec(i))!==null;){let c=`${s.length}`;if(a[1].toLowerCase()=="var"){const f=n(r,a[2]);if(f){i=i.replace(a[0],f);continue}if(a[3]){i=i.replace(a[0],a[3]);continue}}let d=`${o}${c.padStart(5,"-")}`;i=i.replace(a[0],d),s.push({placeholder:d,replace:a[0]})}for(var l=s.length-1;l>=0;l--){const c=s[l];i=i.replace(c.placeholder,c.replace)}return i},n=(r,i)=>{for(;r;){if(r.styleProps&&i in r.styleProps)return r.styleProps[i].value;var r=r.pseudoElementParent||r.parent}};return wl={replaceVariables:t,findVariableValue:n},wl}var Il,em;function OR(){if(em)return Il;em=1;var{decode:e}=NR(),t=Ff(),n=DR(),r=_R();return Il=function(u){u.ignoredPseudos=["hover","active","focus","visited","link"],u.widthElements=["TABLE","TD","TH","IMG"],u.heightElements=["TABLE","TD","TH","IMG"],u.tableElements=["TABLE","TH","TR","TD","CAPTION","COLGROUP","COL","THEAD","TBODY","TFOOT"],u.nonVisualElements=["HEAD","TITLE","BASE","LINK","STYLE","META","SCRIPT","NOSCRIPT"],u.styleToAttribute={"background-color":"bgcolor","background-image":"background","text-align":"align","vertical-align":"valign"},u.excludedProperties=[],u.juiceDocument=p,u.inlineDocument=s;function s(g,N,w){w=w||{};var _=t.parseCSS(N),S=[],x="style",O={},z=w.removeInlinedSelectors?new Set:null;w.styleAttributeName&&(x=w.styleAttributeName);function R(W){var G=W[0],we=W[1],C=new t.Selector(G),le=C.parsed();if(le){for(var Oe=c(le),I=0;I<le.length;++I){var ut=le[I];if(ut.pseudos)for(var Kt=0;Kt<ut.pseudos.length;++Kt){var He=ut.pseudos[Kt];if(u.ignoredPseudos.indexOf(He.name)>=0)return}}if(Oe){var jt=le[le.length-1],Zt=jt.pseudos;jt.pseudos=f(jt.pseudos),G=le.toString(),jt.pseudos=Zt}var dn;try{dn=g(G)}catch{return}var fn=!1;dn.each(function(){var Ee=this;if(Ee.name&&u.nonVisualElements.indexOf(Ee.name.toUpperCase())>=0)return;if(fn=!0,Ee.counterProps||(Ee.counterProps=Ee.parent&&Ee.parent.counterProps?Object.create(Ee.parent.counterProps):{}),Oe){var Oi="pseudo"+Oe,hn=Ee[Oi];hn||(hn=Ee[Oi]=g("<span />").get(0),hn.pseudoElementType=Oe,hn.pseudoElementParent=Ee,hn.counterProps=Ee.counterProps,Ee[Oi]=hn),Ee=hn}if(!Ee.styleProps){if(Ee.styleProps={},g(Ee).attr(x)){var As=g(Ee).attr(x),gs=w.decodeStyleAttributes?e(As):As,bs="* { "+gs+" } ";Ri(t.parseCSS(bs)[0][1],new t.Selector("<style>",!0))}S.push(Ee)}function Es(Xe,pn){for(var Ue=pn.split(/\s+/),st=0;st<Ue.length;st++){var Le=Ue[st],At=parseInt(Ue[st+1],10);isNaN(At)?Xe.counterProps[Le]=O[Le]=0:Xe.counterProps[Le]=O[Ue[st++]]=At}}function no(Xe,pn){for(var Ue=pn.split(/\s+/),st=0;st<Ue.length;st++){var Le=Ue[st];if(Xe.counterProps[Le]!==void 0){var At=parseInt(Ue[st+1],10);isNaN(At)?Xe.counterProps[Le]=O[Le]+=1:Xe.counterProps[Le]=O[Ue[st++]]+=At}}}function Ri(Xe,pn){for(var Ue=0,st=Xe.length;Ue<st;Ue++)if(Xe[Ue].type=="property"){var Le=Xe[Ue].name,At=Xe[Ue].value;Le==="counter-reset"&&Es(Ee,At),Le==="counter-increment"&&no(Ee,At);var v=At.match(/!important$/)!==null;v&&!w.preserveImportant&&(At=a(At));var Q=[Xe[Ue].position.start.line,Xe[Ue].position.start.col],j=new t.Property(Le,At,pn,v?2:0,Q),te=Ee.styleProps[Le];if(u.excludedProperties.indexOf(Le)<0)if(w.inlineDuplicateProperties)if(te)if(te.selector===pn)j.nextProp=te,Ee.styleProps[Le]=j;else{for(var be=te;be.nextProp;)be=be.nextProp;be.nextProp=j}else Ee.styleProps[Le]=j;else(te&&te.compare(j)===j||!te)&&(te&&te.selector!==pn?delete Ee.styleProps[Le]:te&&(j.nextProp=te),Ee.styleProps[Le]=j)}}Ri(we,C)}),fn&&z&&z.add(W[0])}}function k(W){Object.keys(W.styleProps).length;var G=[];Object.keys(W.styleProps).forEach(function(C){for(var le=W.styleProps[C];typeof le<"u";)G.push(le),le=le.nextProp}),G.sort(function(C,le){return C.compareFunc(le)});var we=G.filter(function(C){return w.resolveCSSVariables&&C.prop.indexOf("--")===0?!1:C.prop!=="content"}).map(function(C){return w.resolveCSSVariables&&(C.value=r.replaceVariables(W,C.value)),C.prop+": "+C.value.replace(/["]/g,"'")+";"}).join(" ");we&&g(W).attr(x,we)}function B(W){if(W.pseudoElementType&&W.styleProps.content){var G=l(W);G.img?(W.name="img",g(W).attr("src",G.img)):g(W).text(G);var we=W.pseudoElementParent;W.pseudoElementType==="before"?g(we).prepend(W):g(we).append(W)}}function P(W,G){if(W.name){var we=W.name.toUpperCase();if(u[G+"Elements"].indexOf(we)>-1){for(var C in W.styleProps)if(W.styleProps[C].prop===G){var le=W.styleProps[C].value;if(w.preserveImportant&&(le=a(le)),le.match(/(px|auto)/)){var Oe=le.replace("px","");g(W).attr(G,Oe);return}if(u.tableElements.indexOf(we)>-1&&le.match(/\%/)){g(W).attr(G,le);return}}}}}function q(W){return W.indexOf("url(")!==0?W:W.replace(/^url\((["'])?([^"']+)\1\)$/,"$2")}function J(W){if(W.name){var G=W.name.toUpperCase(),we=Object.keys(u.styleToAttribute);if(u.tableElements.indexOf(G)>-1){for(var C in W.styleProps)if(we.indexOf(W.styleProps[C].prop)>-1){var le=u.styleToAttribute[W.styleProps[C].prop],Oe=W.styleProps[C].value;if(w.preserveImportant&&(Oe=a(Oe)),le==="background"&&(Oe=q(Oe)),/(linear|radial)-gradient\(/i.test(Oe))continue;g(W).attr(le,Oe)}}}}if(_.forEach(R),S.forEach(k),w.inlinePseudoElements&&S.forEach(B),w.applyWidthAttributes&&S.forEach(function(W){P(W,"width")}),w.applyHeightAttributes&&S.forEach(function(W){P(W,"height")}),w.applyAttributesTableElements&&S.forEach(J),w.insertPreservedExtraCss&&w.extraCss){var V=t.getPreservedText(w.extraCss,{mediaQueries:w.preserveMediaQueries,fontFaces:w.preserveFontFaces,keyFrames:w.preserveKeyFrames,preservedSelectors:w.preservedSelectors});if(V){var oe=null;w.insertPreservedExtraCss!==!0?oe=g(w.insertPreservedExtraCss):(oe=g("head"),oe.length||(oe=g("body")),oe.length||(oe=g.root())),oe.first().append("<style>"+V+"</style>")}}return z}function a(g){return g.replace(/\s*!important$/,"")}function o(g,N){switch(N){case"lower-roman":return n.romanize(g).toLowerCase();case"upper-roman":return n.romanize(g);case"lower-latin":case"lower-alpha":return n.alphanumeric(g).toLowerCase();case"upper-latin":case"upper-alpha":return n.alphanumeric(g);default:return g.toString()}}function l(g){var N=g.styleProps.content.value;if(N==="none"||N==="normal")return"";var w=N.match(/^\s*url\s*\(\s*(.*?)\s*\)\s*$/i);if(w){var _=w[1].replace(/^['"]|['"]$/g,"");return{img:_}}for(var S=[],x=N.split(/['"]/),O=0;O<x.length;O++)if(x[O]!==""){var z=x[O].match(/var\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(z){var R=r.findVariableValue(g,z[1])||z[2];S.push(R.replace(/^['"]|['"]$/g,""));continue}var k=x[O].match(/counter\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(k&&k[1]in g.counterProps){var B=g.counterProps[k[1]];S.push(o(B,k[3]));continue}var P=x[O].match(/attr\s*\(\s*(.*?)\s*\)/i);if(P){var q=P[1];S.push(g.pseudoElementParent?g.pseudoElementParent.attribs[q]:g.attribs[q]);continue}S.push(x[O])}return N=S.join(""),N=N.replace(/\\/g,""),N}function c(g){if(g.length!==0){var N=g[g.length-1].pseudos;if(N){for(var w=0;w<N.length;w++)if(d(N[w]))return N[w].name}}}function d(g){return g.name==="before"||g.name==="after"}function f(g){return g.filter(function(N){return!d(N)})}function p(g,N){N=t.getDefaultOptions(N);var w=new Set;N.removeInlinedSelectors&&!N.removeStyleTags&&g("style[data-embed]").each(function(){w.add(this)});var _=E(g,N);_+=`
923
+ `+N.extraCss;var S=s(g,_,N);return S&&!N.removeStyleTags&&m(g,S,N,w),g}function m(g,N,w,_){var S=g("style");S.each(function(){var x=this,O=x.childNodes;if(O.length===1&&!(_&&_.has(x))){var z=O[0].nodeValue,R=t.removeInlinedSelectorsFromCSS(z,N,w,u.ignoredPseudos);R&&R.trim()?x.childNodes[0].nodeValue=R:g(x).remove()}})}function A(g,N){var w=[],_=g("style"),S,x,O;return _.each(function(){if(O=this,S=O.childNodes,S.length!==1){N.removeStyleTags&&g(O).remove();return}if(x=S[0].data,N.applyStyleTags&&g(O).attr("data-embed")===void 0&&w.push(x),N.removeStyleTags&&g(O).attr("data-embed")===void 0){var z=O.childNodes[0].nodeValue,R=t.getPreservedText(z,{mediaQueries:N.preserveMediaQueries,fontFaces:N.preserveFontFaces,keyFrames:N.preserveKeyFrames,pseudos:N.preservePseudos,preservedSelectors:N.preservedSelectors},u.ignoredPseudos);R?O.childNodes[0].nodeValue=R:g(O).remove()}g(O).removeAttr("data-embed")}),w}function E(g,N){var w=A(g,N),_=w.join(`
924
+ `);return _}return u},Il}var Sl,tm;function RR(){if(tm)return Sl;tm=1;var e=xR(),t=OR(),n=t(function(i,u){return e(i,{xmlMode:u&&u.xmlMode},r,[u])}),r=function(i,u){return n.juiceDocument(i,u)};return n.inlineContent=function(i,u,s){return e(i,{xmlMode:s&&s.xmlMode},n.inlineDocument,[u,s])},n.codeBlocks=e.codeBlocks,Sl=n,Sl}var MR=RR();const BR=Pc(MR),vR=new Set(["section","p","blockquote","ul","ol","li","pre","code","span","strong","em","b","i","u","s","del","a","img","br","hr","table","thead","tbody","tr","th","td"]),LR=new Set(["script","style","iframe","object","embed","form","button","input","textarea","select","link","meta","svg","math","canvas","template","noscript","video","audio","source"]),PR=new Set(["font","font-family","font-size","font-weight","font-style","color","text-align","line-height","letter-spacing","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","background","background-image","background-color","border","border-top","border-right","border-bottom","border-left","border-top-color","border-top-style","border-top-width","border-right-color","border-right-style","border-right-width","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-color","border-width","border-style","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-collapse","padding","padding-top","padding-right","padding-bottom","padding-left","margin","margin-top","margin-right","margin-bottom","margin-left","width","min-width","max-width","height","max-height","display","vertical-align","list-style","list-style-type","list-style-position","white-space","white-space-collapse","text-wrap-mode","text-wrap-style","word-break","word-wrap","overflow-wrap","overflow","overflow-x","overflow-y","box-sizing","table-layout","text-size-adjust","-webkit-text-size-adjust"]),FR=new Set(["block","inline","inline-block","list-item","table","table-row","table-cell","table-row-group","table-header-group","none"]);function Ae(e,t){e.dataset.wechatNode=t}function ur(e,t){const n=e.ownerDocument.createElement(t);for(const r of Array.from(e.attributes))n.setAttribute(r.name,r.value);for(;e.firstChild;)n.appendChild(e.firstChild);return e.replaceWith(n),n}function HR(e){return/^(?:https?:)?\/\//i.test(e)}function UR(e,t){return Array.from(e.childNodes).every(n=>n===t?!0:n.nodeType===3&&!(n.nodeValue??"").trim())}const WR={kind:"image",selector:"img",finalizeSelector:"figure, figcaption",async prepare(e,t){Ae(e,"image");const n=e.getAttribute("src");n&&e.setAttribute("data-src",n);const r=e.parentElement,i=!!r&&r.tagName.toLowerCase()==="p"&&UR(r,e),u=r===t.root;if(!r||!i&&!u)return;const s=e.getAttribute("ratio"),a=s?Number(s):NaN,o=e.getAttribute("alt")??"",l=Number.isFinite(a)&&a>0?a:/^(?:0|[1-9]\d*)\.\d{2}$/.test(o)?Number(o):0;if(l>0&&Number.isFinite(l)){const f=new Image;let p=n??"";typeof window<"u"&&window.location&&window.location.origin&&window.location.origin.startsWith("http")&&p&&!/^(?:https?:|data:|blob:|\/\/)/i.test(p)&&p.startsWith("/")&&!p.startsWith("/local-file")&&(p=`/local-file?path=${encodeURIComponent(p)}`),f.src=p;try{if(await f.decode(),!f.naturalWidth)throw new Error("图片原始宽度为空");e.style.width=`${Math.min(l,1)*100}%`,e.style.maxWidth=`${f.naturalWidth*l}px`,e.style.height="auto"}catch(m){if(t.strictImageDecode??!0)throw new Error(`无法读取缩放图片的原始尺寸:${e.getAttribute("title")||"无图注"}`,{cause:m});e.style.width=`${Math.min(l,1)*100}%`,e.style.height="auto"}}const c=t.document.createElement("figure");Ae(c,"image-block"),i?r.replaceWith(c):e.replaceWith(c),c.appendChild(e);const d=(e.getAttribute("caption")||e.getAttribute("title")||"").trim();if(e.removeAttribute("title"),e.removeAttribute("caption"),d){const f=t.document.createElement("figcaption");Ae(f,"image-caption"),f.textContent=d,c.appendChild(f)}},finalize(e){const t=e.tagName.toLowerCase();t==="figure"&&ur(e,"section"),t==="figcaption"&&ur(e,"p")}},KR={kind:"code-block",selector:"pre",prepare(e,t){Ae(e,"code-block-body");const n=e.querySelector("code");n&&Ae(n,"code-block-code");const r=t.document.createElement("section");Ae(r,"code-block"),e.replaceWith(r);const i=e.getAttribute("data-language")?.trim();if(i){const u=t.document.createElement("p");Ae(u,"code-language"),u.textContent=i,r.appendChild(u)}r.appendChild(e)}},zR={kind:"inline-code",selector:"code:not(pre code)",prepare(e){Ae(e,"inline-code")},finalize(e){ur(e,"span")}},QR={kind:"heading",selector:"h1, h2, h3, h4, h5, h6",prepare(e,t){if(Ae(e,`heading-${e.tagName.slice(1)}`),e.tagName.toLowerCase()==="h2"&&t.structure){const n=t.document.createElement("span");for(Ae(n,"heading-text");e.firstChild;)n.appendChild(e.firstChild);if(e.appendChild(n),t.structure.numberedHeadings){const r=t.document.createElement("span");Ae(r,"heading-number"),r.textContent=String(Array.from(t.root.querySelectorAll("h2")).indexOf(e)+1).padStart(2,"0"),e.prepend(r)}if(t.structure.headingLabel){const r=t.document.createElement("span");Ae(r,"heading-label"),r.textContent=t.structure.headingLabel,e.prepend(r)}}},finalize(e){ur(e,"section")}},YR={kind:"paragraph",selector:"p",prepare(e){e.dataset.wechatNode||Ae(e,"paragraph")}},qR={kind:"emphasis",selector:"strong, b, em, i, s, del, u, mark",prepare(e){Ae(e,e.tagName.toLowerCase())},finalize(e){e.tagName.toLowerCase()==="mark"&&ur(e,"span")}},GR={kind:"blockquote",selector:"blockquote",prepare(e,t){if(Ae(e,"blockquote"),t.structure?.quoteLabel){const n=t.document.createElement("p");Ae(n,"quote-label"),n.textContent=t.structure.quoteLabel,e.prepend(n)}},finalize(e){ur(e,"section")}};function nm(e){const t=e.trim();if(!t)return"";try{const n=new URL(t);n.hash="",n.hostname=n.hostname.toLowerCase();let r=n.pathname;return r.length>1&&r.endsWith("/")&&(r=r.slice(0,-1)),n.pathname=r,n.toString()}catch{return t.replace(/\/+$/,"")||t}}function VR(e,t,n){const r=nm(e),i=n.find(s=>nm(s.url)===r);if(i)return i;const u={index:n.length+1,text:t.trim()||e,url:e};return n.push(u),u}const JR={kind:"link",selector:"a",prepare(e,t){const n=e.getAttribute("href")?.trim()??"";if(!HR(n)){Ae(e,"internal-link");return}const r=VR(n,e.textContent?.trim()||n,t.references);Ae(e,"external-link");const i=t.document.createElement("span");Ae(i,"link-marker"),i.textContent=`[${r.index}]`,e.after(i)},finalize(e){(e.dataset.wechatNode==="external-link"||e.getAttribute("href")?.startsWith("#"))&&ur(e,"span")}},jR={kind:"list",selector:"ul, ol, li",prepare(e,t){const n=e.tagName.toLowerCase();if(n==="ul"&&Ae(e,"bullet-list"),n==="ol"&&Ae(e,"ordered-list"),n!=="li")return;const r=e.getAttribute("data-item-type")==="task";if(Ae(e,r?"task-list-item":"list-item"),!r)return;const i=t.document.createElement("span");Ae(i,"task-marker"),i.textContent=e.getAttribute("data-checked")==="true"?"☑":"☐",(e.querySelector(":scope > p")??e).prepend(i)}},ZR={kind:"table",selector:"table, thead, tbody, tr, th, td",prepare(e){Ae(e,e.tagName.toLowerCase())}},XR={kind:"divider",selector:"hr",prepare(e){Ae(e,"divider")},finalize(e){ur(e,"section")}},$R={kind:"hard-break",selector:"br",prepare(e){Ae(e,"hard-break")}},eM={kind:"article",selector:".zzhub-wechat-article",prepare(e,t){if(t.references.length>0){const n=t.document.createElement("section");Ae(n,"references");const r=t.document.createElement("p");Ae(r,"references-title"),r.textContent="相关链接",n.appendChild(r);const i=t.document.createElement("ol");Ae(i,"references-list");for(const u of t.references){const s=t.document.createElement("li");Ae(s,"reference-item"),s.textContent=`[${u.index}] ${u.text}: ${u.url}`,i.appendChild(s)}n.appendChild(i),t.root.appendChild(n)}if(t.theme.footerText){const n=t.document.createElement("section");Ae(n,"footer");const r=t.document.createElement("p");Ae(r,"footer-text"),r.textContent=t.theme.footerText,n.appendChild(r),t.root.appendChild(n)}}},tM=[WR,KR,zR,QR,YR,qR,GR,JR,jR,ZR,XR,$R,eM];function nM(e={}){const t=tM.map(r=>e[r.kind]??r),n=e.extraRenderers??[];return[...t,...n]}async function rm(e,t,n){for(const r of t){const i=r[e];if(!i)continue;const u=e==="finalize"?r.finalizeSelector??r.selector:r.selector,s=[];n.root.matches(u)&&s.push(n.root),s.push(...Array.from(n.root.querySelectorAll(u)));for(const a of s)(a.isConnected||a===n.root)&&await i(a,n)}}function rM(e,t){return[Object.entries(e).filter(([r])=>/^--[a-z0-9-_]+$/i.test(r)).map(([r,i])=>`${r}: ${i};`).join(`
921
925
  `),`--wx-font-family: ${t.fontFamily};`,`--wx-body-color: ${t.bodyColor};`,`--wx-muted-color: ${t.mutedColor};`,`--wx-h2-color: ${t.h2Color};`,`--wx-h3-color: ${t.h3Color};`,`--wx-brand-ink: ${t.primaryColor};`,`--wx-brand-accent: ${e["--brand"]??"#ca6093"};`,`--wx-divider-color: ${t.dividerColor};`,`--wx-blockquote-border: ${t.blockquoteBorderColor};`,`--wx-body-line-height: ${t.bodyLineHeight};`,`--wx-body-letter-spacing: ${t.bodyLetterSpacing};`,`--wx-soft-surface: ${e["--bg-warm"]??"#faf8f9"};`].filter(Boolean).join(`
922
- `)}function aR(e,t){return`
926
+ `)}function iM(e,t){return`
923
927
  .milkdown .editor {
924
- ${sR(e,t)}
928
+ ${rM(e,t)}
925
929
  ${t.containerStyle};
926
930
  ${t.bodyFontSize?`font-size: ${t.bodyFontSize};`:""}
927
931
  }
@@ -931,6 +935,24 @@ var Pf=e=>{throw TypeError(e)};var Ff=(e,t,n)=>t.has(e)||Pf("Cannot "+n);var le=
931
935
  .milkdown .editor p {
932
936
  ${t.bodyFontSize?`font-size: ${t.bodyFontSize};`:""}
933
937
  ${t.bodyParagraphSpacing?`margin-bottom: ${t.bodyParagraphSpacing};`:""}
938
+ ${t.bodyLineHeight?`line-height: ${t.bodyLineHeight};`:""}
939
+ ${t.bodyLetterSpacing?`letter-spacing: ${t.bodyLetterSpacing};`:""}
940
+ ${t.bodyColor?`color: ${t.bodyColor};`:""}
941
+ }
942
+ `}function uM(e){return!e?.numberedHeadings&&!e?.headingLabel&&!e?.quoteLabel?"":`
943
+ .milkdown .editor [data-wechat-node="heading-number"],
944
+ .milkdown .editor [data-wechat-node="heading-label"] {
945
+ margin-right: 0.3em;
946
+ opacity: 0.7;
947
+ font-weight: 600;
948
+ }
949
+ .milkdown .editor [data-wechat-node="quote-label"] {
950
+ margin: 0 0 6px;
951
+ font-size: 11px;
952
+ font-weight: 600;
953
+ letter-spacing: 0.05em;
954
+ color: var(--wx-brand-ink, var(--wx-brand-accent, #ca6093));
955
+ text-transform: uppercase;
934
956
  }
935
- `}function Jp(e){return new DOMParser().parseFromString(`<!doctype html><html><body>${e}</body></html>`,"text/html")}function oR(e){const t=[];for(let n=0;n<e.style.length;n+=1){const r=e.style.item(n);r&&t.push(r)}for(const n of t){const r=e.style.getPropertyValue(n).trim(),i=/(?:url\s*\(|expression\s*\(|javascript:|var\s*\()/i.test(r),u=n==="display"&&!WO.has(r.toLowerCase());(!UO.has(n)||i||u)&&e.style.removeProperty(n)}e.style.cssText.trim()||e.removeAttribute("style")}function lR(e){const t=e.tagName.toLowerCase();return t==="img"?new Set(["style","src","data-src","alt","width","height"]):t==="a"?new Set(["style","href","title"]):t==="ol"?new Set(["style","start"]):t==="th"||t==="td"?new Set(["style","colspan","rowspan","align"]):new Set(["style"])}function jp(e,t){const n=e.getAttribute(t)?.trim()??"";if(!n){e.removeAttribute(t);return}if(/^(?:javascript|vbscript):/i.test(n)){e.removeAttribute(t);return}/^data:/i.test(n)&&!/^data:image\/(?:avif|gif|jpe?g|png|webp);base64,/i.test(n)&&e.removeAttribute(t)}function cR(e){const t=[e,...Array.from(e.querySelectorAll("*"))].reverse();for(const n of t){const r=n.tagName.toLowerCase();if(HO.has(r)){n!==e&&n.remove();continue}if(!FO.has(r)){n!==e&&n.replaceWith(...Array.from(n.childNodes));continue}const i=lR(n);for(const u of Array.from(n.attributes))i.has(u.name)||n.removeAttribute(u.name);if(r==="a"){const u=n.getAttribute("href")??"";/^(?:#|https?:\/\/|mailto:|tel:)/i.test(u)||n.removeAttribute("href")}r==="img"&&(jp(n,"src"),jp(n,"data-src")),oR(n)}}async function CR(e){const t=Jp(""),n=t.createElement("section");n.className="milkdown";const r=t.createElement("section");if(r.className="editor zzhub-wechat-article",r.lang="zh-CN",ge(r,"article"),r.innerHTML=e.semanticHtml,e.structure?.headerImageUrl){const p=t.createElement("p"),m=t.createElement("img");m.src=e.structure.headerImageUrl,m.alt="",p.appendChild(m),r.prepend(p)}n.appendChild(r),t.body.appendChild(n);const i=[],u=qS(),s=VS(),a={...e.renderers,extraRenderers:[...e.renderers?.extraRenderers??[],...u]},o=uR(a);await Vp("prepare",o,{document:t,root:r,theme:e.theme,references:i,structure:e.structure});const l=[e.baseCss,aR(e.editorVars??{},e.theme),s,e.customCss??""].filter(Boolean).join(`
936
- `),c=PO.inlineContent(n.outerHTML,l,{applyAttributesTableElements:!1,applyHeightAttributes:!1,applyStyleTags:!1,applyWidthAttributes:!1,inlinePseudoElements:!1,preserveFontFaces:!1,preserveImportant:!1,preserveKeyFrames:!1,preserveMediaQueries:!1,preservePseudos:!1,removeStyleTags:!0,resolveCSSVariables:!0,decodeStyleAttributes:!0}),d=Jp(c),f=d.querySelector(".zzhub-wechat-article");if(!f)throw new Error("Wechat article root missing after CSS inlining");return await Vp("finalize",o,{document:d,root:f,theme:e.theme,references:i,structure:e.structure}),cR(f),f.outerHTML}export{hR as E,bR as a,pR as b,mR as c,Ro as d,CR as e,gR as f,AR as g,Ho as r};
957
+ `}function im(e){return new DOMParser().parseFromString(`<!doctype html><html><body>${e}</body></html>`,"text/html")}const sM=["top","right","bottom","left"];function aM(e){const t=e.style,n=sM.map(s=>({side:s,width:t.getPropertyValue(`border-${s}-width`),style:t.getPropertyValue(`border-${s}-style`),color:t.getPropertyValue(`border-${s}-color`)})),r=s=>s.style==="none"||s.style==="hidden",i=!!t.getPropertyValue("border-style")||!!t.getPropertyValue("border-width")||!!t.getPropertyValue("border-color");if(!i&&!n.some(r))return;if(!i){for(const{side:s,style:a}of n)a!=="none"&&a!=="hidden"||(t.removeProperty(`border-${s}`),t.removeProperty(`border-${s}-width`),t.removeProperty(`border-${s}-style`),t.removeProperty(`border-${s}-color`));return}const u=["border","border-width","border-style","border-color"];for(const{side:s}of n)u.push(`border-${s}`,`border-${s}-width`,`border-${s}-style`,`border-${s}-color`);for(const s of u)t.removeProperty(s);for(const s of n)!s.style||r(s)||(s.width&&s.color?t.setProperty(`border-${s.side}`,`${s.width} ${s.style} ${s.color}`):(s.width&&t.setProperty(`border-${s.side}-width`,s.width),t.setProperty(`border-${s.side}-style`,s.style),s.color&&t.setProperty(`border-${s.side}-color`,s.color)))}function oM(e){const t=[];for(let n=0;n<e.style.length;n+=1){const r=e.style.item(n);r&&t.push(r)}for(const n of t){const r=e.style.getPropertyValue(n).trim(),i=/(?:url\s*\(|expression\s*\(|javascript:|var\s*\()/i.test(r),u=n==="display"&&!FR.has(r.toLowerCase());(!PR.has(n)||i||u)&&e.style.removeProperty(n)}e.style.cssText.trim()||e.removeAttribute("style")}function lM(e){const t=e.tagName.toLowerCase();return t==="img"?new Set(["style","src","data-src","alt","width","height"]):t==="a"?new Set(["style","href","title"]):t==="ol"?new Set(["style","start"]):t==="th"||t==="td"?new Set(["style","colspan","rowspan","align"]):new Set(["style"])}function um(e,t){const n=e.getAttribute(t)?.trim()??"";if(!n){e.removeAttribute(t);return}if(/^(?:javascript|vbscript):/i.test(n)){e.removeAttribute(t);return}/^data:/i.test(n)&&!/^data:image\/(?:avif|gif|jpe?g|png|webp);base64,/i.test(n)&&e.removeAttribute(t)}function cM(e){const t=[e,...Array.from(e.querySelectorAll("*"))].reverse();for(const n of t){const r=n.tagName.toLowerCase();if(LR.has(r)){n!==e&&n.remove();continue}if(!vR.has(r)){n!==e&&n.replaceWith(...Array.from(n.childNodes));continue}const i=lM(n);for(const u of Array.from(n.attributes))i.has(u.name)||n.removeAttribute(u.name);if(r==="a"){const u=n.getAttribute("href")??"";/^(?:#|https?:\/\/|mailto:|tel:)/i.test(u)||n.removeAttribute("href")}r==="img"&&(um(n,"src"),um(n,"data-src")),oM(n),aM(n)}}async function MM(e){const t=im(""),n=t.createElement("section");n.className="milkdown";const r=t.createElement("section");if(r.className="editor zzhub-wechat-article",r.lang="zh-CN",Ae(r,"article"),r.innerHTML=e.semanticHtml,e.structure?.headerImageUrl){const p=t.createElement("p"),m=t.createElement("img");m.src=e.structure.headerImageUrl,m.alt="",p.appendChild(m),r.prepend(p)}n.appendChild(r),t.body.appendChild(n);const i=[],u=Q4(),s=Y4(),a={...e.renderers,extraRenderers:[...e.renderers?.extraRenderers??[],...u]},o=nM(a);await rm("prepare",o,{document:t,root:r,theme:e.theme,references:i,structure:e.structure,strictImageDecode:e.strictImageDecode??!0});const l=[e.baseCss,iM(e.editorVars??{},e.theme),uM(e.structure),s,e.customCss??""].filter(Boolean).join(`
958
+ `),c=BR.inlineContent(n.outerHTML,l,{applyAttributesTableElements:!1,applyHeightAttributes:!1,applyStyleTags:!1,applyWidthAttributes:!1,inlinePseudoElements:!1,preserveFontFaces:!1,preserveImportant:!1,preserveKeyFrames:!1,preserveMediaQueries:!1,preservePseudos:!1,removeStyleTags:!0,resolveCSSVariables:!0,decodeStyleAttributes:!0}),d=im(c),f=d.querySelector(".zzhub-wechat-article");if(!f)throw new Error("Wechat article root missing after CSS inlining");return await rm("finalize",o,{document:d,root:f,theme:e.theme,references:i,structure:e.structure,strictImageDecode:e.strictImageDecode??!0}),cM(f),f.outerHTML}export{Mn as $,vA as A,Ti as B,lw as C,_e as D,kM as E,H as F,rs as G,TC as H,L1 as I,se as J,ge as K,xi as L,ua as M,ie as N,mM as O,pt as P,jy as Q,Pe as R,Y as S,ae as T,pe as U,X as V,ii as W,Sw as X,vn as Y,Dn as Z,Ne as _,DM as a,hd as a$,us as a0,Hg as a1,Pg as a2,Fg as a3,Lg as a4,qg as a5,Wg as a6,zg as a7,Kg as a8,Yg as a9,ei as aA,BT as aB,ck as aC,m0 as aD,Kw as aE,zw as aF,Kr as aG,ns as aH,Qw as aI,is as aJ,Yw as aK,wi as aL,Ii as aM,Rg as aN,qw as aO,ld as aP,Uw as aQ,ts as aR,cd as aS,sd as aT,ki as aU,ad as aV,nf as aW,ss as aX,rf as aY,fd as aZ,Vn as a_,Qg as aa,qt as ab,Qo as ac,zs as ad,yM as ae,Hc as af,EM as ag,Ot as ah,fw as ai,Dt as aj,he as ak,ri as al,Ks as am,Fr as an,Ko as ao,L2 as ap,CM as aq,wM as ar,hM as as,xt as at,gM as au,w1 as av,nk as aw,fM as ax,an as ay,yA as az,xM as b,Ww as b0,iM as b1,Y4 as b2,IM as c,Fo as d,MM as e,NM as f,SM as g,ir as h,Gt as i,_t as j,uk as k,ue as l,Ce as m,Ze as n,ar as o,Ws as p,bM as q,Yo as r,sa as s,Nn as t,AM as u,$C as v,TM as w,Rt as x,ve as y,on as z};