orc-ai 0.1.49 → 0.1.51

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 (262) hide show
  1. package/dist/index.js +519 -485
  2. package/dist/skills/orc-platform/SKILL.md +3 -1
  3. package/dist/skills/orc-platform/references/execution.md +3 -0
  4. package/dist/skills/orc-platform/references/scratchpads.md +140 -0
  5. package/dist/skills/orc-platform/references/web.md +112 -0
  6. package/dist/skills/orc-sdlc/references/planning.md +2 -0
  7. package/dist/web/assets/{Agents-C8dJX8px.js → Agents-Cuq9hQL1.js} +1 -1
  8. package/dist/web/assets/Assistant-Bold-gm-uSS1B.woff2 +0 -0
  9. package/dist/web/assets/Assistant-Medium-DrcxCXg3.woff2 +0 -0
  10. package/dist/web/assets/Assistant-Regular-DVxZuzxb.woff2 +0 -0
  11. package/dist/web/assets/Assistant-SemiBold-SCI4bEL9.woff2 +0 -0
  12. package/dist/web/assets/{Attention-BHYo8Lwr.js → Attention-Blme1iNv.js} +1 -1
  13. package/dist/web/assets/{Audit-CS_DZkbJ.js → Audit-CcdL6u56.js} +1 -1
  14. package/dist/web/assets/{ConfirmDialog-CrSa87VF.js → ConfirmDialog-UlZrlBrT.js} +1 -1
  15. package/dist/web/assets/Dashboard-u3v-obdz.js +1 -0
  16. package/dist/web/assets/{DocumentWorkspace-CNyVQTjg.js → DocumentWorkspace-B5QQ9h1l.js} +1 -1
  17. package/dist/web/assets/{EmptyState-Ctm7L70B.js → EmptyState-CLMWpYxU.js} +1 -1
  18. package/dist/web/assets/{ErrorState-BPTepwiG.js → ErrorState-_BM228mQ.js} +1 -1
  19. package/dist/web/assets/{FileEditor-Dh29_xCL.js → FileEditor-CGTsskO5.js} +1 -1
  20. package/dist/web/assets/{JobWebhooks-TvAY8p1V.js → JobWebhooks-CeHYIwjS.js} +1 -1
  21. package/dist/web/assets/{Jobs-C5ggSs2T.js → Jobs-B_HefXhI.js} +3 -3
  22. package/dist/web/assets/Knowledge-DtqZHvq9.js +28 -0
  23. package/dist/web/assets/{PackageCatalog-B1U3vfhW.js → PackageCatalog-C4JkAh_e.js} +5 -5
  24. package/dist/web/assets/{Pager-ClYYU9et.js → Pager-C4QwTsW7.js} +1 -1
  25. package/dist/web/assets/{PriorityBadge-BW-A50LE.js → PriorityBadge-q0hZXCLg.js} +1 -1
  26. package/dist/web/assets/Projects-Bqohd0oU.js +3 -0
  27. package/dist/web/assets/ResumeActions-Bihtv9n8.js +1 -0
  28. package/dist/web/assets/{Rules-DGKsAbTf.js → Rules-DbI3E-1N.js} +1 -1
  29. package/dist/web/assets/Scratchpads-CvYHDI3j.js +20 -0
  30. package/dist/web/assets/Sessions-mS5ivBxN.js +5 -0
  31. package/dist/web/assets/{Settings-yW1S2q4F.js → Settings-BcP04VXz.js} +6 -6
  32. package/dist/web/assets/{Skills-BwdXE5nT.js → Skills-Cs1JTSlV.js} +3 -3
  33. package/dist/web/assets/{SourceEditor-ft02z20v.js → SourceEditor-B66_SPOa.js} +1 -1
  34. package/dist/web/assets/{StatusBadge-C5G1fdZh.js → StatusBadge-BxSWnu8L.js} +1 -1
  35. package/dist/web/assets/TagInput-B3BLlodf.js +1 -0
  36. package/dist/web/assets/{TaskDetailSheet-fUSHPFB-.js → TaskDetailSheet-BnMsuYO6.js} +2 -2
  37. package/dist/web/assets/{Tasks-uRqvmLz7.js → Tasks-CZnulyFF.js} +5 -5
  38. package/dist/web/assets/{Terminals-W5nszLI1.js → Terminals-J-qPx71R.js} +5 -5
  39. package/dist/web/assets/{ViewHeader-DXR0ZaMO.js → ViewHeader-CG7vOMnJ.js} +1 -1
  40. package/dist/web/assets/{Webhooks-lXLoKWdt.js → Webhooks-DPpjIwP_.js} +1 -1
  41. package/dist/web/assets/abnfDiagram-VCTEODGH-qnCZr3qh.js +1 -0
  42. package/dist/web/assets/ar-SA-G6X2FPQ2-BNl3syL3.js +10 -0
  43. package/dist/web/assets/arc-DuthDAsq.js +1 -0
  44. package/dist/web/assets/architectureDiagram-5GKGNRK7-CuzhWFIn.js +36 -0
  45. package/dist/web/assets/arrow-left-DNp3aOhW.js +6 -0
  46. package/dist/web/assets/az-AZ-76LH7QW2-CSlBN4kF.js +1 -0
  47. package/dist/web/assets/bg-BG-XCXSNQG7-Dcs1AElN.js +5 -0
  48. package/dist/web/assets/{blockDiagram-I7D4REHJ-DMrufypV.js → blockDiagram-I7D4REHJ-CCIO0eI-.js} +3 -3
  49. package/dist/web/assets/bn-BD-2XOGV67Q-D9poNjDl.js +5 -0
  50. package/dist/web/assets/{c4Diagram-7LVT6UL2-BUUxjwvU.js → c4Diagram-7LVT6UL2-EDh4_U6t.js} +2 -2
  51. package/dist/web/assets/ca-ES-6MX7JW3Y-pTbaXdVe.js +8 -0
  52. package/dist/web/assets/channel-D-jHqOEf.js +1 -0
  53. package/dist/web/assets/chunk-2Q5K7J3B-Ccr7lFKH.js +1 -0
  54. package/dist/web/assets/{chunk-5VM5RSS4-B6lAVcgQ.js → chunk-5VM5RSS4-rFn8SpPH.js} +1 -1
  55. package/dist/web/assets/chunk-F27PBJKO-CDJpfkoq.js +1 -0
  56. package/dist/web/assets/{chunk-IMKFNOWR-CwyogA-y.js → chunk-IMKFNOWR-B3_FhSA0.js} +1 -1
  57. package/dist/web/assets/chunk-JWPE2WC7-sBjgi4vj.js +1 -0
  58. package/dist/web/assets/chunk-POPQ4Y6H-Dsox2izf.js +1 -0
  59. package/dist/web/assets/{chunk-SVP7TREG-CmiQdvOH.js → chunk-SVP7TREG-CzwNtBeO.js} +4 -4
  60. package/dist/web/assets/{chunk-TICWLB2K-CieIpfOy.js → chunk-TICWLB2K-C2vbibcd.js} +1 -1
  61. package/dist/web/assets/chunk-XXDRQBXY-V09kgMMs.js +1 -0
  62. package/dist/web/assets/classDiagram-ZZMXUADV-yk_1OWub.js +1 -0
  63. package/dist/web/assets/classDiagram-v2-VYDZK3BY-yk_1OWub.js +1 -0
  64. package/dist/web/assets/copy-DG3MHKpv.js +6 -0
  65. package/dist/web/assets/cose-bilkent-JH36ORCC-CJbRd_jc.js +1 -0
  66. package/dist/web/assets/cs-CZ-2BRQDIVT-DCTwXFkX.js +11 -0
  67. package/dist/web/assets/{cynefin-OW5HDTMX-vMXgcpgg.js → cynefin-OW5HDTMX-DQAC3glv.js} +1 -1
  68. package/dist/web/assets/cynefinDiagram-5FMLGOSQ-BzboBb_e.js +62 -0
  69. package/dist/web/assets/da-DK-5WZEPLOC-BAYPDSds.js +5 -0
  70. package/dist/web/assets/{dagre-GXQ25YYZ-xmoviGlr.js → dagre-GXQ25YYZ-C_-0NO8H.js} +2 -2
  71. package/dist/web/assets/de-DE-XR44H4JA-WTQ3THgd.js +8 -0
  72. package/dist/web/assets/{diagram-S7CK7UJ4-CguQzzXs.js → diagram-S7CK7UJ4-Dvi9imfs.js} +5 -5
  73. package/dist/web/assets/diagram-UQ7AKVKN-BoEKhuYx.js +41 -0
  74. package/dist/web/assets/{diagram-VSXAHHWV-cuhv3Fvj.js → diagram-VSXAHHWV-AoIN6taJ.js} +3 -3
  75. package/dist/web/assets/diagram-VX7I27RA-BIAMQMgb.js +24 -0
  76. package/dist/web/assets/diagram-Z3DM3KII-MXPt1bWW.js +24 -0
  77. package/dist/web/assets/directory-open-01563666-DWU9wJ6I.js +1 -0
  78. package/dist/web/assets/directory-open-4ed118d0-CunoC1EB.js +1 -0
  79. package/dist/web/assets/{download-UgMvjBjR.js → download-PQ08tuAg.js} +1 -1
  80. package/dist/web/assets/ebnfDiagram-PWID7BFC-BPO0ZRsN.js +1 -0
  81. package/dist/web/assets/el-GR-BZB4AONW-C6V4uhoK.js +10 -0
  82. package/dist/web/assets/erDiagram-RLTQ6QDP-BR2u7bIU.js +99 -0
  83. package/dist/web/assets/es-ES-U4NZUMDT-D_kwVnQr.js +9 -0
  84. package/dist/web/assets/eu-ES-A7QVB2H4-Eeu5vgta.js +11 -0
  85. package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-Bold.woff2 +0 -0
  86. package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-Medium.woff2 +0 -0
  87. package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-Regular.woff2 +0 -0
  88. package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-SemiBold.woff2 +0 -0
  89. package/dist/web/assets/excalidraw/fonts/Cascadia/CascadiaCode-Regular.woff2 +0 -0
  90. package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-279a7b317d12eb88de06167bd672b4b4.woff2 +0 -0
  91. package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-6e066e8de2ac57ea9283adb9c24d7f0c.woff2 +0 -0
  92. package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-dc6a8806fa96795d7b3be5026f989a17.woff2 +0 -0
  93. package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-fcb0fc02dcbee4c9846b3e2508668039.woff2 +0 -0
  94. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-349fac6ca4700ffec595a7150a0d1e1d.woff2 +0 -0
  95. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-3f2c5db56cc93c5a6873b1361d730c16.woff2 +0 -0
  96. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-41b173a47b57366892116a575a43e2b6.woff2 +0 -0
  97. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-623ccf21b21ef6b3a0d87738f77eb071.woff2 +0 -0
  98. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-a88b72a24fb54c9f94e3b5fdaa7481c9.woff2 +0 -0
  99. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-b9dcf9d2e50a1eaf42fc664b50a3fd0d.woff2 +0 -0
  100. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-be310b9bcd4f1a43f571c46df7809174.woff2 +0 -0
  101. package/dist/web/assets/excalidraw/fonts/Liberation/LiberationSans-Regular.woff2 +0 -0
  102. package/dist/web/assets/excalidraw/fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2 +0 -0
  103. package/dist/web/assets/excalidraw/fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2 +0 -0
  104. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2 +0 -0
  105. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2 +0 -0
  106. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTk3j6zbXWjgevT5.woff2 +0 -0
  107. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTo3j6zbXWjgevT5.woff2 +0 -0
  108. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTs3j6zbXWjgevT5.woff2 +0 -0
  109. package/dist/web/assets/excalidraw/fonts/Virgil/Virgil-Regular.woff2 +0 -0
  110. package/dist/web/assets/fa-IR-HGAKTJCU-CKd62s_f.js +8 -0
  111. package/dist/web/assets/fi-FI-Z5N7JZ37-CXq3Xbio.js +6 -0
  112. package/dist/web/assets/file-open-002ab408-DIuFHtCF.js +1 -0
  113. package/dist/web/assets/file-open-7c801643-684qeFg4.js +1 -0
  114. package/dist/web/assets/file-save-3189631c-C1wFhQhH.js +1 -0
  115. package/dist/web/assets/file-save-745eba88-Bb9F9Kg7.js +1 -0
  116. package/dist/web/assets/{flowDiagram-HODETNUW-DueO0Ju6.js → flowDiagram-HODETNUW-DtCUIQgA.js} +5 -5
  117. package/dist/web/assets/folder-open-D0jNv68L.js +11 -0
  118. package/dist/web/assets/fr-FR-RHASNOE6-BUQsSuUv.js +9 -0
  119. package/dist/web/assets/ganttDiagram-EL5Y4UJY-DtAyQ0Yy.js +292 -0
  120. package/dist/web/assets/gitGraphDiagram-WWUBYQGX-CoXp0Ypy.js +106 -0
  121. package/dist/web/assets/gl-ES-HMX3MZ6V-DW4qfI2b.js +10 -0
  122. package/dist/web/assets/he-IL-6SHJWFNN-DaY9mSnj.js +10 -0
  123. package/dist/web/assets/hi-IN-IWLTKZ5I-D2lbPu3U.js +4 -0
  124. package/dist/web/assets/highlighted-body-KPVGNVTW-BmPHGwPQ.js +1 -0
  125. package/dist/web/assets/hu-HU-A5ZG7DT2-Bos6dFhw.js +7 -0
  126. package/dist/web/assets/id-ID-SAP4L64H-cWyYCXM5.js +10 -0
  127. package/dist/web/assets/image-blob-reduce.esm-D6s-rqMO.js +7 -0
  128. package/dist/web/assets/index-CY60J5zm.css +1 -0
  129. package/dist/web/assets/{index-C_jtMgr7.js → index-CYCjrqhG.js} +124 -114
  130. package/dist/web/assets/index-CcfSzlv5.js +19 -0
  131. package/dist/web/assets/infoDiagram-27XIBGKW-C2Ypr-zs.js +2 -0
  132. package/dist/web/assets/{ishikawaDiagram-5VMMS53U-ccIPCUs4.js → ishikawaDiagram-5VMMS53U-Bx7qtMkV.js} +5 -5
  133. package/dist/web/assets/it-IT-JPQ66NNP-CRGQFEpH.js +11 -0
  134. package/dist/web/assets/ja-JP-DBVTYXUO-BXcfLN6y.js +8 -0
  135. package/dist/web/assets/{journeyDiagram-3NMN7TZE-rRe3uTLu.js → journeyDiagram-3NMN7TZE-rsuiVeG_.js} +2 -2
  136. package/dist/web/assets/kaa-6HZHGXH3-Bk6N-pLt.js +1 -0
  137. package/dist/web/assets/kab-KAB-ZGHBKWFO-Ctb8wAYx.js +8 -0
  138. package/dist/web/assets/{kanban-definition-UXKFOSKX-tAKCWntJ.js → kanban-definition-UXKFOSKX-5ktYMmTY.js} +6 -6
  139. package/dist/web/assets/kk-KZ-P5N5QNE5-CzQX2BL1.js +1 -0
  140. package/dist/web/assets/km-KH-HSX4SM5Z-DnDRwAqY.js +11 -0
  141. package/dist/web/assets/ko-KR-MTYHY66A-C6HKdiKS.js +9 -0
  142. package/dist/web/assets/ku-TR-6OUDTVRD-evaKSJwY.js +9 -0
  143. package/dist/web/assets/layout-DSZI9hxI.js +1 -0
  144. package/dist/web/assets/linear-omhrmwGQ.js +1 -0
  145. package/dist/web/assets/{list-BL4eRkIg.js → list-UGkABbTC.js} +1 -1
  146. package/dist/web/assets/live-sessions-C19eXx17.js +6 -0
  147. package/dist/web/assets/lt-LT-XHIRWOB4-BS7h6VOT.js +3 -0
  148. package/dist/web/assets/lv-LV-5QDEKY6T-CvKj-LUX.js +7 -0
  149. package/dist/web/assets/mermaid-HWGCJPDP-B_H4rk_s.js +299 -0
  150. package/dist/web/assets/mermaid.core-Bs68JjJM.js +312 -0
  151. package/dist/web/assets/{mindmap-definition-YA3MSWOX-Cj5-j6a7.js → mindmap-definition-YA3MSWOX-DKG9LDwL.js} +4 -4
  152. package/dist/web/assets/mr-IN-CRQNXWMA-C_9ZWEOY.js +13 -0
  153. package/dist/web/assets/my-MM-5M5IBNSE-Bic5Rd4I.js +1 -0
  154. package/dist/web/assets/nb-NO-T6EIAALU-BN5D6e6X.js +10 -0
  155. package/dist/web/assets/nl-NL-IS3SIHDZ-CLmoJxpw.js +8 -0
  156. package/dist/web/assets/nn-NO-6E72VCQL-DH3pWtEG.js +8 -0
  157. package/dist/web/assets/oc-FR-POXYY2M6-DzJwOBaL.js +8 -0
  158. package/dist/web/assets/pa-IN-N4M65BXN-CxFRfqt4.js +4 -0
  159. package/dist/web/assets/pegDiagram-XKGWAZYB-D_-uCYBR.js +1 -0
  160. package/dist/web/assets/{pencil-gxvh59uO.js → pencil-_hID3D0m.js} +1 -1
  161. package/dist/web/assets/percentages-BXMCSKIN-DGBKIvAv.css +1 -0
  162. package/dist/web/assets/percentages-BXMCSKIN-DtfDKj6k.js +180 -0
  163. package/dist/web/assets/pica-sWD7KYN4.js +7 -0
  164. package/dist/web/assets/pieDiagram-E7YTZNPT-Cxcz8v2V.js +39 -0
  165. package/dist/web/assets/pl-PL-T2D74RX3-DFEd2a_2.js +9 -0
  166. package/dist/web/assets/pt-BR-5N22H2LF-d_zvXQ30.js +9 -0
  167. package/dist/web/assets/pt-PT-UZXXM6DQ-5FeuC95-.js +9 -0
  168. package/dist/web/assets/{quadrantDiagram-AXDQQJYC-DKTP6jS5.js → quadrantDiagram-AXDQQJYC-5W1D624h.js} +1 -1
  169. package/dist/web/assets/railroadDiagram-O6MQD6OU-BZhsOHVF.js +1 -0
  170. package/dist/web/assets/{requirementDiagram-BXWQKSXE-B9hH69zu.js → requirementDiagram-BXWQKSXE-BXlonflD.js} +2 -2
  171. package/dist/web/assets/ro-RO-JPDTUUEW-CAJt20_T.js +11 -0
  172. package/dist/web/assets/roundRect-0PYZxl1G.js +1 -0
  173. package/dist/web/assets/ru-RU-B4JR7IUQ-BL-2B7Np.js +9 -0
  174. package/dist/web/assets/sankeyDiagram-P5KCCOFB-BZVh-M1g.js +40 -0
  175. package/dist/web/assets/{save-CYoz3QKB.js → save-C0v-3p0L.js} +1 -1
  176. package/dist/web/assets/save-file-B_ZN6-id.js +1 -0
  177. package/dist/web/assets/scratchpad-routes-DvtErr_v.js +11 -0
  178. package/dist/web/assets/scroll-area-Bgn8q6dm.js +1 -0
  179. package/dist/web/assets/{sequenceDiagram-WJ2MYXX4-BF77J63J.js → sequenceDiagram-WJ2MYXX4-B2WHT4e0.js} +2 -2
  180. package/dist/web/assets/si-LK-N5RQ5JYF-BwL9NXm1.js +1 -0
  181. package/dist/web/assets/sizeCapture-INFHLROL-BI8hpcc0.js +1 -0
  182. package/dist/web/assets/sk-SK-C5VTKIMK-DEJmCOdH.js +6 -0
  183. package/dist/web/assets/sl-SI-NN7IZMDC-BNyfGsJr.js +6 -0
  184. package/dist/web/assets/stateDiagram-D77RDMKH-yCTyY4sx.js +1 -0
  185. package/dist/web/assets/stateDiagram-v2-MP3YSRHH-DMV9Hi6h.js +1 -0
  186. package/dist/web/assets/subset-shared.chunk-en_zPkcm.js +84 -0
  187. package/dist/web/assets/subset-worker.chunk-D4Jfgczh.js +1 -0
  188. package/dist/web/assets/sv-SE-XGPEYMSR-CcrID0kB.js +10 -0
  189. package/dist/web/assets/swimlanes-42K2YHIH-CsXemLHu.js +1 -0
  190. package/dist/web/assets/swimlanesDiagram-VR7AAH4N-wKC0jJ-D.js +8 -0
  191. package/dist/web/assets/ta-IN-2NMHFXQM-1Q6gAmCa.js +9 -0
  192. package/dist/web/assets/{table-D3N_5Wee.js → table-D-x54JQs.js} +1 -1
  193. package/dist/web/assets/tabs-Dwtb498J.js +1 -0
  194. package/dist/web/assets/th-TH-HPSO5L25-Osf6RMxs.js +2 -0
  195. package/dist/web/assets/{timeline-definition-24CTP7MA-owGoHn8z.js → timeline-definition-24CTP7MA-BcjYHSKM.js} +8 -8
  196. package/dist/web/assets/tr-TR-DEFEU3FU-olIwbQqc.js +7 -0
  197. package/dist/web/assets/{trash-2-D3Ey4I09.js → trash-2-C4wuE82r.js} +1 -1
  198. package/dist/web/assets/uk-UA-QMV73CPH-_0ICAhhw.js +6 -0
  199. package/dist/web/assets/{upload-DhVOCWST.js → upload-Cq-d5iVn.js} +1 -1
  200. package/dist/web/assets/{useDetailRoute-j9nlwack.js → useDetailRoute-DiC2IR0t.js} +1 -1
  201. package/dist/web/assets/{useJobs-Dcl-Vim3.js → useJobs-TDZx1N1l.js} +1 -1
  202. package/dist/web/assets/{useKnowledge-gIjk0_I1.js → useKnowledge-cE7nsoOf.js} +1 -1
  203. package/dist/web/assets/{useListSelection-CSQd_Hmx.js → useListSelection-tj_f-2Ad.js} +1 -1
  204. package/dist/web/assets/{useMemories-B8Zpz0Qz.js → useMemories-rjShoqd3.js} +1 -1
  205. package/dist/web/assets/useProjectScope-DaFHoG4_.js +1 -0
  206. package/dist/web/assets/{useSessions-BrdK-12R.js → useSessions-BNsSZXqv.js} +1 -1
  207. package/dist/web/assets/vennDiagram-4TSXK5OY-BIC5NL2Q.js +34 -0
  208. package/dist/web/assets/vi-VN-M7AON7JQ-CZHjInAz.js +5 -0
  209. package/dist/web/assets/{view-params-Bm1Qf6KC.js → view-params-Duc_5Bxj.js} +1 -1
  210. package/dist/web/assets/{wardleyDiagram-VM6X3IG4-D9GbTBKy.js → wardleyDiagram-VM6X3IG4-BJqqp-BL.js} +2 -2
  211. package/dist/web/assets/{xychartDiagram-S5SC5T6Z-BFqPF2Hl.js → xychartDiagram-S5SC5T6Z-CMANcsti.js} +4 -4
  212. package/dist/web/assets/zh-CN-LNUGB5OW-z21ZnHQB.js +10 -0
  213. package/dist/web/assets/zh-HK-E62DVLB3-C-RnadUL.js +1 -0
  214. package/dist/web/assets/zh-TW-RAJ6MFWO-Vua3CLAj.js +9 -0
  215. package/dist/web/index.html +2 -2
  216. package/package.json +1 -1
  217. package/dist/web/assets/Dashboard-V813oIhq.js +0 -1
  218. package/dist/web/assets/Knowledge-BpiN3iVE.js +0 -28
  219. package/dist/web/assets/Projects-DRao5Qpk.js +0 -3
  220. package/dist/web/assets/ResumeActions-DHTOr6GQ.js +0 -11
  221. package/dist/web/assets/Sessions-CWHU6sYy.js +0 -5
  222. package/dist/web/assets/abnfDiagram-VCTEODGH-K8P_VxLi.js +0 -1
  223. package/dist/web/assets/arc-BOl9BKfD.js +0 -1
  224. package/dist/web/assets/architectureDiagram-5GKGNRK7-DIZ15fO5.js +0 -36
  225. package/dist/web/assets/channel-CQFNQIhG.js +0 -1
  226. package/dist/web/assets/chunk-2Q5K7J3B-wRIxA2_q.js +0 -1
  227. package/dist/web/assets/chunk-F27PBJKO-DVuei-Pl.js +0 -1
  228. package/dist/web/assets/chunk-JWPE2WC7-zdsOarNZ.js +0 -1
  229. package/dist/web/assets/chunk-POPQ4Y6H-D3ieeKih.js +0 -1
  230. package/dist/web/assets/chunk-XXDRQBXY-BoTHwisB.js +0 -1
  231. package/dist/web/assets/classDiagram-ZZMXUADV-B5yD90Df.js +0 -1
  232. package/dist/web/assets/classDiagram-v2-VYDZK3BY-B5yD90Df.js +0 -1
  233. package/dist/web/assets/cose-bilkent-JH36ORCC-CtGsuuTW.js +0 -1
  234. package/dist/web/assets/cynefinDiagram-5FMLGOSQ-kMbm5D7e.js +0 -62
  235. package/dist/web/assets/diagram-UQ7AKVKN-CMX0u7Gf.js +0 -41
  236. package/dist/web/assets/diagram-VX7I27RA-Bp_JbX0e.js +0 -24
  237. package/dist/web/assets/diagram-Z3DM3KII-oZ6jRSCd.js +0 -24
  238. package/dist/web/assets/ebnfDiagram-PWID7BFC-DbxnEjb0.js +0 -1
  239. package/dist/web/assets/erDiagram-RLTQ6QDP-Cl5kXPho.js +0 -99
  240. package/dist/web/assets/folder-open-DojCP5NP.js +0 -16
  241. package/dist/web/assets/ganttDiagram-EL5Y4UJY-DNjT4iVH.js +0 -292
  242. package/dist/web/assets/gitGraphDiagram-WWUBYQGX-B4aUQ9gY.js +0 -106
  243. package/dist/web/assets/highlighted-body-KPVGNVTW-gt1u8RcC.js +0 -1
  244. package/dist/web/assets/index-CyjfnRiI.css +0 -1
  245. package/dist/web/assets/infoDiagram-27XIBGKW-CWcOvNAB.js +0 -2
  246. package/dist/web/assets/layout-7xCiQ5Mn.js +0 -1
  247. package/dist/web/assets/linear-WCNhc07o.js +0 -1
  248. package/dist/web/assets/mermaid-HWGCJPDP-C8QwWdo5.js +0 -609
  249. package/dist/web/assets/pegDiagram-XKGWAZYB-BYB3oVZ_.js +0 -1
  250. package/dist/web/assets/pieDiagram-E7YTZNPT-CSbpzXas.js +0 -39
  251. package/dist/web/assets/railroadDiagram-O6MQD6OU-Ct8aPeLX.js +0 -1
  252. package/dist/web/assets/refresh-cw-BQRdbjy6.js +0 -6
  253. package/dist/web/assets/sankeyDiagram-P5KCCOFB-CDqNONxU.js +0 -40
  254. package/dist/web/assets/scroll-area-CU4DGUBA.js +0 -1
  255. package/dist/web/assets/sizeCapture-INFHLROL-Dpubco_U.js +0 -1
  256. package/dist/web/assets/stateDiagram-D77RDMKH-CzslKEYw.js +0 -1
  257. package/dist/web/assets/stateDiagram-v2-MP3YSRHH-DKbNjyV-.js +0 -1
  258. package/dist/web/assets/swimlanes-42K2YHIH-bD_tUjo6.js +0 -1
  259. package/dist/web/assets/swimlanesDiagram-VR7AAH4N-0wAluWQF.js +0 -8
  260. package/dist/web/assets/tabs-CSlEXoxD.js +0 -1
  261. package/dist/web/assets/useProjectScope-Dk0mjyHf.js +0 -1
  262. package/dist/web/assets/vennDiagram-4TSXK5OY-D0_6bldW.js +0 -34
@@ -0,0 +1,299 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/highlighted-body-KPVGNVTW-BmPHGwPQ.js","assets/index-CYCjrqhG.js","assets/index-CY60J5zm.css","assets/mermaid.core-Bs68JjJM.js","assets/wiki-links-Y6CQL1QZ.js"])))=>i.map(i=>d[i]);
2
+ var Lm=Object.defineProperty;var Rm=Object.getPrototypeOf;var Om=Reflect.get;var Eu=e=>{throw TypeError(e)};var Pm=(e,t,n)=>t in e?Lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var P=(e,t,n)=>Pm(e,typeof t!="symbol"?t+"":t,n),La=(e,t,n)=>t.has(e)||Eu("Cannot "+n);var We=(e,t,n)=>(La(e,t,"read from private field"),n?n.call(e):t.get(e)),hn=(e,t,n)=>t.has(e)?Eu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pt=(e,t,n,r)=>(La(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ra=(e,t,n)=>(La(e,t,"access private method"),n);var Tu=(e,t,n)=>Om(Rm(e),n,t);import{c as Dm,bk as b,au as Jc,r as N,j as A,ct as ed,bG as uo,bY as vm,A as td}from"./index-CYCjrqhG.js";import{bf as Oa}from"./mermaid.core-Bs68JjJM.js";import{r as Mm,w as Bm}from"./wiki-links-Y6CQL1QZ.js";/**
3
+ * @license lucide-react v1.27.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const Fm=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Hm=Dm("image",Fm);let we=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Um(e){return lo(e)}function lo(e){return Array.isArray(e)?$m(e):e instanceof RegExp?e:typeof e=="object"?jm(e):e}function $m(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=lo(e[n]);return t}function jm(e){let t={};for(let n in e)t[n]=lo(e[n]);return t}function nd(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function rd(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?rd(e.substring(0,e.length-1)):e.substr(~t+1)}var Pa=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,oi=class{static hasCaptures(e){return e===null?!1:(Pa.lastIndex=0,Pa.test(e))}static replaceCaptures(e,t,n){return e.replace(Pa,(r,i,a,s)=>{let o=n[parseInt(i||a,10)];if(o){let u=t.substring(o.start,o.end);for(;u[0]===".";)u=u.substring(1);switch(s){case"downcase":return u.toLowerCase();case"upcase":return u.toUpperCase();default:return u}}else return r})}};function id(e,t){return e<t?-1:e>t?1:0}function ad(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let a=id(e[i],t[i]);if(a!==0)return a}return 0}return n-r}function yu(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function sd(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var od=class{constructor(e){P(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Pi=class{constructor(e,t,n){P(this,"_cachedMatchRoot",new od(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Gm(e),t)}static createFromParsedTheme(e,t){return Wm(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>Vm(e.parent,i.parentScopes));return r?new ud(r.fontStyle,r.foreground,r.background):null}},Da=class Ci{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Ci(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Ci(n,t[r]);return n}push(t){return new Ci(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function Vm(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!zm(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function zm(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var ud=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Gm(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,a=t.length;i<a;i++){let s=t[i];if(!s.settings)continue;let o;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),o=d.split(",")}else Array.isArray(s.scope)?o=s.scope:o=[""];let u=-1;if(typeof s.settings.fontStyle=="string"){u=0;let d=s.settings.fontStyle.split(" ");for(let p=0,f=d.length;p<f;p++)switch(d[p]){case"italic":u=u|1;break;case"bold":u=u|2;break;case"underline":u=u|4;break;case"strikethrough":u=u|8;break}}let l=null;typeof s.settings.foreground=="string"&&yu(s.settings.foreground)&&(l=s.settings.foreground);let c=null;typeof s.settings.background=="string"&&yu(s.settings.background)&&(c=s.settings.background);for(let d=0,p=o.length;d<p;d++){let m=o[d].trim().split(" "),g=m[m.length-1],y=null;m.length>1&&(y=m.slice(0,m.length-1),y.reverse()),n[r++]=new qm(g,y,i,u,l,c)}}return n}var qm=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},je=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(je||{});function Wm(e,t){e.sort((u,l)=>{let c=id(u.scope,l.scope);return c!==0||(c=ad(u.parentScopes,l.parentScopes),c!==0)?c:u.index-l.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let u=e.shift();u.fontStyle!==-1&&(n=u.fontStyle),u.foreground!==null&&(r=u.foreground),u.background!==null&&(i=u.background)}let a=new Ym(t),s=new ud(n,a.getId(r),a.getId(i)),o=new Xm(new Es(0,null,-1,0,0),[]);for(let u=0,l=e.length;u<l;u++){let c=e[u];o.insert(0,c.scope,c.parentScopes,c.fontStyle,a.getId(c.foreground),a.getId(c.background))}return new Pi(a,s,o)}var Ym=class{constructor(e){P(this,"_isFrozen");P(this,"_lastColorId");P(this,"_id2color");P(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Qm=Object.freeze([]),Es=class ld{constructor(t,n,r,i,a){P(this,"scopeDepth");P(this,"parentScopes");P(this,"fontStyle");P(this,"foreground");P(this,"background");this.scopeDepth=t,this.parentScopes=n||Qm,this.fontStyle=r,this.foreground=i,this.background=a}clone(){return new ld(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Xm=class Ts{constructor(t,n=[],r={}){P(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const a=n.parentScopes[i].length-t.parentScopes[r].length;if(a!==0)return a;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,a;if(r===-1?(i=t,a=""):(i=t.substring(0,r),a=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(a)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ts._cmpBySpecificity),n}insert(t,n,r,i,a,s){if(n===""){this._doInsertHere(t,r,i,a,s);return}let o=n.indexOf("."),u,l;o===-1?(u=n,l=""):(u=n.substring(0,o),l=n.substring(o+1));let c;this._children.hasOwnProperty(u)?c=this._children[u]:(c=new Ts(this._mainRule.clone(),Es.cloneArr(this._rulesWithParentScopes)),this._children[u]=c),c.insert(t+1,l,r,i,a,s)}_doInsertHere(t,n,r,i,a){if(n===null){this._mainRule.acceptOverwrite(t,r,i,a);return}for(let s=0,o=this._rulesWithParentScopes.length;s<o;s++){let u=this._rulesWithParentScopes[s];if(ad(u.parentScopes,n)===0){u.acceptOverwrite(t,r,i,a);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),a===0&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new Es(t,n,r,i,a))}},Kn=class st{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=st.getLanguageId(t),r=st.getTokenType(t),i=st.getFontStyle(t),a=st.getForeground(t),s=st.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:s})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,a,s,o){let u=st.getLanguageId(t),l=st.getTokenType(t),c=st.containsBalancedBrackets(t)?1:0,d=st.getFontStyle(t),p=st.getForeground(t),f=st.getBackground(t);return n!==0&&(u=n),r!==8&&(l=r),i!==null&&(c=i?1:0),a!==-1&&(d=a),s!==0&&(p=s),o!==0&&(f=o),(u<<0|l<<8|c<<10|d<<11|p<<15|f<<24)>>>0}};function Di(e,t){const n=[],r=Km(e);let i=r.next();for(;i!==null;){let u=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let l=s();if(n.push({matcher:l,priority:u}),i!==",")break;i=r.next()}return n;function a(){if(i==="-"){i=r.next();const u=a();return l=>!!u&&!u(l)}if(i==="("){i=r.next();const u=o();return i===")"&&(i=r.next()),u}if(ku(i)){const u=[];do u.push(i),i=r.next();while(ku(i));return l=>t(u,l)}return null}function s(){const u=[];let l=a();for(;l;)u.push(l),l=a();return c=>u.every(d=>d(c))}function o(){const u=[];let l=s();for(;l&&(u.push(l),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");l=s()}return c=>u.some(d=>d(c))}}function ku(e){return!!e&&!!e.match(/[\w\.:]+/)}function Km(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function cd(e){typeof e.dispose=="function"&&e.dispose()}var Ur=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Zm=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Jm=class{constructor(){P(this,"_references",[]);P(this,"_seenReferenceKeys",new Set);P(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},e0=class{constructor(e,t){P(this,"seenFullScopeRequests",new Set);P(this,"seenPartialScopeRequests",new Set);P(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ur(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Jm;for(const n of e)t0(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ur){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function t0(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const a=n.lookup(t);e instanceof Ur?wi({baseGrammar:a,selfGrammar:i},r):ys(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const o of s)r.add(new Ur(o))}function ys(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];vi([r],t,n)}}function wi(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&vi(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&vi(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function vi(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?nd({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&vi(r.patterns,{...t,repository:i},n);const a=r.include;if(!a)continue;const s=dd(a);switch(s.kind){case 0:wi({...t,selfGrammar:t.baseGrammar},n);break;case 1:wi(t,n);break;case 2:ys(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const o=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const u={baseGrammar:t.baseGrammar,selfGrammar:o,repository:i};s.kind===4?ys(s.ruleName,u,n):wi(u,n)}else s.kind===4?n.add(new Zm(s.scopeName,s.ruleName)):n.add(new Ur(s.scopeName));break}}}var n0=class{constructor(){P(this,"kind",0)}},r0=class{constructor(){P(this,"kind",1)}},i0=class{constructor(e){P(this,"kind",2);this.ruleName=e}},a0=class{constructor(e){P(this,"kind",3);this.scopeName=e}},s0=class{constructor(e,t){P(this,"kind",4);this.scopeName=e,this.ruleName=t}};function dd(e){if(e==="$base")return new n0;if(e==="$self")return new r0;const t=e.indexOf("#");if(t===-1)return new a0(e);if(t===0)return new i0(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new s0(n,r)}}var o0=/\\(\d+)/,xu=/\\(\d+)/g,u0=-1,hd=-2;var Qr=class{constructor(e,t,n,r){P(this,"$location");P(this,"id");P(this,"_nameIsCapturing");P(this,"_name");P(this,"_contentNameIsCapturing");P(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=oi.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=oi.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${rd(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:oi.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:oi.replaceCaptures(this._contentName,e,t)}},l0=class extends Qr{constructor(t,n,r,i,a){super(t,n,r,i);P(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,i){throw new Error("Not supported!")}},c0=class extends Qr{constructor(t,n,r,i,a){super(t,n,r,null);P(this,"_match");P(this,"captures");P(this,"_cachedCompiledPatterns");this._match=new $r(i,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new jr,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Au=class extends Qr{constructor(t,n,r,i,a){super(t,n,r,i);P(this,"hasMissingPatterns");P(this,"patterns");P(this,"_cachedCompiledPatterns");this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new jr,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ks=class extends Qr{constructor(t,n,r,i,a,s,o,u,l,c){super(t,n,r,i);P(this,"_begin");P(this,"beginCaptures");P(this,"_end");P(this,"endHasBackReferences");P(this,"endCaptures");P(this,"applyEndPatternLast");P(this,"hasMissingPatterns");P(this,"patterns");P(this,"_cachedCompiledPatterns");this._begin=new $r(a,this.id),this.beginCaptures=s,this._end=new $r(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=u,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,i)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new jr;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Mi=class extends Qr{constructor(t,n,r,i,a,s,o,u,l){super(t,n,r,i);P(this,"_begin");P(this,"beginCaptures");P(this,"whileCaptures");P(this,"_while");P(this,"whileHasBackReferences");P(this,"hasMissingPatterns");P(this,"patterns");P(this,"_cachedCompiledPatterns");P(this,"_cachedCompiledWhilePatterns");this._begin=new $r(a,this.id),this.beginCaptures=s,this.whileCaptures=u,this._while=new $r(o,hd),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new jr;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,i){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,i)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new jr,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},fd=class $e{static createCaptureRule(t,n,r,i,a){return t.registerRule(s=>new l0(n,s,r,i,a))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new c0(t.$vscodeTextmateLocation,t.id,t.name,t.match,$e._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=nd({},r,t.repository));let a=t.patterns;return typeof a>"u"&&t.include&&(a=[{include:t.include}]),new Au(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,$e._compilePatterns(a,n,r))}return t.while?new Mi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,$e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,$e._compileCaptures(t.whileCaptures||t.captures,n,r),$e._compilePatterns(t.patterns,n,r)):new ks(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,$e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,$e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,$e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const o=parseInt(s,10);o>a&&(a=o)}for(let s=0;s<=a;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const o=parseInt(s,10);let u=0;t[s].patterns&&(u=$e.getCompiledRuleId(t[s],n,r)),i[o]=$e.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,u)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,s=t.length;a<s;a++){const o=t[a];let u=-1;if(o.include){const l=dd(o.include);switch(l.kind){case 0:case 1:u=$e.getCompiledRuleId(r[o.include],n,r);break;case 2:let c=r[l.ruleName];c&&(u=$e.getCompiledRuleId(c,n,r));break;case 3:case 4:const d=l.scopeName,p=l.kind===4?l.ruleName:null,f=n.getExternalGrammar(d,r);if(f)if(p){let m=f.repository[p];m&&(u=$e.getCompiledRuleId(m,n,f.repository))}else u=$e.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else u=$e.getCompiledRuleId(o,n,r);if(u!==-1){const l=n.getRule(u);let c=!1;if((l instanceof Au||l instanceof ks||l instanceof Mi)&&l.hasMissingPatterns&&l.patterns.length===0&&(c=!0),c)continue;i.push(u)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},$r=class pd{constructor(t,n){P(this,"source");P(this,"ruleId");P(this,"hasAnchor");P(this,"hasBackReferences");P(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let i=0,a=[],s=!1;for(let o=0;o<r;o++)if(t.charAt(o)==="\\"&&o+1<r){const l=t.charAt(o+1);l==="z"?(a.push(t.substring(i,o)),a.push("$(?!\\n)(?<!\\n)"),i=o+2):(l==="A"||l==="G")&&(s=!0),o++}this.hasAnchor=s,i===0?this.source=t:(a.push(t.substring(i,r)),this.source=a.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=o0.test(this.source):this.hasBackReferences=!1}clone(){return new pd(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return xu.lastIndex=0,this.source.replace(xu,(i,a)=>sd(r[parseInt(a,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],a,s,o,u;for(a=0,s=this.source.length;a<s;a++)o=this.source.charAt(a),t[a]=o,n[a]=o,r[a]=o,i[a]=o,o==="\\"&&a+1<s&&(u=this.source.charAt(a+1),u==="A"?(t[a+1]="￿",n[a+1]="￿",r[a+1]="A",i[a+1]="A"):u==="G"?(t[a+1]="￿",n[a+1]="G",r[a+1]="￿",i[a+1]="G"):(t[a+1]=u,n[a+1]=u,r[a+1]=u,i[a+1]=u),a++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},jr=class{constructor(){P(this,"_items");P(this,"_hasAnchors");P(this,"_cached");P(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Cu(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new Cu(e,r,this._items.map(i=>i.ruleId))}},Cu=class{constructor(e,t,n){P(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
8
+ `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},va=class{constructor(e,t){this.languageId=e,this.tokenType=t}},$t,d0=($t=class{constructor(t,n){P(this,"_defaultAttributes");P(this,"_embeddedLanguagesMatcher");P(this,"_getBasicScopeAttributes",new od(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new va(n,r)}));this._defaultAttributes=new va(t,8),this._embeddedLanguagesMatcher=new h0(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?$t._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match($t.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},P($t,"_NULL_SCOPE_METADATA",new va(0,0)),P($t,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),$t),h0=class{constructor(e){P(this,"values");P(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>sd(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},wu=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function md(e,t,n,r,i,a,s,o){const u=t.content.length;let l=!1,c=-1;if(s){const f=f0(e,t,n,r,i,a);i=f.stack,r=f.linePos,n=f.isFirstLine,c=f.anchorPosition}const d=Date.now();for(;!l;){if(o!==0&&Date.now()-d>o)return new wu(i,!0);p()}return new wu(i,!1);function p(){const f=p0(e,t,n,r,i,c);if(!f){a.produce(i,u),l=!0;return}const m=f.captureIndices,g=f.matchedRuleId,y=m&&m.length>0?m[0].end>r:!1;if(g===u0){const _=i.getRule(e);a.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ar(e,t,n,i,a,_.endCaptures,m),a.produce(i,m[0].end);const C=i;if(i=i.parent,c=C.getAnchorPos(),!y&&C.getEnterPos()===r){i=C,a.produce(i,u),l=!0;return}}else{const _=e.getRule(g);a.produce(i,m[0].start);const C=i,T=_.getName(t.content,m),O=i.contentNameScopesList.pushAttributed(T,e);if(i=i.push(g,r,c,m[0].end===u,null,O,O),_ instanceof ks){const v=_;Ar(e,t,n,i,a,v.beginCaptures,m),a.produce(i,m[0].end),c=m[0].end;const S=v.getContentName(t.content,m),M=O.pushAttributed(S,e);if(i=i.withContentNameScopesList(M),v.endHasBackReferences&&(i=i.withEndRule(v.getEndWithResolvedBackReferences(t.content,m))),!y&&C.hasSameRuleAs(i)){i=i.pop(),a.produce(i,u),l=!0;return}}else if(_ instanceof Mi){const v=_;Ar(e,t,n,i,a,v.beginCaptures,m),a.produce(i,m[0].end),c=m[0].end;const S=v.getContentName(t.content,m),M=O.pushAttributed(S,e);if(i=i.withContentNameScopesList(M),v.whileHasBackReferences&&(i=i.withEndRule(v.getWhileWithResolvedBackReferences(t.content,m))),!y&&C.hasSameRuleAs(i)){i=i.pop(),a.produce(i,u),l=!0;return}}else if(Ar(e,t,n,i,a,_.captures,m),a.produce(i,m[0].end),i=i.pop(),!y){i=i.safePop(),a.produce(i,u),l=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function f0(e,t,n,r,i,a){let s=i.beginRuleCapturedEOL?0:-1;const o=[];for(let u=i;u;u=u.pop()){const l=u.getRule(e);l instanceof Mi&&o.push({rule:l,stack:u})}for(let u=o.pop();u;u=o.pop()){const{ruleScanner:l,findOptions:c}=b0(u.rule,e,u.stack.endRule,n,r===s),d=l.findNextMatchSync(t,r,c);if(d){if(d.ruleId!==hd){i=u.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(a.produce(u.stack,d.captureIndices[0].start),Ar(e,t,n,u.stack,a,u.rule.whileCaptures,d.captureIndices),a.produce(u.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=u.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function p0(e,t,n,r,i,a){const s=m0(e,t,n,r,i,a),o=e.getInjections();if(o.length===0)return s;const u=g0(o,e,t,n,r,i,a);if(!u)return s;if(!s)return u;const l=s.captureIndices[0].start,c=u.captureIndices[0].start;return c<l||u.priorityMatch&&c===l?u:s}function m0(e,t,n,r,i,a){const s=i.getRule(e),{ruleScanner:o,findOptions:u}=gd(s,e,i.endRule,n,r===a),l=o.findNextMatchSync(t,r,u);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function g0(e,t,n,r,i,a,s){let o=Number.MAX_VALUE,u=null,l,c=0;const d=a.contentNameScopesList.getScopeNames();for(let p=0,f=e.length;p<f;p++){const m=e[p];if(!m.matcher(d))continue;const g=t.getRule(m.ruleId),{ruleScanner:y,findOptions:_}=gd(g,t,null,r,i===s),C=y.findNextMatchSync(n,i,_);if(!C)continue;const T=C.captureIndices[0].start;if(!(T>=o)&&(o=T,u=C.captureIndices,l=C.ruleId,c=m.priority,o===i))break}return u?{priorityMatch:c===-1,captureIndices:u,matchedRuleId:l}:null}function gd(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function b0(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ar(e,t,n,r,i,a,s){if(a.length===0)return;const o=t.content,u=Math.min(a.length,s.length),l=[],c=s[0].end;for(let d=0;d<u;d++){const p=a[d];if(p===null)continue;const f=s[d];if(f.length===0)continue;if(f.start>c)break;for(;l.length>0&&l[l.length-1].endPos<=f.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,f.start):i.produce(r,f.start),p.retokenizeCapturedWithRuleId){const g=p.getName(o,s),y=r.contentNameScopesList.pushAttributed(g,e),_=p.getContentName(o,s),C=y.pushAttributed(_,e),T=r.push(p.retokenizeCapturedWithRuleId,f.start,-1,!1,null,y,C),O=e.createOnigString(o.substring(0,f.end));md(e,O,n&&f.start===0,f.start,T,i,!1,0),cd(O);continue}const m=p.getName(o,s);if(m!==null){const y=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);l.push(new _0(y,f.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var _0=class{constructor(e,t){P(this,"scopes");P(this,"endPos");this.scopes=e,this.endPos=t}};function E0(e,t,n,r,i,a,s,o){return new y0(e,t,n,r,i,a,s,o)}function Iu(e,t,n,r,i){const a=Di(t,Bi),s=fd.getCompiledRuleId(n,r,i.repository);for(const o of a)e.push({debugSelector:t,matcher:o.matcher,ruleId:s,grammar:i,priority:o.priority})}function Bi(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(T0(t[i],r))return n=i+1,!0;return!1})}function T0(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var y0=class{constructor(e,t,n,r,i,a,s,o){P(this,"_rootId");P(this,"_lastRuleId");P(this,"_ruleId2desc");P(this,"_includedGrammars");P(this,"_grammarRepository");P(this,"_grammar");P(this,"_injections");P(this,"_basicScopeAttributesProvider");P(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=o,this._basicScopeAttributesProvider=new d0(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Su(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const u of Object.keys(i)){const l=Di(u,Bi);for(const c of l)this._tokenTypeMatchers.push({matcher:c.matcher,type:i[u]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)Iu(t,s,i[s],this,r);const a=this._grammarRepository.injections(n);a&&a.forEach(s=>{const o=this.getExternalGrammar(s);if(o){const u=o.injectionSelector;u&&Iu(t,u,o,this,o)}})}return t.sort((i,a)=>i.priority-a.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Su(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=fd.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===xs.NULL){i=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),c=this.themeProvider.getDefaults(),d=Kn.set(0,l.languageId,l.tokenType,null,c.fontStyle,c.foregroundId,c.backgroundId),p=this.getRule(this._rootId).getName(null,null);let f;p?f=Nr.createRootAndLookUpScopeName(p,d,this):f=Nr.createRoot("unknown",d),t=new xs(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,t.reset();e=e+`
9
+ `;const a=this.createOnigString(e),s=a.content.length,o=new x0(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),u=md(this,a,i,0,t,o,!0,r);return cd(a),{lineLength:s,lineTokens:o,ruleStack:u.stack,stoppedEarly:u.stoppedEarly}}};function Su(e,t){return e=Um(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Nr=class At{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=(t==null?void 0:t.scopePath)??null;for(const a of n)i=Da.push(i,a.scopeNames),r=new At(r,i,a.encodedTokenAttributes);return r}static createRoot(t,n){return new At(null,new Da(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),a=new Da(null,t),s=r.themeProvider.themeMatch(a),o=At.mergeAttributes(n,i,s);return new At(null,a,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return At.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,a=0,s=0;return r!==null&&(i=r.fontStyle,a=r.foregroundId,s=r.backgroundId),Kn.set(t,n.languageId,n.tokenType,null,i,a,s)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return At._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const a of r)i=At._pushAttributed(i,a,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),a=t.scopePath.push(n),s=r.themeProvider.themeMatch(a),o=At.mergeAttributes(t.tokenAttributes,i,s);return new At(t,a,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var i;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},ct,xs=(ct=class{constructor(t,n,r,i,a,s,o,u){P(this,"_stackElementBrand");P(this,"_enterPos");P(this,"_anchorPos");P(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=a,this.endRule=s,this.nameScopesList=o,this.contentNameScopesList=u,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(t){return t===null?!1:ct._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Nr.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ct._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,s,o){return new ct(this,t,n,r,i,a,s,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var r,i;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ct(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=Nr.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new ct(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Nr.fromExtension(r,n.contentNameScopesList))}},P(ct,"NULL",new ct(null,0,0,0,!1,null,null,null)),ct),k0=class{constructor(e,t){P(this,"balancedBracketScopes");P(this,"unbalancedBracketScopes");P(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Di(n,Bi).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Di(n,Bi).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},x0=class{constructor(e,t,n,r){P(this,"_emitBinaryTokens");P(this,"_lineText");P(this,"_tokens");P(this,"_binaryTokens");P(this,"_lastTokenEndIndex");P(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=(e==null?void 0:e.tokenAttributes)??0,a=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=(e==null?void 0:e.getScopeNames())??[];for(const o of this._tokenTypeOverrides)o.matcher(s)&&(i=Kn.set(i,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(s))}if(a&&(i=Kn.set(i,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},A0=class{constructor(e,t){P(this,"_grammars",new Map);P(this,"_rawGrammars",new Map);P(this,"_injectionGrammars",new Map);P(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,E0(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},C0=class{constructor(t){P(this,"_options");P(this,"_syncRegistry");P(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new A0(Pi.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Pi.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new k0(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,a){const s=new e0(this._syncRegistry,t);for(;s.Q.length>0;)s.Q.map(o=>this._loadSingleGrammar(o.scopeName)),s.processQueue();return this._grammarForScopeName(t,n,r,i,a)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,a=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,a)}},As=xs.NULL;const bd=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Xr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Xr.prototype.normal={};Xr.prototype.property={};Xr.prototype.space=void 0;function _d(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Xr(n,r,t)}function Vr(e){return e.toLowerCase()}class et{constructor(t,n){this.attribute=n,this.property=t}}et.prototype.attribute="";et.prototype.booleanish=!1;et.prototype.boolean=!1;et.prototype.commaOrSpaceSeparated=!1;et.prototype.commaSeparated=!1;et.prototype.defined=!1;et.prototype.mustUseProperty=!1;et.prototype.number=!1;et.prototype.overloadedBoolean=!1;et.prototype.property="";et.prototype.spaceSeparated=!1;et.prototype.space=void 0;let w0=0;const te=Pn(),Ce=Pn(),Cs=Pn(),j=Pn(),_e=Pn(),In=Pn(),rt=Pn();function Pn(){return 2**++w0}const ws=Object.freeze(Object.defineProperty({__proto__:null,boolean:te,booleanish:Ce,commaOrSpaceSeparated:rt,commaSeparated:In,number:j,overloadedBoolean:Cs,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),Ma=Object.keys(ws);class co extends et{constructor(t,n,r,i){let a=-1;if(super(t,n),Nu(this,"space",i),typeof r=="number")for(;++a<Ma.length;){const s=Ma[a];Nu(this,Ma[a],(r&ws[s])===ws[s])}}}co.prototype.defined=!0;function Nu(e,t,n){n&&(e[t]=n)}function er(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new co(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Vr(r)]=r,n[Vr(a.attribute)]=r}return new Xr(t,n,e.space)}const Ed=er({properties:{ariaActiveDescendant:null,ariaAtomic:Ce,ariaAutoComplete:null,ariaBusy:Ce,ariaChecked:Ce,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:Ce,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:Ce,ariaFlowTo:_e,ariaGrabbed:Ce,ariaHasPopup:null,ariaHidden:Ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:j,ariaLive:null,ariaModal:Ce,ariaMultiLine:Ce,ariaMultiSelectable:Ce,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:Ce,ariaReadOnly:Ce,ariaRelevant:null,ariaRequired:Ce,ariaRoleDescription:_e,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:Ce,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Td(e,t){return t in e?e[t]:t}function yd(e,t){return Td(e,t.toLowerCase())}const I0=er({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:In,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:te,allowPaymentRequest:te,allowUserMedia:te,alpha:te,alt:null,as:null,async:te,autoCapitalize:null,autoComplete:_e,autoFocus:te,autoPlay:te,blocking:_e,capture:null,charSet:null,checked:te,cite:null,className:_e,closedBy:null,colorSpace:null,cols:j,colSpan:j,command:null,commandFor:null,content:null,contentEditable:Ce,controls:te,controlsList:_e,coords:j|In,crossOrigin:null,data:null,dateTime:null,decoding:null,default:te,defer:te,dir:null,dirName:null,disabled:te,download:Cs,draggable:Ce,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:te,formTarget:null,headers:_e,height:j,hidden:Cs,high:j,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:te,inputMode:null,integrity:null,is:null,isMap:te,itemId:null,itemProp:_e,itemRef:_e,itemScope:te,itemType:_e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:te,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:te,muted:te,name:null,nonce:null,noModule:te,noValidate:te,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:te,optimum:j,pattern:null,ping:_e,placeholder:null,playsInline:te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:te,referrerPolicy:null,rel:_e,required:te,reversed:te,rows:j,rowSpan:j,sandbox:_e,scope:null,scoped:te,seamless:te,selected:te,shadowRootClonable:te,shadowRootCustomElementRegistry:te,shadowRootDelegatesFocus:te,shadowRootMode:null,shadowRootSerializable:te,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:Ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:te,useMap:null,value:Ce,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_e,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:te,declare:te,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:te,noHref:te,noShade:te,noWrap:te,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:Ce,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:te,disablePictureInPicture:te,disableRemotePlayback:te,exportParts:In,part:_e,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:yd}),S0=er({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:rt,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:_e,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:te,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:In,g2:In,glyphName:In,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:rt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:j,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rt,rev:rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rt,requiredFeatures:rt,requiredFonts:rt,requiredFormats:rt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:rt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rt,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Td}),kd=er({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xd=er({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:yd}),Ad=er({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),N0={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},L0=/[A-Z]/g,Lu=/-[a-z]/g,R0=/^data[-\w.:]+$/i;function Kr(e,t){const n=Vr(t);let r=t,i=et;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&R0.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Lu,P0);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Lu.test(a)){let s=a.replace(L0,O0);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=co}return new i(r,t)}function O0(e){return"-"+e.toLowerCase()}function P0(e){return e.charAt(1).toUpperCase()}const tr=_d([Ed,I0,kd,xd,Ad],"html"),Nt=_d([Ed,S0,kd,xd,Ad],"svg"),Ru={}.hasOwnProperty;function ho(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&Ru.call(i,e)){const u=String(i[e]);s=Ru.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const D0=/["&'<>`]/g,v0=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,M0=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,B0=/[|\\{}()[\]^$+*?.]/g,Ou=new WeakMap;function F0(e,t){if(e=e.replace(t.subset?H0(t.subset):D0,r),t.subset||t.escapeOnly)return e;return e.replace(v0,n).replace(M0,r);function n(i,a,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(a+2),t)}function r(i,a,s){return t.format(i.charCodeAt(0),s.charCodeAt(a+1),t)}}function H0(e){let t=Ou.get(e);return t||(t=U0(e),Ou.set(e,t)),t}function U0(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(B0,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const $0=/[\dA-Fa-f]/;function j0(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!$0.test(String.fromCharCode(t))?r:r+";"}const V0=/\d/;function z0(e,t,n){const r="&#"+String(e);return n&&t&&!V0.test(String.fromCharCode(t))?r:r+";"}const G0=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ba={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",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:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},q0=["cent","copy","divide","gt","lt","not","para","times"],Cd={}.hasOwnProperty,Is={};let ui;for(ui in Ba)Cd.call(Ba,ui)&&(Is[Ba[ui]]=ui);const W0=/[^\dA-Za-z]/;function Y0(e,t,n,r){const i=String.fromCharCode(e);if(Cd.call(Is,i)){const a=Is[i],s="&"+a;return n&&G0.includes(a)&&!q0.includes(a)&&(!r||t&&t!==61&&W0.test(String.fromCharCode(t)))?s:s+";"}return""}function Q0(e,t,n){let r=j0(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Y0(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const a=z0(e,t,n.omitOptionalSemicolons);a.length<r.length&&(r=a)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Qn(e,t){return F0(e,Object.assign({format:Q0},t))}const X0=/^>|^->|<!--|-->|--!>|<!-$/g,K0=[">"],Z0=["<",">"];function J0(e,t,n,r){return r.settings.bogusComments?"<?"+Qn(e.value,Object.assign({},r.settings.characterReferences,{subset:K0}))+">":"<!--"+e.value.replace(X0,i)+"-->";function i(a){return Qn(a,Object.assign({},r.settings.characterReferences,{subset:Z0}))}}function eg(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Fi(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 Pu(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function fo(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Du(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function po(e){return e.join(" ").trim()}const tg=/[ \t\n\f\r]/g;function aa(e){return typeof e=="object"?e.type==="text"?vu(e.value):!1:vu(e)}function vu(e){return e.replace(tg,"")===""}const Oe=Id(1),wd=Id(-1),ng=[];function Id(e){return t;function t(n,r,i){const a=n?n.children:ng;let s=(r||0)+e,o=a[s];if(!i)for(;o&&aa(o);)s+=e,o=a[s];return o}}const rg={}.hasOwnProperty;function Sd(e){return t;function t(n,r,i){return rg.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const mo=Sd({body:ag,caption:Fa,colgroup:Fa,dd:lg,dt:ug,head:Fa,html:ig,li:og,optgroup:cg,option:dg,p:sg,rp:Mu,rt:Mu,tbody:fg,td:Bu,tfoot:pg,th:Bu,thead:hg,tr:mg});function Fa(e,t,n){const r=Oe(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&aa(r.value.charAt(0)))}function ig(e,t,n){const r=Oe(n,t);return!r||r.type!=="comment"}function ag(e,t,n){const r=Oe(n,t);return!r||r.type!=="comment"}function sg(e,t,n){const r=Oe(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function og(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&r.tagName==="li"}function ug(e,t,n){const r=Oe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function lg(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Mu(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function cg(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function dg(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function hg(e,t,n){const r=Oe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function fg(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function pg(e,t,n){return!Oe(n,t)}function mg(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Bu(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const gg=Sd({body:Eg,colgroup:Tg,head:_g,html:bg,tbody:yg});function bg(e){const t=Oe(e,-1);return!t||t.type!=="comment"}function _g(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function Eg(e){const t=Oe(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&aa(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function Tg(e,t,n){const r=wd(n,t),i=Oe(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&mo(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function yg(e,t,n){const r=wd(n,t),i=Oe(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&mo(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const li={name:[[`
10
+ \f\r &/=>`.split(""),`
11
+ \f\r "&'/=>\``.split("")],[`\0
12
+ \f\r "&'/<=>`.split(""),`\0
13
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
14
+ \f\r &>`.split(""),`\0
15
+ \f\r "&'<=>\``.split("")],[`\0
16
+ \f\r "&'<=>\``.split(""),`\0
17
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function kg(e,t,n,r){const i=r.schema,a=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let u;i.space==="html"&&e.tagName==="svg"&&(r.schema=Nt);const l=xg(r,e.properties),c=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,c&&(s=!1),(l||!a||!gg(e,t,n))&&(o.push("<",e.tagName,l?" "+l:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(u=l.charAt(l.length-1),(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(c),!s&&(!a||!mo(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function xg(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const a=Ag(e,i,t[i]);a&&n.push(a)}}for(;++r<n.length;){const a=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&a!=='"'&&a!=="'"&&(n[r]+=" ")}return n.join("")}function Ag(e,t,n){const r=Kr(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1;let s=e.quote,o;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const u=Qn(r.attribute,Object.assign({},e.settings.characterReferences,{subset:li.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?fo:po)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(o=Qn(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:li.unquoted[i][a]}))),o!==n&&(e.settings.quoteSmart&&Fi(n,s)>Fi(n,e.alternative)&&(s=e.alternative),o=s+Qn(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?li.single:li.double)[i][a],attribute:!0}))+s),u+(o&&"="+o))}const Cg=["<","&"];function Nd(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Qn(e.value,Object.assign({},r.settings.characterReferences,{subset:Cg}))}function wg(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Nd(e,t,n,r)}function Ig(e,t,n,r){return r.all(e)}const Sg=ho("type",{invalid:Ng,unknown:Lg,handlers:{comment:J0,doctype:eg,element:kg,raw:wg,root:Ig,text:Nd}});function Ng(e){throw new Error("Expected node, not `"+e+"`")}function Lg(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Rg={},Og={},Pg=[];function Dg(e,t){const n=t||Rg,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:vg,all:Mg,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||bd,characterReferences:n.characterReferences||Og,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Nt:tr,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function vg(e,t,n){return Sg(e,t,n,this)}function Mg(e){const t=[],n=e&&e.children||Pg;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Hi(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,a]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof a=="string"?n[i]=a:i===r&&Object.assign(n,a);return n}function sn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function Bg(e){return Array.isArray(e)?e:[e]}async function Ld(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function go(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Rd(e){return e==="ansi"||go(e)}function bo(e){return e==="none"}function Od(e){return bo(e)}function Pd(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function sa(e,t=!1){var a;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let s=0;s<n.length;s+=2){const o=t?n[s]+(n[s+1]||""):n[s];i.push([o,r]),r+=n[s].length,r+=((a=n[s+1])==null?void 0:a.length)||0}return i}function Fg(e){const t=sa(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let a=i,s=0;for(const o of t){if(a<o.length)break;a-=o.length,s++}return{line:s,character:a}}function r(i,a){let s=0;for(let o=0;o<i;o++)s+=t[o].length;return s+=a,s}return{lines:t,indexToPos:n,posToIndex:r}}const _o="light-dark()",Hg=["color","background-color"];function Ug(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function $g(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const a=n.filter(s=>i.offset<s&&s<i.offset+i.content.length).map(s=>s-i.offset).sort((s,o)=>s-o);return a.length?Ug(i,a):i})):e}function jg(e,t,n,r,i="css-vars"){const a={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(c=>Ui(e.variants[c])),o=new Set(s.flatMap(c=>Object.keys(c))),u={},l=(c,d)=>{const p=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[c]+(d==="color"?"":p)};return s.forEach((c,d)=>{for(const p of o){const f=c[p]||"inherit";if(d===0&&r&&Hg.includes(p))if(r===_o&&s.length>1){const m=t.findIndex(C=>C==="light"),g=t.findIndex(C=>C==="dark");if(m===-1||g===-1)throw new we('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=s[m][p]||"inherit",_=s[g][p]||"inherit";u[p]=`light-dark(${y}, ${_})`,i==="css-vars"&&(u[l(d,p)]=f)}else u[p]=f;else i==="css-vars"&&(u[l(d,p)]=f)}}),a.htmlStyle=u,a}function Ui(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&je.Italic&&(t["font-style"]="italic"),e.fontStyle&je.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&je.Underline&&n.push("underline"),e.fontStyle&je.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Ss(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Dd=new WeakMap;function oa(e,t){Dd.set(e,t)}function zr(e){return Dd.get(e)}class nr{constructor(...t){P(this,"_stacks",{});P(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new nr(Object.fromEntries(Bg(n).map(r=>[r,As])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Vg(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Vg(e){const t=[],n=new Set;function r(i){var s;if(n.has(i))return;n.add(i);const a=(s=i==null?void 0:i.nameScopesList)==null?void 0:s.scopeName;a&&t.push(a),i.parent&&r(i.parent)}return r(e),t}function zg(e,t){if(!(e instanceof nr))throw new we("Invalid grammar state");return e.getInternalStack(t)}function Gg(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(s){if(typeof s=="number"){if(s<0||s>n.source.length)throw new we(`Invalid decoration offset: ${s}. Code length: ${n.source.length}`);return{...i.indexToPos(s),offset:s}}else{const o=i.lines[s.line];if(o===void 0)throw new we(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${i.lines.length}`);let u=s.character;if(u<0&&(u=o.length+u),u<0||u>o.length)throw new we(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${o.length}`);return{...s,character:u,offset:i.posToIndex(s.line,u)}}};const i=Fg(n.source),a=(n.options.decorations||[]).map(s=>({...s,start:r(s.start),end:r(s.end)}));qg(a),e.set(n.meta,{decorations:a,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var s;if(!((s=this.options.decorations)!=null&&s.length))return;const i=t(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return $g(n,i)},code(n){var c;if(!((c=this.options.decorations)!=null&&c.length))return;const r=t(this),i=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(i.length!==r.converter.lines.length)throw new we(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function a(d,p,f,m){const g=i[d];let y="",_=-1,C=-1;if(p===0&&(_=0),f===0&&(C=0),f===Number.POSITIVE_INFINITY&&(C=g.children.length),_===-1||C===-1)for(let O=0;O<g.children.length;O++)y+=vd(g.children[O]),_===-1&&y.length===p&&(_=O+1),C===-1&&y.length===f&&(C=O+1);if(_===-1)throw new we(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(C===-1)throw new we(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const T=g.children.slice(_,C);if(!m.alwaysWrap&&T.length===g.children.length)o(g,m,"line");else if(!m.alwaysWrap&&T.length===1&&T[0].type==="element")o(T[0],m,"token");else{const O={type:"element",tagName:"span",properties:{},children:T};o(O,m,"wrapper"),g.children.splice(_,T.length,O)}}function s(d,p){i[d]=o(i[d],p,"line")}function o(d,p,f){var y;const m=p.properties||{},g=p.transform||(_=>_);return d.tagName=p.tagName||"span",d.properties={...d.properties,...m,class:d.properties.class},(y=p.properties)!=null&&y.class&&Pd(d,p.properties.class),d=g(d,f)||d,d}const u=[],l=r.decorations.sort((d,p)=>p.start.offset-d.start.offset||d.end.offset-p.end.offset);for(const d of l){const{start:p,end:f}=d;if(p.line===f.line)a(p.line,p.character,f.character,d);else if(p.line<f.line){a(p.line,p.character,Number.POSITIVE_INFINITY,d);for(let m=p.line+1;m<f.line;m++)u.unshift(()=>s(m,d));a(f.line,0,f.character,d)}}u.forEach(d=>d())}}}function qg(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new we(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],a=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,s=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,o=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,u=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(a||s||o||u){if(a&&s||o&&u||o&&n.start.offset===n.end.offset||s&&i.start.offset===i.end.offset)continue;throw new we(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function vd(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(vd).join(""):""}const Wg=[Gg()];function $i(e){const t=Yg(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Wg]}function Yg(e){const t=[],n=[],r=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var yn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ha={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Qg(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function Fu(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function Xg(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)Ha[r]&&t.push({type:"setDecoration",value:Ha[r]});else if(r<=29){const i=Ha[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:yn[r-30]}});else if(r===38){const i=Fu(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:yn[r-40]}});else if(r===48){const i=Fu(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:yn[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:yn[r-100+8]}})}return t}function Kg(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let a=0;do{const s=Qg(r,a),o=s.sequence?r.substring(a,s.startPosition):r.substring(a);if(o.length>0&&i.push({value:o,foreground:e,background:t,decorations:new Set(n)}),s.sequence){const u=Xg(s.sequence);for(const l of u)l.type==="resetAll"?(e=null,t=null,n.clear()):l.type==="resetForegroundColor"?e=null:l.type==="resetBackgroundColor"?t=null:l.type==="resetDecoration"&&n.delete(l.value);for(const l of u)l.type==="setForegroundColor"?e=l.value:l.type==="setBackgroundColor"?t=l.value:l.type==="setDecoration"&&n.add(l.value)}a=s.position}while(a<r.length);return i}}}var Zg={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Jg(e=Zg){function t(o){return e[o]}function n(o){return`#${o.map(u=>Math.max(0,Math.min(u,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let l=0;l<yn.length;l++)r.push(t(yn[l]));let o=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let c=0;c<6;c++)for(let d=0;d<6;d++)r.push(n([o[l],o[c],o[d]]));let u=8;for(let l=0;l<24;l++,u+=10)r.push(n([u,u,u]));return r}function a(o){return i()[o]}function s(o){switch(o.type){case"named":return t(o.name);case"rgb":return n(o.rgb);case"table":return a(o.index)}}return{value:s}}const e1={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function t1(e,t,n){const r=Hi(e,n),i=sa(t),a=Object.fromEntries(yn.map(u=>{var d;const l=`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`,c=(d=e.colors)==null?void 0:d[l];return[u,c||e1[u]]})),s=Jg(a),o=Kg();return i.map(u=>o.parse(u[0]).map(l=>{let c,d;l.decorations.has("reverse")?(c=l.background?s.value(l.background):e.bg,d=l.foreground?s.value(l.foreground):e.fg):(c=l.foreground?s.value(l.foreground):e.fg,d=l.background?s.value(l.background):void 0),c=sn(c,r),d=sn(d,r),l.decorations.has("dim")&&(c=n1(c));let p=je.None;return l.decorations.has("bold")&&(p|=je.Bold),l.decorations.has("italic")&&(p|=je.Italic),l.decorations.has("underline")&&(p|=je.Underline),l.decorations.has("strikethrough")&&(p|=je.Strikethrough),{content:l.value,offset:u[1],color:c,bgColor:d,fontStyle:p}}))}function n1(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],a=r[1],s=r[2],o=r[3],u=Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${a}${a}${s}${s}${u}`}else if(r.length===3){const i=r[0],a=r[1],s=r[2];return`#${i}${i}${a}${a}${s}${s}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Eo(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(go(i)||bo(r))return sa(t).map(u=>[{content:u[0],offset:u[1]}]);const{theme:a,colorMap:s}=e.setTheme(r);if(i==="ansi")return t1(a,t,n);const o=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new we(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(a.name))throw new we(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return i1(t,o,a,s,n)}function r1(...e){if(e.length===2)return zr(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:a=t.getLoadedThemes()[0]}=r;if(go(i)||bo(a))throw new we("Plain language does not have grammar state");if(i==="ansi")throw new we("ANSI language does not have grammar state");const{theme:s,colorMap:o}=t.setTheme(a),u=t.getLanguage(i);return new nr(To(n,u,s,o,r).stateStack,u.name,s.name)}function i1(e,t,n,r,i){const a=To(e,t,n,r,i),s=new nr(a.stateStack,t.name,n.name);return oa(a.tokens,s),a.tokens}function To(e,t,n,r,i){const a=Hi(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:o=500}=i,u=sa(e);let l=i.grammarState?zg(i.grammarState,n.name)??As:i.grammarContextCode!=null?To(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:As,c=[];const d=[];for(let p=0,f=u.length;p<f;p++){const[m,g]=u[p];if(m===""){c=[],d.push([]);continue}if(s>0&&m.length>=s){c=[],d.push([{content:m,offset:g,color:"",fontStyle:0}]);continue}let y,_,C;i.includeExplanation&&(y=t.tokenizeLine(m,l,o),_=y.tokens,C=0);const T=t.tokenizeLine2(m,l,o),O=T.tokens.length/2;for(let v=0;v<O;v++){const S=T.tokens[2*v],M=v+1<O?T.tokens[2*v+2]:m.length;if(S===M)continue;const D=T.tokens[2*v+1],z=sn(r[Kn.getForeground(D)],a),R=Kn.getFontStyle(D),V={content:m.substring(S,M),offset:g+S,color:z,fontStyle:R};if(i.includeExplanation){const G=[];if(i.includeExplanation!=="scopeName")for(const W of n.settings){let $;switch(typeof W.scope){case"string":$=W.scope.split(/,/).map(K=>K.trim());break;case"object":$=W.scope;break;default:continue}G.push({settings:W,selectors:$.map(K=>K.split(/ /))})}V.explanation=[];let Z=0;for(;S+Z<M;){const W=_[C],$=m.substring(W.startIndex,W.endIndex);Z+=$.length,V.explanation.push({content:$,scopes:i.includeExplanation==="scopeName"?a1(W.scopes):s1(G,W.scopes)}),C+=1}}c.push(V)}d.push(c),c=[],l=T.ruleStack}return{tokens:d,stateStack:l}}function a1(e){return e.map(t=>({scopeName:t}))}function s1(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const a=t[r];n[r]={scopeName:a,themeMatches:u1(e,a,t.slice(0,r))}}return n}function Hu(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function o1(e,t,n){if(!Hu(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Hu(e[r],n[i])&&(r-=1),i-=1;return r===-1}function u1(e,t,n){const r=[];for(const{selectors:i,settings:a}of e)for(const s of i)if(o1(s,t,n)){r.push(a);break}return r}function Md(e,t,n){const r=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),i=r.map(u=>{const l=Eo(e,t,{...n,theme:u.theme}),c=zr(l),d=typeof u.theme=="string"?u.theme:u.theme.name;return{tokens:l,state:c,theme:d}}),a=l1(...i.map(u=>u.tokens)),s=a[0].map((u,l)=>u.map((c,d)=>{const p={content:c.content,variants:{},offset:c.offset};return"includeExplanation"in n&&n.includeExplanation&&(p.explanation=c.explanation),a.forEach((f,m)=>{const{content:g,explanation:y,offset:_,...C}=f[l][d];p.variants[r[m].color]=C}),p})),o=i[0].state?new nr(Object.fromEntries(i.map(u=>{var l;return[u.theme,(l=u.state)==null?void 0:l.getInternalStack(u.theme)]})),i[0].state.lang):void 0;return o&&oa(s,o),s}function l1(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(u=>u[r]),a=t.map(()=>[]);t.forEach((u,l)=>u.push(a[l]));const s=i.map(()=>0),o=i.map(u=>u[0]);for(;o.every(u=>u);){const u=Math.min(...o.map(l=>l.content.length));for(let l=0;l<n;l++){const c=o[l];c.content.length===u?(a[l].push(c),s[l]+=1,o[l]=i[l][s[l]]):(a[l].push({...c,content:c.content.slice(0,u)}),o[l]={...c,content:c.content.slice(u),offset:c.offset+u})}}}return t}function ji(e,t,n){let r,i,a,s,o,u;if("themes"in n){const{defaultColor:l="light",cssVariablePrefix:c="--shiki-",colorsRendering:d="css-vars"}=n,p=Object.entries(n.themes).filter(_=>_[1]).map(_=>({color:_[0],theme:_[1]})).sort((_,C)=>_.color===l?-1:C.color===l?1:0);if(p.length===0)throw new we("`themes` option must not be empty");const f=Md(e,t,n);if(u=zr(f),l&&_o!==l&&!p.find(_=>_.color===l))throw new we(`\`themes\` option must contain the defaultColor key \`${l}\``);const m=p.map(_=>e.getTheme(_.theme)),g=p.map(_=>_.color);a=f.map(_=>_.map(C=>jg(C,g,c,l,d))),u&&oa(a,u);const y=p.map(_=>Hi(_.theme,n));i=Uu(p,m,y,c,l,"fg",d),r=Uu(p,m,y,c,l,"bg",d),s=`shiki-themes ${m.map(_=>_.name).join(" ")}`,o=l?void 0:[i,r].join(";")}else if("theme"in n){const l=Hi(n.theme,n);a=Eo(e,t,n);const c=e.getTheme(n.theme);r=sn(c.bg,l),i=sn(c.fg,l),s=c.name,u=zr(a)}else throw new we("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:s,rootStyle:o,grammarState:u}}function Uu(e,t,n,r,i,a,s){return e.map((o,u)=>{const l=sn(t[u][a],n[u])||"inherit",c=`${r+o.color}${a==="bg"?"-bg":""}:${l}`;if(u===0&&i){if(i===_o&&e.length>1){const d=e.findIndex(g=>g.color==="light"),p=e.findIndex(g=>g.color==="dark");if(d===-1||p===-1)throw new we('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const f=sn(t[d][a],n[d])||"inherit",m=sn(t[p][a],n[p])||"inherit";return`light-dark(${f}, ${m});${c}`}return l}return s==="css-vars"?c:null}).filter(o=>!!o).join(";")}function Vi(e,t,n,r={meta:{},options:n,codeToHast:(i,a)=>Vi(e,i,a),codeToTokens:(i,a)=>ji(e,i,a)}){var m,g;let i=t;for(const y of $i(n))i=((m=y.preprocess)==null?void 0:m.call(r,i,n))||i;let{tokens:a,fg:s,bg:o,themeName:u,rootStyle:l,grammarState:c}=ji(e,i,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:p=!1}=n;d===!0?a=d1(a):d==="never"&&(a=h1(a)),p&&(a=f1(a));const f={...r,get source(){return i}};for(const y of $i(n))a=((g=y.tokens)==null?void 0:g.call(f,a))||a;return c1(a,{...n,fg:s,bg:o,themeName:u,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},f,c)}function c1(e,t,n,r=zr(e)){var g,y,_,C;const i=$i(t),a=[],s={type:"root",children:[]},{structure:o="classic",tabindex:u="0"}=t,l={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?l.style=t.rootStyle:l.style=`background-color:${t.bg};color:${t.fg}`),u!==!1&&u!=null&&(l.tabindex=u.toString());for(const[T,O]of Object.entries(t.meta||{}))T.startsWith("_")||(l[T]=O);let c={type:"element",tagName:"pre",properties:l,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:a};const p=[],f={...n,structure:o,addClassToHast:Pd,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return s},get pre(){return c},get code(){return d},get lines(){return p}};if(e.forEach((T,O)=>{var M,D;O&&(o==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&a.push({type:"text",value:`
18
+ `}));let v={type:"element",tagName:"span",properties:{class:"line"},children:[]},S=0;for(const z of T){let R={type:"element",tagName:"span",properties:{...z.htmlAttrs},children:[{type:"text",value:z.content}]};const V=Ss(z.htmlStyle||Ui(z));V&&(R.properties.style=V);for(const G of i)R=((M=G==null?void 0:G.span)==null?void 0:M.call(f,R,O+1,S,v,z))||R;o==="inline"?s.children.push(R):o==="classic"&&v.children.push(R),S+=z.content.length}if(o==="classic"){for(const z of i)v=((D=z==null?void 0:z.line)==null?void 0:D.call(f,v,O+1))||v;p.push(v),a.push(v)}else o==="inline"&&p.push(v)}),o==="classic"){for(const T of i)d=((g=T==null?void 0:T.code)==null?void 0:g.call(f,d))||d;c.children.push(d);for(const T of i)c=((y=T==null?void 0:T.pre)==null?void 0:y.call(f,c))||c;s.children.push(c)}else if(o==="inline"){const T=[];let O={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const M of s.children)M.type==="element"&&M.tagName==="br"?(T.push(O),O={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(M.type==="element"||M.type==="text")&&O.children.push(M);T.push(O);let S={type:"element",tagName:"code",properties:{},children:T};for(const M of i)S=((_=M==null?void 0:M.code)==null?void 0:_.call(f,S))||S;s.children=[];for(let M=0;M<S.children.length;M++){M>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const D=S.children[M];D.type==="element"&&s.children.push(...D.children)}}let m=s;for(const T of i)m=((C=T==null?void 0:T.root)==null?void 0:C.call(f,m))||m;return r&&oa(m,r),m}function d1(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((a,s)=>{const u=!(a.fontStyle&&(a.fontStyle&je.Underline||a.fontStyle&je.Strikethrough));u&&a.content.match(/^\s+$/)&&t[s+1]?(i===void 0&&(i=a.offset),r+=a.content):r?(u?n.push({...a,offset:i,content:r+a.content}):n.push({content:r,offset:i},a),i=void 0,r=""):n.push(a)}),n})}function h1(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,a,s]=r;if(!i&&!s)return n;const o=[{...n,offset:n.offset+i.length,content:a}];return i&&o.unshift({content:i,offset:n.offset}),s&&o.push({content:s,offset:n.offset+i.length+a.length}),o}))}function f1(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],a=Ss(i.htmlStyle||Ui(i)),s=Ss(r.htmlStyle||Ui(r)),o=i.fontStyle&&(i.fontStyle&je.Underline||i.fontStyle&je.Strikethrough),u=r.fontStyle&&(r.fontStyle&je.Underline||r.fontStyle&je.Strikethrough);!o&&!u&&a===s?i.content+=r.content:n.push({...r})}return n})}const p1=Dg;function m1(e,t,n){var a;const r={meta:{},options:n,codeToHast:(s,o)=>Vi(e,s,o),codeToTokens:(s,o)=>ji(e,s,o)};let i=p1(Vi(e,t,n,r));for(const s of $i(n))i=((a=s.postprocess)==null?void 0:a.call(r,i,n))||i;return i}const $u={light:"#333333",dark:"#bbbbbb"},ju={light:"#fffffe",dark:"#1e1e1e"},Vu="__shiki_resolved";function yo(e){var o,u,l,c,d;if(e!=null&&e[Vu])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const p=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;(o=p==null?void 0:p.settings)!=null&&o.foreground&&(r=p.settings.foreground),(u=p==null?void 0:p.settings)!=null&&u.background&&(n=p.settings.background),!r&&((l=t==null?void 0:t.colors)!=null&&l["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((c=t==null?void 0:t.colors)!=null&&c["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?$u.light:$u.dark),n||(n=t.type==="light"?ju.light:ju.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const a=new Map;function s(p){var m;if(a.has(p))return a.get(p);i+=1;const f=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(m=t.colorReplacements)!=null&&m[`#${f}`]?s(p):(a.set(p,f),f)}t.settings=t.settings.map(p=>{var y,_;const f=((y=p.settings)==null?void 0:y.foreground)&&!p.settings.foreground.startsWith("#"),m=((_=p.settings)==null?void 0:_.background)&&!p.settings.background.startsWith("#");if(!f&&!m)return p;const g={...p,settings:{...p.settings}};if(f){const C=s(p.settings.foreground);t.colorReplacements[C]=p.settings.foreground,g.settings.foreground=C}if(m){const C=s(p.settings.background);t.colorReplacements[C]=p.settings.background,g.settings.background=C}return g});for(const p of Object.keys(t.colors||{}))if((p==="editor.foreground"||p==="editor.background"||p.startsWith("terminal.ansi"))&&!((d=t.colors[p])!=null&&d.startsWith("#"))){const f=s(t.colors[p]);t.colorReplacements[f]=t.colors[p],t.colors[p]=f}return Object.defineProperty(t,Vu,{enumerable:!1,writable:!1,value:!0}),t}async function Bd(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Rd(t)).map(async t=>await Ld(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Fd(e){return(await Promise.all(e.map(async n=>Od(n)?null:yo(await Ld(n))))).filter(n=>!!n)}let g1=3;function b1(e,t=3){t>g1||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Wn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Hd(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Wn(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class _1 extends C0{constructor(n,r,i,a={}){super(n);P(this,"_resolvedThemes",new Map);P(this,"_resolvedGrammars",new Map);P(this,"_langMap",new Map);P(this,"_langGraph",new Map);P(this,"_textmateThemeCache",new WeakMap);P(this,"_loadedThemesCache",null);P(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=i,this._alias=a,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=yo(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=Pi.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=Hd(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var s,o,u,l;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(c=>{var d;return(d=c.embeddedLangsLazy)==null?void 0:d.includes(n.name)}));this._resolver.addLanguage(n);const i={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const a=this.loadGrammarWithConfiguration(n.scopeName,1,i);if(a.name=n.name,this._resolvedGrammars.set(n.name,a),n.aliases&&n.aliases.forEach(c=>{this._alias[c]=n.name}),this._loadedLanguagesCache=null,r.size)for(const c of r)this._resolvedGrammars.delete(c.name),this._loadedLanguagesCache=null,(o=(s=this._syncRegistry)==null?void 0:s._injectionGrammars)==null||o.delete(c.scopeName),(l=(u=this._syncRegistry)==null?void 0:u._grammars)==null||l.delete(c.scopeName),this.loadLanguage(this._langMap.get(c.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const a of n)this.resolveEmbeddedLanguages(a);const r=Array.from(this._langGraph.entries()),i=r.filter(([a,s])=>!s);if(i.length){const a=r.filter(([s,o])=>{if(!o)return!1;const u=o.embeddedLanguages||o.embeddedLangs;return u==null?void 0:u.some(l=>i.map(([c])=>c).includes(l))}).filter(s=>!i.includes(s));throw new Wn(`Missing languages ${i.map(([s])=>`\`${s}\``).join(", ")}, required by ${a.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[a,s]of r)this._resolver.addLanguage(s);for(const[a,s]of r)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const r=n.embeddedLanguages??n.embeddedLangs;if(r)for(const i of r)this._langGraph.set(i,this._langMap.get(i))}}class E1{constructor(t,n){P(this,"_langs",new Map);P(this,"_scopeToLang",new Map);P(this,"_injections",new Map);P(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let i=1;i<=n.length;i++){const a=n.slice(0,i).join(".");r=[...r,...this._injections.get(a)||[]]}return r}}let pr=0;function T1(e){pr+=1,e.warnings!==!1&&pr>=10&&pr%10===0&&console.warn(`[Shiki] ${pr} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Wn("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(yo),i=new E1(e.engine,n),a=new _1(i,r,n,e.langAlias);let s;function o(T){return Hd(T,e.langAlias)}function u(T){_();const O=a.getGrammar(typeof T=="string"?T:T.name);if(!O)throw new Wn(`Language \`${T}\` not found, you may need to load it first`);return O}function l(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();const O=a.getTheme(T);if(!O)throw new Wn(`Theme \`${T}\` not found, you may need to load it first`);return O}function c(T){_();const O=l(T);s!==T&&(a.setTheme(O),s=T);const v=a.getColorMap();return{theme:O,colorMap:v}}function d(){return _(),a.getLoadedThemes()}function p(){return _(),a.getLoadedLanguages()}function f(...T){_(),a.loadLanguages(T.flat(1))}async function m(...T){return f(await Bd(T))}function g(...T){_();for(const O of T.flat(1))a.loadTheme(O)}async function y(...T){return _(),g(await Fd(T))}function _(){if(t)throw new Wn("Shiki instance has been disposed")}function C(){t||(t=!0,a.dispose(),pr-=1)}return{setTheme:c,getTheme:l,getLanguage:u,getLoadedThemes:d,getLoadedLanguages:p,resolveLangAlias:o,loadLanguage:m,loadLanguageSync:f,loadTheme:y,loadThemeSync:g,dispose:C,[Symbol.dispose]:C}}async function y1(e){e.engine||b1("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Fd(e.themes||[]),Bd(e.langs||[]),e.engine]);return T1({...e,themes:t,langs:n,engine:r})}async function k1(e){const t=await y1(e);return{getLastGrammarState:(...n)=>r1(t,...n),codeToTokensBase:(n,r)=>Eo(t,n,r),codeToTokensWithThemes:(n,r)=>Md(t,n,r),codeToTokens:(n,r)=>ji(t,n,r),codeToHast:(n,r)=>Vi(t,n,r),codeToHtml:(n,r)=>m1(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function x1(e){const t=e.langs,n=e.themes,r=e.engine;async function i(a){function s(d){var p;if(typeof d=="string"){if(d=((p=a.langAlias)==null?void 0:p[d])||d,Rd(d))return[];const f=t[d];if(!f)throw new we(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function o(d){if(Od(d))return"none";if(typeof d=="string"){const p=n[d];if(!p)throw new we(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return p}return d}const u=(a.themes??[]).map(d=>o(d)),l=(a.langs??[]).map(d=>s(d)),c=await k1({engine:a.engine??r(),...a,themes:u,langs:l});return{...c,loadLanguage(...d){return c.loadLanguage(...d.map(s))},loadTheme(...d){return c.loadTheme(...d.map(o))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}const ko=[{id:"abap",name:"ABAP",import:(()=>b(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>b(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>b(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>b(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>b(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>b(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>b(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>b(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>b(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>b(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>b(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>b(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>b(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>b(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>b(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>b(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>b(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>b(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>b(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>b(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>b(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>b(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>b(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>b(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>b(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>b(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>b(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>b(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>b(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>b(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>b(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>b(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>b(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>b(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>b(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>b(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>b(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>b(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>b(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>b(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>b(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>b(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>b(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>b(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>b(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>b(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>b(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>b(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>b(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>b(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>b(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>b(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>b(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>b(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>b(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>b(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>b(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>b(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>b(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>b(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>b(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>b(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>b(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>b(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>b(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>b(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>b(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>b(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>b(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>b(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>b(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>b(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>b(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>b(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>b(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>b(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>b(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>b(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>b(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>b(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>b(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>b(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>b(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>b(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>b(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>b(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>b(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>b(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>b(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>b(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>b(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>b(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>b(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>b(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>b(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>b(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>b(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>b(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>b(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>b(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>b(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>b(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>b(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>b(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>b(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>b(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>b(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>b(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>b(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>b(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>b(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>b(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>b(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>b(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>b(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>b(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>b(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>b(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>b(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>b(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>b(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>b(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>b(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>b(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>b(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>b(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>b(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>b(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>b(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>b(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>b(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>b(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>b(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>b(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>b(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>b(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>b(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>b(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>b(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>b(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>b(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>b(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>b(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>b(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>b(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>b(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>b(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>b(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>b(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>b(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>b(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>b(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>b(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>b(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>b(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>b(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>b(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>b(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>b(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>b(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>b(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>b(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>b(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>b(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>b(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>b(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>b(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>b(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>b(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>b(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>b(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>b(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>b(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>b(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>b(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>b(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>b(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>b(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>b(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>b(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>b(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>b(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>b(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>b(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>b(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>b(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>b(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>b(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>b(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>b(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>b(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>b(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>b(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>b(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>b(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>b(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>b(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>b(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>b(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>b(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>b(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>b(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>b(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>b(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>b(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>b(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>b(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>b(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>b(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>b(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>b(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>b(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>b(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>b(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>b(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>b(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>b(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>b(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>b(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>b(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>b(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>b(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>b(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>b(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>b(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>b(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>b(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>b(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>b(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>b(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>b(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>b(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>b(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>b(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>b(()=>import("./zig-VOosw3JB.js"),[]))}],A1=Object.fromEntries(ko.map(e=>[e.id,e.import])),C1=Object.fromEntries(ko.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),Ud={...A1,...C1},w1=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>b(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>b(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>b(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>b(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>b(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>b(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>b(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>b(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>b(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>b(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>b(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>b(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>b(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>b(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>b(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>b(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>b(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>b(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>b(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>b(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>b(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>b(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>b(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>b(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>b(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>b(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>b(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>b(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>b(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>b(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>b(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>b(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>b(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>b(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>b(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>b(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>b(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>b(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>b(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>b(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>b(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>b(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>b(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>b(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>b(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>b(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>b(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>b(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>b(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>b(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>b(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>b(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>b(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>b(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>b(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>b(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>b(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>b(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>b(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>b(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>b(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>b(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>b(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>b(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>b(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],I1=Object.fromEntries(w1.map(e=>[e.id,e.import]));class xo extends Error{constructor(t){super(t),this.name="ShikiError"}}function S1(){return 2147483648}function N1(){return typeof performance<"u"?performance.now():Date.now()}const L1=(e,t)=>e+(t-e%t)%t;async function R1(e){let t,n;const r={};function i(f){n=f,r.HEAPU8=new Uint8Array(f),r.HEAPU32=new Uint32Array(f)}function a(f,m,g){r.HEAPU8.copyWithin(f,m,m+g)}function s(f){try{return t.grow(f-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function o(f){const m=r.HEAPU8.length;f=f>>>0;const g=S1();if(f>g)return!1;for(let y=1;y<=4;y*=2){let _=m*(1+.2/y);_=Math.min(_,f+100663296);const C=Math.min(g,L1(Math.max(f,_),65536));if(s(C))return!0}return!1}const u=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(f,m,g=1024){const y=m+g;let _=m;for(;f[_]&&!(_>=y);)++_;if(_-m>16&&f.buffer&&u)return u.decode(f.subarray(m,_));let C="";for(;m<_;){let T=f[m++];if(!(T&128)){C+=String.fromCharCode(T);continue}const O=f[m++]&63;if((T&224)===192){C+=String.fromCharCode((T&31)<<6|O);continue}const v=f[m++]&63;if((T&240)===224?T=(T&15)<<12|O<<6|v:T=(T&7)<<18|O<<12|v<<6|f[m++]&63,T<65536)C+=String.fromCharCode(T);else{const S=T-65536;C+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return C}function c(f,m){return f?l(r.HEAPU8,f,m):""}const d={emscripten_get_now:N1,emscripten_memcpy_big:a,emscripten_resize_heap:o,fd_write:()=>0};async function p(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=c}return await p(),r}var O1=Object.defineProperty,P1=(e,t,n)=>t in e?O1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Le=(e,t,n)=>P1(e,typeof t!="symbol"?t+"":t,n);let ve=null;function D1(e){throw new xo(e.UTF8ToString(e.getLastOnigError()))}class ua{constructor(t){Le(this,"utf16Length"),Le(this,"utf8Length"),Le(this,"utf16Value"),Le(this,"utf8Value"),Le(this,"utf16OffsetToUtf8"),Le(this,"utf8OffsetToUtf16");const n=t.length,r=ua._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const o=new Uint8Array(r);let u=0;for(let l=0;l<n;l++){const c=t.charCodeAt(l);let d=c,p=!1;if(c>=55296&&c<=56319&&l+1<n){const f=t.charCodeAt(l+1);f>=56320&&f<=57343&&(d=(c-55296<<10)+65536|f-56320,p=!0)}i&&(a[l]=u,p&&(a[l+1]=u),d<=127?s[u+0]=l:d<=2047?(s[u+0]=l,s[u+1]=l):d<=65535?(s[u+0]=l,s[u+1]=l,s[u+2]=l):(s[u+0]=l,s[u+1]=l,s[u+2]=l,s[u+3]=l)),d<=127?o[u++]=d:d<=2047?(o[u++]=192|(d&1984)>>>6,o[u++]=128|(d&63)>>>0):d<=65535?(o[u++]=224|(d&61440)>>>12,o[u++]=128|(d&4032)>>>6,o[u++]=128|(d&63)>>>0):(o[u++]=240|(d&1835008)>>>18,o[u++]=128|(d&258048)>>>12,o[u++]=128|(d&4032)>>>6,o[u++]=128|(d&63)>>>0),p&&l++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const a=t.charCodeAt(r);let s=a,o=!1;if(a>=55296&&a<=56319&&r+1<i){const u=t.charCodeAt(r+1);u>=56320&&u<=57343&&(s=(a-55296<<10)+65536|u-56320,o=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,o&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const la=class Ct{constructor(t){if(Le(this,"id",++Ct.LAST_ID),Le(this,"_onigBinding"),Le(this,"content"),Le(this,"utf16Length"),Le(this,"utf8Length"),Le(this,"utf16OffsetToUtf8"),Le(this,"utf8OffsetToUtf16"),Le(this,"ptr"),!ve)throw new xo("Must invoke loadWasm first.");this._onigBinding=ve,this.content=t;const n=new ua(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ct._sharedPtrInUse?(Ct._sharedPtr||(Ct._sharedPtr=ve.omalloc(1e4)),Ct._sharedPtrInUse=!0,ve.HEAPU8.set(n.utf8Value,Ct._sharedPtr),this.ptr=Ct._sharedPtr):this.ptr=n.createString(ve)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Ct._sharedPtr?Ct._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Le(la,"LAST_ID",0);Le(la,"_sharedPtr",0);Le(la,"_sharedPtrInUse",!1);let $d=la;class v1{constructor(t){if(Le(this,"_onigBinding"),Le(this,"_ptr"),!ve)throw new xo("Must invoke loadWasm first.");const n=[],r=[];for(let o=0,u=t.length;o<u;o++){const l=new ua(t[o]);n[o]=l.createString(ve),r[o]=l.utf8Length}const i=ve.omalloc(4*t.length);ve.HEAPU32.set(n,i/4);const a=ve.omalloc(4*t.length);ve.HEAPU32.set(r,a/4);const s=ve.createOnigScanner(i,a,t.length);for(let o=0,u=t.length;o<u;o++)ve.ofree(n[o]);ve.ofree(a),ve.ofree(i),s===0&&D1(ve),this._onigBinding=ve,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new $d(t);const a=this._findNextMatchSync(t,n,!1,i);return t.dispose(),a}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const a=this._onigBinding,s=a.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(s===0)return null;const o=a.HEAPU32;let u=s/4;const l=o[u++],c=o[u++],d=[];for(let p=0;p<c;p++){const f=t.convertUtf8OffsetToUtf16(o[u++]),m=t.convertUtf8OffsetToUtf16(o[u++]);d[p]={start:f,end:m,length:m-f}}return{index:l,captureIndices:d}}}function M1(e){return typeof e.instantiator=="function"}function B1(e){return typeof e.default=="function"}function F1(e){return typeof e.data<"u"}function H1(e){return typeof Response<"u"&&e instanceof Response}function U1(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let ci;function $1(e){if(ci)return ci;async function t(){ve=await R1(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),M1(r)?r=await r.instantiator(n):B1(r)?r=await r.default(n):(F1(r)&&(r=r.data),H1(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await j1(r)(n):r=await V1(r)(n):U1(r)?r=await Ua(r)(n):r instanceof WebAssembly.Module?r=await Ua(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Ua(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return ci=t(),ci}function Ua(e){return t=>WebAssembly.instantiate(e,t)}function j1(e){return t=>WebAssembly.instantiateStreaming(e,t)}function V1(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function z1(e){return e&&await $1(e),{createScanner(t){return new v1(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new $d(t)}}}const G1=x1({langs:Ud,themes:I1,engine:()=>z1(b(()=>import("./wasm-CG6Dc4jp.js"),[]))});function rr(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function q1(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Ao=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Me=String.raw;function ir(e,t){if(e==null)throw new Error(t??"Value expected");return e}const jd=Me`\[\^?`,Vd=`c.? | C(?:-.?)?|${Me`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Me`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Me`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Me`o\{[^\}]*\}?`}|${Me`\d{1,3}`}`,Co=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,di=new RegExp(Me`
19
+ \\ (?:
20
+ ${Vd}
21
+ | [gk]<[^>]*>?
22
+ | [gk]'[^']*'?
23
+ | .
24
+ )
25
+ | \( (?:
26
+ \? (?:
27
+ [:=!>({]
28
+ | <[=!]
29
+ | <[^>]*>
30
+ | '[^']*'
31
+ | ~\|?
32
+ | #(?:[^)\\]|\\.?)*
33
+ | [^:)]*[:)]
34
+ )?
35
+ | \*[^\)]*\)?
36
+ )?
37
+ | (?:${Co.source})+
38
+ | ${jd}
39
+ | .
40
+ `.replace(/\s+/g,""),"gsu"),$a=new RegExp(Me`
41
+ \\ (?:
42
+ ${Vd}
43
+ | .
44
+ )
45
+ | \[:(?:\^?\p{Alpha}+|\^):\]
46
+ | ${jd}
47
+ | &&
48
+ | .
49
+ `.replace(/\s+/g,""),"gsu");function W1(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=hb(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(d){i.push(d)},replaceCurrentModX(d){i[i.length-1]=d},singleline:n.rules.singleline};let s=[],o;for(di.lastIndex=0;o=di.exec(e);){const d=Y1(a,e,o[0],di.lastIndex);d.tokens?s.push(...d.tokens):d.token&&s.push(d.token),d.lastIndex!==void 0&&(di.lastIndex=d.lastIndex)}const u=[];let l=0;s.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++l:d.raw==="("&&u.push(d)}),l||u.forEach((d,p)=>{d.kind="capturing",d.number=p+1});const c=l||u.length;return{tokens:s.map(d=>d.type==="EscapedNumber"?pb(d,c):d).flat(),flags:r}}function Y1(e,t,n,r){const[i,a]=n;if(n==="["||n==="[^"){const s=Q1(t,n,r);return{tokens:s.tokens,lastIndex:s.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(a))return{token:zu(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:ab(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Gd(n)}}if(a==="K")return{token:qd("keep",n)};if(a==="N"||a==="R")return{token:kn("newline",n,{negate:a==="N"})};if(a==="O")return{token:kn("any",n)};if(a==="X")return{token:kn("text_segment",n)};const s=zd(n,{inCharClass:!1});return Array.isArray(s)?{tokens:s}:{token:s}}if(i==="("){if(a==="*")return{token:lb(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:ub(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:zn("group",n)};if(n==="(?>")return{token:zn("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:zn(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:zn("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:zn("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:nb(n)}}if(e.getCurrentModX()){if(n==="#"){const s=t.indexOf(`
50
+ `,r);return{lastIndex:s===-1?t.length:s}}if(/^\s$/.test(n)){const s=/\s+/y;return s.lastIndex=r,{lastIndex:s.exec(t)?s.lastIndex:r}}}if(n===".")return{token:kn("dot",n)};if(n==="^"||n==="$"){const s=e.singleline?{"^":Me`\A`,$:Me`\Z`}[n]:n;return{token:zu(s,n)}}return n==="|"?{token:K1(n)}:Co.test(n)?{tokens:mb(n)}:{token:jt(rr(n),n)}}function Q1(e,t,n){const r=[Gu(t[1]==="^",t)];let i=1,a;for($a.lastIndex=n;a=$a.exec(e);){const s=a[0];if(s[0]==="["&&s[1]!==":")i++,r.push(Gu(s[1]==="^",s));else if(s==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(jt(93,s));else if(i--,r.push(Z1(s)),!i)break}else{const o=X1(s);Array.isArray(o)?r.push(...o):r.push(o)}}return{tokens:r,lastIndex:$a.lastIndex||e.length}}function X1(e){if(e[0]==="\\")return zd(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Ao.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return kn("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?J1(e):e==="&&"?eb(e):jt(rr(e),e)}function zd(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return ob(e);if("dDhHsSwW".includes(n))return cb(e);if(e.startsWith(Me`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return db(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(s=>parseInt(s,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),a=new TextEncoder;return[...i].map(s=>{const o=[...a.encode(s)].map(u=>`\\x${u.toString(16)}`).join("");return jt(rr(s),o)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return jt(fb(e),e);if(qu.has(n))return jt(qu.get(n),e);if(/\d/.test(n))return tb(t,e);if(e==="\\")throw new Error(Me`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return jt(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function K1(e){return{type:"Alternator",raw:e}}function zu(e,t){return{type:"Assertion",kind:e,raw:t}}function Gd(e){return{type:"Backreference",raw:e}}function jt(e,t){return{type:"Character",value:e,raw:t}}function Z1(e){return{type:"CharacterClassClose",raw:e}}function J1(e){return{type:"CharacterClassHyphen",raw:e}}function eb(e){return{type:"CharacterClassIntersector",raw:e}}function Gu(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function kn(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function qd(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:ir(n.flags),raw:t}}function tb(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function nb(e){return{type:"GroupClose",raw:e}}function zn(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function rb(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function ib(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function ab(e){return{type:"Subroutine",raw:e}}const sb=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),qu=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function ob(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return jt(rr(t.toUpperCase())-64,e)}function ub(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),a=Yu(n),s=Yu(r),o={};if(a&&(o.enable=a),s&&(o.disable=s),e.endsWith(")"))return t.replaceCurrentModX(i),qd("flags",e,{flags:o});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,zn("group",e,{...(a||s)&&{flags:o}});throw new Error(`Unexpected flag modifier "${e}"`)}function lb(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const a=i?i.split(",").filter(c=>c!=="").map(c=>/^[+-]?\d+$/.test(c)?+c:c):[],[s,o,u]=a,l=sb.has(n)?n.toLowerCase():"custom";switch(l){case"fail":case"mismatch":case"skip":if(a.length>0)throw new Error(`Named callout arguments not allowed "${a}"`);break;case"error":if(a.length>1)throw new Error(`Named callout allows only one argument "${a}"`);if(typeof s=="string")throw new Error(`Named callout argument must be a number "${s}"`);break;case"max":if(!a.length||a.length>2)throw new Error(`Named callout must have one or two arguments "${a}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument one must be a tag or number "${s}"`);if(a.length===2&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${o}"`);break;case"count":case"total_count":if(a.length>1)throw new Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof s=="number"||!/^[<>X]$/.test(s)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${s}"`);break;case"cmp":if(a.length!==3)throw new Error(`Named callout must have three arguments "${a}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument one must be a tag or number "${s}"`);if(typeof o=="number"||!/^(?:[<>!=]=|[<>])$/.test(o))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${o}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument three must be a tag or number "${u}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${l}"`)}return rb(l,r??null,(i==null?void 0:i.split(","))??null,e)}function Wu(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,s=1e5;if(+i>s||a&&+a>s)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=a===void 0?+i:a===""?1/0:+a,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return ib(t,n,r,e)}function cb(e){const t=e[1].toLowerCase();return kn({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function db(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return kn("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function Yu(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function hb(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function fb(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function pb(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[Gd(n)];const a=[],s=i.match(/^[0-7]+|\d/g);for(let o=0;o<s.length;o++){const u=s[o];let l;if(o===0&&u!=="8"&&u!=="9"){if(l=parseInt(u,8),l>127)throw new Error(Me`Octal encoded byte above 177 unsupported "${n}"`)}else l=rr(u);a.push(jt(l,(o===0?"\\":"")+u))}return a}function mb(e){const t=[],n=new RegExp(Co,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const a=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(a){const{min:s,max:o}=a.groups;if(+s>+o&&i.endsWith("?")){n.lastIndex--,t.push(Wu(i.slice(0,-1)));continue}}}t.push(Wu(i))}return t}function Wd(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function gb(e){return bb.has(e.type)}const bb=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Yd(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=W1(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(p,f)=>{const m=r.tokens[a.nextIndex];switch(a.parent=p,a.nextIndex++,m.type){case"Alternator":return Nn();case"Assertion":return _b(m);case"Backreference":return Eb(m,a);case"Character":return ca(m.value,{useLastValid:!!f.isCheckingRangeEnd});case"CharacterClassHyphen":return Tb(m,a,f);case"CharacterClassOpen":return yb(m,a,f);case"CharacterSet":return kb(m,a);case"Directive":return Sb(m.kind,{flags:m.flags});case"GroupOpen":return xb(m,a,f);case"NamedCallout":return Lb(m.kind,m.tag,m.arguments);case"Quantifier":return Ab(m,a);case"Subroutine":return Cb(m,a);default:throw new Error(`Unexpected token type "${m.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},s=Ob(Nb(r.flags));let o=s.body[0];for(;a.nextIndex<r.tokens.length;){const p=i(o,{});p.type==="Alternative"?(s.body.push(p),o=p):o.body.push(p)}const{capturingGroups:u,hasNumberedRef:l,namedGroupsByName:c,subroutines:d}=a;if(l&&c.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:p}of d)if(typeof p=="number"){if(p>u.length)throw new Error("Subroutine uses a group number that's not defined");p&&(u[p-1].isSubroutined=!0)}else if(c.has(p)){if(c.get(p).length>1)throw new Error(Me`Subroutine uses a duplicate group name "\g<${p}>"`);c.get(p)[0].isSubroutined=!0}else throw new Error(Me`Subroutine uses a group name that's not defined "\g<${p}>"`);return s}function _b({kind:e}){return Ns(ir({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Me`\B`||e===Me`\Y`})}function Eb({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(a,s=!1)=>{const o=t.capturingGroups.length;let u=!1;if(a>o)if(t.skipBackrefValidation)u=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Ls(s?o+1-a:a,{orphan:u})};if(n){const a=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(a)return i(+a.groups.num,!!a.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return Ls(r)}return i(+r)}function Tb(e,t,n){const{tokens:r,walk:i}=t,a=t.parent,s=a.body.at(-1),o=r[t.nextIndex];if(!n.isCheckingRangeEnd&&s&&s.type!=="CharacterClass"&&s.type!=="CharacterClassRange"&&o&&o.type!=="CharacterClassOpen"&&o.type!=="CharacterClassClose"&&o.type!=="CharacterClassIntersector"){const u=i(a,{...n,isCheckingRangeEnd:!0});if(s.type==="Character"&&u.type==="Character")return a.body.pop(),Ib(s,u);throw new Error("Invalid character class range")}return ca(rr("-"))}function yb({negate:e},t,n){const{tokens:r,walk:i}=t,a=[Ii()],s=r[t.nextIndex];let o=Ku(s);for(;o.type!=="CharacterClassClose";){if(o.type==="CharacterClassIntersector")a.push(Ii()),t.nextIndex++;else{const l=a.at(-1);l.body.push(i(l,n))}o=Ku(r[t.nextIndex],s)}const u=Ii({negate:e});return a.length===1?u.body=a[0].body:(u.kind="intersection",u.body=a.map(l=>l.body.length===1?l.body[0]:l)),t.nextIndex++,u}function kb({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:s}=r;if(e==="property"){const o=da(n);if(Ao.has(o)&&!(s!=null&&s.has(o)))e="posix",n=o;else return Gn(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:s})}return e==="posix"?Rb(n,{negate:t}):Rs(e,{negate:t})}function xb(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:s,walk:o}=t,u=Pb(e),l=u.type==="AbsenceFunction",c=Xu(u),d=c&&u.negate;if(u.type==="CapturingGroup"&&(i.push(u),u.name&&q1(a,u.name,[]).push(u)),l&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let p=Zu(r[t.nextIndex]);for(;p.type!=="GroupClose";){if(p.type==="Alternator")u.body.push(Nn()),t.nextIndex++;else{const f=u.body.at(-1),m=o(f,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||c,isInNegLookbehind:n.isInNegLookbehind||d});if(f.body.push(m),(c||n.isInLookbehind)&&!s){const g="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(Qu(m)||m.type==="CapturingGroup")throw new Error(g)}else if(Qu(m)||Xu(m)&&m.negate)throw new Error(g)}}p=Zu(r[t.nextIndex])}return t.nextIndex++,u}function Ab({kind:e,min:t,max:n},r){const i=r.parent,a=i.body.at(-1);if(!a||!gb(a))throw new Error("Quantifier requires a repeatable token");const s=Xd(e,t,n,a);return i.body.pop(),s}function Cb({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){const o=+a.groups.num,u=n.length;if(t.hasNumberedRef=!0,i={"":o,"+":u+o,"-":u+1-o}[a.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const s=Kd(i);return r.push(s),s}function wb(e,t){return{type:"AbsenceFunction",kind:e,body:Zr(t==null?void 0:t.body)}}function Nn(e){return{type:"Alternative",body:Zd(e==null?void 0:e.body)}}function Ns(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function Ls(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function Qd(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Db(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Zr(t==null?void 0:t.body)}}function ca(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function Ii(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Zd(e==null?void 0:e.body)}}function Ib(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Rs(e,t){const n=!!(t!=null&&t.negate),r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function Sb(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:ir(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function Nb(e){return{type:"Flags",...e}}function gt(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Zr(e==null?void 0:e.body)}}function _n(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Zr(e==null?void 0:e.body)}}function Lb(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function Rb(e,t){const n=!!(t!=null&&t.negate);if(!Ao.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function Xd(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function Ob(e,t){return{type:"Regex",body:Zr(t==null?void 0:t.body),flags:e}}function Kd(e){return{type:"Subroutine",ref:e}}function Gn(e,t){var i;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(i=n.unicodePropertyMap)==null?void 0:i.get(da(e));if(!r){if(n.normalizeUnknownPropertyNames)r=vb(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Me`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function Pb({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return wb("repeater");case"atomic":return gt({atomic:!0});case"capturing":return Qd(i,{name:n});case"group":return gt({flags:e});case"lookahead":case"lookbehind":return _n({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Zr(e){if(e===void 0)e=[Nn()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function Zd(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function Qu(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Xu(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Db(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function vb(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function da(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Ku(e,t){const n=t;return ir(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function Zu(e){return ir(e,"Unclosed group")}function Lr(e,t,n=null){function r(a,s){for(let o=0;o<a.length;o++){const u=i(a[o],s,o,a);o=Math.max(-1,o+u)}}function i(a,s=null,o=null,u=null){var _,C;let l=0,c=!1;const d={node:a,parent:s,key:o,container:u,root:e,remove(){hi(u).splice(Math.max(0,Un(o)+l),1),l--,c=!0},removeAllNextSiblings(){return hi(u).splice(Un(o)+1)},removeAllPrevSiblings(){const T=Un(o)+l;return l-=T,hi(u).splice(0,Math.max(0,T))},replaceWith(T,O={}){const v=!!O.traverse;u?u[Math.max(0,Un(o)+l)]=T:ir(s,"Can't replace root node")[o]=T,v&&i(T,s,o,u),c=!0},replaceWithMultiple(T,O={}){const v=!!O.traverse;if(hi(u).splice(Math.max(0,Un(o)+l),1,...T),l+=T.length-1,v){let S=0;for(let M=0;M<T.length;M++)S+=i(T[M],s,Un(o)+M+S,u)}c=!0},skip(){c=!0}},{type:p}=a,f=t["*"],m=t[p],g=typeof f=="function"?f:f==null?void 0:f.enter,y=typeof m=="function"?m:m==null?void 0:m.enter;if(g==null||g(d,n),y==null||y(d,n),!c)switch(p){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(a.body,a);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(a.min,a,"min"),i(a.max,a,"max");break;case"Quantifier":i(a.body,a,"body");break;case"Regex":r(a.body,a),i(a.flags,a,"flags");break;default:throw new Error(`Unexpected node type "${p}"`)}return(_=m==null?void 0:m.exit)==null||_.call(m,d,n),(C=f==null?void 0:f.exit)==null||C.call(f,d,n),l}return i(e),e}function hi(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Un(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const Mb=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Bb(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Fb(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const ht=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function wo(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),a=[!1];let s=0,o="";for(const u of e.matchAll(i)){const{0:l,groups:{$skip:c}}=u;if(!c&&(!r||r===ht.DEFAULT==!s)){n instanceof Function?o+=n(u,{context:s?ht.CHAR_CLASS:ht.DEFAULT,negated:a[a.length-1]}):o+=n;continue}l[0]==="["?(s++,a.push(l[1]==="^")):l==="]"&&s&&(s--,a.pop()),o+=l}return o}function Jd(e,t,n,r){wo(e,t,n,r)}function Hb(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let a=0,s;for(;s=i.exec(e);){const{0:o,groups:{$skip:u}}=s;if(!u&&(!r||r===ht.DEFAULT==!a))return s;o==="["?a++:o==="]"&&a&&a--,i.lastIndex==s.index&&i.lastIndex++}return null}function fi(e,t,n){return!!Hb(e,t,0,n)}function Ub(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,s;for(;s=n.exec(e);){const[o]=s;if(o==="[")i++;else if(i)o==="]"&&i--;else if(o==="(")a++;else if(o===")"&&(a--,!a)){r=s.index;break}}return e.slice(t,r)}const Ju=new RegExp(String.raw`(?<noncapturingStart>${Mb})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function $b(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let r=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",a="(?:(?=(",s=[0],o=[];let u=0,l=0,c=NaN,d;do{d=!1;let p=0,f=0,m=!1,g;for(Ju.lastIndex=Number.isNaN(c)?0:c+a.length;g=Ju.exec(e);){const{0:y,index:_,groups:{capturingStart:C,noncapturingStart:T}}=g;if(y==="[")p++;else if(p)y==="]"&&p--;else if(y===i&&!m)c=_,m=!0;else if(m&&T)f++;else if(C)m?f++:(u++,s.push(u+l));else if(y===")"&&m){if(!f){l++;const O=u+l;if(e=`${e.slice(0,c)}${a}${e.slice(c+i.length,_)}))<$$${O}>)${e.slice(_+1)}`,d=!0,o.push(O),Bb(n,O),r.size){const v=new Map;r.forEach((S,M)=>{v.set(M>=O?M+1:M,S.map(D=>D>=O?D+1:D))}),r=v}break}f--}}}while(d);return n.push(...o),e=wo(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:p,groups:{backrefNum:f,wrappedBackrefNum:m}})=>{if(f){const g=+f;if(g>s.length-1)throw new Error(`Backref "${p}" greater than number of captures`);return`\\${s[g]}`}return`\\${m}`},ht.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const eh=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,ja=new RegExp(String.raw`
51
+ \\(?: \d+
52
+ | c[A-Za-z]
53
+ | [gk]<[^>]+>
54
+ | [pPu]\{[^\}]+\}
55
+ | u[A-Fa-f\d]{4}
56
+ | x[A-Fa-f\d]{2}
57
+ )
58
+ | \((?: \? (?: [:=!>]
59
+ | <(?:[=!]|[^>]+>)
60
+ | [A-Za-z\-]+:
61
+ | \(DEFINE\)
62
+ ))?
63
+ | (?<qBase>${eh})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
64
+ | \\?.
65
+ `.replace(/\s+/g,""),"gsu");function jb(e){if(!new RegExp(`${eh}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",a=0,s;for(ja.lastIndex=0;s=ja.exec(e);){const{0:o,index:u,groups:{qBase:l,qMod:c,invalidQ:d}}=s;if(o==="[")a||(r=u),a++;else if(o==="]")a?a--:r=null;else if(!a)if(c==="+"&&i&&!i.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${o}"`);let p=-1;if(/^\{\d+\}$/.test(l))e=Fb(e,u+l.length,c,"");else{if(i===")"||i==="]"){const f=i===")"?n:r;if(f===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,f)}(?>${e.slice(f,u)}${l})${e.slice(u+o.length)}`}else e=`${e.slice(0,u-i.length)}(?>${i}${l})${e.slice(u+o.length)}`;p+=4}ja.lastIndex+=p}else o[0]==="("?t.push(u):o===")"&&(n=t.length?t.pop():null);i=o}return{pattern:e}}const dt=String.raw,Vb=dt`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Os=dt`\(\?R=(?<rDepth>[^\)]+)\)|${Vb}`,ha=dt`\(\?<(?![=!])(?<captureName>[^>]+)>`,th=dt`${ha}|(?<unnamed>\()(?!\?)`,fn=new RegExp(dt`${ha}|${Os}|\(\?|\\?.`,"gsu"),Va="Cannot use multiple overlapping recursions";function zb(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(Os,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&fi(e,dt`\(\?\(DEFINE\)`,ht.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const a=[],s=fi(e,dt`\\[1-9]`,ht.DEFAULT),o=new Map,u=[];let l=!1,c=0,d=0,p;for(fn.lastIndex=0;p=fn.exec(e);){const{0:f,groups:{captureName:m,rDepth:g,gRNameOrNum:y,gRDepth:_}}=p;if(f==="[")c++;else if(c)f==="]"&&c--;else if(g){if(el(g),l)throw new Error(Va);if(s)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const C=e.slice(0,p.index),T=e.slice(fn.lastIndex);if(fi(T,Os,ht.DEFAULT))throw new Error(Va);const O=+g-1;e=tl(C,T,O,!1,n,a,d),i=rl(i,C,O,a.length,0,d);break}else if(y){el(_);let C=!1;for(const G of u)if(G.name===y||G.num===+y){if(C=!0,G.hasRecursedWithin)throw new Error(Va);break}if(!C)throw new Error(dt`Recursive \g cannot be used outside the referenced group "${r==="external"?y:dt`\g<${y}&R=${_}>`}"`);const T=o.get(y),O=Ub(e,T);if(s&&fi(O,dt`${ha}|\((?!\?)`,ht.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const v=e.slice(T,p.index),S=O.slice(v.length+f.length),M=a.length,D=+_-1,z=tl(v,S,D,!0,n,a,d);i=rl(i,v,D,a.length-M,M,d);const R=e.slice(0,T),V=e.slice(T+O.length);e=`${R}${z}${V}`,fn.lastIndex+=z.length-f.length-v.length-S.length,u.forEach(G=>G.hasRecursedWithin=!0),l=!0}else if(m)d++,o.set(String(d),fn.lastIndex),o.set(m,fn.lastIndex),u.push({num:d,name:m});else if(f[0]==="("){const C=f==="(";C&&(d++,o.set(String(d),fn.lastIndex)),u.push(C?{num:d}:{})}else f===")"&&u.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function el(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function tl(e,t,n,r,i,a,s){const o=new Set;r&&Jd(e+t,ha,({groups:{captureName:l}})=>{o.add(l)},ht.DEFAULT);const u=[n,r?o:null,i,a,s];return`${e}${nl(`(?:${e}`,"forward",...u)}(?:)${nl(`${t})`,"backward",...u)}${t}`}function nl(e,t,n,r,i,a,s){const u=c=>t==="forward"?c+2:n-c+2-1;let l="";for(let c=0;c<n;c++){const d=u(c);l+=wo(e,dt`${th}|\\k<(?<backref>[^>]+)>`,({0:p,groups:{captureName:f,unnamed:m,backref:g}})=>{if(g&&r&&!r.has(g))return p;const y=`_$${d}`;if(m||f){const _=s+a.length+1;return a.push(_),Gb(i,_),m?p:`(?<${f}${y}>`}return dt`\k<${g}${y}>`},ht.DEFAULT)}return l}function Gb(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function rl(e,t,n,r,i,a){if(e.size&&r){let s=0;Jd(t,th,()=>s++,ht.DEFAULT);const o=a-s+i,u=new Map;return e.forEach((l,c)=>{const d=(r-s*n)/n,p=s*n,f=c>o+s?c+r:c,m=[];for(const g of l)if(g<=o)m.push(g);else if(g>o+s+d)m.push(g+r);else if(g<=o+s)for(let y=0;y<=n;y++)m.push(g+s*y);else for(let y=0;y<=n;y++)m.push(g+p+d*y);u.set(f,m)}),u}return e}var Re=String.fromCodePoint,ie=String.raw,bt={},fa=globalThis.RegExp;bt.flagGroups=(()=>{try{new fa("(?i:)")}catch{return!1}return!0})();bt.unicodeSets=(()=>{try{new fa("[[]]","v")}catch{return!1}return!0})();bt.bugFlagVLiteralHyphenIsRange=bt.unicodeSets?(()=>{try{new fa(ie`[\d\-a]`,"v")}catch{return!0}return!1})():!1;bt.bugNestedClassIgnoresNegation=bt.unicodeSets&&new fa("[[^a]]","v").test("a");function zi(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function Gr(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Ps(e,t){return il[e]>=il[t]}function qb(e,t){if(e==null)throw new Error(t??"Value expected");return e}var il={ES2025:2025,ES2024:2024,ES2018:2018},Wb={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function nh(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Wb[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=bt.flagGroups?"ES2025":bt.unicodeSets?"ES2024":"ES2018"),t}var Yb="[ -\r ]",Qb=new Set([Re(304),Re(305)]),Mt=ie`[\p{L}\p{M}\p{N}\p{Pc}]`;function rh(e){if(Qb.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Zb.get(n),a=Xb.get(n),s=Kb.get(n);return[...r].length===1&&t.add(r),s&&t.add(s),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var Io=new Map(`C Other
66
+ Cc Control cntrl
67
+ Cf Format
68
+ Cn Unassigned
69
+ Co Private_Use
70
+ Cs Surrogate
71
+ L Letter
72
+ LC Cased_Letter
73
+ Ll Lowercase_Letter
74
+ Lm Modifier_Letter
75
+ Lo Other_Letter
76
+ Lt Titlecase_Letter
77
+ Lu Uppercase_Letter
78
+ M Mark Combining_Mark
79
+ Mc Spacing_Mark
80
+ Me Enclosing_Mark
81
+ Mn Nonspacing_Mark
82
+ N Number
83
+ Nd Decimal_Number digit
84
+ Nl Letter_Number
85
+ No Other_Number
86
+ P Punctuation punct
87
+ Pc Connector_Punctuation
88
+ Pd Dash_Punctuation
89
+ Pe Close_Punctuation
90
+ Pf Final_Punctuation
91
+ Pi Initial_Punctuation
92
+ Po Other_Punctuation
93
+ Ps Open_Punctuation
94
+ S Symbol
95
+ Sc Currency_Symbol
96
+ Sk Modifier_Symbol
97
+ Sm Math_Symbol
98
+ So Other_Symbol
99
+ Z Separator
100
+ Zl Line_Separator
101
+ Zp Paragraph_Separator
102
+ Zs Space_Separator
103
+ ASCII
104
+ ASCII_Hex_Digit AHex
105
+ Alphabetic Alpha
106
+ Any
107
+ Assigned
108
+ Bidi_Control Bidi_C
109
+ Bidi_Mirrored Bidi_M
110
+ Case_Ignorable CI
111
+ Cased
112
+ Changes_When_Casefolded CWCF
113
+ Changes_When_Casemapped CWCM
114
+ Changes_When_Lowercased CWL
115
+ Changes_When_NFKC_Casefolded CWKCF
116
+ Changes_When_Titlecased CWT
117
+ Changes_When_Uppercased CWU
118
+ Dash
119
+ Default_Ignorable_Code_Point DI
120
+ Deprecated Dep
121
+ Diacritic Dia
122
+ Emoji
123
+ Emoji_Component EComp
124
+ Emoji_Modifier EMod
125
+ Emoji_Modifier_Base EBase
126
+ Emoji_Presentation EPres
127
+ Extended_Pictographic ExtPict
128
+ Extender Ext
129
+ Grapheme_Base Gr_Base
130
+ Grapheme_Extend Gr_Ext
131
+ Hex_Digit Hex
132
+ IDS_Binary_Operator IDSB
133
+ IDS_Trinary_Operator IDST
134
+ ID_Continue IDC
135
+ ID_Start IDS
136
+ Ideographic Ideo
137
+ Join_Control Join_C
138
+ Logical_Order_Exception LOE
139
+ Lowercase Lower
140
+ Math
141
+ Noncharacter_Code_Point NChar
142
+ Pattern_Syntax Pat_Syn
143
+ Pattern_White_Space Pat_WS
144
+ Quotation_Mark QMark
145
+ Radical
146
+ Regional_Indicator RI
147
+ Sentence_Terminal STerm
148
+ Soft_Dotted SD
149
+ Terminal_Punctuation Term
150
+ Unified_Ideograph UIdeo
151
+ Uppercase Upper
152
+ Variation_Selector VS
153
+ White_Space space
154
+ XID_Continue XIDC
155
+ XID_Start XIDS`.split(/\s/).map(e=>[da(e),e])),Xb=new Map([["s",Re(383)],[Re(383),"s"]]),Kb=new Map([[Re(223),Re(7838)],[Re(107),Re(8490)],[Re(229),Re(8491)],[Re(969),Re(8486)]]),Zb=new Map([Kt(453),Kt(456),Kt(459),Kt(498),...za(8072,8079),...za(8088,8095),...za(8104,8111),Kt(8124),Kt(8140),Kt(8188)]),Jb=new Map([["alnum",ie`[\p{Alpha}\p{Nd}]`],["alpha",ie`\p{Alpha}`],["ascii",ie`\p{ASCII}`],["blank",ie`[\p{Zs}\t]`],["cntrl",ie`\p{Cc}`],["digit",ie`\p{Nd}`],["graph",ie`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ie`\p{Lower}`],["print",ie`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ie`[\p{P}\p{S}]`],["space",ie`\p{space}`],["upper",ie`\p{Upper}`],["word",ie`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ie`\p{AHex}`]]);function e_(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Kt(e){const t=Re(e);return[t.toLowerCase(),t]}function za(e,t){return e_(e,t).map(n=>Kt(n))}var ih=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function t_(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};ah(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Ps(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Lr(e,n_,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Lr(e,r_,a);const s={groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer};return Lr(e,i_,s),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var n_={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const a=gt();a.body[0].body.push(_n({negate:!0,body:r}),Gn("Any"));const s=gt();s.body[0].body.push(Xd("greedy",0,1/0,a)),n(xe(s,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(a=>a.kind==="flags");for(let a=n+1;a<t.body.length;a++){const s=t.body[a];Gr(r,s,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=oh(t.get(e));if(r){const i=gt({flags:r});i.body[0].body=e.body,e.body=[xe(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:s},o){const{kind:u,negate:l}=e,{asciiWordBoundaries:c,avoidSubclass:d,supportedGNodes:p,wordIsAscii:f}=o;if(u==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${l?"Y":"y"}"`);if(u==="line_end")s(xe(_n({body:[Nn({body:[Ns("string_end")]}),Nn({body:[ca(10)]})]}),t));else if(u==="line_start")s(xe(Bt(ie`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(u==="search_start")if(p.has(e))i.flags.sticky=!0,a();else{const m=r[n-1];if(m&&c_(m))s(xe(_n({negate:!0}),t));else{if(d)throw new Error(ie`Uses "\G" in a way that requires a subclass`);s(Zt(Ns("string_start"),t)),o.strategy="clip_search"}}else if(!(u==="string_end"||u==="string_start"))if(u==="string_end_newline")s(xe(Bt(ie`(?=\n?\z)`),t));else if(u==="word_boundary"){if(!f&&!c){const m=`(?:(?<=${Mt})(?!${Mt})|(?<!${Mt})(?=${Mt}))`,g=`(?:(?<=${Mt})(?=${Mt})|(?<!${Mt})(?!${Mt}))`;s(xe(Bt(l?g:m),t))}}else throw new Error(`Unexpected assertion kind "${u}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!qa(n)&&(n=Ga(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!qa(r)&&(r=Ga(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=Ii({body:[e]});n(xe(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:s,wordIsAscii:o}){const{kind:u,negate:l,value:c}=e;if(a&&(u==="digit"||c==="digit")){n(Zt(Rs("digit",{negate:l}),t));return}if(s&&(u==="space"||c==="space")){n(xe(Wa(Bt(Yb),l),t));return}if(o&&(u==="word"||c==="word")){n(Zt(Rs("word",{negate:l}),t));return}if(u==="any")n(Zt(Gn("Any"),t));else if(u==="digit")n(Zt(Gn("Nd",{negate:l}),t));else if(u!=="dot")if(u==="text_segment"){if(r==="strict")throw new Error(ie`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",p=ie`\p{RI}{2}|${d}(?:\u200D${d})*`;n(xe(Bt(ie`(?>\r\n|${i?ie`\p{RGI_Emoji}`:p}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(u==="hex")n(Zt(Gn("AHex",{negate:l}),t));else if(u==="newline")n(xe(Bt(l?`[^
156
+ ]`:`(?>\r
157
+ ?|[
158
+ \v\f…\u2028\u2029])`),t));else if(u==="posix")if(!i&&(c==="graph"||c==="print")){if(r==="strict")throw new Error(`POSIX class "${c}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[c];l&&(d=`\0-${Re(d.codePointAt(0)-1)}${Re(d.codePointAt(2)+1)}-􏿿`),n(xe(Bt(`[${d}]`),t))}else n(xe(Wa(Bt(Jb.get(c)),l),t));else if(u==="property")Io.has(da(c))||(e.key="sc");else if(u==="space")n(Zt(Gn("space",{negate:l}),t));else if(u==="word")n(xe(Wa(Bt(Mt),l),t));else throw new Error(`Unexpected character set kind "${u}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:s}){const{kind:o,flags:u}=e;if(o==="flags")if(!u.enable&&!u.disable)r();else{const l=gt({flags:u});l.body[0].body=s(),i(xe(l,t),{traverse:!0})}else if(o==="keep"){const l=n.body[0],d=n.body.length===1&&Wd(l,{type:"Group"})&&l.body[0].body.length===1?l.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(ie`Uses "\K" in a way that's unsupported`);const p=_n({behind:!0});p.body[0].body=a(),i(xe(p,t))}else throw new Error(`Unexpected directive kind "${o}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(xe(_n({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=gt();t.body[0].body.push(e.body),e.body=xe(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const a of e.body)if(a.body.length===1&&a.body[0].kind==="search_start")a.body.pop();else{const s=lh(a.body);s?(r=!0,Array.isArray(s)?n.push(...s):n.push(s)):i=!0}r&&!i&&n.forEach(a=>t.add(a))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(ie`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!qa(n)&&(n=Ga(n,t),e.ref=n)}},r_={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:a})=>a)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:s,openRefs:o,reffedNodesByReferencer:u}){const l=i.get(e);if(l&&o.has(e.number)){const d=Zt(al(e.number),t);u.set(d,o.get(e.number)),n(d);return}o.set(e.number,e),s.set(e.number,[]),e.name&&Gr(s,e.name,[]);const c=s.get(e.name??e.number);for(let d=0;d<c.length;d++){const p=c[d];if(l===p.node||l&&l===p.origin||e===p.origin){c.splice(d,1);break}}if(s.get(e.number).push({node:e,origin:l}),e.name&&s.get(e.name).push({node:e,origin:l}),e.name){const d=Gr(a,e.name,new Map);let p=!1;if(l)p=!0;else for(const f of d.values())if(!f.hasDuplicateNameToRemove){p=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:p})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=zi(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:a}=e;if(i){let c=t;for(;(c=c.parent)&&!(c.type==="CapturingGroup"&&(c.name===a||c.number===a)););r.reffedNodesByReferencer.set(e,c);return}const s=r.subroutineRefMap.get(a),o=a===0,u=o?al(0):sh(s,r.groupOriginByCopy,null);let l=u;if(!o){const c=oh(o_(s,p=>p.type==="Group"&&!!p.flags)),d=c?zi(r.globalFlags,c):r.globalFlags;a_(d,r.currentFlags)||(l=gt({flags:u_(d)}),l.body[0].body.push(u))}n(xe(l,t),{traverse:!o})}},i_={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const a=r.reffedNodesByReferencer.get(e).filter(s=>s_(s,e));if(!a.length)n(xe(_n({negate:!0}),t));else if(a.length>1){const s=gt({atomic:!0,body:a.reverse().map(o=>Nn({body:[Ls(o.number)]}))});n(xe(s,t))}else e.ref=a[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=Qd();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function ah(e){Lr(e,{"*"({node:t,parent:n}){t.parent=n}})}function a_(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function s_(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=uh(n.parent);for(const i of r){if(i===n)break;if(i===e||ch(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function sh(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[a,s]of Object.entries(e))a==="parent"?i.parent=Array.isArray(n)?r:n:s&&typeof s=="object"?i[a]=sh(s,t,i,n):(a==="type"&&s==="CapturingGroup"&&t.set(i,t.get(e)??e),i[a]=s);return i}function al(e){const t=Kd(e);return t.isRecursive=!0,t}function o_(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Ga(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function oh(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{var a,s;(a=r.enable)!=null&&a[i]&&(delete n.disable[i],n.enable[i]=!0),(s=r.disable)!=null&&s[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function u_({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function uh(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function lh(e){const t=e.find(n=>n.kind==="search_start"||d_(n,{negate:!1})||!l_(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=lh(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function ch(e,t){const n=uh(e)??[];for(const r of n)if(r===t||ch(r,t))return!0;return!1}function l_({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function c_(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function d_(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Wd(e.body[0],{type:"Assertion",kind:"search_start"})}function qa(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Bt(e,t){const r=Yd(e,{...t,unicodePropertyMap:Io}).body;return r.length>1||r[0].body.length>1?gt({body:r}):r[0].body[0]}function Wa(e,t){return e.negate=t,e}function Zt(e,t){return e.parent=t,e}function xe(e,t){return ah(e),e.parent=t,e}function h_(e,t){const n=nh(t),r=Ps(n.target,"ES2024"),i=Ps(n.target,"ES2025"),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw new Error("Invalid recursionLimit; use 2-20");let s=null,o=null;if(!i){const f=[e.flags.ignoreCase];Lr(e,f_,{getCurrentModI:()=>f.at(-1),popModI(){f.pop()},pushModI(m){f.push(m)},setHasCasedChar(){f.at(-1)?s=!0:o=!0}})}const u={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||s)&&!o)};let l=e;const c={accuracy:n.accuracy,appliedGlobalFlags:u,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&s&&o),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(f){return c.lastNode=l,l=f,qb(p_[f.type],`Unexpected node type "${f.type}"`)(f,c,d)}const p={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete p.options.force.v,p.options.disable.v=!0,p.options.unicodeSetsPlugin=null),p._captureTransfers=new Map,p._hiddenCaptures=[],c.captureMap.forEach((f,m)=>{f.hidden&&p._hiddenCaptures.push(m),f.transferTo&&Gr(p._captureTransfers,f.transferTo,[]).push(m)}),p}var f_={"*":{enter({node:e},t){if(ol(e)){const n=t.getCurrentModI();t.pushModI(e.flags?zi({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){ol(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){So(Re(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),dh(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&ih.has(e.value)&&t.setHasCasedChar()}},p_={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?ie`\B`:ie`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:a}=e,s={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(s.hidden=!0,a>o.number&&(s.transferTo=o.number)),t.captureMap.set(a,s),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Re(e),r=$n(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&So(n)){const i=rh(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:a}=e;let{body:s}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");bt.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&s.some(ul)&&(s=[ca(45),...s.filter(l=>!ul(l))]);const o=()=>`[${i?"^":""}${s.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||bt.bugNestedClassIgnoresNegation)&&!i){const c=s.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(c.length){const d=gt(),p=d.body[0];return d.parent=a,p.parent=d,s=s.filter(f=>!c.includes(f)),e.body=s,s.length?(e.parent=p,p.body.push(e)):d.body.pop(),c.forEach(f=>{const m=Nn({body:[f]});f.parent=m,m.parent=d,d.body.push(m)}),n(d)}}t.inCharClass=!0;const l=o();return t.inCharClass=!1,l}const u=s[0];if(r==="union"&&!i&&u&&((!t.useFlagV||!t.verbose)&&a.kind==="union"&&!(bt.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind==="intersection"&&s.length===1&&u.type!=="CharacterClassRange"))return s.map(n).join("");if(!t.useFlagV&&a.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=$n(n,i),s=$n(r,i),o=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const u=dh(e);E_(u).forEach(c=>{o.add(Array.isArray(c)?`${$n(c[0],i)}-${$n(c[1],i)}`:$n(c,i))})}return`${a}-${s}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":ie`[^\n]`;if(e==="digit")return t?ie`\D`:ie`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&ih.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?ie`\P`:ie`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?ie`\W`:ie`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,a){const s=i.currentFlags;n&&(i.currentFlags=zi(s,n));const o=t.map(a).join("|"),u=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?o:`(?${T_(e,n,i.useFlagMods)}${o})`;return i.currentFlags=s,u},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+y_(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:ie`\g<${t}&R=${r}>`}},m_=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),g_=new Set(["-","\\","]","^","["]),b_=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),sl=new Map([[9,ie`\t`],[10,ie`\n`],[11,ie`\v`],[12,ie`\f`],[13,ie`\r`],[8232,ie`\u2028`],[8233,ie`\u2029`],[65279,ie`\uFEFF`]]),__=new RegExp("^\\p{Cased}$","u");function So(e){return __.test(e)}function dh(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let s=r;s<=i;s++){const o=Re(s);if(!So(o))continue;const u=rh(o).filter(l=>{const c=l.codePointAt(0);return c<r||c>i});if(u.length&&(a.push(...u),n))break}return a}function $n(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(sl.has(e))return sl.get(e);if(e<32||e>126&&e<160||e>262143||t&&k_(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?b_:g_:m_,a=Re(e);return(i.has(a)?"\\":"")+a}function E_(e){const t=e.map(i=>i.codePointAt(0)).sort((i,a)=>i-a),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??(r=t[i]):r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function T_(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:a}=t;r=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(a?"-":"")+(a!=null&&a.ignoreCase?"i":"")+(a!=null&&a.dotAll?"s":"")}return`${r}:`}function y_({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function ol({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function k_(e){return e>47&&e<58}function ul({type:e,value:t}){return e==="Character"&&t===45}var nn,Ht,Cn,rn,wn,Yr,Ds,on,x_=(on=class extends RegExp{constructor(n,r,i){var t=(...o6)=>(super(...o6),hn(this,Yr),hn(this,nn,new Map),hn(this,Ht,null),hn(this,Cn),hn(this,rn,null),hn(this,wn,null),P(this,"rawOptions",{}),this);const a=!!(i!=null&&i.lazyCompile);if(n instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const s=n;t(s,r),pt(this,Cn,s.source),s instanceof on&&(pt(this,nn,We(s,nn)),pt(this,rn,We(s,rn)),pt(this,wn,We(s,wn)),this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...i};t(a?"":n,r),pt(this,Cn,n),pt(this,nn,C_(s.hiddenCaptures,s.transfers)),pt(this,wn,s.strategy),this.rawOptions=i??{}}a||pt(this,Ht,this)}get source(){return We(this,Cn)||"(?:)"}exec(n){if(!We(this,Ht)){const{lazyCompile:a,...s}=this.rawOptions;pt(this,Ht,new on(We(this,Cn),this.flags,s))}const r=this.global||this.sticky,i=this.lastIndex;if(We(this,wn)==="clip_search"&&r&&i){this.lastIndex=0;const a=Ra(this,Yr,Ds).call(this,n.slice(i));return a&&(A_(a,i,n,this.hasIndices),this.lastIndex+=i),a}return Ra(this,Yr,Ds).call(this,n)}},nn=new WeakMap,Ht=new WeakMap,Cn=new WeakMap,rn=new WeakMap,wn=new WeakMap,Yr=new WeakSet,Ds=function(n){We(this,Ht).lastIndex=this.lastIndex;const r=Tu(on.prototype,this,"exec").call(We(this,Ht),n);if(this.lastIndex=We(this,Ht).lastIndex,!r||!We(this,nn).size)return r;const i=[...r];r.length=1;let a;this.hasIndices&&(a=[...r.indices],r.indices.length=1);const s=[0];for(let o=1;o<i.length;o++){const{hidden:u,transferTo:l}=We(this,nn).get(o)??{};if(u?s.push(null):(s.push(r.length),r.push(i[o]),this.hasIndices&&r.indices.push(a[o])),l&&i[o]!==void 0){const c=s[l];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(r[c]=i[o],this.hasIndices&&(r.indices[c]=a[o]),r.groups){We(this,rn)||pt(this,rn,w_(this.source));const d=We(this,rn).get(l);d&&(r.groups[d]=i[o],this.hasIndices&&(r.indices.groups[d]=a[o]))}}}return r},on);function A_(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let s=0;s<i.length;s++){const o=i[s];o&&(i[s]=[o[0]+t,o[1]+t])}const a=i.groups;a&&Object.keys(a).forEach(s=>{const o=a[s];o&&(a[s]=[o[0]+t,o[1]+t])})}}function C_(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const a of i)Gr(n,a,{}).transferTo=r;return n}function w_(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,a;for(;a=t.exec(e);){const{0:s,groups:{capture:o,name:u}}=a;s==="["?r++:r?s==="]"&&r--:o&&(i++,u&&n.set(i,u))}return n}function I_(e,t){const n=S_(e,t);return n.options?new x_(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function S_(e,t){const n=nh(t),r=Yd(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Io}),i=t_(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),a=h_(i,n),s=zb(a.pattern,{captureTransfers:a._captureTransfers,hiddenCaptures:a._hiddenCaptures,mode:"external"}),o=jb(s.pattern),u=$b(o.pattern,{captureTransfers:s.captureTransfers,hiddenCaptures:s.hiddenCaptures}),l={pattern:u.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${a.flags}${a.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const c=u.hiddenCaptures.sort((m,g)=>m-g),d=Array.from(u.captureTransfers),p=i._strategy,f=l.pattern.length>=n.lazyCompileLength;(c.length||d.length||p||f)&&(l.options={...c.length&&{hiddenCaptures:c},...d.length&&{transfers:d},...p&&{strategy:p},...f&&{lazyCompile:f}})}return l}const ll=4294967295;class N_{constructor(t,n={}){P(this,"regexps");this.patterns=t,this.options=n;const{forgiving:r=!1,cache:i,regexConstructor:a}=n;if(!a)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(s=>{if(typeof s!="string")return s;const o=i==null?void 0:i.get(s);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const u=a(s);return i==null||i.set(s,u),u}catch(u){if(i==null||i.set(s,u),r)return null;throw u}})}findNextMatchSync(t,n,r){const i=typeof t=="string"?t:t.content,a=[];function s(o,u,l=0){return{index:o,captureIndices:u.indices.map(c=>c==null?{start:ll,end:ll,length:0}:{start:c[0]+l,end:c[1]+l,length:c[1]-c[0]})}}for(let o=0;o<this.regexps.length;o++){const u=this.regexps[o];if(u)try{u.lastIndex=n;const l=u.exec(i);if(!l)continue;if(l.index===n)return s(o,l,0);a.push([o,l,0])}catch(l){if(this.options.forgiving)continue;throw l}}if(a.length){const o=Math.min(...a.map(u=>u[1].index));for(const[u,l,c]of a)if(l.index===o)return s(u,l,c)}return null}}function L_(e,t){return I_(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function R_(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>L_(n,{target:t.target})),{createScanner(n){return new N_(n,t)},createString(n){return{content:n}}}}var O_=R_({forgiving:!0}),P_=Object.fromEntries(ko.flatMap(e=>{var t;return((t=e.aliases)!=null?t:[]).map(n=>[n,e.id])})),Si=new Set(Object.keys(Ud)),cl=e=>{let t=e.trim().toLowerCase();return P_[t]||(Si.has(t),t)},Ya=new Map,Qa=new Map,jn=new Map,Gi=e=>{var t;return typeof e=="string"?e:(t=e.name)!=null?t:"custom"},D_=(e,t)=>`${e}-${Gi(t[0])}-${Gi(t[1])}`,v_=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):"";return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},M_=(e,t)=>{let n=D_(e,t);if(Ya.has(n))return Ya.get(n);let r=G1({themes:t,langs:[e],engine:O_});return Ya.set(n,r),r};function B_(e={}){var t;let n=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(r){let i=cl(r);return Si.has(i)},getSupportedLanguages(){return Array.from(Si)},getThemes(){return n},highlight({code:r,language:i,themes:a},s){let o=cl(i),u=[Gi(a[0]),Gi(a[1])],l=v_(r,o,u);if(Qa.has(l))return Qa.get(l);s&&(jn.has(l)||jn.set(l,new Set),jn.get(l).add(s));let c=Si.has(o)?o:"text";return M_(c,a).then(d=>{let p=d.getLoadedLanguages().includes(o)?o:"text",f=d.codeToTokens(r,{lang:p,themes:{light:u[0],dark:u[1]}});Qa.set(l,f);let m=jn.get(l);if(m){for(let g of m)g(f);jn.delete(l)}}).catch(d=>{console.error("[Streamdown Code] Failed to highlight code:",d),jn.delete(l)}),null}}}var F_=B_(),dl={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0};function H_(e={}){let t=!1,n={...dl,...e.config},r={initialize(i){n={...dl,...e.config,...i},Oa.initialize(n),t=!0},async render(i,a){return t||(Oa.initialize(n),t=!0),await Oa.render(i,a)}};return{name:"mermaid",type:"diagram",language:"mermaid",getMermaid(i){return i&&r.initialize(i),r}}}var U_=H_();const pa=(function(e){if(e==null)return z_;if(typeof e=="function")return ma(e);if(typeof e=="object")return Array.isArray(e)?$_(e):j_(e);if(typeof e=="string")return V_(e);throw new Error("Expected function, string, or object as test")});function $_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=pa(e[n]);return ma(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function j_(e){const t=e;return ma(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function V_(e){return ma(t);function t(n){return n&&n.type===e}}function ma(e){return t;function t(n,r,i){return!!(G_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function z_(){return!0}function G_(e){return e!==null&&typeof e=="object"&&"type"in e}const hh=[],Cr=!0,vs=!1,xn="skip";function ga(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=pa(i),s=r?-1:1;o(e,void 0,[])();function o(u,l,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=hh,m,g,y;if((!t||a(u,l,c[c.length-1]||void 0))&&(f=q_(n(u,c)),f[0]===vs))return f;if("children"in u&&u.children){const _=u;if(_.children&&f[0]!==xn)for(g=(r?_.children.length:-1)+s,y=c.concat(_);g>-1&&g<_.children.length;){const C=_.children[g];if(m=o(C,g,y)(),m[0]===vs)return m;g=typeof m[1]=="number"?m[1]:g+s}}return f}}}function q_(e){return Array.isArray(e)?e:typeof e=="number"?[Cr,e]:e==null?hh:[e]}function Tt(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),ga(e,a,o,i);function o(u,l){const c=l[l.length-1],d=c?c.children.indexOf(u):void 0;return s(u,d,c)}}const Zn={indicator:"indicator",textOnly:"text-only",remove:"remove"};function W_({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:o=Zn.indicator,imageBlockPolicy:u=Zn.indicator}){const l=t.length&&!t.every(d=>d==="*"),c=n.length&&!n.every(d=>d==="*");if(!e&&(l||c))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const p=J_(e,t,n,r,i,a,s,o,u);fh(d),Tt(d,p)}}function hl(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Y_(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Q_=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),X_=new Set(["javascript:","data:","file:","vbscript:"]);function fl(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}const s=hl(e,n);if(!s||X_.has(s.protocol)||!(Q_.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const u=Y_(e);return s&&t.some(l=>{const c=hl(l,n);return!c||c.origin!==s.origin?!1:s.href.startsWith(c.href)})?u?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:u?s.pathname+s.search+s.hash:s.href:null}function fh(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)fh(t)}}const Xa=Symbol("node-seen");function K_(e,t,n){return t===Zn.remove?{type:"remove"}:t===Zn.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Z_(e,t,n){if(t===Zn.remove)return{type:"remove"};if(t===Zn.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const J_=(e,t,n,r,i,a,s,o,u)=>{const l=(c,d,p)=>{if(c.type!=="element"||c[Xa])return Cr;if(c.tagName==="a"){const f=fl(c.properties.href,t,e,!1,!1,i);if(f===null){if(c[Xa]=!0,Tt(c,l),p&&typeof d=="number"){const m=K_(c,o,s);if(m.type==="remove")return p.children.splice(d,1),[xn,d];p.children[d]=m.element}return xn}else return c.properties.href=f,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Cr}if(c.tagName==="img"){const f=fl(c.properties.src,n,e,r,!0,i);if(f===null){if(c[Xa]=!0,Tt(c,l),p&&typeof d=="number"){const m=Z_(c,u,a);if(m.type==="remove")return p.children.splice(d,1),[xn,d];p.children[d]=m.element}return xn}else return c.properties.src=f,Cr}return Cr};return l},ph=-1,ba=0,Rr=1,qi=2,No=3,Lo=4,Ro=5,Oo=6,mh=7,gh=8,{defineProperty:eE}=Object,bh=typeof self=="object"?self:globalThis,pl=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new bh[e](t)},tE=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case ba:case ph:return n(s,i);case Rr:{const o=n([],i);for(const u of s)o.push(r(u));return o}case qi:{const o=n({},i);for(const[u,l]of s){const c=r(u),d=r(l);c==="__proto__"?eE(o,c,{value:d,configurable:!0,enumerable:!0,writable:!0}):o[c]=d}return o}case No:return n(new Date(s),i);case Lo:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case Ro:{const o=n(new Map,i);for(const[u,l]of s)o.set(r(u),r(l));return o}case Oo:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case mh:{const{name:o,message:u}=s;return n(typeof bh[o]=="function"?pl(o,u):new Error(u),i)}case gh:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}case"-0":return-0}return n(pl(a,s),i)};return r},ml=e=>tE(new Map,e)(0),bn="",{toString:nE}={},{keys:rE,is:iE}=Object,mr=e=>{const t=typeof e;if(t!=="object"||!e)return[ba,t];const n=nE.call(e).slice(8,-1);switch(n){case"Array":return[Rr,bn];case"Object":return[qi,bn];case"Date":return[No,bn];case"RegExp":return[Lo,bn];case"Map":return[Ro,bn];case"Set":return[Oo,bn];case"DataView":return[Rr,n]}return n.includes("Array")?[Rr,n]:e instanceof Error?[mh,e.name||"Error"]:[qi,n]},pi=([e,t])=>e===ba&&(t==="function"||t==="symbol"),aE=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=mr(s);switch(o){case ba:{let c=s;switch(u){case"bigint":o=gh,c=s.toString();break;case"number":if(!s&&iE(s,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([ph],s)}return i([o,c],s)}case Rr:{if(u){let p=s;return u==="DataView"?p=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(s)),i([u,[...p]],s)}const c=[],d=i([o,c],s);for(const p of s)c.push(a(p));return d}case qi:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const c=[],d=i([o,c],s);for(const p of rE(s))(e||!pi(mr(s[p])))&&c.push([a(p),a(s[p])]);return d}case No:return i([o,isNaN(s.getTime())?bn:s.toISOString()],s);case Lo:{const{source:c,flags:d}=s;return i([o,{source:c,flags:d}],s)}case Ro:{const c=[],d=i([o,c],s);for(const[p,f]of s)(e||!(pi(mr(p))||pi(mr(f))))&&c.push([a(p),a(f)]);return d}case Oo:{const c=[],d=i([o,c],s);for(const p of s)(e||!pi(mr(p)))&&c.push(a(p));return d}}const{message:l}=s;return i([o,{name:u,message:l}],s)};return a},gl=(e,{json:t,lossy:n}={})=>{const r=[];return aE(!(t||n),!!t,new Map,r)(e),r},Ln=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ml(gl(e,t)):structuredClone(e):(e,t)=>ml(gl(e,t));const bl=/[#.]/g;function sE(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){bl.lastIndex=i;const o=bl.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function _h(e,t,n){const r=n?cE(n):void 0;function i(a,s,...o){let u;if(a==null){u={type:"root",children:[]};const l=s;o.unshift(l)}else{u=sE(a,t);const l=u.tagName.toLowerCase(),c=r?r.get(l):void 0;if(u.tagName=c||l,oE(s))o.unshift(s);else for(const[d,p]of Object.entries(s))uE(e,u.properties,d,p)}for(const l of o)Ms(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function oE(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function uE(e,t,n,r){const i=Kr(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Du(r):i.commaSeparated?a=Pu(r):i.commaOrSpaceSeparated?a=Du(Pu(r).join(" ")):a=_l(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?lE(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(_l(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Ms(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Ms(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ms(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function _l(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Vr(n)===Vr(t)))return!0}return n}function lE(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function cE(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const dE=["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","solidColor","textArea","textPath"],hE=_h(tr,"div"),fE=_h(Nt,"g",dE);function pE(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=El(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=El(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function El(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
159
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const An={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Eh={}.hasOwnProperty,mE=Object.prototype;function gE(e,t){const n=t||{};return Po({file:n.file||void 0,location:!1,schema:n.space==="svg"?Nt:tr,verbose:n.verbose||!1},e)}function Po(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ni(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Th(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=pE(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Ni(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ni(e,r,n),n}default:return n=bE(e,t),n}}function Th(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Po(e,t[n]);r.push(i)}return r}function bE(e,t){const n=e.schema;e.schema=t.namespaceURI===An.svg?Nt:tr;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;Eh.call(mE,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?fE:hE)(t.tagName,i,Th(e,t.childNodes));if(Ni(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&Yn(u.startTag),c=u&&u.endTag&&Yn(u.endTag),d=Po(e,o.content);l&&c&&e.file&&(d.position={start:l.end,end:c.start}),s.content=d}return e.schema=n,s}function Ni(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=_E(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function _E(e,t,n){const r=Yn(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)Eh.call(n.attrs,s)&&(a[Kr(e.schema,s).property]=Yn(n.attrs[s]));n.startTag;const o=Yn(n.startTag),u=n.endTag?Yn(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=a,t.data={position:l}}}return r}function Yn(e){const t=Tl({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Tl({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Tl(e){return e.line&&e.column?e:void 0}const EE={},TE={}.hasOwnProperty,yh=ho("type",{handlers:{root:kE,element:IE,text:CE,comment:wE,doctype:AE}});function yE(e,t){const r=(t||EE).space;return yh(e,r==="svg"?Nt:tr)}function kE(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Do(e.children,n,t),ar(e,n),n}function xE(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Do(e.children,n,t),ar(e,n),n}function AE(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ar(e,t),t}function CE(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ar(e,t),t}function wE(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ar(e,t),t}function IE(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Nt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&TE.call(e.properties,a)){const u=SE(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:An[s],childNodes:[],parentNode:null};return o.childNodes=Do(e.children,o,r),ar(e,o),e.tagName==="template"&&e.content&&(o.content=xE(e.content,r)),o}function SE(e,t,n){const r=Kr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?fo(n):po(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=An[r.space]}return i}function Do(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=yh(e[r],n);a.parentNode=t,i.push(a)}return i}function ar(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const NE=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]),ye="�";var E;(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"})(E||(E={}));const Ze={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function kh(e){return e>=55296&&e<=57343}function LE(e){return e>=56320&&e<=57343}function RE(e,t){return(e-55296)*1024+9216+t}function xh(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ah(e){return e>=64976&&e<=65007||NE.has(e)}var B;(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"})(B||(B={}));const OE=65536;class PE{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=OE,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:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_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(LE(n))return this.pos++,this._addGap(),RE(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(B.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,E.EOF;const r=this.html.charCodeAt(n);return r===E.CARRIAGE_RETURN?E.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,E.EOF;let t=this.html.charCodeAt(this.pos);return t===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):t===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,kh(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===E.LINE_FEED||t===E.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){xh(t)?this._err(B.controlCharacterInInputStream):Ah(t)&&this._err(B.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var oe;(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"})(oe||(oe={}));function Ch(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 DE=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))),vE=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 ME(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=vE.get(e))!==null&&t!==void 0?t:e}var Be;(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"})(Be||(Be={}));const BE=32;var an;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(an||(an={}));function Bs(e){return e>=Be.ZERO&&e<=Be.NINE}function FE(e){return e>=Be.UPPER_A&&e<=Be.UPPER_F||e>=Be.LOWER_A&&e<=Be.LOWER_F}function HE(e){return e>=Be.UPPER_A&&e<=Be.UPPER_Z||e>=Be.LOWER_A&&e<=Be.LOWER_Z||Bs(e)}function UE(e){return e===Be.EQUALS||HE(e)}var De;(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"})(De||(De={}));var Ut;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ut||(Ut={}));class $E{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=De.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ut.Strict}startEntity(t){this.decodeMode=t,this.state=De.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case De.EntityStart:return t.charCodeAt(n)===Be.NUM?(this.state=De.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=De.NamedEntity,this.stateNamedEntity(t,n));case De.NumericStart:return this.stateNumericStart(t,n);case De.NumericDecimal:return this.stateNumericDecimal(t,n);case De.NumericHex:return this.stateNumericHex(t,n);case De.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|BE)===Be.LOWER_X?(this.state=De.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=De.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Bs(i)||FE(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(Bs(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===Be.SEMI)this.consumed+=1;else if(this.decodeMode===Ut.Strict)return 0;return this.emitCodePoint(ME(this.result),this.consumed),this.errors&&(t!==Be.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&an.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=jE(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ut.Attribute&&(a===0||UE(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&an.VALUE_LENGTH)>>14,a!==0){if(s===Be.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ut.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]&an.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]&~an.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case De.NamedEntity:return this.result!==0&&(this.decodeMode!==Ut.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case De.NumericDecimal:return this.emitNumericEntity(0,2);case De.NumericHex:return this.emitNumericEntity(0,3);case De.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case De.EntityStart:return 0}}}function jE(e,t,n,r){const i=(t&an.BRANCH_LENGTH)>>7,a=t&an.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,l=e[u];if(l<r)s=u+1;else if(l>r)o=u-1;else return e[u+i]}return-1}var H;(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/"})(H||(H={}));var Sn;(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"})(Sn||(Sn={}));var ot;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ot||(ot={}));var L;(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"})(L||(L={}));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 VE=new Map([[L.A,h.A],[L.ADDRESS,h.ADDRESS],[L.ANNOTATION_XML,h.ANNOTATION_XML],[L.APPLET,h.APPLET],[L.AREA,h.AREA],[L.ARTICLE,h.ARTICLE],[L.ASIDE,h.ASIDE],[L.B,h.B],[L.BASE,h.BASE],[L.BASEFONT,h.BASEFONT],[L.BGSOUND,h.BGSOUND],[L.BIG,h.BIG],[L.BLOCKQUOTE,h.BLOCKQUOTE],[L.BODY,h.BODY],[L.BR,h.BR],[L.BUTTON,h.BUTTON],[L.CAPTION,h.CAPTION],[L.CENTER,h.CENTER],[L.CODE,h.CODE],[L.COL,h.COL],[L.COLGROUP,h.COLGROUP],[L.DD,h.DD],[L.DESC,h.DESC],[L.DETAILS,h.DETAILS],[L.DIALOG,h.DIALOG],[L.DIR,h.DIR],[L.DIV,h.DIV],[L.DL,h.DL],[L.DT,h.DT],[L.EM,h.EM],[L.EMBED,h.EMBED],[L.FIELDSET,h.FIELDSET],[L.FIGCAPTION,h.FIGCAPTION],[L.FIGURE,h.FIGURE],[L.FONT,h.FONT],[L.FOOTER,h.FOOTER],[L.FOREIGN_OBJECT,h.FOREIGN_OBJECT],[L.FORM,h.FORM],[L.FRAME,h.FRAME],[L.FRAMESET,h.FRAMESET],[L.H1,h.H1],[L.H2,h.H2],[L.H3,h.H3],[L.H4,h.H4],[L.H5,h.H5],[L.H6,h.H6],[L.HEAD,h.HEAD],[L.HEADER,h.HEADER],[L.HGROUP,h.HGROUP],[L.HR,h.HR],[L.HTML,h.HTML],[L.I,h.I],[L.IMG,h.IMG],[L.IMAGE,h.IMAGE],[L.INPUT,h.INPUT],[L.IFRAME,h.IFRAME],[L.KEYGEN,h.KEYGEN],[L.LABEL,h.LABEL],[L.LI,h.LI],[L.LINK,h.LINK],[L.LISTING,h.LISTING],[L.MAIN,h.MAIN],[L.MALIGNMARK,h.MALIGNMARK],[L.MARQUEE,h.MARQUEE],[L.MATH,h.MATH],[L.MENU,h.MENU],[L.META,h.META],[L.MGLYPH,h.MGLYPH],[L.MI,h.MI],[L.MO,h.MO],[L.MN,h.MN],[L.MS,h.MS],[L.MTEXT,h.MTEXT],[L.NAV,h.NAV],[L.NOBR,h.NOBR],[L.NOFRAMES,h.NOFRAMES],[L.NOEMBED,h.NOEMBED],[L.NOSCRIPT,h.NOSCRIPT],[L.OBJECT,h.OBJECT],[L.OL,h.OL],[L.OPTGROUP,h.OPTGROUP],[L.OPTION,h.OPTION],[L.P,h.P],[L.PARAM,h.PARAM],[L.PLAINTEXT,h.PLAINTEXT],[L.PRE,h.PRE],[L.RB,h.RB],[L.RP,h.RP],[L.RT,h.RT],[L.RTC,h.RTC],[L.RUBY,h.RUBY],[L.S,h.S],[L.SCRIPT,h.SCRIPT],[L.SEARCH,h.SEARCH],[L.SECTION,h.SECTION],[L.SELECT,h.SELECT],[L.SOURCE,h.SOURCE],[L.SMALL,h.SMALL],[L.SPAN,h.SPAN],[L.STRIKE,h.STRIKE],[L.STRONG,h.STRONG],[L.STYLE,h.STYLE],[L.SUB,h.SUB],[L.SUMMARY,h.SUMMARY],[L.SUP,h.SUP],[L.TABLE,h.TABLE],[L.TBODY,h.TBODY],[L.TEMPLATE,h.TEMPLATE],[L.TEXTAREA,h.TEXTAREA],[L.TFOOT,h.TFOOT],[L.TD,h.TD],[L.TH,h.TH],[L.THEAD,h.THEAD],[L.TITLE,h.TITLE],[L.TR,h.TR],[L.TRACK,h.TRACK],[L.TT,h.TT],[L.U,h.U],[L.UL,h.UL],[L.SVG,h.SVG],[L.VAR,h.VAR],[L.WBR,h.WBR],[L.XMP,h.XMP]]);function sr(e){var t;return(t=VE.get(e))!==null&&t!==void 0?t:h.UNKNOWN}const U=h,zE={[H.HTML]:new Set([U.ADDRESS,U.APPLET,U.AREA,U.ARTICLE,U.ASIDE,U.BASE,U.BASEFONT,U.BGSOUND,U.BLOCKQUOTE,U.BODY,U.BR,U.BUTTON,U.CAPTION,U.CENTER,U.COL,U.COLGROUP,U.DD,U.DETAILS,U.DIR,U.DIV,U.DL,U.DT,U.EMBED,U.FIELDSET,U.FIGCAPTION,U.FIGURE,U.FOOTER,U.FORM,U.FRAME,U.FRAMESET,U.H1,U.H2,U.H3,U.H4,U.H5,U.H6,U.HEAD,U.HEADER,U.HGROUP,U.HR,U.HTML,U.IFRAME,U.IMG,U.INPUT,U.LI,U.LINK,U.LISTING,U.MAIN,U.MARQUEE,U.MENU,U.META,U.NAV,U.NOEMBED,U.NOFRAMES,U.NOSCRIPT,U.OBJECT,U.OL,U.P,U.PARAM,U.PLAINTEXT,U.PRE,U.SCRIPT,U.SECTION,U.SELECT,U.SOURCE,U.STYLE,U.SUMMARY,U.TABLE,U.TBODY,U.TD,U.TEMPLATE,U.TEXTAREA,U.TFOOT,U.TH,U.THEAD,U.TITLE,U.TR,U.TRACK,U.UL,U.WBR,U.XMP]),[H.MATHML]:new Set([U.MI,U.MO,U.MN,U.MS,U.MTEXT,U.ANNOTATION_XML]),[H.SVG]:new Set([U.TITLE,U.FOREIGN_OBJECT,U.DESC]),[H.XLINK]:new Set,[H.XML]:new Set,[H.XMLNS]:new Set},Fs=new Set([U.H1,U.H2,U.H3,U.H4,U.H5,U.H6]);L.STYLE,L.SCRIPT,L.XMP,L.IFRAME,L.NOEMBED,L.NOFRAMES,L.PLAINTEXT;var k;(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"})(k||(k={}));const Ae={DATA:k.DATA,RCDATA:k.RCDATA,RAWTEXT:k.RAWTEXT,SCRIPT_DATA:k.SCRIPT_DATA,PLAINTEXT:k.PLAINTEXT,CDATA_SECTION:k.CDATA_SECTION};function GE(e){return e>=E.DIGIT_0&&e<=E.DIGIT_9}function wr(e){return e>=E.LATIN_CAPITAL_A&&e<=E.LATIN_CAPITAL_Z}function qE(e){return e>=E.LATIN_SMALL_A&&e<=E.LATIN_SMALL_Z}function Jt(e){return qE(e)||wr(e)}function yl(e){return Jt(e)||GE(e)}function mi(e){return e+32}function wh(e){return e===E.SPACE||e===E.LINE_FEED||e===E.TABULATION||e===E.FORM_FEED}function kl(e){return wh(e)||e===E.SOLIDUS||e===E.GREATER_THAN_SIGN}function WE(e){return e===E.NULL?B.nullCharacterReference:e>1114111?B.characterReferenceOutsideUnicodeRange:kh(e)?B.surrogateCharacterReference:Ah(e)?B.noncharacterCharacterReference:xh(e)||e===E.CARRIAGE_RETURN?B.controlCharacterReference:null}class YE{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=k.DATA,this.returnState=k.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new PE(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new $E(DE,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(B.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(B.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=WE(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==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||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:oe.START_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:oe.END_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:oe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:oe.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(Ch(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(B.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=sr(t.tagName),t.type===oe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(B.endTagWithAttributes),t.selfClosing&&this._err(B.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 oe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case oe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case oe.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:oe.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=wh(t)?oe.WHITESPACE_CHARACTER:t===E.NULL?oe.NULL_CHARACTER:oe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(oe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=k.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ut.Attribute:Ut.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===k.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case k.DATA:{this._stateData(t);break}case k.RCDATA:{this._stateRcdata(t);break}case k.RAWTEXT:{this._stateRawtext(t);break}case k.SCRIPT_DATA:{this._stateScriptData(t);break}case k.PLAINTEXT:{this._statePlaintext(t);break}case k.TAG_OPEN:{this._stateTagOpen(t);break}case k.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case k.TAG_NAME:{this._stateTagName(t);break}case k.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case k.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case k.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case k.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case k.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case k.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case k.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case k.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case k.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case k.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case k.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case k.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case k.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case k.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case k.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case k.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case k.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case k.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case k.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case k.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case k.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case k.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case k.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case k.BOGUS_COMMENT:{this._stateBogusComment(t);break}case k.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case k.COMMENT_START:{this._stateCommentStart(t);break}case k.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case k.COMMENT:{this._stateComment(t);break}case k.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case k.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case k.COMMENT_END:{this._stateCommentEnd(t);break}case k.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case k.DOCTYPE:{this._stateDoctype(t);break}case k.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case k.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case k.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case k.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case k.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case k.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case k.CDATA_SECTION:{this._stateCdataSection(t);break}case k.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case k.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case k.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case k.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=k.TAG_OPEN;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(B.unexpectedNullCharacter),this._emitCodePoint(t);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case E.AMPERSAND:{this._startCharacterReference();break}case E.LESS_THAN_SIGN:{this.state=k.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(ye);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case E.LESS_THAN_SIGN:{this.state=k.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(ye);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(ye);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case E.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(ye);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Jt(t))this._createStartTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case E.EXCLAMATION_MARK:{this.state=k.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=k.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(B.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t);break}case E.EOF:{this._err(B.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(B.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=k.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Jt(t))this._createEndTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case E.GREATER_THAN_SIGN:{this._err(B.missingEndTagName),this.state=k.DATA;break}case E.EOF:{this._err(B.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(B.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=k.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(B.unexpectedNullCharacter),n.tagName+=ye;break}case E.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(wr(t)?mi(t):t)}}_stateRcdataLessThanSign(t){t===E.SOLIDUS?this.state=k.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Jt(t)?(this.state=k.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=k.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 E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=k.BEFORE_ATTRIBUTE_NAME,!1;case E.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=k.SELF_CLOSING_START_TAG,!1;case E.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=k.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===E.SOLIDUS?this.state=k.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Jt(t)?(this.state=k.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case E.SOLIDUS:{this.state=k.SCRIPT_DATA_END_TAG_OPEN;break}case E.EXCLAMATION_MARK:{this.state=k.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=k.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Jt(t)?(this.state=k.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===E.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===E.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(ye);break}case E.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(B.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(ye);break}case E.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(B.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(ye);break}case E.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===E.SOLIDUS?this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Jt(t)?(this._emitChars("<"),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Jt(t)?(this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ze.SCRIPT,!1)&&kl(this.preprocessor.peek(Ze.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ze.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(ye);break}case E.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(B.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ye);break}case E.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(B.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ye);break}case E.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===E.SOLIDUS?(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ze.SCRIPT,!1)&&kl(this.preprocessor.peek(Ze.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ze.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._err(B.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=k.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this._leaveAttrName(),this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._leaveAttrName(),this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:{this._err(B.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case E.NULL:{this._err(B.unexpectedNullCharacter),this.currentAttr.name+=ye;break}default:this.currentAttr.name+=String.fromCodePoint(wr(t)?mi(t):t)}}_stateAfterAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case E.EQUALS_SIGN:{this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case E.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{this.state=k.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this.state=k.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(B.missingAttributeValue),this.state=k.DATA,this.emitCurrentTagToken();break}default:this.state=k.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case E.QUOTATION_MARK:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(B.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case E.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case E.APOSTROPHE:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(B.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case E.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(B.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:case E.EQUALS_SIGN:case E.GRAVE_ACCENT:{this._err(B.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case E.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this._leaveAttrValue(),this.state=k.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this._err(B.missingWhitespaceBetweenAttributes),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case E.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=k.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this._err(B.unexpectedSolidusInTag),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case E.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case E.NULL:{this._err(B.unexpectedNullCharacter),n.data+=ye;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ze.DASH_DASH,!0)?(this._createCommentToken(Ze.DASH_DASH.length+1),this.state=k.COMMENT_START):this._consumeSequenceIfMatch(Ze.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ze.DOCTYPE.length+1),this.state=k.DOCTYPE):this._consumeSequenceIfMatch(Ze.CDATA_START,!0)?this.inForeignNode?this.state=k.CDATA_SECTION:(this._err(B.cdataInHtmlContent),this._createCommentToken(Ze.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=k.BOGUS_COMMENT):this._ensureHibernation()||(this._err(B.incorrectlyOpenedComment),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case E.HYPHEN_MINUS:{this.state=k.COMMENT_START_DASH;break}case E.GREATER_THAN_SIGN:{this._err(B.abruptClosingOfEmptyComment),this.state=k.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case E.GREATER_THAN_SIGN:{this._err(B.abruptClosingOfEmptyComment),this.state=k.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=k.COMMENT_END_DASH;break}case E.LESS_THAN_SIGN:{n.data+="<",this.state=k.COMMENT_LESS_THAN_SIGN;break}case E.NULL:{this._err(B.unexpectedNullCharacter),n.data+=ye;break}case E.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case E.EXCLAMATION_MARK:{n.data+="!",this.state=k.COMMENT_LESS_THAN_SIGN_BANG;break}case E.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===E.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=k.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===E.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=k.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==E.GREATER_THAN_SIGN&&t!==E.EOF&&this._err(B.nestedComment),this.state=k.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case E.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case E.EXCLAMATION_MARK:{this.state=k.COMMENT_END_BANG;break}case E.HYPHEN_MINUS:{n.data+="-";break}case E.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{n.data+="--!",this.state=k.COMMENT_END_DASH;break}case E.GREATER_THAN_SIGN:{this._err(B.incorrectlyClosedComment),this.state=k.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=k.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case E.EOF:{this._err(B.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingWhitespaceBeforeDoctypeName),this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(wr(t))this._createDoctypeToken(String.fromCharCode(mi(t))),this.state=k.DOCTYPE_NAME;else switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.NULL:{this._err(B.unexpectedNullCharacter),this._createDoctypeToken(ye),this.state=k.DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this._err(B.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case E.EOF:{this._err(B.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=k.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=k.AFTER_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case E.NULL:{this._err(B.unexpectedNullCharacter),n.name+=ye;break}case E.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(wr(t)?mi(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ze.PUBLIC,!1)?this.state=k.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ze.SYSTEM,!1)?this.state=k.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(B.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(B.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(B.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(B.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(B.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(B.unexpectedNullCharacter),n.publicId+=ye;break}case E.GREATER_THAN_SIGN:{this._err(B.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case E.EOF:{this._err(B.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 E.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(B.unexpectedNullCharacter),n.publicId+=ye;break}case E.GREATER_THAN_SIGN:{this._err(B.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case E.EOF:{this._err(B.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 E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case E.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case E.QUOTATION_MARK:{this._err(B.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(B.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case E.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(B.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(B.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(B.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(B.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(B.unexpectedNullCharacter),n.systemId+=ye;break}case E.GREATER_THAN_SIGN:{this._err(B.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case E.EOF:{this._err(B.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 E.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(B.unexpectedNullCharacter),n.systemId+=ye;break}case E.GREATER_THAN_SIGN:{this._err(B.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case E.EOF:{this._err(B.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 E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case E.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case E.NULL:{this._err(B.unexpectedNullCharacter);break}case E.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case E.RIGHT_SQUARE_BRACKET:{this.state=k.CDATA_SECTION_BRACKET;break}case E.EOF:{this._err(B.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===E.RIGHT_SQUARE_BRACKET?this.state=k.CDATA_SECTION_END:(this._emitChars("]"),this.state=k.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case E.GREATER_THAN_SIGN:{this.state=k.DATA;break}case E.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=k.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(E.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&yl(this.preprocessor.peek(1))?k.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){yl(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===E.SEMICOLON&&this._err(B.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ih=new Set([h.DD,h.DT,h.LI,h.OPTGROUP,h.OPTION,h.P,h.RB,h.RP,h.RT,h.RTC]),xl=new Set([...Ih,h.CAPTION,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]),Wi=new Set([h.APPLET,h.CAPTION,h.HTML,h.MARQUEE,h.OBJECT,h.TABLE,h.TD,h.TEMPLATE,h.TH]),QE=new Set([...Wi,h.OL,h.UL]),XE=new Set([...Wi,h.BUTTON]),Al=new Set([h.ANNOTATION_XML,h.MI,h.MN,h.MO,h.MS,h.MTEXT]),Cl=new Set([h.DESC,h.FOREIGN_OBJECT,h.TITLE]),KE=new Set([h.TR,h.TEMPLATE,h.HTML]),ZE=new Set([h.TBODY,h.TFOOT,h.THEAD,h.TEMPLATE,h.HTML]),JE=new Set([h.TABLE,h.TEMPLATE,h.HTML]),eT=new Set([h.TD,h.TH]);class tT{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)===H.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])!==H.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(Fs,H.HTML)}popUntilTableCellPopped(){this.popUntilPopped(eT,H.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(JE,H.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ZE,H.HTML)}clearBackToTableRowContext(){this.clearBackTo(KE,H.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 H.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case H.SVG:{if(Cl.has(i))return!1;break}case H.MATHML:{if(Al.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Wi)}hasInListItemScope(t){return this.hasInDynamicScope(t,QE)}hasInButtonScope(t){return this.hasInDynamicScope(t,XE)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case H.HTML:{if(Fs.has(n))return!0;if(Wi.has(n))return!1;break}case H.SVG:{if(Cl.has(n))return!1;break}case H.MATHML:{if(Al.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===H.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])===H.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])===H.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&&Ih.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&xl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&xl.has(this.currentTagId);)this.pop()}}const Ka=3;var St;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(St||(St={}));const wl={type:St.Marker};class nT{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===St.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===s){const c=this.treeAdapter.getAttrList(l);c.length===i&&r.push({idx:o,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Ka)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Ka)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=Ka&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(wl)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:St.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:St.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(wl);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===St.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===St.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===St.Element&&n.element===t)}}const en={createDocument(){return{nodeName:"#document",mode:ot.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(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};en.appendChild(e,a)}},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(en.isTextNode(n)){n.value+=t;return}}en.appendChild(e,en.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&en.isTextNode(r)?r.value+=t:en.insertBefore(e,en.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}}},Sh="html",rT="about:legacy-compat",iT="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Nh=["+//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//"],aT=[...Nh,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sT=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Lh=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],oT=[...Lh,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Il(e,t){return t.some(n=>e.startsWith(n))}function uT(e){return e.name===Sh&&e.publicId===null&&(e.systemId===null||e.systemId===rT)}function lT(e){if(e.name!==Sh)return ot.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===iT)return ot.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),sT.has(n))return ot.QUIRKS;let r=t===null?aT:Nh;if(Il(n,r))return ot.QUIRKS;if(r=t===null?Lh:oT,Il(n,r))return ot.LIMITED_QUIRKS}return ot.NO_QUIRKS}const Sl={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},cT="definitionurl",dT="definitionURL",hT=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])),fT=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:H.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:H.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:H.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:H.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:H.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:H.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:H.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:H.XML}],["xml:space",{prefix:"xml",name:"space",namespace:H.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:H.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:H.XMLNS}]]),pT=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])),mT=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 gT(e){const t=e.tagID;return t===h.FONT&&e.attrs.some(({name:r})=>r===Sn.COLOR||r===Sn.SIZE||r===Sn.FACE)||mT.has(t)}function Rh(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===cT){e.attrs[t].name=dT;break}}function Oh(e){for(let t=0;t<e.attrs.length;t++){const n=hT.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function vo(e){for(let t=0;t<e.attrs.length;t++){const n=fT.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 bT(e){const t=pT.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=sr(e.tagName))}function _T(e,t){return t===H.MATHML&&(e===h.MI||e===h.MO||e===h.MN||e===h.MS||e===h.MTEXT)}function ET(e,t,n){if(t===H.MATHML&&e===h.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Sn.ENCODING){const i=n[r].value.toLowerCase();return i===Sl.TEXT_HTML||i===Sl.APPLICATION_XML}}return t===H.SVG&&(e===h.FOREIGN_OBJECT||e===h.DESC||e===h.TITLE)}function TT(e,t,n,r){return(!r||r===H.HTML)&&ET(e,t,n)||(!r||r===H.MATHML)&&_T(e,t)}const yT="hidden",kT=8,xT=3;var w;(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"})(w||(w={}));const AT={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ph=new Set([h.TABLE,h.TBODY,h.TFOOT,h.THEAD,h.TR]),Nl={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:en,onParseError:null};class Ll{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=w.INITIAL,this.originalInsertionMode=w.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={...Nl,...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 YE(this.options,this),this.activeFormattingElements=new nT(this.treeAdapter),this.fragmentContextID=r?sr(this.treeAdapter.getTagName(r)):h.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new tT(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={...Nl,...n};t??(t=r.treeAdapter.createElement(L.TEMPLATE,H.HTML,[]));const i=r.treeAdapter.createElement("documentmock",H.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===h.TEMPLATE&&a.tmplInsertionModeStack.unshift(w.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}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 a=(i=t.location)!==null&&i!==void 0?i:AT,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.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 a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===H.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,H.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=w.TEXT}switchToPlaintextParsing(){this.insertionMode=w.TEXT,this.originalInsertionMode=w.IN_BODY,this.tokenizer.state=Ae.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)===L.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==H.HTML))switch(this.fragmentContextID){case h.TITLE:case h.TEXTAREA:{this.tokenizer.state=Ae.RCDATA;break}case h.STYLE:case h.XMP:case h.IFRAME:case h.NOEMBED:case h.NOFRAMES:case h.NOSCRIPT:{this.tokenizer.state=Ae.RAWTEXT;break}case h.SCRIPT:{this.tokenizer.state=Ae.SCRIPT_DATA;break}case h.PLAINTEXT:{this.tokenizer.state=Ae.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(o=>this.treeAdapter.isDocumentTypeNode(o));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,H.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,H.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(L.HTML,H.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),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,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),a=n.type===oe.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,a)}}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)===L.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===H.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===h.MGLYPH||t.tagID===h.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,H.HTML)}_processToken(t){switch(t.type){case oe.CHARACTER:{this.onCharacter(t);break}case oe.NULL_CHARACTER:{this.onNullCharacter(t);break}case oe.COMMENT:{this.onComment(t);break}case oe.DOCTYPE:{this.onDoctype(t);break}case oe.START_TAG:{this._processStartTag(t);break}case oe.END_TAG:{this.onEndTag(t);break}case oe.EOF:{this.onEof(t);break}case oe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return TT(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===St.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=w.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=w.IN_ROW;return}case h.TBODY:case h.THEAD:case h.TFOOT:{this.insertionMode=w.IN_TABLE_BODY;return}case h.CAPTION:{this.insertionMode=w.IN_CAPTION;return}case h.COLGROUP:{this.insertionMode=w.IN_COLUMN_GROUP;return}case h.TABLE:{this.insertionMode=w.IN_TABLE;return}case h.BODY:{this.insertionMode=w.IN_BODY;return}case h.FRAMESET:{this.insertionMode=w.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?w.AFTER_HEAD:w.BEFORE_HEAD;return}case h.TD:case h.TH:{if(t>0){this.insertionMode=w.IN_CELL;return}break}case h.HEAD:{if(t>0){this.insertionMode=w.IN_HEAD;return}break}}this.insertionMode=w.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=w.IN_SELECT_IN_TABLE;return}}this.insertionMode=w.IN_SELECT}_isElementCausesFosterParenting(t){return Ph.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)===H.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 zE[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ek(this,t);return}switch(this.insertionMode){case w.INITIAL:{gr(this,t);break}case w.BEFORE_HTML:{Or(this,t);break}case w.BEFORE_HEAD:{Pr(this,t);break}case w.IN_HEAD:{Dr(this,t);break}case w.IN_HEAD_NO_SCRIPT:{vr(this,t);break}case w.AFTER_HEAD:{Mr(this,t);break}case w.IN_BODY:case w.IN_CAPTION:case w.IN_CELL:case w.IN_TEMPLATE:{vh(this,t);break}case w.TEXT:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case w.IN_TABLE:case w.IN_TABLE_BODY:case w.IN_ROW:{Za(this,t);break}case w.IN_TABLE_TEXT:{$h(this,t);break}case w.IN_COLUMN_GROUP:{Yi(this,t);break}case w.AFTER_BODY:{Qi(this,t);break}case w.AFTER_AFTER_BODY:{Li(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Jy(this,t);return}switch(this.insertionMode){case w.INITIAL:{gr(this,t);break}case w.BEFORE_HTML:{Or(this,t);break}case w.BEFORE_HEAD:{Pr(this,t);break}case w.IN_HEAD:{Dr(this,t);break}case w.IN_HEAD_NO_SCRIPT:{vr(this,t);break}case w.AFTER_HEAD:{Mr(this,t);break}case w.TEXT:{this._insertCharacters(t);break}case w.IN_TABLE:case w.IN_TABLE_BODY:case w.IN_ROW:{Za(this,t);break}case w.IN_COLUMN_GROUP:{Yi(this,t);break}case w.AFTER_BODY:{Qi(this,t);break}case w.AFTER_AFTER_BODY:{Li(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Hs(this,t);return}switch(this.insertionMode){case w.INITIAL:case w.BEFORE_HTML:case w.BEFORE_HEAD:case w.IN_HEAD:case w.IN_HEAD_NO_SCRIPT:case w.AFTER_HEAD:case w.IN_BODY:case w.IN_TABLE:case w.IN_CAPTION:case w.IN_COLUMN_GROUP:case w.IN_TABLE_BODY:case w.IN_ROW:case w.IN_CELL:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:case w.IN_TEMPLATE:case w.IN_FRAMESET:case w.AFTER_FRAMESET:{Hs(this,t);break}case w.IN_TABLE_TEXT:{br(this,t);break}case w.AFTER_BODY:{RT(this,t);break}case w.AFTER_AFTER_BODY:case w.AFTER_AFTER_FRAMESET:{OT(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case w.INITIAL:{PT(this,t);break}case w.BEFORE_HEAD:case w.IN_HEAD:case w.IN_HEAD_NO_SCRIPT:case w.AFTER_HEAD:{this._err(t,B.misplacedDoctype);break}case w.IN_TABLE_TEXT:{br(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,B.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?tk(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case w.INITIAL:{gr(this,t);break}case w.BEFORE_HTML:{DT(this,t);break}case w.BEFORE_HEAD:{MT(this,t);break}case w.IN_HEAD:{yt(this,t);break}case w.IN_HEAD_NO_SCRIPT:{HT(this,t);break}case w.AFTER_HEAD:{$T(this,t);break}case w.IN_BODY:{ze(this,t);break}case w.IN_TABLE:{Jn(this,t);break}case w.IN_TABLE_TEXT:{br(this,t);break}case w.IN_CAPTION:{By(this,t);break}case w.IN_COLUMN_GROUP:{Fo(this,t);break}case w.IN_TABLE_BODY:{Ta(this,t);break}case w.IN_ROW:{ya(this,t);break}case w.IN_CELL:{Uy(this,t);break}case w.IN_SELECT:{zh(this,t);break}case w.IN_SELECT_IN_TABLE:{jy(this,t);break}case w.IN_TEMPLATE:{zy(this,t);break}case w.AFTER_BODY:{qy(this,t);break}case w.IN_FRAMESET:{Wy(this,t);break}case w.AFTER_FRAMESET:{Qy(this,t);break}case w.AFTER_AFTER_BODY:{Ky(this,t);break}case w.AFTER_AFTER_FRAMESET:{Zy(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?nk(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case w.INITIAL:{gr(this,t);break}case w.BEFORE_HTML:{vT(this,t);break}case w.BEFORE_HEAD:{BT(this,t);break}case w.IN_HEAD:{FT(this,t);break}case w.IN_HEAD_NO_SCRIPT:{UT(this,t);break}case w.AFTER_HEAD:{jT(this,t);break}case w.IN_BODY:{Ea(this,t);break}case w.TEXT:{Iy(this,t);break}case w.IN_TABLE:{qr(this,t);break}case w.IN_TABLE_TEXT:{br(this,t);break}case w.IN_CAPTION:{Fy(this,t);break}case w.IN_COLUMN_GROUP:{Hy(this,t);break}case w.IN_TABLE_BODY:{Us(this,t);break}case w.IN_ROW:{Vh(this,t);break}case w.IN_CELL:{$y(this,t);break}case w.IN_SELECT:{Gh(this,t);break}case w.IN_SELECT_IN_TABLE:{Vy(this,t);break}case w.IN_TEMPLATE:{Gy(this,t);break}case w.AFTER_BODY:{Wh(this,t);break}case w.IN_FRAMESET:{Yy(this,t);break}case w.AFTER_FRAMESET:{Xy(this,t);break}case w.AFTER_AFTER_BODY:{Li(this,t);break}}}onEof(t){switch(this.insertionMode){case w.INITIAL:{gr(this,t);break}case w.BEFORE_HTML:{Or(this,t);break}case w.BEFORE_HEAD:{Pr(this,t);break}case w.IN_HEAD:{Dr(this,t);break}case w.IN_HEAD_NO_SCRIPT:{vr(this,t);break}case w.AFTER_HEAD:{Mr(this,t);break}case w.IN_BODY:case w.IN_TABLE:case w.IN_CAPTION:case w.IN_COLUMN_GROUP:case w.IN_TABLE_BODY:case w.IN_ROW:case w.IN_CELL:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:{Hh(this,t);break}case w.TEXT:{Sy(this,t);break}case w.IN_TABLE_TEXT:{br(this,t);break}case w.IN_TEMPLATE:{qh(this,t);break}case w.AFTER_BODY:case w.IN_FRAMESET:case w.AFTER_FRAMESET:case w.AFTER_AFTER_BODY:case w.AFTER_AFTER_FRAMESET:{Bo(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===E.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 w.IN_HEAD:case w.IN_HEAD_NO_SCRIPT:case w.AFTER_HEAD:case w.TEXT:case w.IN_COLUMN_GROUP:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:case w.IN_FRAMESET:case w.AFTER_FRAMESET:{this._insertCharacters(t);break}case w.IN_BODY:case w.IN_CAPTION:case w.IN_CELL:case w.IN_TEMPLATE:case w.AFTER_BODY:case w.AFTER_AFTER_BODY:case w.AFTER_AFTER_FRAMESET:{Dh(this,t);break}case w.IN_TABLE:case w.IN_TABLE_BODY:case w.IN_ROW:{Za(this,t);break}case w.IN_TABLE_TEXT:{Uh(this,t);break}}}}function CT(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):Fh(e,t),n}function wT(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 IT(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=xT;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=ST(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function ST(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 NT(e,t,n){const r=e.treeAdapter.getTagName(t),i=sr(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===h.TEMPLATE&&a===H.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function LT(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Mo(e,t){for(let n=0;n<kT;n++){const r=CT(e,t);if(!r)break;const i=wT(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=IT(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&NT(e,s,a),LT(e,i,r)}}function Hs(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function RT(e,t){e._appendCommentNode(t,e.openElements.items[0])}function OT(e,t){e._appendCommentNode(t,e.document)}function Bo(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 a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function PT(e,t){e._setDocumentType(t);const n=t.forceQuirks?ot.QUIRKS:lT(t);uT(t)||e._err(t,B.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=w.BEFORE_HTML}function gr(e,t){e._err(t,B.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ot.QUIRKS),e.insertionMode=w.BEFORE_HTML,e._processToken(t)}function DT(e,t){t.tagID===h.HTML?(e._insertElement(t,H.HTML),e.insertionMode=w.BEFORE_HEAD):Or(e,t)}function vT(e,t){const n=t.tagID;(n===h.HTML||n===h.HEAD||n===h.BODY||n===h.BR)&&Or(e,t)}function Or(e,t){e._insertFakeRootElement(),e.insertionMode=w.BEFORE_HEAD,e._processToken(t)}function MT(e,t){switch(t.tagID){case h.HTML:{ze(e,t);break}case h.HEAD:{e._insertElement(t,H.HTML),e.headElement=e.openElements.current,e.insertionMode=w.IN_HEAD;break}default:Pr(e,t)}}function BT(e,t){const n=t.tagID;n===h.HEAD||n===h.BODY||n===h.HTML||n===h.BR?Pr(e,t):e._err(t,B.endTagWithoutMatchingOpenElement)}function Pr(e,t){e._insertFakeElement(L.HEAD,h.HEAD),e.headElement=e.openElements.current,e.insertionMode=w.IN_HEAD,e._processToken(t)}function yt(e,t){switch(t.tagID){case h.HTML:{ze(e,t);break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:{e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.TITLE:{e._switchToTextParsing(t,Ae.RCDATA);break}case h.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ae.RAWTEXT):(e._insertElement(t,H.HTML),e.insertionMode=w.IN_HEAD_NO_SCRIPT);break}case h.NOFRAMES:case h.STYLE:{e._switchToTextParsing(t,Ae.RAWTEXT);break}case h.SCRIPT:{e._switchToTextParsing(t,Ae.SCRIPT_DATA);break}case h.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=w.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(w.IN_TEMPLATE);break}case h.HEAD:{e._err(t,B.misplacedStartTagForHeadElement);break}default:Dr(e,t)}}function FT(e,t){switch(t.tagID){case h.HEAD:{e.openElements.pop(),e.insertionMode=w.AFTER_HEAD;break}case h.BODY:case h.BR:case h.HTML:{Dr(e,t);break}case h.TEMPLATE:{Dn(e,t);break}default:e._err(t,B.endTagWithoutMatchingOpenElement)}}function Dn(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==h.TEMPLATE&&e._err(t,B.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,B.endTagWithoutMatchingOpenElement)}function Dr(e,t){e.openElements.pop(),e.insertionMode=w.AFTER_HEAD,e._processToken(t)}function HT(e,t){switch(t.tagID){case h.HTML:{ze(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,B.nestedNoscriptInHead);break}default:vr(e,t)}}function UT(e,t){switch(t.tagID){case h.NOSCRIPT:{e.openElements.pop(),e.insertionMode=w.IN_HEAD;break}case h.BR:{vr(e,t);break}default:e._err(t,B.endTagWithoutMatchingOpenElement)}}function vr(e,t){const n=t.type===oe.EOF?B.openElementsLeftAfterEof:B.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=w.IN_HEAD,e._processToken(t)}function $T(e,t){switch(t.tagID){case h.HTML:{ze(e,t);break}case h.BODY:{e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=w.IN_BODY;break}case h.FRAMESET:{e._insertElement(t,H.HTML),e.insertionMode=w.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,B.abandonedHeadElementChild),e.openElements.push(e.headElement,h.HEAD),yt(e,t),e.openElements.remove(e.headElement);break}case h.HEAD:{e._err(t,B.misplacedStartTagForHeadElement);break}default:Mr(e,t)}}function jT(e,t){switch(t.tagID){case h.BODY:case h.HTML:case h.BR:{Mr(e,t);break}case h.TEMPLATE:{Dn(e,t);break}default:e._err(t,B.endTagWithoutMatchingOpenElement)}}function Mr(e,t){e._insertFakeElement(L.BODY,h.BODY),e.insertionMode=w.IN_BODY,_a(e,t)}function _a(e,t){switch(t.type){case oe.CHARACTER:{vh(e,t);break}case oe.WHITESPACE_CHARACTER:{Dh(e,t);break}case oe.COMMENT:{Hs(e,t);break}case oe.START_TAG:{ze(e,t);break}case oe.END_TAG:{Ea(e,t);break}case oe.EOF:{Hh(e,t);break}}}function Dh(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function vh(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function VT(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function zT(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function GT(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_FRAMESET)}function qT(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML)}function WT(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Fs.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,H.HTML)}function YT(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function QT(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),n||(e.formElement=e.openElements.current))}function XT(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,H.HTML)}function KT(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.tokenizer.state=Ae.PLAINTEXT}function ZT(e,t){e.openElements.hasInScope(h.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1}function JT(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(L.A);n&&(Mo(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ey(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ty(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(h.NOBR)&&(Mo(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ny(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ry(e,t){e.treeAdapter.getDocumentMode(e.document)!==ot.QUIRKS&&e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=w.IN_TABLE}function Mh(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Bh(e){const t=Ch(e,Sn.TYPE);return t!=null&&t.toLowerCase()===yT}function iy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),Bh(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ay(e,t){e._appendElement(t,H.HTML),t.ackSelfClosing=!0}function sy(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function oy(e,t){t.tagName=L.IMG,t.tagID=h.IMG,Mh(e,t)}function uy(e,t){e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ae.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=w.TEXT}function ly(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ae.RAWTEXT)}function cy(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ae.RAWTEXT)}function Rl(e,t){e._switchToTextParsing(t,Ae.RAWTEXT)}function dy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===w.IN_TABLE||e.insertionMode===w.IN_CAPTION||e.insertionMode===w.IN_TABLE_BODY||e.insertionMode===w.IN_ROW||e.insertionMode===w.IN_CELL?w.IN_SELECT_IN_TABLE:w.IN_SELECT}function hy(e,t){e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function fy(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,H.HTML)}function py(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(h.RTC),e._insertElement(t,H.HTML)}function my(e,t){e._reconstructActiveFormattingElements(),Rh(t),vo(t),t.selfClosing?e._appendElement(t,H.MATHML):e._insertElement(t,H.MATHML),t.ackSelfClosing=!0}function gy(e,t){e._reconstructActiveFormattingElements(),Oh(t),vo(t),t.selfClosing?e._appendElement(t,H.SVG):e._insertElement(t,H.SVG),t.ackSelfClosing=!0}function Ol(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function ze(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:{ey(e,t);break}case h.A:{JT(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{WT(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:{qT(e,t);break}case h.LI:case h.DD:case h.DT:{XT(e,t);break}case h.BR:case h.IMG:case h.WBR:case h.AREA:case h.EMBED:case h.KEYGEN:{Mh(e,t);break}case h.HR:{sy(e,t);break}case h.RB:case h.RTC:{fy(e,t);break}case h.RT:case h.RP:{py(e,t);break}case h.PRE:case h.LISTING:{YT(e,t);break}case h.XMP:{ly(e,t);break}case h.SVG:{gy(e,t);break}case h.HTML:{VT(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:{zT(e,t);break}case h.FORM:{QT(e,t);break}case h.NOBR:{ty(e,t);break}case h.MATH:{my(e,t);break}case h.TABLE:{ry(e,t);break}case h.INPUT:{iy(e,t);break}case h.PARAM:case h.TRACK:case h.SOURCE:{ay(e,t);break}case h.IMAGE:{oy(e,t);break}case h.BUTTON:{ZT(e,t);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{ny(e,t);break}case h.IFRAME:{cy(e,t);break}case h.SELECT:{dy(e,t);break}case h.OPTION:case h.OPTGROUP:{hy(e,t);break}case h.NOEMBED:case h.NOFRAMES:{Rl(e,t);break}case h.FRAMESET:{GT(e,t);break}case h.TEXTAREA:{uy(e,t);break}case h.NOSCRIPT:{e.options.scriptingEnabled?Rl(e,t):Ol(e,t);break}case h.PLAINTEXT:{KT(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:Ol(e,t)}}function by(e,t){if(e.openElements.hasInScope(h.BODY)&&(e.insertionMode=w.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function _y(e,t){e.openElements.hasInScope(h.BODY)&&(e.insertionMode=w.AFTER_BODY,Wh(e,t))}function Ey(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Ty(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 yy(e){e.openElements.hasInButtonScope(h.P)||e._insertFakeElement(L.P,h.P),e._closePElement()}function ky(e){e.openElements.hasInListItemScope(h.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(h.LI),e.openElements.popUntilTagNamePopped(h.LI))}function xy(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Ay(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Cy(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function wy(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(L.BR,h.BR),e.openElements.pop(),e.framesetOk=!1}function Fh(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==h.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function Ea(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:{Mo(e,t);break}case h.P:{yy(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:{Ey(e,t);break}case h.LI:{ky(e);break}case h.DD:case h.DT:{xy(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{Ay(e);break}case h.BR:{wy(e);break}case h.BODY:{by(e,t);break}case h.HTML:{_y(e,t);break}case h.FORM:{Ty(e);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{Cy(e,t);break}case h.TEMPLATE:{Dn(e,t);break}default:Fh(e,t)}}function Hh(e,t){e.tmplInsertionModeStack.length>0?qh(e,t):Bo(e,t)}function Iy(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 Sy(e,t){e._err(t,B.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Za(e,t){if(e.openElements.currentTagId!==void 0&&Ph.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=w.IN_TABLE_TEXT,t.type){case oe.CHARACTER:{$h(e,t);break}case oe.WHITESPACE_CHARACTER:{Uh(e,t);break}}else Jr(e,t)}function Ny(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_CAPTION}function Ly(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_COLUMN_GROUP}function Ry(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.COLGROUP,h.COLGROUP),e.insertionMode=w.IN_COLUMN_GROUP,Fo(e,t)}function Oy(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_TABLE_BODY}function Py(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.TBODY,h.TBODY),e.insertionMode=w.IN_TABLE_BODY,Ta(e,t)}function Dy(e,t){e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function vy(e,t){Bh(t)?e._appendElement(t,H.HTML):Jr(e,t),t.ackSelfClosing=!0}function My(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,H.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Jn(e,t){switch(t.tagID){case h.TD:case h.TH:case h.TR:{Py(e,t);break}case h.STYLE:case h.SCRIPT:case h.TEMPLATE:{yt(e,t);break}case h.COL:{Ry(e,t);break}case h.FORM:{My(e,t);break}case h.TABLE:{Dy(e,t);break}case h.TBODY:case h.TFOOT:case h.THEAD:{Oy(e,t);break}case h.INPUT:{vy(e,t);break}case h.CAPTION:{Ny(e,t);break}case h.COLGROUP:{Ly(e,t);break}default:Jr(e,t)}}function qr(e,t){switch(t.tagID){case h.TABLE:{e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode());break}case h.TEMPLATE:{Dn(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:Jr(e,t)}}function Jr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,_a(e,t),e.fosterParentingEnabled=n}function Uh(e,t){e.pendingCharacterTokens.push(t)}function $h(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function br(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Jr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const jh=new Set([h.CAPTION,h.COL,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]);function By(e,t){const n=t.tagID;jh.has(n)?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=w.IN_TABLE,Jn(e,t)):ze(e,t)}function Fy(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=w.IN_TABLE,n===h.TABLE&&qr(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:Ea(e,t)}}function Fo(e,t){switch(t.tagID){case h.HTML:{ze(e,t);break}case h.COL:{e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.TEMPLATE:{yt(e,t);break}default:Yi(e,t)}}function Hy(e,t){switch(t.tagID){case h.COLGROUP:{e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=w.IN_TABLE);break}case h.TEMPLATE:{Dn(e,t);break}case h.COL:break;default:Yi(e,t)}}function Yi(e,t){e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=w.IN_TABLE,e._processToken(t))}function Ta(e,t){switch(t.tagID){case h.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_ROW;break}case h.TH:case h.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(L.TR,h.TR),e.insertionMode=w.IN_ROW,ya(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=w.IN_TABLE,Jn(e,t));break}default:Jn(e,t)}}function Us(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=w.IN_TABLE);break}case h.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE,qr(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:qr(e,t)}}function ya(e,t){switch(t.tagID){case h.TH:case h.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,H.HTML),e.insertionMode=w.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=w.IN_TABLE_BODY,Ta(e,t));break}default:Jn(e,t)}}function Vh(e,t){switch(t.tagID){case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY);break}case h.TABLE:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY,Us(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=w.IN_TABLE_BODY,Us(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:qr(e,t)}}function Uy(e,t){const n=t.tagID;jh.has(n)?(e.openElements.hasInTableScope(h.TD)||e.openElements.hasInTableScope(h.TH))&&(e._closeTableCell(),ya(e,t)):ze(e,t)}function $y(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=w.IN_ROW);break}case h.TABLE:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Vh(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:break;default:Ea(e,t)}}function zh(e,t){switch(t.tagID){case h.HTML:{ze(e,t);break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._insertElement(t,H.HTML);break}case h.OPTGROUP:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._insertElement(t,H.HTML);break}case h.HR:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._appendElement(t,H.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 Gh(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:{Dn(e,t);break}}}function jy(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)):zh(e,t)}function Vy(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)):Gh(e,t)}function zy(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]=w.IN_TABLE,e.insertionMode=w.IN_TABLE,Jn(e,t);break}case h.COL:{e.tmplInsertionModeStack[0]=w.IN_COLUMN_GROUP,e.insertionMode=w.IN_COLUMN_GROUP,Fo(e,t);break}case h.TR:{e.tmplInsertionModeStack[0]=w.IN_TABLE_BODY,e.insertionMode=w.IN_TABLE_BODY,Ta(e,t);break}case h.TD:case h.TH:{e.tmplInsertionModeStack[0]=w.IN_ROW,e.insertionMode=w.IN_ROW,ya(e,t);break}default:e.tmplInsertionModeStack[0]=w.IN_BODY,e.insertionMode=w.IN_BODY,ze(e,t)}}function Gy(e,t){t.tagID===h.TEMPLATE&&Dn(e,t)}function qh(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Bo(e,t)}function qy(e,t){t.tagID===h.HTML?ze(e,t):Qi(e,t)}function Wh(e,t){var n;if(t.tagID===h.HTML){if(e.fragmentContext||(e.insertionMode=w.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 Qi(e,t)}function Qi(e,t){e.insertionMode=w.IN_BODY,_a(e,t)}function Wy(e,t){switch(t.tagID){case h.HTML:{ze(e,t);break}case h.FRAMESET:{e._insertElement(t,H.HTML);break}case h.FRAME:{e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.NOFRAMES:{yt(e,t);break}}}function Yy(e,t){t.tagID===h.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==h.FRAMESET&&(e.insertionMode=w.AFTER_FRAMESET))}function Qy(e,t){switch(t.tagID){case h.HTML:{ze(e,t);break}case h.NOFRAMES:{yt(e,t);break}}}function Xy(e,t){t.tagID===h.HTML&&(e.insertionMode=w.AFTER_AFTER_FRAMESET)}function Ky(e,t){t.tagID===h.HTML?ze(e,t):Li(e,t)}function Li(e,t){e.insertionMode=w.IN_BODY,_a(e,t)}function Zy(e,t){switch(t.tagID){case h.HTML:{ze(e,t);break}case h.NOFRAMES:{yt(e,t);break}}}function Jy(e,t){t.chars=ye,e._insertCharacters(t)}function ek(e,t){e._insertCharacters(t),e.framesetOk=!1}function Yh(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==H.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function tk(e,t){if(gT(t))Yh(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===H.MATHML?Rh(t):r===H.SVG&&(bT(t),Oh(t)),vo(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function nk(e,t){if(t.tagID===h.P||t.tagID===h.BR){Yh(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)===H.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}L.AREA,L.BASE,L.BASEFONT,L.BGSOUND,L.BR,L.COL,L.EMBED,L.FRAME,L.HR,L.IMG,L.INPUT,L.KEYGEN,L.LINK,L.META,L.PARAM,L.SOURCE,L.TRACK,L.WBR;const ka=Qh("end"),Lt=Qh("start");function Qh(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Xh(e){const t=Lt(e),n=ka(e);if(t&&n)return{start:t,end:n}}const rk=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,ik=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Pl={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Kh(e,t){const n=pk(e),r=ho("type",{handlers:{root:ak,element:sk,text:ok,comment:Jh,doctype:uk,raw:ck},unknown:dk}),i={parser:n?new Ll(Pl):Ll.getFragmentParser(void 0,Pl),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),or(i,Lt());const a=n?i.parser.document:i.parser.getFragment(),s=gE(a,{file:i.options.file});return i.stitches&&Tt(s,"comment",function(o,u,l){const c=o;if(c.value.stitch&&l&&u!==void 0){const d=l.children;return d[u]=c.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Zh(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function ak(e,t){Zh(e.children,t)}function sk(e,t){hk(e,t),Zh(e.children,t),fk(e,t)}function ok(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:oe.CHARACTER,chars:e.value,location:ei(e)};or(t,Lt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uk(e,t){const n={type:oe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ei(e)};or(t,Lt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function lk(e,t){t.stitches=!0;const n=mk(e);if("children"in e&&"children"in n){const r=Kh({type:"root",children:e.children},t.options);n.children=r.children}Jh({type:"comment",value:{stitch:n}},t)}function Jh(e,t){const n=e.value,r={type:oe.COMMENT,data:n,location:ei(e)};or(t,Lt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function ck(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,ef(t,Lt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(rk,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function dk(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))lk(n,t);else{let r="";throw ik.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function or(e,t){ef(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ae.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function ef(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function hk(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ae.PLAINTEXT)return;or(t,Lt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:An.html;i===An.html&&n==="svg"&&(i=An.svg);const a=yE({...e,children:[]},{space:i===An.svg?"svg":"html"}),s={type:oe.START_TAG,tagName:n,tagID:sr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ei(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function fk(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&bd.includes(n)||t.parser.tokenizer.state===Ae.PLAINTEXT)return;or(t,ka(e));const r={type:oe.END_TAG,tagName:n,tagID:sr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ei(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ae.RCDATA||t.parser.tokenizer.state===Ae.RAWTEXT||t.parser.tokenizer.state===Ae.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ae.DATA)}function pk(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ei(e){const t=Lt(e)||{line:void 0,column:void 0,offset:void 0},n=ka(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function mk(e){return"children"in e?Ln({...e,children:[]}):Ln(e)}function $s(e){return function(t,n){return Kh(t,{...e,file:n})}}const pn=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],En={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...pn,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...pn],h2:[["className","sr-only"]],img:[...pn,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...pn,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...pn],table:[...pn],ul:[...pn,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},tn={}.hasOwnProperty;function gk(e,t){let n={type:"root",children:[]};const r={schema:t?{...En,...t}:En,stack:[]},i=tf(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function tf(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return bk(e,n);case"doctype":return _k(e,n);case"element":return Ek(e,n);case"root":return Tk(e,n);case"text":return yk(e,n)}}}function bk(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return ti(a,t),a}}function _k(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ti(n,t),n}}function Ek(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=nf(e,t.children),i=kk(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&tn.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let u=-1;for(a=!1;++u<o.length;)e.stack.includes(o[u])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return ti(s,t),s}function Tk(e,t){const r={type:"root",children:nf(e,t.children)};return ti(r,t),r}function yk(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ti(r,t),r}function nf(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=tf(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function kk(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&tn.call(r,n)?r[n]:void 0,s=r&&tn.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let l;for(l in o)if(tn.call(o,l)){const c=o[l];let d=Dl(e,vl(a,l),l,c);d==null&&(d=Dl(e,vl(s,l),l,c)),d!=null&&(u[l]=d)}if(i&&tn.call(i,n)){const c=i[n];for(l in c)tn.call(c,l)&&!tn.call(u,l)&&(u[l]=c[l])}return u}function Dl(e,t,n,r){return t?Array.isArray(r)?xk(e,t,n,r):rf(e,t,n,r):void 0}function xk(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=rf(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function rf(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Ak(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Ak(e,t,n){const r=e.schema.protocols&&tn.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),o=i.indexOf("#"),u=i.indexOf("/");if(a<0||u>-1&&a>u||s>-1&&a>s||o>-1&&a>o)return!0;let l=-1;for(;++l<r.length;){const c=r[l];if(a===c.length&&i.slice(0,c.length)===c)return!0}return!1}function ti(e,t){const n=Xh(t);t.data&&(e.data=Ln(t.data)),n&&(e.position=n)}function vl(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function af(e){return function(t){return gk(t,e)}}const Qe=ln(/[A-Za-z]/),Ve=ln(/[\dA-Za-z]/),Ck=ln(/[#-'*+\--9=?A-Z^-~]/);function Xi(e){return e!==null&&(e<32||e===127)}const js=ln(/\d/),wk=ln(/[\dA-Fa-f]/),Ik=ln(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Ee(e){return e!==null&&(e<0||e===32)}function se(e){return e===-2||e===-1||e===32}const xa=ln(new RegExp("\\p{P}|\\p{S}","u")),Rn=ln(/\s/);function ln(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Sk(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Nk(e,t,n){const i=pa((n||{}).ignore||[]),a=Lk(t);let s=-1;for(;++s<a.length;)ga(e,"text",o);function o(l,c){let d=-1,p;for(;++d<c.length;){const f=c[d],m=p?p.children:void 0;if(i(f,m?m.indexOf(f):void 0,p))return;p=f}if(p)return u(l,c)}function u(l,c){const d=c[c.length-1],p=a[s][0],f=a[s][1];let m=0;const y=d.children.indexOf(l);let _=!1,C=[];p.lastIndex=0;let T=p.exec(l.value);for(;T;){const O=T.index,v={index:T.index,input:T.input,stack:[...c,l]};let S=f(...T,v);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=O+1:(m!==O&&C.push({type:"text",value:l.value.slice(m,O)}),Array.isArray(S)?C.push(...S):S&&C.push(S),m=O+T[0].length,_=!0),!p.global)break;T=p.exec(l.value)}return _?(m<l.value.length&&C.push({type:"text",value:l.value.slice(m)}),d.children.splice(y,1,...C)):C=[l],y+C.length}}function Lk(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([Rk(i[0]),Ok(i[1])])}return t}function Rk(e){return typeof e=="string"?new RegExp(Sk(e),"g"):e}function Ok(e){return typeof e=="function"?e:function(){return e}}const Ja="phrasing",es=["autolink","link","image","label"];function Pk(){return{transforms:[Uk],enter:{literalAutolink:vk,literalAutolinkEmail:ts,literalAutolinkHttp:ts,literalAutolinkWww:ts},exit:{literalAutolink:Hk,literalAutolinkEmail:Fk,literalAutolinkHttp:Mk,literalAutolinkWww:Bk}}}function Dk(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ja,notInConstruct:es},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ja,notInConstruct:es},{character:":",before:"[ps]",after:"\\/",inConstruct:Ja,notInConstruct:es}]}}function vk(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ts(e){this.config.enter.autolinkProtocol.call(this,e)}function Mk(e){this.config.exit.autolinkProtocol.call(this,e)}function Bk(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 Fk(e){this.config.exit.autolinkEmail.call(this,e)}function Hk(e){this.exit(e)}function Uk(e){Nk(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$k],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),jk]],{ignore:["link","linkReference"]})}function $k(e,t,n,r,i){let a="";if(!sf(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Vk(n)))return!1;const s=zk(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function jk(e,t,n,r){return!sf(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Vk(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 zk(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=Fi(e,"(");let a=Fi(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function sf(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Rn(n)||xa(n))&&(!t||n!==47)}function _t(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}of.peek=Jk;function Gk(){this.buffer()}function qk(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Wk(){this.buffer()}function Yk(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Qk(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_t(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Xk(e){this.exit(e)}function Kk(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_t(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Zk(e){this.exit(e)}function Jk(){return"["}function of(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function ex(){return{enter:{gfmFootnoteCallString:Gk,gfmFootnoteCall:qk,gfmFootnoteDefinitionLabelString:Wk,gfmFootnoteDefinition:Yk},exit:{gfmFootnoteCallString:Qk,gfmFootnoteCall:Xk,gfmFootnoteDefinitionLabelString:Kk,gfmFootnoteDefinition:Zk}}}function tx(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:of},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const l=a.enter("footnoteDefinition"),c=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),c(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
160
+ `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?uf:nx))),l(),u}}function nx(e,t,n){return t===0?e:uf(e,t,n)}function uf(e,t,n){return(n?"":" ")+e}const rx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ho.attention=ux;Ho.peek=lx;function ix(){return{canContainEols:["delete"],enter:{strikethrough:sx},exit:{strikethrough:ox}}}function ax(){return{handlers:{delete:Ho},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rx}]}}function sx(e){this.enter({type:"delete",children:[],position:void 0},e)}function ox(e){this.exit(e)}function Ho(e,t,n,r){const i=n.createTracker(r),a=n.stack.includes("strikethrough")?"~":"~~",s=n.enter("strikethrough");let o=i.move(a);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move(a),s(),o}function ux(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function lx(){return"~"}function cx(e){return e.length}function dx(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||cx,a=[],s=[],o=[],u=[];let l=0,c=-1;for(;++c<e.length;){const g=[],y=[];let _=-1;for(e[c].length>l&&(l=e[c].length);++_<e[c].length;){const C=hx(e[c][_]);if(n.alignDelimiters!==!1){const T=i(C);y[_]=T,(u[_]===void 0||T>u[_])&&(u[_]=T)}g.push(C)}s[c]=g,o[c]=y}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<l;)a[d]=Ml(r[d]);else{const g=Ml(r);for(;++d<l;)a[d]=g}d=-1;const p=[],f=[];for(;++d<l;){const g=a[d];let y="",_="";g===99?(y=":",_=":"):g===108?y=":":g===114&&(_=":");let C=n.alignDelimiters===!1?1:Math.max(1,u[d]-y.length-_.length);const T=y+"-".repeat(C)+_;n.alignDelimiters!==!1&&(C=y.length+C+_.length,C>u[d]&&(u[d]=C),f[d]=C),p[d]=T}s.splice(1,0,p),o.splice(1,0,f),c=-1;const m=[];for(;++c<s.length;){const g=s[c],y=o[c];d=-1;const _=[];for(;++d<l;){const C=g[d]||"";let T="",O="";if(n.alignDelimiters!==!1){const v=u[d]-(y[d]||0),S=a[d];S===114?T=" ".repeat(v):S===99?v%2?(T=" ".repeat(v/2+.5),O=" ".repeat(v/2-.5)):(T=" ".repeat(v/2),O=T):O=" ".repeat(v)}n.delimiterStart!==!1&&!d&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||d)&&_.push(" "),n.alignDelimiters!==!1&&_.push(T),_.push(C),n.alignDelimiters!==!1&&_.push(O),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||d!==l-1)&&_.push("|")}m.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return m.join(`
161
+ `)}function hx(e){return e==null?"":String(e)}function Ml(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}const fx=pa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function px(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),mx);return i(),s}function mx(e,t,n){return">"+(n?"":" ")+e}function gx(e,t){return Bl(e,t.inConstruct,!0)&&!Bl(e,t.notInConstruct,!1)}function Bl(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 Fl(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const a=n.unsafe[i];if(a.character===`
162
+ `&&!a.before&&!a.after&&gx(n.stack,a))return/[\t ]/.test(r.before)?"":" "}return`\\
163
+ `}function bx(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function _x(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Ex(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 Tx(e,t,n,r){const i=Ex(n),a=e.value||"";if(_x(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(a,yx);return d(),p}const s=n.createTracker(r),o=i.repeat(Math.max(bx(a,i)+1,3)),u=n.enter("codeFenced"),l=i==="`"?"GraveAccent":"Tilde";let c=s.move(o);if(e.lang){const d=n.enter(`codeFencedLang${l}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${l}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
164
+ `,encode:["`"],...s.current()})),d()}return c+=s.move(`
165
+ `),a&&(c+=s.move(a+`
166
+ `)),c+=s.move(o),u(),c}function yx(e,t,n){return(n?"":" ")+e}function Uo(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 kx(e,t,n,r){const i=Uo(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
167
+ `,...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),s(),l}function xx(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}$o.attention=Ax;$o.peek=Cx;function $o(e,t,n,r){const i=n.enter("phrasing"),a=n.containerPhrasing({type:"root",children:[e]},r);return i(),a}function Ax(e,t){return{construct:"emphasis",markers:xx(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function Cx(e,t,n){return n.options.emphasis||"*"}function wx(e){return"&#x"+e.toString(16).toUpperCase()+";"}const Ix={};function jo(e,t){const n=Ix,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return lf(e,r,i)}function lf(e,t,n){if(Sx(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 Hl(e.children,t,n)}return Array.isArray(e)?Hl(e,t,n):""}function Hl(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=lf(e[i],t,n);return r.join("")}function Sx(e){return!!(e&&typeof e=="object")}function Nx(e,t){let n=!1;return Tt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,vs}),!!((!e.depth||e.depth<3)&&jo(e)&&(t.options.setext||n))}function Lx(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Nx(e,n)){const d=n.enter("headingSetext"),p=n.enter("phrasing"),f=n.containerPhrasing(e,{...a.current(),before:`
168
+ `,after:`
169
+ `});return p(),d(),f+`
170
+ `+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
171
+ `))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");a.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
172
+ `,...a.current()});const c=l.charCodeAt(0);return(c===9||c===32)&&(l=wx(c)+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),u(),o(),l}cf.peek=Rx;function cf(e){return e.value||""}function Rx(){return"<"}df.peek=Ox;function df(e,t,n,r){const i=Uo(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),l+=u.move(")"),s(),l}function Ox(){return"!"}hf.peek=Px;function hf(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const l=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const c=n.stack;n.stack=c.filter(function(p){return p!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=c,a(),i==="full"||!l||l!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function Px(){return"!"}ff.peek=Dx;function ff(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);if(!s.atBreak)continue;let u;for(;u=o.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function Dx(){return"`"}function pf(e,t){const n=jo(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))}mf.peek=vx;function mf(e,t,n,r){const i=Uo(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);if(pf(e,n)){const c=n.stack;n.stack=c.filter(function(f){return f!=="phrasing"});const d=n.enter("autolink");let p=s.move("<");return p+=s.move(n.containerPhrasing(e,{before:p,after:">",...s.current()})),p+=s.move(">"),d(),n.stack=c,p}const o=n.enter("link");let u=n.enter("label"),l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),o(),l}function vx(e,t,n){return pf(e,n)?"<":"["}gf.peek=Mx;function gf(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const c=n.stack;n.stack=c.filter(function(p){return p!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=c,a(),i==="full"||!l||l!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function Mx(){return"["}function Vo(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 Bx(e){const t=Vo(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 Fx(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 bf(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 Hx(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Fx(n):Vo(n);const o=e.ordered?s==="."?")":".":Bx(n);let u=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&&(u=!0),bf(n)===s&&c){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),l}function Ux(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 $x(e,t,n,r){const i=Ux(n);let a=n.bulletCurrent||Vo(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),c);return u(),l;function c(d,p,f){return p?(f?"":" ".repeat(s))+d:(f?a:a+" ".repeat(s-a.length))+d}}function jx(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}function Vx(e,t,n,r){if(!e.children.some(function(o){return fx(o)}))return n.containerFlow(e,r);const a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),s}function zx(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}zo.attention=Gx;zo.peek=qx;function zo(e,t,n,r){const i=n.enter("phrasing"),a=n.containerPhrasing({type:"root",children:[e]},r);return i(),a}function Gx(e,t){return{construct:"strong",markers:zx(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function qx(e,t,n){return n.options.strong||"*"}function Wx(e,t,n,r){return n.safe(e.value,r)}function Yx(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 Qx(e,t,n){const r=(bf(n)+(n.options.ruleSpaces?" ":"")).repeat(Yx(n));return n.options.ruleSpaces?r.slice(0,-1):r}const _f={blockquote:px,break:Fl,code:Tx,definition:kx,emphasis:$o,hardBreak:Fl,heading:Lx,html:cf,image:df,imageReference:hf,inlineCode:ff,link:mf,linkReference:gf,list:Hx,listItem:$x,paragraph:jx,root:Vx,strong:zo,text:Wx,thematicBreak:Qx},Xx=["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"],Ul=["pre","script","style","textarea"],$l=document.createElement("i");function Go(e){const t="&"+e+";";$l.innerHTML=t;const n=$l.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ef(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)}const Kx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Zx(e){return e.replace(Kx,Jx)}function Jx(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Ef(n.slice(a?2:1),a?16:10)}return Go(n)||e}function Ki(e){if(e===null||Ee(e)||Rn(e))return 1;if(xa(e))return 2}function e2(){return{enter:{table:t2,tableData:jl,tableHeader:jl,tableRow:r2},exit:{codeText:i2,table:n2,tableData:ns,tableHeader:ns,tableRow:ns}}}function t2(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 n2(e){this.exit(e),this.data.inTable=void 0}function r2(e){this.enter({type:"tableRow",children:[]},e)}function ns(e){this.exit(e)}function jl(e){this.enter({type:"tableCell",children:[]},e)}function i2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,a2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function a2(e,t){return t==="|"?t:e}function s2(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
173
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:o}};function s(f,m,g,y){return l(c(f,g,y),f.align)}function o(f,m,g,y){const _=d(f,g,y),C=l([_]);return C.slice(0,C.indexOf(`
174
+ `))}function u(f,m,g,y){const _=g.enter("tableCell"),C=g.enter("phrasing"),T=g.containerPhrasing(f,{...y,before:a,after:a});return C(),_(),T}function l(f,m){return dx(f,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(f,m,g){const y=f.children;let _=-1;const C=[],T=m.enter("table");for(;++_<y.length;)C[_]=d(y[_],m,g);return T(),C}function d(f,m,g){const y=f.children;let _=-1;const C=[],T=m.enter("tableRow");for(;++_<y.length;)C[_]=u(y[_],f,m,g);return T(),C}function p(f,m,g){let y=_f.inlineCode(f,m,g);return g.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function o2(){return{exit:{taskListCheckValueChecked:Vl,taskListCheckValueUnchecked:Vl,paragraph:l2}}}function u2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:c2}}}function Vl(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function l2(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 a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;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 c2(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let u=_f.listItem(e,t,n,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+s}}function d2(){return[Pk(),ex(),ix(),e2(),o2()]}function h2(e){return{extensions:[Dk(),tx(e),ax(),s2(e),u2()]}}function Et(e,t,n,r){const i=e.length;let a=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);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function ut(e,t){return e.length>0?(Et(e,e.length,0,t),e):t}const zl={}.hasOwnProperty;function Tf(e){const t={};let n=-1;for(;++n<e.length;)f2(t,e[n]);return t}function f2(e,t){let n;for(n in t){const i=(zl.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){zl.call(i,s)||(i[s]=[]);const o=a[s];p2(i[s],Array.isArray(o)?o:o?[o]:[])}}}function p2(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)}const m2={tokenize:y2,partial:!0},yf={tokenize:k2,partial:!0},kf={tokenize:x2,partial:!0},xf={tokenize:A2,partial:!0},g2={tokenize:C2,partial:!0},Af={name:"wwwAutolink",tokenize:E2,previous:wf},Cf={name:"protocolAutolink",tokenize:T2,previous:If},zt={name:"emailAutolink",tokenize:_2,previous:Sf},Rt={};function b2(){return{text:Rt}}let mn=48;for(;mn<123;)Rt[mn]=zt,mn++,mn===58?mn=65:mn===91&&(mn=97);Rt[43]=zt;Rt[45]=zt;Rt[46]=zt;Rt[95]=zt;Rt[72]=[zt,Cf];Rt[104]=[zt,Cf];Rt[87]=[zt,Af];Rt[119]=[zt,Af];function _2(e,t,n){const r=this;let i,a;return s;function s(d){return!Vs(d)||!Sf.call(r,r.previous)||qo(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return Vs(d)?(e.consume(d),o):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(g2,c,l)(d):d===45||d===95||Ve(d)?(a=!0,e.consume(d),u):c(d)}function l(d){return e.consume(d),i=!0,u}function c(d){return a&&i&&Qe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function E2(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!wf.call(r,r.previous)||qo(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(m2,e.attempt(yf,e.attempt(kf,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function T2(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&If.call(r,r.previous)&&!qo(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(Qe(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),a?l:(a=!0,u)):n(d)}function l(d){return d===null||Xi(d)||Ee(d)||Rn(d)||xa(d)?n(d):e.attempt(yf,e.attempt(kf,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function y2(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),a):n(s)}function a(s){return s===null?n(s):t(s)}}function k2(e,t,n){let r,i,a;return s;function s(l){return l===46||l===95?e.check(xf,u,o)(l):l===null||Ee(l)||Rn(l)||l!==45&&xa(l)?u(l):(a=!0,e.consume(l),s)}function o(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function u(l){return i||r||!a?n(l):t(l)}}function x2(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(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(xf,t,a)(s):s===null||Ee(s)||Rn(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function A2(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ee(o)||Rn(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Ee(o)||Rn(o)?t(o):r(o)}function a(o){return Qe(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):Qe(o)?(e.consume(o),s):n(o)}}function C2(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Ve(a)?n(a):t(a)}}function wf(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ee(e)}function If(e){return!Qe(e)}function Sf(e){return!(e===47||Vs(e))}function Vs(e){return e===43||e===45||e===46||e===95||Ve(e)}function qo(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}function ur(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&Ve(e.charCodeAt(n+1))&&Ve(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Aa(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const zs={name:"attention",resolveAll:w2,tokenize:I2};function w2(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,s={...e[i][1].end},o={...e[n][1].start};Gl(s,-a),Gl(o,a);const u={type:a>1?"strongSequence":"emphasisSequence",start:s,end:{...e[i][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:o},c={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?"strong":"emphasis",start:{...u.start},end:{...l.end}};e[i][1].end={...u.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=ut(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=ut(r,[["enter",d,t],["enter",u,t],["exit",u,t],["enter",c,t]]),r=ut(r,Aa(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=ut(r,[["exit",c,t],["enter",l,t],["exit",l,t],["exit",d,t]]);let p=0;e[n][1].end.offset-e[n][1].start.offset&&(p=2,r=ut(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),Et(e,i-1,n-i+3,r),n=i+r.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function I2(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ki(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const l=e.exit("attentionSequence"),c=Ki(u),d=!c||c===2&&i||n.includes(u)&&u!==42&&u!==95,p=!i||i===2&&c||n.includes(r)&&r!==42&&r!==95;return l._open=!!(a===42?d:d&&(i||!p)),l._close=!!(a===42?p:p&&(c||!d)),t(u)}}function Gl(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const S2={name:"autolink",tokenize:N2};function N2(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(f){return Qe(f)?(e.consume(f),s):f===64?n(f):l(f)}function s(f){return f===43||f===45||f===46||Ve(f)?(r=1,o(f)):l(f)}function o(f){return f===58?(e.consume(f),r=0,u):(f===43||f===45||f===46||Ve(f))&&r++<32?(e.consume(f),o):(r=0,l(f))}function u(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Xi(f)?n(f):(e.consume(f),u)}function l(f){return f===64?(e.consume(f),c):Ck(f)?(e.consume(f),l):n(f)}function c(f){return Ve(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Ve(f))&&r++<63){const m=f===45?p:d;return e.consume(f),m}return n(f)}}function fe(e,t,n,r){const i=r?r-1:1/0;let a=0;return s;function s(u){return se(u)?(e.enter(n),o(u)):t(u)}function o(u){return se(u)&&a++<i?(e.consume(u),o):(e.exit(n),t(u))}}function Nf(e,t,n,r,i,a){let s=0;return o;function o(c){return se(c)?(e.enter(r),u(c)):l(c)}function u(c){return se(c)&&s<a?(e.consume(c),s++,u):(e.exit(r),l(c))}function l(c){return s>=i?t(c):n(c)}}const ni={partial:!0,tokenize:L2};function L2(e,t,n){return r;function r(a){return se(a)?fe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||J(a)?t(a):n(a)}}const Lf={continuation:{tokenize:O2},exit:P2,name:"blockQuote",tokenize:R2};function R2(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return se(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function O2(e,t,n){const r=this;return i;function i(s){return se(s)?fe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Lf,t,n)(s)}}function P2(e){e.exit("blockQuote")}const Rf={name:"characterEscape",tokenize:D2};function D2(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Ik(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Of={name:"characterReference",tokenize:v2};function v2(e,t,n){const r=this;let i=0,a,s;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,s=Ve,c(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=wk,c):(e.enter("characterReferenceValue"),a=7,s=js,c(d))}function c(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===Ve&&!Go(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),c):n(d)}}const Gs={partial:!0,tokenize:M2};function M2(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"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const ql={concrete:!0,name:"codeFenced",tokenize:B2};function B2(e,t,n){const r=this,i={partial:!0,tokenize:v};let a=0,s=0,o;return u;function u(S){return l(S)}function l(S){const M=r.events[r.events.length-1];return a=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,o=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===o?(s++,e.consume(S),c):s<3?n(S):(e.exit("codeFencedFenceSequence"),se(S)?fe(e,d,"whitespace")(S):d(S))}function d(S){return S===null||J(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(Gs,g,O)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||J(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):se(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fe(e,f,"whitespace")(S)):S===96&&S===o?n(S):(e.consume(S),p)}function f(S){return S===null||J(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||J(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===o?n(S):(e.consume(S),m)}function g(S){return e.attempt(i,O,y)(S)}function y(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),_}function _(S){return a>0&&se(S)?fe(e,C,"linePrefix",a+1)(S):C(S)}function C(S){return S===null||J(S)?e.check(Gs,g,O)(S):(e.enter("codeFlowValue"),T(S))}function T(S){return S===null||J(S)?(e.exit("codeFlowValue"),C(S)):(e.consume(S),T)}function O(S){return e.exit("codeFenced"),t(S)}function v(S,M,D){let z=0;return R;function R($){return S.enter("lineEnding"),S.consume($),S.exit("lineEnding"),V}function V($){return S.enter("codeFencedFence"),se($)?fe(S,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):G($)}function G($){return $===o?(S.enter("codeFencedFenceSequence"),Z($)):D($)}function Z($){return $===o?(z++,S.consume($),Z):z>=s?(S.exit("codeFencedFenceSequence"),se($)?fe(S,W,"whitespace")($):W($)):D($)}function W($){return $===null||J($)?(S.exit("codeFencedFence"),M($)):D($)}}}const rs={name:"codeIndented",tokenize:H2},F2={partial:!0,tokenize:U2};function H2(e,t,n){return r;function r(o){return e.enter("codeIndented"),Nf(e,i,n,"linePrefix",4,4)(o)}function i(o){return o===null?s(o):J(o)?e.attempt(F2,i,s)(o):(e.enter("codeFlowValue"),a(o))}function a(o){return o===null||J(o)?(e.exit("codeFlowValue"),i(o)):(e.consume(o),a)}function s(o){return e.exit("codeIndented"),t(o)}}function U2(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):J(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Nf(e,t,a,"linePrefix",4,4)(s)}function a(s){return J(s)?i(s):n(s)}}const $2={name:"codeText",previous:V2,resolve:j2,tokenize:z2};function j2(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 V2(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function z2(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(a=e.enter("codeTextSequence"),i=0,c(d)):J(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||J(d)?(e.exit("codeTextData"),u(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)):(a.type="codeTextData",l(d))}}class G2{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 a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&_r(this.left,r),a.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),_r(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),_r(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);_r(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);_r(this.left,n.reverse())}}}function _r(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 Pf(e){const t={};let n=-1,r,i,a,s,o,u,l;const c=new G2(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"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,q2(c,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=c.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},o=c.slice(i,n),o.unshift(r),c.splice(i,n-i+1,o))}}return Et(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function q2(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,u=[],l={};let c,d,p=-1,f=n,m=0,g=0;const y=[g];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(g=p+1,y.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),p=y.length;p--;){const _=o.slice(y[p],y[p+1]),C=a.pop();u.push([C,C+_.length-1]),e.splice(C,2,_)}for(u.reverse(),p=-1;++p<u.length;)l[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return l}const W2={resolve:Q2,tokenize:X2},Y2={partial:!0,tokenize:K2};function Q2(e){return Pf(e),e}function X2(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):J(o)?e.check(Y2,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function K2(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),fe(e,a,"linePrefix")}function a(s){if(s===null||J(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Df(e,t,n,r,i,a,s,o,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return d;function d(_){return _===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Xi(_)?n(_):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),g(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===62?(e.exit("chunkString"),e.exit(o),p(_)):_===null||_===60||J(_)?n(_):(e.consume(_),_===92?m:f)}function m(_){return _===60||_===62||_===92?(e.consume(_),f):f(_)}function g(_){return!c&&(_===null||_===41||Ee(_))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(_)):c<l&&_===40?(e.consume(_),c++,g):_===41?(e.consume(_),c--,g):_===null||_===32||_===40||Xi(_)?n(_):(e.consume(_),_===92?y:g)}function y(_){return _===40||_===41||_===92?(e.consume(_),g):g(_)}}function vf(e,t,n,r,i,a){const s=this;let o=0,u;return l;function l(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(a),c}function c(f){return o>999||f===null||f===91||f===93&&!u||f===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):f===93?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):J(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||J(f)||o++>999?(e.exit("chunkString"),c(f)):(e.consume(f),u||(u=!se(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),o++,d):d(f)}}function Mf(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===s?(e.exit(a),u(s)):p===null?n(p):J(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),fe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||J(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?d:c)}function d(p){return p===s||p===92?(e.consume(p),c):c(p)}}function Br(e,t){let n;return r;function r(i){return J(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):se(i)?fe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Z2={name:"definition",tokenize:eA},J2={partial:!0,tokenize:tA};function eA(e,t,n){const r=this;let i;return a;function a(f){return e.enter("definition"),s(f)}function s(f){return vf.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return i=_t(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),u):n(f)}function u(f){return Ee(f)?Br(e,l)(f):l(f)}function l(f){return Df(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(J2,d,d)(f)}function d(f){return se(f)?fe(e,p,"whitespace")(f):p(f)}function p(f){return f===null||J(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function tA(e,t,n){return r;function r(o){return Ee(o)?Br(e,i)(o):n(o)}function i(o){return Mf(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return se(o)?fe(e,s,"whitespace")(o):s(o)}function s(o){return o===null||J(o)?t(o):n(o)}}const nA={name:"hardBreakEscape",tokenize:rA};function rA(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return J(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const iA={name:"headingAtx",resolve:aA,tokenize:sA};function aA(e,t){let n=e.length-2,r=3;if(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){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};Et(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])}return e}function sA(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||Ee(c)?(e.exit("atxHeadingSequence"),o(c)):n(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||J(c)?(e.exit("atxHeading"),t(c)):se(c)?fe(e,o,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),o(c))}function l(c){return c===null||c===35||Ee(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),l)}}const oA={concrete:!0,name:"htmlFlow",resolveTo:lA,tokenize:cA},uA={partial:!0,tokenize:dA};function lA(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 cA(e,t,n){const r=this;let i,a,s,o,u;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),p):I===47?(e.consume(I),a=!0,g):I===63?(e.consume(I),i=3,r.interrupt?t:x):Qe(I)?(e.consume(I),s=String.fromCharCode(I),y):n(I)}function p(I){return I===45?(e.consume(I),i=2,f):I===91?(e.consume(I),i=5,o=0,m):Qe(I)?(e.consume(I),i=4,r.interrupt?t:x):n(I)}function f(I){return I===45?(e.consume(I),r.interrupt?t:x):n(I)}function m(I){const Fe="CDATA[";return I===Fe.charCodeAt(o++)?(e.consume(I),o===Fe.length?r.interrupt?t:G:m):n(I)}function g(I){return Qe(I)?(e.consume(I),s=String.fromCharCode(I),y):n(I)}function y(I){if(I===null||I===47||I===62||Ee(I)){const Fe=I===47,pe=s.toLowerCase();return!Fe&&!a&&Ul.includes(pe)?(i=1,r.interrupt?t(I):G(I)):Xx.includes(s.toLowerCase())?(i=6,Fe?(e.consume(I),_):r.interrupt?t(I):G(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?C(I):T(I))}return I===45||Ve(I)?(e.consume(I),s+=String.fromCharCode(I),y):n(I)}function _(I){return I===62?(e.consume(I),r.interrupt?t:G):n(I)}function C(I){return se(I)?(e.consume(I),C):R(I)}function T(I){return I===47?(e.consume(I),R):I===58||I===95||Qe(I)?(e.consume(I),O):se(I)?(e.consume(I),T):R(I)}function O(I){return I===45||I===46||I===58||I===95||Ve(I)?(e.consume(I),O):v(I)}function v(I){return I===61?(e.consume(I),S):se(I)?(e.consume(I),v):T(I)}function S(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),u=I,M):se(I)?(e.consume(I),S):D(I)}function M(I){return I===u?(e.consume(I),u=null,z):I===null||J(I)?n(I):(e.consume(I),M)}function D(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Ee(I)?v(I):(e.consume(I),D)}function z(I){return I===47||I===62||se(I)?T(I):n(I)}function R(I){return I===62?(e.consume(I),V):n(I)}function V(I){return I===null||J(I)?G(I):se(I)?(e.consume(I),V):n(I)}function G(I){return I===45&&i===2?(e.consume(I),K):I===60&&i===1?(e.consume(I),X):I===62&&i===4?(e.consume(I),Pe):I===63&&i===3?(e.consume(I),x):I===93&&i===5?(e.consume(I),Ie):J(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(uA,ke,Z)(I)):I===null||J(I)?(e.exit("htmlFlowData"),Z(I)):(e.consume(I),G)}function Z(I){return e.check(Gs,W,ke)(I)}function W(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),$}function $(I){return I===null||J(I)?Z(I):(e.enter("htmlFlowData"),G(I))}function K(I){return I===45?(e.consume(I),x):G(I)}function X(I){return I===47?(e.consume(I),s="",de):G(I)}function de(I){if(I===62){const Fe=s.toLowerCase();return Ul.includes(Fe)?(e.consume(I),Pe):G(I)}return Qe(I)&&s.length<8?(e.consume(I),s+=String.fromCharCode(I),de):G(I)}function Ie(I){return I===93?(e.consume(I),x):G(I)}function x(I){return I===62?(e.consume(I),Pe):I===45&&i===2?(e.consume(I),x):G(I)}function Pe(I){return I===null||J(I)?(e.exit("htmlFlowData"),ke(I)):(e.consume(I),Pe)}function ke(I){return e.exit("htmlFlow"),t(I)}}function dA(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ni,t,n)}}const hA={name:"htmlText",tokenize:fA};function fA(e,t,n){const r=this;let i,a,s;return o;function o(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),u}function u(x){return x===33?(e.consume(x),l):x===47?(e.consume(x),v):x===63?(e.consume(x),T):Qe(x)?(e.consume(x),D):n(x)}function l(x){return x===45?(e.consume(x),c):x===91?(e.consume(x),a=0,m):Qe(x)?(e.consume(x),C):n(x)}function c(x){return x===45?(e.consume(x),f):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),p):J(x)?(s=d,X(x)):(e.consume(x),d)}function p(x){return x===45?(e.consume(x),f):d(x)}function f(x){return x===62?K(x):x===45?p(x):d(x)}function m(x){const Pe="CDATA[";return x===Pe.charCodeAt(a++)?(e.consume(x),a===Pe.length?g:m):n(x)}function g(x){return x===null?n(x):x===93?(e.consume(x),y):J(x)?(s=g,X(x)):(e.consume(x),g)}function y(x){return x===93?(e.consume(x),_):g(x)}function _(x){return x===62?K(x):x===93?(e.consume(x),_):g(x)}function C(x){return x===null||x===62?K(x):J(x)?(s=C,X(x)):(e.consume(x),C)}function T(x){return x===null?n(x):x===63?(e.consume(x),O):J(x)?(s=T,X(x)):(e.consume(x),T)}function O(x){return x===62?K(x):T(x)}function v(x){return Qe(x)?(e.consume(x),S):n(x)}function S(x){return x===45||Ve(x)?(e.consume(x),S):M(x)}function M(x){return J(x)?(s=M,X(x)):se(x)?(e.consume(x),M):K(x)}function D(x){return x===45||Ve(x)?(e.consume(x),D):x===47||x===62||Ee(x)?z(x):n(x)}function z(x){return x===47?(e.consume(x),K):x===58||x===95||Qe(x)?(e.consume(x),R):J(x)?(s=z,X(x)):se(x)?(e.consume(x),z):K(x)}function R(x){return x===45||x===46||x===58||x===95||Ve(x)?(e.consume(x),R):V(x)}function V(x){return x===61?(e.consume(x),G):J(x)?(s=V,X(x)):se(x)?(e.consume(x),V):z(x)}function G(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,Z):J(x)?(s=G,X(x)):se(x)?(e.consume(x),G):(e.consume(x),W)}function Z(x){return x===i?(e.consume(x),i=void 0,$):x===null?n(x):J(x)?(s=Z,X(x)):(e.consume(x),Z)}function W(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||Ee(x)?z(x):(e.consume(x),W)}function $(x){return x===47||x===62||Ee(x)?z(x):n(x)}function K(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function X(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),de}function de(x){return se(x)?fe(e,Ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):Ie(x)}function Ie(x){return e.enter("htmlTextData"),s(x)}}const Wo={name:"labelEnd",resolveAll:bA,resolveTo:_A,tokenize:EA},pA={tokenize:TA},mA={tokenize:yA},gA={tokenize:kA};function bA(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 _A(e,t){let n=e.length,r=0,i,a,s;for(;n--;){const c=e[n][1];if(i){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[n][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(i=n,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(a=n)}const o={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},l={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",o,t],["enter",u,t]],s=ut(s,e.slice(i+1,i+r+3)),s=ut(s,[["enter",l,t]]),s=ut(s,Aa(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=ut(s,[["exit",l,t],e[a-2],e[a-1],["exit",u,t]]),s=ut(s,e.slice(a+1)),s=ut(s,[["exit",o,t]]),Et(e,i,e.length,s),e}function EA(e,t,n){const r=this,i=r._labelStarts;let a,s;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return o;function o(p){return a?a._inactive?d(p):(s=r.parser.defined.includes(_t(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(pA,c,s?c:d)(p):p===91?e.attempt(mA,c,s?l:d)(p):s?c(p):d(p)}function l(p){return e.attempt(gA,c,d)(p)}function c(p){return i.pop(),t(p)}function d(p){return a._balanced=!0,n(p)}}function TA(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 Ee(d)?Br(e,a)(d):a(d)}function a(d){return d===41?c(d):Df(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Ee(d)?Br(e,u)(d):c(d)}function o(d){return n(d)}function u(d){return d===34||d===39||d===40?Mf(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function l(d){return Ee(d)?Br(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 yA(e,t,n){const r=this;return i;function i(o){return vf.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(_t(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function kA(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const xA={name:"labelStartImage",resolveAll:Wo.resolveAll,tokenize:AA};function AA(e,t,n){const r=this;let i;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),s}function s(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),i=e.exit("labelImage"),o):n(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(u))}}const CA={name:"labelStartLink",resolveAll:Wo.resolveAll,tokenize:wA};function wA(e,t,n){const r=this;let i;return a;function a(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),i=e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(o))}}const is={name:"lineEnding",tokenize:IA};function IA(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fe(e,t,"linePrefix")}}const Ri={name:"thematicBreak",tokenize:SA};function SA(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,o(l)}function o(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||J(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),se(l)?fe(e,o,"whitespace")(l):o(l))}}const Je={continuation:{tokenize:OA},exit:DA,name:"list",tokenize:RA},NA={partial:!0,tokenize:vA},LA={partial:!0,tokenize:PA};function RA(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(f){const m=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:js(f)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Ri,n,l)(f):l(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(f)}return n(f)}function u(f){return js(f)&&++s<10?(e.consume(f),u):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),l(f)):n(f)}function l(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(ni,r.interrupt?n:c,e.attempt(NA,p,d))}function c(f){return r.containerState.initialBlankLine=!0,a++,p(f)}function d(f){return se(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function OA(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ni,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fe(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!se(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(LA,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,fe(e,e.attempt(Je,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function PA(e,t,n){const r=this;return fe(e,i,"listItemIndent",r.containerState.size+1);function i(a){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(a):n(a)}}function DA(e){e.exit(this.containerState.type)}function vA(e,t,n){const r=this;return fe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!se(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}let Zi=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Wl(this,t,n,r,!1)}addBefore(t,n,r){Wl(this,t,n,r,!0)}consume(t){if(this.map.sort(function(a,s){return a[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 a of i)t.push(a);i=r.pop()}this.map.length=0,this.index.clear()}};function Wl(e,t,n,r,i){if(n===0&&r.length===0)return;const a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}const s=[t,n,r];e.map.push(s),e.index.set(t,s)}const Yl={name:"setextUnderline",resolveTo:MA,tokenize:BA};function MA(e,t){const n=new Zi;let r=e.length,i,a,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(a=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!s&&e[r][1].type==="definition"&&(s=r);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",s?(n.add(a,0,[["enter",o,t]]),n.add(s+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[s][1].end}):e[i][1]=o,n.add(e.length,0,[["exit",o,t]]),n.consume(e),e}function BA(e,t,n){const r=this;let i;return a;function a(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"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),se(l)?fe(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||J(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const FA={tokenize:qA,partial:!0};function HA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:VA,continuation:{tokenize:zA},exit:GA}},text:{91:{name:"gfmFootnoteCall",tokenize:jA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:UA,resolveTo:$A}}}}function UA(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const l=_t(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function $A(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 a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function jA(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(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(a>999||d===93&&!s||d===null||d===91||Ee(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(_t(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ee(d)||(s=!0),a++,e.consume(d),d===92?c:l}function c(d){return d===91||d===92||d===93?(e.consume(d),a++,l):l(d)}}function VA(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(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&&!o||m===null||m===91||Ee(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return a=_t(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ee(m)||(o=!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 p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),fe(e,f,"gfmFootnoteDefinitionWhitespace")):n(m)}function f(m){return t(m)}}function zA(e,t,n){return e.check(ni,t,e.attempt(FA,t,n))}function GA(e){e.exit("gfmFootnoteDefinition")}function qA(e,t,n){const r=this;return fe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function WA(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let l=u;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[u][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[u][1].end)},d={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",c,o],["enter",s[l][1],o],["exit",s[l][1],o],["enter",d,o]],f=o.parser.constructs.insideSpan.null;f&&Et(p,p.length,0,Aa(f,s.slice(l+1,u),o)),Et(p,p.length,0,[["exit",d,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",c,o]]),Et(s,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const l=this.previous,c=this.events;let d=0;return p;function p(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(s.enter("strikethroughSequenceTemporary"),f(m))}function f(m){const g=Ki(l);if(m===126)return d>1?u(m):(s.consume(m),d++,f);if(d<2&&!n)return u(m);const y=s.exit("strikethroughSequenceTemporary"),_=Ki(m);return y._open=!_||_===2&&!!g,y._close=!g||g===2&&!!_,o(m)}}}class YA{constructor(){this.map=[],this.index=new Map}add(t,n,r){QA(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[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 a of i)t.push(a);i=r.pop()}this.map.length=0,this.index.clear()}}function QA(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const a=[t,n,r];e.map.push(a),e.index.set(t,a)}function XA(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 a=r.length-1;r[a]=r[a]==="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 KA(){return{flow:{null:{name:"table",tokenize:ZA,resolveAll:JA}}}}function ZA(e,t,n){const r=this;let i=0,a=0,s;return o;function o(R){let V=r.events.length-1;for(;V>-1;){const{type:W}=r.events[V][1];if(W==="lineEnding"||W==="linePrefix")V--;else break}const G=V>-1?r.events[V][1].type:null,Z=G==="tableHead"||G==="tableRow"?S:u;return Z===S&&r.parser.lazy[r.now().line]?n(R):Z(R)}function u(R){return e.enter("tableHead"),e.enter("tableRow"),l(R)}function l(R){return R===124||(s=!0,a+=1),c(R)}function c(R){return R===null?n(R):J(R)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),f):n(R):se(R)?fe(e,c,"whitespace")(R):(a+=1,s&&(s=!1,i+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||Ee(R)?(e.exit("data"),c(R)):(e.consume(R),R===92?p:d)}function p(R){return R===92||R===124?(e.consume(R),d):d(R)}function f(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),s=!1,se(R)?fe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):m(R))}function m(R){return R===45||R===58?y(R):R===124?(s=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),g):v(R)}function g(R){return se(R)?fe(e,y,"whitespace")(R):y(R)}function y(R){return R===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):R===45?(a+=1,_(R)):R===null||J(R)?O(R):v(R)}function _(R){return R===45?(e.enter("tableDelimiterFiller"),C(R)):v(R)}function C(R){return R===45?(e.consume(R),C):R===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(R))}function T(R){return se(R)?fe(e,O,"whitespace")(R):O(R)}function O(R){return R===124?m(R):R===null||J(R)?!s||i!==a?v(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):v(R)}function v(R){return n(R)}function S(R){return e.enter("tableRow"),M(R)}function M(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),M):R===null||J(R)?(e.exit("tableRow"),t(R)):se(R)?fe(e,M,"whitespace")(R):(e.enter("data"),D(R))}function D(R){return R===null||R===124||Ee(R)?(e.exit("data"),M(R)):(e.consume(R),R===92?z:D)}function z(R){return R===92||R===124?(e.consume(R),D):D(R)}}function JA(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,l,c,d;const p=new YA;for(;++n<e.length;){const f=e[n],m=f[1];f[0]==="enter"?m.type==="tableHead"?(o=!1,u!==0&&(Ql(p,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.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&&(a[1]!==0&&(s[0]=s[1],d=gi(p,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=gi(p,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):m.type==="tableHead"?(o=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],d=gi(p,t,a,i,n,d)):s[1]!==0&&(d=gi(p,t,s,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Ql(p,t,u,l,c),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=XA(t.events,n))}return e}function gi(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},qn(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=qn(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=qn(t.events,n[2]),c=qn(t.events,n[3]),d={type:o,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,g=n[3]-n[2]-1;e.add(m,g,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},qn(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Ql(e,t,n,r,i){const a=[],s=qn(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function qn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const eC={name:"tasklistCheck",tokenize:nC};function tC(){return{text:{91:eC}}}function nC(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return Ee(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return J(u)?t(u):se(u)?e.check({tokenize:rC},t,n)(u):n(u)}}function rC(e,t,n){return fe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function iC(e){return Tf([b2(),HA(),WA(e),KA(),tC()])}const aC={};function sC(e){const t=this,n=e||aC,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(iC(n)),a.push(d2()),s.push(h2(n))}var oC=Object.defineProperty,uC=Object.defineProperties,lC=Object.getOwnPropertyDescriptors,Xl=Object.getOwnPropertySymbols,cC=Object.prototype.hasOwnProperty,dC=Object.prototype.propertyIsEnumerable,Kl=(e,t,n)=>t in e?oC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bf=(e,t)=>{for(var n in t||(t={}))cC.call(t,n)&&Kl(e,n,t[n]);if(Xl)for(var n of Xl(t))dC.call(t,n)&&Kl(e,n,t[n]);return e},Ff=(e,t)=>uC(e,lC(t)),hC=e=>{let t=new Uint8Array(e.length+1),n=!1,r=!1,i=0;for(;i<e.length;){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){let a=n||r?1:0;t[i+1]=a,t[i+2]=a,i+=2;continue}if(e.substring(i,i+3)==="```"){r=!r;let a=n||r?1:0,s=Math.min(i+3,e.length);for(let o=i+1;o<=s;o+=1)t[o]=a;i=s;continue}!r&&e[i]==="`"&&(n=!n),t[i+1]=n||r?1:0,i+=1}return t},Zl=null,Ke=(e,t)=>{let n=Zl;return(n===null||n.text!==e)&&(n={text:e,lookup:hC(e)},Zl=n),n.lookup[Math.min(t,e.length)]===1},fC=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},pC=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!fC(e,n)&&(t+=1)}return t},un=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},mC=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,gC=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(mC,(t,n,r,i)=>Ke(e,i)?t:`${n}\\>${r}`),bC=/(\*\*)([^*]*\*?)$/,_C=/(__)([^_]*?)$/,EC=/(\*\*\*)([^*]*?)$/,TC=/(\*)([^*]*?)$/,yC=/(_)([^_]*?)$/,kC=/(`)([^`]*?)$/,xC=/(~~)([^~]*?)$/,vn=/^[\s_~*`]*$/,Hf=/^[\s]*[-*+][\s]+$/,AC=/[\p{L}\p{N}_]/u,CC=/^```[^`\n]*```?$/,wC=/^\*{4,}$/,IC=/(__)([^_]+)_$/,SC=/(~~)([^~]+)~$/,Jl=/~~/g,Vt=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:AC.test(e)},NC=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Uf=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},LC=e=>e==="inlineLatex"||e==="blockLatex",RC=(e,t)=>t==="["&&e==="none"?"blockLatex":t==="]"&&e==="blockLatex"?"none":t==="("&&e==="none"?"inlineLatex":t===")"&&e==="inlineLatex"?"none":null,OC=(e,t)=>t?e==="blockDollar"?"none":"blockDollar":e==="blockDollar"?e:e==="inlineDollar"?"none":"inlineDollar",Ca=(e,t)=>{let n="none";for(let r=0;r<e.length&&r<t;r+=1){if(e[r]==="\\"&&e[r+1]==="$"){r+=1;continue}if(e[r]==="\\"){let i=RC(n,e[r+1]);if(i!==null){n=i,r+=1;continue}}if(e[r]==="$"&&!LC(n)){let i=e[r+1]==="$";n=OC(n,i),i&&(r+=1)}}return n!=="none"},PC=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
175
+ `)return!1}return!1},$f=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?PC(e,t):!1;if(e[n]===`
176
+ `)return!1}return!1},DC=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
177
+ `)return!1}return!1},Yo=(e,t,n)=>{let r=0;for(let u=t-1;u>=0;u-=1)if(e[u]===`
178
+ `){r=u+1;break}let i=e.length;for(let u=t;u<e.length;u+=1)if(e[u]===`
179
+ `){i=u;break}let a=e.substring(r,i),s=0,o=!1;for(let u of a)if(u===n)s+=1;else if(u!==" "&&u!==" "){o=!0;break}return s>=3&&!o},jf=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),vC=(e,t,n,r)=>n==="\\"||jf(e)&&Ca(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":n==="*"||(!n||n===" "||n===" "||n===`
180
+ `)&&(!r||r===" "||r===" "||r===`
181
+ `),Ji=e=>e===" "||e===" "||e===`
182
+ `,MC=(e,t)=>!!(e&&t&&Vt(e)&&Vt(t)),BC=(e,t,n,r)=>{let i=MC(e,t),a=!!t&&!Ji(t),s=!!e&&!Ji(e);return i&&n%2===0&&!r?{count:!1}:s&&n%2===1||a?{count:!0,inWordAsteriskChain:i}:{count:!1}},Vf=e=>{let t=0,n=!1,r=!1,i=e.length;for(let a=0;a<i;a+=1){if(e[a]==="`"&&a+2<i&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}if(n)continue;if(e[a]!=="*"){Vt(e[a])||(r=!1);continue}let s=a>0?e[a-1]:"",o=a<i-1?e[a+1]:"";if(vC(e,a,s,o))continue;let u=BC(s,o,t,r);u.count&&(t+=1,r=u.inWordAsteriskChain)}return t},FC=(e,t,n,r)=>!!(n==="\\"||jf(e)&&Ca(e,t)||$f(e,t)||DC(e,t)||n==="_"||r==="_"||n&&r&&Vt(n)&&Vt(r)),HC=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";FC(e,i,a,s)||(t+=1)}return t},UC=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},Qo=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},ec=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},$C=(e,t,n)=>{if(!t||vn.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
183
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return Hf.test(a)&&t.includes(`
184
+ `)?!0:Yo(e,n,"*")},jC=e=>{let t=e.match(bC);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Ke(e,r)||un(e,r)||$C(e,n,r)?e:Qo(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},VC=(e,t,n)=>{if(!t||vn.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
185
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return Hf.test(a)&&t.includes(`
186
+ `)?!0:Yo(e,n,"_")},zC=e=>{let t=e.match(_C);if(!t){let i=e.match(IC);if(i){let a=e.lastIndexOf(i[1]);if(!(Ke(e,a)||un(e,a))&&ec(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Ke(e,r)||un(e,r)||VC(e,n,r)?e:ec(e)%2===1?`${e}__`:e},GC=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Ca(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"",a=!r||Ji(r),s=!i||Ji(i);if(a&&s||r&&i&&Vt(r)&&Vt(i)||s)continue;return n}}return-1},qC=e=>{if(!e.match(TC))return e;let t=GC(e);if(t===-1||Ke(e,t)||un(e,t))return e;let n=e.substring(t+1);return!n||vn.test(n)?e:Vf(e)%2===1?`${e}*`:e},zf=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Ca(e,n)&&!$f(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&Vt(r)&&Vt(i))continue;return n}}return-1},WC=e=>{let t=e.length;for(;t>0&&e[t-1]===`
187
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},YC=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Qo(t)%2!==1)return null;let n=t.indexOf("**"),r=zf(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},QC=e=>{if(!e.match(yC))return e;let t=zf(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||vn.test(n)||Ke(e,t)||un(e,t))return e;if(HC(e)%2===1){let r=YC(e);return r!==null?r:WC(e)}return e},XC=e=>{let t=Qo(e),n=Vf(e);return t%2===0&&n%2===0},KC=(e,t,n)=>!t||vn.test(t)||Ke(e,n)||un(e,n)?!0:Yo(e,n,"*"),ZC=e=>{if(wC.test(e))return e;let t=e.match(EC);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return KC(e,n,r)?e:UC(e)%2===1?XC(e)?e:`${e}***`:e},JC=/<[a-zA-Z/][^>]*$/,ew=e=>{let t=e.match(JC);return!t||t.index===void 0||Ke(e,t.index)?e:e.substring(0,t.index).trimEnd()},tw=e=>!e.match(CC)||e.includes(`
188
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,nw=e=>(e.match(/```/g)||[]).length%2===1,rw=e=>{let t=tw(e);if(t!==null)return t;let n=e.match(kC);if(n&&!nw(e)){let r=n[2];if(!r||vn.test(r))return e;if(pC(e)%2===1)return`${e}\``}return e},Gf=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",iw=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Gf(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},aw=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!Gf(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},sw=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
189
+ `,t)!==-1&&!e.endsWith(`
190
+ `)?`${e}
191
+ $$`:`${e}$$`},ow=e=>iw(e)%2===0?e:sw(e),uw=e=>aw(e)%2===1?`${e}$`:e,lw=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=NC(e,t);if(r===-1||Ke(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let o=e.substring(r+1,t);return n==="text-only"?`${s}${o}`:`${s}[${o}](streamdown:incomplete-link)`},tc=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Ke(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Uf(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},cw=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=tc(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(Uf(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=tc(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},qf=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Ke(e,n)){let r=lw(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Ke(e,r)){let i=cw(e,r,t);if(i!==null)return i}return e},dw=/^-{1,2}$/,hw=/^[\s]*-{1,2}[\s]+$/,fw=/^={1,2}$/,pw=/^[\s]*={1,2}[\s]+$/,mw=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
192
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(dw.test(i)&&!n.match(hw)){let a=r.split(`
193
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(fw.test(i)&&!n.match(pw)){let a=r.split(`
194
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},gw=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,bw=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(gw,(t,n,r)=>{let i=r+n.length;return Ke(e,i)?t:`${n}\\~`}),_w=e=>{var t,n;let r=e.match(xC);if(r){let i=r[2];if(!i||vn.test(i))return e;let a=e.lastIndexOf(r[1]);if(Ke(e,a)||un(e,a))return e;if(((t=e.match(Jl))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(SC);if(i){let a=e.lastIndexOf(i[0].slice(0,2));if(Ke(e,a)||un(e,a))return e;if(((n=e.match(Jl))==null?void 0:n.length)%2===1)return`${e}~`}}return e},as=e=>e!==!1,Ew=e=>e===!0,Ye={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},Tw=[{handler:{name:"singleTilde",handle:bw,priority:Ye.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:gC,priority:Ye.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:ew,priority:Ye.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:mw,priority:Ye.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:qf,priority:Ye.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:ZC,priority:Ye.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:jC,priority:Ye.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:zC,priority:Ye.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:qC,priority:Ye.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:QC,priority:Ye.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:rw,priority:Ye.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:_w,priority:Ye.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:ow,priority:Ye.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:uw,priority:Ye.INLINE_KATEX},optionKey:"inlineKatex"}],yw=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return Tw.filter(({handler:r,optionKey:i})=>r.name==="links"?as(e==null?void 0:e.links)||as(e==null?void 0:e.images):r.name==="inlineKatex"?Ew(e==null?void 0:e.inlineKatex):as(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Ff(Bf({},r),{handle:a=>qf(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},kw=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=yw(t),a=((n=t==null?void 0:t.handlers)!=null?n:[]).map(o=>{var u;return{handler:Ff(Bf({},o),{priority:(u=o.priority)!=null?u:Ye.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((o,u)=>{var l,c;return((l=o.handler.priority)!=null?l:0)-((c=u.handler.priority)!=null?c:0)});for(let{handler:o,earlyReturn:u}of s)if(r=o.handle(r),u!=null&&u(r))return r;return r},xw=kw;const Aw=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Cw=(e,t)=>({classGroupId:e,validator:t}),Wf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ea="-",nc=[],ww="arbitrary..",Iw=e=>{const t=Nw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Sw(s);const o=s.split(ea),u=o[0]===""&&o.length>1?1:0;return Yf(o,u,t)},getConflictingClassGroupIds:(s,o)=>{if(o){const u=r[s],l=n[s];return u?l?Aw(l,u):u:l||nc}return n[s]||nc}}},Yf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const l=Yf(e,t+1,a);if(l)return l}const s=n.validators;if(s===null)return;const o=t===0?e.join(ea):e.slice(t).join(ea),u=s.length;for(let l=0;l<u;l++){const c=s[l];if(c.validator(o))return c.classGroupId}},Sw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?ww+r:void 0})(),Nw=e=>{const{theme:t,classGroups:n}=e;return Lw(n,t)},Lw=(e,t)=>{const n=Wf();for(const r in e){const i=e[r];Xo(i,n,r,t)}return n},Xo=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const s=e[a];Rw(s,t,n,r)}},Rw=(e,t,n,r)=>{if(typeof e=="string"){Ow(e,t,n);return}if(typeof e=="function"){Pw(e,t,n,r);return}Dw(e,t,n,r)},Ow=(e,t,n)=>{const r=e===""?t:Qf(t,e);r.classGroupId=n},Pw=(e,t,n,r)=>{if(vw(e)){Xo(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Cw(n,e))},Dw=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let s=0;s<a;s++){const[o,u]=i[s];Xo(u,Qf(t,o),n,r)}},Qf=(e,t)=>{let n=e;const r=t.split(ea),i=r.length;for(let a=0;a<i;a++){const s=r[a];let o=n.nextPart.get(s);o||(o=Wf(),n.nextPart.set(s,o)),n=o}return n},vw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Mw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return i(a,s),s},set(a,s){a in n?n[a]=s:i(a,s)}}},qs="!",rc=":",Bw=[],ic=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fw=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let s=0,o=0,u=0,l;const c=i.length;for(let g=0;g<c;g++){const y=i[g];if(s===0&&o===0){if(y===rc){a.push(i.slice(u,g)),u=g+1;continue}if(y==="/"){l=g;continue}}y==="["?s++:y==="]"?s--:y==="("?o++:y===")"&&o--}const d=a.length===0?i:i.slice(u);let p=d,f=!1;d.endsWith(qs)?(p=d.slice(0,-1),f=!0):d.startsWith(qs)&&(p=d.slice(1),f=!0);const m=l&&l>u?l-u:void 0;return ic(a,f,p,m)};if(t){const i=t+rc,a=r;r=s=>s.startsWith(i)?a(s.slice(i.length)):ic(Bw,!1,s,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},Hw=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const s=n[a],o=s[0]==="[",u=t.has(s);o||u?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},Uw=e=>({cache:Mw(e.cacheSize),parseClassName:Fw(e),sortModifiers:Hw(e),postfixLookupClassGroupIds:$w(e),...Iw(e)}),$w=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},jw=/\s+/,Vw=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:s}=t,o=[],u=e.trim().split(jw);let l="";for(let c=u.length-1;c>=0;c-=1){const d=u[c],{isExternal:p,modifiers:f,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:y}=n(d);if(p){l=d+(l.length>0?" "+l:l);continue}let _=!!y,C;if(_){const M=g.substring(0,y);C=r(M);const D=C&&s[C]?r(g):void 0;D&&D!==C&&(C=D,_=!1)}else C=r(g);if(!C){if(!_){l=d+(l.length>0?" "+l:l);continue}if(C=r(g),!C){l=d+(l.length>0?" "+l:l);continue}_=!1}const T=f.length===0?"":f.length===1?f[0]:a(f).join(":"),O=m?T+qs:T,v=O+C;if(o.indexOf(v)>-1)continue;o.push(v);const S=i(C,_);for(let M=0;M<S.length;++M){const D=S[M];o.push(O+D)}l=d+(l.length>0?" "+l:l)}return l},zw=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=Xf(n))&&(i&&(i+=" "),i+=r);return i},Xf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Xf(e[r]))&&(n&&(n+=" "),n+=t);return n},Gw=(e,...t)=>{let n,r,i,a;const s=u=>{const l=t.reduce((c,d)=>d(c),e());return n=Uw(l),r=n.cache.get,i=n.cache.set,a=o,o(u)},o=u=>{const l=r(u);if(l)return l;const c=Vw(u,n);return i(u,c),c};return a=s,(...u)=>a(zw(...u))},qw=[],Ne=e=>{const t=n=>n[e]||qw;return t.isThemeGetter=!0,t.themeKey=e,t},Kf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ww=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Xw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Kw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qt=e=>Ww.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),xt=e=>!!e&&Number.isInteger(Number(e)),ss=e=>e.endsWith("%")&&ae(e.slice(0,-1)),Ft=e=>Yw.test(e),Jf=()=>!0,Jw=e=>Qw.test(e)&&!Xw.test(e),Ko=()=>!1,eI=e=>Kw.test(e),tI=e=>Zw.test(e),nI=e=>!Y(e)&&!Q(e),rI=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),iI=e=>cn(e,np,Ko),Y=e=>Kf.test(e),gn=e=>cn(e,rp,Jw),ac=e=>cn(e,hI,ae),aI=e=>cn(e,ap,Jf),sI=e=>cn(e,ip,Ko),sc=e=>cn(e,ep,Ko),oI=e=>cn(e,tp,tI),bi=e=>cn(e,sp,eI),Q=e=>Zf.test(e),Er=e=>Mn(e,rp),uI=e=>Mn(e,ip),oc=e=>Mn(e,ep),lI=e=>Mn(e,np),cI=e=>Mn(e,tp),_i=e=>Mn(e,sp,!0),dI=e=>Mn(e,ap,!0),cn=(e,t,n)=>{const r=Kf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mn=(e,t,n=!1)=>{const r=Zf.exec(e);return r?r[1]?t(r[1]):n:!1},ep=e=>e==="position"||e==="percentage",tp=e=>e==="image"||e==="url",np=e=>e==="length"||e==="size"||e==="bg-size",rp=e=>e==="length",hI=e=>e==="number",ip=e=>e==="family-name",ap=e=>e==="number"||e==="weight",sp=e=>e==="shadow",fI=()=>{const e=Ne("color"),t=Ne("font"),n=Ne("text"),r=Ne("font-weight"),i=Ne("tracking"),a=Ne("leading"),s=Ne("breakpoint"),o=Ne("container"),u=Ne("spacing"),l=Ne("radius"),c=Ne("shadow"),d=Ne("inset-shadow"),p=Ne("text-shadow"),f=Ne("drop-shadow"),m=Ne("blur"),g=Ne("perspective"),y=Ne("aspect"),_=Ne("ease"),C=Ne("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...O(),Q,Y],S=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],D=()=>[Q,Y,u],z=()=>[Qt,"full","auto",...D()],R=()=>[xt,"none","subgrid",Q,Y],V=()=>["auto",{span:["full",xt,Q,Y]},xt,Q,Y],G=()=>[xt,"auto",Q,Y],Z=()=>["auto","min","max","fr",Q,Y],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...D()],X=()=>[Qt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],de=()=>[o,Qt,"screen","full","dvw","lvw","svw","min","max","fit",...D()],Ie=()=>[Qt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],x=()=>[e,Q,Y],Pe=()=>[...O(),oc,sc,{position:[Q,Y]}],ke=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",lI,iI,{size:[Q,Y]}],Fe=()=>[ss,Er,gn],pe=()=>["","none","full",l,Q,Y],ne=()=>["",ae,Er,gn],Ue=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[ae,ss,oc,sc],tt=()=>["","none",m,Q,Y],it=()=>["none",ae,Q,Y],Gt=()=>["none",ae,Q,Y],qt=()=>[ae,Q,Y],Pt=()=>[Qt,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ft],breakpoint:[Ft],color:[Jf],container:[Ft],"drop-shadow":[Ft],ease:["in","out","in-out"],font:[nI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ft],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ft],shadow:[Ft],spacing:["px",ae],text:[Ft],"text-shadow":[Ft],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qt,Y,Q,y]}],container:["container"],"container-type":[{"@container":["","normal","size",Q,Y]}],"container-named":[rI],columns:[{columns:[ae,"auto",Y,Q,o]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[xt,"auto",Q,Y]}],basis:[{basis:[Qt,"full","auto",o,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,Qt,"auto","initial","none",Y]}],grow:[{grow:["",ae,Q,Y]}],shrink:[{shrink:["",ae,Q,Y]}],order:[{order:[xt,"first","last","none",Q,Y]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...de()]}],"min-inline-size":[{"min-inline":["auto",...de()]}],"max-inline-size":[{"max-inline":["none",...de()]}],"block-size":[{block:["auto",...Ie()]}],"min-block-size":[{"min-block":["auto",...Ie()]}],"max-block-size":[{"max-block":["none",...Ie()]}],w:[{w:[o,"screen",...X()]}],"min-w":[{"min-w":[o,"screen","none",...X()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh","none",...X()]}],"font-size":[{text:["base",n,Er,gn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,dI,aI]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ss,Y]}],"font-family":[{font:[uI,sI,t]}],"font-features":[{"font-features":[Y]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Q,Y]}],"line-clamp":[{"line-clamp":[ae,"none",Q,ac]}],leading:[{leading:["none",a,...D()]}],"list-image":[{"list-image":["none",Q,Y]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Q,Y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:x()}],"text-color":[{text:x()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",Q,gn]}],"text-decoration-color":[{decoration:x()}],"underline-offset":[{"underline-offset":[ae,"auto",Q,Y]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"tab-size":[{tab:[xt,Q,Y]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q,Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q,Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Pe()}],"bg-repeat":[{bg:ke()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xt,Q,Y],radial:["",Q,Y],conic:["",xt,Q,Y]},cI,oI]}],"bg-color":[{bg:x()}],"gradient-from-pos":[{from:Fe()}],"gradient-via-pos":[{via:Fe()}],"gradient-to-pos":[{to:Fe()}],"gradient-from":[{from:x()}],"gradient-via":[{via:x()}],"gradient-to":[{to:x()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ue(),"hidden","none"]}],"divide-style":[{divide:[...Ue(),"hidden","none"]}],"border-color":[{border:x()}],"border-color-x":[{"border-x":x()}],"border-color-y":[{"border-y":x()}],"border-color-s":[{"border-s":x()}],"border-color-e":[{"border-e":x()}],"border-color-bs":[{"border-bs":x()}],"border-color-be":[{"border-be":x()}],"border-color-t":[{"border-t":x()}],"border-color-r":[{"border-r":x()}],"border-color-b":[{"border-b":x()}],"border-color-l":[{"border-l":x()}],"divide-color":[{divide:x()}],"outline-style":[{outline:[...Ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ae,Q,Y]}],"outline-w":[{outline:["",ae,Er,gn]}],"outline-color":[{outline:x()}],shadow:[{shadow:["","inner","none",c,_i,bi]}],"shadow-color":[{shadow:x()}],"inset-shadow":[{"inset-shadow":["none",d,_i,bi]}],"inset-shadow-color":[{"inset-shadow":x()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:x()}],"ring-offset-w":[{"ring-offset":[ae,gn]}],"ring-offset-color":[{"ring-offset":x()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":x()}],"text-shadow":[{"text-shadow":["none",p,_i,bi]}],"text-shadow-color":[{"text-shadow":x()}],opacity:[{opacity:[ae,Q,Y]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":x()}],"mask-image-linear-to-color":[{"mask-linear-to":x()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":x()}],"mask-image-t-to-color":[{"mask-t-to":x()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":x()}],"mask-image-r-to-color":[{"mask-r-to":x()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":x()}],"mask-image-b-to-color":[{"mask-b-to":x()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":x()}],"mask-image-l-to-color":[{"mask-l-to":x()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":x()}],"mask-image-x-to-color":[{"mask-x-to":x()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":x()}],"mask-image-y-to-color":[{"mask-y-to":x()}],"mask-image-radial":[{"mask-radial":[Q,Y]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":x()}],"mask-image-radial-to-color":[{"mask-radial-to":x()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":x()}],"mask-image-conic-to-color":[{"mask-conic-to":x()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Pe()}],"mask-repeat":[{mask:ke()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Q,Y]}],filter:[{filter:["","none",Q,Y]}],blur:[{blur:tt()}],brightness:[{brightness:[ae,Q,Y]}],contrast:[{contrast:[ae,Q,Y]}],"drop-shadow":[{"drop-shadow":["","none",f,_i,bi]}],"drop-shadow-color":[{"drop-shadow":x()}],grayscale:[{grayscale:["",ae,Q,Y]}],"hue-rotate":[{"hue-rotate":[ae,Q,Y]}],invert:[{invert:["",ae,Q,Y]}],saturate:[{saturate:[ae,Q,Y]}],sepia:[{sepia:["",ae,Q,Y]}],"backdrop-filter":[{"backdrop-filter":["","none",Q,Y]}],"backdrop-blur":[{"backdrop-blur":tt()}],"backdrop-brightness":[{"backdrop-brightness":[ae,Q,Y]}],"backdrop-contrast":[{"backdrop-contrast":[ae,Q,Y]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,Q,Y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,Q,Y]}],"backdrop-invert":[{"backdrop-invert":["",ae,Q,Y]}],"backdrop-opacity":[{"backdrop-opacity":[ae,Q,Y]}],"backdrop-saturate":[{"backdrop-saturate":[ae,Q,Y]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,Q,Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Q,Y]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",Q,Y]}],ease:[{ease:["linear","initial",_,Q,Y]}],delay:[{delay:[ae,Q,Y]}],animate:[{animate:["none",C,Q,Y]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Q,Y]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:it()}],"rotate-x":[{"rotate-x":it()}],"rotate-y":[{"rotate-y":it()}],"rotate-z":[{"rotate-z":it()}],scale:[{scale:Gt()}],"scale-x":[{"scale-x":Gt()}],"scale-y":[{"scale-y":Gt()}],"scale-z":[{"scale-z":Gt()}],"scale-3d":["scale-3d"],skew:[{skew:qt()}],"skew-x":[{"skew-x":qt()}],"skew-y":[{"skew-y":qt()}],transform:[{transform:[Q,Y,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pt()}],"translate-x":[{"translate-x":Pt()}],"translate-y":[{"translate-y":Pt()}],"translate-z":[{"translate-z":Pt()}],"translate-none":["translate-none"],zoom:[{zoom:[xt,Q,Y]}],accent:[{accent:x()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:x()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q,Y]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":x()}],"scrollbar-track-color":[{"scrollbar-track":x()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q,Y]}],fill:[{fill:["none",...x()]}],"stroke-w":[{stroke:[ae,Er,gn,ac]}],stroke:[{stroke:["none",...x()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},op=Gw(fI),pI=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gI={};function uc(e,t){return(gI.jsx?mI:pI).test(e)}var Vn={},os,lc;function bI(){if(lc)return os;lc=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
195
+ `,l="/",c="*",d="",p="comment",f="declaration";function m(y,_){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];_=_||{};var C=1,T=1;function O(W){var $=W.match(t);$&&(C+=$.length);var K=W.lastIndexOf(u);T=~K?W.length-K:T+W.length}function v(){var W={line:C,column:T};return function($){return $.position=new S(W),z(),$}}function S(W){this.start=W,this.end={line:C,column:T},this.source=_.source}S.prototype.content=y;function M(W){var $=new Error(_.source+":"+C+":"+T+": "+W);if($.reason=W,$.filename=_.source,$.line=C,$.column=T,$.source=y,!_.silent)throw $}function D(W){var $=W.exec(y);if($){var K=$[0];return O(K),y=y.slice(K.length),$}}function z(){D(n)}function R(W){var $;for(W=W||[];$=V();)$!==!1&&W.push($);return W}function V(){var W=v();if(!(l!=y.charAt(0)||c!=y.charAt(1))){for(var $=2;d!=y.charAt($)&&(c!=y.charAt($)||l!=y.charAt($+1));)++$;if($+=2,d===y.charAt($-1))return M("End of comment missing");var K=y.slice(2,$-2);return T+=2,O(K),y=y.slice($),T+=2,W({type:p,comment:K})}}function G(){var W=v(),$=D(r);if($){if(V(),!D(i))return M("property missing ':'");var K=D(a),X=W({type:f,property:g($[0].replace(e,d)),value:K?g(K[0].replace(e,d)):d});return D(s),X}}function Z(){var W=[];R(W);for(var $;$=G();)$!==!1&&(W.push($),R(W));return W}return z(),Z()}function g(y){return y?y.replace(o,d):d}return os=m,os}var cc;function _I(){if(cc)return Vn;cc=1;var e=Vn&&Vn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.default=n;const t=e(bI());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),o=typeof i=="function";return s.forEach(u=>{if(u.type!=="declaration")return;const{property:l,value:c}=u;o?i(l,c,u):c&&(a=a||{},a[l]=c)}),a}return Vn}var Tr={},dc;function EI(){if(dc)return Tr;dc=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(l){return!l||n.test(l)||e.test(l)},s=function(l,c){return c.toUpperCase()},o=function(l,c){return"".concat(c,"-")},u=function(l,c){return c===void 0&&(c={}),a(l)?l:(l=l.toLowerCase(),c.reactCompat?l=l.replace(i,o):l=l.replace(r,o),l.replace(t,s))};return Tr.camelCase=u,Tr}var yr,hc;function TI(){if(hc)return yr;hc=1;var e=yr&&yr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(_I()),n=EI();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(o,u){o&&u&&(s[(0,n.camelCase)(o,a)]=u)}),s}return r.default=r,yr=r,yr}var yI=TI();const kI=Jc(yI);function Fr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fc(e.position):"start"in e||"end"in e?fc(e):"line"in e||"column"in e?Ws(e):""}function Ws(e){return pc(e&&e.line)+":"+pc(e&&e.column)}function fc(e){return Ws(e&&e.start)+"-"+Ws(e&&e.end)}function pc(e){return e&&typeof e=="number"?e:1}class Ge extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Fr(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ge.prototype.file="";Ge.prototype.name="";Ge.prototype.reason="";Ge.prototype.message="";Ge.prototype.stack="";Ge.prototype.column=void 0;Ge.prototype.line=void 0;Ge.prototype.ancestors=void 0;Ge.prototype.cause=void 0;Ge.prototype.fatal=void 0;Ge.prototype.place=void 0;Ge.prototype.ruleId=void 0;Ge.prototype.source=void 0;const Zo={}.hasOwnProperty,xI=new Map,AI=/[A-Z]/g,CI=new Set(["table","tbody","thead","tfoot","tr"]),wI=new Set(["td","th"]),up="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function II(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=vI(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=DI(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Nt:tr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=lp(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function lp(e,t,n){if(t.type==="element")return SI(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return NI(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return RI(e,t,n);if(t.type==="mdxjsEsm")return LI(e,t);if(t.type==="root")return OI(e,t,n);if(t.type==="text")return PI(e,t)}function SI(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Nt,e.schema=i),e.ancestors.push(t);const a=dp(e,t.tagName,!1),s=MI(e,t);let o=eu(e,t);return CI.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!aa(u):!0})),cp(e,s,a,t),Jo(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function NI(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Wr(e,t.position)}function LI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wr(e,t.position)}function RI(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Nt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:dp(e,t.name,!0),s=BI(e,t),o=eu(e,t);return cp(e,s,a,t),Jo(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function OI(e,t,n){const r={};return Jo(r,eu(e,t)),e.create(t,e.Fragment,r,n)}function PI(e,t){return t.value}function cp(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Jo(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function DI(e,t,n){return r;function r(i,a,s,o){const l=Array.isArray(s.children)?n:t;return o?l(a,s,o):l(a,s)}}function vI(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=Lt(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function MI(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Zo.call(t.properties,i)){const a=FI(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&wI.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function BI(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Wr(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Wr(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function eu(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:xI;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;s=u+"-"+l,i.set(u,l+1)}}const o=lp(e,a,s);o!==void 0&&n.push(o)}return n}function FI(e,t,n){const r=Kr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?fo(n):po(n)),r.property==="style"){let i=typeof n=="object"?n:HI(e,String(n));return e.stylePropertyNameCase==="css"&&(i=UI(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?N0[r.property]||r.property:r.attribute,n]}}function HI(e,t){try{return kI(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ge("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=up+"#cannot-parse-style-attribute",i}}function dp(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=uc(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=uc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Zo.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wr(e)}function Wr(e,t){const n=new Ge("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=up+"#cannot-handle-mdx-estrees-without-createevaluater",n}function UI(e){const t={};let n;for(n in e)Zo.call(e,n)&&(t[$I(n)]=e[n]);return t}function $I(e){let t=e.replace(AI,jI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jI(e){return"-"+e.toLowerCase()}const us={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},VI={tokenize:zI};function zI(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),fe(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return J(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const GI={tokenize:qI},mc={tokenize:WI};function qI(e){const t=this,n=[];let r=0,i,a,s;return o;function o(T){if(r<n.length){const O=n[r];return t.containerState=O[1],e.attempt(O[0].continuation,u,l)(T)}return l(T)}function u(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const O=t.events.length;let v=O,S;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){S=t.events[v][1].end;break}_(r);let M=O;for(;M<t.events.length;)t.events[M][1].end={...S},M++;const D=new Zi;return D.add(v+1,0,t.events.slice(O)),D.add(O,M-O,[]),D.consume(t.events),l(T)}return o(T)}function l(T){if(r===n.length){if(!i)return p(T);if(i.currentConstruct&&i.currentConstruct.concrete)return m(T);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mc,c,d)(T)}function c(T){return i&&C(),_(r),p(T)}function d(T){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(T)}function p(T){return t.containerState={},e.attempt(mc,f,m)(T)}function f(T){return r++,n.push([t.currentConstruct,t.containerState]),p(T)}function m(T){if(T===null){i&&C(),_(0),e.consume(T);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),g(T)}function g(T){if(T===null){y(e.exit("chunkFlow"),!0),_(0),e.consume(T);return}return J(T)?(e.consume(T),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(T),g)}function y(T,O){const v=t.sliceStream(T);if(O&&v.push(null),T.previous=a,a&&(a.next=T),a=T,i.defineSkip(T.start),i.write(v),t.parser.lazy[T.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;const M=t.events.length;let D=M,z,R;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(z){R=t.events[D][1].end;break}z=!0}for(_(r),S=M;S<t.events.length;)t.events[S][1].end={...R},S++;const V=new Zi;V.add(D+1,0,t.events.slice(M)),V.add(M,S-M,[]),V.consume(t.events)}}function _(T){let O=n.length;for(;O-- >T;){const v=n[O];t.containerState=v[1],v[0].exit.call(t,e)}n.length=T}function C(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function WI(e,t,n){return fe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const YI={tokenize:QI};function QI(e){const t=this,n=e.attempt(ni,r,e.attempt(this.parser.constructs.flowInitial,i,fe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(W2,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const XI={resolveAll:fp()},KI=hp("string"),ZI=hp("text");function hp(e){return{resolveAll:fp(e==="text"?JI:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(c){return l(c)?a(c):o(c)}function o(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),a(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const d=i[c];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function fp(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function JI(e,t){const n=new Zi;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],a=t.sliceStream(i);let s=a.length,o=-1,u=0,l;for(;s--;){const c=a[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(c===-2)l=!0,u++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(u=0),u){const c={type:r===e.length||l||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:i.start._bufferIndex+o,_index:i.start._index+s,line:i.end.line,column:i.end.column-u,offset:i.end.offset-u},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):n.add(r,0,[["enter",c,t],["exit",c,t]])}r++}return n.consume(e),e}const eS={42:Je,43:Je,45:Je,48:Je,49:Je,50:Je,51:Je,52:Je,53:Je,54:Je,55:Je,56:Je,57:Je,62:Lf},tS={91:Z2},nS={[-2]:rs,[-1]:rs,32:rs},rS={35:iA,42:Ri,45:[Yl,Ri],60:oA,61:Yl,95:Ri,96:ql,126:ql},iS={38:Of,92:Rf},aS={[-5]:is,[-4]:is,[-3]:is,33:xA,38:Of,42:zs,60:[S2,hA],91:CA,92:[nA,Rf],93:Wo,95:zs,96:$2},sS={null:[zs,XI]},oS={null:[42,95]},uS={null:[]},lS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:oS,contentInitial:tS,disable:uS,document:eS,flow:rS,flowInitial:nS,insideSpan:sS,string:iS,text:aS},Symbol.toStringTag,{value:"Module"}));function cS(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={},a=[];let s=[],o=[];const u={attempt:M(v),check:M(S),consume:C,enter:T,exit:O,interrupt:M(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:g,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function d(V){return s=ut(s,V),y(),s[s.length-1]!==null?[]:(D(t,0),l.events=Aa(a,l.events,l),l.events)}function p(V,G){return hS(f(V),G)}function f(V){return dS(s,V)}function m(){const{_bufferIndex:V,_index:G,line:Z,column:W,offset:$}=r;return{_bufferIndex:V,_index:G,line:Z,column:W,offset:$}}function g(V){i[V.line]=V.column,R()}function y(){for(;r._index<s.length;){const V=s[r._index];if(typeof V=="string"){const G=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===G&&r._bufferIndex<V.length;)_(V.charCodeAt(r._bufferIndex))}else _(V)}}function _(V){c=c(V)}function C(V){J(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,R()):V!==-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=V}function T(V,G){const Z=G||{};return Z.type=V,Z.start=m(),l.events.push(["enter",Z,l]),o.push(Z),Z}function O(V){const G=o.pop();return G.end=m(),l.events.push(["exit",G,l]),G}function v(V,G){D(V,G.from)}function S(V,G){G.restore()}function M(V,G){return Z;function Z(W,$,K){let X,de,Ie,x;return Array.isArray(W)?ke(W):"tokenize"in W?ke([W]):Pe(W);function Pe(ne){return Ue;function Ue(Se){const me=Se!==null&&ne[Se],tt=Se!==null&&ne.null,it=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(tt)?tt:tt?[tt]:[]];return ke(it)(Se)}}function ke(ne){return X=ne,de=0,ne.length===0?K:I(ne[de])}function I(ne){return Ue;function Ue(Se){return x=z(),Ie=ne,ne.partial||(l.currentConstruct=ne),ne.name&&l.parser.constructs.disable.null.includes(ne.name)?pe():ne.tokenize.call(G?Object.assign(Object.create(l),G):l,u,Fe,pe)(Se)}}function Fe(ne){return V(Ie,x),$}function pe(ne){return x.restore(),++de<X.length?I(X[de]):K}}}function D(V,G){V.resolveAll&&!a.includes(V)&&a.push(V),V.resolve&&Et(l.events,G,l.events.length-G,V.resolve(l.events.slice(G),l)),V.resolveTo&&(l.events=V.resolveTo(l.events,l))}function z(){const V=m(),G=l.previous,Z=l.currentConstruct,W=l.events.length,$=Array.from(o);return{from:W,restore:K};function K(){r=V,l.previous=G,l.currentConstruct=Z,l.events.length=W,o=$,R()}}function R(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function dS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function hS(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
196
+ `;break}case-3:{s=`\r
197
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function fS(e){const r={constructs:Tf([lS,...(e||{}).extensions||[]]),content:i(VI),defined:[],document:i(GI),flow:i(YI),lazy:{},string:i(KI),text:i(ZI)};return r;function i(a){return s;function s(o){return cS(r,a,o)}}}function pS(e){for(;!Pf(e););return e}const gc=/[\0\t\n\r]/g;function mS(){let e=1,t="",n=!0,r;return i;function i(a,s,o){a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a));const u=[];let l=0;for(t="",n&&(a.charCodeAt(0)===65279&&l++,n=void 0);l<a.length;){gc.lastIndex=l;const c=gc.exec(a),d=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(d);if(!c){t=a.slice(l);break}if(p===10&&l===d&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),l<d&&(u.push(a.slice(l,d)),e+=d-l),p){case 0:{u.push(65533),e++;break}case 9:{const f=Math.ceil(e/4)*4;for(u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}l=d+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const pp={}.hasOwnProperty;function gS(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),bS(n)(pS(fS(n).document().write(mS()(e,t,!0))))}function bS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(si),autolinkProtocol:z,autolinkEmail:z,atxHeading:a(cr),blockQuote:a(tt),characterEscape:z,characterReference:z,codeFenced:a(it),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(it,s),codeText:a(Gt,s),codeTextData:z,data:z,codeFlowValue:z,definition:a(qt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Pt),hardBreakEscape:a(Wt),hardBreakTrailing:a(Wt),htmlFlow:a(Fn,s),htmlFlowData:z,htmlText:a(Fn,s),htmlTextData:z,image:a(Na),label:s,link:a(si),listItem:a(he),listItemValue:p,listOrdered:a(ee,d),listUnordered:a(ee),paragraph:a(qe),reference:I,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(cr),strong:a(at),thematicBreak:a(dr)},exit:{atxHeading:u(),atxHeadingSequence:v,autolink:u(),autolinkEmail:me,autolinkProtocol:Se,blockQuote:u(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:ne,characterReference:Ue,codeFenced:u(y),codeFencedFence:g,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:u(_),codeText:u($),codeTextData:R,data:R,definition:u(),definitionDestinationString:O,definitionLabelString:C,definitionTitleString:T,emphasis:u(),hardBreakEscape:u(G),hardBreakTrailing:u(G),htmlFlow:u(Z),htmlFlowData:R,htmlText:u(W),htmlTextData:R,image:u(X),label:Ie,labelText:de,lineEnding:V,link:u(K),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Fe,resourceDestinationString:x,resourceTitleString:Pe,resource:ke,setextHeading:u(D),setextHeadingLineSequence:M,setextHeadingText:S,strong:u(),thematicBreak:u()}};mp(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(F){let q={type:"root",children:[]};const re={stack:[q],tokenStack:[],config:t,enter:o,exit:l,buffer:s,resume:c,data:n},le=[];let be=-1;for(;++be<F.length;)if(F[be][1].type==="listOrdered"||F[be][1].type==="listUnordered")if(F[be][0]==="enter")le.push(be);else{const ft=le.pop();be=i(F,ft,be)}for(be=-1;++be<F.length;){const ft=t[F[be][0]];pp.call(ft,F[be][1].type)&&ft[F[be][1].type].call(Object.assign({sliceSerialize:F[be][2].sliceSerialize},re),F[be][1])}if(re.tokenStack.length>0){const ft=re.tokenStack[re.tokenStack.length-1];(ft[1]||bc).call(re,void 0,ft[0])}for(q.position={start:Xt(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Xt(F.length>0?F[F.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(F,q,re){let le=q-1,be=-1,ft=!1,dn,Dt,hr,fr;for(;++le<=re;){const nt=F[le];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?be++:be--,fr=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(dn&&!fr&&!be&&!hr&&(hr=le),fr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:fr=void 0}if(!be&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||be===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(dn){let Hn=le;for(Dt=void 0;Hn--;){const vt=F[Hn];if(vt[1].type==="lineEnding"||vt[1].type==="lineEndingBlank"){if(vt[0]==="exit")continue;Dt&&(F[Dt][1].type="lineEndingBlank",ft=!0),vt[1].type="lineEnding",Dt=Hn}else if(!(vt[1].type==="linePrefix"||vt[1].type==="blockQuotePrefix"||vt[1].type==="blockQuotePrefixWhitespace"||vt[1].type==="blockQuoteMarker"||vt[1].type==="listItemIndent"))break}hr&&(!Dt||hr<Dt)&&(dn._spread=!0),dn.end=Object.assign({},Dt?F[Dt][1].start:nt[1].end),F.splice(Dt||le,0,["exit",dn,nt[2]]),le++,re++}if(nt[1].type==="listItemPrefix"){const Hn={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};dn=Hn,F.splice(le,0,["enter",Hn,nt[2]]),le++,re++,hr=void 0,fr=!0}}}return F[q][1]._spread=ft,re}function a(F,q){return re;function re(le){o.call(this,F(le),le),q&&q.call(this,le)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(F,q,re){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([q,re||void 0]),F.position={start:Xt(q.start),end:void 0}}function u(F){return q;function q(re){F&&F.call(this,re),l.call(this,re)}}function l(F,q){const re=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==F.type&&(q?q.call(this,F,le[0]):(le[1]||bc).call(this,F,le[0]));else throw new Error("Cannot close `"+F.type+"` ("+Fr({start:F.start,end:F.end})+"): it’s not open");re.position.end=Xt(F.end)}function c(){return jo(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(F){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function f(){const F=this.resume(),q=this.stack[this.stack.length-1];q.lang=F}function m(){const F=this.resume(),q=this.stack[this.stack.length-1];q.meta=F}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F.replace(/(\r?\n|\r)$/g,"")}function C(F){const q=this.resume(),re=this.stack[this.stack.length-1];re.label=q,re.identifier=_t(this.sliceSerialize(F)).toLowerCase()}function T(){const F=this.resume(),q=this.stack[this.stack.length-1];q.title=F}function O(){const F=this.resume(),q=this.stack[this.stack.length-1];q.url=F}function v(F){const q=this.stack[this.stack.length-1];if(!q.depth){const re=this.sliceSerialize(F).length;q.depth=re}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function M(F){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function z(F){const re=this.stack[this.stack.length-1].children;let le=re[re.length-1];(!le||le.type!=="text")&&(le=Yt(),le.position={start:Xt(F.start),end:void 0},re.push(le)),this.stack.push(le)}function R(F){const q=this.stack.pop();q.value+=this.sliceSerialize(F),q.position.end=Xt(F.end)}function V(F){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const re=q.children[q.children.length-1];re.position.end=Xt(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(z.call(this,F),R.call(this,F))}function G(){this.data.atHardBreak=!0}function Z(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F}function W(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F}function $(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F}function K(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=q,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function X(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=q,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function de(F){const q=this.sliceSerialize(F),re=this.stack[this.stack.length-2];re.label=Zx(q),re.identifier=_t(q).toLowerCase()}function Ie(){const F=this.stack[this.stack.length-1],q=this.resume(),re=this.stack[this.stack.length-1];if(this.data.inReference=!0,re.type==="link"){const le=F.children;re.children=le}else re.alt=q}function x(){const F=this.resume(),q=this.stack[this.stack.length-1];q.url=F}function Pe(){const F=this.resume(),q=this.stack[this.stack.length-1];q.title=F}function ke(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function Fe(F){const q=this.resume(),re=this.stack[this.stack.length-1];re.label=q,re.identifier=_t(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function pe(F){this.data.characterReferenceType=F.type}function ne(F){const q=this.sliceSerialize(F),re=this.data.characterReferenceType;let le;re?(le=Ef(q,re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=Go(q);const be=this.stack[this.stack.length-1];be.value+=le}function Ue(F){const q=this.stack.pop();q.position.end=Xt(F.end)}function Se(F){R.call(this,F);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(F)}function me(F){R.call(this,F);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(F)}function tt(){return{type:"blockquote",children:[]}}function it(){return{type:"code",lang:null,meta:null,value:""}}function Gt(){return{type:"inlineCode",value:""}}function qt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function cr(){return{type:"heading",depth:0,children:[]}}function Wt(){return{type:"break"}}function Fn(){return{type:"html",value:""}}function Na(){return{type:"image",title:null,url:"",alt:null}}function si(){return{type:"link",title:null,url:"",children:[]}}function ee(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function he(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function qe(){return{type:"paragraph",children:[]}}function at(){return{type:"strong",children:[]}}function Yt(){return{type:"text",value:""}}function dr(){return{type:"thematicBreak"}}}function Xt(e){return{line:e.line,column:e.column,offset:e.offset}}function mp(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?mp(e,r):_S(e,r)}}function _S(e,t){let n;for(n in t)if(pp.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 bc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fr({start:t.start,end:t.end})+") is still open")}function ES(e){const t=this;t.parser=n;function n(r){return gS(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function TS(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function yS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
198
+ `}]}function kS(e,t){const n=t.value?t.value+`
199
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function xS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ur(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function wS(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function gp(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function SS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gp(e,t);const i={src:ur(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function NS(e,t){const n={src:ur(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function LS(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function RS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gp(e,t);const i={href:ur(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function OS(e,t){const n={href:ur(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function PS(e,t,n){const r=e.all(t),i=n?DS(n):bp(t),a={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const c=r[o];(i||o!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
200
+ `}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
201
+ `});const l={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,l),e.applyData(t,l)}function DS(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=bp(n[r])}return t}function bp(e){const t=e.spread;return t??e.children.length>1}function vS(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function MS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function FS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HS(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Lt(t.children[1]),u=ka(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function US(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const d=t.children[u],p={},f=s?s[u]:void 0;f&&(p.align=f);let m={type:"element",tagName:a,properties:p,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),l.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function $S(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const _c=9,Ec=32;function jS(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Tc(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Tc(t.slice(i),i>0,!1)),a.join("")}function Tc(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===_c||a===Ec;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===_c||a===Ec;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function VS(e,t){const n={type:"text",value:jS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const GS={blockquote:TS,break:yS,code:kS,delete:xS,emphasis:AS,footnoteReference:CS,heading:wS,html:IS,imageReference:SS,image:NS,inlineCode:LS,linkReference:RS,link:OS,listItem:PS,list:vS,paragraph:MS,root:BS,strong:FS,table:HS,tableCell:$S,tableRow:US,text:VS,thematicBreak:zS,toml:Ei,yaml:Ei,definition:Ei,footnoteDefinition:Ei};function Ei(){}function qS(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function WS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function YS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||qS,r=e.options.footnoteBackLabel||WS,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),d=String(l.identifier).toUpperCase(),p=ur(d.toLowerCase());let f=0;const m=[],g=e.footnoteCounts.get(d);for(;g!==void 0&&++f<=g;){m.length>0&&m.push({type:"text",value:" "});let C=typeof n=="string"?n:n(u,f);typeof C=="string"&&(C={type:"text",value:C}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,f),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const C=y.children[y.children.length-1];C&&C.type==="text"?C.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(l,_),o.push(_)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ln(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
202
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
203
+ `}]}}const Ys={}.hasOwnProperty,QS={};function XS(e,t){const n=t||QS,r=new Map,i=new Map,a=new Map,s={...GS,...n.handlers},o={all:l,applyData:ZS,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:KS,wrap:e3};return Tt(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();d.has(p)||d.set(p,c)}}),o;function u(c,d){const p=c.type,f=o.handlers[p];if(Ys.call(o.handlers,p)&&f)return f(o,c,d);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in c){const{children:g,...y}=c,_=Ln(y);return _.children=o.all(c),_}return Ln(c)}return(o.options.unknownHandler||JS)(o,c,d)}function l(c){const d=[];if("children"in c){const p=c.children;let f=-1;for(;++f<p.length;){const m=o.one(p[f],c);if(m){if(f&&p[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=yc(m.value)),!Array.isArray(m)&&m.type==="element")){const g=m.children[0];g&&g.type==="text"&&(g.value=yc(g.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function KS(e,t){e.position&&(t.position=Xh(e))}function ZS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,Ln(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function JS(e,t){const n=t.data||{},r="value"in t&&!(Ys.call(n,"hProperties")||Ys.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function e3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
204
+ `});++r<e.length;)r&&n.push({type:"text",value:`
205
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
206
+ `}),n}function yc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function kc(e,t){const n=XS(e,t),r=n.one(e,void 0),i=YS(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
207
+ `},i),a}function t3(e,t){return e&&"run"in e?async function(n,r){const i=kc(n,{file:r,...t});await e.run(i,r)}:function(n,r){return kc(n,{file:r,...e||t})}}function xc(e){if(e)throw e}var ls,Ac;function n3(){if(Ac)return ls;Ac=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]"},a=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 p;for(p in l);return typeof p>"u"||e.call(l,p)},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},o=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(r)return r(l,c).value}else return;return l[c]};return ls=function u(){var l,c,d,p,f,m,g=arguments[0],y=1,_=arguments.length,C=!1;for(typeof g=="boolean"&&(C=g,g=arguments[1]||{},y=2),(g==null||typeof g!="object"&&typeof g!="function")&&(g={});y<_;++y)if(l=arguments[y],l!=null)for(c in l)d=o(g,c),p=o(l,c),g!==p&&(C&&p&&(a(p)||(f=i(p)))?(f?(f=!1,m=d&&i(d)?d:[]):m=d&&a(d)?d:{},s(g,{name:c,newValue:u(C,m,p)})):typeof p<"u"&&s(g,{name:c,newValue:p}));return g},ls}var r3=n3();const cs=Jc(r3);function Qs(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 a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...l){const c=e[++a];let d=-1;if(u){s(u);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,c?a3(c,o)(...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 a3(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(l){const c=l;if(o&&n)throw c;return i(c)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const It={basename:s3,dirname:o3,extname:u3,join:l3,sep:"/"};function s3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ri(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function o3(e){if(ri(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 u3(e){ri(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function l3(...e){let t=-1,n;for(;++t<e.length;)ri(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":c3(n)}function c3(e){ri(e);const t=e.codePointAt(0)===47;let n=d3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function d3(e,t){let n="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=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,a=0}else o===46&&a>-1?a++:a=-1}return n}function ri(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const h3={cwd:f3};function f3(){return"/"}function Xs(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function p3(e){if(typeof e=="string")e=new URL(e);else if(!Xs(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 m3(e)}function m3(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 ds=["history","path","basename","stem","extname","dirname"];class g3{constructor(t){let n;t?Xs(t)?n={path:t}:typeof t=="string"||b3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":h3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ds.length;){const a=ds[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)ds.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?It.basename(this.path):void 0}set basename(t){fs(t,"basename"),hs(t,"basename"),this.path=It.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?It.dirname(this.path):void 0}set dirname(t){Cc(this.basename,"dirname"),this.path=It.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?It.extname(this.path):void 0}set extname(t){if(hs(t,"extname"),Cc(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=It.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Xs(t)&&(t=p3(t)),fs(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?It.basename(this.path,this.extname):void 0}set stem(t){fs(t,"stem"),hs(t,"stem"),this.path=It.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 Ge(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 hs(e,t){if(e&&e.includes(It.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+It.sep+"`")}function fs(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Cc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function b3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _3=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),E3={}.hasOwnProperty;class tu extends _3{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 tu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(cs(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(gs("data",this.frozen),this.namespace[t]=n,this):E3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(gs("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=Ti(t),r=this.parser||this.Parser;return ps("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ps("process",this.parser||this.Parser),ms("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=Ti(t),u=r.parse(o);r.run(u,o,function(c,d,p){if(c||!d||!p)return l(c);const f=d,m=r.stringify(f,p);k3(m)?p.value=m:p.result=m,l(c,p)});function l(c,d){c||!d?s(c):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),ps("processSync",this.parser||this.Parser),ms("processSync",this.compiler||this.Compiler),this.process(t,i),Ic("processSync","process",n),r;function i(a,s){n=!0,xc(a),r=s}}run(t,n,r){wc(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=Ti(n);i.run(t,u,l);function l(c,d,p){const f=d||t;c?o(c):s?s(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ic("runSync","run",r),i;function a(s,o){xc(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=Ti(n),i=this.compiler||this.Compiler;return ms("stringify",i),wc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(gs("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...d]=l;u(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");o(l.plugins),l.settings&&(i.settings=cs(!0,i.settings,l.settings))}function o(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const d=l[c];a(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===l){p=d;break}if(p===-1)r.push([l,...c]);else if(c.length>0){let[f,...m]=c;const g=r[p][1];Qs(g)&&Qs(f)&&(f=cs(!0,g,f)),r[p]=[l,f,...m]}}}}const T3=new tu().freeze();function ps(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ms(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function gs(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 wc(e){if(!Qs(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ic(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ti(e){return y3(e)?e:new g3(e)}function y3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function k3(e){return typeof e=="string"||x3(e)}function x3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function nu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Bn=nu();function _p(e){Bn=e}var Tn={exec:()=>null};function ce(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Xe.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var A3=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},C3=/^(?:[ \t]*(?:\n|$))+/,w3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,I3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ii=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,S3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ru=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ep=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Tp=ce(Ep).replace(/bull/g,ru).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),N3=ce(Ep).replace(/bull/g,ru).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),iu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,L3=/^[^\n]+/,au=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,R3=ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",au).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),O3=ce(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ru).getRegex(),wa="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",su=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,P3=ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",su).replace("tag",wa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yp=ce(iu).replace("hr",ii).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wa).getRegex(),D3=ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yp).getRegex(),ou={blockquote:D3,code:w3,def:R3,fences:I3,heading:S3,hr:ii,html:P3,lheading:Tp,list:O3,newline:C3,paragraph:yp,table:Tn,text:L3},Sc=ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ii).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wa).getRegex(),v3={...ou,lheading:N3,table:Sc,paragraph:ce(iu).replace("hr",ii).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Sc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wa).getRegex()},M3={...ou,html:ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",su).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Tn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ce(iu).replace("hr",ii).replace("heading",` *#{1,6} *[^
208
+ ]`).replace("lheading",Tp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},B3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,F3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kp=/^( {2,}|\\)\n(?!\s*$)/,H3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,lr=/[\p{P}\p{S}]/u,Ia=/[\s\p{P}\p{S}]/u,uu=/[^\s\p{P}\p{S}]/u,U3=ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ia).getRegex(),xp=/(?!~)[\p{P}\p{S}]/u,$3=/(?!~)[\s\p{P}\p{S}]/u,j3=/(?:[^\s\p{P}\p{S}]|~)/u,V3=ce(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",A3?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ap=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,z3=ce(Ap,"u").replace(/punct/g,lr).getRegex(),G3=ce(Ap,"u").replace(/punct/g,xp).getRegex(),Cp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",q3=ce(Cp,"gu").replace(/notPunctSpace/g,uu).replace(/punctSpace/g,Ia).replace(/punct/g,lr).getRegex(),W3=ce(Cp,"gu").replace(/notPunctSpace/g,j3).replace(/punctSpace/g,$3).replace(/punct/g,xp).getRegex(),Y3=ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,uu).replace(/punctSpace/g,Ia).replace(/punct/g,lr).getRegex(),Q3=ce(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,lr).getRegex(),X3="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",K3=ce(X3,"gu").replace(/notPunctSpace/g,uu).replace(/punctSpace/g,Ia).replace(/punct/g,lr).getRegex(),Z3=ce(/\\(punct)/,"gu").replace(/punct/g,lr).getRegex(),J3=ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),eN=ce(su).replace("(?:-->|$)","-->").getRegex(),tN=ce("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",eN).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ta=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nN=ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ta).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wp=ce(/^!?\[(label)\]\[(ref)\]/).replace("label",ta).replace("ref",au).getRegex(),Ip=ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",au).getRegex(),rN=ce("reflink|nolink(?!\\()","g").replace("reflink",wp).replace("nolink",Ip).getRegex(),Nc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,lu={_backpedal:Tn,anyPunctuation:Z3,autolink:J3,blockSkip:V3,br:kp,code:F3,del:Tn,delLDelim:Tn,delRDelim:Tn,emStrongLDelim:z3,emStrongRDelimAst:q3,emStrongRDelimUnd:Y3,escape:B3,link:nN,nolink:Ip,punctuation:U3,reflink:wp,reflinkSearch:rN,tag:tN,text:H3,url:Tn},iN={...lu,link:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",ta).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ta).getRegex()},Ks={...lu,emStrongRDelimAst:W3,emStrongLDelim:G3,delLDelim:Q3,delRDelim:K3,url:ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Nc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ce(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Nc).getRegex()},aN={...Ks,br:ce(kp).replace("{2,}","*").getRegex(),text:ce(Ks.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},yi={normal:ou,gfm:v3,pedantic:M3},kr={normal:lu,gfm:Ks,breaks:aN,pedantic:iN},sN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lc=e=>sN[e];function wt(e,t){if(t){if(Xe.escapeTest.test(e))return e.replace(Xe.escapeReplace,Lc)}else if(Xe.escapeTestNoEncode.test(e))return e.replace(Xe.escapeReplaceNoEncode,Lc);return e}function Rc(e){try{e=encodeURI(e).replace(Xe.percentDecode,"%")}catch{return null}return e}function Oc(e,t){var a;let n=e.replace(Xe.findPipe,(s,o,u)=>{let l=!1,c=o;for(;--c>=0&&u[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(Xe.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((a=r.at(-1))!=null&&a.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Xe.slashPipe,"|");return r}function xr(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function oN(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function uN(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let a=4-n%4;r+=" ".repeat(a),n+=a}else r+=i,n++;return r}function Pc(e,t,n,r,i){let a=t.href,s=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,u}function lN(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
209
+ `).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
210
+ `)}var na=class{constructor(e){P(this,"options");P(this,"rules");P(this,"lexer");this.options=e||Bn}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:xr(n,`
211
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=lN(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=xr(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:xr(t[0],`
212
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=xr(t[0],`
213
+ `).split(`
214
+ `),r="",i="",a=[];for(;n.length>0;){let s=!1,o=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))o.push(n[u]),s=!0;else if(!s)o.push(n[u]);else break;n=n.slice(u);let l=o.join(`
215
+ `),c=l.replace(this.rules.other.blockquoteSetextReplace,`
216
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
217
+ ${l}`:l,i=i?`${i}
218
+ ${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=d,n.length===0)break;let p=a.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let f=p,m=f.raw+`
219
+ `+n.join(`
220
+ `),g=this.blockquote(m);a[a.length-1]=g,r=r.substring(0,r.length-f.raw.length)+g.raw,i=i.substring(0,i.length-f.text.length)+g.text;break}else if((p==null?void 0:p.type)==="list"){let f=p,m=f.raw+`
221
+ `+n.join(`
222
+ `),g=this.list(m);a[a.length-1]=g,r=r.substring(0,r.length-p.raw.length)+g.raw,i=i.substring(0,i.length-f.raw.length)+g.raw,n=m.substring(a.at(-1).raw.length).split(`
223
+ `);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),u=!1;for(;e;){let c=!1,d="",p="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let f=uN(t[2].split(`
224
+ `,1)[0],t[1].length),m=e.split(`
225
+ `,1)[0],g=!f.trim(),y=0;if(this.options.pedantic?(y=2,p=f.trimStart()):g?y=t[1].length+1:(y=f.search(this.rules.other.nonSpaceChar),y=y>4?1:y,p=f.slice(y),y+=t[1].length),g&&this.rules.other.blankLine.test(m)&&(d+=m+`
226
+ `,e=e.substring(m.length+1),c=!0),!c){let _=this.rules.other.nextBulletRegex(y),C=this.rules.other.hrRegex(y),T=this.rules.other.fencesBeginRegex(y),O=this.rules.other.headingBeginRegex(y),v=this.rules.other.htmlBeginRegex(y),S=this.rules.other.blockquoteBeginRegex(y);for(;e;){let M=e.split(`
227
+ `,1)[0],D;if(m=M,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),D=m):D=m.replace(this.rules.other.tabCharGlobal," "),T.test(m)||O.test(m)||v.test(m)||S.test(m)||_.test(m)||C.test(m))break;if(D.search(this.rules.other.nonSpaceChar)>=y||!m.trim())p+=`
228
+ `+D.slice(y);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||O.test(f)||C.test(f))break;p+=`
229
+ `+m}g=!m.trim(),d+=M+`
230
+ `,e=e.substring(M.length+1),f=D.slice(y)}}s.loose||(u?s.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(u=!0)),s.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),s.raw+=d}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c of s.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),((n=c.tokens[0])==null?void 0:n.type)==="text"||((r=c.tokens[0])==null?void 0:r.type)==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(c.raw);if(d){let p={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};c.checked=p.checked,s.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=p.raw+c.tokens[0].raw,c.tokens[0].text=p.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(p)):c.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):c.tokens.unshift(p)}}if(!s.loose){let d=c.tokens.filter(f=>f.type==="space"),p=d.length>0&&d.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=p}}if(s.loose)for(let c of s.items){c.loose=!0;for(let d of c.tokens)d.type==="text"&&(d.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){var s;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Oc(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
231
+ `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?a.align.push("right"):this.rules.other.tableAlignCenter.test(o)?a.align.push("center"):this.rules.other.tableAlignLeft.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o<n.length;o++)a.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:a.align[o]});for(let o of i)a.rows.push(Oc(o,a.header.length).map((u,l)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[l]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
232
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=xr(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=oN(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Pc(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Pc(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,o=i,u=0,l=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){o+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){u+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+u);let c=[...r[0]][0].length,d=e.slice(0,i+r.index+c+s);if(Math.min(i,s)%2){let f=d.slice(1,-1);return{type:"em",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,o=i,u=this.rules.inline.delRDelim;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(s=[...a].length,s!==i))continue;if(r[3]||r[4]){o+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o);let l=[...r[0]][0].length,c=e.slice(0,i+r.index+l+s),d=c.slice(i,-i);return{type:"del",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let a;do a=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(a!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},lt=class Zs{constructor(t){P(this,"tokens");P(this,"options");P(this,"state");P(this,"inlineQueue");P(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Bn,this.options.tokenizer=this.options.tokenizer||new na,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Xe,block:yi.normal,inline:kr.normal};this.options.pedantic?(n.block=yi.pedantic,n.inline=kr.pedantic):this.options.gfm&&(n.block=yi.gfm,this.options.breaks?n.inline=kr.breaks:n.inline=kr.gfm),this.tokenizer.rules=n}static get rules(){return{block:yi,inline:kr}}static lex(t,n){return new Zs(n).lex(t)}static lexInline(t,n){return new Zs(n).inlineTokens(t)}lex(t){t=t.replace(Xe.carriageReturn,`
233
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,a,s;for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Xe.tabCharGlobal," ").replace(Xe.spaceLine,""));t;){let o;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.some(l=>(o=l.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let l=n.at(-1);o.raw.length===1&&l!==void 0?l.raw+=`
234
+ `:n.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
235
+ `)?"":`
236
+ `)+o.raw,l.text+=`
237
+ `+o.text,this.inlineQueue.at(-1).src=l.text):n.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
238
+ `)?"":`
239
+ `)+o.raw,l.text+=`
240
+ `+o.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),n.push(o);continue}let u=t;if((s=this.options.extensions)!=null&&s.startBlock){let l=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},c),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(u=t.substring(0,l+1))}if(this.state.top&&(o=this.tokenizer.paragraph(u))){let l=n.at(-1);r&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=(l.raw.endsWith(`
241
+ `)?"":`
242
+ `)+o.raw,l.text+=`
243
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o),r=u.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
244
+ `)?"":`
245
+ `)+o.raw,l.text+=`
246
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var u,l,c,d,p;this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)f.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((l=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:l.call({lexer:this},r))??r;let s=!1,o="";for(;t;){s||(o=""),s=!1;let f;if((d=(c=this.options.extensions)==null?void 0:c.inline)!=null&&d.some(g=>(f=g.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let g=n.at(-1);f.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=f.raw,g.text+=f.text):n.push(f);continue}if(f=this.tokenizer.emStrong(t,r,o)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.del(t,r,o)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),n.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),n.push(f);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let g=1/0,y=t.slice(1),_;this.options.extensions.startInline.forEach(C=>{_=C.call({lexer:this},y),typeof _=="number"&&_>=0&&(g=Math.min(g,_))}),g<1/0&&g>=0&&(m=t.substring(0,g+1))}if(f=this.tokenizer.inlineText(m)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(o=f.raw.slice(-1)),s=!0;let g=n.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=f.raw,g.text+=f.text):n.push(f);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return n}},ra=class{constructor(e){P(this,"options");P(this,"parser");this.options=e||Bn}space(e){return""}code({text:e,lang:t,escaped:n}){var a;let r=(a=(t||"").match(Xe.notSpaceStart))==null?void 0:a[0],i=e.replace(Xe.endingNewline,"")+`
247
+ `;return r?'<pre><code class="language-'+wt(r)+'">'+(n?i:wt(i,!0))+`</code></pre>
248
+ `:"<pre><code>"+(n?i:wt(i,!0))+`</code></pre>
249
+ `}blockquote({tokens:e}){return`<blockquote>
250
+ ${this.parser.parse(e)}</blockquote>
251
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
252
+ `}hr(e){return`<hr>
253
+ `}list(e){let t=e.ordered,n=e.start,r="";for(let s=0;s<e.items.length;s++){let o=e.items[s];r+=this.listitem(o)}let i=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
254
+ `+r+"</"+i+`>
255
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
256
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
257
+ `}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let a=e.rows[i];n="";for(let s=0;s<a.length;s++)n+=this.tablecell(a[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
258
+ <thead>
259
+ `+t+`</thead>
260
+ `+r+`</table>
261
+ `}tablerow({text:e}){return`<tr>
262
+ ${e}</tr>
263
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
264
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${wt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Rc(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+wt(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Rc(e);if(i===null)return wt(n);e=i;let a=`<img src="${e}" alt="${wt(n)}"`;return t&&(a+=` title="${wt(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:wt(e.text)}},cu=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},mt=class Js{constructor(t){P(this,"options");P(this,"renderer");P(this,"textRenderer");this.options=t||Bn,this.options.renderer=this.options.renderer||new ra,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new cu}static parse(t,n){return new Js(n).parse(t)}static parseInline(t,n){return new Js(n).parseInline(t)}parse(t){var r,i;this.renderer.parser=this;let n="";for(let a=0;a<t.length;a++){let s=t[a];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[s.type]){let u=s,l=this.options.extensions.renderers[u.type].call({parser:this},u);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=l||"";continue}}let o=s;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let u='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){var i,a;this.renderer.parser=this;let r="";for(let s=0;s<t.length;s++){let o=t[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}let u=o;switch(u.type){case"escape":{r+=n.text(u);break}case"html":{r+=n.html(u);break}case"link":{r+=n.link(u);break}case"image":{r+=n.image(u);break}case"checkbox":{r+=n.checkbox(u);break}case"strong":{r+=n.strong(u);break}case"em":{r+=n.em(u);break}case"codespan":{r+=n.codespan(u);break}case"br":{r+=n.br(u);break}case"del":{r+=n.del(u);break}case"text":{r+=n.text(u);break}default:{let l='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Ai,Ir=(Ai=class{constructor(e){P(this,"options");P(this,"block");this.options=e||Bn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?lt.lex:lt.lexInline}provideParser(e=this.block){return e?mt.parse:mt.parseInline}},P(Ai,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),P(Ai,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ai),cN=class{constructor(...t){P(this,"defaults",nu());P(this,"options",this.setOptions);P(this,"parse",this.parseMarkdown(!0));P(this,"parseInline",this.parseMarkdown(!1));P(this,"Parser",mt);P(this,"Renderer",ra);P(this,"TextRenderer",cu);P(this,"Lexer",lt);P(this,"Tokenizer",na);P(this,"Hooks",Ir);this.use(...t)}walkTokens(t,n){var i,a;let r=[];for(let s of t)switch(r=r.concat(n.call(this,s)),s.type){case"table":{let o=s;for(let u of o.header)r=r.concat(this.walkTokens(u.tokens,n));for(let u of o.rows)for(let l of u)r=r.concat(this.walkTokens(l.tokens,n));break}case"list":{let o=s;r=r.concat(this.walkTokens(o.items,n));break}default:{let o=s;(a=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(u=>{let l=o[u].flat(1/0);r=r.concat(this.walkTokens(l,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=n.renderers[a.name];s?n.renderers[a.name]=function(...o){let u=a.renderer.apply(this,o);return u===!1&&(u=s.apply(this,o)),u}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[a.level];s?s.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new ra(this.defaults);for(let s in r.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,u=r.renderer[o],l=a[o];a[o]=(...c)=>{let d=u.apply(a,c);return d===!1&&(d=l.apply(a,c)),d||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new na(this.defaults);for(let s in r.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,u=r.tokenizer[o],l=a[o];a[o]=(...c)=>{let d=u.apply(a,c);return d===!1&&(d=l.apply(a,c)),d}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new Ir;for(let s in r.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,u=r.hooks[o],l=a[o];Ir.passThroughHooks.has(s)?a[o]=c=>{if(this.defaults.async&&Ir.passThroughHooksRespectAsync.has(s))return(async()=>{let p=await u.call(a,c);return l.call(a,p)})();let d=u.call(a,c);return l.call(a,d)}:a[o]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await u.apply(a,c);return p===!1&&(p=await l.apply(a,c)),p})();let d=u.apply(a,c);return d===!1&&(d=l.apply(a,c)),d}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(o){let u=[];return u.push(s.call(this,o)),a&&(u=u.concat(a.call(this,o))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return lt.lex(t,n??this.defaults)}parser(t,n){return mt.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(n):n,u=await(a.hooks?await a.hooks.provideLexer(t):t?lt.lex:lt.lexInline)(o,a),l=a.hooks?await a.hooks.processAllTokens(u):u;a.walkTokens&&await Promise.all(this.walkTokens(l,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser(t):t?mt.parse:mt.parseInline)(l,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let o=(a.hooks?a.hooks.provideLexer(t):t?lt.lex:lt.lexInline)(n,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let u=(a.hooks?a.hooks.provideParser(t):t?mt.parse:mt.parseInline)(o,a);return a.hooks&&(u=a.hooks.postprocess(u)),u}catch(o){return s(o)}}}onError(t,n){return r=>{if(r.message+=`
265
+ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+wt(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},On=new cN;function ge(e,t){return On.parse(e,t)}ge.options=ge.setOptions=function(e){return On.setOptions(e),ge.defaults=On.defaults,_p(ge.defaults),ge};ge.getDefaults=nu;ge.defaults=Bn;ge.use=function(...e){return On.use(...e),ge.defaults=On.defaults,_p(ge.defaults),ge};ge.walkTokens=function(e,t){return On.walkTokens(e,t)};ge.parseInline=On.parseInline;ge.Parser=mt;ge.parser=mt.parse;ge.Renderer=ra;ge.TextRenderer=cu;ge.Lexer=lt;ge.lexer=lt.lex;ge.Tokenizer=na;ge.Hooks=Ir;ge.parse=ge;ge.options;ge.setOptions;ge.use;ge.walkTokens;ge.parseInline;mt.parse;lt.lex;var dN=300,hN="300px",fN=500;function pN(e={}){let{immediate:t=!1,debounceDelay:n=dN,rootMargin:r=hN,idleTimeout:i=fN}=e,[a,s]=N.useState(!1),o=N.useRef(null),u=N.useRef(null),l=N.useRef(null),c=N.useMemo(()=>f=>{let m=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),d=N.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(f,m)=>window.requestIdleCallback(f,m):c,[c]),p=N.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return N.useEffect(()=>{if(t){s(!0);return}let f=o.current;if(!f)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null);let m=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null)},g=T=>{l.current=d(O=>{O.timeRemaining()>0||O.didTimeout?(s(!0),T.disconnect()):l.current=d(()=>{s(!0),T.disconnect()},{timeout:i/2})},{timeout:i})},y=T=>{m(),u.current=window.setTimeout(()=>{var O,v;let S=T.takeRecords();(S.length===0||(v=(O=S.at(-1))==null?void 0:O.isIntersecting)!=null&&v)&&g(T)},n)},_=(T,O)=>{T.isIntersecting?y(O):m()},C=new IntersectionObserver(T=>{for(let O of T)_(O,C)},{rootMargin:r,threshold:0});return C.observe(f),()=>{u.current&&clearTimeout(u.current),l.current&&p(l.current),C.disconnect()}},[t,n,r,i,p,d]),{shouldRender:a,containerRef:o}}var mN=320,gN=4,Sp=()=>typeof performance>"u"?Date.now():performance.now();function Dc(e){var t,n;let r=(t=e==null?void 0:e.now)!=null?t:Sp,i=(n=e==null?void 0:e.maxBacklogMs)!=null?n:mN,a=0,s=0;return{now:r,beginPass(o){s=Math.min(Math.max(a,o),o+i)},mark(){return s},rewind(o){s=o},take(o,u,l){if(o<=0)return{baseDelay:0,step:Math.max(0,u)};let c=Math.max(0,u),d=c===0?0:Math.min(c,gN),p=Math.max(s,l),f=l+i,m=p+Math.max(0,o-1)*c,g=c;if(m>f&&o>1)if(p<f){let _=f-p;g=Math.max(d,_/(o-1))}else g=d;let y=Math.max(0,Math.round(p-l));return s=p+o*g,{baseDelay:y,step:g}},commitPass(){a=s}}}var Np=/\s/,du=/^\s+$/,bN=new Set(["pre","svg","math","annotation"]),_N=new Set(["img","hr"]),ai=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",hu=e=>e.some(t=>ai(t)&&bN.has(t.tagName)),EN=e=>{for(let t=e.length-1;t>=0;t--){let n=e[t];if(ai(n)&&n.tagName==="li")return n}},TN=(e,t,n,r)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate-marker"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(n)}ms;--sd-marker-easing:${r}`},yN=new Set(["ul","ol","li"]),Lp=e=>{for(let t of e.children)if(ai(t)){if(t.tagName==="input")return t;if(yN.has(t.tagName))continue;let n=Lp(t);if(n)return n}},Rp=(e,t,n,r)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-animation:sd-${t.animation};--sd-duration:${n}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(r)}ms`},kN=(e,t,n,r)=>{let i=Lp(e);i&&Rp(i,t,n,r)},xN=(e,t,n,r,i,a)=>{if(hu(t))return;let s=r.prevContentLength,o=i.count;i.count+=1;let u=s>0&&o<s,l=u?0:a.baseDelay+i.newIndex++*a.step;Rp(e,n,u?0:n.duration,l)},AN=e=>{var t;for(let n=e.length-1;n>=0;n-=1){let r=e[n];if(ai(r)){if((t=r.properties)!=null&&t["data-sd-animated"])break;r.properties={...r.properties,"data-sd-animated":!0}}}},Op=e=>{let t=[],n="",r=!1;for(let i of e){let a=Np.test(i);if(a!==r&&n){if(a){n+=i,r=!0;continue}t.push(n),n=""}n+=i,r=a}return n&&t.push(n),t},Pp=e=>{let t=[],n="";for(let r of e)Np.test(r)?t.length>0&&!du.test(t.at(-1))?t[t.length-1]+=r:n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&(t.length>0?t[t.length-1]+=n:t.push(n)),t},CN=(e,t,n,r,i,a)=>{let s=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(s+=`;--sd-delay:${Math.round(a)}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s},children:[{type:"text",value:e}]}},vc=(e,t)=>!(e>0&&t<e),eo=e=>ai(e)&&_N.has(e.tagName),wN=(e,t,n)=>{let r=0,i=0;return ga(e,a=>a.type==="text"||eo(a),(a,s)=>{if(hu(s))return xn;if(eo(a)){vc(n,i)&&(r+=1),i+=1;return}let o=a.value;if(!o.trim()){i+=o.length;return}let u=t.sep==="char"?Pp(o):Op(o);for(let l of u){let c=i;i+=l.length,!du.test(l)&&vc(n,c)&&(r+=1)}}),r},IN=(e,t,n,r,i,a)=>{var s;let o=t.at(-1);if(!(o&&"children"in o))return;if(hu(t))return xn;let u=o,l=u.children.indexOf(e);if(l===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let d=n.sep==="char"?Pp(c):Op(c),p=r.prevContentLength,f=!1,m=EN(t),g=!!(m&&!((s=m.properties)!=null&&s["data-sd-animate-marker"])),y=!1,_=d.map(C=>{let T=i.count;if(i.count+=C.length,du.test(C))return{type:"text",value:C};let O=p>0&&T<p,v=O?0:a.baseDelay+i.newIndex++*a.step;if(f=!0,m&&g&&!y){let S=O?0:n.duration;TN(m,S,v,n.easing),kN(m,n,S,v),y=!0}return CN(C,n.animation,n.duration,n.easing,O,v)});return f&&AN(t),u.children.splice(l,1,..._),l+_.length},SN=0;function Dp(e){var t,n,r,i,a;let s={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word",stagger:(a=e==null?void 0:e.stagger)!=null?a:40,timeline:e==null?void 0:e.timeline},o={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},u=SN++,l=()=>c=>{var d;let p={count:0,newIndex:0};o.prevContentLength=o.committedCharCount;let f=s.timeline,m=(d=f==null?void 0:f.now())!=null?d:Sp();f&&(o.pendingMark===null?o.pendingMark=f.mark():f.rewind(o.pendingMark));let g=f?f.take(wN(c,s,o.prevContentLength),s.stagger,m):{baseDelay:0,step:s.stagger};ga(c,y=>y.type==="text"||eo(y),(y,_)=>{if(y.type==="text")return IN(y,_,s,o,p,g);xN(y,_,s,o,p,g)}),o.lastRenderCharCount=p.count,o.prevContentLength=0};return Object.defineProperty(l,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:l,setPrevContentLength(c){o.committedCharCount=c,o.prevContentLength=c},getLastRenderCharCount(){return o.lastRenderCharCount},commit(){o.committedCharCount=o.lastRenderCharCount,o.pendingMark=null}}}Dp();var vp=N.createContext(!1),NN=()=>N.useContext(vp),Sa=(...e)=>op(ed(e)),LN=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},RN=e=>e?(...t)=>LN(e,op(ed(t))):Sa,Xn=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),s=document.createElement("a");s.href=a,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)},to=N.createContext(Sa),ue=()=>N.useContext(to),ON=8,Mp=e=>{if(!(e===void 0||e===0||e===Number.POSITIVE_INFINITY)){if(typeof e=="number")return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(!(e==="0"||e==="none"||e==="Infinity"))return e}},Bp=(e,t,n)=>{let r=N.useRef(null),i=N.useRef(!0),a=N.useRef(!1);return N.useEffect(()=>{let s=r.current;if(!(s&&t))return;let o=()=>{let u=s.scrollHeight-s.scrollTop-s.clientHeight<ON;i.current=u};return s.addEventListener("scroll",o,{passive:!0}),()=>s.removeEventListener("scroll",o)},[t]),N.useEffect(()=>{e&&!a.current&&(i.current=!0),e||(i.current=!0),a.current=e},[e]),N.useEffect(()=>{let s=r.current;s&&t&&e&&i.current&&s.scrollTo({top:s.scrollHeight,behavior:"instant"})},[e,t,n]),r},PN=Sa("block"),DN=Sa("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),vN=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},MN=N.memo(({children:e,result:t,language:n,className:r,maxHeight:i,startLine:a,lineNumbers:s=!0,...o})=>{let u=ue(),{isAnimating:l}=N.useContext(He),c=Mp(i),d=Bp(l,!!c,t),p=N.useMemo(()=>u(DN),[u]),f=N.useMemo(()=>u(PN),[u]),m=N.useMemo(()=>{let g={};return t.bg&&(g["--sdm-bg"]=t.bg),t.fg&&(g["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(g,vN(t.rootStyle)),g},[t.bg,t.fg,t.rootStyle]);return A.jsx("div",{className:u(r,c?"overflow-y-auto":null,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",ref:d,style:c?{maxHeight:c}:void 0,...o,children:A.jsx("pre",{className:u(r,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:m,children:A.jsx("code",{className:s?u("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&a&&a>1?{counterReset:`line ${a-1}`}:void 0,children:t.tokens.map((g,y)=>A.jsx("span",{className:s?p:f,children:g.length===0||g.length===1&&g[0].content===""?`
266
+ `:g.map((_,C)=>{let T={},O=!!_.bgColor;if(_.color&&(T["--sdm-c"]=_.color),_.bgColor&&(T["--sdm-tbg"]=_.bgColor),_.htmlStyle)for(let[v,S]of Object.entries(_.htmlStyle))v==="color"?T["--sdm-c"]=S:v==="background-color"?(T["--sdm-tbg"]=S,O=!0):T[v]=S;return A.jsx("span",{className:u("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",O&&"bg-[var(--sdm-tbg)]",O&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:T,..._.htmlAttrs,children:_.content},C)})},y))})})})}),BN=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let a=ue();return A.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},Fp=N.createContext({code:""}),Hp=()=>N.useContext(Fp),FN=({language:e})=>{let t=ue();return A.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:A.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},HN=e=>{let t=e.length;for(;t>0&&e[t-1]===`
267
+ `;)t--;return e.slice(0,t)},UN=N.lazy(()=>b(()=>import("./highlighted-body-KPVGNVTW-BmPHGwPQ.js"),__vite__mapDeps([101,102,103,104,105])).then(e=>({default:e.HighlightedCodeBlockBody}))),$N=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:s,...o})=>{let u=ue(),{codeBlockMaxHeight:l}=N.useContext(He),c=N.useMemo(()=>HN(e),[e]),d=N.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:c.split(`
268
+ `).map(p=>[{content:p,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[c]);return A.jsx(Fp.Provider,{value:{code:e},children:A.jsxs(BN,{dir:"ltr",isIncomplete:i,language:t,children:[A.jsx(FN,{language:t}),r?A.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:A.jsx("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,A.jsx(N.Suspense,{fallback:A.jsx(MN,{className:n,language:t,lineNumbers:s,maxHeight:l,result:d,startLine:a,...o}),children:A.jsx(UN,{className:n,code:c,language:t,lineNumbers:s,maxHeight:l,raw:d,startLine:a,...o})})]})})},jN=e=>A.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:A.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),VN=e=>A.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:A.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),zN=e=>A.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:A.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),GN=e=>A.jsxs("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[A.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),A.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),A.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),A.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),A.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),A.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),A.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),A.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),A.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),A.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),qN=e=>A.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:A.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),WN=e=>A.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:A.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),YN=e=>A.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:A.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),QN=e=>A.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:A.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),XN=e=>A.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:A.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),KN=e=>A.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:A.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Sr={CheckIcon:jN,CopyIcon:VN,DownloadIcon:zN,ExternalLinkIcon:QN,Loader2Icon:GN,Maximize2Icon:qN,RotateCcwIcon:WN,XIcon:YN,ZoomInIcon:XN,ZoomOutIcon:KN},Up=N.createContext(Sr),ZN=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},Mc=({icons:e,children:t})=>{let n=N.useRef(e),r=N.useRef(e?{...Sr,...e}:Sr);ZN(n.current,e)||(n.current=e,r.current=e?{...Sr,...e}:Sr);let i=r.current;return A.jsx(Up.Provider,{value:i,children:t})},kt=()=>N.useContext(Up),$p={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",zoomIn:"Zoom in",zoomOut:"Zoom out",resetView:"Reset zoom and pan",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},no=N.createContext($p),Ot=()=>N.useContext(no),ro=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let o=ue(),[u,l]=N.useState(!1),c=N.useRef(0),{code:d}=Hp(),{isAnimating:p}=N.useContext(He),f=Ot(),m=a??d,g=async()=>{var C;if(typeof window>"u"||!((C=navigator==null?void 0:navigator.clipboard)!=null&&C.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(m),l(!0),e==null||e(),c.current=window.setTimeout(()=>l(!1),n))}catch(T){t==null||t(T)}};N.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let y=kt(),_=u?y.CheckIcon:y.CopyIcon;return A.jsxs(A.Fragment,{children:[A.jsx("button",{"aria-label":f.copyCode,className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:p,onClick:g,title:f.copyCode,type:"button",...s,children:r??A.jsx(_,{"aria-hidden":"true",size:14})}),u&&A.jsx("output",{"aria-live":"polite",className:"sr-only",children:f.copied})]})},fu=(e,t,n)=>{if(typeof e=="boolean")return n;let r=e[t];if(typeof r!="object")return n;let i=r.download;return typeof i!="object"?n:i.filename||n},Bc={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},JN=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let o=ue(),{code:u}=Hp(),{isAnimating:l,controls:c}=N.useContext(He),d=Ot(),p=kt(),f=a??u,m=n&&n in Bc?Bc[n]:"txt",g=`${fu(c,"code","file")}.${m}`,y="text/plain",_=()=>{try{Xn(g,f,y),e==null||e()}catch(C){t==null||t(C)}};return A.jsx("button",{"aria-label":d.downloadFile,className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:_,title:d.downloadFile,type:"button",...s,children:r??A.jsx(p.DownloadIcon,{size:14})})},Fc=()=>{let{Loader2Icon:e}=kt(),t=ue();return A.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[A.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),A.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:A.jsx(e,{className:t("size-4 animate-spin")})})]})},eL=/\.[^/.]+$/,tL=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,showControls:s=!0,showDownloadControl:o=!0,...u})=>{let{DownloadIcon:l}=kt(),c=ue(),d=N.useRef(null),[p,f]=N.useState(!1),[m,g]=N.useState(!1),y=Ot(),_=u.width!=null||u.height!=null,C=(p||_)&&!m&&s&&o,T=m&&!_;N.useEffect(()=>{let M=d.current;if(M!=null&&M.complete){let D=M.naturalWidth>0;f(D),g(!D)}},[]);let O=N.useCallback(M=>{f(!0),g(!1),i==null||i(M)},[i]),v=N.useCallback(M=>{f(!1),g(!0),a==null||a(M)},[a]),S=async()=>{if(n)try{let M=await(await fetch(n)).blob(),D=new URL(n,window.location.origin).pathname.split("/").pop()||"",z=D.split(".").pop(),R=D.includes(".")&&z!==void 0&&z.length<=4,V="";if(R)V=D;else{let G=M.type,Z="png";G.includes("jpeg")||G.includes("jpg")?Z="jpg":G.includes("png")?Z="png":G.includes("svg")?Z="svg":G.includes("gif")?Z="gif":G.includes("webp")&&(Z="webp"),V=`${(r||D||"image").replace(eL,"")}.${Z}`}Xn(V,M,M.type)}catch{window.open(n,"_blank")}};return n?A.jsxs("div",{className:c("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[A.jsx("img",{alt:r,className:c("max-w-full rounded-lg",T&&"hidden",t),"data-streamdown":"image",onError:v,onLoad:O,ref:d,src:n,...u}),T&&A.jsx("span",{className:c("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:y.imageNotAvailable}),s&&A.jsx("div",{className:c("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),C&&A.jsx("button",{className:c("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:S,title:y.downloadImage,type:"button",children:A.jsx(l,{size:14})})]}):null},Hr=0,pu=()=>{Hr+=1,Hr===1&&(document.body.style.overflow="hidden")},mu=()=>{Hr=Math.max(0,Hr-1),Hr===0&&(document.body.style.overflow="")},nL=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:s,XIcon:o}=kt(),u=ue(),[l,c]=N.useState(!1),d=Ot(),p=N.useCallback(async()=>{try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch{}},[e]),f=N.useCallback(()=>{r(),n()},[r,n]);if(N.useEffect(()=>{if(t){pu();let g=y=>{y.key==="Escape"&&n()};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),mu()}}},[t,n]),!t||typeof document>"u")return null;let m=A.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:g=>{g.key==="Escape"&&n()},role:"button",tabIndex:0,children:A.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[A.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:d.close,type:"button",children:A.jsx(o,{size:16})}),A.jsxs("div",{className:u("flex flex-col gap-2"),children:[A.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[A.jsx(s,{size:20}),A.jsx("span",{children:d.openExternalLink})]}),A.jsx("p",{className:u("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),A.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),A.jsxs("div",{className:u("flex gap-2"),children:[A.jsx("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:p,type:"button",children:l?A.jsxs(A.Fragment,{children:[A.jsx(i,{size:14}),A.jsx("span",{children:d.copied})]}):A.jsxs(A.Fragment,{children:[A.jsx(a,{size:14}),A.jsx("span",{children:d.copyLink})]})}),A.jsxs("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:f,type:"button",children:[A.jsx(s,{size:14}),A.jsx("span",{children:d.openLink})]})]})]})});return uo.createPortal(m,document.body)},io=N.createContext(null),gu=()=>N.useContext(io),IR=()=>{var e;let t=gu();return(e=t==null?void 0:t.code)!=null?e:null},bu=()=>{var e;let t=gu();return(e=t==null?void 0:t.mermaid)!=null?e:null},rL=e=>{var t;let n=gu();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},iL=e=>{if(typeof DOMParser>"u"||typeof XMLSerializer>"u")return e;let t=new DOMParser().parseFromString(e,"text/html").querySelector("svg");return t?new XMLSerializer().serializeToString(t):e},aL=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),l=o.width*r,c=o.height*r;u.width=l,u.height=c;let d=u.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,l,c),u.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},jp=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let s=ue(),[o,u]=N.useState(!1),l=N.useRef(null),{isAnimating:c,controls:d}=N.useContext(He),p=kt(),f=bu(),m=Ot(),g=fu(d,"mermaid","diagram"),y=async _=>{try{if(_==="mmd"){let M=`${g}.mmd`;Xn(M,e,"text/plain"),u(!1),r==null||r(_);return}if(!f){a==null||a(new Error("Mermaid plugin not available"));return}let C=f.getMermaid(i),T=e.split("").reduce((M,D)=>(M<<5)-M+D.charCodeAt(0)|0,0),O=`mermaid-${Math.abs(T)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:v}=await C.render(O,e);if(!v){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}let S=iL(v);if(_==="svg"){let M=`${g}.svg`;Xn(M,S,"image/svg+xml"),u(!1),r==null||r(_);return}if(_==="png"){let M=await aL(S);Xn(`${g}.png`,M,"image/png"),r==null||r(_),u(!1);return}}catch(C){a==null||a(C)}};return N.useEffect(()=>{let _=C=>{let T=C.composedPath();l.current&&!T.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),A.jsxs("div",{className:s("relative"),ref:l,children:[A.jsx("button",{"aria-label":m.downloadDiagram,className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!o),title:m.downloadDiagram,type:"button",children:t??A.jsx(p.DownloadIcon,{"aria-hidden":"true",size:14})}),o?A.jsxs("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[A.jsx("button",{"aria-label":m.downloadDiagramAsSvg,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("svg"),title:m.downloadDiagramAsSvg,type:"button",children:m.mermaidFormatSvg}),A.jsx("button",{"aria-label":m.downloadDiagramAsPng,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("png"),title:m.downloadDiagramAsPng,type:"button",children:m.mermaidFormatPng}),A.jsx("button",{"aria-label":m.downloadDiagramAsMmd,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("mmd"),title:m.downloadDiagramAsMmd,type:"button",children:m.mermaidFormatMmd})]}):null]})},sL=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:s,XIcon:o}=kt(),u=ue(),[l,c]=N.useState(!1),{isAnimating:d,controls:p}=N.useContext(He),f=Ot(),m=(()=>{if(typeof p=="boolean")return p;let C=p.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.panZoom!==!1})(),g=(()=>{if(typeof p=="boolean")return p;let C=p.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.download!==!1})(),y=(()=>{if(typeof p=="boolean")return p;let C=p.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.copy!==!1})(),_=()=>{c(!l)};return N.useEffect(()=>{if(l){pu();let C=T=>{T.key==="Escape"&&c(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),mu()}}},[l]),N.useEffect(()=>{l?n==null||n():r&&r()},[l,n,r]),A.jsxs(A.Fragment,{children:[A.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:_,title:f.viewFullscreen,type:"button",...a,"aria-label":f.viewFullscreen,children:A.jsx(s,{"aria-hidden":"true",size:14})}),l?uo.createPortal(A.jsxs("div",{"aria-label":f.viewFullscreen,"aria-modal":"true",className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),"data-streamdown":"mermaid-fullscreen",onClick:_,onKeyDown:C=>{C.key==="Escape"&&_()},role:"dialog",children:[A.jsxs("div",{className:u("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:[g?A.jsx(jp,{chart:e,config:t}):null,y?A.jsx(ro,{code:e}):null,A.jsx("button",{"aria-label":f.exitFullscreen,className:u("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:_,title:f.exitFullscreen,type:"button",children:A.jsx(o,{"aria-hidden":"true",size:20})})]}),A.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:A.jsx(Nm,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})};function ao(e){var t;if(e.nodeType===Node.TEXT_NODE)return(t=e.textContent)!=null?t:"";if(e.nodeType!==Node.ELEMENT_NODE)return"";let n=e;return n.tagName==="BR"?`
269
+ `:Array.from(n.childNodes).map(ao).join("")}var Vp=e=>{let t=[],n=[],r=e.querySelectorAll("thead th");for(let a of r)t.push(ao(a).trim());let i=e.querySelectorAll("tbody tr");for(let a of i){let s=[],o=a.querySelectorAll("td");for(let u of o)s.push(ao(u).trim());n.push(s)}return{headers:t,rows:n}},zp=e=>{var t;if(typeof e!="object")return",";let n=e.table;return typeof n!="object"?",":(t=n.csvSeparator)!=null?t:","},Gp=(e,t=",")=>{let n;t==="auto"?Intl.NumberFormat().format(1.1).includes(",")?n=";":n=",":n=t;let{headers:r,rows:i}=e,a=l=>{let c=!1;for(let d of l)if(d===n||d==='"'||d===`
270
+ `||d==="\r"){c=!0;break}return c?`"${l.replace(/"/g,'""')}"`:l},s=r.length>0?i.length+1:i.length,o=new Array(s),u=0;r.length>0&&(o[u]=r.map(a).join(n),u+=1);for(let l of i)o[u]=l.map(a).join(n),u+=1;return o.join(`
271
+ `)},oL=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1;for(let c of o)if(c===" "||c===`
272
+ `||c==="\r"){u=!0;break}if(!u)return o;let l=[];for(let c of o)c===" "?l.push("\\t"):c===`
273
+ `?l.push("\\n"):c==="\r"?l.push("\\r"):l.push(c);return l.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let o of n)a[s]=o.map(r).join(" "),s+=1;return a.join(`
274
+ `)},bs=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"||r===`
275
+ `){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):r===`
276
+ `?n.push("<br>"):n.push(r);return n.join("")},qp=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(o=>bs(o));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let o=0;o<t.length;o+=1)s[o]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]=l<o.length?bs(o[l]):"";r[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=o.map(l=>bs(l));r[i]=`| ${u.join(" | ")} |`,i+=1}return r.join(`
277
+ `)},Wp=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=ue(),[s,o]=N.useState(!1),[u,l]=N.useState(!1),c=N.useRef(null),d=N.useRef(0),{isAnimating:p,controls:f}=N.useContext(He),m=Ot(),g=zp(f),y=async T=>{var O,v;if(typeof window>"u"||!((O=navigator==null?void 0:navigator.clipboard)!=null&&O.write)){r==null||r(new Error("Clipboard API not available"));return}try{let S=(v=c.current)==null?void 0:v.closest('[data-streamdown="table-wrapper"]'),M=S==null?void 0:S.querySelector("table");if(!M){r==null||r(new Error("Table not found"));return}let D=Vp(M),z="";T==="csv"?z=Gp(D,g):T==="tsv"?z=oL(D):z=qp(D);let R=new ClipboardItem({"text/plain":new Blob([z],{type:"text/plain"}),"text/html":new Blob([M.outerHTML],{type:"text/html"})});await navigator.clipboard.write([R]),l(!0),o(!1),n==null||n(T),d.current=window.setTimeout(()=>l(!1),i)}catch(S){r==null||r(S)}};N.useEffect(()=>{let T=O=>{let v=O.composedPath();c.current&&!v.includes(c.current)&&o(!1)};return document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T),window.clearTimeout(d.current)}},[]);let _=kt(),C=u?_.CheckIcon:_.CopyIcon;return A.jsxs("div",{className:a("relative"),ref:c,children:[A.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>o(!s),title:m.copyTable,type:"button",children:e??A.jsx(C,{height:14,width:14})}),s?A.jsxs("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[A.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("md"),title:m.copyTableAsMarkdown,type:"button",children:m.tableFormatMarkdown}),A.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("csv"),title:m.copyTableAsCsv,type:"button",children:m.tableFormatCsv}),A.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("tsv"),title:m.copyTableAsTsv,type:"button",children:m.tableFormatTsv})]}):null]})},Yp=({children:e,className:t,onDownload:n,onError:r})=>{let i=ue(),[a,s]=N.useState(!1),o=N.useRef(null),{isAnimating:u,controls:l}=N.useContext(He),c=Ot(),d=kt(),p=zp(l),f=m=>{var g;try{let y=(g=o.current)==null?void 0:g.closest('[data-streamdown="table-wrapper"]'),_=y==null?void 0:y.querySelector("table");if(!_){r==null||r(new Error("Table not found"));return}let C=Vp(_),T=m==="csv"?Gp(C,p):qp(C),O=m==="csv"?"csv":"md",v=`${fu(l,"table","table")}.${O}`;Xn(v,T,m==="csv"?"text/csv":"text/markdown"),s(!1),n==null||n(m)}catch(y){r==null||r(y)}};return N.useEffect(()=>{let m=g=>{let y=g.composedPath();o.current&&!y.includes(o.current)&&s(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[]),A.jsxs("div",{className:i("relative"),ref:o,children:[A.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>s(!a),title:c.downloadTable,type:"button",children:e??A.jsx(d.DownloadIcon,{size:14})}),a?A.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[A.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("csv"),title:c.downloadTableAsCsv,type:"button",children:c.tableFormatCsv}),A.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("markdown"),title:c.downloadTableAsMarkdown,type:"button",children:c.tableFormatMarkdown})]}):null]})},uL=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=kt(),s=ue(),[o,u]=N.useState(!1),{isAnimating:l}=N.useContext(He),c=Ot(),d=()=>{u(!0)},p=()=>{u(!1)};return N.useEffect(()=>{if(o){pu();let f=m=>{m.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),mu()}}},[o]),A.jsxs(A.Fragment,{children:[A.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:d,title:c.viewFullscreen,type:"button",children:A.jsx(i,{size:14})}),o?uo.createPortal(A.jsx("div",{"aria-label":c.viewFullscreen,"aria-modal":"true",className:s("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:p,onKeyDown:f=>{f.key==="Escape"&&p()},role:"dialog",children:A.jsxs("div",{className:s("flex h-full flex-col"),"data-streamdown":"table-wrapper",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:[A.jsxs("div",{className:s("flex items-center justify-end gap-1 p-4"),children:[n?A.jsx(Wp,{}):null,r?A.jsx(Yp,{}):null,A.jsx("button",{className:s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:c.exitFullscreen,type:"button",children:A.jsx(a,{size:20})})]}),A.jsx("div",{className:s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:A.jsx("table",{className:s("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},lL=({children:e,className:t,maxHeight:n,showControls:r,showCopy:i=!0,showDownload:a=!0,showFullscreen:s=!0,...o})=>{let u=ue(),{isAnimating:l}=N.useContext(He),c=Mp(n),d=Bp(l,!!c,e),p=r&&i,f=r&&a,m=r&&s,g=p||f||m;return A.jsxs("div",{className:u("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[g?A.jsxs("div",{className:u("flex items-center justify-end gap-1"),children:[p?A.jsx(Wp,{}):null,f?A.jsx(Yp,{}):null,m?A.jsx(uL,{showCopy:p,showDownload:f,children:e}):null]}):null,A.jsx("div",{className:u("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:d,style:c?{maxHeight:c}:void 0,children:A.jsx("table",{className:u("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},cL=/startLine=(\d+)/,dL=/\bnoLineNumbers\b/,hL=N.lazy(()=>b(()=>Promise.resolve().then(()=>bR),void 0).then(e=>({default:e.Mermaid}))),fL=/language-([^\s]+)/,pL="node";function Te(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;let r=e,i=t;for(let a of n)if(a!==pL&&!Object.is(r[a],i[a]))return!1;return!0}function mL(e,t){var n,r;return((n=e==null?void 0:e.properties)==null?void 0:n.metastring)===((r=t==null?void 0:t.properties)==null?void 0:r.metastring)}var ia=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,_s=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Hc=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ki=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},gL=(e,t)=>{if(typeof e=="boolean")return e;let n=e.image;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},_u=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>Te(e,t));_u.displayName="MarkdownOl";var Qp=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>Te(e,t));Qp.displayName="MarkdownLi";var Xp=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>Te(e,t));Xp.displayName="MarkdownUl";var Kp=N.memo(({className:e,node:t,...n})=>{let r=ue();return A.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>Te(e,t));Kp.displayName="MarkdownHr";var Zp=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>Te(e,t));Zp.displayName="MarkdownStrong";var bL=({children:e,className:t,href:n,node:r,...i})=>{let a=ue(),{linkSafety:s}=N.useContext(He),[o,u]=N.useState(!1),l=n==="streamdown:incomplete-link",c=N.useCallback(async m=>{if(!(!(s!=null&&s.enabled&&n)||l)){if(m.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[s,n,l]),d=N.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=N.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:o,onClose:p,onConfirm:d};return s!=null&&s.enabled&&n?A.jsxs(A.Fragment,{children:[A.jsx("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:c,type:"button",children:e}),s.renderModal?s.renderModal(f):A.jsx(nL,{...f})]}):A.jsx("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Jp=N.memo(bL,(e,t)=>Te(e,t));Jp.displayName="MarkdownA";var em=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>Te(e,t));em.displayName="MarkdownH1";var tm=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>Te(e,t));tm.displayName="MarkdownH2";var nm=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>Te(e,t));nm.displayName="MarkdownH3";var rm=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>Te(e,t));rm.displayName="MarkdownH4";var im=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>Te(e,t));im.displayName="MarkdownH5";var am=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>Te(e,t));am.displayName="MarkdownH6";var sm=N.memo(({children:e,className:t,node:n,...r})=>{let{controls:i,tableMaxHeight:a}=N.useContext(He),s=ia(i,"table"),o=_s(i,"copy"),u=_s(i,"download"),l=_s(i,"fullscreen");return A.jsx(lL,{className:t,maxHeight:a,showControls:s,showCopy:o,showDownload:u,showFullscreen:l,...r,children:e})},(e,t)=>Te(e,t));sm.displayName="MarkdownTable";var om=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>Te(e,t));om.displayName="MarkdownThead";var um=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>Te(e,t));um.displayName="MarkdownTbody";var lm=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>Te(e,t));lm.displayName="MarkdownTr";var cm=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>Te(e,t));cm.displayName="MarkdownTh";var dm=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>Te(e,t));dm.displayName="MarkdownTd";var hm=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>Te(e,t));hm.displayName="MarkdownBlockquote";var fm=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>Te(e,t));fm.displayName="MarkdownSup";var pm=N.memo(({children:e,className:t,node:n,...r})=>{let i=ue();return A.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>Te(e,t));pm.displayName="MarkdownSub";var mm=N.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var o,u;if(!N.isValidElement(s))return!1;let l=Array.isArray(s.props.children)?s.props.children:[s.props.children],c=!1,d=!1;for(let p of l)if(p){if(typeof p=="string")p.trim()!==""&&(c=!0);else if(N.isValidElement(p))if(((o=p.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let f=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let m of f){if(typeof m=="string"&&m.trim()!==""){c=!0;break}if(N.isValidElement(m)&&((u=m.props)==null?void 0:u["data-footnote-backref"])===void 0){c=!0;break}}}}return d&&!c},a=Array.isArray(e)?e.map(s=>{if(!N.isValidElement(s))return s;if(s.type===_u){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(u=>!i(u));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?A.jsx("section",{className:t,...r,children:a}):null}return A.jsx("section",{className:t,...r,children:e})},(e,t)=>Te(e,t));mm.displayName="MarkdownSection";var _L=({node:e,className:t,children:n,...r})=>{var i,a;let s=ue(),o=!("data-block"in r),{mermaid:u,controls:l,lineNumbers:c}=N.useContext(He),d=bu(),p=NN(),f=t==null?void 0:t.match(fL),m=(i=f==null?void 0:f.at(1))!=null?i:"",g=rL(m);if(o)return A.jsx("code",{className:s("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let y=(a=e==null?void 0:e.properties)==null?void 0:a.metastring,_=y==null?void 0:y.match(cL),C=_?Number.parseInt(_[1],10):void 0,T=C!==void 0&&C>=1?C:void 0,O=!(y&&dL.test(y))&&c!==!1,v="";if(N.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?v=n.props.children:typeof n=="string"&&(v=n),g){let V=g.component;return A.jsx(N.Suspense,{fallback:A.jsx(Fc,{}),children:A.jsx(V,{code:v,isIncomplete:p,language:m,meta:y})})}if(m==="mermaid"&&d){let V=ia(l,"mermaid"),G=ki(l,"download"),Z=ki(l,"copy"),W=ki(l,"fullscreen"),$=ki(l,"panZoom"),K=V&&(G||Z||W);return A.jsx(N.Suspense,{fallback:A.jsx(Fc,{}),children:A.jsxs("div",{className:s("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[A.jsx("div",{className:s("flex h-8 items-center text-muted-foreground text-xs"),children:A.jsx("span",{className:s("ml-1 font-mono lowercase"),children:"mermaid"})}),K?A.jsx("div",{className:s("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:A.jsxs("div",{className:s("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[G?A.jsx(jp,{chart:v,config:u==null?void 0:u.config}):null,Z?A.jsx(ro,{code:v}):null,W?A.jsx(sL,{chart:v,config:u==null?void 0:u.config}):null]})}):null,A.jsx("div",{className:s("rounded-md border border-border bg-background"),children:A.jsx(hL,{chart:v,config:u==null?void 0:u.config,showControls:$})})]})})}let S=ia(l,"code"),M=Hc(l,"download"),D=Hc(l,"copy"),{"data-block":z,...R}=r;return A.jsx($N,{className:t,code:v,isIncomplete:p,language:m,lineNumbers:O,startLine:T,...R,children:S?A.jsxs(A.Fragment,{children:[M?A.jsx(JN,{code:v,language:m}):null,D?A.jsx(ro,{}):null]}):null})},gm=N.memo(_L,(e,t)=>Te(e,t)&&mL(e.node,t.node));gm.displayName="MarkdownCode";var EL=({node:e,className:t,...n})=>{let{controls:r}=N.useContext(He),i=ia(r,"image"),a=i&&gL(r,"download");return A.jsx(tL,{className:t,node:e,showControls:i,showDownloadControl:a,...n})},bm=N.memo(EL,(e,t)=>Te(e,t));bm.displayName="MarkdownImg";var _m=N.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&N.isValidElement(r[0])){let i=r[0].props.node,a=i==null?void 0:i.tagName;if(a==="img")return A.jsx(A.Fragment,{children:e});if(a==="code"&&"data-block"in r[0].props)return A.jsx(A.Fragment,{children:e})}return A.jsx("p",{...n,children:e})},(e,t)=>Te(e,t));_m.displayName="MarkdownParagraph";var TL={ol:_u,li:Qp,ul:Xp,hr:Kp,strong:Zp,a:Jp,h1:em,h2:tm,h3:nm,h4:rm,h5:im,h6:am,table:sm,thead:om,tbody:um,tr:lm,th:cm,td:dm,blockquote:hm,code:gm,img:bm,pre:({children:e})=>N.isValidElement(e)?N.cloneElement(e,{"data-block":"true"}):e,sup:fm,sub:pm,p:_m,section:mm},yL=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,kL=new RegExp("\\p{L}","u");function Em(e){let t=e.replace(/(```|~~~)[\s\S]*?\1/g,"").replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,""),n,r=0,i=0;for(let a of t){if(yL.test(a)){n!=null||(n="rtl"),i+=1;continue}kL.test(a)&&(n!=null||(n="ltr"),r+=1)}return i>r?"rtl":r>i?"ltr":n??"ltr"}var xL=/^[ \t]{0,3}(`{3,}|~{3,})/,AL=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Uc=e=>{let t=e.split(`
278
+ `),n=null,r=0;for(let i of t){let a=xL.exec(i);if(n===null){if(a){let s=a[1];n=s[0],r=s.length}}else if(a){let s=a[1],o=s[0],u=s.length;o===n&&u>=r&&(n=null,r=0)}}return n!==null},CL=e=>{let t=e.split(`
279
+ `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&AL.test(r))return!0}return!1},wL=()=>e=>{Tt(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},$c=[],jc={allowDangerousHtml:!0},xi=new WeakMap,IL=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let c="default";return this.keyCache.set(e,c),c}let a=c=>{if(!c||c.length===0)return"";let d="";for(let p=0;p<c.length;p+=1){let f=c[p];if(p>0&&(d+=","),Array.isArray(f)){let[m,g]=f;if(typeof m=="function"){let y=xi.get(m);y||(y=m.name,xi.set(m,y)),d+=y}else d+=String(m);d+=":",d+=JSON.stringify(g)}else if(typeof f=="function"){let m=xi.get(f);m||(m=f.name,xi.set(f,m)),d+=m}else d+=String(f)}return d},s=a(n),o=a(r),u=i?JSON.stringify(i):"",l=`${o}::${s}::${u}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Vc=new IL,Tm=e=>{let t=SL(e),n=e.children||"",r=t.runSync(t.parse(n),n);return vL(r,e)},SL=e=>{let t=Vc.get(e);if(t)return t;let n=LL(e);return Vc.set(e,n),n},NL=e=>e.some(t=>Array.isArray(t)?t[0]===$s:t===$s),LL=e=>{let t=e.rehypePlugins||$c,n=e.remarkPlugins||$c,r=NL(t)?n:[...n,wL],i=e.remarkRehypeOptions?{...jc,...e.remarkRehypeOptions}:jc;return T3().use(ES).use(r).use(t3,i).use(t)},RL=e=>e,OL=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},PL=(e,t)=>{var n;for(let r in us)if(Object.hasOwn(us,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=us[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},DL=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},vL=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:o}=t;if(n||r||i||a||o){let u=o||RL;Tt(e,(l,c,d)=>{if(l.type==="raw"&&d&&typeof c=="number")return OL(d,c,a,l.value),c;if(l.type==="element"&&(PL(l,u),DL(l,c,d,r,i,n)&&d&&typeof c=="number"))return s&&l.children?d.children.splice(c,1,...l.children):d.children.splice(c,1),c})}return II(e,{Fragment:A.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:A.jsx,jsxs:A.jsxs,passKeys:!0,passNode:!0})},ML=/\[\^[\w-]{1,200}\](?!:)/,BL=/\[\^[\w-]{1,200}\]:/,FL=/<([A-Za-z][\w:-]*)[\s>/]/,HL=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),zc=new Map,Gc=new Map,UL=e=>{let t=e.toLowerCase(),n=zc.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return zc.set(t,r),r},$L=e=>{let t=e.toLowerCase(),n=Gc.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Gc.set(t,r),r},qc=(e,t)=>{if(HL.has(t.toLowerCase()))return 0;let n=e.match(UL(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Wc=(e,t)=>{let n=e.match($L(t));return n?n.length:0},jL=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},VL=e=>{let t=ML.test(e),n=BL.test(e);if(t||n)return[e];let r=lt.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let o of r){let u=o.raw,l=i.length;if(a.length>0){i[l-1]+=u;let c=a.at(-1),d=qc(u,c),p=Wc(u,c);for(let f=0;f<d;f+=1)a.push(c);for(let f=0;f<p;f+=1)a.length>0&&a.at(-1)===c&&a.pop();continue}if(o.type==="html"&&o.block){let c=u.match(FL);if(c){let d=c[1],p=qc(u,d),f=Wc(u,d);p>f&&a.push(d)}}if(l>0&&!s){let c=i[l-1];if(jL(c)%2===1){i[l-1]=c+u;continue}}i.push(u),o.type!=="space"&&(s=o.type==="code")}return i},zL=/^\n*/,GL=/\n*$/,so=/\n\n/g,qL=(e,t,n)=>{if(!t.includes(`
280
+ `))return e+t+n;let r=t.replace(so,`
281
+ <!---->
282
+ `).replace(zL,`
283
+
284
+ `).replace(GL,`
285
+
286
+ `);return`${e}${r}${n}
287
+
288
+ `},WL=(e,t)=>{let n=new RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,"gi"),r="",i=0,a=n.exec(e);for(;a;){let s=a[0],o=a[1],u=a.index+s.length,l=e.slice(u);if(new RegExp(`</${o}\\s*>`,"i").test(l)){a=n.exec(e);continue}if(r+=e.slice(i,a.index),l.length===0){r+=s,i=u,a=n.exec(e);continue}if(l.startsWith(`
289
+
290
+ `)){let p=l.slice(2).replace(so,`
291
+ <!---->
292
+ `);r+=`${s}
293
+
294
+ ${p}`,i=e.length;break}if(!l.startsWith(`
295
+ `)){r+=s,i=u,a=n.exec(e);continue}let c=l.slice(1);if(c.trim().length===0){r+=s,i=u,a=n.exec(e);continue}let d=c.replace(so,`
296
+ <!---->
297
+ `);r+=`${s}
298
+
299
+ ${d}`,i=e.length;break}return i===0?e:r+e.slice(i)},YL=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,o,u)=>qL(s,o,u)),n=WL(n,r)}return n},QL=/([\\`*_~[\]|])/g,XL=e=>e.replace(QL,"\\$1"),KL=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,o,u)=>{let l=XL(o).replace(/\n\n/g,"&#10;&#10;");return s+l+u})}return n},ZL=new Set(["blockquote","dd","dt","figcaption","h1","h2","h3","h4","h5","h6","li","p","td","th"]),ym=new Set(["code","kbd","pre","samp","var"]);function km(e){return e.children.map(t=>t.type==="text"?t.value:t.type==="element"&&!ym.has(t.tagName)?km(t):"").join("")}function JL(){return e=>{Tt(e,"element",t=>{if(ym.has(t.tagName)){t.properties!=null||(t.properties={}),t.properties.dir="ltr";return}ZL.has(t.tagName)&&(t.properties!=null||(t.properties={}),typeof t.properties.dir!="string"&&(t.properties.dir=Em(km(t))))})}}var xm=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(xm).join(""):"",eR=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Tt(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=xm(r);r.children=i?[{type:"text",value:i}]:[]}})},tR=()=>e=>{Tt(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},nR=/^[ \t]*<[\w!/?-]/,rR=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,iR=e=>typeof e!="string"||e.length===0||!nR.test(e)?e:e.replace(rR,"$1"),Yc,Qc,Xc,Kc,Oi={...En,clobberPrefix:"",protocols:{...En.protocols,href:[...(Qc=(Yc=En.protocols)==null?void 0:Yc.href)!=null?Qc:[],"tel","streamdown"]},attributes:{...En.attributes,code:[...(Kc=(Xc=En.attributes)==null?void 0:Xc.code)!=null?Kc:[],"metastring"]}},oo={raw:$s,sanitize:[af,Oi],harden:[W_,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Am={gfm:[sC,{}],codeMeta:tR},Zc=Object.values(oo),aR=Object.values(Am),sR={block:" ▋",circle:" ●"},Cm=["github-light","github-dark"],wm={enabled:!0},oR={codeBlockMaxHeight:400,shikiTheme:Cm,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:wm,tableMaxHeight:300},He=N.createContext(oR),Im=N.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:s,...o})=>{N.useLayoutEffect(()=>{s==null||s.commit()});let u=typeof e=="string"&&n?iR(e):e,l=A.jsx(Tm,{...o,children:u});return A.jsx(vp.Provider,{value:i,children:a?A.jsx("div",{dir:a,style:{display:"contents"},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins||!!e.animatePlugin!=!!t.animatePlugin)});Im.displayName="Block";var Sm=N.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:s=Zc,remarkPlugins:o=aR,className:u,shikiTheme:l,mermaid:c,codeBlockMaxHeight:d=400,controls:p=!0,isAnimating:f=!1,tableMaxHeight:m=300,animated:g,BlockComponent:y=Im,parseMarkdownIntoBlocksFn:_=VL,caret:C,plugins:T,remend:O,linkSafety:v=wm,lineNumbers:S=!0,allowedTags:M,literalTagContent:D,translations:z,icons:R,prefix:V,onAnimationStart:G,onAnimationEnd:Z,...W})=>{let $=N.useId(),K=N.useMemo(()=>RN(V),[V]),X=N.useRef(null),de=N.useRef(G),Ie=N.useRef(Z);de.current=G,Ie.current=Z,N.useEffect(()=>{var ee,he,qe;if(t==="static")return;let at=X.current;if(X.current=f,at===null){f&&((ee=de.current)==null||ee.call(de));return}f&&!at?(he=de.current)==null||he.call(de):!f&&at&&((qe=Ie.current)==null||qe.call(Ie))},[f,t]);let x=N.useMemo(()=>M?Object.keys(M):[],[M]),Pe=N.useMemo(()=>{if(typeof e!="string")return"";let ee=t==="streaming"&&r?xw(e,O):e;return D&&D.length>0&&(ee=KL(ee,D)),x.length>0&&(ee=YL(ee,x)),ee},[e,t,r,O,x,D]),ke=N.useMemo(()=>_(Pe),[Pe,_]),I=N.useMemo(()=>n==="auto"?ke.map(Em):void 0,[ke,n]),Fe=N.useMemo(()=>ke.map((ee,he)=>`${$}-${he}`),[ke.length,$]),pe=N.useMemo(()=>g===!0?"true":g?JSON.stringify(g):"",[g]),ne=N.useRef(null),Ue=N.useRef([]),Se=N.useRef([]),me=N.useRef(null),tt=N.useRef("");if(pe){if(tt.current!==pe){tt.current=pe;let ee=pe!=="true"?g.maxBacklogMs:void 0;ne.current=Dc({maxBacklogMs:ee}),Ue.current=[],Se.current=[]}else ne.current||(ne.current=Dc());f&&ne.current&&ne.current.beginPass(ne.current.now())}else ne.current=null,Ue.current=[],Se.current=[],tt.current="";N.useLayoutEffect(()=>{var ee;f&&((ee=ne.current)==null||ee.commitPass())});let it=N.useMemo(()=>{var ee,he;return{codeBlockMaxHeight:d,shikiTheme:(he=l??((ee=T==null?void 0:T.code)==null?void 0:ee.getThemes()))!=null?he:Cm,controls:p,isAnimating:f,lineNumbers:S,mode:t,mermaid:c,linkSafety:v,tableMaxHeight:m}},[d,l,p,f,S,t,c,v,T==null?void 0:T.code,m]),Gt=N.useMemo(()=>z?JSON.stringify(z):"",[z]),qt=N.useMemo(()=>({...$p,...z}),[Gt]),Pt=N.useMemo(()=>{let{inlineCode:ee,...he}=a??{},qe={...TL,...he};if(ee){let at=qe.code;qe.code=Yt=>"data-block"in Yt?at?N.createElement(at,Yt):null:N.createElement(ee,Yt)}return qe},[a]),cr=N.useMemo(()=>{let ee=[];return T!=null&&T.cjk&&(ee=[...ee,...T.cjk.remarkPluginsBefore]),ee=[...ee,...o],T!=null&&T.cjk&&(ee=[...ee,...T.cjk.remarkPluginsAfter]),T!=null&&T.math&&(ee=[...ee,T.math.remarkPlugin]),ee},[o,T==null?void 0:T.math,T==null?void 0:T.cjk]),Wt=N.useMemo(()=>{var ee;let he=s;if(M&&Object.keys(M).length>0&&s===Zc){let qe={...Oi,tagNames:[...(ee=Oi.tagNames)!=null?ee:[],...Object.keys(M)],attributes:{...Oi.attributes,...M}};he=[oo.raw,[af,qe],oo.harden]}return D&&D.length>0&&(he=[...he,[eR,D]]),T!=null&&T.math&&(he=[...he,T.math.rehypePlugin]),n==="auto"&&t==="static"&&(he=[...he,JL]),he},[s,T==null?void 0:T.math,M,D,n,t]),Fn=N.useMemo(()=>{if(!f||ke.length===0)return!1;let ee=ke.at(-1);return Uc(ee)||CL(ee)},[f,ke]),Na=N.useMemo(()=>C&&f&&!Fn?{"--streamdown-caret":`"${sR[C]}"`}:void 0,[C,f,Fn]),si=ee=>{let he=null;if(ne.current&&f){if(!Ue.current[ee]){let at=pe&&pe!=="true"?g:{},{maxBacklogMs:Yt,...dr}=at;Ue.current[ee]=Dp({...dr,timeline:ne.current})}he=Ue.current[ee]}me.current!==Wt&&(Se.current=[],me.current=Wt),he&&!Se.current[ee]&&(Se.current[ee]=[...Wt,he.rehypePlugin]);let qe=he&&Se.current[ee]?Se.current[ee]:Wt;return{blockAnimatePlugin:he,blockRehypePlugins:qe}};return t==="static"?A.jsx(no.Provider,{value:qt,children:A.jsx(io.Provider,{value:T??null,children:A.jsx(He.Provider,{value:it,children:A.jsx(Mc,{icons:R,children:A.jsx(to.Provider,{value:K,children:A.jsx("div",{className:K("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",u),dir:n==="auto"?void 0:n,children:A.jsx(Tm,{components:Pt,rehypePlugins:Wt,remarkPlugins:cr,...W,children:Pe})})})})})})}):A.jsx(no.Provider,{value:qt,children:A.jsx(io.Provider,{value:T??null,children:A.jsx(He.Provider,{value:it,children:A.jsx(Mc,{icons:R,children:A.jsx(to.Provider,{value:K,children:A.jsxs("div",{className:K("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",C&&!Fn?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,u),style:Na,children:[ke.length===0&&C&&f&&A.jsx("span",{}),ke.map((ee,he)=>{var qe;let at=he===ke.length-1,Yt=f&&at&&Uc(ee),{blockAnimatePlugin:dr,blockRehypePlugins:F}=si(he);return A.jsx(y,{animatePlugin:dr,components:Pt,content:ee,dir:(qe=I==null?void 0:I[he])!=null?qe:n!=="auto"?n:void 0,index:he,isIncomplete:Yt,rehypePlugins:F,remarkPlugins:cr,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...W},Fe[he])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.codeBlockMaxHeight===t.codeBlockMaxHeight&&e.tableMaxHeight===t.tableMaxHeight&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Sm.displayName="Streamdown";var uR=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let{RotateCcwIcon:u,ZoomInIcon:l,ZoomOutIcon:c}=kt(),d=ue(),p=Ot(),f=N.useRef(null),m=N.useRef(null),[g,y]=N.useState(s),[_,C]=N.useState({x:0,y:0}),[T,O]=N.useState(!1),[v,S]=N.useState({x:0,y:0}),[M,D]=N.useState({x:0,y:0}),z=N.useCallback(X=>{y(de=>Math.max(n,Math.min(r,de+X)))},[n,r]),R=N.useCallback(()=>{z(i)},[z,i]),V=N.useCallback(()=>{z(-i)},[z,i]),G=N.useCallback(()=>{y(s),C({x:0,y:0})},[s]),Z=N.useCallback(X=>{X.preventDefault();let de=X.deltaY>0?-i:i;z(de)},[z,i]),W=N.useCallback(X=>{if(X.button!==0||X.isPrimary===!1)return;O(!0),S({x:X.clientX,y:X.clientY}),D(_);let de=X.currentTarget;de instanceof HTMLElement&&de.setPointerCapture(X.pointerId)},[_]),$=N.useCallback(X=>{if(!T)return;X.preventDefault();let de=X.clientX-v.x,Ie=X.clientY-v.y;C({x:M.x+de,y:M.y+Ie})},[T,v,M]),K=N.useCallback(X=>{O(!1);let de=X.currentTarget;de instanceof HTMLElement&&de.releasePointerCapture(X.pointerId)},[]);return N.useEffect(()=>{let X=f.current;if(X)return X.addEventListener("wheel",Z,{passive:!1}),()=>{X.removeEventListener("wheel",Z)}},[Z]),N.useEffect(()=>{let X=m.current;if(X&&T)return document.body.style.userSelect="none",X.addEventListener("pointermove",$,{passive:!1}),X.addEventListener("pointerup",K),X.addEventListener("pointercancel",K),()=>{document.body.style.userSelect="",X.removeEventListener("pointermove",$),X.removeEventListener("pointerup",K),X.removeEventListener("pointercancel",K)}},[T,$,K]),A.jsxs("div",{className:d("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:f,style:{cursor:T?"grabbing":"grab"},children:[a?A.jsxs("div",{className:d("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[A.jsx("button",{"aria-label":p.zoomIn,className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g>=r,onClick:R,title:p.zoomIn,type:"button",children:A.jsx(l,{"aria-hidden":"true",size:16})}),A.jsx("button",{"aria-label":p.zoomOut,className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g<=n,onClick:V,title:p.zoomOut,type:"button",children:A.jsx(c,{"aria-hidden":"true",size:16})}),A.jsx("button",{"aria-label":p.resetView,className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:G,title:p.resetView,type:"button",children:A.jsx(u,{"aria-hidden":"true",size:16})})]}):null,A.jsx("div",{className:d("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:W,ref:m,role:"application",style:{transform:`translate(${_.x}px, ${_.y}px) scale(${g})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Nm=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=ue(),[s,o]=N.useState(null),[u,l]=N.useState(!1),[c,d]=N.useState(""),[p,f]=N.useState(""),[m,g]=N.useState(0),{mermaid:y}=N.useContext(He),_=bu(),C=y==null?void 0:y.errorComponent,{shouldRender:T,containerRef:O}=pN({immediate:r});if(N.useEffect(()=>{if(T){if(!_){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),l(!0);let S=_.getMermaid(n),M=e.split("").reduce((R,V)=>(R<<5)-R+V.charCodeAt(0)|0,0),D=`mermaid-${Math.abs(M)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:z}=await S.render(D,e);d(z),f(z)}catch(S){if(!(p||c)){let M=S instanceof Error?S.message:"Failed to render Mermaid chart";o(M)}}finally{l(!1)}})()}},[e,n,m,T,_]),!(T||c||p))return A.jsx("div",{className:a("my-4 min-h-[200px]",t),ref:O});if(u&&!c&&!p)return A.jsx("div",{className:a("my-4 flex justify-center p-4",t),ref:O,children:A.jsxs("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[A.jsx("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),A.jsx("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(s&&!c&&!p){let S=()=>g(M=>M+1);return C?A.jsx("div",{ref:O,children:A.jsx(C,{chart:e,error:s,retry:S})}):A.jsxs("div",{className:a("rounded-md bg-red-50 p-4",t),ref:O,children:[A.jsxs("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",s]}),A.jsxs("details",{className:a("mt-2"),children:[A.jsx("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),A.jsx("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let v=c||p;return A.jsx("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:O,children:A.jsx(uR,{className:a(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:A.jsx("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:v},role:"img"})})})};function lR(e){if(typeof e!="string"||!e.trim())return{kind:"text"};const t=e.trim();if(/^data:image\//i.test(t)||/^blob:/i.test(t))return{kind:"inline",src:t};const n=t.startsWith("//")?`https:${t}`:t;try{const r=new URL(n);if(r.protocol==="http:"||r.protocol==="https:")return{kind:"link",href:r.href}}catch{}return{kind:"text"}}const cR={code:F_,mermaid:U_};function dR(e){const t=typeof e.alt=="string"?e.alt:"",n=lR(e.src);return n.kind==="inline"?A.jsx("img",{src:n.src,alt:t,className:"max-w-full"}):n.kind==="text"?t?A.jsxs("span",{children:["[",t,"]"]}):null:A.jsxs("a",{href:n.href,target:"_blank",rel:"noopener noreferrer nofollow",referrerPolicy:"no-referrer","data-testid":"markdown-remote-image",title:`Remote image, not loaded: ${n.href}`,className:"inline-flex items-center gap-1 text-primary underline",children:[A.jsx(Hm,{size:14,className:"shrink-0"}),t||n.href]})}const hR="text-primary underline decoration-outline underline-offset-2 hover:decoration-current";function fR(e){const t=[],n=r=>{var i;if(typeof r=="string"||typeof r=="number")t.push(String(r));else{if(Array.isArray(r))return r.every(n);if(N.isValidElement(r)){const a=(i=r.props.node)==null?void 0:i.tagName;if(a==="ul"||a==="ol")return!1;n(r.props.children)}}return!0};return n(e),t.join("").replace(/\s+/g," ").trim()}function pR({children:e,className:t,node:n,...r}){const i=typeof t=="string"&&t.includes("task-list-item"),a=i?fR(e):"";return A.jsx("li",{className:td("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:i?(Array.isArray(e)?e:[e]).map((s,o)=>N.isValidElement(s)&&s.type==="input"?N.cloneElement(s,{key:o,"aria-label":a||"Task"}):s):e})}const mR="[&_a]:text-primary [&_a]:underline [&_a]:decoration-outline [&_a]:underline-offset-2 [&_a:hover]:decoration-current [&_.contains-task-list]:list-none [&_.contains-task-list]:pl-0 [&_li_.contains-task-list]:pl-6 [&_.task-list-item>input]:mr-2 [&_.task-list-item>input]:align-middle",gR=N.memo(function({children:t,wikiLinks:n,readable:r=!1}){const{theme:i}=vm();return A.jsx(Sm,{mode:"static",plugins:cR,components:{img:dR,li:pR,...n?{a:a=>{const s=typeof a.href=="string"?a.href:void 0,o=a.children;if(s!=null&&s.startsWith("#wiki-")){const u=Bm(decodeURIComponent(s.slice(6)));return n.slugs.includes(u)?A.jsx("button",{type:"button","data-testid":`wiki-link-${u}`,className:hR,onClick:()=>n.select(u),children:o}):A.jsx("span",{children:o})}return A.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:o})}}:{}},...n?{remarkPlugins:[...Object.values(Am),Mm]}:{},shikiTheme:["github-light","github-dark"],mermaid:{config:{theme:i==="dark"?"dark":"default"}},controls:{table:!1,code:{copy:!0,download:!1},mermaid:{copy:!0,download:!1,fullscreen:!0,panZoom:!0}},className:td(mR,r?"text-base leading-[1.65] text-on-surface [&>*]:!my-4 [&_pre]:max-w-full [&_pre]:overflow-auto [&_pre]:text-sm [&_:is(h1,h2,h3,h4,h5,h6)]:!mb-2 [&_:is(h1,h2,h3,h4,h5,h6)]:font-medium [&_:is(h1,h2,h3,h4,h5,h6)]:leading-snug [&_h1]:!mt-10 [&_h1]:text-2xl [&_h2]:!mt-8 [&_h2]:text-xl [&_h3]:!mt-6 [&_h3]:text-lg [&_:is(h4,h5,h6)]:!mt-5 [&_:is(h4,h5,h6)]:text-base [&>:is(ul,ol)]:!my-3 [&_:is(ul,ol)]:list-outside [&_:is(ul,ol)]:pl-6 [&_li]:py-0.5 [&_li>:is(ul,ol)]:my-1 [&_img]:max-w-full [&_table]:text-sm [&>*:first-child]:!mt-0 [&>*:last-child]:!mb-0":"text-sm leading-relaxed text-on-surface [&_p]:my-2 [&_pre]:max-w-full [&_pre]:overflow-auto [&_pre]:text-xs [&_h1]:text-xl [&_h2]:text-lg [&_h3]:text-base [&_ul]:my-2 [&_ol]:my-2"),children:t})}),SR=Object.freeze(Object.defineProperty({__proto__:null,MarkdownRenderer:gR},Symbol.toStringTag,{value:"Module"})),bR=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Nm},Symbol.toStringTag,{value:"Module"}));export{IR as E,SR as M,He as S,MN as c};